xmemcli 2.0.0__tar.gz → 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: xmemcli
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Command-line client for the xmemory HTTP API: PKCE auth, instances, read/write, schema and XMD tools.
5
5
  Keywords: api,cli,llm,memory,xmemory
6
6
  Requires-Python: <4,>=3.12
@@ -73,19 +73,19 @@ Interactive help and trace JSON use a dark-terminal palette by default. When `CO
73
73
 
74
74
  The CLI does not echo raw API payloads. Server internals (`diff_plan`, extraction trees) are never emitted. `sql`, `sqls`, and `sql_attempts` are kept only for `read --return-sql`, and only as the fields the read API already returns for that option; other keys on an attempt are dropped. If that flag is set and the response includes none of them, the output says SQL was requested and not included (`sql_unavailable`): the server may have withheld it, or no statement was executed. Read responses keep `pending_suggestions` (schema-evolution hint). A text write keeps a compact `extracted` summary (`Type(identifier)` tags); a structured write runs no extraction and has none. `write` and `write-status` keep the server's `changes` block (created / updated with old → new / deleted, bulk summaries, advisory records) when the write changed something. `--verbose` adds `trace_id` and `console_url` when present.
75
75
 
76
- **`trace …` is the one deliberate exception.** Those commands return the Console's own operation documents — the paged operations list, the Inspect search, and the per-operation detail — **verbatim**, because the Console already curates them per caller (a super admin sees LLM calls and raw token counts; everyone else does not). They are JSON on every stream and carry every internal id the Console does: `trace_id`, `instance_id`, `session_id`, `user_id`, `api_key_id`, and on detail documents `source_id`, `migration_id`, `llm_call_id`, `gateway_request_id`, …
76
+ **`trace …` is the one deliberate exception.** Those commands return the Console's own operation documents — the paged operations list, the Inspect search, and the per-operation detail — **verbatim**, because the Console already curates them per caller (a privileged caller sees LLM calls and raw token counts; everyone else does not). They are JSON on every stream and carry every internal id the Console does: `trace_id`, `instance_id`, `session_id`, `user_id`, `api_key_id`, and on detail documents `source_id`, `migration_id`, `llm_call_id`, `gateway_request_id`, …
77
77
 
78
78
  ## Trace — the Console's operation traces, from the CLI
79
79
 
80
80
  ```bash
81
- xmemcli auth status # super_admin: which Console view trace will answer with
81
+ xmemcli auth status # who this key is, and its permission codes
82
82
  xmemcli org list instances # the instances this key can see — what trace ls is scoped to
83
83
  xmemcli trace ls # every visible instance, newest first, one page
84
84
  xmemcli trace ls --instance "$ID" --trace-type write --trace-type read --limit 50
85
85
  xmemcli trace ls --counts-only --hours-back 168 # counts, per-instance counts and series, no rows
86
86
  xmemcli trace ls --search --text "Ada" --instance "$ID" # Inspect search — opt-in, more expensive
87
87
  xmemcli trace get 0001_abc --trace-type write # one operation, every internal id
88
- xmemcli trace calls --session-id "$SESSION" --stage 'benchmark.*' # a session's LLM calls (super admins)
88
+ xmemcli trace calls --session-id "$SESSION" --stage 'benchmark.*' # a session's LLM calls (not available to most keys)
89
89
  xmemcli trace call "$LLM_CALL_ID" # one LLM call whole: prompt, reply, stats
90
90
  ```
91
91
 
@@ -129,9 +129,9 @@ NEXT=$(printf '%s\n' "$PAGE" | jq -r 'select(.has_more) | "\(.next_before_sort_a
129
129
  [ -n "$NEXT" ] && xmemcli trace calls --session-id "$SESSION" --cursor "$NEXT"
130
130
  ```
131
131
 
132
- `--include-llm` adds model-call hits to a free-text search (`--text`, optionally with `--session-id` or `--hours-back`), for a super admin's key only; any other key gets the operations it gets without the flag and no calls. The CLI refuses the flag with a clause flag or an instance, user or key scope, where the Console's search finds no model call. When a page ends on one, its `llm_call_id` is the cursor's third field, so repeat the flag on every page of that walk.
132
+ `--include-llm` adds model-call hits to a free-text search (`--text`, optionally with `--session-id` or `--hours-back`), for the few keys allowed to read model calls; any other key gets the operations it gets without the flag and no calls. The CLI refuses the flag with a clause flag or an instance, user or key scope, where the Console's search finds no model call. When a page ends on one, its `llm_call_id` is the cursor's third field, so repeat the flag on every page of that walk.
133
133
 
