← Receivers

directory:run

directory family

Start a submission run over selected directories for a workspace — freezes a submission pack per row; directories already submitted or live are SKIPPED and named, never silently re-queued

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:run \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "directories": [ "google-business-profile", "bing-places" ] }}'

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. Authority is derived from the attested context, never from this field alone — a slug you do not control is refused.
  • directories string[] required Directory slugs from directory:list. Repeats within one call are collapsed. An unknown slug refuses the WHOLE run (unknown_directory) rather than filing a partial one.

Response

What comes back from the call.

  • ok boolean
  • runId string Present only on success. Absent on all_duplicates — no empty run is minted, because an empty run would become the board's latest and blank it.
  • count number Rows actually queued = directories.length - skipped.length
  • skipped object[] ALWAYS present on success, empty array included — never infer 'nothing was dropped' from a missing key. Also carried on an all_duplicates refusal, naming every one.
  • unknown string[] The slugs that are not in the registry, on an unknown_directory refusal
  • error string no_db | workspace required | forbidden | directories required | unknown_directory | all_duplicates

Traffic

Every call to directory:run, 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:run, 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:20
  • one.ie/web/src/pages/api/directories/run.ts:7

Answered by

directory:run one.ie/web/src/lib/resolvers/directories.ts:65 Dispatched through POST /api/ask/directory:run, 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. Authority is derived from the attested context, never from this field alone — a slug you do not control is refused.",
      "type": "string"
    },
    "directories": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Directory slugs from directory:list. Repeats within one call are collapsed. An unknown slug refuses the WHOLE run (unknown_directory) rather than filing a partial one."
    }
  },
  "required": [
    "directories"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "runId": {
      "description": "Present only on success. Absent on all_duplicates — no empty run is minted, because an empty run would become the board's latest and blank it.",
      "type": "string"
    },
    "count": {
      "description": "Rows actually queued = directories.length - skipped.length",
      "type": "number"
    },
    "skipped": {
      "description": "ALWAYS present on success, empty array included — never infer 'nothing was dropped' from a missing key. Also carried on an all_duplicates refusal, naming every one.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "directorySlug": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "submitted | live — why it was skipped"
          },
          "runId": {
            "type": "string",
            "description": "The earlier run that already carries it"
          }
        },
        "required": [
          "directorySlug",
          "status",
          "runId"
        ]
      }
    },
    "unknown": {
      "description": "The slugs that are not in the registry, on an unknown_directory refusal",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "error": {
      "description": "no_db | workspace required | forbidden | directories required | unknown_directory | all_duplicates",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}