feat(agent): add harness factory helpers

This commit is contained in:
Mario Zechner
2026-05-04 01:15:53 +02:00
parent c5340670bb
commit d29e47c771
3 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import { DefaultAgentHarness } from "./agent-harness.js";
import { DefaultSession } from "./session/session.js";
import type { AgentHarness, AgentHarnessOptions, Session, SessionMetadata, SessionStorage } from "./types.js";
export function createSession<TMetadata extends SessionMetadata>(
storage: SessionStorage<TMetadata>,
): Session<TMetadata> {
return new DefaultSession(storage);
}
export function createAgentHarness(options: AgentHarnessOptions): AgentHarness {
return new DefaultAgentHarness(options);
}

View File

@@ -23,6 +23,7 @@ export {
shouldCompact,
} from "./harness/compaction/compaction.js";
export * from "./harness/execution-env.js";
export * from "./harness/factory.js";
export * from "./harness/messages.js";
export * from "./harness/prompt-templates.js";
export * from "./harness/session/repo/jsonl.js";