← Receivers

directory:update

directory family

Walk one directory submission to its next status (queued → submitted → live|rejected) — listingUrl is required to mark live

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_integrations
The class of authority the caller must already hold, decided from the attested context with no round trip.
Authority action
manage_integrations
Also gated per node — the caller must be permitted this action over the workspace it names.
Cost
free
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Idempotent
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.
Version
1.0.0
Pin this to keep a contract stable; additive bumps never break callers.

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/directory:update \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "id": "6f1c...", "status": "live", "listingUrl": "https://example.com/listing/acme" }}'

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.

  • workspace string optional Workspace slug; defaults to the attested caller's. The row is looked up by (id, workspace), so another tenant's id reads as not_found.
  • id string required The directory_submissions row id, from the run board
  • status string required Next status. The walk is queued→submitted, submitted→live|rejected; live and rejected are terminal. Anything else is refused as invalid_transition.
  • listingUrl string optional The published listing URL. REQUIRED when status is live — a live listing nobody can point at is not a listing.
  • note string optional Operator note; COALESCEd, so omitting it never clears an existing one
  • filedBy string optional PROVENANCE, not authority: 'human' | 'agent', who filed it at the directory. Stamped only on the submitted transition and defaults to 'human'. It can never widen what this caller may touch.

Response

What comes back from the call.

  • ok boolean
  • id string
  • status string The status now held
  • from string On invalid_transition: the status the row is actually in
  • to string On invalid_transition: the status that was asked for
  • error string no_db | workspace required | forbidden | id_and_status_required | not_found | invalid_transition | listing_url_required

Traffic

Every call to directory:update, 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 directory:update, 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 2
  • one.ie/web/src/lib/resolvers/directories.ts:21
  • one.ie/web/src/pages/api/directories/update.ts:4

Answered by

directory:update one.ie/web/src/lib/resolvers/directories.ts:87 Dispatched through POST /api/ask/directory:update, after the envelope validates the payload.

directory family · 2 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "description": "Workspace slug; defaults to the attested caller's. The row is looked up by (id, workspace), so another tenant's id reads as not_found.",
      "type": "string"
    },
    "id": {
      "type": "string",
      "description": "The directory_submissions row id, from the run board"
    },
    "status": {
      "type": "string",
      "description": "Next status. The walk is queued→submitted, submitted→live|rejected; live and rejected are terminal. Anything else is refused as invalid_transition."
    },
    "listingUrl": {
      "description": "The published listing URL. REQUIRED when status is live — a live listing nobody can point at is not a listing.",
      "type": "string"
    },
    "note": {
      "description": "Operator note; COALESCEd, so omitting it never clears an existing one",
      "type": "string"
    },
    "filedBy": {
      "description": "PROVENANCE, not authority: 'human' | 'agent', who filed it at the directory. Stamped only on the submitted transition and defaults to 'human'. It can never widen what this caller may touch.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "status"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "description": "The status now held",
      "type": "string"
    },
    "from": {
      "description": "On invalid_transition: the status the row is actually in",
      "type": "string"
    },
    "to": {
      "description": "On invalid_transition: the status that was asked for",
      "type": "string"
    },
    "error": {
      "description": "no_db | workspace required | forbidden | id_and_status_required | not_found | invalid_transition | listing_url_required",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}