← Receivers

story:event

story family

One step of a story's life, written as a signal under its origin: told · framed · view · complete · share · convert · retell. The payload carries the block-4 event convention (schema/story.tql), so story_views / story_conversions / story_revenue / story_retells / story_teller start answering from real traffic instead of 0. A convert also marks the two craft trails — tag:<board>:story → tag:<board>:frame:<x> and → tag:<board>:medium:<x> — and a retell marks teller → reteller, the referral edge. told/convert/retell need an attested caller; view/complete/share may be anonymous and are deduped per (origin, viewer, event) for an hour

Effect
signal
Fire-and-forget — the call returns once accepted, not once done.
Caller
public
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
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.

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/signal/story:event \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "origin": <string>, "event": <told | framed | view | …> }}'

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.

  • origin string required
  • event told | framed | view | … required
  • amount number optional
  • parent string optional
  • frame string optional
  • medium string optional
  • board string optional
  • success boolean optional

Response

The acknowledgement shape — the work itself completes after the call returns.

  • ok boolean
  • origin string
  • event string
  • deduped boolean
  • marked string[]
  • error string

Traffic

Every call to story: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 story: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

API route 3
  • one.ie/web/src/lib/resolvers/tasks.ts:327
  • one.ie/web/src/lib/world-receivers.ts:115
  • one.ie/web/src/pages/api/events.ts:448

Answered by

story:event one.ie/web/src/lib/resolvers/story.ts:162 Dispatched through POST /api/signal/story:event, after the envelope validates the payload.

story family · 1 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "origin": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "event": {
      "type": "string",
      "enum": [
        "told",
        "framed",
        "view",
        "complete",
        "share",
        "convert",
        "retell"
      ]
    },
    "amount": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000
    },
    "parent": {
      "type": "string",
      "maxLength": 128
    },
    "frame": {
      "type": "string",
      "maxLength": 64
    },
    "medium": {
      "type": "string",
      "maxLength": 64
    },
    "board": {
      "type": "string",
      "maxLength": 64
    },
    "success": {
      "type": "boolean"
    }
  },
  "required": [
    "origin",
    "event"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "origin": {
      "type": "string"
    },
    "event": {
      "type": "string"
    },
    "deduped": {
      "type": "boolean"
    },
    "marked": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}