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.
Files changed (48) hide show
  1. package/AGENTS.template.md +4 -4
  2. package/CHANGELOG.md +153 -0
  3. package/README.md +69 -44
  4. package/TEAM.template.md +1 -1
  5. package/bin/crewbus-hook.js +22 -5
  6. package/bin/crewbus-mcp.js +56 -48
  7. package/bin/crewbus.js +459 -238
  8. package/bin/lib/channels.js +1 -1
  9. package/bin/lib/export.js +1 -1
  10. package/bin/lib/groups.js +1 -5
  11. package/bin/lib/identity.js +90 -128
  12. package/bin/lib/launch.js +63 -8
  13. package/bin/lib/relay.js +25 -42
  14. package/bin/lib/spawn.js +155 -162
  15. package/bin/lib/store.js +2 -2
  16. package/bin/lib/web.js +241 -60
  17. package/claude-plugin/skills/crewbus/SKILL.md +1 -1
  18. package/docs/APPROVALS.md +8 -8
  19. package/docs/AUDIT_EXPORT.md +7 -7
  20. package/docs/CERT_READINESS.md +5 -5
  21. package/docs/COMPATIBILITY.md +6 -2
  22. package/docs/CONSOLIDATOR.md +6 -6
  23. package/docs/CONTROL_PLANE_SPEC.md +3 -3
  24. package/docs/CREWS.md +58 -55
  25. package/docs/DELIVERY.md +11 -8
  26. package/docs/GROUPS.md +8 -8
  27. package/docs/IDENTITY.md +6 -6
  28. package/docs/LONG_RUNS.md +3 -3
  29. package/docs/ORCHESTRATOR.md +87 -0
  30. package/docs/PAIRING.md +7 -7
  31. package/docs/QUICKSTART.md +81 -70
  32. package/docs/RBAC.md +84 -73
  33. package/docs/TENANCY.md +10 -10
  34. package/docs/THREAT_MODEL.md +3 -3
  35. package/docs/VERIFIER.md +10 -10
  36. package/docs/VERSION_SKEW.md +1 -1
  37. package/documentation.html +34 -24
  38. package/examples/hermes-pairing.md +3 -3
  39. package/examples/t3-pairing.md +1 -1
  40. package/index.html +6 -6
  41. package/opencode/plugins/dm-watch.js +1 -1
  42. package/opencode/tools/dm-send.js +1 -1
  43. package/package.json +27 -2
  44. package/packages/contracts/harness.json +15 -1
  45. package/packages/contracts/launch.json +2 -3
  46. package/packages/contracts/pairing.json +3 -3
  47. package/docs/LEAD_ASSIGN.md +0 -74
  48. package/docs/M1_CLI_DRAFT.md +0 -175
@@ -86,8 +86,8 @@ code{overflow-wrap:anywhere}pre code{overflow-wrap:normal}
86
86
  <main>
87
87
 
88
88
  <h1>crewbus</h1>
89
- <p class="sub">A zero-dependency local DM bus for AI coding agents — v10.0.12 · package <code>crewbus</code> · <a href="https://github.com/eamonpluto/crewbus/actions/workflows/ci.yml">CI status</a></p>
90
- <p class="sub">Lead audience: developers running <strong>mixed-harness crews</strong> (opencode, Claude Code, Codex, Antigravity, grok-build, Cursor). <code>package.json</code> is the release version source of truth; <code>board.json</code>'s <code>version: 2</code> is the board <em>schema</em> version, not the release.</p>
89
+ <p class="sub">A zero-dependency local DM bus for AI coding agents — v11.3.1 · package <code>crewbus</code> · <a href="https://github.com/eamonpluto/crewbus/actions/workflows/ci.yml">CI status</a></p>
90
+ <p class="sub">Primary audience: developers running <strong>mixed-harness crews</strong> (opencode, Claude Code, Codex, Antigravity, grok-build, Cursor, Qwen Code). <code>package.json</code> is the release version source of truth; <code>board.json</code>'s <code>version: 2</code> is the board <em>schema</em> version, not the release.</p>
91
91
 
92
92
  <h2 id="what">1 · What it is</h2>
93
93
  <p>crewbus lets multiple AI coding agents message each other directly — on one machine, or across machines via peer sync. No central server, no Redis, no accounts: the "network" is a directory of small JSON files (<code>.crewbus/</code>), and the "protocol" is one primitive — <strong>send a direct message to another agent</strong>.</p>
@@ -136,13 +136,13 @@ code{overflow-wrap:anywhere}pre code{overflow-wrap:normal}
136
136
  <p>Form: <code>crewbus &lt;command&gt; [flags]</code> — command first, flags after. Node 18+.</p>
137
137
  <pre><code>crewbus init [--global] [--board &lt;path&gt;] [--force] [--no-opencode] [--portable]
138
138
  [--harness opencode,claude,codex,antigravity,grok,cursor]
139
- crewbus register --from &lt;you&gt; [--session &lt;id&gt;] [--token &lt;t&gt;] [--role admin|lead|worker|auditor] [--expires-in 30d] [--service &lt;name&gt;] (first claim mints your token — export CREWBUS_TOKEN; first registration on a board is admin. Every send/spawn/inbox/listen/ack/redeliver needs it after)
140
- crewbus register --offboard &lt;name&gt; --from &lt;admin&gt; (revokes tokens, keeps inbox for audit)
139
+ crewbus register --from &lt;you&gt; [--session &lt;id&gt;] [--token &lt;t&gt;] [--role orchestrator|worker] [--expires-in 30d] [--service &lt;name&gt;] (first claim mints your token — export CREWBUS_TOKEN; self-registration is a worker; the orchestrator is bootstrapped. Every send/spawn/inbox/listen/ack/redeliver needs it after)
140
+ crewbus register --offboard &lt;name&gt; --from orchestrator (revokes tokens, keeps inbox for audit)
141
141
  crewbus token rotate|revoke|status --from &lt;you&gt; [--target &lt;name&gt;] [--expires-in 30d]
142
142
  crewbus login --issuer &lt;url&gt; --client-id &lt;id&gt; --token &lt;jwt&gt; (OIDC: binds oidc-&lt;sub&gt;, no local token while JWT valid)
143
- crewbus acl set|show --from &lt;admin&gt; [--default-role worker] [--freeze]
143
+ crewbus acl set|show --from orchestrator [--default-role worker] [--freeze]
144
144
  crewbus agents [--json] [--active] [--window &lt;sec&gt;] [--include-services]
145
- crewbus send --from &lt;you&gt; --to &lt;peer&gt; --body "..." [--subject "..."] [--reply &lt;msg-id&gt;] [--artifact &lt;ref&gt;] [--priority high|normal] [--checkpoint] [--needs-by 30m] [--session &lt;id&gt;] [--to-file &lt;path&gt;] [--to-group &lt;g&gt;] [--broadcast] [--also-channel] [--sender-type human|lead|peer] [--fwd &lt;n&gt;] [--yes] [--no-rate-limit] [--token &lt;t&gt;]
145
+ crewbus send --from &lt;you&gt; --to &lt;peer&gt; --body "..." [--subject "..."] [--reply &lt;msg-id&gt;] [--artifact &lt;ref&gt;] [--priority high|normal] [--checkpoint] [--needs-by 30m] [--session &lt;id&gt;] [--to-file &lt;path&gt;] [--to-group &lt;g&gt;] [--broadcast] [--also-channel] [--sender-type human|orchestrator|peer] [--fwd &lt;n&gt;] [--yes] [--no-rate-limit] [--token &lt;t&gt;]
146
146
  crewbus channel create|post|tail|search|summarize|list &lt;name&gt; [--body "..."] [--from &lt;you&gt;] [--limit 20] [--cursor &lt;msg-id&gt;] [--grep &lt;pat&gt;] [--priority high|normal] [--max-chars &lt;n&gt;] [--digest] [--json]
147
147
  crewbus lock acquire|release|list --scope &lt;file-or-scope&gt; --from &lt;you&gt; [--ttl 300] [--json]
148
148
  crewbus inbox --from &lt;you&gt; [--limit 20] [--after &lt;msg-id&gt;] [--all] [--unacked] [--overdue] [--older-than 10m] [--grep &lt;pat&gt;] [--priority high|normal] [--max-chars &lt;n&gt;] [--digest] [--verify] [--json] [--token &lt;t&gt;]
@@ -151,7 +151,7 @@ crewbus redeliver --from &lt;you&gt; (--id &lt;msg-id&gt; | --all)
151
151
  crewbus prune [--older-than 7d] [--dry-run]
152
152
  crewbus ack --from &lt;you&gt; (--id &lt;msg-id&gt; | --all) [--verify "&lt;command&gt;"] [--timeout &lt;dur&gt;]
153
153
  crewbus thread --id &lt;msg-id&gt; [--json]
154
- crewbus group create|add|remove|show|list|delete|channel|restrict &lt;name&gt; [--add a,b,c] [--json] (restricted groups: admin/lead/member sends only)
154
+ crewbus group create|add|remove|show|list|delete|channel|restrict &lt;name&gt; [--add a,b,c] [--json] (restricted groups: orchestrator/member sends only)
155
155
  crewbus group status|telemetry &lt;name&gt; [--json]
156
156
  crewbus result record|show|list --group &lt;G&gt; [--msg &lt;id&gt; --artifact &lt;ref&gt; --from &lt;you&gt;] [--force]
157
157
  crewbus race start|close --group &lt;G&gt; [--batch &lt;id&gt;] [--timeout &lt;ms&gt;] [--kill] [--json]
@@ -163,11 +163,11 @@ crewbus spawn-kill --from &lt;you&gt; (--to &lt;worker,...&gt; | --all)
163
163
  crewbus respawn --from &lt;you&gt; --to &lt;worker&gt; [--body "..."] [--force] [--fresh] [--dry-run]
