@azure-id/orc 2.0.2 → 2.1.1

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 (129) hide show
  1. package/CHANGELOG.md +455 -0
  2. package/README-id.md +52 -23
  3. package/README.md +36 -20
  4. package/bin/build-agents.js +205 -206
  5. package/bin/clear-logs.js +620 -0
  6. package/bin/cli.js +47417 -46420
  7. package/bin/fix.js +459 -0
  8. package/bin/gotcha.js +288 -8
  9. package/bin/habit.js +1538 -1453
  10. package/bin/mockrun-catalog.js +3 -0
  11. package/bin/onboarding-content.js +2 -1
  12. package/bin/pricing.json +28 -21
  13. package/bin/trace-write.js +869 -657
  14. package/bin/verify-contracts.js +5552 -5471
  15. package/bin/verify-package.js +716 -705
  16. package/bin/webui/api.js +125 -6
  17. package/bin/webui/css/panels/hookui.css +79 -0
  18. package/bin/webui/fixtures/behaviour.js +30 -0
  19. package/bin/webui/fixtures/extra.js +2036 -2036
  20. package/bin/webui/fixtures/flow.js +81 -81
  21. package/bin/webui/fixtures/hookui.js +506 -431
  22. package/bin/webui/fixtures/index.js +32 -3
  23. package/bin/webui/fixtures/knowledge.js +2 -2
  24. package/bin/webui/fixtures/maintenance.js +123 -42
  25. package/bin/webui/fixtures/rules.js +1007 -1002
  26. package/bin/webui/fixtures/settings.js +6 -7
  27. package/bin/webui/fixtures/stats.js +9 -6
  28. package/bin/webui/fixtures/wait.js +98 -97
  29. package/bin/webui/i18n/en/behaviour.json +13 -0
  30. package/bin/webui/i18n/en/hookui.json +290 -194
  31. package/bin/webui/i18n/en/maintenance.json +71 -52
  32. package/bin/webui/i18n/en/settings.json +60 -60
  33. package/bin/webui/i18n/id/behaviour.json +13 -0
  34. package/bin/webui/i18n/id/hookui.json +290 -194
  35. package/bin/webui/i18n/id/maintenance.json +71 -52
  36. package/bin/webui/i18n/id/settings.json +60 -60
  37. package/bin/webui/js/05-banners.js +181 -172
  38. package/bin/webui/js/06-edit.js +193 -183
  39. package/bin/webui/js/panels/behaviour.js +77 -12
  40. package/bin/webui/js/panels/hookui.js +2196 -1691
  41. package/bin/webui/js/panels/maintenance.js +336 -235
  42. package/bin/webui/js/panels/settings.js +726 -719
  43. package/mock-run/INDEX.md +1 -0
  44. package/mock-run/a-normal-day.md +2 -2
  45. package/mock-run/extra-slots.md +177 -177
  46. package/mock-run/habits.md +1 -1
  47. package/mock-run/orc-aftermath.md +392 -392
  48. package/mock-run/orc-budget.md +29 -33
  49. package/mock-run/orc-cli.md +200 -200
  50. package/mock-run/orc-explain.md +86 -86
  51. package/mock-run/orc-extra.md +389 -392
  52. package/mock-run/orc-fast.md +2 -2
  53. package/mock-run/orc-fix.md +87 -0
  54. package/mock-run/orc-pattern.md +112 -112
  55. package/mock-run/orc-quick.md +146 -146
  56. package/mock-run/orc.md +4 -4
  57. package/package.json +1 -1
  58. package/templates/agents/MODEL-MAPPING.md +176 -173
  59. package/templates/agents/orc-analyze-mini-sonnet-5-high.md +2 -2
  60. package/templates/agents/{orc-claude-writer-opus-5-med.md → orc-claude-writer-opus-5-low.md} +4 -4
  61. package/templates/agents/orc-executor-haiku-4-5.md +1 -1
  62. package/templates/agents/orc-executor-opus-5-low.md +1 -1
  63. package/templates/agents/orc-executor-sonnet-4-6-high.md +1 -1
  64. package/templates/agents/orc-executor-sonnet-4-6-med.md +1 -1
  65. package/templates/agents/orc-executor-sonnet-5-high.md +2 -2
  66. package/templates/agents/orc-executor-sonnet-5-low.md +155 -0
  67. package/templates/agents/orc-executor-sonnet-5-med.md +155 -0
  68. package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +2 -2
  69. package/templates/agents/orc-planner-mini-sonnet-5-high.md +2 -2
  70. package/templates/agents/{orc-recon-sonnet-4-6-med.md → orc-recon-sonnet-5-med.md} +4 -4
  71. package/templates/agents/orc-retro-sonnet-5-high.md +2 -2
  72. package/templates/agents/{orc-reviewer-opus-5-med.md → orc-reviewer-opus-5-low.md} +4 -4
  73. package/templates/agents/{orc-wiki-scanner-opus-5-med.md → orc-wiki-scanner-opus-5-low.md} +3 -3
  74. package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +2 -2
  75. package/templates/commands/orc-fast.md +10 -10
  76. package/templates/commands/orc-fix.md +18 -0
  77. package/templates/commands/orc-wiki.md +64 -64
  78. package/templates/hooks/README.md +75 -7
  79. package/templates/hooks/orc-session-hook.js +78 -3
  80. package/templates/hooks/orc-statusline-render.js +317 -23
  81. package/templates/hooks/orc-statusline.js +162 -49
  82. package/templates/hooks/orc-subagent-line.js +23 -5
  83. package/templates/hooks/orc-weather-fetch.js +123 -0
  84. package/templates/skills/_shared/extra-dispatch.md +1331 -1331
  85. package/templates/skills/_shared/gotchas.md +27 -7
  86. package/templates/skills/_shared/habits.md +2 -2
  87. package/templates/skills/_shared/opus5-only.md +137 -137
  88. package/templates/skills/_shared/phases/review.md +2 -2
  89. package/templates/skills/_shared/phases/trace-verbs.md +17 -3
  90. package/templates/skills/_shared/phases/trace.md +136 -136
  91. package/templates/skills/_shared/review-slice.md +28 -1
  92. package/templates/skills/_shared/wait.md +1 -0
  93. package/templates/skills/orc/README.md +2 -2
  94. package/templates/skills/orc/SKILL.md +227 -227
  95. package/templates/skills/orc/config.md +25 -27
  96. package/templates/skills/orc/examples/full-run-mock.md +74 -73
  97. package/templates/skills/orc/references/effort-and-mode.md +222 -222
  98. package/templates/skills/orc/references/preflight-report.md +3 -3
  99. package/templates/skills/orc/references/ultra-mode.md +1 -1
  100. package/templates/skills/orc/schemas/checkpoint.md +122 -122
  101. package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +3 -3
  102. package/templates/skills/orc/subskills/orc-review-verify/core.md +1 -1
  103. package/templates/skills/orc-analyze/SKILL.md +4 -2
  104. package/templates/skills/orc-claude/SKILL.md +14 -14
  105. package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -65
  106. package/templates/skills/orc-diy/SKILL.md +5 -5
  107. package/templates/skills/orc-fast/SKILL.md +210 -208
  108. package/templates/skills/orc-fix/SKILL.md +110 -0
  109. package/templates/skills/orc-grill/SKILL.md +232 -232
  110. package/templates/skills/orc-grill/references/grill-doc.md +1 -1
  111. package/templates/skills/orc-mini/SKILL.md +4 -4
  112. package/templates/skills/orc-mini/examples/mini-run-mock.md +4 -2
  113. package/templates/skills/orc-quick/README.md +536 -536
  114. package/templates/skills/orc-quick/SKILL.md +2 -2
  115. package/templates/skills/orc-quick/references/context-doc.md +145 -145
  116. package/templates/skills/orc-quick/references/dispatch-gate.md +220 -219
  117. package/templates/skills/orc-quick/references/gh-mode.md +4 -2
  118. package/templates/skills/orc-retro/SKILL.md +1 -1
  119. package/templates/skills/orc-retro/examples/retro-mock.md +16 -16
  120. package/templates/skills/orc-wiki/README.md +325 -325
  121. package/templates/skills/orc-wiki/SKILL.md +195 -195
  122. package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -37
  123. package/templates/skills/orc-wiki/references/extra.md +2 -2
  124. package/templates/skills/orc-wiki/references/partial-refresh.md +276 -271
  125. package/templates/skills/orc-wiki/references/phases/phase-0.md +1 -1
  126. package/templates/skills/orc-wiki/references/phases/phase-2.md +3 -3
  127. package/templates/skills/orc-wiki/references/phases/phase-3c.md +3 -2
  128. package/templates/agents/orc-claude-writer-opus-4-8-high.md +0 -48
  129. package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +0 -74
