import type { AgentStepExecutor, AgentStepRequest, AgentStepSubmission } from "../workflows/types.js"; import type { HostProcessRegistry } from "./processes.js"; export type RpcStepExecutorOptions = { cwd: string; registry: HostProcessRegistry; /** Absolute path to the pi binary; defaults to the installed `pi`. */ piBin?: string; /** Extra environment for the child; the host's environment is inherited. */ env?: Record; /** Extra pi arguments, for example a model override. */ piArgs?: string[]; }; /** * Runs agent steps in a headless `pi --mode rpc` child. One child serves one * workflow run. The rpc-bridge extension inside the child registers the * `workflow` tool and reports submissions over stderr; this executor * validates them through `request.accept` and re-prompts on rejection, so * the model sees the same tool contract as an in-session run. */ export declare class RpcStepExecutor implements AgentStepExecutor { private readonly options; private child; private childExited; private stderrBuffer; private submissions; private submissionWaiters; private stdoutBuffer; constructor(options: RpcStepExecutorOptions); runAgentStep(request: AgentStepRequest, signal: AbortSignal): Promise; /** Stop the child's whole process group, then unregister it. */ close(): Promise; private currentExit; private ensureStarted; private promptForSubmission; private takeMatchingSubmission; private sendAbortQuietly; private wakeSubmissionWaiters; }