134
- A search with no filter shaping it is the Console's recent-activity view, which reaches back only as far as its window (currently 180 days); when older operations exist, its last page says `truncated` and the CLI warns. A key sees the operations of the instances it can list — never more than its owner sees in the Console; a super admin's key sees what a super admin sees. Full reference: [](#trace--the-consoles-operation-traces).
134
+ A search with no filter shaping it is the Console's recent-activity view, which reaches back only as far as its window (currently 180 days); when older operations exist, its last page says `truncated` and the CLI warns. A key sees the operations of the instances it can list — never more than its owner sees in the Console. Full reference: [](#trace--the-consoles-operation-traces).
135
135
 
136
136
  ## Output personality — JSON vs pretty
137
137
 
@@ -177,7 +177,7 @@ xmemcli version
177
177
  xmemcli auth login
178
178
  ```
179
179
 
180
- Version: **2.0.0**.
180
+ Version: **2.0.1**.
181
181
 
182
182
 
183
183
  ---
@@ -231,7 +231,7 @@ AI-assisted IDE ── xmemcli read/write ──► CLI resolves key; never hand
231
231
  3. With a session, the surface `POST`s `/cli/handoff` an **issue intent**: the challenge and the key name **`CLI auto-approved login (<hostname>, YYYY-MM-DDTHH:MM:SSZ)`** — the email path's `CLI email login (<hostname>, <timestamp>)` shape with the method named — and no key. The hostname travels as `&host=` on the login URL, cleaned by the same rule on both ends (letters, digits, `-._`, at most 32, else `unknown-host`).
232
232
  4. The server, cookie-authed, decides whom the code may mint for: the session's account and organisation, live `api_key.create` authority through `user_may_mint_keys`, and the organisation's configured default shared role UUID. `login_assignments` derives the permitted scopes; a missing default is refused rather than guessed. It signs those ids, the name, the session's email and its authentication time into the 120-second code (`stash_intent`): the same JWT as the manual handoff's, with no `enc_key` because there is no key. **Nothing is created.**
233
233
  5. The surface **navigates** the tab (`location.replace`) to `http://127.0.0.1:<port>/callback?code=…&state=<challenge>`. That is the very request the manual page's "Finish the login in a new tab" link makes on Safari — a top-level navigation, which WebKit's mixed-content rule does not cover and Chrome's Local Network Access permission does not gate — issued by script in the same tab instead of by a click on an anchor. Same-tab navigation needs no user activation (only new windows do), so it is the one delivery that is click-free on every engine, and no fallback link is needed. `replace`, not `assign`, so Back cannot land on a page that starts another handoff.
234
- 6. The listener checks `state` and POSTs `/cli/token` with the verifier. The intent carries concrete assignments derived by `login_assignments` from the default shared role UUID and the user's live authority. `create_scoped_api_key` rechecks the signed email, session revocation, `api_key.create`, and every proposed role/scope under the authorization lock before inserting. A permission removal between handoff and redemption therefore refuses the mint. The unique `handoff_intent_id` makes redemption single-use, including after a key is deactivated: a second redemption returns 409 naming the existing key and prefix, never its secret. The CLI may retry a lost response once with the same intent; a 409 tells the user to inspect/revoke the already-created key. Explicit SuperAdmin comes from assignments, never a user flag. No key exists before successful verifier redemption. The CLI stores the resulting key using the same rc handling as manual login.
234
+ 6. The listener checks `state` and POSTs `/cli/token` with the verifier. The intent carries concrete assignments derived by `login_assignments` from the default shared role UUID and the user's live authority. `create_scoped_api_key` rechecks the signed email, session revocation, `api_key.create`, and every proposed role/scope under the authorization lock before inserting. A permission removal between handoff and redemption therefore refuses the mint. The unique `handoff_intent_id` makes redemption single-use, including after a key is deactivated: a second redemption returns 409 naming the existing key and prefix, never its secret. The CLI may retry a lost response once with the same intent; a 409 tells the user to inspect/revoke the already-created key. No key exists before successful verifier redemption. The CLI stores the resulting key using the same rc handling as manual login.
235
235
 
236
236
  The surface shows only where it is or why it stopped; every failure it can show ends with "No key was issued.", which is true by construction. The one retry a person has is to re-run the login command they started, with its own flags (a positional URL, `--api-url` and `--console-url`, a pinned `--callback-port`) and `--auto-approve`; the copyable line on that surface is the command's simplest form, not a substitute for those flags. The flag cannot combine with `--email` (exit 2): that path has no page to approve on. The CLI's done page, which the tab lands on, says "Code received" and names the terminal for the result, because it is served before the redeem; it carries `Referrer-Policy: no-referrer` as a header and a meta tag, since its URL holds the signed code and the brand stylesheet and fonts it loads come from other hosts.
237
237
 
@@ -246,7 +246,7 @@ The residual is the authored link itself: there the verifier belongs to whoever
246
246
  1. `POST /api/kingdom-signin-request` — the server emails a six-digit code + one-click link; the CLI holds the signed pending cookie **in memory**. The reply's **matching code** is consumed only as the hand-off signal and is not printed (the compare UI is retired across all sign-in surfaces for now).
247
247
  2. The human opens the email on any device and Approves. *This is the single human action.*
248
248
  3. The CLI claim-polls `POST /api/kingdom-signin-claim` on the Console's own waiting-tab cadence (a short grace, ten fast polls, then a slow poll; transient network failures count as missed polls, not aborts) and exchanges the proof via `POST /api/kingdom-signin-mint` for the browser-session cookie — held **in memory only, never written to disk**.
249
- 4. With the session, the CLI runs the Console onboarding's core sequence: `GET /api/check-user`; when the address has no account, `GET /api/suggest-slug` (server-derived org name, `--org-name` overrides; ignored for an existing account) and `POST /api/public-signup` — **note that creating a new organisation requires the deployment to allow public registration, which the hosted service currently does not**: an existing account gets a key, a new address gets the server's "organisation creation is not available" refusal (the Console's admin-fallback signup arm is not implemented here); then `GET /api/accounts/users/by-email` and `GET /api/accounts/authorization-settings/default-api-role` to obtain the default shared role UUID. `POST /api/accounts/cli/handoff` derives assignments within the user's current authority; `POST /api/accounts/cli/token` redeems the handoff with its verifier and rechecks the grants. The key is named **`CLI email login (<hostname>, <timestamp>)`** so every mint stays individually identifiable and revocable on the Console's API Keys page.
249
+ 4. With the session, the CLI runs the Console onboarding's core sequence: `GET /api/check-user`; when the address has no account, `GET /api/suggest-slug` (server-derived org name, `--org-name` overrides; ignored for an existing account) and `POST /api/public-signup` — **note that creating a new organisation requires the deployment to allow public registration, which the hosted service currently does not**: an existing account gets a key, a new address gets the server's "organisation creation is not available" refusal (the Console's admin-fallback signup arm is not implemented here); then `GET /api/accounts/users/by-email`. `POST /api/accounts/cli/handoff` names no role, so the server issues the key with the organisation's default API role and derives its assignments within the user's current authority; `POST /api/accounts/cli/token` redeems the handoff with its verifier and rechecks the grants. Nothing reads a role before the key exists, so an account without `role.get` signs in too. Only afterwards, best-effort and only to name the role on the success line, the CLI reads `GET /api/accounts/authorization-settings/default-api-role` and `GET /api/accounts/roles/{id}`; where either is refused the line leaves the role out. A server whose hand-off predates the keyless arm (404, 405, or 422 for a `key` it requires) is signed in as 1.9.5 did: `GET /api/accounts/api-roles` and `POST /api/accounts/api-keys`. The key is named **`CLI email login (<hostname>, <timestamp>)`** so every mint stays individually identifiable and revocable on the Console's API Keys page.
250
250
  5. The key is written to `.xmemrc.json` (0600), stdout carries the prefix only, and the session cookie dies with the process.
251
251
 
252
252
  The login key receives explicit assignments, bounded by its owner's current authority. A subsequent key mint requires the calling key's own `api_key.create` permission and delegation authority, independently of the owner's later permissions or status. Child assignments cannot exceed the parent chain, including after a role change or revocation. Use the scoped key management commands to choose role UUIDs and scopes; role names are display labels.
@@ -298,7 +298,7 @@ Each login binds its own port and names it in the login URL, so concurrent login
298
298
 
299
299
  # `xmemcli` — capabilities reference
300
300
 
301
- **Version:** `2.0.0` (see `xmemcli version`)
301
+ **Version:** `2.0.1` (see `xmemcli version`)
302
302
 
303
303
  `xmemcli` is the command-line client for the **xmemory HTTP API**. It is **human-approved for key acquisition**: an AI-assisted IDE may run reads, writes, and inventory, and may initiate `auth login`, but a key is only issued after one explicit human approval — a click in the Console UI (PKCE handoff), an approval of a sign-in email (`--email`), or, with `--auto-approve`, the Console session the human already holds in that browser (signed in before, or right then through the Console's own email, Google, GitHub or OIDC sign-in). The one exception derives from such a key rather than replacing the approval: `org create key` lets a key that was already approved mint a key no wider than itself, for the same user, on one of its own clusters, deactivated with it. Quota limits change only in the **Console UI**. The full acquisition contract is in the auth-flow reference bundled with this package.
304
304
 
@@ -327,7 +327,7 @@ Requires **`--instance-id`** or **`$XMEM_INSTANCE_ID`** for read/write (or auto-
327
327
  `--mutations-file PATH` / `--mutations-stdin` send one JSON array as the API's `structured_mutations`, as given. The server takes at most **100** entries per write, `--delete` entries included; the CLI refuses more with exit **2** before sending anything. `--mutations-stdin` needs a pipe or a file on stdin and refuses a terminal. Each entry is one of:
328
328
 
329
329
  - **`object_mutation`** — `{"object_mutation": {"object_type": "Person", "create": {"key": {"name": "Ada"}, "values": {"age": 36}}}}`. `update` takes the same `key` + `values` (a null value clears a field); `delete` takes `{"key": {…}}` alone. For a type without a primary key, `update` and `delete` take `"match": {"field": value, …}` in place of `key`: values that single out one stored record; several fail the call unless `"allow_bulk": true`.
330
- - **`relation_mutation`** — `{"relation_mutation": {"relation_type": "works_at", "create": {"endpoints": [{"object_name": "person", "key": {"name": "Ada"}}, {"object_name": "company", "key": {"name": "ACME"}}]}}}`. `create` lists every participant role, each keyed by primary key or, for a type without one, by `"match": {"field": value, …}` on values that single out one stored record, with no `key` and no `values`. `delete` takes `endpoints` (a subset may be given) and `"allow_bulk_delete": true` to remove every matched link (without it, a delete matching more than one link is refused). Relation `update` is always refused: re-link by deleting and creating.
330
+ - **`relation_mutation`** — `{"relation_mutation": {"relation_type": "works_at", "create": {"endpoints": [{"object_name": "person", "key": {"name": "Ada"}}, {"object_name": "company", "key": {"name": "ACME"}}]}}}`. `create` lists every participant role, each keyed by primary key or, for a type without one, by `"match": {"field": value, …}` on values that single out one stored record, with no `key`, and `"values"` only for the relation's own fields (a relation may declare `fields`, such as a role or a start date on a link). `update` names one stored link by its `endpoints` (every role) and sets those fields in `values`; endpoints matching several links are refused, and a relation without fields of its own has nothing to update (re-link by deleting and creating). `delete` takes `endpoints` (a subset may be given) and `"allow_bulk_delete": true` to remove every matched link (without it, a delete matching more than one link is refused).
331
331
 
332
332
  `--delete TYPE:ID` appends the object `delete` above; each key field may appear once and none may be empty. A delete that matches no record is not an error: exit **0** and no `deleted` line. The server lists it under `changes.unmatched_deletes`, which a terminal prints as `note: unmatched_deletes Task task_id='T-999'`; a server that predates that bucket reports nothing, and the write then reads `write <id> ok · no changes reported`.
333
333
 
@@ -344,7 +344,7 @@ Permission-filtered view of what this API key can see.
344
344
  | **`org list clusters`** | Clusters visible to this credential |
345
345
  | **`org list instances`** | Instances visible to this credential, as a bare array of records. A key minted with `data.read` but not `instance.get` (the supported shape for `trace …`) gets the ids only — the same set `trace ls` is scoped to — as a **degraded document** rather than an array: `{"items": [{"id": …}, …], "degraded": true, "missing_permission": "instance.get"}` (`"instance.get_own"` from a server before scoped role assignments, which names the permission so), with the warning on stderr and in the document's `warnings`. The shape changes so a script cannot read an ids-only listing as a complete one; an array is never wrapped just to carry a warning. |
346
346
  | **`org list keys`** | API keys visible to this credential (metadata only; plaintext never returned) |
347
- | **`org key`** `[name-or-prefix]` | Metadata and assignments for a visible key, loaded from `/scoped-api-keys`, `/assignments` and `/roles?include_permissions=true`. Each assignment retains its role permissions, scope UUID, access mode and scope rules; no flat union is presented as access to every target. Older servers use the legacy single-role representation. UUID role and resource identities remain separate; names/prefixes select a unique visible result or report ambiguity. Secrets are never listed. `has_super_admin_permission` is derived from explicit platform assignments and live parent-key ceilings. |
347
+ | **`org key`** `[name-or-prefix]` | Metadata and assignments for a visible key, loaded from `/scoped-api-keys`, `/assignments` and `/roles?include_permissions=true`. Each assignment retains its role permissions, scope UUID, access mode and scope rules; no flat union is presented as access to every target. Older servers use the legacy single-role representation. UUID role and resource identities remain separate; names/prefixes select a unique visible result or report ambiguity. Secrets are never listed. |
348
348
  | **`org create key`** `--name` `--role` `--cluster` `--out` | Mint a key for this user bound to exactly one cluster this key can already see. `--cluster` is a name or an id; `--role` is the role's name (`org key` shows the role of each key you hold), or its id when two roles share the name. The new role cannot grant a permission this key lacks, and the issuing key must itself hold `api_key.create`. The key is written only to `--out`, a new file created 0600 (an existing file is refused); output carries `key_prefix` and `key_file`, never the key, and nothing goes to `.xmemrc.json`. The new key keeps that one cluster (clusters created later are not added), expires no later than this key, and is deactivated when this key is, or unlinked from the cluster when this key is. To contain a leaked key, deactivate it in the Console: what it minted goes with it. A lost reply or a 5xx says a key may still exist, except the server's own **503** (busy), which created nothing; a **429** is a temporary mint limit whose message says which (another mint by this user is still running, this user's keys created too many keys recently, or the server is tracking as many minting users as it can), and a **400** a request the server refuses (such as a `--name` over 255 characters): neither created a key, and a 429 or 503 is safe to retry after a short wait (the server's `Retry-After` is not shown). A 404 means `--cluster` is not linked to this key; a 422 that names `api_role_name` means the server predates this command, which needs a server from the same release as this CLI; a 403 saying only `Insufficient permissions` means the server predates the release that lets a key create keys, and any other 403 that it will not mint this key: the role, the owner's permission, this key or the cluster. Current servers require the issuing key’s own create permission and delegation authority; older servers can instead report an owner-permission refusal through the legacy `user_may_mint_keys` diagnostic. |
349
349
 
350
350
  ---
@@ -543,7 +543,7 @@ so a typo fails loudly rather than being ignored.
543
543
  ### Trace — the Console's operation traces
544
544
 
545
545
  What the Console shows on an instance's **Operations** tab (a paged list), on **Inspect** (a
546
- search across operations), and in each operation's detail pane, plus (for super admins) the LLM calls of a
546
+ search across operations), and in each operation's detail pane, plus (for the few keys allowed to read them) the LLM calls of a
547
547
  session, which no Console view lists — fetched from the same Console endpoints, with this CLI's API key, and emitted **as the Console serves them**. Nothing is curated
548
548
  or reshaped: the Console already curates per caller, and a field the Console adds shows up here
549
549
  the same day. These documents are for scripts and agents; on a terminal they are only indented
@@ -553,9 +553,9 @@ learn; the CLI composes the Console's search clauses itself.
553
553
  | Command | Console view | Description |
554
554
  |---------|--------------|-------------|
555
555
  | **`trace ls`** | Operations tab / Home | Operations, newest first, across every instance this credential can see (nothing given — the Home view), or the `--instance ID` given (repeatable, or a comma list; default `--instance-id` / `$XMEM_INSTANCE_ID`). Returns `operations[]`, `counts`, `instance_counts`, `series`, and the paging cursor `next_before_ts_ms` + `next_before_trace_id` (with `has_more_operations`). Flags: `--trace-type T` (repeatable / comma; `write`, `read`, `create`, `update`, `evolution` — `delete` is `--search` only), `--hours-back N` (24 when not given, the Console's default for this list; `0` = unbounded) or `--start-ts` / `--end-ts` (epoch seconds), `--user-id`, `--api-key-id`, `--include-console-reads`, `--bucket-ms`, `--limit N` (default 100, Console cap 500), `--cursor TS_MS:TRACE_ID` (the previous page's two halves, joined with a colon), `--counts-only` (`ops_limit=0`: what Home fetches — counters and series, no rows; refused together with `--limit` / `--cursor`, which would have nothing to page). |
556
- | **`trace ls --search`** | Inspect | The Inspect search, for the filters only it can answer: `--text` (free text), `--request` / `--response` (text on either side of the operation), `--object NAME` / `--field NAME` (repeatable; all must match), `--status S` (repeatable / comma; any may match: `ok`, `error`, `stale`, `timed_out`, `internal_error`, `quota_exceeded`, `in_progress`, `schema-gap`), `--trace-id ID` (repeatable / comma), `--session-id`; plus `--instance` (at most one — the Inspect scope), `--trace-type` (also `delete`), `--hours-back` (a floor applied to the hits *after* the search — Inspect's own recency windows decide the candidate pool, so this narrows a result, unlike the query window it is on `trace ls`), `--user-id`, `--api-key-id`, `--include-llm` (1.7.0: also model-call hits, in a free-text search — see below), `--limit N` (default 100, Console cap 500; a page can hold a few more rows than that when hits tie on time, trace id and instance id with its last one, and fewer when the Console narrows it), `--cursor TS_MS:TRACE_ID:INSTANCE_ID` (the previous page's three cursor fields, joined with colons). Returns the Inspect document: `merged[]` hits with `kind`, `href` (`/write/{trace}`, `/read/{trace}`, `/create/…`, `/update/…`, `/evolution/…`, or `#` for an instance deletion, which has no detail page), `trace_id`, `instance_id`, `session_id`, `user_id`, `api_key_id` / `api_key_name` / `api_key_prefix`, `status`, `quota_kind` (a `quota_exceeded` write or read only: `daily_quota_exceeded` or `monthly_quota_exceeded`; absent from an older Console), `time_taken_ms`, `match_items`; with `--include-llm`, for a super admin, model-call hits too: `kind: llm_call`, `trace_id` (the operation that made the call), `llm_call_id`, `llm_operation_type`, `href` (that operation's pane, or `#`), and `llm_sub_stage`, `llm_provider` and `session_id` when the call recorded them (the first two from a Console of 2026-10-08 or later); no `instance_id` and no `status`. Open one with `trace call <llm_call_id>`. Then the paging fields `has_more`, `next_before_sort_at_ms`, `next_before_trace_id`, `next_before_instance_id`, `truncated`. |
557
- | **`trace calls`** | — (no Console view) | The LLM calls of one session, newest first, a page at a time. **Super admins only**: any other credential gets 403 → exit **3**, stage `permission`. `--session-id` (required), `--stage S` (exact, or a prefix with a trailing `*`, e.g. `benchmark.*`), `--model M` (the model slot, or the model that served the call), `--outcome` (`succeeded`, `failed` — an error that is not a refusal — or `refused`), `--hours-back N` (server default 720, i.e. 30 days; `0` = everything kept), `--limit N` (default 100, Console cap 500), `--cursor TS_MS:TRACE_ID:INSTANCE_ID` (the previous page's three cursor fields: the call time, its operation and its call id). Returns `llm_calls[]` — per call `llm_call_id`, `operation_id`, `operation_type`, `instance_id`, `session_id`, `sub_stage`, `model_type`, `model_id`, `provider`, `provider_type`, `called_at` / `called_at_ms`, `time_taken_ms`, token counts, `is_success`, `is_refusal`, `is_cached`, `error_message`, `finish_reason`, `gateway_request_id`, `client_attempts`, `gateway_repairs`, `reissue_of_llm_call_id`, `reissue_reason`, the requested settings, the applied ones (`applied_temperature`, `applied_thinking`, `applied_effort`), the prompt-cache counts (`cache_read_tokens`, `cache_write_tokens`), the prompt renderer (`prompt_family`, `prompt_generator`, `prompt_schema_provider`, `prompt_version`) and the provider's own ids (`provider_request_id`, `provider_response_id`); never the prompt or the reply (an `error_message` may quote the gateway's detail about a reply) — and the paging fields `has_more`, `next_before_sort_at_ms`, `next_before_trace_id`, `next_before_instance_id`, `truncated`. |
558
- | **`trace call`** `<llm_call_id>` | — (no Console view) | One LLM call whole, as `{"found": true, "llm_call": {…}}` (so `jq .llm_call.prompt`): the same fields as a `trace calls` row plus `prompt`, `json_schema`, `result`, `raw_result` (the reply as the model wrote it, when the gateway repaired it) and `rejected_attempts`. It does not list the calls that re-issued this one (`trace get` on the operation shows those as `reissued_as_llm_call_ids`). If the call's stats never landed, `llm_call` carries only `llm_call_id`, `operation_id` and those logged fields. **Super admins only**, as above. An unknown id — the Console's `{"found": false}` — is `stage: "not_found"`, exit **3**; so is a listed call whose logged half (prompt and reply) never landed. |
556
+ | **`trace ls --search`** | Inspect | The Inspect search, for the filters only it can answer: `--text` (free text), `--request` / `--response` (text on either side of the operation), `--object NAME` / `--field NAME` (repeatable; all must match), `--status S` (repeatable / comma; any may match: `ok`, `error`, `stale`, `timed_out`, `internal_error`, `quota_exceeded`, `in_progress`, `schema-gap`), `--trace-id ID` (repeatable / comma), `--session-id`; plus `--instance` (at most one — the Inspect scope), `--trace-type` (also `delete`), `--hours-back` (a floor applied to the hits *after* the search — Inspect's own recency windows decide the candidate pool, so this narrows a result, unlike the query window it is on `trace ls`), `--user-id`, `--api-key-id`, `--include-llm` (1.7.0: also model-call hits, in a free-text search — see below), `--limit N` (default 100, Console cap 500; a page can hold a few more rows than that when hits tie on time, trace id and instance id with its last one, and fewer when the Console narrows it), `--cursor TS_MS:TRACE_ID:INSTANCE_ID` (the previous page's three cursor fields, joined with colons). Returns the Inspect document: `merged[]` hits with `kind`, `href` (`/write/{trace}`, `/read/{trace}`, `/create/…`, `/update/…`, `/evolution/…`, or `#` for an instance deletion, which has no detail page), `trace_id`, `instance_id`, `session_id`, `user_id`, `api_key_id` / `api_key_name` / `api_key_prefix`, `status`, `quota_kind` (a `quota_exceeded` write or read only: `daily_quota_exceeded` or `monthly_quota_exceeded`; absent from an older Console), `time_taken_ms`, `match_items`; with `--include-llm`, for a key allowed to read model calls, model-call hits too: `kind: llm_call`, `trace_id` (the operation that made the call), `llm_call_id`, `llm_operation_type`, `href` (that operation's pane, or `#`), and `llm_sub_stage`, `llm_provider` and `session_id` when the call recorded them (the first two from a Console of 2026-10-08 or later); no `instance_id` and no `status`. Open one with `trace call <llm_call_id>`. Then the paging fields `has_more`, `next_before_sort_at_ms`, `next_before_trace_id`, `next_before_instance_id`, `truncated`. |
557
+ | **`trace calls`** | — (no Console view) | The LLM calls of one session, newest first, a page at a time. **Not available to most keys**: a key that may not read model calls gets 403 → exit **3**, stage `permission`. `--session-id` (required), `--stage S` (exact, or a prefix with a trailing `*`, e.g. `benchmark.*`), `--model M` (the model slot, or the model that served the call), `--outcome` (`succeeded`, `failed` — an error that is not a refusal — or `refused`), `--hours-back N` (server default 720, i.e. 30 days; `0` = everything kept), `--limit N` (default 100, Console cap 500), `--cursor TS_MS:TRACE_ID:INSTANCE_ID` (the previous page's three cursor fields: the call time, its operation and its call id). Returns `llm_calls[]` — per call `llm_call_id`, `operation_id`, `operation_type`, `instance_id`, `session_id`, `sub_stage`, `model_type`, `model_id`, `provider`, `provider_type`, `called_at` / `called_at_ms`, `time_taken_ms`, token counts, `is_success`, `is_refusal`, `is_cached`, `error_message`, `finish_reason`, `gateway_request_id`, `client_attempts`, `gateway_repairs`, `reissue_of_llm_call_id`, `reissue_reason`, the requested settings, the applied ones (`applied_temperature`, `applied_thinking`, `applied_effort`), the prompt-cache counts (`cache_read_tokens`, `cache_write_tokens`), the prompt renderer (`prompt_family`, `prompt_generator`, `prompt_schema_provider`, `prompt_version`) and the provider's own ids (`provider_request_id`, `provider_response_id`); never the prompt or the reply (an `error_message` may quote the gateway's detail about a reply) — and the paging fields `has_more`, `next_before_sort_at_ms`, `next_before_trace_id`, `next_before_instance_id`, `truncated`. |
558
+ | **`trace call`** `<llm_call_id>` | — (no Console view) | One LLM call whole, as `{"found": true, "llm_call": {…}}` (so `jq .llm_call.prompt`): the same fields as a `trace calls` row plus `prompt`, `json_schema`, `result`, `raw_result` (the reply as the model wrote it, when the gateway repaired it) and `rejected_attempts`. It does not list the calls that re-issued this one (`trace get` on the operation shows those as `reissued_as_llm_call_ids`). If the call's stats never landed, `llm_call` carries only `llm_call_id`, `operation_id` and those logged fields. **Not available to most keys**, as above. An unknown id — the Console's `{"found": false}` — is `stage: "not_found"`, exit **3**; so is a listed call whose logged half (prompt and reply) never landed. |
559
559
  | **`trace get`** `<trace_id>` | Detail pane | One operation's full document. `--trace-type` (`operation_type` on a `trace ls` row; the first path segment of a `--search` hit's `href`) makes it one request; without it the five detail endpoints are probed in order `write, read, create, update, evolution` and the first that knows the trace answers. A deletion's `DL00000000_aaaaaa` (or original `DL0000_aaa`) id is answered without a request: it has no detail page. A write's document carries `extracted_objects` (what extraction produced) and `cleaned_objects` (what the write kept after cleaning, rendered as a synchronous SDK `/write` answer renders it, by the caller's own primary keys; the answer may list fields and a relation's endpoints in another order), each a list holding one JSON document. A keyless object's `#N` in `cleaned_objects` is numbered within that field, as in the `/write` answer (over the cleaned objects, plus a structured write's relation endpoints), so it can name another object than the same `#N` in the document's `diff_plan`, `identity_changes` and `written_objects`: a keyed object joins across these fields by its primary key, and a keyless one cannot be matched across them by `#N`. `cleaned_objects` is `[]` for an edit, a failed write, a write still in progress, a write that cleaned nothing or whose objects could not be rendered, a write on an instance without a schema, and writes recorded before the Console stored it. Both go to everyone who may open the write, and so do `merge_contradictions` (what the write's text-field merges reported for the fields it changed, the entries the write response carried; `[]` for a write whose merges reported none and for writes before the Console kept them) and `merge_contradictions_total` (the write's true count, above the entries listed when the API's per-write cap of 100 cut them). A miss — the Console's `{"found": false}`, or its 404 for a trace outside your scope — is `stage: "not_found"`, exit **3**. |
560
560
 
561
561
  **`--search` is opt-in, on purpose.** The Inspect search runs text predicates across the trace store with a candidate pool of thousands and a merge — markedly more expensive than the indexed, cursor-paged `trace ls`. Passing a search-only flag (`--text`, `--request`, `--response`, `--object`, `--field`, `--status`, `--trace-id`, `--session-id`) without `--search` is a usage error (exit **2**) whose message says exactly that, so an agent reasons about whether it needs the search or whether `trace ls` narrowed by `--instance` / `--trace-type` / `--hours-back` plus `trace get` will do. Conversely `--counts-only`, `--start-ts` / `--end-ts`, `--bucket-ms` are refused with `--search` because the Inspect endpoint cannot honour them, and `--include-console-reads` because Inspect's only spelling of that toggle is a bare phrase inside `q` itself — which is also why a free-text value containing the words "include console reads" is refused rather than sent (the Console would flip the toggle and strip the phrase from the query).
@@ -564,15 +564,15 @@ learn; the CLI composes the Console's search clauses itself.
564
564
 
565
565
  **Paging a search — read this before scripting `--search`.** `trace ls --search` pages like `trace ls`, with the Inspect endpoint's own keyset cursor: pass the previous page's `next_before_sort_at_ms`, `next_before_trace_id` and `next_before_instance_id` back as `--cursor TS_MS:TRACE_ID:INSTANCE_ID` until `has_more` is `false`. A model-call hit has no instance, so when a page ends on one, `next_before_instance_id` is its `llm_call_id`: pass it back as it came, and give `--include-llm` on every page of that walk, since the cursor is a place in the result that flag shapes. Follow `has_more`, never the row count: the Console narrows each page after its row limits (type and status resolution, console-read exclusion), so a page can hold fewer rows than `--limit` — even none — and still have more. Paging reaches every match with two exceptions. Free text (`--text`) shorter than three characters does not match the text inside finished operations — a write's text and diff plan, a read's query and result, an operation's error message: the Console's text indexes on them hold three-character runs (trigrams), and rather than scan every payload it lets a needle with none match nothing there. The Console counts only ASCII characters toward the three, so a short needle with accented letters can miss the same way. Such a needle still matches an id, an exact object, field or type name, and an evolution's stage or error. The other exception the Console reports itself: a search with no filter that shapes the query (only scope such as `--instance`, `--session-id`, `--user-id`, `--api-key-id` or `--hours-back`) is the Console's recent-activity view, which reaches back only as far as its window (currently 180 days). When this credential has older operations than that, the last page carries `truncated: true` and the CLI emits a **warning** (stderr, and folded into the JSON document's `warnings` array) naming the way past it — a filter such as `--trace-type` or `--text`. That flag comes from the endpoint, which knows what it could not reach; against a Console that pages, the CLI does not guess at a cut from how many rows came back. Only a Console too old to report `truncated` still gets the CLI's own estimate from the row count, and that warning says it is an estimate. Asking for a page changes two things worth knowing before you script it: a free-text search answers from one candidate window per page rather than the exhaustive second pass the whole-result path ran, so a rare needle can give a short — even empty — first page with `has_more: true` where one call used to find the match; and a paged request is all-or-nothing, so a Console-side source failure is a `502`, or a `503` when the trace store refused the query for resources, rather than a partial answer at exit 0. A `--cursor` request answered without the paging fields reached a Console that does not page: a node not yet updated while a deploy rolls out, or a Console that no longer pages searches. It ignored the cursor, so the CLI exits **3** with `stage: "paging_unsupported"` rather than hand back its newest rows as the next page. Retry after a short wait; if it persists, restart the walk without `--cursor`. Each page is a full search on the Console, run again from the cursor, so a walk costs about one search per page: walk with `--limit 500`, the Console's cap, to make fewer calls. A clause-only search (a clause flag such as `--object`, `--field`, `--request`, `--response`, `--status` or `--trace-type`, and no `--text`) reaches up to `--limit` candidates per call — 100 by default, 500 at most — where the whole capped answer of a Console before paging reached 5 000 per source; paging reaches the rest. The CLI follows no page on its own: it returns the page it was given, even an empty one with `has_more: true`, and a script loops. The CLI does not ask for the Console's whole-result `totals` (`include_totals`, which the counts and charts on the Console's instance tab and session page draw); to count a search's matches, walk its pages.
566
566
 
567
- **Model-call hits (`--include-llm`, 1.7.0).** Opt-in: without the flag a search asks for none, and its request and answer are what they were before 1.7.0. With it, a free-text search (`--text`) also looks through model calls — text in their prompt or error message, or the whole of their call id, operation id, session id or gateway request id — and returns the ones it matches beside the operations, newest first with them, so calls take places on each page. The Console looks through model calls only in a free-text search, and a model call has no instance, user or key to scope it by, so the CLI refuses `--include-llm` without `--text`, with a clause flag (`--trace-type`, `--status`, `--object`, `--field`, `--trace-id`, `--request`, `--response`), and with an instance, user or key scope (`--instance` or a bound `--instance-id` / `$XMEM_INSTANCE_ID`, `--user-id`, `--api-key-id`): each of those would answer with no model call whatever matched. `--session-id` and `--hours-back` work with it. A model call carries its prompt and error, so the Console serves these hits to a caller with no instance restriction only — a super admin's key — and leaves them out for every other credential rather than refuse the search: a member's key gets the same operations it gets without the flag, and no model-call hits. `auth status` says whether this credential is a super admin's. Each hit names its call: `trace call <llm_call_id>` opens it whole, and `trace get <trace_id>` the operation it belongs to.
567
+ **Model-call hits (`--include-llm`, 1.7.0).** Opt-in: without the flag a search asks for none, and its request and answer are what they were before 1.7.0. With it, a free-text search (`--text`) also looks through model calls — text in their prompt or error message, or the whole of their call id, operation id, session id or gateway request id — and returns the ones it matches beside the operations, newest first with them, so calls take places on each page. The Console looks through model calls only in a free-text search, and a model call has no instance, user or key to scope it by, so the CLI refuses `--include-llm` without `--text`, with a clause flag (`--trace-type`, `--status`, `--object`, `--field`, `--trace-id`, `--request`, `--response`), and with an instance, user or key scope (`--instance` or a bound `--instance-id` / `$XMEM_INSTANCE_ID`, `--user-id`, `--api-key-id`): each of those would answer with no model call whatever matched. `--session-id` and `--hours-back` work with it. A model call carries its prompt and error, so the Console serves these hits to a caller with no instance restriction only, and leaves them out for every other credential rather than refuse the search: a member's key gets the same operations it gets without the flag, and no model-call hits. Each hit names its call: `trace call <llm_call_id>` opens it whole, and `trace get <trace_id>` the operation it belongs to.
568
568
 
569
569
  **LLM calls of a session (1.6.0).** The list holds the calls recorded under that session; a call whose session was not recorded with it is not listed, so treat the list as the session's recorded calls, not a guaranteed complete count. The API records each call's session with the call (a session over 256 characters only best-effort, through the Console's lookup by operation); a per-step benchmark call is listed only when its runner sent a session with it, and a schema generation or instance creation call only when its operation was recorded with a session. `trace calls` pages exactly like `trace ls --search`: follow `has_more`, pass the three `next_before_*` fields back as `--cursor`. On the last page the Console sets `truncated: true` when calls matching the filters exist before the `--hours-back` window, and the CLI warns (stderr, and the JSON document's `warnings` array) — widen the window, or pass `0` for everything kept. The older text fields (`sub_stage`, `model_type`, `provider`) read `""` when nothing reported them, as in `trace get`; every newer one (`instance_id`, `model_id`, `provider_type`, `finish_reason`, `reissue_of_llm_call_id`, `reissue_reason`, `schema_property_order`, `applied_temperature`, `applied_thinking`, `applied_effort`, `prompt_family`, `prompt_generator`, `prompt_schema_provider`, `prompt_version`, `provider_request_id`, `provider_response_id`) is `null` then, so `select(.reissue_of_llm_call_id != null)` keeps only re-issues, as it does on `trace get`. The counts, times and outcome flags every call has (`time_taken_ms`, the token counts, `is_success`, `is_refusal`, `is_cached`) are always numbers and booleans; a setting or count only some calls report (`max_tokens`, `temperature`, `no_cache`, `client_attempts`, `cache_read_tokens`, `cache_write_tokens`), `error_message` and `gateway_request_id` are `null` when nothing reported them, and so, in `trace call`, are `session_id`, `json_schema`, `result`, `raw_result` (null for every reply the gateway served as written) and `rejected_attempts`. These commands need a Console that serves them: an older one does not accept a key on these paths and answers **401**, which the CLI reports as exit **4** `auth`.
570
570
 
571
571
  **Two document shapes.** `trace ls` returns the Operations-tab document; `trace ls --search` returns the Inspect document (above). They differ because the Console's two backends differ and this CLI does not reshape what the Console serves. Both carry the same identifiers per row (`trace_id`, `instance_id`, `session_id`, `user_id`, `api_key_id`, `status`), which is what `trace get` needs next.
572
572
 
573
- **Every operation row carries its internal ids.** `operations[]` rows have `operation_type`, `trace_id`, `instance_id`, `timestamp`, `status`, `is_success`, `error_code` (super admins only: it is the server's own cause code, finer than the API's error codes), `session_id`, `user_id`, `user_email`, `api_key_id`, `api_key_name`, `api_key_prefix`, `time_taken_ms`, `text_snippet`, `object_names`, `field_names`.
573
+ **Every operation row carries its internal ids.** `operations[]` rows have `operation_type`, `trace_id`, `instance_id`, `timestamp`, `status`, `is_success`, `error_code` (privileged callers only: it is the server's own cause code, finer than the API's error codes), `session_id`, `user_id`, `user_email`, `api_key_id`, `api_key_name`, `api_key_prefix`, `time_taken_ms`, `text_snippet`, `object_names` (for a write, the object and relation type names it recorded: for a text write the types its plan wrote, none when the plan changed nothing; for a structured write the types it targeted; for an `/edit_data` call the types it targeted even when it failed; and none for any failed `/write` call, text or structured, whose row then has no `object_names` key), `field_names`.
574
574
 
575
- > **Three of those never resolve for an API key**, super admin or not, and this is by design rather than a gap. `user_email` is always absent: the accounts `/users` lookup is closed to keys (an agent may learn who *it* is, never enumerate the organisation's users), so rows keep `user_id` and you resolve names yourself if you need them — and the Console refuses a key's `User:` search clause naming a whole address (`User:sarah@example.com`) with a `400` `user_email_filter_unsupported_for_api_key`; filter by `user_id` instead. For that reason `--user-id` refuses a value containing `@` as a usage error (exit **2**) on both `trace ls` and `trace ls --search`, rather than sending a filter no key can resolve. `api_key_name` / `api_key_prefix` resolve only for the caller's **own** keys, because `GET /api-keys` scopes a key caller to its owner's keys. So a super admin's key does *not* see literally everything its owner's browser sees: it sees the same rows and the same fields, with those three enrichments empty. Everything scope-bearing — which instances, which detail fields, `llm_calls`, internal-id substitution — is identical. Detail documents add what the Console's pane shows: `source_id`, `write_mode` / `read_mode`, `scope`, `extracted_objects` (an array holding one `{objects, relations}` document, failed writes included; empty when no extracted objects reached the journal: a write that failed before extraction finished or extracted nothing, or one that timed out), `diff_plan` (sanitised unless super admin), `written_objects`, `migration_id`, `proposal_version`, `schema_version`, `stage`, `triggered_evolution {migration_id, evolution_trace_id, update_trace_id}`, `sql_queries` (the rows owned by the read's instance, for every caller who may open the read), and two tiers of gated fields. **Super admin only** — the accounts API decides, for a key as for a browser session (a key needs its own explicit `platform.super_admin` grant and a live privileged parent chain): `llm_calls[]` (each model call the operation made; fields below), `step_decisions[]` (what each step of the operation decided, per item; below), `full_error_message`, the write's and read's cause code `error_code`, raw token counts, and unsanitised internal ids. **Callers with no instance restriction at all** — a super admin, or a browser session on a `CONSOLE_LOCAL` Console; never a scoped key: `ddl_queries`, `schema_generation`, and the ownerless rows of `sql_queries`.
575
+ > **Three of those never resolve for an API key**, whatever it may see, and this is by design rather than a gap. `user_email` is always absent: the accounts `/users` lookup is closed to keys (an agent may learn who *it* is, never enumerate the organisation's users), so rows keep `user_id` and you resolve names yourself if you need them — and the Console refuses a key's `User:` search clause naming a whole address (`User:sarah@example.com`) with a `400` `user_email_filter_unsupported_for_api_key`; filter by `user_id` instead. For that reason `--user-id` refuses a value containing `@` as a usage error (exit **2**) on both `trace ls` and `trace ls --search`, rather than sending a filter no key can resolve. `api_key_name` / `api_key_prefix` resolve only for the caller's **own** keys, because `GET /api-keys` scopes a key caller to its owner's keys. So even the widest key does *not* see literally everything its owner's browser sees: it sees the same rows and the same fields, with those three enrichments empty. Everything scope-bearing — which instances, which detail fields, `llm_calls`, internal-id substitution — is identical. Detail documents add what the Console's pane shows: `source_id`, `write_mode` / `read_mode`, `scope`, `extracted_objects` (an array holding one `{objects, relations}` document, failed writes included; empty when no extracted objects reached the journal: a write that failed before extraction finished or extracted nothing, or one that timed out), `diff_plan` (sanitised for most callers), `written_objects`, `migration_id`, `proposal_version`, `schema_version`, `stage`, `triggered_evolution {migration_id, evolution_trace_id, update_trace_id}`, `sql_queries` (the rows owned by the read's instance, for every caller who may open the read), and two tiers of gated fields. **Privileged callers only** — the accounts API decides, for a key as for a browser session (a key needs its own explicit grant, and so does every live key above it): `llm_calls[]` (each model call the operation made; fields below), `step_decisions[]` (what each step of the operation decided, per item; below), `full_error_message`, the write's and read's cause code `error_code`, raw token counts, and unsanitised internal ids. **Callers with no instance restriction at all** — a privileged caller, or a browser session on a `CONSOLE_LOCAL` Console; never a scoped key: `ddl_queries`, `schema_generation`, and the ownerless rows of `sql_queries`.
576
576
 
577
577
  **Each `llm_calls[]` entry**, oldest first, is a call made under the operation's id that names the document's instance, or names none (calls recorded before the API sent one, and work that runs for no instance, such as a schema generation): trace ids are not unique, so another instance's operation can share the id. A call that names no instance carries `names_no_instance: true`, since it is listed by the operation id alone and may be that other operation's; a call that names the document's instance carries no such key. Its fields: `llm_call_id`; `sub_stage` (the pipeline stage that made the call); `model_type` (the model slot asked for) and `provider` (the one that served it); `called_at`; `time_taken_ms`; `prompt_tokens`, `completion_tokens`, `reasoning_tokens` (part of the completion, not added to it), `total_tokens`; `is_cached`, `is_success`, `is_refusal`, `error_message`, `gateway_request_id`; `prompt`, `json_schema`, `result`. Then what explains a call's outcome:
578
578
 
@@ -591,19 +591,19 @@ learn; the CLI composes the Console's search clauses itself.
591
591
 
592
592
  A value the call did not record is `null`, and `reissued_as_llm_call_ids` and `gateway_repairs` are `[]`; calls recorded before these fields existed read that way throughout.
593
593
 
594
- **Each `step_decisions[]` entry** is one record of what one step of the operation decided, oldest first (by `recorded_at`, then `sub_stage`). A step records each time it runs and decides something (a step that decided nothing records nothing), so one operation can hold several records of one step, and every record is served; none is merged into another. A write's deletion check records in its own process and again where the diff engine applies its gate, and a write retried whole under the same trace id (a stale-schema retry, a stall requeue, a stuck write claimed again) records every step again. Writes, reads and schema evolution record today. A write's extraction records too, under `extraction.` steps named like its model calls (`extraction.structured_output`, `extraction.description_merger`, `extraction.batch_field_extractor`, `extraction.field_verifier`, `extraction.relations_extractor`, `extraction.relations_verifier`, `extraction.phantom_record_check`, `extraction.deduplication`): what code decided about a reply (candidates folded into one, a reply set aside so the extracted values stand, connections dropped, a candidate left out of the write, a group of types split), and the verifiers' own rejections. The phantom record check records one `object` item per record whose key value a record of another type in the write carries (or, for a record with no key, whose stated values one states alike, with `detail.description`): `not_held` (the check found the text does not present the entity as that type, so the record is marked as one that does not hold), `kept`, `kept_unchecked` (the check did not decide, or the write had more such values than it checks), or `not_run` (the check did not run on the write; `detail.not_run_reason` is `switched_off` or `pinned_provider`), with the other types in `detail.shared_with`. Field verification records once per object type, when that type's field processing ends; a write that fails before then records none for that type. When the judge in front of field verification is configured but does not run on a write whose detection found something, the write records why, once, under the stage the judge's calls would journal under (`extraction.verification_judge`, or `shadow.extraction.verification_judge` in shadow mode): one item, `kind` `judge`, `decision` `not_run`, with `detail.not_run_reason` (`sampled_out`, `pinned_provider` or `config_unavailable`) and `detail.mode`. Extraction's items have the diff engine's shape: `kind` is `merge`, `object`, `relation`, `relation_type` or `type_group`; `decision` is `folded`, `skipped`, `not_held` (the verifier found the text does not state the object holds, so it is marked as one that does not), `kept_unverified`, `verifier_skipped` (field verification did not run because the judge in front of it cleared the object), `kept`, `kept_unchecked`, `key_restored`, `rejected`, `uncastable`, `dropped`, `split` or `escalation_disabled`; `detail` holds field names, candidate numbers and counts (`candidate_count`, `candidate_numbers`, `kept_number`, `ignored`, `basis`, `filled_fields`, `conflicting_fields`, `relations_repointed`, `fields`, `nulled`, `omitted`, `connection`, `field`, `candidates_per_link`, `relations`, `types`, `halves`, `refused_max_tokens`, `error_code`, `shared_with`), and no field's value except an object's key: in `key`, in a dropped relation's `links` (`Type(field='value')` per link), and a `description` for an object that has no key. `/extract` records its extraction the same way; it has no detail document of its own, so its records show only on a write's document when that write, on the same instance, reuses its trace id. A write's apply records what its merges did to the stored rows, under `write.merge_application`, once the write commits (a write that rolls back records none): one item per merge action, `kind` `merge`, named by the surviving row (the diff engine's `merge` items are named by the row merged away instead): its `object_type`, its `key` (absent for a type without a key, for a key with any part NULL or missing, which could name another row, and when the two rows were one) and its internal id, with `decision` `applied` and, in `detail`, the row merged away (by its internal id), `relations_repointed`, `relations_dropped` by reason (`linking_the_merged_rows`: a relation between the two merged rows; `removed_by_this_write`; `duplicate`: one the survivor already held) and `filled_fields`, the survivor's empty fields filled from the merged-away row, by name; or `decision` `nothing_to_merge` with why in `reason` (the two rows were one, or the row to merge away was already gone). Schema evolution records under `operation_kind` `evolution`: review, decide and apply each journal their steps' records once, when the stage ends, under their own trace, so an apply's show on its update document (its trace is the update id), and the detached pass that resolves an apply's gaps afterwards journals its own under the same trace. Its steps are the two model calls' names, `gap analyzer` (gaps never analysed or stored with no concepts, rows a reply left pending, concepts the parser dropped) and `semantic gate` (what the gate may do with each suggestion, candidates kept without a verdict, verdicts downgraded or not acted on), and the rule steps `evolution.backlog`, `evolution.resolution_filter`, `evolution.clustering`, `evolution.consolidation`, `evolution.prior_decisions`, `evolution.prerequisites`, `evolution.evidence_retirement` and `evolution.apply`; `kind` is `gap` (named by its feedback id in `key` and its concept's object and field), `suggestion` (its fingerprint in `key`, its change's names, and the gaps it was built from in `detail.gaps`, the first 20 with `gaps_total` when there are more), `cluster`, `decision`, `backlog`, `reply_entry`, `build` or `gate`, and no item carries what a user wrote. What a transaction did (a gap resolved, stored with no concepts, deleted or retired) is recorded only once it commits, and a row only when that step's own write or delete reached it. A build retried on a stale schema records both attempts: once the build runs again, every item the stage notes until it ends, the build's and the stage's own after it, carries `detail.attempt` (`2`), so an item without `attempt` was noted before the build ran again, and a `retried` item under `evolution.consolidation` records that it did; an `omitted` item is a marker, not a decision, and carries no `attempt`. A read records what the reader's own rules decided, under the name of the model call whose reply a decision is about (`read.question_decomposer`, `read.sql_syntax_fixer`, `read.empty_result_reviewer`, `read.overfetch_reviewer`, `read.answer_formatter`) or under a rule step (`read.scope`, `read.vector_grounding`, `read.sql_rewrites`, `read.sql_guard`, `read.sql_retries`, `read.answer`, and `read.other` for a family no step claims yet); a decision about a SQL statement a model call wrote goes under `read.sql_rewrites`, with the calling step in `detail.phase` where the rule names it. A read step that decided more than 101 times keeps its first and last 50 decisions, with one item (`decision` `omitted`, `detail.count`) where the rest were left out, cut further from the middle when they do not fit one record. A read journals its records once, when it ends, so a read still running has none yet, and a read retried on a stale schema runs again under the same trace id and records every step again; its items have `kind` (the decision family, such as `sql_guard_refused` or `distinct_order_by_case_dropped`), `decision` (`applied` or `not_applied`), `reason` where the rule says why, and `detail.part`, the part of a decomposed question the decision was made for, counted from 1, where it was made for one. `sub_stage` names the step in the `llm_calls[].sub_stage` vocabulary, so a step's decisions and its model calls join on it (a re-issued call journals under its step's name with a suffix such as `.refusal_fallback`, so it joins on the name as a prefix; the reader's rule steps, `extraction.deduplication` and `write.merge_application` have no model calls of their own) (`diff_engine.keyless_binding`, `diff_engine.deletion_check`, `diff_engine.intent_rules`, `diff_engine.value_span_containment`, `diff_engine.intent_verification_deep`, `diff_engine.alias_confirmation`, `diff_engine.object_resolution`, `diff_engine.unwritten_identity_verification`, `diff_engine.plan_construction`, the intent pipeline's `diff_engine.intent_gate`, `diff_engine.intent_operations`, `diff_engine.operations_repair` and `diff_engine.operations_verification`, Phase 1's `diff_engine.operations_second_opinion`, and the `read.` steps above). A model call made in shadow mode, beside the work it never changes and never charged, carries the prefix `shadow.` on its step's name; the intent pipeline and the verifiers' two judges are the steps that run in shadow today. The field verifier's judge, which can stand in front of `extraction.field_verifier` on a DEEP write or `/extract`, makes its calls under `extraction.verification_judge`, or `shadow.extraction.verification_judge` in shadow mode, and records under that same stage, once per object type, one item per object it was asked about: `kind` `object`, `decision` `flagged` (a field at or over its threshold, or one no question covered), `cleared` or `not_judged` (no verdict, which counts as every field flagged), with `detail.field_scores` (the flagged fields the judge scored, and their scores), `detail.unjudged_fields` (flagged fields no question covered), `detail.score`, `detail.field` and `detail.question` (the top score and where it came from), `detail.threshold`, `detail.questions_asked` and `detail.verifier` (`ran`, `ran on the flagged fields and the key`, or `skipped`). In on mode the verifier is asked only about the flagged fields and the key; in shadow mode it sees every field, and the item says what on mode would have sent it. A `verifier_skipped` item under `extraction.field_verifier` is an object an `extraction.verification_judge` call of the same operation cleared; every question and answer is in that call in `llm_calls[]`. The relation verifier's judge, which can stand in front of `extraction.relations_verifier` on DEEP writes and DEEP `/extract` calls, names its calls `extraction.relation_verification_judge`, or `shadow.extraction.relation_verification_judge` in shadow mode, and records under that same stage one verdict item per verifier call: `kind` `relation_type`, `decision` `flagged` (a proposed connection at or over its threshold), `cleared` or `not_judged` (no verdict, or two proposed connections sharing a unique key's values, which counts as flagged), with `detail.connection_scores` (the flagged connections' positions in the proposed list, counted from 1, and their scores), `detail.score` and `detail.top_connection` (the top score and its position), `detail.connections` (how many were proposed), `detail.threshold`, `detail.questions_asked` and `detail.verifier` (`ran`, or `skipped` when on mode kept the call's connections as proposed). A call on mode kept as proposed also records there any connection code dropped while building it (`kind` `relation`, `decision` `dropped`). A write it does not run on records one `kind` `judge`, `decision` `not_run` item under its stage, as the field verifier's judge does. The intent pipeline names its model calls by its step names above, with the prefix `shadow.` in shadow mode (`diff_engine.operations_repair` the operations step asked once more about the entries its checks dropped); `diff_engine.intent_operations` records what the write did with the answer in on mode only, where it stands in for `diff_engine.intent_rules`, and in either mode (with the prefix in shadow mode), once the run has finished, one item when the operations call ran out of its output budget and was asked once more: `kind` `intent_operations`, `decision` `retry_answered` or `retry_failed`, and `detail.model`, `detail.error` (the first call's code) and, on `retry_failed`, `detail.failure` (the type of the error the step then failed with); a run the write's grace cancelled with the retry in flight, or one whose gate closed or failed, records none, and the retried call is the step's `llm_calls[]` entry whose `reissue_reason` is `provider_output_token_limit_exceeded`. `diff_engine.operations_repair` (with the prefix in shadow mode) records one item, once the run has finished, when the operations step asked its model once more about the entries its checks dropped: `kind` `intent_operations`, `decision` `repaired` (the second reply stood), `repair_rejected` (it was not the first reply with those entries fixed, so the first stood with its drops) or `repair_failed` (the repair met an error, so the first reply stood with its drops), and `detail.model` (the model the repair asked last: the one that gave the first reply, or its fallback after an outage) and, on `repair_failed`, `detail.failure` (the type of the error it met); a run whose gate closed records none, and so does a reply over the cap, which is never repaired: the write falls back to the engine. `diff_engine.intent_gate` (with the prefix in shadow mode) records one item when the gate's deadline, the write's grace, opened it: `kind` `intent_gate`, `decision` `opened_by_deadline`, and `detail.deadline_seconds`, `detail.unanswered_calls` (the gate calls cut off) and `detail.sentence_count`. A step whose decisions act on another step's calls names itself the same way: `diff_engine.intent_rules` acts on the replies under `diff_engine.object_and_relations_deletion_detection` and `diff_engine.batch_field_erasure_detection`. The records hold what the engine decided that the operation's `llm_calls[]` (their prompts and replies) and its `diff_plan` do not already show, so the model's own answers are read in `llm_calls[]`, not here. `decision_count` is the step's true total and `decisions_truncated` marks a record cut to fit (for a read step, also one cut to its first and last 50 decisions), so `decisions` can hold fewer items than the count. `decisions` is the items as the step recorded them, a JSON array, or `null` when the stored text is not one (the count still shows). A pane serves at most 500 records and 4 MiB of `decisions` text, the newest; when it cut older ones it adds `step_decisions_truncated: true` beside the array, and otherwise the key is absent. A trace id a client reuses across writes serves every write's records together, ordered by time with nothing between the writes. The diff engine's items share one shape: `kind` (what the item is: `intent_gate`, `intent_operations`, `intent_verification`, `object`, `identity_change`, `merge`, `filtered_deletion`, `filtered_update`, `relation`, `deletion`, `alias`, `relabel`, `scope`, `detection`, `operation`, `intent_pipeline`, `second_opinion`) and `decision` (what was decided: `deletion_dropped`, `converted`, `rejected`, `kept`, `bound`, `not_bound`, `matched`, `left_out`, …), then, where set, `object_type` and `key` (the primary-key values as `field='value'`), `index` (the object's position in the diff engine's sorted object list, not in `extracted_objects[]`), internal id (the stored row), `reason`, and `detail` (anything else the step decided). `diff_engine.keyless_binding` records one `object` item per record of a keyed type that states no key but another field: `bound` to the one stored row it names (its `key` and internal id), or `not_bound` with why in `detail.outcome` (a record one stored row matches in every field it states carries that row's `key` and internal id when it is left `not_identifying`, matching only in yes/no and listed-value fields and never put to the verifier, or `rejected` or `unverified`, the verifier not confirming the text refers to it); `same_key_group` (the write holds records of different types with the same key, so nothing of it is looked up), `key_stated_for_another_type` (a record of another type in the write states the key of the row it would bind to), `key_of_another_type` (a stored row of another type has that key) and `key_check_unread` (the stored rows could not be read, or the key has more fields than the check looks up) are a temporary net against extraction copying a record's identifier onto another type; a binding left unbound for one of the last three carries the row it would have bound to (its `key` and internal id; a record not asked about its closest rows for them lists those rows in `detail.other_type_rows` instead), and the other types in `detail.other_types`: for `key_stated_for_another_type` and `key_of_another_type`, and for a record set aside unasked as `key_check_unread` whose rows stand down for different reasons, the types its rows' keys were found under. The same-key groups and the stated-key check go once extraction no longer returns such copies; the stored-key check goes only once the copies earlier writes stored are cleaned up too, or a scan finds none. A stored copy whose key differs only in case, surrounding spaces or accents is not found. In on mode, Phase 1's `record_where` lookup may also ask the verifier under `diff_engine.keyless_binding` (on a model that runs that check, when one stored row matches and the answer would be used once it is confirmed), about a rename's or a merge's record the text names by its fields whose extracted record carries the operation's new key, and records no item of its own: what came of it shows under `diff_engine.intent_operations`, where a bound rename is named by the stored row's key, or as `record_where_unbound` with `detail.sub` `stated_key`, or as the fallback a bound answer met later (such as `rename_old_key_unmatched`, or `rename_or_merge_rejected` when Phase 1.5 did not confirm every rename and merge of the answer); under `intent_pipeline_failures: refuse` a bound answer whose translation fails, or whose key-only lookup could not run, still goes to the engine as `record_where_unbound`, as before the lookup, and a failure of the verified relabel's own work as `relabel_failed`. `diff_engine.operations_second_opinion` records one item, `kind` `second_opinion`, on an on-mode write that the moves the verifier rejected would send to the engine, when the verification fallback is asked about them again: `decision` `confirmed` (they took the path a confirmed move takes; `diff_engine.intent_operations` says whether each was applied), `confirmed_beside_a_rejection` (another move still sent the write to the engine), `rejected`, `no_answer`, `not_asked` (its model gave the rejection) or `not_asked_model_unknown` (the write's result does not say which model rejected them), with `detail.model`, `detail.asked`, `detail.confirmed` and, when no verdict came, `detail.unanswered`; the call it made is that step's `llm_calls[]` entry. In on mode `diff_engine.intent_operations` says what the write did with the intent pipeline's answer: an `operation` item per operation it applied, its `decision` the operation's kind (`delete`, `unlink`, `unlink_all`, `move`, `clear`, `rename`, `merge`, `bulk_delete`, `bulk_update`) and its `reason` the passage that asks for it, then `not_applied` for one the write could not carry out (a delete of a record by the new name a rename of the same write gives it reads "it is also the target of a rename", as the engine's own rule says it, and a move with no end it leaves that the verifier confirmed, the old engine's gate closed, reads "the write's text read no removal or relink, so the stored link stays beside the one the write states") and `dropped` for one the pipeline dropped, each with why and `detail.position` (its place in the model's reply), then an `object` item `skip` for each record of a keyed type that states no key and that the write skipped, and `erase_refused` for each record bound to a stored row by its other fields whose clears were not applied (`detail.fields`); a `clear` item therefore names what the pipeline asked for, not what was written. When the engine's own detection decides the write instead, the step records one `intent_pipeline` item, `decision` `engine_decides`, whose `detail.fallback` names why (its `reason` says it in words) and beside which the engine's own steps record as with the pipeline off: `missing` (no result reached the write), `unreadable`, `translation` (the rows the operations name could not be read), `dropped` (the pipeline dropped an operation it proposed for a reason other than its verifier's rejection, so its answer is not the whole change; every drop of an answer that keeps nothing reads as no change when the write's presence check left the gate closed; `detail.sub` `gate_open` when this node read that gate open, `after_translation` or `after_key_only_lookup_failed` when such an answer then failed), `verifier_rejected` (a temporary net: the pipeline's verifier rejected a delete, a clear, an unlink, an unlink_all or a move it proposed, which may be about how the operation names its records rather than the change; a rejected bulk delete or update does not count, and a rename it rejects, or a merge while `execution.entity_merge` is on, goes to the engine as `rename_or_merge`; a move naming no end it leaves goes to the engine with `detail.sub` `move_fetch_cut_short` or `move_link_not_extracted` where that applies, and is otherwise left to the write's verification, which decides the stored link it would end; rejections of deletes, clears and moves that are the whole answer read as no change when the write's presence check left the gate closed, and otherwise as `verifier_rejected`, `detail.sub` `gate_open` when this node's own reading of that gate is open, or `after_translation` or `after_key_only_lookup_failed` when that step failed on such an answer), `record_where_unbound` (it names a record by the field values the text states, a key stated in part among them, and once verified, binding it through the write's own extraction found no single record for it; a writer that predates the binding decided it before the pipeline's verifier was asked; `detail.sub` `after_translation` or `after_key_only_lookup_failed` when a rename or merge the stored-row lookup bound then failed, whatever Phase 0's gate), `unresolved` (it saw a change whose records it could not name: a record described rather than named, records selected through a relation, some but not all links of a kind, or all of them handed over to another record; every one of them ending, but those the text keeps, is an `unlink_all`; `detail.sub` `after_translation` or `after_key_only_lookup_failed` when an answer of such changes alone, none naming a type, read as holding no operation while the write's presence check left the gate closed, then failed), `rename_or_merge` (it holds a rename or an unlink_all sharing a record with a merge, renames that swap, cycle, fork or converge, or an unlink_all whose record another operation names in its relation, decided before the pipeline's verifier is asked, or the verifier rejected a rename, or a merge while merges are on), `rename_old_key_unmatched` (it renames a record that no single stored record has by the name the text gives), `merge_loser_unmatched` (it merges away a record that no single stored record has by the name the text gives), `rename_onto_stored` (it renames a record onto a name another stored record already has), `rename_record_partly_stated` (the write states a record without the rest of a key a rename names, so whether it is that rename's old record, its new record or another one is unknown), `clear_in_question` (the text holds a question mark and Phase 1.5 did not confirm a clear the answer holds, `detail.sub` `rejected_in_phase_1_5`), `unlink_in_question`, `move_in_question`, `repoint_in_question` (temporary nets: while the text holds a question mark, it unlinks records of a relation type the extraction holds a relation of, or moves a relation, or, whatever it holds, the extraction holds a relation of a type keyed on some of its ends but not all, which written re-points the stored link those ends share, as with the pipeline off; Phase 1.5 cannot verify or take back any of these; `repoint_in_question`'s `detail.sub` is `after_translation` or `after_key_only_lookup_failed` when a question text's answer that stood while the write's presence check left the gate closed then failed), `delete_with_values` (it deletes a record the write's own extraction gives values other than its fields' defaults), `unlink_replaced` (it unlinks records while the write's own extraction holds another record the link may have moved to, which no new link joins to the unlink's other ends and no other operation ends or removes; `detail.sub` `after_translation` or `after_key_only_lookup_failed` when such an answer, read as holding no operation while the write's presence check left the gate closed, then failed), `unlink_all_with_links` (it ends every link of a kind that a record has, while the write's own extraction links that record by that kind to a record it does not keep, or holds another record of its type that nothing accounts for, as a transfer the answer misread would), `unlink_all_names_an_end` (the extraction holds a record of the kind an unlink_all ends that it does not keep, as when the text names the one link it ends, or the unlink_all keeps a record at only some of the roles its type takes), `key_rewritten` (an operation's key was read as the extraction's spelling), `unmatched_key_only` (the gate opened, while the extraction holds a record by its key alone that the answer would write and no stored row has; a delete's record, a rename's old and new records, a merge's survivor, a move's new end and a record an unlink_all keeps are not looked up; `detail.sub` `after_translation` when relation ends it was going there for, bound to their stored twins instead, then failed, whatever Phase 0's gate, or when an answer holding no operation it let stand beside such records, while the write's presence check left the gate closed, then failed), `key_only_lookup_failed` (the same, but whether those records are stored could not be read), `end_not_stored` (an unlink's end, an unlink_all's own record, or a move's old or kept end, binds no single stored row: none has its key, or several do, so the stored link would stay; a write whose every operation is so, with the old engine's gate closed as the presence check's verdicts stored beside the answer read it, does not fall back: it stores what was extracted and reports each as a `rejected` relationship outcome; `detail.sub` `gate_open` when the stored verdicts read that gate closed and this node read it open, `twin_bound` when a twin binding rewrote the extraction, so written alone a record would land on a stored row the old engine leaves alone), `kept_record_not_stored` (a record an unlink_all keeps binds no single stored row, so its link could not be told from the others and could end; a record the write creates counts too when the unlink_all would end a stored link, which could be that record under another spelling), `kept_link_missing` (a record an unlink_all keeps has no link to the unlink_all's record, stored or in the write, so the record would be left with no link of the kind), `unlink_all_partial_fetch` (an unlink_all's record's links were read from a fetch cut short, so the links not read would stay), `rename_or_merge_rejected` (the write's second verification did not confirm every rename and merge of the pipeline's answer, so the engine's own detection decided it again from the start; a temporary safety net, until the pipeline binds the records its operations name itself; it goes together with `unmatched_key_only` and the end guard, which would otherwise send most such writes to the engine), `end_not_extracted` (a move's new end is neither a stored row of its type nor a record the write's extraction holds, by its key: a key the pipeline made up, such as a name or part of an id), `empty_answer_check_found_intent` (a temporary net: the answer holds no operation while Phase 0's gate, which read the deletion check the write ran, is open other than by its bulk-update or merge verdict alone; where the pipeline's gate closed beside a deletion or relink verdict, the write path first asks the operations step once more, and an answer its verifier confirms goes through the usual nets in the empty answer's place; `detail.sub` `after_translation` or `after_key_only_lookup_failed` when an answer holding no operation whose gate the bulk-update or merge verdict opened alone, or the answer that second look confirmed, then failed), `date_field` (an operation names a field in which the write's extraction resolved a date token, or dropped one that named no day, which the pipeline does not yet state as the extraction resolves it; a temporary safety net, until the pipeline resolves those dates too), `inside_value` (the answer holds an operation beside a value the text assigns to a record's field, a long one quoted verbatim or any one an operation's quote touches, which may narrate changes the caller did not ask for, or the check could not tell, so the engine's own detection decides the write; while the write's presence check left the gate closed and this node reads it closed too, the answer is read as holding no operation instead and used, its operations dropped, and `detail.sub` is `after_translation` or `after_key_only_lookup_failed` when such an answer then failed), or the step a run without an answer stopped at (`gate`, `operations`, `verification`, `executor`, `late`, `not_run`). A write of an instance that pins its write text to a provider is no fallback: its instance's own mode is `off`, so the step records one `intent_pipeline` item, `decision` `instance_mode`, with `detail.mode` `off` and `detail.sub` `pinned_provider`, and the engine's own steps record beside it as with the pipeline off. Beside `fallback`, `detail.sub` gives why as one code with no value, when one is known (for `unmatched_key_only` what the records were, `relation_end`, `not_an_end`, `partial_key` or `empty_answer`; a failed stage's exception type, a not-run reason, the drop kinds and reasons, the rejected kinds, whether `rename_or_merge` was decided before or after verification), `detail.dropped_operations` lists each operation the pipeline dropped (`position` in the model's reply, `operation` kind when readable, `reason`, and `part`, a code for what within the reason failed, when known), and `detail.unresolved_changes` each change it could not name the records of (`position`, `evidence`, the passage that asks for it, `object_type` when the model gave one, and `shape`, a code, when the model gave one). `dropped_operations` carries no field values; an `unresolved_changes` entry's `evidence` is a passage of the write's own text, as an `operation` item's `reason` is. `diff_engine.intent_rules` logs what the engine's rules did to the detection model's answer, in the order they acted, so an item can be dropped and later restored (a rename whose old record is stated by part of a composite key is an `identity_change` item `completed`, bound to the one stored row its stated part matches and named by that row's internal id, or `not_bound`, left as stated so the write goes as it would without the step: no stored row or several match, the one row disagrees with the new record, a stored row with a NULL or blank key part matches, the database could not be asked, a value is not one its field can hold, the new record is of another type than the rename's, no index serves a lookup by the stated part, another rename or a merge lands on the same new record, or something else in the write may name the row or the key, its kind in `detail.named_by`); `diff_engine.plan_construction` says what building the plan decided after every earlier step, which the plan shows only by leaving it out (a merge the relation-budget re-check refused or re-admitted after alias binding, a deletion a rename overrides, an unlink dropped for a row a confirmed delete does not run on or a lookalike row the write does not bind, a move whose old link stays with the replacement guard's cause, a dropped merge or one already a single row, what a scoped write left out). A deletion that verification rejected reads `kind: "deletion"`, `decision: "rejected"` under `diff_engine.intent_verification_deep`, with what the object became and why; the proposal itself is the detection model's reply in `llm_calls[]`. Another part of the system may record items of its own shape here; they are served as recorded. Every detail pane serves its operation's records the same way; the write, read and evolution panes serve them for an operation still running or stale too (create and update have no such pane). A step that refuses the write still records what it decided first: the detector its rules, resolution what it found, plan construction the merges, unlinks and scope it changed. A caller who is not a super admin gets neither `step_decisions` nor `step_decisions_truncated`, exactly as for `llm_calls[]`.
594
+ **Each `step_decisions[]` entry** is one record of what one step of the operation decided, oldest first (by `recorded_at`, then `sub_stage`). A step records each time it runs and decides something (a step that decided nothing records nothing), so one operation can hold several records of one step, and every record is served; none is merged into another. A write's deletion check records in its own process and again where the diff engine applies its gate, and a write retried whole under the same trace id (a stale-schema retry, a stall requeue, a stuck write claimed again) records every step again. Writes, reads and schema evolution record today. A write's extraction records too, under `extraction.` steps named like its model calls (`extraction.structured_output`, `extraction.description_merger`, `extraction.batch_field_extractor`, `extraction.field_verifier`, `extraction.relations_extractor`, `extraction.relations_verifier`, `extraction.phantom_record_check`, `extraction.deduplication`): what code decided about a reply (candidates folded into one, a reply set aside so the extracted values stand, connections dropped, a candidate left out of the write, a group of types split), and the verifiers' own rejections. The phantom record check records one `object` item per record whose key value a record of another type in the write carries (or, for a record with no key, whose stated values one states alike, with `detail.description`): `not_held` (the check found the text does not present the entity as that type, so the record is marked as one that does not hold), `kept`, `kept_unchecked` (the check did not decide, or the write had more such values than it checks), or `not_run` (the check did not run on the write; `detail.not_run_reason` is `switched_off` or `pinned_provider`), with the other types in `detail.shared_with`. Field verification records once per object type, when that type's field processing ends; a write that fails before then records none for that type. When the judge in front of field verification is configured but does not run on a write whose detection found something, the write records why, once, under the stage the judge's calls would journal under (`extraction.verification_judge`, or `shadow.extraction.verification_judge` in shadow mode): one item, `kind` `judge`, `decision` `not_run`, with `detail.not_run_reason` (`sampled_out`, `pinned_provider` or `config_unavailable`) and `detail.mode`. Extraction's items have the diff engine's shape: `kind` is `merge`, `object`, `relation`, `relation_type` or `type_group`; `decision` is `folded`, `skipped`, `not_held` (the verifier found the text does not state the object holds, so it is marked as one that does not), `kept_unverified`, `verifier_skipped` (field verification did not run because the judge in front of it cleared the object), `kept`, `kept_unchecked`, `key_restored`, `rejected`, `uncastable`, `dropped`, `split` or `escalation_disabled`; `detail` holds field names, candidate numbers and counts (`candidate_count`, `candidate_numbers`, `kept_number`, `ignored`, `basis`, `filled_fields`, `conflicting_fields`, `relations_repointed`, `fields`, `nulled`, `omitted`, `connection`, `field`, `candidates_per_link`, `relations`, `types`, `halves`, `refused_max_tokens`, `error_code`, `shared_with`), and no field's value except an object's key: in `key`, in a dropped relation's `links` (`Type(field='value')` per link), and a `description` for an object that has no key. `/extract` records its extraction the same way; it has no detail document of its own, so its records show only on a write's document when that write, on the same instance, reuses its trace id. A write's apply records what its merges did to the stored rows, under `write.merge_application`, once the write commits (a write that rolls back records none): one item per merge action, `kind` `merge`, named by the surviving row (the diff engine's `merge` items are named by the row merged away instead): its `object_type`, its `key` (absent for a type without a key, for a key with any part NULL or missing, which could name another row, and when the two rows were one) and its internal id, with `decision` `applied` and, in `detail`, the row merged away (by its internal id), `relations_repointed`, `relations_dropped` by reason (`linking_the_merged_rows`: a relation between the two merged rows; `removed_by_this_write`; `duplicate`: one the survivor already held) and `filled_fields`, the survivor's empty fields filled from the merged-away row, by name; or `decision` `nothing_to_merge` with why in `reason` (the two rows were one, or the row to merge away was already gone). Schema evolution records under `operation_kind` `evolution`: review, decide and apply each journal their steps' records once, when the stage ends, under their own trace, so an apply's show on its update document (its trace is the update id), and the detached pass that resolves an apply's gaps afterwards journals its own under the same trace. Its steps are the two model calls' names, `gap analyzer` (gaps never analysed or stored with no concepts, rows a reply left pending, concepts the parser dropped) and `semantic gate` (what the gate may do with each suggestion, candidates kept without a verdict, verdicts downgraded or not acted on), and the rule steps `evolution.backlog`, `evolution.resolution_filter`, `evolution.clustering`, `evolution.consolidation`, `evolution.prior_decisions`, `evolution.prerequisites`, `evolution.evidence_retirement` and `evolution.apply`; `kind` is `gap` (named by its feedback id in `key` and its concept's object and field), `suggestion` (its fingerprint in `key`, its change's names, and the gaps it was built from in `detail.gaps`, the first 20 with `gaps_total` when there are more), `cluster`, `decision`, `backlog`, `reply_entry`, `build` or `gate`, and no item carries what a user wrote. What a transaction did (a gap resolved, stored with no concepts, deleted or retired) is recorded only once it commits, and a row only when that step's own write or delete reached it. A build retried on a stale schema records both attempts: once the build runs again, every item the stage notes until it ends, the build's and the stage's own after it, carries `detail.attempt` (`2`), so an item without `attempt` was noted before the build ran again, and a `retried` item under `evolution.consolidation` records that it did; an `omitted` item is a marker, not a decision, and carries no `attempt`. A read records what the reader's own rules decided, under the name of the model call whose reply a decision is about (`read.question_decomposer`, `read.sql_syntax_fixer`, `read.empty_result_reviewer`, `read.overfetch_reviewer`, `read.answer_formatter`) or under a rule step (`read.scope`, `read.vector_grounding`, `read.sql_rewrites`, `read.sql_guard`, `read.sql_retries`, `read.answer`, and `read.other` for a family no step claims yet); a decision about a SQL statement a model call wrote goes under `read.sql_rewrites`, with the calling step in `detail.phase` where the rule names it. A read step that decided more than 101 times keeps its first and last 50 decisions, with one item (`decision` `omitted`, `detail.count`) where the rest were left out, cut further from the middle when they do not fit one record. A read journals its records once, when it ends, so a read still running has none yet, and a read retried on a stale schema runs again under the same trace id and records every step again; its items have `kind` (the decision family, such as `sql_guard_refused` or `distinct_order_by_case_dropped`), `decision` (`applied` or `not_applied`), `reason` where the rule says why, and `detail.part`, the part of a decomposed question the decision was made for, counted from 1, where it was made for one. `sub_stage` names the step in the `llm_calls[].sub_stage` vocabulary, so a step's decisions and its model calls join on it (a re-issued call journals under its step's name with a suffix such as `.refusal_fallback`, so it joins on the name as a prefix; the reader's rule steps, `extraction.deduplication` and `write.merge_application` have no model calls of their own) (`diff_engine.keyless_binding`, `diff_engine.deletion_check`, `diff_engine.intent_rules`, `diff_engine.value_span_containment`, `diff_engine.intent_verification_deep`, `diff_engine.alias_confirmation`, `diff_engine.object_resolution`, `diff_engine.unwritten_identity_verification`, `diff_engine.plan_construction`, the intent pipeline's `diff_engine.intent_gate`, `diff_engine.intent_operations`, `diff_engine.operations_repair` and `diff_engine.operations_verification`, Phase 1's `diff_engine.operations_second_opinion`, and the `read.` steps above). A model call made in shadow mode, beside the work it never changes and never charged, carries the prefix `shadow.` on its step's name; the intent pipeline and the verifiers' two judges are the steps that run in shadow today. The field verifier's judge, which can stand in front of `extraction.field_verifier` on a DEEP write or `/extract`, makes its calls under `extraction.verification_judge`, or `shadow.extraction.verification_judge` in shadow mode, and records under that same stage, once per object type, one item per object it was asked about: `kind` `object`, `decision` `flagged` (a field at or over its threshold, or one no question covered), `cleared` or `not_judged` (no verdict, which counts as every field flagged), with `detail.field_scores` (the flagged fields the judge scored, and their scores), `detail.unjudged_fields` (flagged fields no question covered), `detail.score`, `detail.field` and `detail.question` (the top score and where it came from), `detail.threshold`, `detail.questions_asked` and `detail.verifier` (`ran`, `ran on the flagged fields and the key`, or `skipped`). In on mode the verifier is asked only about the flagged fields and the key; in shadow mode it sees every field, and the item says what on mode would have sent it. A `verifier_skipped` item under `extraction.field_verifier` is an object an `extraction.verification_judge` call of the same operation cleared; every question and answer is in that call in `llm_calls[]`. The relation verifier's judge, which can stand in front of `extraction.relations_verifier` on DEEP writes and DEEP `/extract` calls, names its calls `extraction.relation_verification_judge`, or `shadow.extraction.relation_verification_judge` in shadow mode, and records under that same stage one verdict item per verifier call: `kind` `relation_type`, `decision` `flagged` (a proposed connection at or over its threshold), `cleared` or `not_judged` (no verdict, or two proposed connections sharing a unique key's values, which counts as flagged), with `detail.connection_scores` (the flagged connections' positions in the proposed list, counted from 1, and their scores), `detail.score` and `detail.top_connection` (the top score and its position), `detail.connections` (how many were proposed), `detail.threshold`, `detail.questions_asked` and `detail.verifier` (`ran`, or `skipped` when on mode kept the call's connections as proposed). A call on mode kept as proposed also records there any connection code dropped while building it (`kind` `relation`, `decision` `dropped`). A write it does not run on records one `kind` `judge`, `decision` `not_run` item under its stage, as the field verifier's judge does. The intent pipeline names its model calls by its step names above, with the prefix `shadow.` in shadow mode (`diff_engine.operations_repair` the operations step asked once more about the entries its checks dropped); `diff_engine.intent_operations` records what the write did with the answer in on mode only, where it stands in for `diff_engine.intent_rules`, and in either mode (with the prefix in shadow mode), once the run has finished, one item when the operations call ran out of its output budget and was asked once more: `kind` `intent_operations`, `decision` `retry_answered` or `retry_failed`, and `detail.model`, `detail.error` (the first call's code) and, on `retry_failed`, `detail.failure` (the type of the error the step then failed with); a run the write's grace cancelled with the retry in flight, or one whose gate closed or failed, records none, and the retried call is the step's `llm_calls[]` entry whose `reissue_reason` is `provider_output_token_limit_exceeded`. `diff_engine.operations_repair` (with the prefix in shadow mode) records one item, once the run has finished, when the operations step asked its model once more about the entries its checks dropped: `kind` `intent_operations`, `decision` `repaired` (the second reply stood), `repair_rejected` (it was not the first reply with those entries fixed, so the first stood with its drops) or `repair_failed` (the repair met an error, so the first reply stood with its drops), and `detail.model` (the model the repair asked last: the one that gave the first reply, or its fallback after an outage) and, on `repair_failed`, `detail.failure` (the type of the error it met); a run whose gate closed records none, and so does a reply over the cap, which is never repaired: the write falls back to the engine. `diff_engine.intent_gate` (with the prefix in shadow mode) records one item when the gate's deadline, the write's grace, opened it: `kind` `intent_gate`, `decision` `opened_by_deadline`, and `detail.deadline_seconds`, `detail.unanswered_calls` (the gate calls cut off) and `detail.sentence_count`. A step whose decisions act on another step's calls names itself the same way: `diff_engine.intent_rules` acts on the replies under `diff_engine.object_and_relations_deletion_detection` and `diff_engine.batch_field_erasure_detection`. The records hold what the engine decided that the operation's `llm_calls[]` (their prompts and replies) and its `diff_plan` do not already show, so the model's own answers are read in `llm_calls[]`, not here. `decision_count` is the step's true total and `decisions_truncated` marks a record cut to fit (for a read step, also one cut to its first and last 50 decisions), so `decisions` can hold fewer items than the count. `decisions` is the items as the step recorded them, a JSON array, or `null` when the stored text is not one (the count still shows). A pane serves at most 500 records and 4 MiB of `decisions` text, the newest; when it cut older ones it adds `step_decisions_truncated: true` beside the array, and otherwise the key is absent. A trace id a client reuses across writes serves every write's records together, ordered by time with nothing between the writes. The diff engine's items share one shape: `kind` (what the item is: `intent_gate`, `intent_operations`, `intent_verification`, `object`, `identity_change`, `merge`, `filtered_deletion`, `filtered_update`, `relation`, `deletion`, `alias`, `relabel`, `scope`, `detection`, `operation`, `intent_pipeline`, `second_opinion`) and `decision` (what was decided: `deletion_dropped`, `converted`, `rejected`, `kept`, `bound`, `not_bound`, `matched`, `left_out`, …), then, where set, `object_type` and `key` (the primary-key values as `field='value'`), `index` (the object's position in the diff engine's sorted object list, not in `extracted_objects[]`), internal id (the stored row), `reason`, and `detail` (anything else the step decided). `diff_engine.keyless_binding` records one `object` item per record of a keyed type that states no key but another field: `bound` to the one stored row it names (its `key` and internal id), or `not_bound` with why in `detail.outcome` (a record one stored row matches in every field it states carries that row's `key` and internal id when it is left `not_identifying`, matching only in yes/no and listed-value fields and never put to the verifier, or `rejected` or `unverified`, the verifier not confirming the text refers to it); `same_key_group` (the write holds records of different types with the same key, so nothing of it is looked up), `key_stated_for_another_type` (a record of another type in the write states the key of the row it would bind to), `key_of_another_type` (a stored row of another type has that key) and `key_check_unread` (the stored rows could not be read, or the key has more fields than the check looks up) are a temporary net against extraction copying a record's identifier onto another type; a binding left unbound for one of the last three carries the row it would have bound to (its `key` and internal id; a record not asked about its closest rows for them lists those rows in `detail.other_type_rows` instead), and the other types in `detail.other_types`: for `key_stated_for_another_type` and `key_of_another_type`, and for a record set aside unasked as `key_check_unread` whose rows stand down for different reasons, the types its rows' keys were found under. The same-key groups and the stated-key check go once extraction no longer returns such copies; the stored-key check goes only once the copies earlier writes stored are cleaned up too, or a scan finds none. A stored copy whose key differs only in case, surrounding spaces or accents is not found. In on mode, Phase 1's `record_where` lookup may also ask the verifier under `diff_engine.keyless_binding` (on a model that runs that check, when one stored row matches and the answer would be used once it is confirmed), about a rename's or a merge's record the text names by its fields whose extracted record carries the operation's new key, and records no item of its own: what came of it shows under `diff_engine.intent_operations`, where a bound rename is named by the stored row's key, or as `record_where_unbound` with `detail.sub` `stated_key`, or as the fallback a bound answer met later (such as `rename_old_key_unmatched`, or `rename_or_merge_rejected` when Phase 1.5 did not confirm every rename and merge of the answer); under `intent_pipeline_failures: refuse` a bound answer whose translation fails, or whose key-only lookup could not run, still goes to the engine as `record_where_unbound`, as before the lookup, and a failure of the verified relabel's own work as `relabel_failed`. `diff_engine.operations_second_opinion` records one item, `kind` `second_opinion`, on an on-mode write that the moves the verifier rejected would send to the engine, when the verification fallback is asked about them again: `decision` `confirmed` (they took the path a confirmed move takes; `diff_engine.intent_operations` says whether each was applied), `confirmed_beside_a_rejection` (another move still sent the write to the engine), `rejected`, `no_answer`, `not_asked` (its model gave the rejection) or `not_asked_model_unknown` (the write's result does not say which model rejected them), with `detail.model`, `detail.asked`, `detail.confirmed` and, when no verdict came, `detail.unanswered`; the call it made is that step's `llm_calls[]` entry. In on mode `diff_engine.intent_operations` says what the write did with the intent pipeline's answer: an `operation` item per operation it applied, its `decision` the operation's kind (`delete`, `unlink`, `unlink_all`, `move`, `clear`, `rename`, `merge`, `bulk_delete`, `bulk_update`) and its `reason` the passage that asks for it, then `not_applied` for one the write could not carry out (a delete of a record by the new name a rename of the same write gives it reads "it is also the target of a rename", as the engine's own rule says it, and a move with no end it leaves that the verifier confirmed, the old engine's gate closed, reads "the write's text read no removal or relink, so the stored link stays beside the one the write states") and `dropped` for one the pipeline dropped, each with why and `detail.position` (its place in the model's reply), then an `object` item `skip` for each record of a keyed type that states no key and that the write skipped, and `erase_refused` for each record bound to a stored row by its other fields whose clears were not applied (`detail.fields`); a `clear` item therefore names what the pipeline asked for, not what was written. When the engine's own detection decides the write instead, the step records one `intent_pipeline` item, `decision` `engine_decides`, whose `detail.fallback` names why (its `reason` says it in words) and beside which the engine's own steps record as with the pipeline off: `missing` (no result reached the write), `unreadable`, `translation` (the rows the operations name could not be read), `dropped` (the pipeline dropped an operation it proposed for a reason other than its verifier's rejection, so its answer is not the whole change; every drop of an answer that keeps nothing reads as no change when the write's presence check left the gate closed; `detail.sub` `gate_open` when this node read that gate open, `after_translation` or `after_key_only_lookup_failed` when such an answer then failed), `verifier_rejected` (a temporary net: the pipeline's verifier rejected a delete, a clear, an unlink, an unlink_all or a move it proposed, which may be about how the operation names its records rather than the change; a rejected bulk delete or update does not count, and a rename it rejects, or a merge while `execution.entity_merge` is on, goes to the engine as `rename_or_merge`; a move naming no end it leaves goes to the engine with `detail.sub` `move_fetch_cut_short` or `move_link_not_extracted` where that applies, and is otherwise left to the write's verification, which decides the stored link it would end; rejections of deletes, clears and moves that are the whole answer read as no change when the write's presence check left the gate closed, and otherwise as `verifier_rejected`, `detail.sub` `gate_open` when this node's own reading of that gate is open, or `after_translation` or `after_key_only_lookup_failed` when that step failed on such an answer), `record_where_unbound` (it names a record by the field values the text states, a key stated in part among them, and once verified, binding it through the write's own extraction found no single record for it; a writer that predates the binding decided it before the pipeline's verifier was asked; `detail.sub` `after_translation` or `after_key_only_lookup_failed` when a rename or merge the stored-row lookup bound then failed, whatever Phase 0's gate), `unresolved` (it saw a change whose records it could not name: a record described rather than named, records selected through a relation, some but not all links of a kind, or all of them handed over to another record; every one of them ending, but those the text keeps, is an `unlink_all`; `detail.sub` `after_translation` or `after_key_only_lookup_failed` when an answer of such changes alone, none naming a type, read as holding no operation while the write's presence check left the gate closed, then failed), `rename_or_merge` (it holds a rename or an unlink_all sharing a record with a merge, renames that swap, cycle, fork or converge, or an unlink_all whose record another operation names in its relation, decided before the pipeline's verifier is asked, or the verifier rejected a rename, or a merge while merges are on), `rename_old_key_unmatched` (it renames a record that no single stored record has by the name the text gives), `merge_loser_unmatched` (it merges away a record that no single stored record has by the name the text gives), `rename_onto_stored` (it renames a record onto a name another stored record already has), `rename_record_partly_stated` (the write states a record without the rest of a key a rename names, so whether it is that rename's old record, its new record or another one is unknown), `clear_in_question` (the text holds a question mark and Phase 1.5 did not confirm a clear the answer holds, `detail.sub` `rejected_in_phase_1_5`), `unlink_in_question`, `move_in_question`, `repoint_in_question` (temporary nets: while the text holds a question mark, it unlinks records of a relation type the extraction holds a relation of, or moves a relation, or, whatever it holds, the extraction holds a relation of a type keyed on some of its ends but not all, which written re-points the stored link those ends share, as with the pipeline off; Phase 1.5 cannot verify or take back any of these; `repoint_in_question`'s `detail.sub` is `after_translation` or `after_key_only_lookup_failed` when a question text's answer that stood while the write's presence check left the gate closed then failed), `delete_with_values` (it deletes a record the write's own extraction gives values other than its fields' defaults), `unlink_replaced` (it unlinks records while the write's own extraction holds another record the link may have moved to, which no new link joins to the unlink's other ends and no other operation ends or removes; `detail.sub` `after_translation` or `after_key_only_lookup_failed` when such an answer, read as holding no operation while the write's presence check left the gate closed, then failed), `unlink_all_with_links` (it ends every link of a kind that a record has, while the write's own extraction links that record by that kind to a record it does not keep, or holds another record of its type that nothing accounts for, as a transfer the answer misread would), `unlink_all_names_an_end` (the extraction holds a record of the kind an unlink_all ends that it does not keep, as when the text names the one link it ends, or the unlink_all keeps a record at only some of the roles its type takes), `key_rewritten` (an operation's key was read as the extraction's spelling), `unmatched_key_only` (the gate opened, while the extraction holds a record by its key alone that the answer would write and no stored row has; a delete's record, a rename's old and new records, a merge's survivor, a move's new end and a record an unlink_all keeps are not looked up; `detail.sub` `after_translation` when relation ends it was going there for, bound to their stored twins instead, then failed, whatever Phase 0's gate, or when an answer holding no operation it let stand beside such records, while the write's presence check left the gate closed, then failed), `key_only_lookup_failed` (the same, but whether those records are stored could not be read), `end_not_stored` (an unlink's end, an unlink_all's own record, or a move's old or kept end, binds no single stored row: none has its key, or several do, so the stored link would stay; a write whose every operation is so, with the old engine's gate closed as the presence check's verdicts stored beside the answer read it, does not fall back: it stores what was extracted and reports each as a `rejected` relationship outcome; `detail.sub` `gate_open` when the stored verdicts read that gate closed and this node read it open, `twin_bound` when a twin binding rewrote the extraction, so written alone a record would land on a stored row the old engine leaves alone), `kept_record_not_stored` (a record an unlink_all keeps binds no single stored row, so its link could not be told from the others and could end; a record the write creates counts too when the unlink_all would end a stored link, which could be that record under another spelling), `kept_link_missing` (a record an unlink_all keeps has no link to the unlink_all's record, stored or in the write, so the record would be left with no link of the kind), `unlink_all_partial_fetch` (an unlink_all's record's links were read from a fetch cut short, so the links not read would stay), `rename_or_merge_rejected` (the write's second verification did not confirm every rename and merge of the pipeline's answer, so the engine's own detection decided it again from the start; a temporary safety net, until the pipeline binds the records its operations name itself; it goes together with `unmatched_key_only` and the end guard, which would otherwise send most such writes to the engine), `end_not_extracted` (a move's new end is neither a stored row of its type nor a record the write's extraction holds, by its key: a key the pipeline made up, such as a name or part of an id), `empty_answer_check_found_intent` (a temporary net: the answer holds no operation while Phase 0's gate, which read the deletion check the write ran, is open other than by its bulk-update or merge verdict alone; where the pipeline's gate closed beside a deletion or relink verdict, the write path first asks the operations step once more, and an answer its verifier confirms goes through the usual nets in the empty answer's place; `detail.sub` `after_translation` or `after_key_only_lookup_failed` when an answer holding no operation whose gate the bulk-update or merge verdict opened alone, or the answer that second look confirmed, then failed), `date_field` (an operation names a field in which the write's extraction resolved a date token, or dropped one that named no day, which the pipeline does not yet state as the extraction resolves it; a temporary safety net, until the pipeline resolves those dates too), `inside_value` (the answer holds an operation beside a value the text assigns to a record's field, a long one quoted verbatim or any one an operation's quote touches, which may narrate changes the caller did not ask for, or the check could not tell, so the engine's own detection decides the write; while the write's presence check left the gate closed and this node reads it closed too, the answer is read as holding no operation instead and used, its operations dropped, and `detail.sub` is `after_translation` or `after_key_only_lookup_failed` when such an answer then failed), or the step a run without an answer stopped at (`gate`, `operations`, `verification`, `executor`, `late`, `not_run`). A write of an instance that pins its write text to a provider is no fallback: its instance's own mode is `off`, so the step records one `intent_pipeline` item, `decision` `instance_mode`, with `detail.mode` `off` and `detail.sub` `pinned_provider`, and the engine's own steps record beside it as with the pipeline off. Beside `fallback`, `detail.sub` gives why as one code with no value, when one is known (for `unmatched_key_only` what the records were, `relation_end`, `not_an_end`, `partial_key` or `empty_answer`; a failed stage's exception type, a not-run reason, the drop kinds and reasons, the rejected kinds, whether `rename_or_merge` was decided before or after verification), `detail.dropped_operations` lists each operation the pipeline dropped (`position` in the model's reply, `operation` kind when readable, `reason`, and `part`, a code for what within the reason failed, when known), and `detail.unresolved_changes` each change it could not name the records of (`position`, `evidence`, the passage that asks for it, `object_type` when the model gave one, and `shape`, a code, when the model gave one). `dropped_operations` carries no field values; an `unresolved_changes` entry's `evidence` is a passage of the write's own text, as an `operation` item's `reason` is. `diff_engine.intent_rules` logs what the engine's rules did to the detection model's answer, in the order they acted, so an item can be dropped and later restored (a rename whose old record is stated by part of a composite key is an `identity_change` item `completed`, bound to the one stored row its stated part matches and named by that row's internal id, or `not_bound`, left as stated so the write goes as it would without the step: no stored row or several match, the one row disagrees with the new record, a stored row with a NULL or blank key part matches, the database could not be asked, a value is not one its field can hold, the new record is of another type than the rename's, no index serves a lookup by the stated part, another rename or a merge lands on the same new record, or something else in the write may name the row or the key, its kind in `detail.named_by`); `diff_engine.plan_construction` says what building the plan decided after every earlier step, which the plan shows only by leaving it out (a merge the relation-budget re-check refused or re-admitted after alias binding, a deletion a rename overrides, an unlink dropped for a row a confirmed delete does not run on or a lookalike row the write does not bind, a move whose old link stays with the replacement guard's cause, a dropped merge or one already a single row, what a scoped write left out). A deletion that verification rejected reads `kind: "deletion"`, `decision: "rejected"` under `diff_engine.intent_verification_deep`, with what the object became and why; the proposal itself is the detection model's reply in `llm_calls[]`. Another part of the system may record items of its own shape here; they are served as recorded. Every detail pane serves its operation's records the same way; the write, read and evolution panes serve them for an operation still running or stale too (create and update have no such pane). A step that refuses the write still records what it decided first: the detector its rules, resolution what it found, plan construction the merges, unlinks and scope it changed. A caller who is not privileged gets neither `step_decisions` nor `step_decisions_truncated`, exactly as for `llm_calls[]`.
595
595
 
596
- **A scoped key gets `[]` for `ddl_queries` / `schema_generation`, not the rows.** Those two come from records that carry no instance ownership — the schema generation's trace id is even client-supplied — so they cannot be scoped to an instance and are served only to callers with no instance restriction at all. This is a deliberate fail-closed choice, not a bug to work around: an empty array means "not available to this credential", never "this operation ran none". `llm_calls[]` behaves the same way (gated on super admin) and always has. `sql_queries` is split: statements recorded with their owning instance reach every caller who may open the read, even when another instance reused the trace id, while statements recorded before ownership was tracked carry no owner and reach unrestricted callers only. A scoped key therefore sees `[]` for reads that old. To let a script tell the two apart, the Console sets a sibling boolean next to each — `sql_queries_withheld`, `ddl_queries_withheld`, `schema_generation_withheld` — that is `true` exactly when a row that exists was withheld from this caller: for `ddl_queries` / `schema_generation` that is every scoped caller, for `sql_queries` a scoped caller on a read that has ownerless rows. So `[]` with `…_withheld: false` is "none recorded", `[]` with `…_withheld: true` is "not yours to see". **Internal ids are hidden for every non-super-admin**, including on writes that carry no identity map — the substitution is done by the Console, server-side, so a caller with no browser sees `(record)` rather than a raw id.
596
+ **A scoped key gets `[]` for `ddl_queries` / `schema_generation`, not the rows.** Those two come from records that carry no instance ownership — the schema generation's trace id is even client-supplied — so they cannot be scoped to an instance and are served only to callers with no instance restriction at all. This is a deliberate fail-closed choice, not a bug to work around: an empty array means "not available to this credential", never "this operation ran none". `llm_calls[]` behaves the same way (gated the same way) and always has. `sql_queries` is split: statements recorded with their owning instance reach every caller who may open the read, even when another instance reused the trace id, while statements recorded before ownership was tracked carry no owner and reach unrestricted callers only. A scoped key therefore sees `[]` for reads that old. To let a script tell the two apart, the Console sets a sibling boolean next to each — `sql_queries_withheld`, `ddl_queries_withheld`, `schema_generation_withheld` — that is `true` exactly when a row that exists was withheld from this caller: for `ddl_queries` / `schema_generation` that is every scoped caller, for `sql_queries` a scoped caller on a read that has ownerless rows. So `[]` with `…_withheld: false` is "none recorded", `[]` with `…_withheld: true` is "not yours to see". **Internal ids are hidden from every caller but a privileged one**, including on writes that carry no identity map — the substitution is done by the Console, server-side, so a caller with no browser sees `(record)` rather than a raw id.
597
597
 
598
- **A caller who is not a super admin gets no internal ids.** In a read, `sql_queries[].sql_query` reads as ordinary SQL (an internal id column as `id`, id values as `?`), `read_query` and `error_message` follow the same wording, and a Console table read's `read_input` and `result` lose those columns too. A read's `result` and each `results[]` entry lose a column named for an internal id, and a `<role>_id` link column only on a read logged before 2026-10-01; an answer that named a record by id reads `(record)`. In a structured write, `text` and a journaled response name a row by its identity, or `(record)`. In a list, a structured write's preview, a write's `object_names` and a search match in a field that can hold ids follow the same rules. A write's `written_object_fields`, an operation row's `field_names` and a search's field match leave out a path through an internal id, which a write records when it names a row by one. In `sql_queries[]`, a statement that uses no id or link column keeps a user's own UUID, unless it sits alone in a `<role>_id` column; in one that does, only a value joined to other text, such as `txn-<uuid>`, stays. A write's document names no such field either, and a row nothing recorded a name for reads `(record)`: `identity_changes[].matched_id`, and inside `diff_plan`, `target_id`, `loser_id` and `linked_ids`. A super admin gets all of these as recorded.
598
+ **A caller who is not privileged gets no internal ids.** In a read, `sql_queries[].sql_query` reads as ordinary SQL (an internal id column as `id`, id values as `?`), `read_query` and `error_message` follow the same wording, and a Console table read's `read_input` and `result` lose those columns too. A read's `result` and each `results[]` entry lose a column named for an internal id, and a `<role>_id` link column only on a read logged before 2026-10-01; an answer that named a record by id reads `(record)`. In a structured write, `text` and a journaled response name a row by its identity, or `(record)`. In a list, a structured write's preview and a search match in a field that can hold ids follow the same rules. A write's `written_object_fields`, an operation row's `field_names` and a search's field match leave out a path through an internal id, which a write records when it names a row by one. In `sql_queries[]`, a statement that uses no id or link column keeps a user's own UUID, unless it sits alone in a `<role>_id` column; in one that does, only a value joined to other text, such as `txn-<uuid>`, stays. A write's document names no such field either, and a row nothing recorded a name for reads `(record)`: `identity_changes[].matched_id`, and inside `diff_plan`, `target_id`, `loser_id` and `linked_ids`. A privileged caller gets all of these as recorded.
599
599
 
600
600
  **Who sees what — the Console decides; `auth status` tells you which view to expect.**
601
601
 
602
602
  - A regular key sees the operations of the instances the accounts API lists for it — the same set `org list instances` prints. That is at most what its owner sees in the Console, never more.
603
603
  - Access requires the key's role to carry **`data.read`** — the same permission the data-read endpoint requires. A role deliberately scoped away from data (`auth status` shows the codes under `permissions`) is refused with **403 → exit 3, stage `permission`**, whoever owns the key — a permission denial, not a bad credential: rotating or re-issuing the key cannot fix a role that was scoped this way on purpose. An unknown or missing key is the separate 401 → exit 4 (`auth`).
604
- - A key explicitly granted `platform.super_admin` sees platform traces, subject to live parent-key ceilings. An administrator-owned key without that grant remains scoped. Accounts `/whoami` reports `has_super_admin_permission`; Console never substitutes owner or minter privileges.
604
+ - A key explicitly granted wider access sees every trace, subject to live parent-key ceilings. A key without that grant stays scoped, whoever owns it; Console never substitutes owner or minter privileges.
605
605
  - When the Console **cannot** work out that scope — its accounts API is unreachable, answers non-2xx, is undecodable, or is not configured — it answers **503** with `{"error": "instance_scope_unresolved", "reason": "accounts_…"}` (or `accounts_unavailable` when the key's own lookup failed the same way) instead of an empty document. The CLI reports that as **exit 3, stage `unavailable`**, with a message that says the scope could not be resolved and that this is *not* "no operations": a zero-row answer from a Console that could not decide would have read as a quiet instance.
606
- - No new permission is involved: the Console answers a key as it would answer its owner's browser session, narrowed to the key's instances, and grants platform access only to an explicit `platform.super_admin` key with a live privileged parent chain. It never mints a session for a key. Filters that need to look other users up (`User:`-style email filters) are not offered: an API key can identify only itself, never list or look up users — filter by `--user-id`.
606
+ - No new permission is involved: the Console answers a key as it would answer its owner's browser session, narrowed to the key's instances, and grants wider access only to a key explicitly granted it, with a live privileged parent chain. It never mints a session for a key. Filters that need to look other users up (`User:`-style email filters) are not offered: an API key can identify only itself, never list or look up users — filter by `--user-id`.
607
607
 
608
608
  **The Console origin.** `trace …` talk to the Console, a second origin. It is `--console-url` → `$XMEM_CONSOLE_URL` → inferred: `https://console.xmemory.ai` for the default API, the `/console` sibling of a `/xmem` base, a pair in your `~/.xmemcli.json`, `:8002` for a local `:8000`. A key bound to any other API origin gets a usage error (exit **2**) rather than a guess — the credential-binding rule holds across origins.
609
609
 
@@ -615,9 +615,9 @@ A value the call did not record is `null`, and `reissued_as_llm_call_ids` and `g
615
615
 
616
616
  | Command | Description |
617
617
  |---------|-------------|
618
- | **`auth login`** | PKCE via Console `/xmemcli/<challenge>` → `.xmemrc.json`. `--auto-approve` (1.7.4+: the same page opened with `?auto_approve=1&host=<hostname>`; once the browser holds a Console session the Console hands the CLI a code with no click, and a key named `CLI auto-approved login (<hostname>, <timestamp>)` is minted when the CLI redeems it at `/cli/token`, once per login; refused beside `--email`; the payload carries `auto_approve: true`), `--no-browser`, `--timeout`, `--console-url`, `--callback-port` (pins the loopback callback port for `ssh -L`; `0` or omitted means any free port, otherwise 1024–65535; also `$XMEM_CALLBACK_PORT`, which is read globally). An explicitly named Console (`--console-url`, `$XMEM_CONSOLE_URL`, or the one pinned by a single-origin URL) is cross-checked against the API origin before the browser opens or a pasted key is sent anywhere — a provably mismatched pair (mixed loopback-ness, or a production half paired with a non-production one; a single-origin `/console` beside its own `/xmem` on one origin is one deployment, while the production halves are still held to their defaults) is a usage error (exit **2**), on the interactive paste path as much as on the browser path. When the API comes from the rc: an origin that is neither https nor loopback (`localhost`, `127.0.0.1`, `[::1]`) is refused (naming a bare origin with `--api-url` beside an https `--console-url` accepts it), and if that API names its own Console (a `/xmem` base its `/console`, a local `:8000` its `:8002`), a named Console must be that one, in any spelling of that origin (case, a default port, trailing dots on a named host, `localhost` / `127.0.0.1` / `[::1]` for a loopback one) but on the same mount — any other is refused (exit **2**), so a `$XMEM_CONSOLE_URL` exported for one deployment cannot mint a key into the rc of a deployment whose Console is known. Naming the API on the call makes the pair the caller's: `--api-url` with the Console in `--console-url`, or `$XMEM_API_URL` with it in `--console-url` or `$XMEM_CONSOLE_URL`. With no `--api-url`, `$XMEM_API_URL` or positional URL, the API origin is the `api_url` of the nearest `.xmemrc.json` (see the 1.7.1 note below), and both the browser and the `--email` path print that origin and the file it came from before anything is sent — except for the production default, where nothing is printed. With `--email ADDR` (+ optional `--org-name`, used only when a new account is created; requires `--email`): headless email sign-in — one emailed approval, then the CLI mints its own org-wide key named `CLI email login (<hostname>, <timestamp>)`; details in the auth-flow reference. New-organisation creation additionally requires the deployment to allow public registration. Payload shapes: a fresh email mint carries `method: email`, `key_name`, `api_role`, and `org_created`; the browser path carries `method: pkce` (no role/org fields); a matching `--api-key` or rc credential short-circuits to `status: already_authorized` with `source`: flag / rc (`persisted: false` on the flag arm, which saves nothing); a matching `$XMEM_API_KEY` is copied into the rc and reports `status: authorized`, `source: environment`. Exit codes follow the standard HTTP contract (401 → 4 with stage `auth`, 403 → 3 with stage `permission`, other HTTP/network/server-state failures → 3). |
618
+ | **`auth login`** | PKCE via Console `/xmemcli/<challenge>` → `.xmemrc.json`. `--auto-approve` (1.7.4+: the same page opened with `?auto_approve=1&host=<hostname>`; once the browser holds a Console session the Console hands the CLI a code with no click, and a key named `CLI auto-approved login (<hostname>, <timestamp>)` is minted when the CLI redeems it at `/cli/token`, once per login; refused beside `--email`; the payload carries `auto_approve: true`), `--no-browser`, `--timeout`, `--console-url`, `--callback-port` (pins the loopback callback port for `ssh -L`; `0` or omitted means any free port, otherwise 1024–65535; also `$XMEM_CALLBACK_PORT`, which is read globally). An explicitly named Console (`--console-url`, `$XMEM_CONSOLE_URL`, or the one pinned by a single-origin URL) is cross-checked against the API origin before the browser opens or a pasted key is sent anywhere — a provably mismatched pair (mixed loopback-ness, or a production half paired with a non-production one; a single-origin `/console` beside its own `/xmem` on one origin is one deployment, while the production halves are still held to their defaults) is a usage error (exit **2**), on the interactive paste path as much as on the browser path. When the API comes from the rc: an origin that is neither https nor loopback (`localhost`, `127.0.0.1`, `[::1]`) is refused (naming a bare origin with `--api-url` beside an https `--console-url` accepts it), and if that API names its own Console (a `/xmem` base its `/console`, a local `:8000` its `:8002`), a named Console must be that one, in any spelling of that origin (case, a default port, trailing dots on a named host, `localhost` / `127.0.0.1` / `[::1]` for a loopback one) but on the same mount — any other is refused (exit **2**), so a `$XMEM_CONSOLE_URL` exported for one deployment cannot mint a key into the rc of a deployment whose Console is known. Naming the API on the call makes the pair the caller's: `--api-url` with the Console in `--console-url`, or `$XMEM_API_URL` with it in `--console-url` or `$XMEM_CONSOLE_URL`. With no `--api-url`, `$XMEM_API_URL` or positional URL, the API origin is the `api_url` of the nearest `.xmemrc.json` (see the 1.7.1 note below), and both the browser and the `--email` path print that origin and the file it came from before anything is sent — except for the production default, where nothing is printed. With `--email ADDR` (+ optional `--org-name`, used only when a new account is created; requires `--email`): headless email sign-in — one emailed approval, then the CLI mints its own key with the organisation's default API role, named `CLI email login (<hostname>, <timestamp>)`; details in the auth-flow reference. New-organisation creation additionally requires the deployment to allow public registration. Payload shapes: a fresh email mint carries `method: email`, `key_name`, `api_role`, and `org_created`; the browser path carries `method: pkce` (no role/org fields); a matching `--api-key` or rc credential short-circuits to `status: already_authorized` with `source`: flag / rc (`persisted: false` on the flag arm, which saves nothing); a matching `$XMEM_API_KEY` is copied into the rc and reports `status: authorized`, `source: environment`. Exit codes follow the standard HTTP contract (401 → 4 with stage `auth`, 403 → 3 with stage `permission`, other HTTP/network/server-state failures → 3). |
619
619
  | **`auth logout`** | Remove active `.xmemrc.json` |
620
- | **`auth status`** | Call `/whoami`. No key → exit 0; bad key → auth error; good key → email + prefix + `super_admin` (whether the key has an explicit `platform.super_admin` grant and its parent chain remains privileged and live — what decides which Console view `trace …` return) + `permissions` (the key's own capability codes; `trace …` requires `data.read` among them) + `user_may_mint_keys` (the legacy-named mint-capability diagnostic: on older servers this describes the owner; current servers report the issuing key’s own `api_key.create` authority, including parent restrictions; `null` when the server predates the field, which means unknown, not no). A Console named in `$XMEM_CONSOLE_URL` is cross-checked against the API origin before the key is sent to it (see the 1.7.1 note below); a mismatched one exits **2**. |
620
+ | **`auth status`** | Call `/whoami`. No key → exit 0; bad key → auth error; good key → email + prefix + `permissions` (the key's own capability codes; `trace …` requires `data.read` among them) + `user_may_mint_keys` (the legacy-named mint-capability diagnostic: on older servers this describes the owner; current servers report the issuing key’s own `api_key.create` authority, including parent restrictions; `null` when the server predates the field, which means unknown, not no). A Console named in `$XMEM_CONSOLE_URL` is cross-checked against the API origin before the key is sent to it (see the 1.7.1 note below); a mismatched one exits **2**. |
621
621
  | **`mcp <instance-id>`** | Serve one instance to an MCP client over stdio, using this CLI's credential. Not for humans — see below. |
622
622
  | **`version`** | CLI release version (no network) |
623
623
  | **`status`** | Local health: version + whether `.xmemrc.json` exists, and the `mcp_url` it declares when it declares one (no network) |
@@ -758,13 +758,15 @@ Some commands attach a more specific `stage` (`validate`, `usage`, `limit`, `not
758
758
 
759
759
  **Breaking change in 0.0.5:** HTTP **403** previously exited **4** (`auth`); it now exits **3** (`permission`). Scripts that treated exit **4** as “any auth-layer failure” must check `stage` or handle exit **3** for permission denials.
760
760
 
761
- **New in 2.0.0:** the release that goes out with the server release that moves keys, users and invitations to scoped role assignments. It is a major release because two outputs change. `org key` reports `has_super_admin_permission` where it reported `is_super_admin`, and a key whose access is assignment-based shows its `assignments` instead of one role. Permission names follow the server's (`instance.get` and `cluster.get`, which replace `instance.get_own` and `cluster.get_own`), so `org list instances` reports `"missing_permission": "instance.get"` in its degraded document (a server before them still gets `"instance.get_own"`, its own name), which it now also returns when only some of the visible instances have readable metadata. In that case `org list instances --cluster` exits **3** (`stage: "permission"`) and asks you to drop the filter or use a key with `instance.get`, where 1.9.5 filtered the instances it could read. `hosted_deployments` in your own `~/.xmemcli.json` names the Console and MCP origins of a deployment whose origins cannot be inferred (see "`~/.xmemcli.json`" below), used for `auth login`, `trace`, `org manage`, `org memberships` and `mcp` as their built-in pairs are; `--console-url` and `--mcp-url` still win. New: `read --return-sql` keeps the SQL the read API returns (`sql`, `sqls`, `sql_attempts`, or `sql_unavailable`); `org manage <resource> <action>` and `org memberships list|edit` administer roles, assignments, keys, users, invitations, memberships and the default API role, signing in with `--email` or acting as the key with `--as-key`; `auth login --email` mints with the organisation's default API role as the server names it. An older server answers the new commands with an error and changes nothing.
761
+ **New in 2.0.1:** `auth login --email` no longer reads the organisation's default API role before minting: the server issues the key with it, so an account whose role lacks `role.get` signs in by email too. Afterwards the success line names the role where the account may read it and otherwise leaves it out, instead of printing the role's id. In the JSON result, `api_role` carries the name, else the id, else null, and the new `api_role_id` the id where it was read. An organisation with no default API role is told that xmemory sets it, and to sign in meanwhile with `auth login` and a key with a role created on the Console's API Keys page. The `--email` help and this reference describe the key's role instead of calling it org-wide. `auth status` and `org key` no longer include the boolean that said whether a key's access is unrestricted; scripts that read it should check the operation they need instead (a `trace calls` request, for example, is refused with exit **3** where it is not allowed).
762
762
 
763
- **New in 1.9.5:** `write --delete-match 'TYPE:field=value'` deletes a record of a type without a primary key by values it holds (case, surrounding spaces and accents do not count): exactly one stored record must hold them all. Several such records fail the write and change nothing; none is a no-op listed under `unmatched_deletes`, with the values shown cut short. A server that takes `match` returns `created_keyless_objects` to a super admin alone, so a write prints no internal ids for anyone else; a keyless record is named by `#N` within its write. `--scope` and `--delete` no longer document an internal id: a server with this release refuses one unless the key is a super admin's.
763
+ **New in 2.0.0:** the release that goes out with the server release that moves keys, users and invitations to scoped role assignments. It is a major release because `org key` output changes: a key whose access is assignment-based shows its `assignments` instead of one role. Permission names follow the server's (`instance.get` and `cluster.get`, which replace `instance.get_own` and `cluster.get_own`), so `org list instances` reports `"missing_permission": "instance.get"` in its degraded document (a server before them still gets `"instance.get_own"`, its own name), which it now also returns when only some of the visible instances have readable metadata. In that case `org list instances --cluster` exits **3** (`stage: "permission"`) and asks you to drop the filter or use a key with `instance.get`, where 1.9.5 filtered the instances it could read. `hosted_deployments` in your own `~/.xmemcli.json` names the Console and MCP origins of a deployment whose origins cannot be inferred (see "`~/.xmemcli.json`" below), used for `auth login`, `trace`, `org manage`, `org memberships` and `mcp` as their built-in pairs are; `--console-url` and `--mcp-url` still win. New: `read --return-sql` keeps the SQL the read API returns (`sql`, `sqls`, `sql_attempts`, or `sql_unavailable`); `org manage <resource> <action>` and `org memberships list|edit` administer roles, assignments, keys, users, invitations, memberships and the default API role, signing in with `--email` or acting as the key with `--as-key`; `auth login --email` mints with the organisation's default API role as the server names it. An older server answers the new commands with an error and changes nothing.
764
+
765
+ **New in 1.9.5:** `write --delete-match 'TYPE:field=value'` deletes a record of a type without a primary key by values it holds (case, surrounding spaces and accents do not count): exactly one stored record must hold them all. Several such records fail the write and change nothing; none is a no-op listed under `unmatched_deletes`, with the values shown cut short. A server that takes `match` returns `created_keyless_objects` to privileged callers alone, so a write prints no internal ids for anyone else; a keyless record is named by `#N` within its write. `--scope` and `--delete` no longer document an internal id: a server with this release refuses one from most keys.
764
766
 
765
767
  **New in 1.9.4:** deleting a record never deletes the records linked to it: the relation's `on_delete` removes or clears each link. A server that reports those links lists them under `changes.deleted.relations`, which print as `deleted` lines as before, and lists each record a delete left with no link of a relation under `changes.orphaned_records`. In a terminal each one prints as a `note:` line, next to the other advisory records — `note: Contact name='ann' has no WorksAt link left: a record it was linked to was deleted` — where 1.9.3 printed it among the change lines. Past the first 100 of each relation, or of each type and relation, the server counts the rest instead of listing them, and they print as `deleted WorksAt: 3 more links` and `note: 3 more Contact records have no WorksAt link left: …`. `--json` output is unchanged. A server that predates the bucket never sends it, so this works against any server.
766
768
 
767
- **New in 1.9.3:** a text field whose schema gives it a `merge` (`rules` and a required `max_length`) takes a later write's value merged into the stored one instead of replacing it. `schema get` shows each field's `merge` as the server stores it, and `schema update`, `schema dry-run`, `instance create`, `xmd validate` and `xmd enhance` pass it through as written; adding, changing or removing one is a metadata-only migration. A write's `changes.merge_contradictions` prints as a `note:` line per contradiction the merge resolved, saying what the stored and the new value said and which one the field kept; the merged text itself is the field's `updated` line. `--json` output is unchanged. Each field's merge outcome (merged, or appended because the call gave no usable answer) is in the write's trace step decisions, which the Console shows to super admins.
769
+ **New in 1.9.3:** a text field whose schema gives it a `merge` (`rules` and a required `max_length`) takes a later write's value merged into the stored one instead of replacing it. `schema get` shows each field's `merge` as the server stores it, and `schema update`, `schema dry-run`, `instance create`, `xmd validate` and `xmd enhance` pass it through as written; adding, changing or removing one is a metadata-only migration. A write's `changes.merge_contradictions` prints as a `note:` line per contradiction the merge resolved, saying what the stored and the new value said and which one the field kept; the merged text itself is the field's `updated` line. `--json` output is unchanged. Each field's merge outcome (merged, or appended because the call gave no usable answer) is in the write's trace step decisions, which the Console shows to privileged callers.
768
770
 
769
771
 
770
772
  **New in 1.9.1:** a record a write names with none of its key, and that the server did not write, is reported under `changes.unbound_records`, with its type, a short outcome and the names of the fields that singled a stored record out. A server that also looks up a record given only part of its key lists that record there too when it ties it to no stored record, and one that looks up a key no stored record has by another field lists the record when it sets that binding aside; an entry with `written: true` was stored as the write gave it, so it is also among the created or updated records. In a terminal each one prints as a `note:` line, next to the other advisory records, where 1.9.0 printed it among the change lines. `--json` output is unchanged: the block was already kept verbatim. A server that predates the bucket never sends it, so this works against any server.
@@ -775,7 +777,7 @@ Some commands attach a more specific `stage` (`validate`, `usage`, `limit`, `not
775
777
 
776
778
  **New in 1.7.8:** `org create key` reads the answers of the server release that lets a key create keys. Its own **503** (busy) now says no key was created and the command is safe to run again, where a bare 503 from a proxy still says a key may exist; a **429** (a temporary mint limit, named by the server's message) and a **400** (such as a `--name` over 255 characters) say no key was created. A 403 is read as "this server does not let a key create keys yet" only when it says nothing but the generic `Insufficient permissions`; any other 403 is the server's refusal of this key's mint, whatever its wording, so the server may reword that refusal without a CLI release. A 422 is blamed on a server that predates the command only when it names `api_role_name`.
777
779
 
778
- **New in 1.7.7:** `org key [name-or-prefix]` shows one key's role, its effective permission codes (the role plus a super-admin widening) and the clusters it is bound to, read from `GET /api-keys`; with no argument, the key in use, which the server marks with `is_caller` (a server that predates the mark is matched by the stored prefix, and two keys that share it ask for a name). A field the server does not give, or clusters this credential cannot all name, are reported unavailable, never as an empty grant or a shorter list, and a selector matches only as a prefix of the stored prefix. `org create key --name --role --cluster --out` mints a key for this user bound to exactly one cluster the key in use can already see, with a role no wider than its own; the key is written only to the new 0600 `--out` file and output carries its prefix and path, never the key. It needs a server that lets an API key create keys, which follows this release: until then the server answers **403** before minting anything, and the CLI says the server does not let a key create keys yet. Help and usage errors no longer show internal parser names such as `org_create_target`.
780
+ **New in 1.7.7:** `org key [name-or-prefix]` shows one key's role, its effective permission codes (the role, plus any widening the server applies) and the clusters it is bound to, read from `GET /api-keys`; with no argument, the key in use, which the server marks with `is_caller` (a server that predates the mark is matched by the stored prefix, and two keys that share it ask for a name). A field the server does not give, or clusters this credential cannot all name, are reported unavailable, never as an empty grant or a shorter list, and a selector matches only as a prefix of the stored prefix. `org create key --name --role --cluster --out` mints a key for this user bound to exactly one cluster the key in use can already see, with a role no wider than its own; the key is written only to the new 0600 `--out` file and output carries its prefix and path, never the key. It needs a server that lets an API key create keys, which follows this release: until then the server answers **403** before minting anything, and the CLI says the server does not let a key create keys yet. Help and usage errors no longer show internal parser names such as `org_create_target`.
779
781
 
780
782
  **New in 1.7.6:** `auth login --auto-approve` reads a stored callback only together with its capture signal (under the listener's capture lock), so a callback that landed in time can no longer be seen before its timestamp and mistaken for none; a fix to 1.7.5's deadline handling, with no other change.
781
783
 
@@ -789,7 +791,7 @@ Some commands attach a more specific `stage` (`validate`, `usage`, `limit`, `not
789
791
 
790
792
  **New in 1.6.1:** a removal the server could not tie to exactly one stored record is reported under `changes.unmatched_deletes`; nothing was deleted for it. In a terminal each one prints as a `note:` line, next to the other advisory records — `note: unmatched_deletes Task task_id='T-999'` — where 1.6.0 printed it among the change lines. `--json` output is unchanged: the block was already kept verbatim. A server that predates the bucket never sends it, so this works against any server.
791
793
 
792
- **New in 1.6.0:** `trace calls` lists the LLM calls of one session, a page at a time, and `trace call` opens one call whole — for super admins, as the Console decides. Both need a Console that serves them; an older one answers **401**, exit **4** (`auth`), for a key that is fine.
794
+ **New in 1.6.0:** `trace calls` lists the LLM calls of one session, a page at a time, and `trace call` opens one call whole — for the keys the Console allows. Both need a Console that serves them; an older one answers **401**, exit **4** (`auth`), for a key that is fine.
793
795
 
794
796
  **New in 1.5.2:** a DEEP write can leave a record out when the model's reply for it did not match the schema or ran past the output limit; the server reports each such record under `changes.skipped_candidates`, and it was not stored. In a terminal each one now prints as a `note:` line, next to `overwritten_field_values` and `merged_field_conflicts` — `note: skipped_candidates Dog nickname='Bolt' error_code='model_output_unusable' reason='…'` — where 1.5.1 printed it among the change lines. `--json` output is unchanged: the block was already kept verbatim. A server that skips nothing sends no such bucket, so this works against any server.
795
797