APPROVAL.md, the policy file
A fenced yaml approval-policy block in markdown at your repo root; the runtime ignores the prose.
Local simulation: the buttons change this card only. No request is sent, no token is minted, and no log is written.
Send the deposit chaser to agency@example.co.uk
Computed by the runtime
Claimed by the agent, unverified
A fenced yaml approval-policy block in markdown at your repo root; the runtime ignores the prose.
approval policy attest stores the file's SHA-256; a later edit refuses with policy-not-attested, detail hash-mismatch.
human-only, manual, supervised-live, supervised-retro, autonomous; bare supervised is an alias of supervised-retro.
An action declared reversible: false raises nonmanual autonomy to manual; human-only stays denied.
An unparseable policy resolves every class to manual, an unmatched action takes defaults.autonomy, unknown keys fail validation.
Minted on grant, delivered directly or sealed to the requester, and logged by hash; a second spend refuses token-consumed.
The envelope declares a payload_hash, and bytes that hash to anything else are refused payload-mismatch.
Class, cost and reversibility are read from the registered envelope, never from a flag at request time.
The envelope, worked through →Class limits and budgets scopes are conjunctive, and consumption is computed from the log over rolling windows.
protected_paths adds paths, or routes each to a policy.edit sub-class, above a floor that never narrows.
approval policy amend lands new policy bytes and their attestation together, printing a semantic diff of what changed.
approval gate open requires a terminal and typed understood; gated shell and protected-file bypasses append gate.bypassed.
approval import agents-md turns permissions prose into a draft policy block with a fixed keyword table, no model.
The prompt carries a COMPUTED block, a CLAIMED block marked unverified, the full payload, and two buttons.
README: put approvals on your phone →channels.telegram.delivery is paced by default, showing one pending request at a time, or burst.
channels.<name>.prompt.rows sets order only, never a whitelist, and .hide is refused for rows a decision needs.
The canonical email view shows every recognized field, its payload hash, and the raw-byte store path.
README: put approvals on your phone →approval channel web binds hard-coded 127.0.0.1; a returned grant token is displayed once, then discarded.
approval channel cli decides at a terminal, and approval withdraw takes a pending request back.
approval journal write, approval values and approval feedback carry operator guidance that never reaches enforcement.
approval-md/adapters exports the execution contract, credential provider and conformance runner with TypeScript declarations.
approval vault set encrypts one credential under a passphrase named by vault.passphrase_env; there is no approval vault get.
approval adapter email verifies the token, re-hashes the payload, opens the vault, sends over STARTTLS, closes it.
The agent holds an AgentMail key without draft_send, and the key that can send waits in the vault.
After consuming the execution grant, approval adapter zzz sends with a vaulted ZZZ credential and bound payload.
approval payload agentmail-draft snapshots the draft, and one edited after the grant refuses agentmail-draft-drifted.
It is derived from the action key, the payload hash and the sender, so both match months later.
README: hand a grant to a real credential →approval setup adapter email reads the adapter's credential manifest, then probes the server without sending anything.
approval hook claude-code classifies commands the harness runs itself and answers allow or deny, never ask.
approval hook cursor classifies Shell, Write and Delete, and requires failClosed: true.
approval hook codex experimentally gates direct patches; hidden execution directories keep Bash denied and outcomes diagnostic.
approval hook classify prints a command line's class, the union over its segments, and touches nothing.
The entry lives in .claude/settings.json or .cursor/hooks.json, and the classifier treats both as gate configuration.
The hook never creates a log, denying hook-log-unreachable, and a hook grant mints no token.
A covered gated action appends execution.started marked execution: "harness", and budgets and the sampler both draw on it.
Codex can use approval mcp serve for gate tools; it does not intercept ordinary tools, and repository setup awaits human installation and attestation.
approval mcp serve publishes the agent's verbs as tools built from the registry behind approval instructions --schemas.
grant, reject, revoke, policy attest and vault set are absent from the tool list.
--as is deleted from every published input schema, and the server's identity is appended last to every argv.
--http serves streamable HTTP on 127.0.0.1, one transport per session, capped at 20 at once.
--guest mints agent:guest-<6 hex> per session, allowlists nine tools, and clamps wait to five seconds.
Every record chains to the previous hash under sha256/jcs, and appends go through compare-and-append.
approval log verify walks it end to end and reports clean, torn-tail or corrupt, repairing nothing.
approval log verify --anchor checks the working file against the newest committed copy this checkout can see.
approval log checkpoint signs the head with an Ed25519 key from audit.checkpoint_keys; a due checkpoint warns, never refuses.
approval daemon run --git-evidence commits per tick in the log's own repository, changing no verdict.
tail prints the last N records and export streams every stored line byte for byte, both read-only.
Hash chains do not survive a git merge, so approval log sync reconciles a committed copy that moved.
approval up runs the daemon loop and every channel the policy configures, restarting one that falls over.
approval up fetches, fast-forwards when safe, rebuilds a stale dist/, then re-execs the freshly built binary.
The preflight makes exactly two writes, a --ff-only merge and npm run build; anything else stops it.
supervised-live with a live_rate blocks that fraction on the gate, selected by HMAC over the payload_hash.
audit.supervised_sample_rate escalates a fraction of supervised actions for review, under a secret the policy only names.
daemon.read_proof: incremental hashes only the appended bytes, re-proving in full on a configured cadence.
approval setup service writes the launchd or systemd user unit and prints it for you to read.
approval setup channel telegram stores the token in the OS keystore, and .approval/env records only where it lives.
approval doctor checks the build, identity, attestation, the chain, the channels, the vault and more, repairing nothing.
approval status answers from the log; approval doctor answers for this machine, where a stale binary shows up.
approval coverage reports effects witnessed by git, gh and providers, each with an evidence seq or none.
Six language-neutral vector files cover policy, chain, gate verdicts, JCS, refusal unions and schema, under a SHA-256 manifest.
The conformance suite →Seven frozen CLI codes; ordinary gate refusals use 1, while hook protocols also use 0 and 2.
The table, below →npm run check:changed classifies the working tree into light, records or full, and ambiguity resolves to full.
Every event and envelope passes its JSON Schema before it is appended, and the policy schema is closed.
schema/event.schema.json →A walkthrough against real Telegram, with a scripted twin that runs in CI against a mock Bot API.
examples/telegram-demo.md →The gate, the binding, the vault, the token window and the chain, against a real mail provider.
examples/email-demo.md →The mail is composed as a draft, and the key that can send it waits in the vault.
examples/agentmail-demo.md →Claude Code on one side and a phone on the other, including the refused grant tool call.
One envelope on one task file, then register, request, wait and run, with what each prints.
One laptop, one phone, one projector, with the queue and the log on screen for the room.
examples/web-agent-demo →An agent in xAI's cloud asks for a branch push and an email, then tries skipping the gate.
examples/grok-bot-connector →Nothing matches. Clear the search, or pick all.
Four kinds of tool already cover part of this problem. Each entry says what it gives you and what it leaves to you.
approval import agents-md converts permissions prose into a draft policy. Enforcement still depends on wired hooks and adapters.SPEC.md section 11.1 holds these across every surface of the runtime. They bind every task, and each is pinned by a named test file.
ts is assigned by the runtime at the write boundary, and a caller-supplied value is refused.human-only classes are inert to agents. Every gate verb refuses one with the same stable code, class-human-only, and appends no record on that path.An agent branches on the exit code before it reads stdout, so these numbers are frozen. Code 1 and code 4 stay apart because a tampered log and an unreadable one are different facts.
| Code | Meaning |
|---|---|
| 0 | success; harness pre-execution allow or deny verdict |
| 1 | integrity failure, or an ordinary gate/runtime refusal |
| 2 | usage error, or a post-execution hook report that did not land |
| 3 | torn tail |
| 4 | I/O error |
| 5 | missing execution token (approval run only) |
| 6 | timeout (approval wait only) |
From SPEC.md section 11. This is an oversight layer for broadly cooperative agents. Hard enforcement applies where an adapter alone holds the credential. Human identity in v0.1 is config-declared, so the trust boundary is the local machine, and anyone who can set that configuration and write to the log is inside it. Attestation proves that someone with local control signed off, and never who.
Undefended: an agent with direct credential access outside the adapters, a compromised host, collusion between an agent and a careless approver, and persuasion about whether bytes you did see should be approved. You run the daemon and listener yourself. The optional command sandbox has platform limits; it does not isolate a whole agent harness. The vault and adapter protect actions routed through them; single-use grants bind the payloads that require human approval.