import type { Command } from 'commander'; import { type ProgramIO } from '../cli-helpers.js'; import { getAdapter } from '../../services/ide/ide-registry.js'; import type { ContextGuardDecision } from '../../services/context/context-guard.js'; import { type DispatchOptions } from './sub-agent-shared.js'; export interface ComposeDispatchPromptInput { projectRoot: string; sid: string; rid: string; role: string; options: DispatchOptions; /** The prompt the sub-agent receives, as `preflightDispatch` resolved it. */ prompt: string; isolationMode: 'worktree' | 'container' | null; leaseId: string | null; worktreePath: string | null; worktreeBranch: string | null; decision: ContextGuardDecision; asJson: boolean; /** * The registered CLI, so the prompt's own quotations of it can be resolved * against the commands that exist rather than against a second, hand-kept list. */ rootCommand: Command; } export interface ComposedDispatchPrompt { adapter: ReturnType; effectivePrompt: string; warnings: string[]; mustLsFilesVerification: { path: string; exists: boolean; files: readonly string[]; } | null; } export declare function composeDispatchPrompt(io: ProgramIO, input: ComposeDispatchPromptInput): Promise;