refactor(agent): expose concrete harness session

This commit is contained in:
Mario Zechner
2026-05-06 12:57:19 +02:00
parent 0a032ae1b3
commit 530f14c018
7 changed files with 25 additions and 64 deletions

View File

@@ -1,7 +1,7 @@
import { randomUUID } from "node:crypto";
import { readFileSync } from "node:fs";
import type { ImageContent, Model } from "@mariozechner/pi-ai";
import type { Agent } from "../agent.js";
import { Agent } from "../agent.js";
import type { AgentEvent, AgentMessage, AgentTool, ThinkingLevel } from "../types.js";
import { collectEntriesForBranchSummary, generateBranchSummary } from "./compaction/branch-summarization.js";
import { compact, DEFAULT_COMPACTION_SETTINGS, prepareCompaction } from "./compaction/compaction.js";
@@ -68,7 +68,7 @@ export class DefaultAgentHarness implements AgentHarness {
>();
constructor(options: AgentHarnessOptions) {
this.agent = options.agent;
this.agent = new Agent({});
this.env = options.env;
this.session = options.session;
this.promptTemplates = options.promptTemplates ?? [];