/** * Canonical Transition Policy for Requirement Ledger v1. * * One single source of truth for all permitted state transitions. * No transition rule may be duplicated across this module, the CLI, * or any validator — all paths consult this policy. * * Authorization is now derived from the TrustedLedgerMutationContext, * not from serialized actor strings in the request payload. */ import type { RequirementEvaluationStatus } from "./domain-types.js"; import type { TrustedLedgerMutationContext } from "./trusted-context.js"; import type { MissionContractV1, RequirementLedgerV1, TransitionRequest } from "./types.js"; export interface TransitionPolicyResult { permitted: boolean; reason?: string; } export declare function validateTransition(currentStatus: RequirementEvaluationStatus, request: TransitionRequest): TransitionPolicyResult; /** * Check if the transition is authorized given the trusted context. * * This replaces the old `actorType` field check. * Authorization is derived from the opaque trusted context, not from * serialized payload fields. */ export declare function authorizeTransition(_currentStatus: RequirementEvaluationStatus, request: TransitionRequest, context: TrustedLedgerMutationContext): TransitionPolicyResult; /** * Check if the satisfaction boundary is violated. * Called when a transition to SATISFIED is attempted. * * This enforces EVERY acceptance criterion defined in the contract * for the target requirement using ONLY the evidence IDs explicitly * referenced in the transition request (request.evidenceIds). * * Unreferenced evidence elsewhere in the ledger CANNOT authorize * the transition. This ensures mutation-time authorization and * historical replay use the same canonical evidence set. * * Authorization is derived from context, not from actorType. */ export declare function isSatisfactionAuthorized(request: TransitionRequest, ledger: RequirementLedgerV1, contract: MissionContractV1, context: TrustedLedgerMutationContext): TransitionPolicyResult; /** * When a requirement exits SATISFIED through regression, record the regression * revision. A later transition back to SATISFIED must use evidence where every * criterion has at least one piece of evidence added AFTER the regression. */ export declare function checkEvidenceFreshnessAfterRegression(request: TransitionRequest, ledger: RequirementLedgerV1, contract: MissionContractV1, latestRegressionRevision: number | undefined): TransitionPolicyResult; /** * Get all permitted next states from a given state. */ export declare function getPermittedTransitions(currentStatus: RequirementEvaluationStatus): ReadonlySet; /** * Check if a direct transition to SATISFIED is forbidden from a given state. */ export declare function isForbiddenDirectSatisfied(currentStatus: RequirementEvaluationStatus): boolean; //# sourceMappingURL=transition-policy.d.ts.map