/** * Exit-code projection for operation resolutions. Exit codes are application * vocabulary: the kernel derives outcomes, and this boundary owns the * outcome-to-exit mapping the published exit-code reference pins. */ import { type BlockingClass, type OperationErrorCategory, type OperationOutcome, type OperationResolution } from "@agentxm/workspace-kernel/operations"; /** * What the outcome-to-exit mapping reads from a settled operation: an * `OperationResolution` supplies every field, and a feature that settles into * its own outcome vocabulary supplies the same fields so its exit is decided * here and nowhere else. */ export interface OperationVerdict { readonly divergence?: boolean; readonly failure?: { readonly category: OperationErrorCategory; }; readonly blocking?: { readonly class: BlockingClass; readonly causeCode?: OperationErrorCategory; }; readonly interruption?: { readonly signal: "SIGINT" | "SIGTERM"; }; } /** * The exit code for a settled operation, from one outcome-to-exit mapping: * previewed/applied/no-op/cancelled exit 0 (a flag-requested divergence on a * preview exits 1); partial exits 1; failed exits by cause class (default 1); * blocked exits by blocking class (approval/override 2; stale-candidate, * resource-conflict, policy-excluded, dependency-cycle 6; otherwise cause * class); interrupted exits 130/143. */ export declare const operationExitCode: (verdict: OperationVerdict, outcome: OperationOutcome) => number; /** The exit code of a resolution, from its derived outcome. */ export declare const resolutionExitCode: (resolution: OperationResolution) => number; /** The machine envelope's `ok`: true exactly for the zero-exit outcome set. */ export declare const operationOk: (verdict: OperationVerdict, outcome: OperationOutcome) => boolean; //# sourceMappingURL=operation-exit-code.d.ts.map