import type { WorkflowRunRecord } from '../types/index.js'; export type GatePolicyDecision = { /** True when the engine may auto-approve this gate without a human. */ autoApprove: boolean; /** Human-readable reason for the decision (recorded as audit evidence). */ rationale: string; reasonCode: 'POLICY_DISABLED' | 'TRANSITION_NOT_ELIGIBLE' | 'MANDATORY_HUMAN_GATE' | 'HIGH_SEVERITY_CORRECTION' | 'AUTO_APPROVED'; }; /** * Decides whether a gated transition may be auto-approved (GH-528). Conservative: * returns `autoApprove: false` unless ALL of these hold — `config.gatePolicy.enabled` * is true, the transition is explicitly listed in `autoApproveTransitions`, and there * is no pending high-severity correction on the run. Anything else (disabled, unlisted * transition, a high-severity blocker) keeps the human gate. The decision is always * explained so callers can record an audit trail. */ export declare function evaluateGatePolicy(cwd: string, run: WorkflowRunRecord, transitionKey: string): GatePolicyDecision;