/** * @fileoverview Gate Decision types and classification for the control plane * gatekeeper. Defines the decision types, blocking semantics, and classification * utilities used by the gatekeeper to route user messages. * * Phase 61 — CP-03, CP-04 */ /** * Possible gate decision outcomes, ordered by severity. */ export declare enum GateDecisionType { /** Allow the message through — no issues detected. */ ALLOW = "allow", /** Warn but allow — non-blocking advisory. */ WARN = "warn", /** Defer decision — needs more context or async resolution. */ DEFER = "defer", /** Block the message — hard ask from a blocking gate. */ BLOCK = "block", /** ask with explicit reason — hard ask from policy enforcement. */ DENY = "ask" } /** * Record of a single gate's evaluation decision. */ export interface GateDecisionRecord { /** The rule or policy that was evaluated. */ rule: string; /** Evaluation context provided to the decision function. */ context: Record; } /** * Determines whether a gate decision type is blocking. * * @param decision - The gate decision type to check. * @returns True if the decision blocks the message. * * @example * ```ts * if (isBlockingDecision(result.decision)) { * console.error("Blocked:", result.reason) * } * ``` */ export declare function isBlockingDecision(decision: GateDecisionType): boolean; /** * Classifies a gate decision from an evaluation context. * * @param record - The decision record with rule and context. * @returns Classified decision with blocking flag. * * @example * ```ts * const result = classifyGateDecision({ * rule: "manualStateWritesForbidden", * context: { toolName: "write-file" }, * }) * console.log(result.decision, result.blocking) * ``` */ export declare function classifyGateDecision(record: GateDecisionRecord): { decision: GateDecisionType; reason: string; blocking: boolean; }; //# sourceMappingURL=gate-decision.d.ts.map