APPROVAL_REQUIRED policy rule, Dmint intercepts the call, persists a pending record, and halts execution before the tool is invoked.ApprovalRequiredError immediately, allowing the host application to notify the operator and proceed with other work.┌───────────┐ │ PENDING │ └─────┬─────┘ ┌────────────────┼────────────────┬────────────────┐ │ │ │ │ ▼ ▼ ▼ ▼ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ │ APPROVED │ │ REJECTED │ │ CANCELLED │ │ EXPIRED │ └─────┬─────┘ └───────────┘ └───────────┘ └───────────┘ │ ├────────────────┬────────────────┐ ▼ ▼ ▼ ┌───────────┐ ┌───────────┐ ┌────────────────────┐ │ CONSUMED │ │ EXPIRED │ │ POLICY_INVALIDATED │ └───────────┘ └───────────┘ └────────────────────┘
| State | Trigger | Description | Tool Execution Allowed? |
PENDING | Agent initiates call | Request arguments fingerprinted and written to store. | No |
APPROVED | Human signs via UI or CLI | Cryptographic Ed25519 signature generated. | Yes (exactly once on retry) |
REJECTED | Human rejects via UI or CLI | Marked as rejected with optional audit note. | No (fails closed) |
CANCELLED | Host application or agent cancels | Pending request withdrawn before review. | No |
EXPIRED | System clock > expires_at | Approval lifetime elapsed (configured via approval_ttl, e.g. 5 minutes). | No (DMT_APPROVAL_EXPIRED) |
POLICY_INVALIDATED | policy.json modified | Policy digest changed, invalidating unconsumed approvals. | No (DMT_APPROVAL_POLICY_INVALID) |
CONSUMED | Host retries approved request | Atomically marked consumed as tool executes. | No (subsequent retries fail) |
1. Agent Calls Tool ──► Dmint halts call ──► Returns DMT_APPROVAL_REQUIRED (with req_id, apr_id) │ 2. Reviewer Inspects Request ▼ (Dashboard / CLI) ──────► dmint approve <apr_id> ──► Signs Ed25519 assertion (Executes NOTHING) │ 3. Host Retries Call ──────► Dmint Verifier ▼ ├── Checks Ed25519 Signature ├── Verifies Exact Argument Fingerprint ├── Checks TTL & Policy Digest └── Atomically transitions state: APPROVED ──► CONSUMED │ 4. Protected Tool ◄─────────────────────────────────┘ Executes ONCE
LocalApprovalAuthority generates an Ed25519 digital signature over the canonical assertion envelope:{ "algorithm": "Ed25519", "credential_version": "dmint/approval-assertion/v2", "payload": { "approval_id": "apr_01j7v0q9k3...", "approver_id": "alice@company.com", "approver_kind": "HUMAN", "audience": "dmint/dashboard/v1", "created_at": "2026-10-16T01:00:00Z", "deployment_epoch": "prod-2026", "expires_at": "2026-10-16T01:05:00Z", "issuer": "dmint-authority", "nonce": "n_4x8L0mK...", "policy_digest": "sha256:a1b2c3d4...", "request_fingerprint": "3b1a8f9024c...", "request_id": "req_8v7G9q...", "schema_version": "dmint/approval-record/v2" }, "signature": "base64:3f9a..." }
request_fingerprint: Binds the signature to the exact RFC 8785 canonical arguments.policy_digest: Binds the signature to the active policy epoch.deployment_epoch: Prevents cross-cluster or rollback approval replay.expires_at: Caps validity to a short window (configured via approval_ttl, e.g. 5 minutes).CONSUMED:SELECT ... FOR UPDATE row-level locks inside a serialized transaction. If 10 concurrent workers receive the same approved assertion and retry simultaneously, exactly one worker acquires the row lock, marks it CONSUMED, and runs the tool. The other 9 workers fail closed with DMT_APPROVAL_CONCURRENT_CONSUME or DMT_APPROVAL_CONSUMED.PRAGMA busy_timeout = 5000 and thread-safe connection pooling to guarantee atomic serialization.PENDING to APPROVED), every record in the approval store includes an HMAC-SHA256 signature:
Domain: b"dmint/approval-record-integrity/v2\x00"DMT_APPROVAL_CORRUPT.private.key). This file lives strictly on the reviewer's laptop or inside the isolated dmint-dashboard service with strict 0600 POSIX permissions. It is never mounted into or accessible by the agent.trusted_issuers.# 1. Generate the authority keys (Ed25519 private key + HMAC storage key) dmint init-keys # 2. Export the public key to configure the gateway dmint export-public-key --format json
trusted_issuers. Because the agent has no access to private.key, it cannot forge signatures, and replaying old signatures fails because approvals are single-use (CONSUMED).DMT_APPROVAL_* errors.