← Receivers

nav:next

nav family

Where to go next — the strongest (tags → door) path from where you stand, ranked over the dock words (lib/nav/doors.ts) from the learned edge (the D1 claw_paths mirror), never TypeDB. The same ranking orders the chat's starter cards. Every answer carries its tag trace: the exact (tag node → door node) pairs it was made under, so the outcome marks or warns that combination with the ordinary mark/warn verbs.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
member
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
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.

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/nav:next \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "tags": <string[]> }}'

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.

  • tags string[] required Where you stand, as tags — the page's and the viewer's. Lower-cased, deduped, sorted; at most six are used. The group is the caller's own (from the session), never a field here.

Response

What comes back from the call.

  • ok boolean
  • next string The predicted door word — the first of `ranked`.
  • learned boolean True when `next` came from a learned path; false when nothing is learned yet and the declared dock order stands.
  • ranked object[] Every dock word exactly once: learned doors by strength − resistance (toxic paths dropped), then the rest in declared order with score 0.
  • trace object The tag trace. Mark each pair on a good outcome, warn it on a bad one — that is how the next answer learns.
  • source "edge"
  • error string forbidden: authentication required · bad_request: tags required · edge_unavailable (the edge could not be read — never an empty ranking).

Traffic

Every call to nav:next, 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 nav:next, 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 4
  • one.ie/web/src/lib/chat/derive-pack.ts:270
  • one.ie/web/src/lib/key/one-door.ts:94
  • one.ie/web/src/lib/receiver-index.generated.ts:206
  • one.ie/web/src/lib/resolvers/nav.ts:1
→

Answered by

nav:next one.ie/web/src/lib/resolvers/nav.ts:19 Dispatched through POST /api/ask/nav:next, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Where you stand, as tags — the page's and the viewer's. Lower-cased, deduped, sorted; at most six are used. The group is the caller's own (from the session), never a field here."
    }
  },
  "required": [
    "tags"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "next": {
      "description": "The predicted door word — the first of `ranked`.",
      "type": "string"
    },
    "learned": {
      "description": "True when `next` came from a learned path; false when nothing is learned yet and the declared dock order stands.",
      "type": "boolean"
    },
    "ranked": {
      "description": "Every dock word exactly once: learned doors by strength − resistance (toxic paths dropped), then the rest in declared order with score 0.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "door": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "learned": {
            "type": "boolean"
          }
        },
        "required": [
          "door",
          "score",
          "learned"
        ]
      }
    },
    "trace": {
      "description": "The tag trace. Mark each pair on a good outcome, warn it on a bad one — that is how the next answer learns.",
      "type": "object",
      "properties": {
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "door": {
          "type": "string"
        },
        "pairs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "target": {
                "type": "string"
              }
            },
            "required": [
              "source",
              "target"
            ]
          }
        }
      },
      "required": [
        "tags",
        "door",
        "pairs"
      ]
    },
    "source": {
      "type": "string",
      "const": "edge"
    },
    "error": {
      "description": "forbidden: authentication required · bad_request: tags required · edge_unavailable (the edge could not be read — never an empty ranking).",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}