@enderfga/claw-orchestrator 7.14.0 → 7.15.0

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.
Files changed (137) hide show
  1. package/README.md +160 -135
  2. package/configs/autoloop-reviewer-prompt.md +1 -1
  3. package/configs/engines/README.md +31 -11
  4. package/dist/bin/acp-server.js +7 -12
  5. package/dist/bin/acp-server.js.map +1 -1
  6. package/dist/bin/cli.js +71 -40
  7. package/dist/bin/cli.js.map +1 -1
  8. package/dist/bin/mcp-server.js +2 -54
  9. package/dist/bin/mcp-server.js.map +1 -1
  10. package/dist/src/acp-server.d.ts +17 -9
  11. package/dist/src/acp-server.js +149 -30
  12. package/dist/src/acp-server.js.map +1 -1
  13. package/dist/src/autoloop/agent-tools.d.ts +2 -0
  14. package/dist/src/autoloop/agent-tools.js +7 -0
  15. package/dist/src/autoloop/agent-tools.js.map +1 -1
  16. package/dist/src/autoloop/dispatcher.d.ts +6 -0
  17. package/dist/src/autoloop/dispatcher.js +23 -1
  18. package/dist/src/autoloop/dispatcher.js.map +1 -1
  19. package/dist/src/autoloop/planner-tools.js +2 -0
  20. package/dist/src/autoloop/planner-tools.js.map +1 -1
  21. package/dist/src/council.d.ts +8 -0
  22. package/dist/src/council.js +45 -12
  23. package/dist/src/council.js.map +1 -1
  24. package/dist/src/dashboard/index.html +28 -14
  25. package/dist/src/embedded-server.js +27 -8
  26. package/dist/src/embedded-server.js.map +1 -1
  27. package/dist/src/engine-spawn.js +3 -1
  28. package/dist/src/engine-spawn.js.map +1 -1
  29. package/dist/src/fanout.d.ts +13 -3
  30. package/dist/src/fanout.js +10 -0
  31. package/dist/src/fanout.js.map +1 -1
  32. package/dist/src/inbox-manager.d.ts +9 -0
  33. package/dist/src/inbox-manager.js +8 -2
  34. package/dist/src/inbox-manager.js.map +1 -1
  35. package/dist/src/index.d.ts +2 -0
  36. package/dist/src/index.js +117 -51
  37. package/dist/src/index.js.map +1 -1
  38. package/dist/src/kernel/conditions.d.ts +1 -1
  39. package/dist/src/kernel/conditions.js +1 -1
  40. package/dist/src/kernel/engine.d.ts +28 -8
  41. package/dist/src/kernel/engine.js +93 -19
  42. package/dist/src/kernel/engine.js.map +1 -1
  43. package/dist/src/kernel/nodes/agent.js +2 -0
  44. package/dist/src/kernel/nodes/agent.js.map +1 -1
  45. package/dist/src/kernel/nodes/council.js +9 -4
  46. package/dist/src/kernel/nodes/council.js.map +1 -1
  47. package/dist/src/kernel/nodes/fanout.js +5 -0
  48. package/dist/src/kernel/nodes/fanout.js.map +1 -1
  49. package/dist/src/kernel/nodes/goal.d.ts +8 -1
  50. package/dist/src/kernel/nodes/goal.js +40 -19
  51. package/dist/src/kernel/nodes/goal.js.map +1 -1
  52. package/dist/src/kernel/nodes/subflow.js +9 -1
  53. package/dist/src/kernel/nodes/subflow.js.map +1 -1
  54. package/dist/src/kernel/nodes/ultraapp.d.ts +1 -0
  55. package/dist/src/kernel/nodes/ultraapp.js +1 -0
  56. package/dist/src/kernel/nodes/ultraapp.js.map +1 -1
  57. package/dist/src/kernel/nodes/verifier.js +5 -1
  58. package/dist/src/kernel/nodes/verifier.js.map +1 -1
  59. package/dist/src/kernel/projections.d.ts +1 -0
  60. package/dist/src/kernel/projections.js +7 -1
  61. package/dist/src/kernel/projections.js.map +1 -1
  62. package/dist/src/kernel/templates/index.d.ts +6 -3
  63. package/dist/src/kernel/templates/index.js +8 -3
  64. package/dist/src/kernel/templates/index.js.map +1 -1
  65. package/dist/src/kernel/types.d.ts +30 -10
  66. package/dist/src/kernel/types.js.map +1 -1
  67. package/dist/src/logger.d.ts +6 -0
  68. package/dist/src/logger.js +14 -0
  69. package/dist/src/logger.js.map +1 -1
  70. package/dist/src/mcp-annotations.d.ts +13 -0
  71. package/dist/src/mcp-annotations.js +100 -0
  72. package/dist/src/mcp-annotations.js.map +1 -0
  73. package/dist/src/models.d.ts +7 -0
  74. package/dist/src/models.js +9 -0
  75. package/dist/src/models.js.map +1 -1
  76. package/dist/src/openai-compat.d.ts +11 -5
  77. package/dist/src/openai-compat.js +55 -54
  78. package/dist/src/openai-compat.js.map +1 -1
  79. package/dist/src/persistent-acp-session.d.ts +7 -0
  80. package/dist/src/persistent-acp-session.js +26 -2
  81. package/dist/src/persistent-acp-session.js.map +1 -1
  82. package/dist/src/persistent-codex-app-session.d.ts +2 -0
  83. package/dist/src/persistent-codex-app-session.js +18 -9
  84. package/dist/src/persistent-codex-app-session.js.map +1 -1
  85. package/dist/src/persistent-codex-session.d.ts +14 -3
  86. package/dist/src/persistent-codex-session.js +22 -19
  87. package/dist/src/persistent-codex-session.js.map +1 -1
  88. package/dist/src/persistent-custom-session.d.ts +9 -0
  89. package/dist/src/persistent-custom-session.js +41 -21
  90. package/dist/src/persistent-custom-session.js.map +1 -1
  91. package/dist/src/persistent-grok-session.js +1 -1
  92. package/dist/src/persistent-grok-session.js.map +1 -1
  93. package/dist/src/run-ledger.d.ts +3 -3
  94. package/dist/src/session-manager.d.ts +34 -1
  95. package/dist/src/session-manager.js +160 -30
  96. package/dist/src/session-manager.js.map +1 -1
  97. package/dist/src/types.d.ts +34 -11
  98. package/dist/src/types.js.map +1 -1
  99. package/dist/src/ultraapp/build.d.ts +5 -11
  100. package/dist/src/ultraapp/build.js +5 -11
  101. package/dist/src/ultraapp/build.js.map +1 -1
  102. package/dist/src/ultraapp/council-adapter.d.ts +5 -2
  103. package/dist/src/ultraapp/council-adapter.js +6 -6
  104. package/dist/src/ultraapp/council-adapter.js.map +1 -1
  105. package/dist/src/ultraapp/files.d.ts +7 -0
  106. package/dist/src/ultraapp/files.js +7 -1
  107. package/dist/src/ultraapp/files.js.map +1 -1
  108. package/dist/src/ultraapp/manager.d.ts +23 -3
  109. package/dist/src/ultraapp/manager.js +170 -72
  110. package/dist/src/ultraapp/manager.js.map +1 -1
  111. package/dist/src/ultraapp/narrator.js +1 -1
  112. package/dist/src/ultraapp/narrator.js.map +1 -1
  113. package/dist/src/ultraapp/versions.d.ts +27 -5
  114. package/dist/src/ultraapp/versions.js +58 -13
  115. package/dist/src/ultraapp/versions.js.map +1 -1
  116. package/openclaw.plugin.json +4 -13
  117. package/package.json +13 -6
  118. package/skills/SKILL.md +52 -24
  119. package/skills/references/acp.md +140 -61
  120. package/skills/references/autoloop.md +141 -35
  121. package/skills/references/claude-cli-tracking.md +8 -6
  122. package/skills/references/cli.md +122 -93
  123. package/skills/references/council.md +44 -22
  124. package/skills/references/dashboard.md +37 -21
  125. package/skills/references/getting-started.md +49 -15
  126. package/skills/references/inbox.md +13 -8
  127. package/skills/references/mcp.md +25 -17
  128. package/skills/references/multi-engine.md +161 -145
  129. package/skills/references/observability.md +90 -58
  130. package/skills/references/openai-compat.md +172 -82
  131. package/skills/references/sessions.md +101 -65
  132. package/skills/references/tools.md +209 -158
  133. package/skills/references/ultra.md +7 -7
  134. package/skills/references/ultraapp.md +101 -56
  135. package/skills/references/verification.md +112 -56
  136. package/skills/references/workflow.md +227 -93
  137. package/assets/banner.jpg +0 -0
