← Receivers

agents:approve

agents family

Workspace owner, in a signed-in session: grant a key's actor one value-moving capability for work contracts — `signal:<receiver>` for a receiver declared `moves: "value"` (market:escrow, wallet:transfer, wallet:send …). Written to work_contract_grants keyed (workspace, actor, capability); the universal gate reads the row and answers `grant_required` without it. Never a bare key, never a workflow step

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_workspace
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/agents:approve \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "actor": "01a1b2b393c785de0503803b", "capability": "signal:market:escrow" }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • actor string required The key's actor id — what `grant_required` names as `actor`, the same string verifyWorldKey attests as ctx.actorId
  • capability string required `signal:<receiver>` for a `moves: "value"` receiver. A capability that is not value-moving — a step kind, step:sell included (a sell step only mints a checkout), a plain signal — is refused `not_a_value_capability`: the bare-key ceiling already holds it
  • workspace string optional The workspace the grant lives under — `grant_required` prints it as `workspace`: for a call that names its target (wallet:transfer {workspace|from: X}, payout:set {workspace: X}) it is X, granted by X's owner; for a call from the key's OWN purse (market:escrow, a transfer with no field) it is the key's HOME — the group that homes the agent — granted by the home's owner. Defaults to the caller's own workspace. The caller must control it

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • actor string
  • capability string
  • grantedBy string The session's attested slug that wrote the row
  • error string unauthorized | approval_required (a bare key) | not_in_workflow | forbidden (the caller does not control `workspace`) | not_a_value_capability | no_db

Traffic

Every call to agents:approve, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names agents:approve, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 4
  • one.ie/web/src/lib/act-as.ts:199
  • one.ie/web/src/lib/contract-grants.ts:18
  • one.ie/web/src/lib/receiver-index.generated.ts:27
  • one.ie/web/src/lib/resolvers/_shared.ts:433
Docs 1
  • one.ie/web/src/content/docs/agent-path.md:1085
→

Answered by

agents:approve one.ie/web/src/lib/resolvers/grants.ts:107 Dispatched through POST /api/ask/agents:approve, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "actor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "The key's actor id — what `grant_required` names as `actor`, the same string verifyWorldKey attests as ctx.actorId"
    },
    "capability": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "`signal:<receiver>` for a `moves: \"value\"` receiver. A capability that is not value-moving — a step kind, step:sell included (a sell step only mints a checkout), a plain signal — is refused `not_a_value_capability`: the bare-key ceiling already holds it"
    },
    "workspace": {
      "description": "The workspace the grant lives under — `grant_required` prints it as `workspace`: for a call that names its target (wallet:transfer {workspace|from: X}, payout:set {workspace: X}) it is X, granted by X's owner; for a call from the key's OWN purse (market:escrow, a transfer with no field) it is the key's HOME — the group that homes the agent — granted by the home's owner. Defaults to the caller's own workspace. The caller must control it",
      "type": "string"
    }
  },
  "required": [
    "actor",
    "capability"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "actor": {
      "type": "string"
    },
    "capability": {
      "type": "string"
    },
    "grantedBy": {
      "description": "The session's attested slug that wrote the row",
      "type": "string"
    },
    "error": {
      "description": "unauthorized | approval_required (a bare key) | not_in_workflow | forbidden (the caller does not control `workspace`) | not_a_value_capability | no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}