Skip to content

approvalDecision

Pure function deciding whether an intent needs human approval before any budget is consumed. Driven by the intent's approval.mode and governance thresholds.

ts
approvalDecision(pi: PaymentIntent): ApprovalDecision
ParamTypeDescription
piPaymentIntentthe intent under review

ApprovalDecision

ts
interface ApprovalDecision {
  required: boolean;
  reason?: string;
}

required: true short-circuits GovernanceGate.authorize to requires_approval without touching the budget. Outline only — exact threshold logic lives in src/governance/approval.ts.

Proprietary software. All rights reserved.