@@ -16,6 +16,10 @@ every engine passes through, not only through Claude Code's `--max-budget-usd`.
16
16
  - Location: `~/.claw-orchestrator/runs/YYYY-MM-DD.jsonl` (override with
17
17
  `CLAWO_RUNS_DIR`).
18
18
  - One JSON object per line, one line per completed turn — **successful or not**.
19
+ The turns a Codex `/goal` runs on its own (a workflow `goal` node, or the
20
+ `codex_goal_*` tools) are the exception: they do not pass through a send, so they
21
+ write no rows, and a goal node's spend is reported on its run instead
22
+ ([`workflow.md`](./workflow.md#goal)).
19
23
  - Shards are one file per UTC day. Queries always filter on the row timestamp, so
20
24
  the shard boundary is a storage detail; `--since 24h` spans midnight correctly.
21
25
  - Writes are best-effort: a ledger failure is logged at `warn` and swallowed. It
@@ -25,33 +29,35 @@ every engine passes through, not only through Claude Code's `--max-budget-usd`.
25
29
 
26
30
  ### Row schema
27
31
 
28
- | Field | Meaning |
29
- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
30
- | `ts` | ISO timestamp of turn completion |
31
- | `session` | SessionManager session name |
32
- | `engine` | `claude` / `codex` / `codex-app` / `grok` / `opencode` / `agy` / `cursor` (legacy) / `custom` |
33
- | `model` | Configured model, or the engine's own reported model when none was set (Claude Code: the model named in its `init` event). A configured alias such as `opus[1m]` is recorded as the model the engine reports it resolved to. Absent when neither is known |
34
- | `cwd` | Working directory the turn ran in |
35
- | `turn` | 1-based index of the send within the session, counted by the process that recorded it |
36
- | `tokensIn` / `tokensOut` / `cachedTokens` | **Per-turn deltas**, not session totals |
37
- | `costUsd` | Per-turn delta in USD — token count × the registry rate. On a flat-rate plan (a subscription seat) nobody was billed this: set `pricingOverrides` in the plugin config to zero the model out (`{"gpt-5.5": {"input": 0, "output": 0, "cached": 0}}`). Read [Zeroing a model's pricing](#zeroing-a-models-pricing) first — it disables `maxBudgetUsd` for that model, except on `grok`, which prices itself |
38
- | `tokensEstimated` | `true` when the counts came from `estimateTokens()` (see below) |
39
- | `durationMs` | Wall-clock for the turn |
40
- | `toolCalls` / `toolErrors` | Per-turn deltas |
41
- | `ok` | `false` for a turn that threw, or that the session's own `turnsSucceeded` counter did not count (see `sessions.md`). Falls back to "nothing was thrown" when the counter cannot be read |
42
- | `error` | Failure text, truncated to 500 chars. Absent when the turn resolved but the engine did not count it as succeeded (an interrupted or non-SUCCESS turn), so a failed row does not always carry one |
43
- | `refusalFallback` | `{ from, to, category? }` when the model refused and the engine re-ran the turn on another model (Claude Code’s refusal fallback, for example Opus 5.5 to an older Opus on a `cyber` refusal). Absent otherwise |
44
- | `parent` | council / fanout / autoloop / workflow run id, when the turn belongs to one |
32
+ | Field | Meaning |
33
+ | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34
+ | `ts` | ISO timestamp of turn completion |
35
+ | `session` | SessionManager session name |
36
+ | `engine` | `claude` / `codex` / `codex-app` / `grok` / `opencode` / `agy` / `acp` / `custom`, or a legacy `gemini` / `cursor` |
37
+ | `model` | Configured model, or the engine's own reported model when none was set (Claude Code: the model named in its `init` event). A configured alias such as `opus[1m]` is recorded as the model the engine reports it resolved to. Absent when neither is known |
38
+ | `cwd` | Working directory the turn ran in |
39
+ | `turn` | 1-based index of the send within the session, counted by the process that recorded it |
40
+ | `tokensIn` / `tokensOut` / `cachedTokens` | **Per-turn deltas**, not session totals |
41
+ | `costUsd` | Per-turn delta in USD — token count × the registry rate, or the engine's own figure where it reports one (`claude`, `grok`, `opencode`; an `acp` agent uses its own figure or its preset's `pricing` — see [Accuracy](#accuracy-which-engines-report-real-usage)). On a flat-rate plan (a subscription seat) nobody was billed this: set `pricingOverrides` in the plugin config to zero a registry-priced model out (`{"gpt-5.5": {"input": 0, "output": 0, "cached": 0}}`). Read [Zeroing a model's pricing](#zeroing-a-models-pricing) first — it disables `maxBudgetUsd` for that model |
42
+ | `tokensEstimated` | `true` when the counts came from `estimateTokens()` (see below) |
43
+ | `durationMs` | Wall-clock for the turn |
44
+ | `toolCalls` / `toolErrors` | Per-turn deltas |
45
+ | `ok` | `false` for a turn that threw, or that the session's own `turnsSucceeded` counter did not count (see `sessions.md`). Falls back to "nothing was thrown" when the counter cannot be read |
46
+ | `error` | Failure text, truncated to 500 chars. Absent when the turn resolved but the engine did not count it as succeeded (an interrupted or non-SUCCESS turn), so a failed row does not always carry one |
47
+ | `refusalFallback` | `{ from, to, category? }` when the model refused and the engine re-ran the turn on another model (Claude Code’s refusal fallback, for example Opus 5.5 to an older Opus on a `cyber` refusal). Absent otherwise |
48
+ | `parent` | The run id — workflow, council, fan-out, ultraplan, ultrareview or autoloop — when the turn belongs to one |
45
49
 
46
50
  Deltas rather than totals means summing a query window gives that window's spend
47
51
  without double-counting.
48
52
 
49
- Every path funnels through `SessionManager.sendMessage`, so council, fanout,
50
- autoloop, ACP, the OpenAI-compatible bridge, the MCP server and the CLI are all
51
- covered by the same hook. `parent` is what lets you reassemble a multi-agent run:
53
+ Every send funnels through `SessionManager.sendMessage`, so council, fanout,
54
+ autoloop, workflow agent nodes and verifier fixers, cross-session inbox
55
+ deliveries, the ACP server, the OpenAI-compatible bridge, the MCP server and the
56
+ CLI are all covered by the same hook. `parent` is what lets you reassemble a
57
+ multi-agent run:
52
58
 
53
59
  ```bash
54
- clawo runs --parent council-1a2b3c4d
60
+ clawo runs --parent council-mh3k2x1a-1a2b3c4d
55
61
  ```
56
62
 
57
63
  ### Reading it
@@ -60,10 +66,12 @@ clawo runs --parent council-1a2b3c4d
60
66
  clawo runs # last 24h, table
61
67
  clawo runs --since 7d --engine codex # one engine, one week
62
68
  clawo runs --session my-session --json # raw rows + summary
63
- clawo runs --parent fanout-b5f7c886 # every agent turn of one fan-out
69
+ clawo runs --parent fanout-mh3k2x1a-b5f7c886 # every agent turn of one fan-out
64
70
  ```
65
71
 
66
- Over HTTP (GET query string or POST JSON body):
72
+ Over HTTP (GET query string or POST JSON body; the body wins). It takes `since`,
73
+ `session`, `engine`, `parent`, `verified=true|false` and `limit` (default 200, the
74
+ newest rows):
67
75
 
68
76
  ```bash
69
77
  curl "http://127.0.0.1:18796/runs?since=24h&limit=200" -H "Authorization: Bearer $TOKEN"
@@ -74,7 +82,11 @@ Returns `{ ok, rows, summary }`, where `summary` carries `rows`, `costUsd`,
74
82
  `unverifiedRows` and a per-engine breakdown `byEngine`. The dashboard
75
83
  header shows the 24-hour figure from the same endpoint.
76
84
 
77
- Programmatically: `manager.getRunLedger({ since, session, engine, parent, limit })`.
85
+ Programmatically: `manager.getRunLedger({ since, session, engine, parent, verified, limit })`.
86
+
87
+ `since` takes a relative window (`30m`, `24h`, `7d`, `2w`), an ISO timestamp or
88
+ epoch milliseconds; one it cannot parse widens the query rather than emptying it.
89
+ `clawo runs` reads the last 24 h and prints 50 rows by default.
78
90
 
79
91
  ## Spend caps
80
92
 
@@ -98,8 +110,15 @@ Notes:
98
110
  - A cap of `0` or a negative number means _unset_, not _refuse everything_.
99
111
  - Claude Code still receives `--max-budget-usd` as well: an in-CLI stop happens
100
112
  earlier and therefore costs less than an after-the-fact refusal.
101
- - `session_list` / `GET /session/list` expose `costUsd`, `budgetUsd` and
102
- `budgetExhausted` so a stalled session shows _why_ it stopped taking turns.
113
+ - `session_list` / `GET /session/list` expose `costUsd`, and `budgetUsd` and
114
+ `budgetExhausted` when a cap is set, so a stalled session shows _why_ it stopped
115
+ taking turns.
116
+ - The turns a Codex `/goal` runs on its own (a `goal` workflow node, or a goal
117
+ set with `codex_goal_set`) are not sends: they write no ledger row, and the cap
118
+ does not stop a goal while it runs. Their spend does count toward the session's
119
+ total, so the next send on that session is gated by it; a `goal` node's spend
120
+ is added to its run's `costUsd`, and `tokenBudget` and `timeoutMs` are the goal's
121
+ own limits.
103
122
 
104
123
  ### Zeroing a model's pricing
105
124
 
@@ -109,20 +128,29 @@ for that model**: the cap compares the session's accrued `getCost().totalUsd` ag
109
128
  and that number is pricing-derived, so at a rate of 0 it never reaches any cap. There is
110
129
  no separate token or turn ceiling behind it.
111
130
 
112
- - `engine: 'claude'` keeps the CLI's own `--max-budget-usd`, which the CLI accounts itself
113
- and which a zeroed registry rate does not touch. `engine: 'grok'` is outside this for a
114
- different reason: it writes the engine's own `total_cost_usd` into `_stats.costUsd` and
115
- never consults the registry, so zeroing a model's pricing does not disable its cap.
116
- For codex, cursor, agy, opencode and custom the runtime check is the only one.
131
+ - `engine: 'claude'` is outside this: its cost is the CLI's own `total_cost_usd`, so an
132
+ override neither zeroes a Claude row nor disables its cap. The registry rate is used only
133
+ for the first turn of a resumed process and for proxy sessions (see below), and the CLI's
134
+ own `--max-budget-usd` applies as well. `engine: 'grok'` is outside it for the same
135
+ reason: it writes the engine's own `total_cost_usd` into `_stats.costUsd` and never
136
+ consults the registry, so zeroing a model's pricing does not disable its cap.
137
+ `engine: 'acp'` is outside it too: it takes the agent's own reported cost, or prices
138
+ tokens from its preset's `pricing`, and never reads the registry — an agent that
139
+ reports no cost and has no `pricing` accrues nothing, so its cap never bites.
140
+ `engine: 'opencode'` is outside it whenever opencode reports a `cost` for its steps,
141
+ which is then the bill; only output that carries none is priced from the registry.
142
+ For `codex`, `codex-app`, `agy`, `custom` and the legacy engines the runtime check
143
+ is the only one.
117
144
  - `maxTurns` (and `maxRounds` on a council) still bound the work, and they are the right
118
145
  ceiling to reach for once a model prices at 0.
119
146
  - In a council the cap cannot bite before an agent's second turn in any case: the first
120
147
  enters with nothing accrued, and one `sendMessage` runs up to `maxTurnsPerAgent` turns
121
148
  inside the CLI, so it can pass the whole cap on its own.
122
- - `cursor` and `opencode` sessions started without a model price by their engine default,
123
- which is `claude-sonnet-4-6` for both. Zeroing a Claude subscription therefore zeroes
124
- those default sessions too, and their reported ids (`cursor-default`, `opencode-default`)
125
- are display names that cannot themselves be overridden.
149
+ - An `opencode` session started without a model, on turns opencode reports no cost for,
150
+ prices at its engine default `claude-sonnet-4-6`, and so does a session on the legacy
151
+ `cursor` engine started without one. Zeroing a Claude subscription therefore zeroes
152
+ those turns too, and their reported ids (`opencode-default`, `cursor-default`) are
153
+ display names that cannot themselves be overridden.
126
154
 
127
155
  The override is read once, in the `SessionManager` constructor, from the plugin config.
128
156
  `clawo serve`, `clawo-acp` and `clawo-mcp` do not pass one, so a ledger written by those
@@ -130,21 +158,23 @@ processes prices at registry rates whichever way this is set.
130
158
 
131
159
  ## Accuracy: which engines report real usage
132
160
 
133
- `costUsd` is derived from token counts times the model's price in `models.ts`.
161
+ `costUsd` is derived from token counts times the model's price in `models.ts`,
162
+ except where the engine reports its own cost (marked in the table below).
134
163
  Where the engine reports usage, those counts are the engine's own. Where it does
135
164
  not, the wrapper falls back to `estimateTokens()` (characters ÷ 4) and the row is
136
165
  flagged `tokensEstimated: true`; the CLI marks those costs with a trailing `~`.
137
166
 
138
- | Engine | Token counts |
139
- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
140
- | `claude` | Engine-reported, including the **cost** (see below) |
141
- | `codex` | Engine-reported |
142
- | `codex-app` | Engine-reported |
143
- | `grok` | Engine-reported — and so is the **cost**: this engine reports `total_cost_usd`, which the wrapper passes through instead of pricing tokens from the registry, so registry drift cannot affect a grok row |
144
- | `cursor` (legacy) | Engine-reported when the stream carries `usage`, else estimated |
145
- | `opencode` | Engine-reported when the run JSON carries `tokens`, else estimated |
146
- | `agy` | Engine-reported when the result event carries usage, else estimated |
147
- | `custom` | Depends on the CLI; estimated when it emits no usage |
167
+ | Engine | Token counts |
168
+ | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
169
+ | `claude` | Engine-reported, including the **cost** (see below) |
170
+ | `codex` | Engine-reported |
171
+ | `codex-app` | Engine-reported |
172
+ | `grok` | Engine-reported — and so is the **cost**: this engine reports `total_cost_usd`, which the wrapper passes through instead of pricing tokens from the registry, so registry drift cannot affect a grok row |
173
+ | `acp` | Agent-reported when the prompt response carries `usage`. Cost is the agent's own `usage_update` figure when it sends one in USD, else priced from the preset's `pricing`, else 0. Never estimated — see [`multi-engine.md`](./multi-engine.md#acp-agents-engine-acp) |
174
+ | `cursor` (legacy) | Engine-reported when the stream carries `usage`, else estimated |
175
+ | `opencode` | Engine-reported when the run JSON carries `tokens`, else estimated. The **cost** is opencode's own per-step `cost` when it reports one, else priced from the registry |
176
+ | `agy` | Engine-reported when the result event carries usage, else estimated |
177
+ | `custom` | Depends on the CLI; estimated when it emits no usage |
148
178
 
149
179
  How a `claude` row's cost is taken:
150
180
 
@@ -156,9 +186,9 @@ How a `claude` row's cost is taken:
156
186
  restart) reports a total that includes the resumed history. Its first report is
157
187
  taken as a baseline, and that one turn is priced from the registry instead, so
158
188
  the history is not billed twice (`maxBudgetUsd` gates against this number).
159
- - Proxy sessions (`baseUrl` set) use the registry estimate instead: the CLI
160
- believes it is running `opus` while another provider serves the tokens, so its
161
- own figure would be Opus list price.
189
+ - Proxy sessions (a non-Claude `model` with `baseUrl` set) use the registry
190
+ estimate instead: the CLI believes it is running `opus` while another provider
191
+ serves the tokens, so its own figure would be Opus list price.
162
192
 
163
193
  ### What "input tokens" means is not the same on every engine
164
194
 
@@ -190,9 +220,10 @@ it is not an accounting guarantee, and it is not a substitute for the spend limi
190
220
  your provider offers.
191
221
 
192
222
  Cost figures are also only as good as the pricing table: a model missing from
193
- `models.ts` prices at its family default, and subscription plans (Claude Max,
194
- ChatGPT Pro) bill nothing per token while the ledger still reports the API-rate
195
- equivalent. Read `costUsd` as "what this would cost at API rates".
223
+ `models.ts` is priced as its engine's default model (with a warning in the log),
224
+ and subscription plans (Claude Max, ChatGPT Pro) bill nothing per token while the
225
+ ledger still reports the API-rate equivalent. Read `costUsd` as "what this would
226
+ cost at API rates".
196
227
 
197
228
  ## `ok` vs `verified`
198
229
 
@@ -220,8 +251,8 @@ either would make the ledger useless for the thing it is for.
220
251
  `verified` is **not written at turn time**, deliberately. The turns that produce
221
252
  the work all finish before the verifier that judges it, so stamping a verdict on
222
253
  them as they are written would be inventing one. It is joined in at read time
223
- from the run record via the row's `parent`, by `annotateVerdicts()`. The exception
224
- is a standalone `verify_run`, which writes its verdict directly.
254
+ from the run record via the row's `parent`, by `annotateVerdicts()`. A standalone
255
+ `verify_run` writes no row at all: its result is the evidence bundle it returns.
225
256
 
226
257
  Two consequences worth knowing:
227
258
 
@@ -234,10 +265,11 @@ Two consequences worth knowing:
234
265
 
235
266
  | Field | Source |
236
267
  | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
237
- | `evidenceId`, `contractId` | Joined from the run record |
238
- | `nodeKind` | The kernel node the turn belonged to (`agent`, `council`, `verifier`, …) |
268
+ | `verified` | Joined from the run record: `true` for `verified`, `false` for `refuted`, absent for `unverified` (see above) |
269
+ | `evidenceId`, `contractId` | Joined from the run record: the evidence behind its current verdict, and the id of its run-level contract |
270
+ | `nodeKind` | The kind of node the turn ran in, when the caller stamps one. Today only fan-out agents do (`fanout`) |
239
271
  | `repoLang` | Detected from a manifest (`package.json`, `pyproject.toml`, `go.mod`, …). Never guessed — a wrong label would corrupt the comparison the field exists to enable |
240
- | `taskKind` | Caller-declared only. Never inferred from the prompt |
272
+ | `taskKind` | Caller-declared only, through `sendMessage`'s `taskKind` option; no tool or route sets it. Never inferred from the prompt |
241
273
 
242
274
  All are optional and absent on rows written before 6.0.0. The reader already
243
275
  skips unknown and missing keys, so old shards stay readable; nothing backfills
@@ -246,7 +278,7 @@ them, because we cannot know retroactively.
246
278
  ```bash
247
279
  clawo runs --since 7d --verified # only turns whose contract passed
248
280
  clawo runs --since 7d --refuted # only turns whose contract failed
249
- clawo runs --parent wf-abc123 # every turn of one workflow run
281
+ clawo runs --parent wf-mh3k2x1a-a1b2c3 # every turn of one workflow run
250
282
  ```
251
283
 
252
284
  ## Related