import { spawn } from "node:child_process"; import type { SelectedAgentLaunchConfig } from "./selected-agent-launch-config.js"; import type { AgentContextMode } from "./types.js"; export interface HerdrRunArgs { agentId: string; cwd: string; parentSessionId: string; prompt: string; outputFile?: string; selectedAgentType?: string; selectedAgentLaunchConfig?: SelectedAgentLaunchConfig; context?: AgentContextMode; inheritContext?: boolean; maxTurns?: number; signal?: AbortSignal; piCommand?: string; resultWaitTimeoutMs?: number; approve?: boolean; cavemanEvents?: CavemanEventBus; onRunTag?: (tag: string) => void; onWarning?: (warnings: string[]) => void; } interface HerdrDependencies { hasCommand: (command: string) => boolean; spawnProcess: typeof spawn; exists: (path: string) => boolean; readFile: (path: string) => string; } interface CavemanEventBus { on(event: string, handler: (data: unknown) => void): () => void; emit(event: string, data: unknown): void; } export declare function setHerdrRunnerDependenciesForTest(next: Partial): void; export declare function resetHerdrRunnerDependenciesForTest(): void; export declare function resolveDefaultHerdrChildExtensionPath(runtimeModuleUrl?: URL): string; export declare function runHerdrAgent(args: HerdrRunArgs): Promise<{ responseText: string; outputFile: string; warnings: string[]; }>; export {};