164
164
  crewbus stop --all --from &lt;you&gt;
165
165
  crewbus token rotate|revoke|status --from &lt;you&gt; [--target &lt;name&gt;] [--expires-in 30d]
166
- crewbus hold place|lift|status --from &lt;you&gt; [--reason "..."] (admin place/lift; active hold refuses prune)
166
+ crewbus hold place|lift|status --from &lt;you&gt; [--reason "..."] (orchestrator place/lift; active hold refuses prune)
167
167
  crewbus board export|import --from &lt;you&gt; --out &lt;file&gt; | --in &lt;file&gt; --into &lt;dir&gt; [--force] (AES-256-GCM, secrets stripped unless --include-secrets)
168
- crewbus snapshot schedule|run|show --from &lt;admin&gt; [--every 24h] [--keep 7] [--out-dir &lt;dir&gt;]
169
- crewbus quota set|show --from &lt;admin&gt; [--max-bytes N] [--max-agents N] [--max-channels N]
170
- crewbus relay status|promote|pair|pair qr|devices|revoke-device [--json] [--force] [--from &lt;admin&gt;] [--label &lt;device&gt;] [--ttl 10m]
168
+ crewbus snapshot schedule|run|show --from orchestrator [--every 24h] [--keep 7] [--out-dir &lt;dir&gt;]
169
+ crewbus quota set|show --from orchestrator [--max-bytes N] [--max-agents N] [--max-channels N]
170
+ crewbus relay status|promote|pair|pair qr|devices|revoke-device [--json] [--force] [--from orchestrator] [--label &lt;device&gt;] [--ttl 10m]
171
171
  crewbus crew survey --relays &lt;u1,u2&gt; [--json] | crew dispatch --from &lt;you&gt; --relays &lt;u1,u2&gt; [--weights &lt;w1,w2&gt;] [--relay-auth &lt;url=cred&gt;] --count N [--prefix p] [--harness ...] --body "..." [--dry-run] [--json]
172
172
  crewbus log [--audit] [--verify] [--limit 50] [--json]
173
173
  crewbus pool --from &lt;you&gt; --count &lt;N&gt; --pool-size &lt;S&gt; --body "..." [--harness opencode] [--prefix &lt;p&gt;] [--queue a,b] [--json]
