import type { ExtensionConfig, ToolDescriptionMode } from "../shared/types.ts"; export declare const SUBAGENT_SAFETY_GUIDANCE = "SAFETY-CRITICAL SUBAGENT GUIDANCE:\n\u2022 Use { action: \"list\" } before execution and only run executable/non-disabled agents.\n\u2022 Direct execution is one child call: omit action, pass { agent?: \"worker\", task: \"...\" }. Omitted agent means worker.\n\u2022 Direct calls wait for the child by default. Set async:true only when deliberately running background work; use subagent_wait for a result needed in this turn.\n\u2022 The parent owns sequencing, lifecycle, and any parallel fanout. Children are workers, not orchestrators; they may contact the parent with contact_supervisor when blocked or needing a decision.\n\u2022 Keep one writer for the same cwd/worktree. Use fresh-context read-only reviewers for independent review, then have the parent synthesize and apply fixes.\n\u2022 Async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: \"status\", id }. Include output paths and residual risks when reporting results."; export declare const FULL_SUBAGENT_TOOL_DESCRIPTION = "Run one subagent directly with { agent?, task }; omit action. Omitted agent defaults to the built-in worker. Use action only for management/control. Use workflowScript only when the parent explicitly needs one durable scripted orchestration request.\n\nDIRECT EXECUTION:\n\u2022 Before executing, use { action: \"list\" } and run only executable/non-disabled agents.\n\u2022 { agent: \"reviewer\", task: \"Review the current diff for correctness.\" } runs one child and waits for the result.\n\u2022 Omit agent to use worker. Pass model and thinking to override this child. Pass context:\"fresh\" (default for worker) or context:\"fork\" when the child must branch the parent transcript.\n\u2022 The parent, not the child, owns the overall plan. For deliberate background or parallel work, make explicit async:true calls, then manage them with { action:\"status\" }, { action:\"steer\" }, { action:\"stop\" }, or subagent_wait.\n\u2022 For repository mutation lanes, use worktree:true with runs.run/runs.all for managed isolation.\n\nWORKFLOW SCRIPT (ADVANCED):\n\u2022 { workflowScript: \"return runs.run('main', {agent:'worker', task:'...'})\" } is the explicit scripted orchestration surface. Every workflow is a workflowScript; use stable-key runs.run for one child and runs.all for parallel children. workflowScript is an ordinary JavaScript statement body, so use an explicit return for a useful result. Scripts start asynchronously by default; pass async:false only for a small foreground workflow. Same-repo foreground workflows default to a live in-chat card; set chatProgress to auto, off, or live-card to control that projection. Workflow-level child controls default onto each runs.run launch, and explicit child fields override them.\n\u2022 Sequential example: { workflowScript: \"const a = await runs.run('analyze', {agent:'researcher', task:'Analyze the request'}); return (await runs.run('plan', {agent:'worker', task:'Plan from: '+a.output})).output\" }\n\u2022 Parallel example: { workflowScript: \"const [a,b] = await runs.all([{key:'correctness',agent:'reviewer',task:'Review correctness'},{key:'tests',agent:'reviewer',task:'Review tests'}]); return {correctness:a.output,tests:b.output}\" }\n\u2022 Durable mission attachment is automatic by default. Use missionId to attach an existing mission, mission:{...} to override auto-create, or mission:false for ephemeral work.\n\nMANAGEMENT / CONTROL:\n\u2022 list, get, models, children.list, create, update, delete, eject, disable, enable, reset, doctor, grant-spawn-budget, worktree.discard, refine/refine.show/refine.rollback, mission.create/list/show/update/attach-run/close, inspector.open/status/close, project.open/status/close, and watchdog actions remain available.\n\u2022 status, interrupt, stop, resume, and steer manage live or persisted runs. Use status view:\"fleet\" for an overview or view:\"transcript\" with id and optional index to tail output.\n\u2022 { action: \"append-step\", id: \"...\", step: {agent:\"agent-c\", task:\"Use {previous}\"} } appends one step to an already-running durable legacy chain. step is control-only, not a public execution mode.\n\u2022 Create durable project schedules with { action:\"schedule.create\", id?, name?, at:\"+10m\" | ISO, workflowScript:\"return runs.run('main', {agent:'worker', task:'...'})\" } or { every:\"6h\", workflowScript:\"...\" }. Manage them with schedule.list/show/history/pause/resume/run/run-due/delete.\n\nSAFETY-CRITICAL SUBAGENT GUIDANCE:\n\u2022 Use { action: \"list\" } before execution and only run executable/non-disabled agents.\n\u2022 Direct execution is one child call: omit action, pass { agent?: \"worker\", task: \"...\" }. Omitted agent means worker.\n\u2022 Direct calls wait for the child by default. Set async:true only when deliberately running background work; use subagent_wait for a result needed in this turn.\n\u2022 The parent owns sequencing, lifecycle, and any parallel fanout. Children are workers, not orchestrators; they may contact the parent with contact_supervisor when blocked or needing a decision.\n\u2022 Keep one writer for the same cwd/worktree. Use fresh-context read-only reviewers for independent review, then have the parent synthesize and apply fixes.\n\u2022 Async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: \"status\", id }. Include output paths and residual risks when reporting results."; export declare const COMPACT_SUBAGENT_TOOL_DESCRIPTION = "Run one subagent directly with { agent?, task }; omit action. Omitted agent defaults to worker. Use action only for management/control.\n\nEXECUTE:\n\u2022 Call { action:\"list\" } first and use only executable/non-disabled agents.\n\u2022 DIRECT {agent:\"reviewer\",task:\"Review the diff\"} waits synchronously by default. Use {agent:\"worker\",task:\"...\",async:true} for deliberate background work; use subagent_wait when this turn needs the result.\n\u2022 The parent owns sequencing, lifecycle, and parallel fanout. Children are workers, not orchestrators; use contact_supervisor only for decisions, structured input, or meaningful progress updates.\n\u2022 model and thinking override the direct child. context can be fresh or fork. For repository mutation lanes, use worktree:true with runs.run/runs.all for managed isolation.\n\nWORKFLOW / MANAGE:\n\u2022 Use workflowScript for explicit scripted orchestration: runs.run for one child and runs.all for parallel work, plus retries and aggregation. Scripts are ordinary JavaScript statement bodies; use explicit return.\n\u2022 Use action without execution fields for list/get/models/authoring, mission, watchdog, status, interrupt, stop, resume, steer, scheduling, diagnostics, and other management actions.\n\u2022 Async workflow and child status live under asyncId/asyncDir with status.json, events.jsonl, output logs, and {action:\"status\",id:\"...\"}.\n\nSAFETY-CRITICAL SUBAGENT GUIDANCE:\n\u2022 Use { action: \"list\" } before execution and only run executable/non-disabled agents.\n\u2022 Direct execution is one child call: omit action, pass { agent?: \"worker\", task: \"...\" }. Omitted agent means worker.\n\u2022 Direct calls wait for the child by default. Set async:true only when deliberately running background work; use subagent_wait for a result needed in this turn.\n\u2022 The parent owns sequencing, lifecycle, and any parallel fanout. Children are workers, not orchestrators; they may contact the parent with contact_supervisor when blocked or needing a decision.\n\u2022 Keep one writer for the same cwd/worktree. Use fresh-context read-only reviewers for independent review, then have the parent synthesize and apply fixes.\n\u2022 Async runs expose asyncId/asyncDir with status.json, events.jsonl, output logs, and status via { action: \"status\", id }. Include output paths and residual risks when reporting results."; export interface ToolDescriptionOptions { cwd?: string; agentDir?: string; warn?: (message: string) => void; } export declare function resolveToolDescriptionMode(config: Pick, options?: ToolDescriptionOptions): ToolDescriptionMode; export declare function buildSubagentToolDescription(config?: Pick, options?: ToolDescriptionOptions): string; //# sourceMappingURL=tool-description.d.ts.map