/** * deny-teaching.v1 — the machine block that makes a refusal actionable. * * ── WHY THIS IS NOT deny-remedy.v1 ────────────────────────────────────────────────────────── * * `deny-remedy.ts` beside this file is pinned to a published schema * (capability-demo/docs/deny-remedy.v1.json, sha256 3f51c5af…) and covers exactly THREE grant * classes, refusing on purpose to invent a fourth. Widening it would break every copy of that * schema in the ecosystem and silently change what a pinned document means. * * MEASURED: the guard's own refusal vocabulary is much larger than three — 4 AvailabilityCause and * 15 IntegrityCause values (src/types.ts) — and NONE of them produced a next step. A caller that * got `EXECUTION_ACTION_UNRECOGNISED` was told what was wrong and not what to do next. * * A deny with no next_action is a dead gate: the bot stops, a human is summoned, and the loop that * was supposed to be a protocol becomes a support ticket. This block sits BESIDE the remedy, never * replacing it, and answers the one question the cause alone cannot: what is the next call. * * ── WHAT IT DOES NOT DO ───────────────────────────────────────────────────────────────────── * * It is emitted AFTER a verdict, reads no key, verifies nothing, and cannot turn a deny into an * allow. `retryable` says whether the SAME call could ever succeed unchanged — it is not a promise * that it will, and `RETRY_SAME` on an availability cause still runs into the breaker. * * An unmapped cause gets `next_action: 'ESCALATE_HUMAN'` rather than a guess. That is the honest * default for this file: sending a bot to a call that does not address why it was refused is worse * than telling it a human is needed. */ /** What the caller should do next. Closed set — a surface must not invent a sixth. */ export declare const NEXT_ACTION: Readonly<{ /** Call preflight again with a grant requested. The change set is fine; authorization is missing. */ REQUEST_GRANT: "REQUEST_GRANT"; /** Re-run preflight for the CURRENT change set — the previous decision no longer describes it. */ REPREFLIGHT: "REPREFLIGHT"; /** The same call may succeed later, unchanged (transient). */ RETRY_SAME: "RETRY_SAME"; /** The request itself must change before any retry can help. */ FIX_REQUEST: "FIX_REQUEST"; /** No mechanical next step exists. A person decides. */ ESCALATE_HUMAN: "ESCALATE_HUMAN"; }>; export type NextAction = (typeof NEXT_ACTION)[keyof typeof NEXT_ACTION]; export interface DenyTeaching { v: 'coderifts.deny.v1'; reason: string; next_action: NextAction; payload_shape: Record; retryable: boolean; /** Present only when the refusal names a target the caller addressed. */ target?: string | null; /** The human sentence, kept — the block is the contract, the sentence is the courtesy. */ human: string; } /** * @param reason the guard's own cause / refusal code * @param human the sentence a person reads; kept alongside, never replaced */ export declare function buildDenyTeaching(reason: string, human: string, target?: string | null): DenyTeaching; /** Every cause this file maps — so a test can assert the guard's vocabulary is covered. */ export declare function mappedCauses(): string[]; //# sourceMappingURL=deny-teaching.d.ts.map