import type { ClassifiedRun } from "../../../core/src/classify/classifier.js";
export declare const COMPLETION_RUNGS: readonly ["response-accepted", "durably-queued", "effect-processed", "externally-confirmed"];
export type CompletionRung = (typeof COMPLETION_RUNGS)[number];
export type CompletionEvidence = {
    responseAccepted?: boolean;
    durablyQueued?: boolean;
    effectProcessed?: boolean;
    externallyConfirmed?: boolean;
};
export declare const QUEUE_BRANCH_SCENARIO_KINDS: readonly ["retry", "duplicate", "poison-message", "ordering", "timeout", "dead-letter", "restart-recovery"];
export type QueueBranchScenarioKind = (typeof QUEUE_BRANCH_SCENARIO_KINDS)[number];
export type QueueBranchContract = {
    branchId: string;
    ownedScenarios: readonly QueueBranchScenarioKind[];
};
export type QueueBranchSystem<TState> = {
    id: string;
    createState: () => TState | Promise<TState>;
    runScenario: (scenario: QueueBranchScenarioKind, state: TState) => Promise<unknown>;
    snapshotCompletion: (state: TState) => CompletionEvidence;
    assertScenario: (scenario: QueueBranchScenarioKind, state: TState) => void;
};
export type QueueBranchScenarioResult = {
    scenario: QueueBranchScenarioKind;
    branchId: string;
    holds: boolean;
    provenRung: CompletionRung | undefined;
    evidence: CompletionEvidence;
    error?: string;
};
export type QueueBranchRunResult = {
    branchId: string;
    systemId: string;
    scenarioResults: QueueBranchScenarioResult[];
    highestProvenRung: CompletionRung | undefined;
    holds: boolean;
    classified: ClassifiedRun;
    skippedScenarios: QueueBranchScenarioKind[];
};
export type AsyncCoverageRow = {
    branchId: string;
    coverageKind: "sync-route" | "async-branch";
    provenRung: CompletionRung | undefined;
    claimsDownstreamAsync?: boolean;
};
export type CoverageRowValidation = {
    valid: boolean;
    violations: Array<{
        fact: string;
        branchId?: string;
    }>;
};
export type CompletionObligationKind = "durable-state" | "required-side-effect" | "queue-handoff" | "cleanup" | "externally-observable";
export type CompletionObligation = {
    id: string;
    kind: CompletionObligationKind;
    mandatory: boolean;
    completed: boolean;
    status: "confirmed" | "inferred";
};
export type ObligationViolation = {
    rule: "UNI-020" | "UNI-021" | "UNI-022" | "UNI-023" | "UNI-024";
    fact: string;
    details?: unknown;
};
export type ObligationClosureSpec = {
    branchId: string;
    claimedStatus: string;
    obligations: readonly CompletionObligation[];
    representations?: {
        claimed?: string;
        durable?: string;
        visible?: string;
    };
    derivedValues?: {
        left: number;
        right: number;
        total: number;
    };
    durableOutcome?: {
        status: string;
    };
    observableSideEffect?: {
        kind: string;
        observed: boolean;
    };
    ownershipViolations?: readonly string[];
};
export type ObligationClosureResult = {
    holds: boolean;
    violations: ObligationViolation[];
    laneEligibility: "advisory" | "blocking-eligible";
    classified: ClassifiedRun;
};
export type AsyncJourneyOutcome = {
    branchId: string;
    highestProvenRung: CompletionRung | undefined;
    provenRungs: CompletionRung[];
    evidence: CompletionEvidence;
};
//# sourceMappingURL=types.d.ts.map