import { type ProgramIO } from '../cli-helpers.js'; import { type ArtifactMeta } from '../../services/context/artifact-meta.js'; import type { ContextGuardDecision } from '../../services/context/context-guard.js'; import type { getAdapter } from '../../services/ide/ide-registry.js'; import type { SubAgentToolCall } from '../../services/dispatch/sub-agent-dispatcher.js'; import { type DispatchOptions } from './sub-agent-shared.js'; import { type IsolationLease } from './dispatch-isolation-lease.js'; import { type DispatchRecordWrite } from './dispatch-record-write.js'; export interface DispatchContext { projectRoot: string; sid: string; rid: string; role: string; batchId: string; asJson: boolean; } export interface DispatchEnvelopeInput { ctx: DispatchContext; options: DispatchOptions; prompt: string; adapter: ReturnType; effectivePrompt: string; toolCall: SubAgentToolCall; dispatchRecordPath: string; counter: DispatchRecordWrite['counter']; decision: ContextGuardDecision; artifactMeta: ArtifactMeta | null; mustLsFilesVerification: { path: string; exists: boolean; files: readonly string[]; } | null; lease: IsolationLease; } export declare function emitDispatchEnvelope(io: ProgramIO, input: DispatchEnvelopeInput, warnings: string[], asJson: boolean): void; export declare function writeDispatchLogEntry(ctx: DispatchContext, dispatchedInBatch: number, forcedAt: string | null): void;