crewbus 10.0.10 → 10.0.12
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 +44 -0
- package/README.md +690 -708
- package/bin/crewbus-hook.js +57 -2
- package/bin/crewbus-mcp.js +25 -3
- package/bin/crewbus.js +364 -190
- package/bin/lib/channels.js +11 -1
- package/bin/lib/identity.js +148 -26
- package/bin/lib/kidproc.js +92 -0
- package/bin/lib/launch.js +77 -29
- package/bin/lib/qrcode.js +2971 -0
- package/bin/lib/relay.js +6 -15
- package/bin/lib/spawn.js +138 -46
- package/bin/lib/store.js +2 -1
- package/bin/lib/web.js +241 -23
- package/docs/CERT_READINESS.md +120 -120
- package/docs/COMPATIBILITY.md +192 -194
- package/docs/CONTROL_PLANE_SPEC.md +9 -11
- package/docs/CREWS.md +55 -55
- package/docs/DELIVERY.md +210 -210
- package/docs/GROUPS.md +4 -2
- package/docs/HA.md +151 -151
- package/docs/IDENTITY.md +36 -0
- package/docs/LEAD_ASSIGN.md +74 -75
- package/docs/LONG_RUNS.md +3 -2
- package/docs/M1_CLI_DRAFT.md +2 -2
- package/docs/QUICKSTART.md +70 -70
- package/docs/RBAC.md +73 -69
- package/docs/SPLIT.md +82 -82
- package/docs/THREAT_MODEL.md +68 -69
- package/docs/TROUBLESHOOTING.md +1 -0
- package/docs/VERSION_SKEW.md +57 -57
- package/documentation.html +10 -11
- package/examples/hermes-pairing.md +2 -2
- package/index.html +10 -11
- package/opencode/plugins/dm-watch.js +70 -8
- package/opencode/tools/dm-send.js +3 -12
- package/package.json +50 -50
- package/packages/client-runtime/README.md +40 -40
- package/packages/contracts/harness.json +93 -110
- package/packages/contracts/launch.json +1 -1
- package/docs/DESKTOP_SPIKE.md +0 -223
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 10.0.12
|
|
4
|
+
|
|
5
|
+
Retire legacy compatibility layers, enforce --lead auto, require managed AI coding harnesses, and consolidate desktop into standalone crewbus web.
|
|
6
|
+
|
|
7
|
+
- **Enforce `--lead auto` exclusively**: Removed `--lead none` across CLI, control-plane launch validation, and contracts (`packages/contracts/launch.json`). Every crew launch automatically provisions and routes through the dedicated lead coordinator lane.
|
|
8
|
+
- **Require managed AI harnesses**: Removed unmanaged `generic` driver support across runtime, contracts, CLI, and web UI. Supported harness drivers are strictly the 6 installed AI coding harnesses (`opencode`, `claude`, `codex`, `grok`, `antigravity`, `cursor`).
|
|
9
|
+
- **Consolidate desktop into `crewbus web`**: Removed `apps/desktop/` and the Tauri build. Added a standalone, self-contained `GET /pair` route to `bin/lib/web.js` with inline zero-dependency QR code SVG generation and strict fragment-secret hygiene. Added `--open` flag to `crewbus web` to automatically launch the default browser across Windows, macOS, and Linux.
|
|
10
|
+
- **Drop legacy compatibility layers**: Removed plaintext token reading and migration routines (enforcing salted hash tokens exclusively), removed legacy role backfills, and cleaned up pre-v2 AGENTS.md cleanups.
|
|
11
|
+
- **Cross-harness integration & live binary verification**:
|
|
12
|
+
- Direct native execution on Windows via `resolveHarnessExe()`: resolves real binaries (`claude.exe`, `codex.exe`, `grok.exe`, `agy.exe`, `opencode.exe`) bypassing `cmd.exe` shell wrappers with `shell: false` for exact OS PID tracking, clean signal handling, and immediate unbuffered streaming stdio.
|
|
13
|
+
- Codex CLI (0.163.0) fixes: replaced syntax-error `-a never` flag with `-c approval_policy="never"`, added `--dangerously-bypass-hook-trust` to run project hooks unattended, added `--dangerously-bypass-approvals-and-sandbox` under `--auto`, and plumbed prompt through stdin.
|
|
14
|
+
- Zero-config dynamic MCP mounting in Codex: `spawn` dynamically passes `-c mcp_servers.crewbus.command="node"` and `-c mcp_servers.crewbus.args=[...]`, making CrewBus tools immediately available in Codex sessions without touching global user TOML configuration.
|
|
15
|
+
- Claude Code (2.1.306) pre-approvals: added `mcp__crewbus__*` to default `--allowedTools` so bus tools execute unattended without interactive confirmation stops.
|
|
16
|
+
- Grok CLI permissions: mapped `--auto` to `--permission-mode bypassPermissions` and `--always-approve`.
|
|
17
|
+
- Multi-harness dynamic model discovery: added live CLI probes for `grok models` and `agy models` alongside `opencode models` in `bin/lib/launch.js`.
|
|
18
|
+
|
|
19
|
+
## 10.0.11
|
|
20
|
+
|
|
21
|
+
Post-compaction identity recovery + stale-pid guards + coordinator budgets + member-scoped channels + inbox archive + lead revive (engine hardening batches 2-5, 9).
|
|
22
|
+
|
|
23
|
+
- **Member-scoped channel posting (C4, default-on)**: channel post is no longer lead|admin-only for everyone — workers (default role) may post to `grp-<group>` channels of groups they are a MEMBER of; lead/admin keep board-wide posting. Every refusal stays loud: board channels and foreign group channels refuse workers with the reason (`authorizeCheck` gains a `channel-post` scoped branch; MCP mirror `dm_channel_post` + `authorizeMcp` updated identically). `--also-channel` brief mirrors become member-gated per group: the DM always delivers, only unauthorized channel mirrors are skipped with a visible `[channel mirror skipped, members-only: <g>]` note (CLI `send`/`spawn` + MCP `dm_send`). `docs/RBAC.md` matrix updated.
|
|
24
|
+
|
|
25
|
+
- **Coordinator budgets (`--lead-budget-tokens` / `--lead-budget-minutes`)**: the auto-provisioned lead lane accepts the same budget semantics as workers — stamped on the lane doc at boot (`budgetTokens`/`budgetMinutes`/`budgetSince`), surfaced in the coordinator prompt as a mandate line ("post the aggregate BEFORE the budget runs out; a budgeted coordinator gets reaped at the cap"), validated at parse (`--lead-budget-*` must be positive numbers). Unset = persistent boss-supervised coordinator (default, unchanged from 10.0.10). A standing coordinator keeps its boot-time budget; flags cannot change it mid-flight.
|
|
26
|
+
|
|
27
|
+
- **Sentinel names never mint**: `"unknown"`, `"me"`, `"you"` are reserved — register/self-claim, admin `--for` grants, and send (`ensureSender`, hence every write path incl. relay auto-mint) refuse them loudly. They exist so amnesia-throwaway identities surface instead of silently locking a board (`logs/unknown.token` owned by nobody).
|
|
28
|
+
- **`crewbus recover [--session <id>] [--cwd <dir>]`**: new read-only triage command (never mints, never writes). Scans `agents/*.json` ∩ `logs/*.token` and prints scored candidates best-first — session-id register binding +4, token-file↔stored-hash cross-check +3 (proven), token file exists +1, `lastDir` cwd match +1 — plus the exact resume script (CREWBUS_AGENT, token-file path, `crewbus inbox --from <you> --unacked --digest`). Offboarded agents excluded.
|
|
29
|
+
- **Rehydrators resolve before blessing "unknown"**: the compaction identity card (opencode plugin template + repo plugin + `crewbus-hook compact`) now tries the session↔agent map → `CREWBUS_AGENT` → board-side lite scoring (no hash cross-check in the standalone copies) before printing a whoami card; when nothing sticks it prints the `crewbus recover` instruction and the never-re-register-unknown warning.
|
|
30
|
+
- **Bug fixed — sessionless traffic wiped register bindings**: `mergeAgentDoc` treats undefined patch keys as deletions, so `touchAgent(…, { sessionId: undefined })` inside sessionless send/re-register/admin-grant erased the `--session` binding stamped at register (v-bumped docs, `sessionId` silently dropped). Sessionid is now only added to touch patches when actually provided.
|
|
31
|
+
- **Inbox archive (C6, explicit opt-in)**: `crewbus inbox archive --from <you> (--all | --before <dur>)` moves acked direct DMs + checkpoints from `dm/<you>/` into `dm-archive/<you>/` — unacked work NEVER archives implicitly (scope is mandatory; the command fails with usage otherwise). Broadcasts are board-level files and are never moved (admin `prune` territory). Id collisions (archive already holds the file, e.g. an id re-delivered after the move) keep both copies — no double-move. Read-back is explicitly opt-in: `crewbus inbox --from <you> --archived` lists the archive view (direct DMs only); the live read never shows archived rows.
|
|
32
|
+
- New tests: `test/crewbus.recover.mjs` (32 checks: recoverIdentity scoring incl. forged-token never-proven + legacy no-hash handling, sentinel CLI guards, recover resume script, `crewbus-hook compact` sentinel resolution), `test/crewbus.lead-budget.mjs` (11 checks: prompt mandate lines, `provisionAutoLead` budget stamping through bootWorker, CLI parse validation), `test/crewbus.channel-member.mjs` (17 checks: authorizeCheck matrix, CLI member/non-members/restricted posting, `--also-channel` mirror gating), and `test/crewbus.inbox-archive.mjs` (13 checks: scope guard, window + --all moves, unacked-work invariant, ids read-back gating, id-collision safety, owner-token gate, --json shape).
|
|
33
|
+
- Test suite hygiene: `crewbus.workbench.mjs` strips leaked operator identity too.
|
|
34
|
+
- **Stale-pid guards everywhere (C2)**: `isPidStale` (a live pid that provably postdates the spawn record = OS pid reuse after a reboot, i.e. an unrelated process) is now wired into every standing/liveness decision, not just `spawn-status`: auto-lead reuse (`provisionAutoLead`), dry-run lead previews (CLI `spawn` + desktop launch + relay spawn API), the spawn live-name refusal, `respawn`'s still-running gate, group telemetry "running", relay `/healthz` worker counts, the web roster `aliveByName`, and — safety-critical — `killWorkers` refuses to `taskkill`/`signal` a pid-stale record (new `pid-stale` result; killing an unrelated recycled process would have been possible before).
|
|
35
|
+
- Docs: `docs/LONG_RUNS.md` recovery ladder rows, `docs/IDENTITY.md` "Post-compaction identity recovery" section.
|
|
36
|
+
- **Lead revive (`crewbus spawn --count 0`)**: a crashed/rebooted coordinator can be brought back without touching the crew — boots nothing except the auto-coordinator lane (zero worker boots, zero DMs delivered; the passed mission text becomes the coordinator's reminder of what the crew was on about, worker briefs/threads live on the board). Requires `--lead board` and refuses worker operands (`--to`/`--to-file`/`--to-group`) and negative counts; a standing coordinator is reused, never duplicated; `--dry-run` previews the lead-only plan. `docs/LEAD_ASSIGN.md` §3.5 + `docs/LONG_RUNS.md` reboot row.
|
|
37
|
+
- CI: new `lead-e2e` lane (ubuntu, Node 22) installs the real `opencode-ai` CLI and runs the harness-backed E2E suites that local `npm test` skips when opencode is absent — kidproc, lead-assign (incl. lead revive) and lead-budget.
|
|
38
|
+
- Docs: `docs/GROUPS.md` channel-post wording updated to member-scoped semantics; `docs/TROUBLESHOOTING.md` gains the post-compaction "unknown" trap row (`crewbus recover`).
|
|
39
|
+
|
|
40
|
+
DEP0190-free child spawning (engine hardening batch 1).
|
|
41
|
+
|
|
42
|
+
- **DEP0190-free child spawning**: Node >=22 deprecates `spawn(exe, args, { shell: true })` when `args` is non-empty (a hard error on a future Node). New standalone module `bin/lib/kidproc.js` converts shell-needing targets (npm `.cmd` shims: claude/codex/cursor; the `where opencode` probe; binary probes via `probeBinary`) into an explicit shell argv0 (`cmd.exe /d /s /c "<ms-quoted line>"` with `windowsVerbatimArguments`, `/bin/sh -c` on POSIX) with **correct** quoting — the old wire passed args unescaped (space splitting, quote eating, bare `& | ^` command injection). Worker-prompt delivery is now argv-identity round-trip safe (`bin/crewbus.js: `launchWorkerProcess`/`probeBinary`/`resolveOpencodeExe` migrated; real-exe `shell:false` targets like resolved opencode pass through untouched so the spawned pid stays the harness process). Argv identity is asserted by round-trip through the real cmd parser. Known cmd limitation documented: a matched `%VAR%` pattern inside a quoted token still expands at the cmd layer (unmatched `%` passes intact).
|
|
43
|
+
- **Escape hatch**: `CREWBUS_SHELL_LEGACY=1` restores the pre-refactor `shell: true` behavior for exactly one release.
|
|
44
|
+
- Test env hygiene: suites strip operator identity leaks (`CREWBUS_TOKEN`/`CREWBUS_AGENT`) so fresh tmp-board identities always mint their own tokens.
|
|
45
|
+
- New tests: `test/crewbus.kidproc.mjs` (32 checks: MS/POSIX quoting vectors, cmd round-trip identity, resolveShellShot migration shape, legacy hatch pin).
|
|
46
|
+
|
|
3
47
|
## 10.0.10 (2026-10-18)
|
|
4
48
|
|
|
5
49
|
MINOR RELEASE: Observer coordinator lane model (`boss` / `lead` / `peers`), auto-assigned lead (`--lead auto|board|none`), and Desktop app alignment. No board-schema change (`board.json` stays v2).
|