← Receivers

factory:event

factory family

One factory-executor stage lands on the same run/event stream the canvas already reads — the six-stage pipeline (ready·claim·build·review·prove·close) that until now touched the substrate only at claim and close, so every surface could show a job before and after but never during. An unknown stage or status is REFUSED, never recorded as a default frame

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
required
The class of authority the caller must already hold, decided from the attested context with no round trip.
Reversible
yes
The effect can be undone by a later call.
Idempotent
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.

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/factory:event \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "job": <string>, "stage": <ready | claim | build | …>, "status": <start | ok | fail> }}'

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.

  • job string required
  • stage ready | claim | build | … required
  • status start | ok | fail required
  • slug string optional
  • model string optional
  • detail object optional
  • reason string optional
  • env string optional
  • workspace string optional

Response

What comes back from the call.

  • ok boolean
  • runId string
  • stage string
  • status string
  • events number
  • slug string
  • error string

Traffic

Every call to factory:event, 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 factory:event, 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

Workflow 1
  • one.ie/web/src/lib/resolvers/factory-event.ts:9

Answered by

factory:event one.ie/web/src/lib/resolvers/factory-event.ts:105 Dispatched through POST /api/ask/factory:event, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "job": {
      "type": "string"
    },
    "stage": {
      "type": "string",
      "enum": [
        "ready",
        "claim",
        "build",
        "review",
        "prove",
        "close"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "start",
        "ok",
        "fail"
      ]
    },
    "slug": {
      "type": "string"
    },
    "model": {
      "type": "string"
    },
    "detail": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "reason": {
      "type": "string"
    },
    "env": {
      "type": "string"
    },
    "workspace": {
      "type": "string"
    }
  },
  "required": [
    "job",
    "stage",
    "status"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "runId": {
      "type": "string"
    },
    "stage": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "events": {
      "type": "number"
    },
    "slug": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}