import type { ToolDef } from './provider-base.js'; import type { ToolDispatcher } from './tool-dispatcher.js'; export declare const PLAN_EXIT_TOOL_NAME = "agim_exit_plan_mode"; export declare function isPlanExitToolName(name: string): boolean; export interface PlanExitCtx { /** Composite thread key (same one PlanMode + Todo use). */ threadKey: string; /** agent-loop run identifier — required by approvalBus.registerRun. */ runId: string; /** RunContext fields. approvalBus needs these to address the IM card * back to the right thread. When platform/channelId/threadId are * empty, the approval-bus has no way to surface the prompt; we fall * back to a synthetic "auto-approve only if running as loopback CLI" * hint and degrade to immediate rejection so model isn't stuck. */ platform?: string; channelId?: string; threadId?: string; userId?: string; } /** Tool definitions to advertise — emitted ONLY when the thread is in * plan mode. The native agent strips it from the roster otherwise so * the model can't accidentally call it from a normal turn. */ export declare function getPlanExitTools(): ToolDef[]; /** Build a per-thread dispatcher. Each agent-loop run gets one; the * closure captures threadKey + runId + IM context. */ export declare function buildPlanExitDispatcher(ctx: PlanExitCtx): ToolDispatcher; //# sourceMappingURL=plan-exit-dispatcher.d.ts.map