| Decision | Runtime Behavior | Tool Execution Status |
ALLOW | The request matches an explicit allow rule and satisfies all parameter constraints. | Executes immediately. |
DENY | The request matches a deny rule, or fails to match any allow rule (default-deny). | Blocked. Callable is never invoked. Raises AuthorizationError. |
APPROVAL_REQUIRED | The request matches a human-review rule. | Halted. Execution stops; request parameters are fingerprinted and written to persistent storage. Raises ApprovalRequiredError. |
AI Agent / Tool-Calling Loop │ │ 1. Invocation (tool, action, arguments, context) ▼ ┌───────────────────────────┐ │ Dmint Enforcement Gate │ └─────────────┬─────────────┘ │ │ 2. Parameter Canonicalization (RFC 8785 JCS) │ 3. SHA-256 Request Fingerprint │ 4. Deterministic Policy Evaluation ▼ ┌───────────────────────┐ │ Three Decisions Only │ └───────────┬───────────┘ ┌─────────────────┼─────────────────┐ ▼ ▼ ▼ [ ALLOW ] [ APPROVAL_REQUIRED ] [ DENY ] │ │ │ │ │ Persist pending │ Execution blocked; │ │ record & emit │ raises AuthorizationError │ │ webhook alert │ (Tool never called) │ ▼ ▼ │ ┌─────────────────┐ │ │ Approval Store │ (SQLite / PostgreSQL) │ └────────┬────────┘ │ │ │ │ 5. Human Reviews & Signs (Dashboard or CLI) │ ▼ │ ┌─────────────────┐ │ │ Signed Ed25519 │ │ │ Assertion Token │ │ └────────┬────────┘ │ │ │ │ 6. Host Retries Tool Call with Approval │ ▼ │ ┌─────────────────┐ │ │ Verification │ - Checks Ed25519 signature │ │ & Single-Use │ - Matches request fingerprint │ │ Consumption │ - Transitions state to CONSUMED │ └────────┬────────┘ │ │ └─────────────────┴────────┐ ▼ ┌─────────────────────┐ │ Protected Tool │ │ Executes │ └─────────────────────┘
@dmint.protect Python decorator, a coding-agent PreToolUse hook (dmint hook run), or the dmint-mcp gateway proxy, Dmint captures the exact arguments passed to the tool. Variadic positional (*args) and keyword arguments (**kwargs) are normalized into a frozen dictionary representation.Domain: b"dmint/request-fingerprint/v2\x00"ledger.transfer_funds).agent_id).integration_id).environment: production).DENY, the request is denied immediately.ALLOW rules (such as numerical bounds, string lengths, or regex patterns) must be satisfied. Any constraint failure immediately evaluates to DENY.req_... / apr_...) is inserted into SQLite or PostgreSQL in the PENDING state.SELECT ... FOR UPDATE in PostgreSQL or immediate transaction in SQLite) that transitions the record to CONSUMED.DMT_APPROVAL_CONSUMED.| Operation | Typical Latency | Notes |
| In-Memory Policy Evaluation | ~3 µs | Pure CPU boolean matching and JCS canonicalization. |
| SQLite Approval Operation | ~2–5 ms | Disk I/O with WAL mode and row HMAC calculation. |
| PostgreSQL Approval Operation | ~3–8 ms | Network round-trip and row-level locking transaction. |