crewbus 10.0.12 → 11.3.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.
- package/AGENTS.template.md +4 -4
- package/CHANGELOG.md +153 -0
- package/README.md +69 -44
- package/TEAM.template.md +1 -1
- package/bin/crewbus-hook.js +22 -5
- package/bin/crewbus-mcp.js +56 -48
- package/bin/crewbus.js +459 -238
- package/bin/lib/channels.js +1 -1
- package/bin/lib/export.js +1 -1
- package/bin/lib/groups.js +1 -5
- package/bin/lib/identity.js +90 -128
- package/bin/lib/launch.js +63 -8
- package/bin/lib/relay.js +25 -42
- package/bin/lib/spawn.js +155 -162
- package/bin/lib/store.js +2 -2
- package/bin/lib/web.js +241 -60
- package/claude-plugin/skills/crewbus/SKILL.md +1 -1
- package/docs/APPROVALS.md +8 -8
- package/docs/AUDIT_EXPORT.md +7 -7
- package/docs/CERT_READINESS.md +5 -5
- package/docs/COMPATIBILITY.md +6 -2
- package/docs/CONSOLIDATOR.md +6 -6
- package/docs/CONTROL_PLANE_SPEC.md +3 -3
- package/docs/CREWS.md +58 -55
- package/docs/DELIVERY.md +11 -8
- package/docs/GROUPS.md +8 -8
- package/docs/IDENTITY.md +6 -6
- package/docs/LONG_RUNS.md +3 -3
- package/docs/ORCHESTRATOR.md +87 -0
- package/docs/PAIRING.md +7 -7
- package/docs/QUICKSTART.md +81 -70
- package/docs/RBAC.md +84 -73
- package/docs/TENANCY.md +10 -10
- package/docs/THREAT_MODEL.md +3 -3
- package/docs/VERIFIER.md +10 -10
- package/docs/VERSION_SKEW.md +1 -1
- package/documentation.html +34 -24
- package/examples/hermes-pairing.md +3 -3
- package/examples/t3-pairing.md +1 -1
- package/index.html +6 -6
- package/opencode/plugins/dm-watch.js +1 -1
- package/opencode/tools/dm-send.js +1 -1
- package/package.json +27 -2
- package/packages/contracts/harness.json +15 -1
- package/packages/contracts/launch.json +2 -3
- package/packages/contracts/pairing.json +3 -3
- package/docs/LEAD_ASSIGN.md +0 -74
- package/docs/M1_CLI_DRAFT.md +0 -175
package/docs/M1_CLI_DRAFT.md
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
# M1 CLI draft — `launch` wizard, `harnesses`, `relay pair qr`, serve pairing flags
|
|
2
|
-
|
|
3
|
-
Status: SHIPPED (lead wired `cmdServe` 2026-10-06). Paste §1 into `bin/crewbus.js` USAGE and §2
|
|
4
|
-
into `README.md` after the spawn section ("Running workers (spawn)").
|
|
5
|
-
§1d is now live: `serve --advertise-routes --pair-qrcode` shipped in `cmdServe`;
|
|
6
|
-
`POST /api/launch` + `GET /api/harnesses` + `GET /api/routes` shipped in both
|
|
7
|
-
`web` (`bin/lib/web.js`: `handleApiLaunch`) and relay `serve`; covered by
|
|
8
|
-
`test/crewbus.web-launch.mjs` (18 checks, wired into `npm test`).
|
|
9
|
-
|
|
10
|
-
Sources (verified 2026-10-06):
|
|
11
|
-
|
|
12
|
-
- `bin/lib/launch.js` exports: `LAUNCH_PERMISSIONS`
|
|
13
|
-
(`supervised|autoEdits|auto|full`), `LAUNCH_LIFETIMES`
|
|
14
|
-
(`oneshot|persistent`), `LAUNCH_PRIORITIES` (`high|normal`),
|
|
15
|
-
`PAIR_SCOPES`, `launchDrivers()`, `probeBinary()`,
|
|
16
|
-
`detectHarnessBinaries()`, `validateLaunchPlan()`, `buildPairUrl()`,
|
|
17
|
-
`advertiseEnv()`.
|
|
18
|
-
- `bin/crewbus.js`: `cmdLaunch` (~L2933), `cmdHarnesses` (~L3023),
|
|
19
|
-
`cmdRelayPair` + `qr` branch (~L4490–4524), USAGE lines for
|
|
20
|
-
`launch` / `harnesses` / `relay pair qr` (shipped — keep verbatim §1a–c).
|
|
21
|
-
- Contracts (frozen M0): `packages/contracts/{harness,launch,pairing}.json`.
|
|
22
|
-
- Spec: `docs/CONTROL_PLANE_SPEC.md` §4.1 (wizard + `harnesses
|
|
23
|
-
[detect --json]`, `pair [issue|qr|devices|revoke]`,
|
|
24
|
-
`serve --advertise-routes --pair-qrcode`).
|
|
25
|
-
|
|
26
|
-
Flag verification (role-prompt list vs implementation):
|
|
27
|
-
|
|
28
|
-
| Flag | Status |
|
|
29
|
-
|---|---|
|
|
30
|
-
| `--harness --count/--to --prefix --body/--body-file --subject --priority --model --max-turns --allow-tools --permission supervised\|autoEdits\|auto\|full --isolate --worktree/--branch --oneshot/--persistent --budget-tokens --budget-minutes --timeout --json/--dry-run` | Shipped in `cmdLaunch`, validated by `validateLaunchPlan` |
|
|
31
|
-
| `--target local` | Shipped value is `local` only — `cmdLaunch` hardcodes `target: "local"`; fleet placement stays `crew dispatch`. Document as `--target local` (reserved for fleet) |
|
|
32
|
-
| `--yes` | In shipped USAGE line; no separate consume in `cmdLaunch` (confirm lives in spawn delegation). Keep the token, do not invent semantics |
|
|
33
|
-
| `--permission full` | Needs `--i-understand-danger` (else plan invalid) |
|
|
34
|
-
| `harnesses [detect --json]` | Shipped (`cmdHarnesses`; `detect` optional, bare `harnesses` works) |
|
|
35
|
-
| `relay pair qr --from <admin> [--label --ttl --routes --json]` | Shipped (`qr` branch of `cmdRelayPair`); prints `crewbus://pair` URL, secret in `#fragment` only |
|
|
36
|
-
| `serve --advertise-routes <url,url> --pair-qrcode` | SHIPPED in `cmdServe` (advertised at `relay.json`, `GET /healthz`, `GET /api/routes`; `--pair-qrcode` needs `--from <admin>`, same mint + audit as `relay pair`) |
|
|
37
|
-
|
|
38
|
-
## 1. USAGE text blocks (paste-ready)
|
|
39
|
-
|
|
40
|
-
### 1a. `crewbus launch` (shipped — keep verbatim)
|
|
41
|
-
|
|
42
|
-
```text
|
|
43
|
-
crewbus launch --from <you> --harness <driver> --body "..." [--to <a,b> | --count N [--prefix p]] [--subject ...] [--priority high|normal] [--model <m>] [--max-turns <n>] [--allow-tools "..."] [--permission supervised|autoEdits|auto|full] [--isolate] [--worktree <prefix>|--branch <prefix>] [--oneshot|--persistent] [--budget-tokens N] [--budget-minutes M] [--timeout 10m] [--cmd "..."] [--cwd <dir>] [--sender-type ...] [--dry-run] [--yes] [--json]
|
|
44
|
-
(control-plane launch: validates the plan against packages/contracts
|
|
45
|
-
(permission full needs --i-understand-danger); --dry-run prints the
|
|
46
|
-
exact spawn commands via formatSpawnCmd without booting; otherwise
|
|
47
|
-
delegates to the same spawn loop (same RBAC, same audit). --yes skips
|
|
48
|
-
the interactive confirm; --json prints the crewId/batch/workers shape.)
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Notes for the lead (do not paste): `--body-file <path>` is also accepted
|
|
52
|
-
(read into the brief before validation); `--target` is `local` (hardcoded —
|
|
53
|
-
fleet goes through `crew dispatch`); `--permission full` additionally
|
|
54
|
-
requires `--i-understand-danger`.
|
|
55
|
-
|
|
56
|
-
### 1b. `crewbus harnesses` (shipped — keep verbatim)
|
|
57
|
-
|
|
58
|
-
```text
|
|
59
|
-
crewbus harnesses [detect] [--json]
|
|
60
|
-
(control-plane detect: lists the 7 drivers with binary presence +
|
|
61
|
-
version + brief channel + resume support. Missing binaries mean
|
|
62
|
-
"not installed", never FAIL.)
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 1c. `crewbus relay pair qr` (shipped — keep verbatim)
|
|
66
|
-
|
|
67
|
-
```text
|
|
68
|
-
crewbus relay pair qr --from <admin> [--label <device>] [--ttl 10m] [--routes <url,url>] [--json]
|
|
69
|
-
(prints the one-time crewbus://pair URL (secret in #fragment, never
|
|
70
|
-
query) alongside the plain pairing token. Scan/paste into the mobile
|
|
71
|
-
or desktop client to pair.)
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 1d. `serve` pairing flags (shipped — keep verbatim)
|
|
75
|
-
|
|
76
|
-
```text
|
|
77
|
-
crewbus serve [...] [--advertise-routes <url,url>] [--pair-qrcode]
|
|
78
|
-
(control-plane pairing helpers: --advertise-routes publishes
|
|
79
|
-
reachability hints for this relay (served at relay.json,
|
|
80
|
-
GET /healthz, GET /api/routes — hints only, the client proves what
|
|
81
|
-
works); --pair-qrcode prints a one-time crewbus://pair URL
|
|
82
|
-
(secret in #fragment, never query) for scanning into the mobile or
|
|
83
|
-
desktop client. Same mint, same audit as `relay pair`.)
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## 2. README section draft (slots directly after "Running workers (spawn)")
|
|
87
|
-
|
|
88
|
-
Paste the block below after the spawn section (after the
|
|
89
|
-
`--persistent`/respawn paragraph, before "## Pulling results").
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
### Launch wizard, harness detect, and pairing (M1 control plane)
|
|
94
|
-
|
|
95
|
-
`launch` is the guided front door over `spawn`: it validates your plan
|
|
96
|
-
against `packages/contracts/launch.json`, previews the exact commands,
|
|
97
|
-
then boots through the same spawn loop (same RBAC, same audit). Nothing
|
|
98
|
-
about `spawn` changes — use whichever surface you prefer.
|
|
99
|
-
|
|
100
|
-
```powershell
|
|
101
|
-
# what can run here? (missing binary = not installed, never FAIL)
|
|
102
|
-
crewbus harnesses # or: crewbus harnesses detect [--json]
|
|
103
|
-
|
|
104
|
-
# preview first — prints exact commands, boots nothing
|
|
105
|
-
crewbus launch --from alice --harness claude --count 2 --prefix w \
|
|
106
|
-
--body "harden the parser; reply with the report" --dry-run
|
|
107
|
-
|
|
108
|
-
# name workers explicitly instead of --count/--prefix
|
|
109
|
-
crewbus launch --from alice --harness claude --to w-1,w-2 \
|
|
110
|
-
--body-file ./brief.md --subject "parser hardening"
|
|
111
|
-
|
|
112
|
-
# permission ladder: supervised (default) | autoEdits | auto | full
|
|
113
|
-
# full needs --i-understand-danger; auto/full warn outside a sandbox
|
|
114
|
-
crewbus launch --from alice --harness opencode --count 1 \
|
|
115
|
-
--body "..." --permission auto --isolate
|
|
116
|
-
|
|
117
|
-
# long briefs live in a file; one of --worktree/--branch; one of
|
|
118
|
-
# --oneshot/--persistent; budgets + timeout guard the run
|
|
119
|
-
crewbus launch --from alice --harness grok --count 2 \
|
|
120
|
-
--body-file ./brief.md --worktree feat- --persistent \
|
|
121
|
-
--budget-tokens 50000 --budget-minutes 30 --timeout 20m
|
|
122
|
-
|
|
123
|
-
# machine-readable plan + commands (crewId/batch/workers shape)
|
|
124
|
-
crewbus launch --from alice --harness codex --count 1 \
|
|
125
|
-
--body "..." --dry-run --json
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Rules worth knowing: the brief caps at 8000 chars (`--body-file` for
|
|
129
|
-
anything long); `--to` and `--count` together warn (`--to` wins);
|
|
130
|
-
`--worktree` and `--branch` are exclusive; `--max-turns` applies to
|
|
131
|
-
claude/grok and `--allow-tools` to claude; cursor/antigravity
|
|
132
|
-
cannot resume (one-shot briefs — the wizard warns, never fakes it);
|
|
133
|
-
`--target` is `local` (fleet placement stays `crew dispatch`).
|
|
134
|
-
|
|
135
|
-
Pair a phone or desktop client without sharing the relay secret:
|
|
136
|
-
|
|
137
|
-
```powershell
|
|
138
|
-
crewbus relay pair qr --from alice --label pixel --ttl 10m \
|
|
139
|
-
--routes https://relay.example.com:8080,http://192.168.1.20:8080
|
|
140
|
-
# prints the one-time crewbus://pair URL (secret in #fragment, never
|
|
141
|
-
# query) plus the plain token; --json for scripting
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
`serve --advertise-routes <url,url> --pair-qrcode` (M1): publishes
|
|
145
|
-
reachability hints for the relay and prints a pairing QR URL on boot —
|
|
146
|
-
same mint, same audit as `relay pair`.
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## 3. COMPATIBILITY.md note
|
|
151
|
-
|
|
152
|
-
No change. The wizard is additive: `cmdLaunch` validates against the
|
|
153
|
-
frozen contracts and delegates to the existing spawn path, so no verified
|
|
154
|
-
row (adapter flags, session-id capture, resume commands, compaction,
|
|
155
|
-
approval pre-approvals) moves. No edit to `docs/COMPATIBILITY.md` —
|
|
156
|
-
no new harness, no flag change, no date to refresh. The one honest
|
|
157
|
-
surface to keep citing is the resume column: cursor/antigravity
|
|
158
|
-
report `resume: false` in `harnesses` output by design (see §2 wording
|
|
159
|
-
above), matching the existing "no" rows.
|
|
160
|
-
|
|
161
|
-
## 4. Paste checklist for the lead
|
|
162
|
-
|
|
163
|
-
1. USAGE: §1a–c already shipped in `bin/crewbus.js` — no paste needed.
|
|
164
|
-
§1d only after `cmdServe` gains `--advertise-routes`/`--pair-qrcode`.
|
|
165
|
-
2. README: paste §2 block after the spawn section
|
|
166
|
-
(after the `--persistent`/respawn paragraph).
|
|
167
|
-
3. COMPATIBILITY.md: no edit (per §3).
|
|
168
|
-
4. Never touched (per role): `bin/crewbus.js`, `package.json`, tests —
|
|
169
|
-
this draft only *adds* `docs/M1_CLI_DRAFT.md`.
|
|
170
|
-
UPDATE (lead, 2026-10-06): serve + web wiring landed after the draft —
|
|
171
|
-
`bin/crewbus.js` (`cmdServe` flags, `/api/routes`, `/api/harnesses`,
|
|
172
|
-
`/api/launch`, USAGE), `bin/lib/web.js` (`handleApiLaunch`,
|
|
173
|
-
`/api/harnesses`, `/api/routes`, `/api/launch`), `package.json`
|
|
174
|
-
(`web-launch` in test chain); new file `test/crewbus.web-launch.mjs`.
|
|
175
|
-
|