Approval Lifecycle & State Machine

When an AI agent requests an action governed by an APPROVAL_REQUIRED rule, Dmint intercepts the execution and initiates the Approval Lifecycle.

The 5 Approval States

  1. PENDING: The agent has initiated the call. Dmint stopped execution before calling downstream logic and stored the exact request envelope in Core SQLite.
  2. APPROVED: An authorized authority (such as a human in dmint dashboard or an administrative script) inspected the payload and generated an Ed25519 signature.
  3. REJECTED: The reviewer explicitly denied the request. Any subsequent retry with this request ID will fail closed.
  4. CONSUMED: The approved assertion was submitted, verified, and used to execute the underlying tool. The assertion is now permanently invalidated and cannot be replayed.
  5. EXPIRED: The assertion exceeded its configured time-to-live (expires_at) before being executed.

The Approval Assertion

When a human clicks Approve in the dashboard, Dmint’s LocalApprovalAuthority issues a signed cryptographic assertion:
Approval Assertion Envelope

Critical Security Fields

  • request_fingerprint: Ensures the approval is valid only for the exact arguments that the human saw on screen.
  • policy_digest: Contains the SHA-256 digest of policy.json at the time of approval. If someone alters the policy file before the agent executes, the approval is automatically invalidated.
  • signature: Cryptographic Ed25519 signature over the canonical assertion payload. Cannot be forged.

Atomic Single-Use Consumption

To prevent Replay Attacks (where an attacker or runaway agent captures an approved credential and uses it multiple times), Dmint enforces atomic consumption:
Inside Core’s SQLite store, this runs inside an atomic transaction:
If another thread or process attempts to use the same approval_id concurrently or sequentially, the update affects 0 rows, and Core raises:

Next Steps

Human Approvals Guide

Learn how to launch and configure the local web approval dashboard.

Security Invariants

Review the formal proof and test matrix behind single-use assertions.