import { type EventAdapterIdV3 } from "../adapter-id.js"; import type { EventV3 } from "../contract.js"; import { type EventV3WriteMode } from "../control.js"; import { type WriteEventV3Options, type WriteEventV3Result } from "../writer.js"; import { type CommandObservationV3, type CommandSignalV3 } from "./command.js"; export interface RecordCommandSignalV3Input { coordRoot: string; mode: EventV3WriteMode; signal: CommandSignalV3; observation: CommandObservationV3; adapter: EventAdapterIdV3; instance_id: `inst_${string}`; producer_id: `prd_${string}`; build_id: `build_${string}`; platform: "linux" | "windows" | "macos" | "unknown"; bridge?: "codex-wsl"; monotonic_ns?: string; observed_at?: string; writerOptions?: WriteEventV3Options; } export type RecordCommandSignalV3Result = { state: "gate_closed"; reason: string; } | { state: "generation_unavailable"; reason: string; } | { state: "command_span_unstarted"; } | { state: "missing_observation_id"; } | { state: "already_recorded"; event_id: string; } | { state: "recorded"; event: EventV3; durability: WriteEventV3Result; recovered: boolean; }; /** * Join a CLI/session-tee command to an already-started hook generation and * record it through its own crash-recoverable producer sequence. This is * inert until the exact candidate or active control gate is open. */ export declare function recordCommandSignalV3(input: RecordCommandSignalV3Input): RecordCommandSignalV3Result; export interface CloseAbandonedCommandSpansV3Input { coordRoot: string; mode: EventV3WriteMode; generation_id: `gen_${string}`; build_id: `build_${string}`; platform: "linux" | "windows" | "macos" | "unknown"; observed_at: string; writerOptions?: WriteEventV3Options; } export interface CloseAbandonedCommandSpansV3Result { closed: number; skipped: number; } /** * Session-end command closer (ADR 0078): every non-terminal command span of * the ending generation gets a derived `command.completed` with an unknown * outcome, so a `process.exit` or SIGKILL that outran the CLI's finalize can * no longer leave the generation with an unpaired command forever. Command * spans never block turns; this exists for corpus honesty and invariant 11. */ export declare function closeAbandonedCommandSpansV3(input: CloseAbandonedCommandSpansV3Input): CloseAbandonedCommandSpansV3Result; //# sourceMappingURL=command-recorder.d.ts.map