/** * Durable Mission Graph — human approval gates & external blockers (2.0.0). * * Human approval nodes cannot be auto-approved. A decision is only valid when * granted by a verified principal listed on the gate, for the gate's scope, * before its expiry. External blockers require concrete evidence to be marked * satisfied — satisfaction cannot be fabricated. */ import type { ApprovalDecision, ApprovalGateSpec, ExternalBlockerSpec, ExternalBlockerState, MissionOperationResult } from "./types.js"; export interface ApproveInput { gate: ApprovalGateSpec; /** Objective attempting the approval (for no-self-approval scope check). */ objectiveId: string; principal: string; approved: boolean; nowMs: number; reason?: string; } export type ValidateResult = MissionOperationResult; /** * Evaluate an approval decision request against a gate. * * Rejections: * - SELF_APPROVAL when the objective approves its own gate * - APPROVAL_NOT_GRANTED when the principal is not required/listed * - APPROVAL_EXPIRED when ttlMs is set and nowMs exceeds expiry window */ export declare function evaluateApproval(input: ApproveInput): ValidateResult; /** * Determine whether a previously recorded approval decision is still valid now: * it must be approved, granted by a listed principal, and not expired. */ export declare function isApprovalValid(gate: ApprovalGateSpec, decision: ApprovalDecision, nowMs: number): boolean; /** * Mark an external blocker satisfied given evidence. * * Rejections: * - BLOCKER_WITHOUT_EVIDENCE when no evidence reference is provided * - BLOCKER_UNSATISFIED when the evidence reference is not in `satisfiedOn` * * Satisfaction can only come from a concrete evidence reference listed on the * spec — it cannot be fabricated. */ export declare function satisfyExternalBlocker(spec: ExternalBlockerSpec, evidenceReference: string | undefined, nowMs?: number): ValidateResult; //# sourceMappingURL=approval.d.ts.map