import { type TSchema } from "@sinclair/typebox"; import type { HarnessRegistry } from "#src/harness/registry"; import { type LifecycleRegistry } from "#src/lifecycle-controller"; import { type TmuxManager } from "#src/tmux-manager"; import type { SubagentTracker } from "#src/tracker"; /** * Resume subagent — core execute logic and parameter schema. * * Re-prompts one EXISTING agent by sending `prompt` to its tmux window. For * an `interrupted` agent whose window is alive, reports `ResumeRequested` to * the lifecycle controller (the single transition authority) so monitoring * re-arms; marks `resumedAt` for the widget. Continues the existing harness * conversation — does NOT reload or deliver a role definition. * * Extracted verbatim from the former `resume` branch of `src/tools/subagent.ts` * (batch-spawn-tool change D2). Host-neutral: the pi `defineTool`/`Text` * rendering wrapper lives in `src/host/pi/tools/resume.ts`. */ export declare const RESUME_TOOL_NAME: "resume_subagent"; export declare const RESUME_TOOL_LABEL = "Resume subagent (tmux)"; export declare const RESUME_TOOL_DESCRIPTION: string; export declare const resumeParams: import("@sinclair/typebox").TObject<{ agent_id: import("@sinclair/typebox").TString; prompt: import("@sinclair/typebox").TString; }>; type ToolExecuteResult = { content: { type: "text"; text: string; }[]; details: unknown; }; export interface ResumeToolSpec { name: typeof RESUME_TOOL_NAME; label: string; description: string; parameters: TParams; execute: (toolCallId: string, params: Record, signal: AbortSignal | undefined, onUpdate: ((update: unknown) => void) | undefined, ctx: unknown) => Promise; } /** * Build the resume tool's spec: static description/parameters plus the bound * execute closure. The outer (parent session) abort signal is combined with * the per-call tool signal via the shared `combineSignals` helper, mirroring * the spawn tool's wiring. */ export declare function buildResumeToolSpec(configDir: string, parentSessionId: string, tracker: SubagentTracker, tmux: TmuxManager, harnessRegistry: HarnessRegistry, abortSignal?: AbortSignal, registry?: LifecycleRegistry): { name: "resume_subagent"; label: string; description: string; parameters: import("@sinclair/typebox").TObject<{ agent_id: import("@sinclair/typebox").TString; prompt: import("@sinclair/typebox").TString; }>; execute: (_toolCallId: string, params: Record, signal: AbortSignal | undefined, _onUpdate: ((update: unknown) => void) | undefined, _ctx: unknown) => Promise; }; export declare function executeResume(params: Record, configDir: string, parentSessionId: string, tracker: SubagentTracker, tmux: TmuxManager, harnessRegistry: HarnessRegistry, abortSignal?: AbortSignal, registry?: LifecycleRegistry): Promise; export {}; //# sourceMappingURL=resume.d.ts.map