import { Type, type Static } from "typebox"; import type { ExtensionAPI, ExtensionContext, ToolDefinition } from "@earendil-works/pi-coding-agent"; /** Snapshot of currently-running delegate runs, for the TUI status widget. */ export declare function runningRunsSnapshot(): { runId: string; agent: string; task: string; startedAt: number; }[]; declare const DelegateParams: Type.TObject<{ agent: Type.TString; task: Type.TString; cwd: Type.TOptional; model: Type.TOptional; async: Type.TOptional; showThinking: Type.TOptional; }>; type DelegateArgs = Static; declare const CancelParams: Type.TObject<{ runId: Type.TString; }>; declare const WaitParams: Type.TObject<{ runId: Type.TString; timeout: Type.TOptional; }>; export declare function makeDelegateTool(pi: ExtensionAPI): ToolDefinition; /** If the delegate already delivered its result via a system notification * (the close handler injected before this wait was called), return a short * "already delivered" message pointing at the result file, so the model * never sees the same result twice (once via the injected notification, * once via this tool result). Returns null when the run was NOT injected, * in which case the caller delivers the full payload via formatRunResult(). */ export declare function injectedWaitMessage(run: { injected?: boolean; result?: { file: string; }; }, runId: string, remainingLine: string): string | null; export declare function makeDelegateWaitTool(_pi: ExtensionAPI): ToolDefinition; export declare function makeDelegateCancelTool(_pi: ExtensionAPI): ToolDefinition; export declare function buildChildArgs(args: DelegateArgs, rolePrompt: string, ctx: ExtensionContext): Promise<{ cliArgs: string[]; tmpDir: string; isAsync: boolean; useJsonStream: boolean; }>; export {};