@azure-id/orc 1.2.0 → 1.4.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.
- package/CHANGELOG.md +296 -0
- package/README-id.md +44 -0
- package/README.md +54 -78
- package/bin/cli.js +2615 -5
- package/bin/verify-contracts.js +60 -1
- package/bin/verify-package.js +588 -568
- package/bin/webui/api.js +71 -0
- package/bin/webui/app.html +213 -210
- package/bin/webui/css/06-responsive.css +28 -0
- package/bin/webui/css/panels/hookui.css +379 -0
- package/bin/webui/fixtures/hookui.js +409 -0
- package/bin/webui/fixtures/index.js +17 -0
- package/bin/webui/i18n/en/hookui.json +119 -0
- package/bin/webui/i18n/en/nav.json +22 -21
- package/bin/webui/i18n/en/overview.json +4 -1
- package/bin/webui/i18n/en/tour.json +3 -1
- package/bin/webui/i18n/id/hookui.json +119 -0
- package/bin/webui/i18n/id/nav.json +22 -21
- package/bin/webui/i18n/id/overview.json +4 -1
- package/bin/webui/i18n/id/tour.json +3 -1
- package/bin/webui/js/01-i18n.js +152 -151
- package/bin/webui/js/90-tour.js +6 -0
- package/bin/webui/js/panels/hookui.js +891 -0
- package/bin/webui/js/panels/overview.js +7 -0
- package/package.json +1 -1
- package/templates/hooks/README.md +280 -0
- package/templates/hooks/orc-statusline-render.js +921 -0
- package/templates/hooks/orc-statusline.js +1090 -87
- package/templates/hooks/orc-subagent-line.js +219 -0
|
@@ -64,6 +64,13 @@ const FINDING_ROUTE = {
|
|
|
64
64
|
// rather than left to DEFAULT_FINDING_ROUTE because the CTA is specific --
|
|
65
65
|
// a reader who sees "lane config drifted" should be told which button.
|
|
66
66
|
"lane-keys-drifted": { panel: "maintenance", cta: "overview.item.laneKeysDrifted.cta" },
|
|
67
|
+
// v1.3.0. The rule again, and cleanly: every one of these is cleared on the
|
|
68
|
+
// CLI Hook Interface panel — the board is where an orphaned component is
|
|
69
|
+
// removed, the caution strip is where an invalid layout is named, and the
|
|
70
|
+
// Rebuild button is where a stale compile is fixed.
|
|
71
|
+
"statusline-layout-orphaned": { panel: "hookui", cta: "overview.item.statuslineOrphaned.cta" },
|
|
72
|
+
"statusline-layout-invalid": { panel: "hookui", cta: "overview.item.statuslineInvalid.cta" },
|
|
73
|
+
"statusline-layout-unreadable": { panel: "hookui", cta: "overview.item.statuslineUnreadable.cta" },
|
|
67
74
|
};
|
|
68
75
|
const DEFAULT_FINDING_ROUTE = { panel: "maintenance", cta: "overview.item.doctor.cta" };
|
|
69
76
|
const findingRoute = (id) => FINDING_ROUTE[id] || DEFAULT_FINDING_ROUTE;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-id/orc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "ORC — an orchestrator skill constellation for Claude Code: intake, planning, scored parallel subagents, code-pattern matching, review, verify, ship, plus a project knowledge-base wiki.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"orc": "bin/cli.js"
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# The ORC status line
|
|
2
|
+
|
|
3
|
+
> This page is written in Simplified Technical English. Short sentences, one
|
|
4
|
+
> idea each, plain words. See `bin/webui/i18n/TERMS.md` for the term list.
|
|
5
|
+
|
|
6
|
+
ORC shows two lines at the bottom of your terminal. Claude Code draws them.
|
|
7
|
+
ORC writes them.
|
|
8
|
+
|
|
9
|
+
Every value comes from a file on your disk or from data Claude Code gives the
|
|
10
|
+
hook. No value costs model tokens. Nothing here starts a run.
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
🚀 ORC v1.2.1 - Opus 5/high · context (34%) · 5h 41% (2h13m) ↔ wk 12% · ucs 6% · wiki: fresh
|
|
14
|
+
▰ status: quick · Q3 DO · agents 7 (2 running) · orc-extra: on · Dur 48m · MTok 412K · main
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Line 1 answers: **what model am I on, and how much do I have left?**
|
|
18
|
+
Line 2 answers: **what is this session doing?**
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Line 1
|
|
23
|
+
|
|
24
|
+
### 1. The icon and `ORC v1.2.1 - Opus 5/high`
|
|
25
|
+
|
|
26
|
+
The icon is the verdict. The words are the ORC version you have installed and
|
|
27
|
+
the model and effort you are running now.
|
|
28
|
+
|
|
29
|
+
| Icon | Meaning | What to do |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| ✅ | Good. This is the base tier. | Nothing. |
|
|
32
|
+
| 🚀 | Better than the base tier. | Nothing. |
|
|
33
|
+
| ⛔ | ORC will work less well here. | Read the reason in brackets. Change the model or the effort. |
|
|
34
|
+
|
|
35
|
+
The ⛔ line always gives a reason:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
⛔ ORC v1.2.1 - Sonnet 5/high (model≠Opus5/Opus4.8/Fable5) · context (34%)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If ORC cannot read its own version, it shows `ORC` with no number. It does not
|
|
42
|
+
guess.
|
|
43
|
+
|
|
44
|
+
**This line can only warn you.** A status line cannot stop a command. The
|
|
45
|
+
`orc-effort-guard.js` hook is what stops a run at a low effort.
|
|
46
|
+
|
|
47
|
+
### 2. `context (34%)`
|
|
48
|
+
|
|
49
|
+
How full the context window is. At 100% Claude Code must compact the session.
|
|
50
|
+
|
|
51
|
+
### 3. `5h 41% (2h13m) ↔ wk 12%`
|
|
52
|
+
|
|
53
|
+
Your subscription use. Anthropic sends these numbers; ORC does not estimate
|
|
54
|
+
them.
|
|
55
|
+
|
|
56
|
+
- `5h 41%` — you used 41% of the 5-hour window.
|
|
57
|
+
- `(2h13m)` — the 5-hour window resets in 2 hours and 13 minutes.
|
|
58
|
+
- `wk 12%` — you used 12% of the 7-day window.
|
|
59
|
+
|
|
60
|
+
A `⚠` appears at 75%. A `⛔` appears at 90%, and the verdict changes to ⛔.
|
|
61
|
+
|
|
62
|
+
Older versions of Claude Code do not send these numbers. Then this part is
|
|
63
|
+
absent.
|
|
64
|
+
|
|
65
|
+
### 4. `ucs 6%`
|
|
66
|
+
|
|
67
|
+
**ucs = usage, current session.** The 5-hour window moved 6% while this session
|
|
68
|
+
ran.
|
|
69
|
+
|
|
70
|
+
Two facts to know:
|
|
71
|
+
|
|
72
|
+
- The window is for your **whole account**. A second terminal moves it too. So
|
|
73
|
+
`ucs` is what moved, not only what you used here.
|
|
74
|
+
- A window reset is not a refund. ORC banks what you used before the reset. The
|
|
75
|
+
count continues.
|
|
76
|
+
|
|
77
|
+
`ucs 0%` is an answer. It means nothing measurable moved yet.
|
|
78
|
+
|
|
79
|
+
### 5. Extra parts
|
|
80
|
+
|
|
81
|
+
These parts appear only when they apply.
|
|
82
|
+
|
|
83
|
+
| Part | Meaning |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `wiki: fresh` / `AGING (14c)` / `STALE (52c)` | How old your project wiki is. The number is commits since the scan. |
|
|
86
|
+
| `wiki: UNREGISTERED (run \`orc wiki sync\`)` | You have wiki documents, but no index. The fix is free. |
|
|
87
|
+
| `diy:my-flow READY` / `STALE→recompile` | Your `/orc-diy` flow. `STALE` means you must run `orc diy compile`. |
|
|
88
|
+
| `orc 1.2.2 available` | A newer ORC exists. Run `orc upgrade`. |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Line 2
|
|
93
|
+
|
|
94
|
+
### 1. `▰ status: quick · Q3 DO`
|
|
95
|
+
|
|
96
|
+
The lane that is running now, and the phase it is in. The small symbol in front
|
|
97
|
+
moves. Each kind of phase has its own symbol.
|
|
98
|
+
|
|
99
|
+
| Symbol | Kind | The lane is |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| `◔ ◑ ◕ ●` | look | reading files and collecting facts |
|
|
102
|
+
| `? ¿` | ask | waiting for your answer |
|
|
103
|
+
| `▁ ▃ ▅ ▇` | plan | deciding what to do and in what order |
|
|
104
|
+
| `▰ ▱` | do | running agents that write code |
|
|
105
|
+
| `◇ ◈ ◆` | check | reviewing, verifying or testing |
|
|
106
|
+
| `› » ≫` | ship | finishing and handing over |
|
|
107
|
+
| `· ˙` | wait | stopped on purpose |
|
|
108
|
+
| braille | generic | a phase with no symbol of its own |
|
|
109
|
+
|
|
110
|
+
**This part can be absent, and that is correct.** ORC shows a phase only when a
|
|
111
|
+
file on disk proves it. Two things prove a phase: an agent that ORC dispatched,
|
|
112
|
+
or a phase note the run wrote to its trace.
|
|
113
|
+
|
|
114
|
+
So some phases show nothing:
|
|
115
|
+
|
|
116
|
+
- a phase that only reads files and asks you a question, for example `Q1 LOOK`
|
|
117
|
+
and `Q2 ASK` in `/orc-quick`;
|
|
118
|
+
- a run that stopped more than 10 minutes ago;
|
|
119
|
+
- a worker that runs outside Claude (`orc extra`), unless the run wrote a note.
|
|
120
|
+
|
|
121
|
+
ORC hides the part instead of guessing. A wrong phase is worse than no phase.
|
|
122
|
+
|
|
123
|
+
**The symbol is not a progress bar.** Claude Code draws the status line when
|
|
124
|
+
something happens. So the symbol moves while you type and while ORC works. It
|
|
125
|
+
stops when the session is idle. That is true, and it is the design.
|
|
126
|
+
|
|
127
|
+
To turn the motion off, set `ORC_STATUSLINE_MOTION=0`.
|
|
128
|
+
To use plain ASCII symbols, set `ORC_STATUSLINE_ASCII=1`.
|
|
129
|
+
|
|
130
|
+
### 2. `agents 7 (2 running)`
|
|
131
|
+
|
|
132
|
+
How many agents this session dispatched, and how many have not returned yet.
|
|
133
|
+
|
|
134
|
+
`(2 running)` is important. If you see a number here and nothing is happening,
|
|
135
|
+
an agent is still working. Do not start the same task again. Run
|
|
136
|
+
`orc run inflight` to check.
|
|
137
|
+
|
|
138
|
+
Two limits:
|
|
139
|
+
|
|
140
|
+
- ORC counts only agents it dispatched with a name. A quick read that uses no
|
|
141
|
+
named agent is not counted.
|
|
142
|
+
- If you continue an agent instead of dispatching a new one, ORC cannot see it.
|
|
143
|
+
So this number is a floor, not a total.
|
|
144
|
+
|
|
145
|
+
### 3. `orc-extra: on`
|
|
146
|
+
|
|
147
|
+
`on` means ORC may send some work to a provider that is not Claude. `off` means
|
|
148
|
+
all work stays on Claude.
|
|
149
|
+
|
|
150
|
+
To change it, run `orc config set extra_enabled true` or `false`.
|
|
151
|
+
|
|
152
|
+
### 4. `Dur 48m`
|
|
153
|
+
|
|
154
|
+
How long this session has run.
|
|
155
|
+
|
|
156
|
+
### 5. `MTok 412K`
|
|
157
|
+
|
|
158
|
+
**MTok = main token.** The tokens your **main session** used. `412K` is 412
|
|
159
|
+
thousand.
|
|
160
|
+
|
|
161
|
+
This is the sum of all four token kinds: new input, cache write, cache read and
|
|
162
|
+
output.
|
|
163
|
+
|
|
164
|
+
**Claude Code does not record tokens for a dispatched agent.** So an hour of
|
|
165
|
+
agent work adds almost nothing to this number. `MTok` tells you how much your
|
|
166
|
+
own conversation costs. It does not tell you what a run costs.
|
|
167
|
+
|
|
168
|
+
For the true cost of a run, use `orc usage report` or `/orc-budget`.
|
|
169
|
+
|
|
170
|
+
`MTok —` means ORC could not measure it. It never shows `0`, because `0` would
|
|
171
|
+
say the session was free.
|
|
172
|
+
|
|
173
|
+
### 6. `main`
|
|
174
|
+
|
|
175
|
+
The branch you are on. A detached HEAD shows as `@a1b2c3d`.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## If a part is missing
|
|
180
|
+
|
|
181
|
+
| You see | Reason |
|
|
182
|
+
|---|---|
|
|
183
|
+
| Only one line | The hook could not read your `.claude/orc/` folder. It failed quietly, which is correct: a status line must never break your session. |
|
|
184
|
+
| No `status:` | No run is active, or the phase cannot be proved. See above. |
|
|
185
|
+
| No branch | This folder is not a Git repository. |
|
|
186
|
+
| `MTok —` | ORC could not read the session transcript. |
|
|
187
|
+
| No `5h`/`wk` | Your Claude Code version does not send usage numbers. |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Your own status line
|
|
192
|
+
|
|
193
|
+
You can build your own instead of this one. It is **off** by default, and while
|
|
194
|
+
it is off this file describes exactly what you see.
|
|
195
|
+
|
|
196
|
+
Open the panel:
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
orc ui
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Then go to **CLI Hook Interface**. You put components into three lines and drag
|
|
203
|
+
them where you want them. One rule decides where a component may go:
|
|
204
|
+
|
|
205
|
+
> A line may hold a component only if every line above it holds at least one.
|
|
206
|
+
|
|
207
|
+
So line 1 must hold something before line 2 can, and line 2 before line 3. Each
|
|
208
|
+
line holds at most five components. The panel will not let you make an illegal
|
|
209
|
+
move, and it tells you why.
|
|
210
|
+
|
|
211
|
+
Every component can be changed: its words, its colour, its shape, how wide it
|
|
212
|
+
is, and when it is allowed to disappear.
|
|
213
|
+
|
|
214
|
+
**Three things a terminal cannot do**, said plainly so you do not look for them:
|
|
215
|
+
|
|
216
|
+
| You may want | What you get |
|
|
217
|
+
|---|---|
|
|
218
|
+
| A bigger font | The terminal owns the font size. Use **bold**, or make a component wider — a bar at width 12 is a big object. |
|
|
219
|
+
| A blinking part | Refused. Half of terminals turn it off, and no part of a status line needs it. |
|
|
220
|
+
| Icon-font symbols | Not shipped. They need a font we cannot check for, and they draw as empty boxes without it. |
|
|
221
|
+
|
|
222
|
+
There is a command-line half (`orc statusline`). It exists so the panel has
|
|
223
|
+
something to run. Building a three-line layout by typing flags is harder than
|
|
224
|
+
dragging, so the panel is the recommended way.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## The agent panel
|
|
229
|
+
|
|
230
|
+
When ORC sends work to a subagent, Claude Code shows a row for it in the agent
|
|
231
|
+
panel. ORC can draw that row too — `orc ui` ▸ **CLI Hook Interface**, then pick
|
|
232
|
+
the **subagent** board.
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
● orc-executor-opus-5-low O5/low 84K ███▎░░░░ 42% for 17m
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
It is off by default, and while it is off you see Claude Code's own row.
|
|
239
|
+
|
|
240
|
+
**One thing here runs whether the row is on or off**, and it is worth knowing
|
|
241
|
+
about. Claude Code tells this hook **how many tokens each agent has used**.
|
|
242
|
+
Nothing else tells ORC that: the conversation file records no token use for a
|
|
243
|
+
subagent at all. So ORC writes down what the panel reports, and `orc usage
|
|
244
|
+
report` shows it.
|
|
245
|
+
|
|
246
|
+
**It is a floor, not a total.** ORC only sees an agent while it is in the panel.
|
|
247
|
+
An agent that starts and ends between two redraws is never seen, and a number
|
|
248
|
+
read just before an agent ended is short by whatever came after. `orc usage
|
|
249
|
+
report` says so on every one of these numbers. It never shows `0` for something
|
|
250
|
+
it did not see.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## For maintainers
|
|
255
|
+
|
|
256
|
+
- The hook is `orc-statusline.js`. `orc init` installs it and wires it into
|
|
257
|
+
`.claude/settings.json`. It never replaces a status line you already have.
|
|
258
|
+
- The phase list is **not** in the hook. `orc init` and `orc update` write it to
|
|
259
|
+
`hooks/orc-lane-rails.json` from the CLI registries. Run `orc lane rails` to
|
|
260
|
+
read it. The hook renders that file and decides nothing about it.
|
|
261
|
+
- The hook reads the disk once every 5 seconds and caches the answer, because a
|
|
262
|
+
status line redraws on every keystroke. `MTok` reads only the new bytes of the
|
|
263
|
+
transcript. The wiki part joined that scan in v1.3.0: it used to start a `git`
|
|
264
|
+
process on every redraw.
|
|
265
|
+
- `ORC_STATUSLINE_SCAN_MS` is the one seam over that budget. It exists for
|
|
266
|
+
tests. Nothing in ORC sets it.
|
|
267
|
+
- **The budget is small.** Claude Code waits 300 ms between redraws and stops a
|
|
268
|
+
script that is still running when the next redraw starts. On Windows, starting
|
|
269
|
+
`node` alone takes about 285 ms of that. So the hook has about 15 ms to do all
|
|
270
|
+
its work. This is why nothing here starts a process, and why every answer is
|
|
271
|
+
cached.
|
|
272
|
+
- The custom layout is COMPILED. `orc statusline` turns what you composed into a
|
|
273
|
+
flat render program (`statusline-compiled.json`) with every colour worked out
|
|
274
|
+
in advance, and the hook only walks it. The hook never reads the layout you
|
|
275
|
+
authored. If the compiled file is missing, stale, or does not pass a cheap
|
|
276
|
+
shape check, the hook silently renders the shipped lines instead and
|
|
277
|
+
`orc doctor` names the reason.
|
|
278
|
+
- The cache file is `.claude/orc/usage-session.json`. The hook reads it once and
|
|
279
|
+
writes it once, after the text is ready. It stores raw numbers only — never a
|
|
280
|
+
word like `fresh` or `STALE`, which is computed each time it is shown.
|