declare const CLI_PHASE: { readonly RESULT: "result"; readonly PREVIEW: "preview"; readonly APPLIED: "applied"; readonly NOOP: "noop"; }; export type CliPhase = (typeof CLI_PHASE)[keyof typeof CLI_PHASE]; export interface CliEnvelopeSuccessV1 { schemaVersion: 1; ok: true; command: string; phase: CliPhase; data: T; } export interface CliEnvelopeErrorV1 { schemaVersion: 1; ok: false; command: string; error: { code: string; message: string; remedy?: string; remedyCommand?: string; details?: Record; }; } export type CliEnvelopeV1 = CliEnvelopeSuccessV1 | CliEnvelopeErrorV1; export interface CliMutationResultV1 { outcome: 'preview' | 'applied' | 'noop'; scope: string | null; digest?: string; operationId?: string; resumed: boolean; affectedFiles: string[]; requiresConfirmation: boolean; nextAction: string | null; output?: string[]; } interface MachineInvocation { enabled: boolean; argv: string[]; command: string; } interface CapturedOutput { stdout: string; stderr: string; } interface OutputCapture { stop(): CapturedOutput; } export declare function prepareMachineInvocation(rawArgv: string[]): MachineInvocation; export declare function setCliMachineResult(phase: CliPhase, data: unknown): void; export declare function startOutputCapture(): OutputCapture; export declare function emitMachineSuccess(command: string, argv: string[], captured: CapturedOutput): void; export declare function emitMachineError(command: string, error: unknown): void; export {}; //# sourceMappingURL=cli-envelope.d.ts.map