feat(agent): split harness compaction and session modules

This commit is contained in:
Mario Zechner
2026-05-03 03:13:45 +02:00
parent a5b27367d3
commit 83599e789d
13 changed files with 1910 additions and 939 deletions

View File

@@ -1,4 +1,3 @@
import type { AgentMessage } from "@mariozechner/pi-agent-core";
import {
type AssistantMessage,
type FauxProviderRegistration,
@@ -18,8 +17,8 @@ import {
prepareCompaction,
serializeConversation,
shouldCompact,
} from "../../src/harness/compaction.js";
import { buildSessionContext } from "../../src/harness/session-tree.js";
} from "../../src/harness/compaction/compaction.js";
import { buildSessionContext } from "../../src/harness/session/session-tree.js";
import type {
CompactionEntry,
CompactionSettings,
@@ -28,6 +27,7 @@ import type {
SessionTreeEntry,
ThinkingLevelChangeEntry,
} from "../../src/harness/types.js";
import type { AgentMessage } from "../../src/types.js";
let nextId = 0;
function createId(): string {