@@ -178,12 +178,12 @@ crewbus bench-poll --agents &lt;N&gt; --iters &lt;N&gt; [--json]
178
178
  crewbus serve [--port 0] [--host 127.0.0.1] [--secret &lt;s&gt;] [--weight N] [--allow-remote-spawn] [--allow-cmd &lt;regex&gt;] [--workdir-root &lt;dir&gt;] [--tls-cert &lt;pem&gt; --tls-key &lt;pem&gt;] [--mtls-ca &lt;pem&gt;] [--oidc-issuer &lt;url&gt; --oidc-audience &lt;id&gt;] [--audit-forward &lt;url&gt;] [--standby &lt;primary-url&gt;] [--promote-on-miss &lt;sec&gt;] [--advertise-routes &lt;url,url&gt;] [--pair-qrcode] (+ POST /api/spawn: remote crews, identity+role-checked, opt-in; POST /api/launch + GET /api/harnesses|routes + pair API (issue/exchange/devices/revoke); GET /healthz with weight/workers for LBs, publishes --advertise-routes hints; --pair-qrcode prints a one-time crewbus://pair URL at boot)
179
179
  crewbus sync --with http(s)://peer:port [--once] [--interval &lt;sec&gt;] [--dry-run] [--secret &lt;s&gt;] [--device &lt;abd-cred&gt;] [--pair-token &lt;abp-...&gt;] [--mtls-cert &lt;pem&gt; --mtls-key &lt;pem&gt;] [--insecure]
180
180
  crewbus web [--port 0] [--host 127.0.0.1]
181
- crewbus spawn --from &lt;you&gt; (--to &lt;workers&gt; | --count &lt;n&gt; [--prefix &lt;p&gt;]) --body "..." [--subject "..."] [--priority high|normal] [--needs-by 30m] [--harness opencode|claude|codex|grok|antigravity|cursor] [--cmd "..."] [--cwd &lt;dir&gt;] [--worktree &lt;prefix&gt;|--branch &lt;prefix&gt;] [--oneshot|--persistent] [--model &lt;m&gt;] [--max-turns &lt;n&gt;] [--allow-tools "..."] [--max-spawn &lt;n&gt;] [--budget-tokens &lt;N&gt;] [--budget-minutes &lt;M&gt;] [--timeout 10m] [--isolate] [--workdir-root &lt;dir&gt;] [--sender-type human|lead|peer] [--auto --i-understand-danger] [--dry-run]
181
+ crewbus spawn (--to &lt;workers&gt; | --count &lt;n&gt; [--prefix &lt;p&gt;]) --body "..." [--subject "..."] [--priority high|normal] [--needs-by 30m] [--harness opencode|claude|codex|grok|antigravity|cursor] [--cmd "..."] [--cwd &lt;dir&gt;] [--worktree &lt;prefix&gt;|--branch &lt;prefix&gt;] [--oneshot|--persistent] [--model &lt;m&gt;] [--max-turns &lt;n&gt;] [--allow-tools "..."] [--max-spawn &lt;n&gt;] [--budget-tokens &lt;N&gt;] [--budget-minutes &lt;M&gt;] [--timeout 10m] [--isolate] [--workdir-root &lt;dir&gt;] [--sender-type human|orchestrator|peer] [--auto --i-understand-danger] [--dry-run]
182
182
  crewbus doctor [--harness &lt;list&gt;] [--board &lt;path&gt;]
183
183
  crewbus update [--check] [--yes] [--version &lt;x.y.z&gt;] (self-update the global npm install to the registry latest via your own npm config; --check reports only; source checkouts refused with git-pull guidance)</code></pre>
184
184
  <ul>
185
185
  <li><strong>send</strong> has no cooldown and no types — <code>from</code>, <code>to</code>, <code>body</code> (max 8000 chars), plus optional <code>--subject</code> (mission line, 120 chars), <code>--reply</code> (message id you are answering), <code>--artifact</code> (checkable result reference) and <code>--priority high|normal</code>. <code>--to</code> takes a comma list for broadcast (<code>--to alice,bob,carol</code>, max 10000, deduped; <code>--to-file &lt;path&gt;</code> for large lists) or <code>--to @all</code> for every agent. Small fan-outs (≤20) write one DM each (unique id, shared <code>batch</code> id); larger ones write ONE <code>broadcast/&lt;batch&gt;.json</code> file — same inbox/hook/plugin delivery with per-agent <code>delivered</code> markers. Fan-outs past 100 recipients print a cost estimate and need <code>--yes</code>; sends are rate-limited per agent (30/min, <code>--no-rate-limit</code> overrides) with 10s duplicate suppression and a forward-hop cap (<code>fwd</code> 5). Single sends echo <code>sent &lt;id&gt; -&gt; &lt;to&gt; [board &lt;path&gt;]</code>; fan-outs echo <code>sent N messages [board &lt;path&gt;]</code>. Every send stamps the sender's git rev (omitted outside checkouts). DMs to never-registered agents wait in <code>inbox</code> until they register.</li>
186
- <li><strong>channels</strong> — the append-only public log beside DMs: <code>channel create/post/tail/search/summarize/list</code> over <code>channels/&lt;name&gt;.log.jsonl</code>, any agent can tail/filter/search with per-reader cursors (<code>--digest --grep --max-chars</code> bound context cost). <code>group channel &lt;name&gt;</code> maps a group to <code>grp-&lt;name&gt;</code>; <code>send --to-group … --also-channel</code> mirrors briefs there and <code>gather</code> includes the mirrors. Channel logs sync union-by-id. Cross-group handoff: <code>node examples/consolidator.mjs --from gateway --to lead --batch &lt;batch&gt; --group &lt;G&gt;</code> (see <code>docs/CONSOLIDATOR.md</code>).</li>
186
+ <li><strong>channels</strong> — the append-only public log beside DMs: <code>channel create/post/tail/search/summarize/list</code> over <code>channels/&lt;name&gt;.log.jsonl</code>, any agent can tail/filter/search with per-reader cursors (<code>--digest --grep --max-chars</code> bound context cost). <code>group channel &lt;name&gt;</code> maps a group to <code>grp-&lt;name&gt;</code>; <code>send --to-group … --also-channel</code> mirrors briefs there and <code>gather</code> includes the mirrors. Channel logs sync union-by-id. Cross-group handoff: <code>node examples/consolidator.mjs --from gateway --to orchestrator --batch &lt;batch&gt; --group &lt;G&gt;</code> (see <code>docs/CONSOLIDATOR.md</code>).</li>
187
187
  <li><strong>locks</strong> — optional advisory locks, off by default: <code>lock acquire/release/list --scope &lt;file-or-scope&gt;</code> (owner + expiry, token-checked).</li>
188
188
  <li><strong>inbox</strong> has no mark-read side effects — page with <code>--after</code>; <code>--all</code> dumps board-wide (debugging). Text output shows <code>subj:</code> / <code>re:</code> / <code>rev</code> / <code>batch</code> lines; empty inboxes name their board so a wrong-board empty room is distinguishable from no mail. <code>--unacked --older-than 10m</code> surfaces stale work for the retry/reassign pattern (progress <code>--checkpoint</code> notes are skipped — they never need ack); <code>--digest --max-chars</code> caps context cost; <code>--verify</code> checks message signatures. Full semantics: <code>docs/DELIVERY.md</code>.</li>
189
189
  <li><strong>agents / inbox / listen never create a board</strong> — on a path with no <code>board.json</code> they fail loudly with the resolved path instead of showing an empty room. Only <code>send</code>, <code>register</code>, and <code>init</code> plant boards.</li>
@@ -195,9 +195,9 @@ crewbus update [--check] [--yes] [--version &lt;x.y.z&gt;] (self-update the glo
195
195
  <li><strong>groups + gather + outcomes</strong> — named recipient sets (<code>group create/add/remove/show/list/delete</code>, CLI-managed) for variant briefs; address with <code>--to-group</code> (CLI/spawn), <code>to_group</code> (MCP, dm-send tool). <code>gather --batch</code> is the reduce step: briefs plus every reply across inboxes, oldest first, with a telemetry footer plus workbench metrics (artifact references, feed-forward edges, adopted, verified; <code>dm_gather</code> on MCP). Verified-only outcome records: <code>result record/show/list --group &lt;G&gt;</code> (<code>--force</code> overrides with a warning); <code>race start/close [--kill]</code> runs first-verified-wins; <code>group status/telemetry</code> shows running members, replies, verified results and spend. Attribution is reply → batch → groups. See <code>docs/GROUPS.md</code>.</li>
196
196
  <li><strong>workbench (artifacts + lessons)</strong> — output that compounds: publish spent outputs as board artifacts (<code>artifact publish --path &lt;p&gt; [--deps &lt;art-id,art-id&gt;]</code>; deps must exist first); adoption + verification recorded <em>on the object</em> (<code>artifact adopt|verify --id &lt;art-id&gt; --note "..."</code>); scoped one-liner lessons (<code>lesson post --scope &lt;g&gt; --text "..."</code>) auto-injected into matching later spawn briefs as a bounded <strong>Workbench block</strong>; handoff deadlines (<code>send</code>/<code>spawn --needs-by 30m</code> → <code>inbox --overdue</code>, <code>[OVERDUE]</code> digest tags); gather's footer reports the feed-forward graph (artifact refs, edges, adopted, verified).</li>
197
197
  <li><strong>web</strong> serves a localhost dashboard (workers, presence, groups, sync peers, broadcasts, recent mail; JSON at <code>/api/board</code>), polling every 5s, mobile-friendly tables. The dashboard is an AppRoot: left nav (Boards → Briefs → Fleet → Audit), Briefs view (one row per fan-out, click for the gathered thread via <code>GET /api/gather?batch=</code>), top bar with harness quick-pick + connection dot + data-age indicator + <code>Ctrl+K</code> palette, harness cards with live detect state, dry-run diff with warnings, a worker inspector (kill/ack inline, respawn stays CLI-only), an Undo toast after every live launch, and Holds &amp; quotas cards — backed by read-only <code>GET /api/harnesses|routes|holds|quotas</code> plus token-checked <code>POST /api/launch</code> (dry-run preview or live boot). Reads are open; per-worker <strong>kill</strong> buttons POST <code>/api/kill</code> with your name+token (CLI-identical check, JSON-only). Tokens are never rendered; non-local <code>--host</code> prints a warning (no auth).</li>
198
- <li><strong>spawn status / spawn kill</strong> — workers are detached, so closing the terminal never stops them. <code>spawn-status</code> reports running/done/exited + reply + ack + log tail, with process start-time validation (reboot-recycled pids read dead, marked stale) and the captured harness session id; <code>spawn-kill</code> terminates by recorded pid (whole tree on Windows) and confirms death. <code>respawn --from &lt;you&gt; --to &lt;worker&gt;</code> reboots one dead worker in its same harness conversation with a catch-up brief (lead/admin; <code>--fresh</code> re-boots the catch-up brief as a fresh session when no id could be captured); <code>pool-resume --id &lt;pool&gt;</code> re-attaches supervision after the supervisor died.</li>
198
+ <li><strong>spawn status / spawn kill</strong> — workers are detached, so closing the terminal never stops them. <code>spawn-status</code> reports running/done/exited + reply + ack + log tail, with process start-time validation (reboot-recycled pids read dead, marked stale) and the captured harness session id; <code>spawn-kill</code> terminates by recorded pid (whole tree on Windows) and confirms death. <code>respawn --from &lt;you&gt; --to &lt;worker&gt;</code> reboots one dead worker in its same harness conversation with a catch-up brief (orchestrator-only; <code>--fresh</code> re-boots the catch-up brief as a fresh session when no id could be captured); <code>pool-resume --id &lt;pool&gt;</code> re-attaches supervision after the supervisor died.</li>
199
199
  <li><strong>scale + remote</strong> — broadcast reads use <code>index/broadcasts.json</code> (derived local cache, self-healing, never synced); <code>npm run bench</code> asserts budgets, <code>npm run bench:load</code> runs the synthetic 10–10k load test, <code>bench-poll</code> measures dir-scan cost and <code>storage --json</code> reports area sizes (decision notes: <code>docs/STORAGE.md</code>). Big crews without fork-bombs: <code>pool --count N --pool-size S</code> (backpressure past 4× pool, <code>pool-status</code>). <code>serve</code> + <code>sync --with</code> replicate boards peer-to-peer: message files union by id (immutable, conflict-free), presence/cursors/groups merge on the hybrid logical clock with mtime propagation so replicas converge. <code>index/</code>, <code>logs/</code>, <code>board.json</code> stay local. Relays bind localhost by default; remote use needs <code>--secret</code> auth, and <code>/api/spawn</code> + <code>/api/kill</code> are opt-in (<code>--allow-remote-spawn</code>, command allowlist, workdir limits, audit log). Relays also boot remote crews (<code>POST /api/spawn</code>, token-checked, per-worker results).</li>
200
- <li><strong>spawn</strong> briefs N workers AND boots them detached (default 20/call, <code>--max-spawn</code> overrides; <code>--to @all</code> refused). Name workers explicitly or take <code>--count N [--prefix p]</code> for auto-named crews (<code>p-1..N</code>, merged with <code>--to</code>); names with a live worker behind them are refused, stale ones reusable. The DM lands first so the brief waits even if a launch fails. <code>--worktree/--branch</code> isolates write tasks per worker, <code>--oneshot/--persistent</code> declares lifetime, <code>--max-turns 50</code> is the default, <code>--budget-tokens/--budget-minutes/--timeout</code> bound cost, <code>--isolate</code> tries a container, and <code>--auto</code> (each harness's fully-unattended mode) needs explicit <code>--i-understand-danger</code>. First-class targets: opencode (<code>run</code> + brief via <code>--file</code>), claude (<code>-p</code> + brief on stdin), codex (<code>exec</code> pointing at the brief file), grok (headless <code>--prompt-file</code>), antigravity (<code>agy --print</code> with the brief inline), cursor (<code>cursor-agent -p --force --trust</code> pointing at the brief file). Logs to <code>logs/&lt;name&gt;.log</code>, pid recorded on the agent record. Children share your user privileges but boot with cloud/AI credential vars scrubbed from their environment (lead keys never leak; <code>--keep-env</code> / <code>--allow-env</code> opt back in); pass <code>--dry-run</code> to preview the exact command. Every brief carries a Crew roster block (own group + lane, sibling groups of the same spawn, peer-DM norm); groups from unrelated concurrent briefs collapse to a count. <code>stop --all</code> is the global kill switch; <code>token rotate</code> re-issues identity; <code>log --verify</code> checks the tamper-evident chain.</li>
200
+ <li><strong>spawn</strong> briefs N workers AND boots them detached (default 20/call, <code>--max-spawn</code> overrides; <code>--to @all</code> refused). Name workers explicitly or take <code>--count N [--prefix p]</code> for auto-named crews (<code>p-1..N</code>, merged with <code>--to</code>); names with a live worker behind them are refused, stale ones reusable. The DM lands first so the brief waits even if a launch fails. <code>--worktree/--branch</code> isolates write tasks per worker, <code>--oneshot/--persistent</code> declares lifetime, <code>--max-turns 50</code> is the default, <code>--budget-tokens/--budget-minutes/--timeout</code> bound cost, <code>--isolate</code> tries a container, and <code>--auto</code> (each harness's fully-unattended mode) needs explicit <code>--i-understand-danger</code>. First-class targets: opencode (<code>run</code> + brief via <code>--file</code>), claude (<code>-p</code> + brief on stdin), codex (<code>exec</code> pointing at the brief file), grok (headless <code>--prompt-file</code>), antigravity (<code>agy --print</code> with the brief inline), cursor (<code>cursor-agent -p --force --trust</code> pointing at the brief file). Logs to <code>logs/&lt;name&gt;.log</code>, pid recorded on the agent record. Children share your user privileges but boot with cloud/AI credential vars scrubbed from their environment (orchestrator keys never leak; <code>--keep-env</code> / <code>--allow-env</code> opt back in); pass <code>--dry-run</code> to preview the exact command. Every brief carries a Crew roster block (own group + lane, sibling groups of the same spawn, peer-DM norm); groups from unrelated concurrent briefs collapse to a count. <code>stop --all</code> is the global kill switch; <code>token rotate</code> re-issues identity; <code>log --verify</code> checks the tamper-evident chain.</li>
201
201
  <li>Removed v1 commands (<code>task claim messages stats …</code>) fail with a pointer to <code>send</code>.</li>
202
202
  </ul>
203
203
 
@@ -275,12 +275,12 @@ question: what is my code word? reply with the word
275
275
  # bob answers the same way; alice gets it pushed. Word matched both ways.</code></pre>
276
276
  <h3>Fan-out: "assign N agents" (the DM <em>is</em> the task)</h3>
277
277
  <pre><code># one call — one copy each, shared batch id, no task object
278
- crewbus send --from ui-lead --to alice,bob,carol --subject "brief: borderless cards" \
278
+ crewbus send --from orchestrator --to alice,bob,carol --subject "brief: borderless cards" \
279
279
  --body "Audit your scope, drop decorative borders, DM me a summary."
280
280
  # -&gt; sent 3 messages [board $REPO/.crewbus] batch batch-…: msg-… -&gt; alice, …
281
281
 
282
282
  # each agent owns its scope, decides itself, threads its summary back:
283
- crewbus send --from alice --to ui-lead --reply msg-260921-055320-a854de --body "cards done: …"</code></pre>
283
+ crewbus send --from alice --to orchestrator --reply msg-260921-055320-a854de --body "cards done: …"</code></pre>
284
284
  <p>Conventions: one DM = one brief (mission + scope + definition of done); re-read cited files before flagging (every DM stamps the sender's git rev — if your checkout is newer, the <code>file:line</code> numbers may be stale); compare <code>[board &lt;path&gt;]</code> echoes when an inbox looks unexpectedly empty.</p>
285
285
  <h3>Split board? (the one failure mode seen live)</h3>
286
286
  <pre><code># every send echoes its board — compare the two agents' outputs;
@@ -290,18 +290,28 @@ dm-send({..., board: "$REPO/.crewbus"}) # per call
290
290
  crewbus doctor # confirm all-ok</code></pre>
291
291
 
292
292
  <h2 id="trust">13 · Trust boundary</h2>
293
- <div class="warn"><strong>The board's files are unauthenticated by design.</strong> Any process on the machine can read or write <code>.crewbus/</code> directly — separate <code>CREWBUS_DIR</code> boards per trust zone (see <code>docs/ISOLATION.md</code> for container patterns; tenants are separate boards, see <code>docs/TENANCY.md</code>). Over the CLI/MCP protocol, identities are token-bound (expiring, revocable, offboardable; salted hashes only, <code>0600</code>, never synced — see <code>docs/IDENTITY.md</code>) with roles {admin, lead, worker, auditor} enforced on CLI, MCP and relay endpoints (see <code>docs/RBAC.md</code>), so <code>--from</code> spoofing is dead <em>there</em>; file-level tampering is not. OIDC login and in-box TLS/mTLS cover relays (see <code>docs/OIDC_TLS.md</code>). Peer content is untrusted data (labeled envelope, HMAC signatures, <code>inbox --verify</code>); signed audit events forward off-box to your SIEM and legal holds block <code>prune</code> (see <code>docs/AUDIT_EXPORT.md</code>). Threat model: <code>docs/THREAT_MODEL.md</code>; loop/cost guards: <code>docs/LIMITS.md</code>; cert readiness + duty split: <code>docs/CERT_READINESS.md</code> + <code>docs/SHARED_RESPONSIBILITY.md</code>. Never post secrets — post references. Hook scripts and MCP servers run with your user privileges: review project hooks before trusting them (<code>/hooks</code>, <code>/hooks-trust</code>), which is also what each harness itself requires.</div>
293
+ <div class="warn"><strong>The board's files are unauthenticated by design.</strong> Any process on the machine can read or write <code>.crewbus/</code> directly — separate <code>CREWBUS_DIR</code> boards per trust zone (see <code>docs/ISOLATION.md</code> for container patterns; tenants are separate boards, see <code>docs/TENANCY.md</code>). Over the CLI/MCP protocol, identities are token-bound (expiring, revocable, offboardable; salted hashes only, <code>0600</code>, never synced — see <code>docs/IDENTITY.md</code>) with roles {orchestrator, worker} enforced on CLI, MCP and relay endpoints (see <code>docs/RBAC.md</code>), so <code>--from</code> spoofing is dead <em>there</em>; file-level tampering is not. OIDC login and in-box TLS/mTLS cover relays (see <code>docs/OIDC_TLS.md</code>). Peer content is untrusted data (labeled envelope, HMAC signatures, <code>inbox --verify</code>); signed audit events forward off-box to your SIEM and legal holds block <code>prune</code> (see <code>docs/AUDIT_EXPORT.md</code>). Threat model: <code>docs/THREAT_MODEL.md</code>; loop/cost guards: <code>docs/LIMITS.md</code>; cert readiness + duty split: <code>docs/CERT_READINESS.md</code> + <code>docs/SHARED_RESPONSIBILITY.md</code>. Never post secrets — post references. Hook scripts and MCP servers run with your user privileges: review project hooks before trusting them (<code>/hooks</code>, <code>/hooks-trust</code>), which is also what each harness itself requires.</div>
294
294
 
295
295
  <h2 id="tests">14 · Tests</h2>
296
- <p><code>npm test</code> runs 20 suites — smoke + harness + compact + tokenfile + digest + control-plane + launch + web-launch + pair-api + web-panel + web-approot + client-runtime + runtime-wiring + mobile-client + approvals (×3) + fault-injection + integration — all green. <code>npm run bench</code> asserts scale budgets and <code>npm run bench:load</code> the synthetic 10–10k load test separately. <code>sync-embeds.mjs</code> (repo root, dev-only) re-embeds the opencode tool + plugin into <code>bin/crewbus.js</code> for global installs — run it after editing either file (CI enforces <code>--check</code>).</p>
296
+ <p><code>npm test</code> runs 29 suites — smoke + harness + compact + tokenfile + digest + control-plane + launch + web-launch + pair-api + web-panel + web-approot + client-runtime + runtime-wiring + mobile-client + approvals (×3) + fault-injection + integration — all green. <code>npm run bench</code> asserts scale budgets and <code>npm run bench:load</code> the synthetic 10–10k load test separately. <code>sync-embeds.mjs</code> (repo root, dev-only) re-embeds the opencode tool + plugin into <code>bin/crewbus.js</code> for global installs — run it after editing either file (CI enforces <code>--check</code>).</p>
297
297
 
298
298
  <h2 id="publish">15 · Install &amp; publish</h2>
299
- <pre><code>npm i -g crewbus # global install
299
+ <pre><code>npm i -g crewbus # public npm (scoped GitHub Packages mirror: @eamonpluto/crewbus)
300
+ crewbus --version
300
301
  crewbus init --harness &lt;name&gt; --portable # portable wiring
301
- # maintainer: npm test && npm publish (needs npm login + 2FA approval)</code></pre>
302
+ # maintainer: npm test, then run the "Publish" workflow (npm + GitHub Packages)</code></pre>
302
303
 
303
304
  <h2 id="changes">16 · Changelog</h2>
304
305
  <ul>
306
+ <li><strong>11.3.1</strong> — Mobile pairing over LAN: auto-detect active IPv4 interfaces, bind <code>0.0.0.0</code> with loopback fallback, add <code>/healthz</code> and <code>/api/pair/exchange</code> to <code>crewbus web</code>, and permit cleartext HTTP in mobile client for local relay routes.</li>
307
+ <li><strong>11.3.0</strong> — Standard package polish: <code>crewbus --version</code>/<code>version --json</code>, command-level <code>--help</code>, dual-registry <code>update</code> (npm + GitHub Packages, <code>--registry</code> override), MCP/hook version flags, and public npm publishing as <code>crewbus</code>.</li>
308
+ <li><strong>11.2.1</strong> — Kill robustness on Windows: <code>spawn-kill</code> / <code>/api/kill</code> re-check liveness after a failed <code>taskkill</code> and report <code>already-exited</code> instead of a false <code>kill-failed</code>.</li>
309
+ <li><strong>11.2.0</strong> — Orchestrator model selection: <code>--orchestrator-model &lt;m&gt;</code> sets the coordinator lane's model on <code>spawn</code>, <code>launch</code>, and <code>pool</code> when the lane is provisioned (standing coordinators keep their boot-time model).</li>
310
+ <li><strong>11.1.0</strong> — Per-worker models: <code>--model a,b,c</code> assigns a different model per spawned worker (cycled in worker order; a single value still applies to all), across <code>spawn</code>, <code>launch</code>, <code>pool</code>, web/RPC, and remote relay boots.</li>
311
+ <li><strong>11.0.0</strong> - Two-role control plane: one <code>orchestrator</code> plus workers. Removed <code>boss</code>/<code>admin</code>/<code>lead</code>/<code>auditor</code>; <code>spawn "brief" --count N</code> runs as the orchestrator (no <code>--from</code>/<code>--lead</code>); <code>crewbus orchestrator init|show</code>; approvals pin to <code>--to orchestrator</code>; docs/contracts/tests updated.</li>
312
+ <li><strong>10.0.15</strong> — CLI documentation and help flags audit, layout fixes, and Windows test cleanup.</li>
313
+ <li><strong>10.0.14</strong> — respawn presence fix: <code>spawnedAt</code> refreshes to the new pid launch on every respawn, so the recycled-pid guard no longer reads a live replacement as stale (all harnesses).</li>
314
+ <li><strong>10.0.13</strong> — first-class Qwen Code CLI harness integration (contracts, spawn targets, session-id preassign, settings init, hooks, and dynamic model discovery) and strict lead coordinator auto-provisioning.</li>
305
315
  <li><strong>10.0.12</strong> — consolidate desktop into standalone crewbus web (/pair QR route, --open browser launcher), enforce --lead auto, require managed AI harnesses, drop legacy compatibility.</li>
306
316
  <li><strong>10.0.10</strong> — minor release: Observer coordinator lane model (<code>boss</code> / <code>lead</code> / <code>peers</code>), auto-assigned lead (<code>--lead auto|board|none</code>), and Desktop app alignment. Full text: <code>CHANGELOG.md ## 10.0.10</code>.</li>
307
317
  <li><strong>10.0.9</strong> — minor release: Workbench compound-memory layer — artifacts with adoption/verification and deps edges, lessons auto-injected into spawn briefs, <code>--needs-by</code> handoff deadlines + <code>inbox --overdue</code>, feed-forward gather metrics, exact-recipient pinning in briefs; opencode respawn session capture fixed (direct exe boot + <code>opencode.db</code> storage fallback, doctor drift checks). Full text: <code>CHANGELOG.md ## 10.0.9</code>.</li>
@@ -336,11 +346,11 @@ crewbus init --harness &lt;name&gt; --portable # portable wiring
336
346
  <p>Stated plainly: <code>--to</code> fans out to up to 10,000 <em>recipients</em> (a broadcast limit); <code>spawn</code> boots one harness process per worker (20/call default) — budget live crews like compute. There is no tested claim of thousands of concurrent workers. Measure your own board: <code>npm run bench</code>, <code>npm run bench:load</code>.</p>
337
347
 
338
348
  <h2 id="control-plane">18 · Control plane</h2>
339
- <p>v10.0.12 live release (spec: <code>docs/CONTROL_PLANE_SPEC.md</code>; full entry: <code>CHANGELOG.md ## 10.0.0</code>). Additive over <code>spawn</code> — same spawn core, same RBAC, same audit. Nothing below renames or re-semantics a verified adapter, session-capture, resume, or compaction row (see <code>docs/COMPATIBILITY.md</code>).</p>
349
+ <p>v11.3.1 live release (spec: <code>docs/CONTROL_PLANE_SPEC.md</code>; full entry: <code>CHANGELOG.md ## 10.0.0</code>). Additive over <code>spawn</code> — same spawn core, same RBAC, same audit. Nothing below renames or re-semantics a verified adapter, session-capture, resume, or compaction row (see <code>docs/COMPATIBILITY.md</code>).</p>
340
350
  <h3>Launch wizard + harness detect</h3>
341
351
  <p><code>crewbus launch --from &lt;you&gt; --harness &lt;driver&gt; --body "..."</code> validates the plan against <code>packages/contracts/launch.json</code>, previews exact commands with <code>--dry-run</code>, then delegates to the same spawn loop. Omit <code>--harness</code>/<code>--body</code> on a TTY for the interactive wizard: it prompts for harness (live detect), workers, brief (<code>@path</code> reads a file), and permission, always previews, then confirms before booting; piped/non-TTY stays fail-loud. <code>crewbus harnesses [detect]</code> lists the 7 drivers with live binary presence — a missing binary means "not installed", never FAIL.</p>
342
352
  <h3>Pairing</h3>
343
- <p><code>crewbus relay pair qr --from &lt;admin&gt; [--label &lt;device&gt;] [--ttl 10m] [--routes &lt;url,url&gt;]</code> prints a one-time <code>crewbus://pair</code> URL (secret in <code>#fragment</code>, never query) plus the plain token. The relay also serves the pair API over HTTP (<code>POST /api/pair/issue</code> + <code>POST /api/pair/exchange</code> + <code>GET /api/pair/devices</code> + <code>POST /api/pair/revoke</code>, admin-gated, narrow-only scopes with per-call enforcement). <code>pairing/</code> + <code>devices/</code> stay relay-local — never synced, never exported.</p>
353
+ <p><code>crewbus relay pair qr --from orchestrator [--label &lt;device&gt;] [--ttl 10m] [--routes &lt;url,url&gt;]</code> prints a one-time <code>crewbus://pair</code> URL (secret in <code>#fragment</code>, never query) plus the plain token. The relay also serves the pair API over HTTP (<code>POST /api/pair/issue</code> + <code>POST /api/pair/exchange</code> + <code>GET /api/pair/devices</code> + <code>POST /api/pair/revoke</code>, orchestrator-gated, narrow-only scopes with per-call enforcement). <code>pairing/</code> + <code>devices/</code> stay relay-local — never synced, never exported.</p>
344
354
  <h3>Serve advertisement + health</h3>
345
355
  <p><code>serve --advertise-routes &lt;url,url&gt; --pair-qrcode</code> publishes reachability hints at <code>GET /api/routes</code> and <code>GET /healthz</code>, and prints a pairing URL at boot. Mixed versions degrade loudly, never obscurely — see <code>docs/VERSION_SKEW.md</code>.</p>
346
356
  <h3>Dashboard AppRoot</h3>
@@ -350,7 +360,7 @@ crewbus init --harness &lt;name&gt; --portable # portable wiring
350
360
  <h3>Mobile shell</h3>
351
361
  <p>Expo shell, remote-only v1 (see <code>apps/mobile/README.md</code>): pairs by QR scan, walks advertised + learned routes, offers triage/approvals/launch/fleet cards with an offline outbox that only retries on explicit tap. Triage groups inbox by brief thread; the Briefs screen shows one row per fan-out with tap-for-thread; a foreground watcher raises in-app alerts for approvals and dead workers.</p>
352
362
 
353
- <footer>crewbus documentation · v10.0.12 tree · zero dependencies, node ≥18 · MIT</footer>
363
+ <footer>crewbus documentation · v11.3.1 tree · zero dependencies, node ≥18 · MIT</footer>
354
364
 
355
365
  </main>
356
366
  </div>
@@ -19,13 +19,13 @@ them:
19
19
  ```sh
20
20
  export CREWBUS_DIR="$REPO/.crewbus"
21
21
  # one profile per worker — never share a profile between two writers
22
- crewbus spawn --from lead --harness opencode --to hermes-1 \
22
+ crewbus spawn --harness opencode --to hermes-1 \
23
23
  --cmd "hermes --profile hermes-1" --body "Your brief: ..."
24
- crewbus spawn --from lead --harness opencode --to hermes-2 \
24
+ crewbus spawn --harness opencode --to hermes-2 \
25
25
  --cmd "hermes --profile hermes-2" --body "Your brief: ..."
26
26
  ```
27
27
 
28
- Workers use `send --to-group` / `inbox` for lateral mail; a lead runs
28
+ Workers use `send --to-group` / `inbox` for lateral mail; the orchestrator runs
29
29
  `gather --batch <batch-id>` to reduce each variant group into one
30
30
  transcript. Opposite sharing philosophies, complementary roles: Hermes
31
31
  compounds inside one head, the board coordinates between heads.
@@ -21,7 +21,7 @@ each other on one board.
21
21
  export CREWBUS_DIR="$REPO/.crewbus"
22
22
  crewbus register --from t3-worker-1 # save the printed token
23
23
  export CREWBUS_TOKEN="<token>"
24
- crewbus send --from t3-worker-1 --to lead --subject "brief: cards" \
24
+ crewbus send --from t3-worker-1 --to orchestrator --subject "brief: cards" \
25
25
  --body "Scope audited, decorative borders dropped. Summary attached."
26
26
  crewbus inbox --from t3-worker-1 --unacked
27
27
  ```
package/index.html CHANGED
@@ -114,7 +114,7 @@ details{border-top:1px solid var(--line);padding:14px 0}summary{cursor:pointer;f
114
114
 
115
115
  <div class="hero" id="top" data-page="home">
116
116
  <div>
117
- <span class="pill"><i></i>v10.0.12 is out</span>
117
+ <span class="pill"><i></i>v11.3.1 is out</span>
118
118
  <h1>Let your coding agents talk to each other.</h1>
119
119
  <p class="lede">A zero-dependency local DM bus. One primitive: message another agent, delivered straight into its context.</p>
120
120
  <div class="cta"><a class="btn" href="#install">Get started</a><a class="btn ghost" href="https://github.com/eamonpluto/crewbus">View on GitHub</a></div>
@@ -171,7 +171,7 @@ details{border-top:1px solid var(--line);padding:14px 0}summary{cursor:pointer;f
171
171
  <p class="sub" style="margin-bottom:20px">Node 18+. Initialize a project, register, and send. Run <code>crewbus web --open</code> to start the local dashboard.</p>
172
172
  <div class="stats">
173
173
  <div><b>0</b><span>dependencies</span></div>
174
- <div><b>20</b><span>test suites</span></div>
174
+ <div><b>29</b><span>test suites</span></div>
175
175
  <div><b>~1s</b><span>async push on opencode</span></div>
176
176
  <div><b>10k</b><span>fan-out in about 4.6s</span></div>
177
177
  </div>
@@ -231,7 +231,7 @@ crewbus doctor</pre>
231
231
  </div>
232
232
  <h3 class="h3">Multi-harness launch from the CLI</h3>
233
233
  <pre><span class="c"># two workers across two harnesses, replies thread back</span>
234
- crewbus launch --from lead --harness claude,antigravity \
234
+ crewbus launch --from orchestrator --harness claude,antigravity \
235
235
  --workers 2 "Verify auth flow and benchmark."
236
236
 
237
237
  <span class="c"># preview first, or POST the same arguments to a relay</span>
@@ -266,7 +266,7 @@ POST /api/launch</pre>
266
266
  <div id="faq"></div>
267
267
  </div></section>
268
268
 
269
- <div class="w"><footer><span>crewbus v10.0.12 · zero-dependency local DM bus</span><span><a href="https://github.com/eamonpluto/crewbus">GitHub</a></span></footer></div>
269
+ <div class="w"><footer><span>crewbus v11.3.1 · zero-dependency local DM bus</span><span><a href="https://github.com/eamonpluto/crewbus">GitHub</a></span></footer></div>
270
270
 
271
271
  <script>
272
272
  (function(){
@@ -305,10 +305,10 @@ $('cmp').innerHTML=tbl(['','Built-in subagents','crewbus'],[
305
305
  function cards(id,a){$(id).innerHTML=a.map(function(c){return '<div class="card"><h3>'+c[0]+'</h3><p style="margin:0">'+c[1]+'</p></div>'}).join('')}
306
306
  cards('tiers',[['Solo dev, one machine','Start with init, inbox and send. Size the live crew to your box: start around five, then raise --max-spawn.'],['A team on a LAN','Named groups per workstream, spawn --count crews, boards synced machine to machine, and one TEAM.md so a new hire is productive in ten minutes.'],['Governed crews','RBAC, OIDC login, TLS and mTLS, signed audit export, legal holds, encrypted backups, quotas and standby relays. Start at docs/CERT_READINESS.md.']]);
307
307
  cards('uses',[['Researchers','Parameter sweeps, parallel proof attempts where the first clean proof wins, literature triage, and ablations where every run is an addressable agent.'],['Programmers','Parallel refactors, whole-codebase audits by directory, review and fix loops, and incident triage with a kill switch for redundant investigators.'],['Teams','A ten-minute quickstart, and mixed-harness standups where threads and acks replace status meetings for agent work.']]);
308
- var C='init|Plants the board, writes agent instructions, installs harness wiring.|init --harness opencode;update|Self-update the global npm install to the registry latest.|update --check;register|First claim mints your token; later calls prove it.|register --from lead;token|Rotate, expire and inspect identity tokens.|token rotate --from lead;agents|Who exists and who is actually alive.|agents --active;send|The primitive: mission, scope and done-criteria in one DM.|send --to bob --body "…";inbox|Your mail, with no mark-read side effects.|inbox --unacked;listen|Block and print new arrivals, locally or via relay.|listen --timeout 60000;thread|One brief plus every reply, across inboxes.|thread --id msg-…;channel|Append-only public logs: post, tail, search, summarize.|channel tail findings;group|Named recipient sets for variant briefs.|group create team-a;gather|Reduce a batch to one transcript.|gather --batch …;ack|Accept a reply, optionally gated on a checker.|ack --verify "npm test";result|Keep verified-only group outcomes.|result record --group …;race|First verified result wins; losers stand down.|race close --kill;artifact|Publish, adopt and verify board artifacts so output compounds.|artifact list;lesson|Scoped one-liners auto-injected into later spawn briefs.|lesson post --scope … --text "…"spawn|Brief workers and boot them detached.|spawn --count 8;spawn-status|Running? Replied? Acked?|spawn-status --all;spawn-kill|Terminate workers by recorded pid.|spawn-kill --to w1;pool|Boot at most S of N at once, auto-replace exits.|pool --count 20;stop|The global kill switch.|stop --all;serve|Relay: sync, remote crews, health checks.|serve --port 8471;sync|Peer-to-peer board merge.|sync --with …;web|Fleet console on localhost.|web --port 0;doctor|Validate wiring and diagnose split boards.|doctor;prune|Retention windows for old mail and logs.|prune --dry-run';
308
+ var C='init|Plants the board, writes agent instructions, installs harness wiring.|init --harness opencode;update|Self-update the global npm install to the registry latest.|update --check;register|First claim mints your token; later calls prove it.|register --from orchestrator;token|Rotate, expire and inspect identity tokens.|token rotate --from orchestrator;agents|Who exists and who is actually alive.|agents --active;send|The primitive: mission, scope and done-criteria in one DM.|send --to bob --body "…";inbox|Your mail, with no mark-read side effects.|inbox --unacked;listen|Block and print new arrivals, locally or via relay.|listen --timeout 60000;thread|One brief plus every reply, across inboxes.|thread --id msg-…;channel|Append-only public logs: post, tail, search, summarize.|channel tail findings;group|Named recipient sets for variant briefs.|group create team-a;gather|Reduce a batch to one transcript.|gather --batch …;ack|Accept a reply, optionally gated on a checker.|ack --verify "npm test";result|Keep verified-only group outcomes.|result record --group …;race|First verified result wins; losers stand down.|race close --kill;artifact|Publish, adopt and verify board artifacts so output compounds.|artifact list;lesson|Scoped one-liners auto-injected into later spawn briefs.|lesson post --scope … --text "…"spawn|Brief workers and boot them detached.|spawn --count 8;spawn-status|Running? Replied? Acked?|spawn-status --all;spawn-kill|Terminate workers by recorded pid.|spawn-kill --to w1;pool|Boot at most S of N at once, auto-replace exits.|pool --count 20;stop|The global kill switch.|stop --all;serve|Relay: sync, remote crews, health checks.|serve --port 8471;sync|Peer-to-peer board merge.|sync --with …;web|Fleet console on localhost.|web --port 0;doctor|Validate wiring and diagnose split boards.|doctor;prune|Retention windows for old mail and logs.|prune --dry-run';
309
309
  $('cmds').innerHTML=tbl(['Command','What it does','Try first'],C.split(';').map(function(r){var p=r.split('|');return ['<code>'+p[0]+'</code>',p[1],'<code>'+p[2]+'</code>']}));
310
310
  $('docs').innerHTML='QUICKSTART TROUBLESHOOTING WHEN_NOT COMPATIBILITY DELIVERY GROUPS VERIFIER CONSOLIDATOR LIMITS THREAT_MODEL ISOLATION STORAGE EXPERIMENTS IDENTITY RBAC OIDC_TLS AUDIT_EXPORT TENANCY HA SHARED_RESPONSIBILITY CERT_READINESS PAIRING CREWS SPLIT'.split(' ').map(function(d){return '<a href="https://github.com/eamonpluto/crewbus/blob/master/docs/'+d+'.md">'+d.toLowerCase()+'</a>'}).join('');
311
- var R=[['10.0.12','2026-10-20','Consolidate desktop into standalone crewbus web (/pair QR, --open browser launcher), enforce --lead auto, require managed AI harnesses, retire legacy compatibility.'],['10.0.10','2026-10-18','Observer coordinator lane model (boss / lead / peers), auto-assigned lead (--lead auto|board|none), and Desktop app alignment.'],['10.0.9','2026-10-17','Workbench compound-memory layer: artifacts with adoption/verification and depends-on edges, lessons auto-injected into spawn briefs, needs-by handoff deadlines with inbox --overdue, feed-forward gather metrics; opencode respawn session capture fixed (direct exe boot + SQLite storage fallback).'],['10.0.8','2026-10-16','Launch composer UI refinements: streamlined agent naming, clearer count stepper, flat panel styling, and clean console.'],['10.0.7','2026-10-14','Design refresh and icon fixes across desktop and mobile shells.'],['10.0.6','2026-10-13','Dashboard client hotfix: a template-literal escape killed the whole script block at parse time — fixed, with a regression test that syntax-checks the served page.'],['10.0.5','2026-10-12','Self-update command: crewbus update [--check] [--yes] [--version x.y.z] via your own npm config.'],['10.0.4','2026-10-12','Dashboard Briefs view + gather endpoint, task-scoped spawn rosters, mobile brief/thread/watcher screens.'],['10.0.3','2026-10-10','Worker-record integrity (canonical doc merge), truthful presence, Crew roster block in spawn briefs, doctor dead-man scan.'],['10.0.2','2026-10-09','Target workspace selector and persistence in Launch Studio, clearer project popover, directory picker replaces the upload prompt, desktop companion v0.1.16.'],['10.0.1','2026-10-09','Windows opencode detection fix, model selector sync that blocks incompatible pairings, refreshed model catalog with live discovery.'],['10.0.0','2026-10-08','Multi-harness orchestration (--harness claude,antigravity), canonical model selector, native desktop app, mobile companion with QR pairing, full control plane.'],['7.0.0','2026-10-05','Renamed to crewbus. Human-in-the-loop approvals, long-run resilience, respawn, checkpoints and pool-resume.'],['6.0.0','2026-10-03','Fleet hardening: capability negotiation, credential scrub for workers, per-device pairing, weighted multi-relay crews.'],['5.0.0','2026-10-03','Enterprise tier: RBAC, OIDC, TLS, audit export, legal holds, encrypted backups, quotas, standby relays.'],['3.0.0','2026-09-24','Token-bound identity, presence, pruning, detached spawn, ack and threading, local dashboard.'],['2.0.0','earlier','The DM-only rewrite: one primitive, message another agent, plus the opencode push layer.']];
311
+ var R=[['11.3.1','2026-11-17','Mobile pairing over LAN: auto-detect active IPv4 interfaces, bind 0.0.0.0 with loopback fallback, add /healthz and /api/pair/exchange to crewbus web, and allow cleartext HTTP in mobile client for local relay routes.'],['11.3.0','2026-11-17','Standard package polish: crewbus --version/version --json, command-level --help, dual-registry crewbus update (npm + GitHub Packages) with --registry override, MCP/hook version flags, and public npm publishing as crewbus.'],['11.2.1','2026-10-29','Kill robustness on Windows: spawn-kill / api/kill re-check liveness after a failed taskkill and report already-exited instead of a false kill-failed.'],['11.2.0','2026-10-29','Orchestrator model selection: --orchestrator-model <m> sets the coordinator lane model on spawn, launch, and pool when the lane is provisioned (standing coordinators keep their boot-time model).'],['11.1.0','2026-10-29','Per-worker models: --model a,b,c assigns a different model per spawned worker (cycled in worker order; a single value still applies to all) across spawn, launch, pool, web/RPC, and remote relay boots.'],['11.0.0','2026-10-29','Two-role control plane: one orchestrator plus workers. Removed boss/admin/lead/auditor; spawn "brief" --count N runs as the orchestrator (no --from/--lead); orchestrator init|show; approvals pin to --to orchestrator; docs/contracts/tests updated.'],['10.0.15','2026-10-26','CLI documentation and help flags audit, layout fixes, and Windows test cleanup.'],['10.0.14','2026-10-25','Respawn presence fix: spawnedAt refreshes to the new pid launch on every respawn, so live workers are not read as stale (all harnesses).'],['10.0.13','2026-10-25','Qwen Code harness integration (contracts, spawn targets, session-id preassign, settings init, hooks, dynamic model discovery) and strict lead coordinator auto-provisioning.'],['10.0.12','2026-10-20','Consolidate desktop into standalone crewbus web (/pair QR, --open browser launcher), enforce --lead auto, require managed AI harnesses, retire legacy compatibility.'],['10.0.10','2026-10-18','Observer coordinator lane model (boss / lead / peers), auto-assigned lead (--lead auto|board|none), and Desktop app alignment.'],['10.0.9','2026-10-17','Workbench compound-memory layer: artifacts with adoption/verification and depends-on edges, lessons auto-injected into spawn briefs, needs-by handoff deadlines with inbox --overdue, feed-forward gather metrics; opencode respawn session capture fixed (direct exe boot + SQLite storage fallback).'],['10.0.8','2026-10-16','Launch composer UI refinements: streamlined agent naming, clearer count stepper, flat panel styling, and clean console.'],['10.0.7','2026-10-14','Design refresh and icon fixes across desktop and mobile shells.'],['10.0.6','2026-10-13','Dashboard client hotfix: a template-literal escape killed the whole script block at parse time — fixed, with a regression test that syntax-checks the served page.'],['10.0.5','2026-10-12','Self-update command: crewbus update [--check] [--yes] [--version x.y.z] via your own npm config.'],['10.0.4','2026-10-12','Dashboard Briefs view + gather endpoint, task-scoped spawn rosters, mobile brief/thread/watcher screens.'],['10.0.3','2026-10-10','Worker-record integrity (canonical doc merge), truthful presence, Crew roster block in spawn briefs, doctor dead-man scan.'],['10.0.2','2026-10-09','Target workspace selector and persistence in Launch Studio, clearer project popover, directory picker replaces the upload prompt, desktop companion v0.1.16.'],['10.0.1','2026-10-09','Windows opencode detection fix, model selector sync that blocks incompatible pairings, refreshed model catalog with live discovery.'],['10.0.0','2026-10-08','Multi-harness orchestration (--harness claude,antigravity), canonical model selector, native desktop app, mobile companion with QR pairing, full control plane.'],['7.0.0','2026-10-05','Renamed to crewbus. Human-in-the-loop approvals, long-run resilience, respawn, checkpoints and pool-resume.'],['6.0.0','2026-10-03','Fleet hardening: capability negotiation, credential scrub for workers, per-device pairing, weighted multi-relay crews.'],['5.0.0','2026-10-03','Enterprise tier: RBAC, OIDC, TLS, audit export, legal holds, encrypted backups, quotas, standby relays.'],['3.0.0','2026-09-24','Token-bound identity, presence, pruning, detached spawn, ack and threading, local dashboard.'],['2.0.0','earlier','The DM-only rewrite: one primitive, message another agent, plus the opencode push layer.']];
312
312
  $('rel').innerHTML=R.map(function(r){return '<div><b>'+r[0]+'</b><span class="mono">'+r[1]+'</span><p>'+r[2]+'</p></div>'}).join('');
313
313
  var F=[['Is this just chat for robots?','No. The DM is the task object: a brief carries mission, scope and definition of done, replies thread back, and acks close the loop.'],['Can it run 10,000 agents at once?','10,000 is a broadcast limit: one brief reaches ten thousand inboxes. Live workers are whole harness processes, so size them like compute.'],['What stops an agent going rogue?','Token-bound identity with roles, relay auth with opt-in remote boot, untrusted-peer envelopes, loop and cost guards, budgets, dead-man timeouts and a global stop.'],['Does it phone home?','No. There are no accounts, no telemetry and no update checks. Boards sync only with peers you name.'],['What happens when a worker dies mid-brief?','The brief survives because it is a file, not a process. respawn reboots the worker with a catch-up brief, and pools replace exits automatically.'],['How are results verified?','ack --verify runs your tests or a checker. Only exit 0 records a verified result with its output.'],['When should I not use it?','Single-session work (use subagents), strict ordered pipelines (use a queue), and anything needing real-time guarantees, since the bus is files on disk.'],['Which Node versions work?','Node 18 and newer on Linux, macOS and Windows.'],['Who pays for the tokens agents burn?','Your model provider does. The bus itself costs nothing to run.']];
314
314
  $('faq').innerHTML=F.map(function(f){return '<details><summary>'+f[0]+'</summary><p>'+f[1]+'</p></details>'}).join('');
@@ -500,7 +500,7 @@ export const DmWatchPlugin = async ({ client, directory }) => {
500
500
  }
501
501
  if (agent) {
502
502
  output.context.push(`crewbus: context refreshed after compaction. You are '${agent}' on board ${root}${proven ? " (identity cross-checked)" : ""}.`);
503
- output.context.push(`Token: read ${path.join(root, "logs", agent + ".token")} into CREWBUS_TOKEN (0600 file written at register/mint). Lost it? Ask your lead/admin to revoke it, then re-register for a fresh one.`);
503
+ output.context.push(`Token: read ${path.join(root, "logs", agent + ".token")} into CREWBUS_TOKEN (0600 file written at register/mint). Lost it? Ask the orchestrator to revoke it, then re-register for a fresh one.`);
504
504
  output.context.push(`Then: crewbus inbox --from ${agent} --unacked --digest (escalate to full reads on hits).`);
505
505
  const doc = readJsonSafe(path.join(root, "agents", agent + ".json"));
506
506
  const ws = doc && doc.briefId ? readJsonSafe(path.join(root, "worker-sessions", agent + ".json")) : null;
@@ -4,7 +4,7 @@
4
4
  //
5
5
  // Usage from the agent (just a tool call, whenever you want):
6
6
  // dm-send({ from: "alice", to: "bob", body: "the parser accepts ISO dates only" })
7
- // dm-send({ from: "lead", to: "alice,bob,carol", subject: "brief: cards", body: "..." })
7
+ // dm-send({ from: "orchestrator", to: "alice,bob,carol", subject: "brief: cards", body: "..." })
8
8
  //
9
9
  // Fanning out work ("assign N agents"): there is no task object — the DM *is*
10
10
  // the task. `to` accepts a comma list (one copy each, shared batch id); each
package/package.json CHANGED
@@ -1,8 +1,22 @@
1
1
  {
2
2
  "name": "crewbus",
3
- "version": "10.0.12",
3
+ "version": "11.3.1",
4
4
  "description": "Zero-dependency message bus for AI coding-agent crews: message another agent, inserted into context, just a tool call.",
5
5
  "type": "module",
6
+ "keywords": [
7
+ "ai",
8
+ "agents",
9
+ "multi-agent",
10
+ "message-bus",
11
+ "mcp",
12
+ "cli",
13
+ "orchestration",
14
+ "developer-tools",
15
+ "coding-agents",
16
+ "opencode",
17
+ "claude-code",
18
+ "codex"
19
+ ],
6
20
  "bin": {
7
21
  "crewbus": "bin/crewbus.js",
8
22
  "crewbus-mcp": "bin/crewbus-mcp.js",
@@ -12,7 +26,11 @@
12
26
  "test": "node test/crewbus.smoke.mjs && node test/crewbus.kidproc.mjs && node test/crewbus.recover.mjs && node test/crewbus.harness.mjs && node test/crewbus.lead-assign.mjs && node test/crewbus.lead-budget.mjs && node test/crewbus.channel-member.mjs && node test/crewbus.inbox-archive.mjs && node test/crewbus.opencode-respawn.mjs && node test/crewbus.compact.mjs && node test/crewbus.tokenfile.mjs && node test/crewbus.digest.mjs && node test/crewbus.workbench.mjs && node test/crewbus.control-plane.mjs && node test/crewbus.launch.mjs && node test/crewbus.web-launch.mjs && node test/crewbus.pair-api.mjs && node test/crewbus.web-panel.mjs && node test/crewbus.web-approot.mjs && node test/crewbus.client-runtime.mjs && node test/crewbus.runtime-wiring.mjs && node test/crewbus.mobile-client.mjs && node test/crewbus.grok-hooks.mjs && node test/crewbus.holds-quotas.mjs && node test/crewbus.approval-protocol.mjs && node test/crewbus.approvals-init.mjs && node test/crewbus.approvals-web.mjs && node test/fault-injection.mjs && node test/integration.mjs",
13
27
  "bench": "node test/bench.mjs",
14
28
  "bench:load": "node test/load.mjs",
15
- "vendor": "node scripts/vendor-runtime.mjs"
29
+ "vendor": "node scripts/vendor-runtime.mjs",
30
+ "prepack": "node sync-embeds.mjs --check",
31
+ "pack:check": "npm pack --dry-run",
32
+ "publish:npm": "npm publish --access public --registry https://registry.npmjs.org/",
33
+ "publish:github": "node scripts/publish-github.mjs"
16
34
  },
17
35
  "files": [
18
36
  "bin/",
@@ -39,6 +57,13 @@
39
57
  },
40
58
  "license": "MIT",
41
59
  "author": "eamonpluto",
60
+ "funding": {
61
+ "type": "custom",
62
+ "url": "https://www.paypal.me/cifwep"
63
+ },
64
+ "publishConfig": {
65
+ "registry": "https://registry.npmjs.org/"
66
+ },
42
67
  "repository": {
43
68
  "type": "git",
44
69
  "url": "https://github.com/eamonpluto/crewbus.git"
@@ -89,6 +89,20 @@
89
89
  "permissionMap": { "supervised": "default prompts", "autoEdits": "not offered — supervised + note", "auto": "--auto adds --yolo", "full": "--yolo --i-understand-danger" },
90
90
  "spawnArgs": "cursor-agent -p --force --trust \"<brief inline>\"",
91
91
  "resumeArgs": "-p --force --resume <id> \"<catchup>\" (id rarely captured)"
92
- }
92
+ },
93
+ {
94
+ "driver": "qwen",
95
+ "displayName": "Qwen Code",
96
+ "binary": "qwen",
97
+ "versionProbe": ["--version"],
98
+ "briefDelivery": "inline",
99
+ "sessionCapture": "preassigned",
100
+ "sessionKeys": ["session_id", "sessionId"],
101
+ "resume": true,
102
+ "capabilities": { "jsonLog": true, "preassign": true, "preassignFlag": "--session-id", "compactionHook": "verified", "autoModes": ["-y", "--approval-mode yolo"] },
103
+ "permissionMap": { "supervised": "default prompts", "autoEdits": "--approval-mode auto-edit", "auto": "--approval-mode auto or -y", "full": "-y --approval-mode yolo" },
104
+ "spawnArgs": "--output-format json -y --approval-mode yolo \"<brief inline>\"",
105
+ "resumeArgs": "--resume <id> \"<catchup inline>\""
106
+ }
93
107
  ]
94
108
  }
@@ -6,8 +6,8 @@
6
6
  "note": "Same validation as CLI launch wizard. Thin over bootWorker (local) or remoteSpawn (per relay). dryRun previews exact commands without booting.",
7
7
  "request": {
8
8
  "required": ["harness", "body"],
9
- "optional": ["board", "count", "prefix", "to", "subject", "priority", "model", "maxTurns", "allowTools", "permission", "isolate", "worktree", "branch", "lifetime", "budgetTokens", "budgetMinutes", "timeout", "target", "dryRun", "lead"],
10
- "defaults": { "count": 1, "permission": "supervised", "lifetime": "oneshot", "target": "local", "dryRun": false, "lead": "auto" },
9
+ "optional": ["board", "count", "prefix", "to", "subject", "priority", "model", "models", "orchestratorModel", "maxTurns", "allowTools", "permission", "isolate", "worktree", "branch", "lifetime", "budgetTokens", "budgetMinutes", "timeout", "target", "dryRun"],
10
+ "defaults": { "count": 1, "permission": "supervised", "lifetime": "oneshot", "target": "local", "dryRun": false },
11
11
  "constraints": {
12
12
  "harness": "one of harness.json drivers",
13
13
  "body": "max 8000 chars (MAX_BODY_CHARS)",
@@ -15,7 +15,6 @@
15
15
  "permission": "supervised|autoEdits|auto|full",
16
16
  "lifetime": "oneshot|persistent",
17
17
  "priority": "high|normal",
18
- "lead": "auto",
19
18
  "target": "local | {relays:[{url,weight}]}"
20
19
  },
21
20
  "permissionMapping": {
@@ -16,10 +16,10 @@
16
16
  "treat pairing URLs + abd- creds as passwords (no screenshots/logs/bug reports)"
17
17
  ],
18
18
  "endpoints": {
19
- "issue": "POST /api/pair/issue (admin, token-checked; body {label?, ttl?, scopes?}) -> {pairUrl, expiresAt}",
19
+ "issue": "POST /api/pair/issue (orchestrator, token-checked; body {label?, ttl?, scopes?}) -> {pairUrl, expiresAt}",
20
20
  "exchange": "POST /api/pair/exchange (body {pairToken, label?, scopes?}) -> {deviceId, credential (abd-..., once only)}; requested scopes must be subset of granted (narrow-only, never widen)",
21
- "devices": "GET /api/pair/devices (admin) -> [{id, label, by, lastSeen, revoked?}]",
22
- "revoke": "POST /api/pair/revoke (admin; body {deviceId}) -> immediate 403 on next use"
21
+ "devices": "GET /api/pair/devices (orchestrator) -> [{id, label, by, lastSeen, revoked?}]",
22
+ "revoke": "POST /api/pair/revoke (orchestrator; body {deviceId}) -> immediate 403 on next use"
23
23
  },
24
24
  "scopes": ["launch:spawn", "launch:kill", "mail:send", "mail:inbox", "mail:ack", "fleet:read", "admin:pair", "admin:revoke"],
25
25
  "defaultScope": "full device (today's secret-equivalent) unless narrowed at exchange",
@@ -1,74 +0,0 @@
1
- # Auto-assigned Lead & Observer Lane Model
2
-
3
- Crewbus separates **spawning** from **leading**. Instead of the interactive spawner remaining the central router for all worker communications (sub-agent hub pattern), Crewbus defaults to an autonomous **lead** lane provisioned on the board, while workers collaborate peer-to-peer.
4
-
5
- This architecture is modeled after decentralized multi-agent coordination patterns (e.g. Minecraft multi-agent peer collaboration):
6
- - **Peers** communicate directly, self-organize strategy, and write findings to shared ambient memory (the board / Workbench).
7
- - An **Observer** (`lead`) monitors health, chases failures/timeouts, fail-closes approvals, and verifies claims against actual artifacts.
8
- - The **Boss** sets the objective and monitors milestones asynchronously without micromanaging execution.
9
-
10
- ---
11
-
12
- ## 1. The Lane Model
13
-
14
- | Lane | Actor | Authority & Responsibilities |
15
- |---|---|---|
16
- | **Boss** | User / Calling Session | • Sets the objective and mission parameters.<br>• Reads progress via dashboard, status commands, or milestone DMs.<br>• Resolves out-of-scope mission changes or irreconcilable disputes.<br>• Never routes routine peer messages. |
17
- | **Lead** | Autonomous Board Coordinator (`lead`) | • **Observer Role**: Environment repairs, TTL chasing, respawn health (`spawn-status --all`, `respawn`).<br>• **Approvals**: Decides on irreversible/high-risk actions (`fail-closed`).<br>• **Verification**: Audits worker claims against actual files/logs before aggregating.<br>• **Milestones**: Relays aggregate outcomes back to the boss.<br>• *Never* settles peer strategy disputes or does workers' implementation tasks. |
18
- | **Peers** | Worker Agents (`sec-1`, `sec-2`, ...) | • Own task strategy, execution, and local decisions.<br>• Direct peer-to-peer DMs for targeted cooperation and rescue calls.<br>• Post lessons and artifacts directly to the board Workbench.<br>• Checkpoint progress along threads.<br>• Consult groups first; escalate to lead only for scope/approvals. |
19
-
20
- ---
21
-
22
- ## 2. CLI Control: `--lead auto`
23
-
24
- When spawning workers with `crewbus spawn`:
25
-
26
- ```sh
27
- # Default: auto-provisions or reuses the observer lead coordinator
28
- crewbus spawn --from boss --count 3 --harness opencode --body "Implement feature X"
29
- ```
30
-
31
- ### Architecture:
32
- - **`auto` (default and only mode)**:
33
- - Auto-provisions or reuses the board's standing `lead` lane.
34
- - Workers' brief prompts pin reply targets and approval requests to `--to lead`.
35
- - The autonomous observer coordinator runs on the `lead` lane to monitor health and approvals.
36
- - Crewbus requires a coding harness (`opencode`, `claude`, `codex`, `grok`, `antigravity`, `cursor`); unmanaged/generic shell execution is not supported.
37
-
38
- ---
39
-
40
- ## 3. Provisioning & Collision Rules
41
-
42
- 1. **First-Claim-Wins**:
43
- - On a fresh board without a `lead` agent, `provisionAutoLead` mints the `lead` identity with `role: "lead"`.
44
- - The token is saved to `logs/lead.token` according to the token-file convention.
45
- 2. **Reuse Standing Coordinators**:
46
- - If an active coordinator is already running (live PID on the `lead` lane), subsequent `spawn` bursts reuse the standing coordinator rather than duplicating it.
47
- - Workers from new bursts are transferred to the lead lane (`spawnedBy: "lead"`), preserving own-crew RBAC permissions for health tracking and `spawn-kill`.
48
- 3. **Offboarded Safety**:
49
- - If the `lead` lane has been marked `offboarded: true` (deliberate teardown), auto-provisioning is skipped with a loud warning.
50
- 4. **Boss Detachment**:
51
- - If `from === "lead"`, auto-provisioning skips into self-bootstrap mode to prevent recursion.
52
- 5. **Lead Revive (`crewbus spawn --count 0`)**:
53
- - When the coordinator died (crash, reboot, budget reap), the crew still has
54
- its briefs/threads on the board — but nobody triaging. `--count 0` boots
55
- NOTHING except the auto-coordinator lane: zero worker boots, zero DMs
56
- delivered; the mission text you pass becomes the coordinator's reminder
57
- of what the crew was on about (worker threads and scope live on the board).
58
- - Requires `--lead board` (the default under a coding harness); worker
59
- operands (`--to`/`--to-file`/`--to-group`) are refused — this path has no
60
- worker operands. A standing coordinator is reused, never duplicated;
61
- an offboarded lane skips with a loud warning, same as any burst.
62
-
63
- ---
64
-
65
- ## 4. Prompt Engineering
66
-
67
- - **Workers (`buildSpawnPrompt`)**:
68
- - Directs completion summaries, checkpoints, and approval requests to `--to lead`.
69
- - Informs the worker that the spawner stepped back to boss and reads progress via the lead.
70
- - Reinforces peer-first habits: consult groups before escalating to the lead.
71
- - **Coordinator (`buildCoordinatorPrompt`)**:
72
- - Injected with the verbatim mission text from the boss.
73
- - Lists worker brief IDs for easy threading and reply tracking.
74
- - Enforces polling discipline (`listen` / `inbox --digest`), fail-closed approval timeouts, and maximum 2 respawn attempts per lane before escalating stalls to the boss.