/** * PiAgent is the real AgentPort: it turns a RunSpec into pi argv, spawns the * pi binary in the step's worktree via an injected ProcessRunner, and parses * the JSONL stdout into a structured result. * * The ProcessRunner seam keeps this logic unit-testable with a fake; the live * binding (NodeProcessRunner) is exercised by the smoke test, not unit tests. */ import type { AgentPort, ProcessRunner } from "../ports/agent.ts"; import { type ModelOverrides, type RunSpec } from "../domain/run-spec.ts"; import { type PiResult } from "../domain/pi-result.ts"; export declare class PiAgent implements AgentPort { private readonly piBinary; private readonly runner; private readonly overrides; private readonly runId?; constructor(piBinary: string, runner: ProcessRunner, overrides?: ModelOverrides, runId?: string | undefined); run(spec: RunSpec, onActivity?: (activity: string) => void): Promise; }