@@ -1,392 +1,389 @@
1
- # Mock run — `orc extra`
2
-
3
- > Run some of ORC's work on a different AI model, and still know exactly what
4
- > left your machine. DeepSeek, GLM, Kimi, a model on your own laptop, or any
5
- > endpoint you name.
6
-
7
- ---
8
-
9
- ## 1. What it does
10
-
11
- ORC gives every task a score, from 0 to 100, for how hard it is. Then it picks
12
- the cheapest Claude model that can still do it. A tiny rename does not need the
13
- biggest model.
14
-
15
- `orc extra` adds one step. You can say: **"this part of the ladder should run
16
- somewhere else."**
17
-
18
- ```
19
- score 0 ──────── 30 ──────── 55 ──────── 100
20
- └ DeepSeek ┘└─────── Claude ───────┘
21
- (yours) (unchanged)
22
- ```
23
-
24
- Three things stay true, always:
25
-
26
- | | |
27
- |---|---|
28
- | **ORC itself never moves** | Only the task is sent away. The planning, the reviewing and the checking stay where they are. |
29
- | **Nothing happens until you say so** | It is off by default, and a connection you have not tested can never be used. |
30
- | **You are always told** | Every run that will send work away prints a line saying so, **before** the work starts. |
31
-
32
- ---
33
-
34
- ## 2. Setting one up
35
-
36
- Six commands. The comments say why each one exists.
37
-
38
- ```bash
39
- $ orc extra providers
40
- ```
41
-
42
- > ```
43
- > ORC · extra — 14 providers (catalog dated 2026-08-22)
44
- >
45
- > deepseek DeepSeek api · claude-shim
46
- > zai Z.ai (GLM) api · claude-shim
47
- > moonshot Moonshot (Kimi) [cn] api · claude-shim
48
- > ollama Ollama (local) api · claude-shim
49
- > opencode OpenCode cli
50
- > codex Codex cli
51
- > custom Custom endpoint api · claude-shim · cli
52
- >
53
- > Model ids are NOT shipped — they rot within a quarter.
54
- > ```
55
-
56
- **Why no model names?** A model name that ships in a package is wrong within a
57
- few months, and wrong quietly. It would break in the middle of your work. ORC
58
- asks the provider for the real list instead, in a moment.
59
-
60
- ```bash
61
- $ orc extra add cheap --provider deepseek --engine api --env-key DEEPSEEK_API_KEY
62
- ```
63
-
64
- > ```
65
- > Added profile cheap → .claude/orc/extra.json
66
- >
67
- > provider deepseek DeepSeek
68
- > engine api
69
- > base url https://api.deepseek.com
70
- > credential env DEEPSEEK_API_KEY
71
- > verified no — nothing routes to an unverified profile
72
- >
73
- > Next: orc extra ping cheap
74
- >
75
- > A profile does nothing until a route points at it. Nothing has changed
76
- > about how this repo builds yet.
77
- > ```
78
-
79
- **Note what it stored: the NAME of an environment variable, not your key.** ORC
80
- never asks for the key itself here, and it refuses a `--key` flag on purpose —
81
- anything you type on a command line is visible to other programs and is saved in
82
- your shell history.
83
-
84
- ```bash
85
- $ orc extra ping cheap
86
- ```
87
-
88
- > ```
89
- > ✅ cheap verified via models 412ms
90
- > https://api.deepseek.com
91
- >
92
- > 2 models: deepseek-chat, deepseek-reasoner
93
- > ```
94
-
95
- This is **the gate**. Nothing can be routed to a connection that has never
96
- answered. It also costs nothing: asking a provider for its list of models is a
97
- free request, and no model runs. Only if that list is unavailable does ORC send
98
- one tiny request instead — and it tells you which of the two actually answered.
99
-
100
- ```bash
101
- $ orc extra route set 0-30 cheap/deepseek-chat
102
- $ orc config set extra_enabled true
103
- $ orc extra route
104
- ```
105
-
106
- > ```
107
- > ORC · extra — the routing table
108
- >
109
- > [0,30) cheap/deepseek-chat api · VERIFIED
110
- > [30,40) orc-executor-sonnet-4-6-med claude
111
- > [40,55) orc-executor-sonnet-4-6-high claude
112
- > [55,65) orc-executor-sonnet-5-high claude
113
- > [65,70) orc-executor-opus-4-7-med claude
114
- > [70,80) orc-executor-opus-4-7-high claude
115
- > [80,90) orc-executor-opus-4-8-high claude
116
- > [90,100] orc-executor-opus-5-high claude
117
- >
118
- > A gap is not a hole — it is Claude, and it is printed so "I left the top band
119
- > on Opus on purpose" and "there is no top band" can never look the same.
120
- > ```
121
-
122
- **Read that last line twice.** Everything you did not route is still shown, with
123
- the exact model it will use. You never have to remember what you left alone.
124
-
125
- ---
126
-
127
- ## 2b. When the provider is a program on your computer
128
-
129
- Two of these are not websites. They are tools you install, and a tool can simply
130
- not be there — so ORC checks first, every time, and never remembers the answer.
131
-
132
- ```bash
133
- $ orc extra tools
134
- ```
135
-
136
- > ```
137
- > ORC · extra — local tools (catalog dated 2026-08-22)
138
- >
139
- > opencode ✔ ready
140
- > binary /usr/local/bin/opencode
141
- > version 1.17.4
142
- > floor 1.10.0
143
- > signed in yes
144
- > models 19
145
- >
146
- > codex ✖ absent
147
- > `codex` is not on PATH. Install it with:
148
- > npm i -g @openai/codex (npm)
149
- > brew install --cask codex (brew)
150
- > or run: orc extra install codex — opens a terminal and runs it there
151
- > there is no install-free alternative for this one — the install is the only route.
152
- > ```
153
-
154
- **Two things worth noticing.** The exact install command comes from ORC's dated
155
- catalog, not from memory — the common mistake here installs a completely
156
- unrelated package that has been sitting on npm since 2012. And the last line is
157
- not padding: one of these two tools *can* be used without installing anything,
158
- and this one cannot. ORC says which, rather than leaving you looking.
159
-
160
- If you try to connect anyway, it stops you before you have a broken connection
161
- rather than after:
162
-
163
- ```bash
164
- $ orc extra add cx --provider codex --engine cli --env-key OPENAI_API_KEY
165
- ```
166
-
167
- > ```
168
- > ❌ "codex" is a program that runs on this machine, and `codex` is not on PATH.
169
- > Install it: npm i -g @openai/codex
170
- > or run: orc extra install codex (opens a terminal and runs it there)
171
- > There is no install-free alternative for this one; the install is the only route.
172
- > ```
173
-
174
- ### Letting ORC install it
175
-
176
- ```bash
177
- $ orc extra install codex
178
- ```
179
-
180
- > ```
181
- > ┌──────────────────────────────────────────────┐
182
- > │ ORC will run this in YOUR terminal: │
183
- > │ │
184
- > │ npm i -g @openai/codex │
185
- > │ │
186
- > │ then check it with: codex --version │
187
- > └──────────────────────────────────────────────┘
188
- >
189
- > ✔ a terminal window opened — come back and press Re-check when it finishes
190
- > ```
191
-
192
- A window opens with the command printed in it before it runs. You can read it,
193
- scroll it, and stop it with Ctrl-C. **ORC never asks for administrator rights** —
194
- if the install needs them you will see it ask, in your own window, and that is
195
- yours to decide. If no window can be opened at all, you get the command to paste
196
- and nothing pretends it worked.
197
-
198
- ### Testing it properly
199
-
200
- A connection to a program is not one question, it is five, and ORC keeps them
201
- apart:
202
-
203
- ```bash
204
- $ orc extra ping oc
205
- ```
206
-
207
- > ```
208
- > ✔ oc verified via cli-models
209
- > /usr/local/bin/opencode
210
- >
211
- > 19 models: opencode/big-pickle, opencode-go/glm-5, opencode-go/kimi-k2.6, …
212
- >
213
- > ⚠ a model being LISTED is not a model that WORKS — a listed id can be dead
214
- > upstream. `orc extra models oc --test <id>` is the only thing that tells
215
- > those two apart.
216
- > ```
217
-
218
- That warning is not boilerplate. A model can be on the provider's own list and
219
- still fail the moment you call it:
220
-
221
- ```bash
222
- $ orc extra models oc --test opencode/deepseek-v4-flash-free
223
- ```
224
-
225
- > ```
226
- > ✖ opencode/deepseek-v4-flash-free — model_not_found
227
- > Upstream request failed: Model is unavailable. (400)
228
- > ```
229
-
230
- And when one does work, you see what came back and what it cost:
231
-
232
- ```bash
233
- $ orc extra ping oc --live
234
- ```
235
-
236
- > ```
237
- > ✔ oc verified via cli-live 14733ms
238
- >
239
- > reply: OK
240
- > new input 131 · written to cache 0 · read from cache 15616 · output 14
241
- >
242
- > ⚠ this tool does not say which model answered, so if it quietly used a
243
- > different one there is no way to tell from here.
244
- > ```
245
-
246
- **Read the cache number again.** A one-line message cost fifteen thousand words
247
- of input, because the tool loads its own instructions before it sends anything.
248
- That is why sending a real message is a separate button with its own warning,
249
- and why the free checks above are the ones that run by default.
250
-
251
- ---
252
-
253
- ## 3. A run, with it on
254
-
255
- ```
256
- > /orc build the CSV export
257
- ```
258
-
259
- > ```
260
- > ── ORC · preflight ───────────────────────────────────────────
261
- > wiki: FRESH (3 commits behind)
262
- > pattern: javascript — cached
263
- > extra: ON — 2 of 6 tasks foreign · cheap/deepseek-chat via api [0,30)
264
- > ──────────────────────────────────────────────────────────────
265
- > ```
266
-
267
- That `extra:` line is printed **before any work starts**, on every run where the
268
- feature is on. It is not optional and it has no quiet version. Two of the six
269
- tasks will leave this machine; the other four will not.
270
-
271
- Then the plan, with one extra column:
272
-
273
- > ```
274
- > wave 1
275
- > T01 add the CSV column headers score 18 via extra cheap/deepseek-chat
276
- > T02 wire the download button score 24 via extra cheap/deepseek-chat
277
- > T03 stream the rows without buffering score 61 via claude orc-executor-sonnet-5-high
278
- >
279
- > wave 2
280
- > T04 refund totals in the export score 46 via claude orc-executor-sonnet-4-6-high
281
- > ⛔ held on Claude — cited risk: money
282
- > ```
283
-
284
- **T04 scored 46, which is not in your foreign band anyway — but even if it had
285
- been, it would have stayed.** A task whose plan cites a risk like money, auth,
286
- security or data loss never leaves Claude. Nor does work in an area you have
287
- marked as one the AI should not attempt.
288
-
289
- ---
290
-
291
- ## 4. When it does not work
292
-
293
- Say the endpoint is down mid-run:
294
-
295
- > ```
296
- > ⚠ T02 foreign dispatch failed (timeout after 900s) — falling back to Claude
297
- > orc-executor-haiku-4-5 will finish this task. The run continues.
298
- > ```
299
-
300
- **A failed foreign dispatch is never a dead run.** It is announced, it falls back
301
- to the Claude model that task would have had, and the wave carries on. If you
302
- would rather stop than quietly start paying full rates, set `extra_on_failure` to
303
- `stop` — but you have to choose that; ORC will not choose it for you.
304
-
305
- ---
306
-
307
- ## 5. What it cost
308
-
309
- ```bash
310
- $ orc extra stats
311
- ```
312
-
313
- > ```
314
- > ORC · extra stats — .claude/orc/logs
315
- >
316
- > 15 foreign dispatches across 6 traces
317
- >
318
- > cheap [0,30) 15 done:13 partial:1 fallback:1 api
319
- > in 214k · cache-w 38k · cache-r 1.9M · out 61k
320
- > usd 0.41
321
- >
322
- > glm [30,55) 8 done:5 failed:1 fallback:1 claude-shim
323
- > in 96k · cache-w 0 · cache-r 0 · out 29k
324
- > ⚠ from 6/8 dispatches — 2 reported no counts
325
- > usd — (no rate for zai in the price table; a figure ORC did not price is never printed)
326
- > ```
327
-
328
- Three honest things in that small table:
329
-
330
- 1. **The four kinds of token are never added together.** Cache reads are usually
331
- the biggest number and cost about a tenth as much. One blended figure would
332
- mislead you about which band is actually expensive.
333
- 2. **"From 6 of 8 dispatches"** — two of them reported nothing, so the total is
334
- incomplete and it says so. Averaging the gap away would make an unknown cost
335
- look like a small one.
336
- 3. **`usd —`, not `usd 0.00`.** ORC ships no prices for these providers. Some
337
- charge different rates at different times of day; one sells a subscription
338
- instead of tokens. A price that is wrong by double is worse than no price,
339
- because people believe it. `orc extra rates` prints the exact lines to paste
340
- once you know your own rate.
341
-
342
- ---
343
-
344
- ## 6. The panel
345
-
346
- `orc ui` ▸ **Extra** shows the same thing as a picture: one bar from 0 to 100,
347
- green where your own connection runs the work and blue where Claude does. The
348
- ranges you did not route keep their place on the bar, so it never looks like the
349
- top of the ladder disappeared.
350
-
351
- You can add a connection and test it there too — the button runs the same
352
- command you would type, and the panel itself never talks to a model.
353
-
354
- At the top of that page, always visible, never hidden behind a click:
355
-
356
- > **What leaves this machine:** your request, the contents of the files that task
357
- > names, the tool results the worker asks for, and the code it writes back.
358
- >
359
- > **Who receives it:** the provider you configured, at the address on its
360
- > profile. Nobody else is in the path.
361
- >
362
- > **What ORC cannot promise:** how long that provider keeps your prompt, whether
363
- > it trains on it, or where in the world it runs. Those are their terms, not
364
- > ORC's — the catalog links them, and reading them is your call to make.
365
-
366
- ---
367
-
368
- ## 7. What to notice
369
-
370
- - **Off by default, and untested connections are unusable.** Two locks, not one.
371
- - **You are told before, not after.** The `extra:` line is printed at the start
372
- of the run, not in the summary.
373
- - **A gap is Claude, and it is drawn.** Nothing about your ladder is invisible.
374
- - **Risky work stays.** Money, auth, security, data loss — and anything in an
375
- area you marked as off-limits for the AI.
376
- - **A failure falls back and says so.** The run does not die and the cost change
377
- is not silent.
378
- - **No shipped model names and no shipped prices.** Both go stale, and a stale
379
- one gets believed.
380
- - **Your key is never on a command line.** It is either an environment variable
381
- your computer already protects, or it is encrypted here with a passphrase ORC
382
- does not keep and cannot recover.
383
-
384
- ---
385
-
386
- ## 8. Related
387
-
388
- - [`/orc`](orc.md) — the full lane this plugs into
389
- - [`/orc-budget`](orc-budget.md) — what a run will cost before you run it
390
- - [`/orc-boundary`](orc-boundary.md) — the areas the AI should not attempt, which
391
- are also the areas that never go to another model
392
- - `guides/extra-models.md` — the setup detail for every provider
1
+ # Mock run — `orc extra`
2
+
3
+ > Run some of ORC's work on a different AI model, and still know exactly what
4
+ > left your machine. DeepSeek, GLM, Kimi, a model on your own laptop, or any
5
+ > endpoint you name.
6
+
7
+ ---
8
+
9
+ ## 1. What it does
10
+
11
+ ORC gives every task a score, from 0 to 100, for how hard it is. Then it picks
12
+ the cheapest Claude model that can still do it. A tiny rename does not need the
13
+ biggest model.
14
+
15
+ `orc extra` adds one step. You can say: **"this part of the ladder should run
16
+ somewhere else."**
17
+
18
+ ```
19
+ score 0 ──────── 30 ──────── 55 ──────── 100
20
+ └ DeepSeek ┘└─────── Claude ───────┘
21
+ (yours) (unchanged)
22
+ ```
23
+
24
+ Three things stay true, always:
25
+
26
+ | | |
27
+ |---|---|
28
+ | **ORC itself never moves** | Only the task is sent away. The planning, the reviewing and the checking stay where they are. |
29
+ | **Nothing happens until you say so** | It is off by default, and a connection you have not tested can never be used. |
30
+ | **You are always told** | Every run that will send work away prints a line saying so, **before** the work starts. |
31
+
32
+ ---
33
+
34
+ ## 2. Setting one up
35
+
36
+ Six commands. The comments say why each one exists.
37
+
38
+ ```bash
39
+ $ orc extra providers
40
+ ```
41
+
42
+ > ```
43
+ > ORC · extra — 14 providers (catalog dated 2026-08-22)
44
+ >
45
+ > deepseek DeepSeek api · claude-shim
46
+ > zai Z.ai (GLM) api · claude-shim
47
+ > moonshot Moonshot (Kimi) [cn] api · claude-shim
48
+ > ollama Ollama (local) api · claude-shim
49
+ > opencode OpenCode cli
50
+ > codex Codex cli
51
+ > custom Custom endpoint api · claude-shim · cli
52
+ >
53
+ > Model ids are NOT shipped — they rot within a quarter.
54
+ > ```
55
+
56
+ **Why no model names?** A model name that ships in a package is wrong within a
57
+ few months, and wrong quietly. It would break in the middle of your work. ORC
58
+ asks the provider for the real list instead, in a moment.
59
+
60
+ ```bash
61
+ $ orc extra add cheap --provider deepseek --engine api --env-key DEEPSEEK_API_KEY
62
+ ```
63
+
64
+ > ```
65
+ > Added profile cheap → .claude/orc/extra.json
66
+ >
67
+ > provider deepseek DeepSeek
68
+ > engine api
69
+ > base url https://api.deepseek.com
70
+ > credential env DEEPSEEK_API_KEY
71
+ > verified no — nothing routes to an unverified profile
72
+ >
73
+ > Next: orc extra ping cheap
74
+ >
75
+ > A profile does nothing until a route points at it. Nothing has changed
76
+ > about how this repo builds yet.
77
+ > ```
78
+
79
+ **Note what it stored: the NAME of an environment variable, not your key.** ORC
80
+ never asks for the key itself here, and it refuses a `--key` flag on purpose —
81
+ anything you type on a command line is visible to other programs and is saved in
82
+ your shell history.
83
+
84
+ ```bash
85
+ $ orc extra ping cheap
86
+ ```
87
+
88
+ > ```
89
+ > ✅ cheap verified via models 412ms
90
+ > https://api.deepseek.com
91
+ >
92
+ > 2 models: deepseek-chat, deepseek-reasoner
93
+ > ```
94
+
95
+ This is **the gate**. Nothing can be routed to a connection that has never
96
+ answered. It also costs nothing: asking a provider for its list of models is a
97
+ free request, and no model runs. Only if that list is unavailable does ORC send
98
+ one tiny request instead — and it tells you which of the two actually answered.
99
+
100
+ ```bash
101
+ $ orc extra route set 0-30 cheap/deepseek-chat
102
+ $ orc config set extra_enabled true
103
+ $ orc extra route
104
+ ```
105
+
106
+ > ```
107
+ > ORC · extra — the routing table
108
+ >
109
+ > [0,30) cheap/deepseek-chat api · VERIFIED
110
+ > [30,31) orc-executor-sonnet-5-med claude
111
+ > [31,41) orc-executor-sonnet-5-high claude
112
+ > [41,90) orc-executor-opus-5-low claude
113
+ > [90,100] orc-executor-opus-5-med claude
114
+ >
115
+ > A gap is not a hole — it is Claude, and it is printed so "I left the top band
116
+ > on Opus on purpose" and "there is no top band" can never look the same.
117
+ > ```
118
+
119
+ **Read that last line twice.** Everything you did not route is still shown, with
120
+ the exact model it will use. You never have to remember what you left alone.
121
+
122
+ ---
123
+
124
+ ## 2b. When the provider is a program on your computer
125
+
126
+ Two of these are not websites. They are tools you install, and a tool can simply
127
+ not be there — so ORC checks first, every time, and never remembers the answer.
128
+
129
+ ```bash
130
+ $ orc extra tools
131
+ ```
132
+
133
+ > ```
134
+ > ORC · extra — local tools (catalog dated 2026-08-22)
135
+ >
136
+ > opencode ✔ ready
137
+ > binary /usr/local/bin/opencode
138
+ > version 1.17.4
139
+ > floor 1.10.0
140
+ > signed in yes
141
+ > models 19
142
+ >
143
+ > codex ✖ absent
144
+ > `codex` is not on PATH. Install it with:
145
+ > npm i -g @openai/codex (npm)
146
+ > brew install --cask codex (brew)
147
+ > or run: orc extra install codex — opens a terminal and runs it there
148
+ > there is no install-free alternative for this one — the install is the only route.
149
+ > ```
150
+
151
+ **Two things worth noticing.** The exact install command comes from ORC's dated
152
+ catalog, not from memory — the common mistake here installs a completely
153
+ unrelated package that has been sitting on npm since 2012. And the last line is
154
+ not padding: one of these two tools *can* be used without installing anything,
155
+ and this one cannot. ORC says which, rather than leaving you looking.
156
+
157
+ If you try to connect anyway, it stops you before you have a broken connection
158
+ rather than after:
159
+
160
+ ```bash
161
+ $ orc extra add cx --provider codex --engine cli --env-key OPENAI_API_KEY
162
+ ```
163
+
164
+ > ```
165
+ > ❌ "codex" is a program that runs on this machine, and `codex` is not on PATH.
166
+ > Install it: npm i -g @openai/codex
167
+ > or run: orc extra install codex (opens a terminal and runs it there)
168
+ > There is no install-free alternative for this one; the install is the only route.
169
+ > ```
170
+
171
+ ### Letting ORC install it
172
+
173
+ ```bash
174
+ $ orc extra install codex
175
+ ```
176
+
177
+ > ```
178
+ > ┌──────────────────────────────────────────────┐
179
+ > │ ORC will run this in YOUR terminal: │
180
+ > │ │
181
+ > │ npm i -g @openai/codex │
182
+ > │ │
183
+ > │ then check it with: codex --version │
184
+ > └──────────────────────────────────────────────┘
185
+ >
186
+ > ✔ a terminal window opened — come back and press Re-check when it finishes
187
+ > ```
188
+
189
+ A window opens with the command printed in it before it runs. You can read it,
190
+ scroll it, and stop it with Ctrl-C. **ORC never asks for administrator rights** —
191
+ if the install needs them you will see it ask, in your own window, and that is
192
+ yours to decide. If no window can be opened at all, you get the command to paste
193
+ and nothing pretends it worked.
194
+
195
+ ### Testing it properly
196
+
197
+ A connection to a program is not one question, it is five, and ORC keeps them
198
+ apart:
199
+
200
+ ```bash
201
+ $ orc extra ping oc
202
+ ```
203
+
204
+ > ```
205
+ > ✔ oc verified via cli-models
206
+ > /usr/local/bin/opencode
207
+ >
208
+ > 19 models: opencode/big-pickle, opencode-go/glm-5, opencode-go/kimi-k2.6, …
209
+ >
210
+ > ⚠ a model being LISTED is not a model that WORKS — a listed id can be dead
211
+ > upstream. `orc extra models oc --test <id>` is the only thing that tells
212
+ > those two apart.
213
+ > ```
214
+
215
+ That warning is not boilerplate. A model can be on the provider's own list and
216
+ still fail the moment you call it:
217
+
218
+ ```bash
219
+ $ orc extra models oc --test opencode/deepseek-v4-flash-free
220
+ ```
221
+
222
+ > ```
223
+ > ✖ opencode/deepseek-v4-flash-free — model_not_found
224
+ > Upstream request failed: Model is unavailable. (400)
225
+ > ```
226
+
227
+ And when one does work, you see what came back and what it cost:
228
+
229
+ ```bash
230
+ $ orc extra ping oc --live
231
+ ```
232
+
233
+ > ```
234
+ > ✔ oc verified via cli-live 14733ms
235
+ >
236
+ > reply: OK
237
+ > new input 131 · written to cache 0 · read from cache 15616 · output 14
238
+ >
239
+ > ⚠ this tool does not say which model answered, so if it quietly used a
240
+ > different one there is no way to tell from here.
241
+ > ```
242
+
243
+ **Read the cache number again.** A one-line message cost fifteen thousand words
244
+ of input, because the tool loads its own instructions before it sends anything.
245
+ That is why sending a real message is a separate button with its own warning,
246
+ and why the free checks above are the ones that run by default.
247
+
248
+ ---
249
+
250
+ ## 3. A run, with it on
251
+
252
+ ```
253
+ > /orc build the CSV export
254
+ ```
255
+
256
+ > ```
257
+ > ── ORC · preflight ───────────────────────────────────────────
258
+ > wiki: FRESH (3 commits behind)
259
+ > pattern: javascript — cached
260
+ > extra: ON — 2 of 6 tasks foreign · cheap/deepseek-chat via api [0,30)
261
+ > ──────────────────────────────────────────────────────────────
262
+ > ```
263
+
264
+ That `extra:` line is printed **before any work starts**, on every run where the
265
+ feature is on. It is not optional and it has no quiet version. Two of the six
266
+ tasks will leave this machine; the other four will not.
267
+
268
+ Then the plan, with one extra column:
269
+
270
+ > ```
271
+ > wave 1
272
+ > T01 add the CSV column headers score 18 via extra cheap/deepseek-chat
273
+ > T02 wire the download button score 24 via extra cheap/deepseek-chat
274
+ > T03 stream the rows without buffering score 61 via claude orc-executor-opus-5-low
275
+ >
276
+ > wave 2
277
+ > T04 refund totals in the export score 46 via claude orc-executor-opus-5-low
278
+ > ⛔ held on Claude — cited risk: money
279
+ > ```
280
+
281
+ **T04 scored 46, which is not in your foreign band anyway — but even if it had
282
+ been, it would have stayed.** A task whose plan cites a risk like money, auth,
283
+ security or data loss never leaves Claude. Nor does work in an area you have
284
+ marked as one the AI should not attempt.
285
+
286
+ ---
287
+
288
+ ## 4. When it does not work
289
+
290
+ Say the endpoint is down mid-run:
291
+
292
+ > ```
293
+ > ⚠ T02 foreign dispatch failed (timeout after 900s) — falling back to Claude
294
+ > orc-executor-sonnet-5-med will finish this task. The run continues.
295
+ > ```
296
+
297
+ **A failed foreign dispatch is never a dead run.** It is announced, it falls back
298
+ to the Claude model that task would have had, and the wave carries on. If you
299
+ would rather stop than quietly start paying full rates, set `extra_on_failure` to
300
+ `stop` — but you have to choose that; ORC will not choose it for you.
301
+
302
+ ---
303
+
304
+ ## 5. What it cost
305
+
306
+ ```bash
307
+ $ orc extra stats
308
+ ```
309
+
310
+ > ```
311
+ > ORC · extra stats — .claude/orc/logs
312
+ >
313
+ > 15 foreign dispatches across 6 traces
314
+ >
315
+ > cheap [0,30) 15 done:13 partial:1 fallback:1 api
316
+ > in 214k · cache-w 38k · cache-r 1.9M · out 61k
317
+ > usd 0.41
318
+ >
319
+ > glm [30,55) 8 done:5 failed:1 fallback:1 claude-shim
320
+ > in 96k · cache-w 0 · cache-r 0 · out 29k
321
+ > ⚠ from 6/8 dispatches — 2 reported no counts
322
+ > usd — (no rate for zai in the price table; a figure ORC did not price is never printed)
323
+ > ```
324
+
325
+ Three honest things in that small table:
326
+
327
+ 1. **The four kinds of token are never added together.** Cache reads are usually
328
+ the biggest number and cost about a tenth as much. One blended figure would
329
+ mislead you about which band is actually expensive.
330
+ 2. **"From 6 of 8 dispatches"** — two of them reported nothing, so the total is
331
+ incomplete and it says so. Averaging the gap away would make an unknown cost
332
+ look like a small one.
333
+ 3. **`usd —`, not `usd 0.00`.** ORC ships no prices for these providers. Some
334
+ charge different rates at different times of day; one sells a subscription
335
+ instead of tokens. A price that is wrong by double is worse than no price,
336
+ because people believe it. `orc extra rates` prints the exact lines to paste
337
+ once you know your own rate.
338
+
339
+ ---
340
+
341
+ ## 6. The panel
342
+
343
+ `orc ui` ▸ **Extra** shows the same thing as a picture: one bar from 0 to 100,
344
+ green where your own connection runs the work and blue where Claude does. The
345
+ ranges you did not route keep their place on the bar, so it never looks like the
346
+ top of the ladder disappeared.
347
+
348
+ You can add a connection and test it there too — the button runs the same
349
+ command you would type, and the panel itself never talks to a model.
350
+
351
+ At the top of that page, always visible, never hidden behind a click:
352
+
353
+ > **What leaves this machine:** your request, the contents of the files that task
354
+ > names, the tool results the worker asks for, and the code it writes back.
355
+ >
356
+ > **Who receives it:** the provider you configured, at the address on its
357
+ > profile. Nobody else is in the path.
358
+ >
359
+ > **What ORC cannot promise:** how long that provider keeps your prompt, whether
360
+ > it trains on it, or where in the world it runs. Those are their terms, not
361
+ > ORC's — the catalog links them, and reading them is your call to make.
362
+
363
+ ---
364
+
365
+ ## 7. What to notice
366
+
367
+ - **Off by default, and untested connections are unusable.** Two locks, not one.
368
+ - **You are told before, not after.** The `extra:` line is printed at the start
369
+ of the run, not in the summary.
370
+ - **A gap is Claude, and it is drawn.** Nothing about your ladder is invisible.
371
+ - **Risky work stays.** Money, auth, security, data loss — and anything in an
372
+ area you marked as off-limits for the AI.
373
+ - **A failure falls back and says so.** The run does not die and the cost change
374
+ is not silent.
375
+ - **No shipped model names and no shipped prices.** Both go stale, and a stale
376
+ one gets believed.
377
+ - **Your key is never on a command line.** It is either an environment variable
378
+ your computer already protects, or it is encrypted here with a passphrase ORC
379
+ does not keep and cannot recover.
380
+
381
+ ---
382
+
383
+ ## 8. Related
384
+
385
+ - [`/orc`](orc.md) — the full lane this plugs into
386
+ - [`/orc-budget`](orc-budget.md) — what a run will cost before you run it
387
+ - [`/orc-boundary`](orc-boundary.md) — the areas the AI should not attempt, which
388
+ are also the areas that never go to another model
389
+ - `guides/extra-models.md` — the setup detail for every provider