/** * PiHarness — CodingHarness implementation for the pi coding agent. * * This harness encapsulates the existing pi-specific spawning logic: * - Config directory creation (settings.json, auth.json, models.json) * - Launch command construction with --session-id, --model, --provider, etc. * - Readiness detection via the pi-ready-signal extension * - JSONL session file monitoring (reuses existing session-parser logic) * - Temp directory cleanup on teardown */ import type { CodingHarness, HarnessConfigProfile, HarnessEnvironment, HarnessSpawnParams, SessionAnalysis } from "#src/harness/interface"; import type { TmuxManager } from "#src/tmux-manager"; export declare class PiHarness implements CodingHarness { readonly id = "pi"; readonly roleDefinitionDelivery: "prompt-context"; /** Self-described widget identity (fallback row retained in harness-colors). */ readonly widgetIdentity: { colorHex: string; sigil: string; }; readonly completionSentinelKind = "agent-end extension sentinel"; /** Default tmux stop combo (fallback row retained in guard-config). */ readonly defaultStopKeyCombo = "C-c"; /** Pi's child-status-writer extension emits a live tool-status stream. */ readonly providesToolStatusStream = true; resolveOwnedTempPaths(agentId: string, runtimeDir?: string): string[]; /** * Config-dir profile (layer B). pi's synth dir IS the agent dir * (`configSubdir "."`); the base is pi's config dir (= host storage default). * `redirectEnv` sets `PI_CODING_AGENT_DIR`. */ readonly configProfile: HarnessConfigProfile; setupEnvironment(params: HarnessSpawnParams): Promise; buildLaunchCommand(params: HarnessSpawnParams, env: HarnessEnvironment): string; waitForReady(params: HarnessSpawnParams, env: HarnessEnvironment, agentId: string, _tmux: TmuxManager, signal?: AbortSignal): Promise; cleanup(env: HarnessEnvironment): Promise; readTurnCount(env: HarnessEnvironment): Promise; /** * Analyze a pi-format session file using the pi parser. * * Returns the full `SessionAnalysis` from `analyzeSessionFile()`. * The harness interface requires only the minimal `SessionAnalysis` * shape, but pi's parser is a structural superset so we can return * it directly. */ analyzeSession(filePath: string): SessionAnalysis; /** * Report whether the pi lifecycle-end sentinel has been written. * * Authoritative completion signal for `LifecycleController` — see the * `completion-sentinel` capability. Cheap + synchronous. */ isComplete(env: HarnessEnvironment): boolean; } //# sourceMappingURL=pi-harness.d.ts.map