Reversibility Gate
Path:
loom-sprint-scaffold/loom/src/execution/reversibility-gate.tsRelative: loom/src/execution/reversibility-gate.tsSubproject: loom-sprint-scaffoldCategory: otherLines: 136Bytes: 3,886Imports: 3Exports: 3
Content Preview
- /**
- * H3.3 — Reversibility Gate: every tool call checked against the envelope
- * allowlist. Each allowlist entry has reversibility ∈ read|recoverable|destructive.
- * Destructive requires a valid HMAC approval token (verified with WebCrypto
- * crypto.subtle, NOT node:crypto — workerd).
- *
- * Deny → trace event kind=token_denied; never throw past the trace.
- */
- import { canonicalJSON, newEventId } from "../lib/ids";
- import { createLogger } from "../lib/logger";
- import type {
- DispatchEnvelope,