← Receivers

rag:mark

rag family

Close the quality loop on a rag:search call. Call before the turn ends. 'mark' = chunks helped; 'warn' = chunks didn't help; 'unsure' = can't assess.

Effect
signal
Fire-and-forget — the call returns once accepted, not once done.
Caller
read_corpus
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/rag:mark \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "query_id": <string>, "outcome": <mark | warn | unsure> }}'

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.

  • query_id string required
  • outcome mark | warn | unsure required
  • notes string optional
  • corpus string optional The corpus the query_id belongs to (@-pointer). Authority-walked; omit for the platform default.

Response

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

  • ok boolean
  • query_id string
  • outcome string

Traffic

Every call to rag:mark, 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 rag:mark, 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

Agent runtime 1
  • channels/src/pipeline.ts:413

Answered by

rag:mark one.ie/web/src/lib/resolvers/rag.ts:488 Dispatched through POST /api/signal/rag:mark, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "mark",
        "warn",
        "unsure"
      ]
    },
    "notes": {
      "type": "string"
    },
    "corpus": {
      "default": "@oo-brain",
      "description": "The corpus the query_id belongs to (@-pointer). Authority-walked; omit for the platform default.",
      "type": "string"
    }
  },
  "required": [
    "query_id",
    "outcome"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "query_id": {
      "type": "string"
    },
    "outcome": {
      "type": "string"
    }
  },
  "required": [
    "ok",
    "query_id",
    "outcome"
  ]
}