crewbus 10.0.6 → 10.0.8
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 +16 -2
- package/README.md +2 -2
- package/assets/brand/crewbus-app-icon-1024-rounded.png +0 -0
- package/assets/brand/crewbus-logo-for-dark.png +0 -0
- package/assets/brand/crewbus-logo-for-light.png +0 -0
- package/assets/brand/logo.svg +15 -0
- package/bin/crewbus.js +10 -4
- package/bin/lib/identity.js +55 -0
- package/bin/lib/store.js +1 -1
- package/bin/lib/web.js +450 -150
- package/docs/VERSION_SKEW.md +1 -1
- package/documentation.html +74 -40
- package/index.html +322 -3631
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 10.0.8 (2026-10-16)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
PATCH RELEASE: Launch composer UI refinements & desktop companion. No board-schema change (`board.json` stays v2).
|
|
6
|
+
|
|
7
|
+
- **Streamlined Launch Composer**: Removed explicit worker target UI so all launches default to automatic agent naming (`w-1`, `w-2`, ...).
|
|
8
|
+
- **Clearer agent count stepper**: Renamed 'Count' to 'No. of Agents' with improved tooltips for clarity.
|
|
9
|
+
- **Flattened composer aesthetic**: Removed the box-shadow depth effect on the Launch Composer card for a clean, flat panel style.
|
|
10
|
+
- **Cleaned launch console**: Removed redundant static headers ("Launch & Chat") and introductory welcome message ("CrewBus Studio") for a compact, distraction-free console.
|
|
11
|
+
|
|
12
|
+
## 10.0.7 (2026-10-14)
|
|
13
|
+
|
|
14
|
+
PATCH RELEASE: Design refresh + icon fix. No board-schema change (`board.json` stays v2).
|
|
15
|
+
|
|
16
|
+
- **Web dashboard + desktop shell restyle** to the marketing-site design tokens, with system light/dark theme support (`prefers-color-scheme` + a persisted toggle) and the new bus-mark logo.
|
|
17
|
+
- **Mobile app restyle** to the same tokens with system light/dark theming; new brand app icon and header logos.
|
|
18
|
+
- **Non-rounded app icons** across desktop + mobile: the OS applies its own shape mask, so the previously baked corner radius caused double-rounding. The Android adaptive foreground now keeps the glyph inside the 72/108 safe zone.
|
|
19
|
+
- Landing/docs links repointed from `main/` to `master/`.
|
|
6
20
|
|
|
7
21
|
## 10.0.6 (2026-10-13)
|
|
8
22
|
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# crewbus v10.0.
|
|
1
|
+
# crewbus v10.0.8 — DM bus
|
|
2
2
|
|
|
3
3
|
[](https://github.com/eamonpluto/crewbus/actions/workflows/ci.yml)
|
|
4
4
|
|
|
@@ -55,7 +55,7 @@ env overrides below.)
|
|
|
55
55
|
Layout: `board.json`, `agents/<name>.json`, `dm/<recipient>/<id>.json`,
|
|
56
56
|
`delivered/<recipient>/<id>.json` (push markers, written by the plugin).
|
|
57
57
|
|
|
58
|
-
Versions: `package.json` (currently 10.0.
|
|
58
|
+
Versions: `package.json` (currently 10.0.8) is the source of truth for the
|
|
59
59
|
release version. `board.json`'s `version: 2` is the **board schema version**
|
|
60
60
|
(a different number on purpose — do not "align" them). New to the project?
|
|
61
61
|
Start with `docs/QUICKSTART.md` (5 minutes).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024" xmlns:c2pa="http://c2pa.org/manifest"><metadata><c2pa:manifest>AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTplMjRlY2QxNy1iZWIwLTQxMDEtOTgzOC1jODBmZDFjYzBkNGEAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQOgsAqwL8Z5ptHDkmmaBBUn+8x9+Mtbuvi68TnBjUF++/m3kGJRqeiKKIFPZTM/lH+2Wq7E7GOnyVs5Jea9w7+c=</c2pa:manifest></metadata>
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="1024" y2="1024">
|
|
4
|
+
<stop offset="0" stop-color="#182028"/>
|
|
5
|
+
<stop offset="1" stop-color="#0b0f14"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="1024" height="1024" rx="228" fill="url(#bg)"/>
|
|
9
|
+
<g transform="translate(182 314) scale(22)" fill="none" stroke-width="2">
|
|
10
|
+
<rect x="1" y="1" width="28" height="12" rx="3" stroke="#e3e9ee"/>
|
|
11
|
+
<path d="M1 7h28" stroke="#4cc38a"/>
|
|
12
|
+
<circle cx="8" cy="16" r="1.6" fill="#e3e9ee" stroke="none"/>
|
|
13
|
+
<circle cx="22" cy="16" r="1.6" fill="#e3e9ee" stroke="none"/>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|
package/bin/crewbus.js
CHANGED
|
@@ -42,7 +42,7 @@ import { execFileSync, spawn } from "node:child_process";
|
|
|
42
42
|
// at top level so the import graph (store <- everyone; identity <- sync/spawn/
|
|
43
43
|
// mail/groups/channels/web/relay/export) has no evaluation-order hazards.
|
|
44
44
|
import { BOARD_VERSION, BROADCAST_AFTER, MAX_BODY_CHARS, MAX_RECIPIENTS, MAX_SPAWN, VALUE_FLAGS, boardDir, chmodAgentFile, cleanArtifact, cleanBranchPrefix, cleanChannelName, cleanGroupName, cleanPriority, cleanReply, cleanSenderType, cleanSubject, cleanWebName, dirs, ensureBoard, fail, findBoardUpward, getFlag, gitRevForBoard, listJson, newId, optionalAgent, parseDuration, readBoardMeta, readJson, refuseDriveRootBoard, requireBoard, resolveAgent, restArgs, sanitizeName, writeBoardMeta, writeExclusiveJson, writeJson, nextHlc, stampSyncDoc, hlcCompare, SEND_RATE_CAP, SEND_RATE_WINDOW_MS, MAX_FWD_DEPTH, DEDUPE_WINDOW_MS, webErr } from "./lib/store.js";
|
|
45
|
-
import { VALID_ROLES, agentTokenMatches, assertMintWon, authorize, authorizeCheck, checkToken, cleanRole, countAgentRecords, defaultRoleForNew, ensureSender, hashToken, isHashRevoked, mergeAgentDoc, mergeSyncedAgent, mintToken, newSalt, readAgent, readBoardAcl, resolveToken, revokedPathForHash, roleOfRecord, sanitizeAgentForSync, stripAgentSecrets, timingSafeEqualStr, touchAgent, writeAgentFile, writeBoardAcl, isBoardFrozen } from "./lib/identity.js";
|
|
45
|
+
import { VALID_ROLES, agentTokenMatches, assertMintWon, authorize, authorizeCheck, checkToken, cleanRole, countAgentRecords, defaultRoleForNew, ensureLoopbackOperator, ensureSender, hashToken, isHashRevoked, mergeAgentDoc, mergeSyncedAgent, mintToken, newSalt, readAgent, readBoardAcl, resolveToken, revokedPathForHash, roleOfRecord, sanitizeAgentForSync, stripAgentSecrets, timingSafeEqualStr, touchAgent, writeAgentFile, writeBoardAcl, isBoardFrozen } from "./lib/identity.js";
|
|
46
46
|
import { saveTokenFile } from "./lib/tokenfile.js";
|
|
47
47
|
import { CLIENT_TLS, SYNC_LWW, cleanSyncRel, clientInsecureFromArgs, crewSurvey, httpJson, readPemFlag, readSyncState, readTombstones, relayAuthEntries, relayCredFor, relayCredHeaders, setupClientTls, splitByWeight, syncRound, syncWalk, warnInsecureOnce, writeSyncState, writeTombstone, SYNC_SUBS, SYNC_UNION, RELAY_CAPS, SUB_CAP, SUB_CAP_NOTE, tombstoneIdForRel, readSyncDoc } from "./lib/sync.js";
|
|
48
48
|
import { devicePath, isLoopbackHost, newDeviceCred, newPairToken, pairingPath, parseDeviceCred, readDevice, readRelayState, relaySecretFromArgs, remoteSpawn, requireRelayClientCert, requireRelaySecret, requireScope, tryAcquireFence, verifyOidcJwt, writeRelayState, relayStatePath, bearerFromReq, getOidcConfig, getOidcJwks, b64urlDecode, b64urlJson, jwsRawToDer, oidcGetJson, OIDC_SKEW_SEC, OIDC_JWKS_TTL_MS, OIDC_ALG_HASH, OIDC_EC_SIZE, deviceFromReq } from "./lib/relay.js";
|
|
@@ -4386,7 +4386,7 @@ function cmdDoctor(args) {
|
|
|
4386
4386
|
for (const f of found.slice(0, 5)) info(`dead-man: ${f}`);
|
|
4387
4387
|
if (found.length > 5) info(`dead-man: …and ${found.length - 5} more — see spawn-status --all`);
|
|
4388
4388
|
} catch {}
|
|
4389
|
-
if (!local) {
|
|
4389
|
+
if (!local) {
|
|
4390
4390
|
info(`non-local board: skipping project-file checks for ${root}`);
|
|
4391
4391
|
console.log(bad === 0 ? "doctor: healthy" : `doctor: ${bad} problem(s)`);
|
|
4392
4392
|
if (bad > 0) process.exitCode = 1;
|
|
@@ -4511,7 +4511,7 @@ function cmdDoctor(args) {
|
|
|
4511
4511
|
.map((x) => x.name);
|
|
4512
4512
|
if (stale.length > 0) info(`${stale.length} worker(s) with stale pids (presumed dead after reboot): ${stale.slice(0, 5).join(",")}${stale.length > 5 ? "…" : ""} — see spawn-status --all; respawn to reboot`);
|
|
4513
4513
|
} catch {}
|
|
4514
|
-
if (!process.env.CREWBUS_AGENT) info("CREWBUS_AGENT is unset — hooks need it to know who you are");
|
|
4514
|
+
if (!process.env.CREWBUS_AGENT) info("CREWBUS_AGENT is unset — hooks need it to know who you are");
|
|
4515
4515
|
if (!process.env.CREWBUS_TOKEN) info("CREWBUS_TOKEN is unset — sends/reads as a claimed name need it");
|
|
4516
4516
|
try {
|
|
4517
4517
|
const legacy = fs.readdirSync(path.join(root, "agents")).filter((f) => f.endsWith(".json")).map((f) => {
|
|
@@ -4880,8 +4880,14 @@ async function cmdServe(args) {
|
|
|
4880
4880
|
ensureBoardCliShim(d);
|
|
4881
4881
|
const host = getFlag(args, "--host") || "127.0.0.1";
|
|
4882
4882
|
const port = Number(getFlag(args, "--port") || 0);
|
|
4883
|
-
if (!(port >= 0 && port < 65536)) fail("--port must be 0-65535 (0 = random)");
|
|
4884
4883
|
const relaySecret = relaySecretFromArgs(args);
|
|
4884
|
+
// Desktop plug-and-play: loopback boots auto-provision a `lead` operator
|
|
4885
|
+
// identity (first boot only) so the dashboard launch UI works with zero
|
|
4886
|
+
// terminal steps. Relays with an explicit secret are CLI/fleet boards
|
|
4887
|
+
// and do not auto-provision. Non-loopback binds never auto-provision.
|
|
4888
|
+
if (!relaySecret) {
|
|
4889
|
+
try { ensureLoopbackOperator(d, host); } catch {}
|
|
4890
|
+
}
|
|
4885
4891
|
const remote = !isLoopbackHost(host);
|
|
4886
4892
|
const allowRemoteSpawn = args.includes("--allow-remote-spawn");
|
|
4887
4893
|
// Phase 1b: opening remote spawn/kill is admin-gated when a caller identity
|
package/bin/lib/identity.js
CHANGED
|
@@ -404,6 +404,61 @@ export function mergeAgentDoc(prev, patch) {
|
|
|
404
404
|
return base;
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
// Loopback operator auto-provision (desktop plug-and-play):
|
|
408
|
+
// `serve`/`web` on 127.0.0.1 auto-creates a `lead` identity on first boot so
|
|
409
|
+
// the dashboard can launch without any terminal step. First agent on the
|
|
410
|
+
// board becomes admin (see defaultRoleForNew), so this is the board owner.
|
|
411
|
+
// CLI boards are untouched: this only fires when `lead` is missing AND the
|
|
412
|
+
// bind is loopback. Returns { from, token } or null when not applicable.
|
|
413
|
+
export function ensureLoopbackOperator(d, host) {
|
|
414
|
+
const loop = String(host || "127.0.0.1");
|
|
415
|
+
if (loop !== "127.0.0.1" && loop !== "localhost" && loop !== "::1") return null;
|
|
416
|
+
let rec = null;
|
|
417
|
+
try { rec = readAgent(d, "lead"); } catch { rec = null; }
|
|
418
|
+
if (rec && (rec.tokenHash || rec.token)) return null; // already provisioned
|
|
419
|
+
if (countAgentRecords(d) > 0) return null; // board already has registered agents
|
|
420
|
+
const fresh = mintToken();
|
|
421
|
+
const salt = newSalt();
|
|
422
|
+
const now = new Date().toISOString();
|
|
423
|
+
let prev = null;
|
|
424
|
+
try { prev = readJson(path.join(d.agents, "lead.json")); } catch { prev = null; }
|
|
425
|
+
const { v, hlc } = stampSyncDoc(prev);
|
|
426
|
+
const doc = mergeAgentDoc(prev, {
|
|
427
|
+
name: "lead",
|
|
428
|
+
firstSeen: (prev && prev.firstSeen) || now,
|
|
429
|
+
lastSeen: now,
|
|
430
|
+
tokenHash: hashToken(fresh, salt),
|
|
431
|
+
salt,
|
|
432
|
+
revokedAt: undefined,
|
|
433
|
+
offboarded: undefined,
|
|
434
|
+
role: "admin",
|
|
435
|
+
v, hlc,
|
|
436
|
+
});
|
|
437
|
+
// Atomic first-claim: exactly one boot may win. Losers re-read below.
|
|
438
|
+
let won = false;
|
|
439
|
+
try {
|
|
440
|
+
if (!prev) {
|
|
441
|
+
won = writeExclusiveJson(path.join(d.agents, "lead.json"), doc);
|
|
442
|
+
} else {
|
|
443
|
+
writeAgentFile(d, "lead", doc);
|
|
444
|
+
won = true;
|
|
445
|
+
}
|
|
446
|
+
} catch { won = false; }
|
|
447
|
+
if (!won && !prev) {
|
|
448
|
+
// Lost the race (parallel boot): read the winner, no token to return.
|
|
449
|
+
return null;
|
|
450
|
+
}
|
|
451
|
+
if (won) {
|
|
452
|
+
try { chmodAgentFile(path.join(d.agents, "lead.json")); } catch {}
|
|
453
|
+
try {
|
|
454
|
+
fs.mkdirSync(path.join(d.root, "logs"), { recursive: true });
|
|
455
|
+
fs.writeFileSync(path.join(d.root, "logs", "lead.token"), fresh + "\n", "utf8");
|
|
456
|
+
try { fs.chmodSync(path.join(d.root, "logs", "lead.token"), 0o600); } catch {}
|
|
457
|
+
} catch {}
|
|
458
|
+
}
|
|
459
|
+
return won ? { from: "lead", token: fresh } : null;
|
|
460
|
+
}
|
|
461
|
+
|
|
407
462
|
export function touchAgent(d, name, extra) { // line 2647
|
|
408
463
|
const p = path.join(d.agents, `${name}.json`);
|
|
409
464
|
const now = new Date().toISOString();
|
package/bin/lib/store.js
CHANGED
|
@@ -123,7 +123,7 @@ export function dirs(root) { // line 122
|
|
|
123
123
|
|
|
124
124
|
export function ensureBoard(root) { // line 142
|
|
125
125
|
const d = dirs(root);
|
|
126
|
-
for (const p of [d.root, d.agents, d.dm, d.delivered, d.broadcast, d.groups, d.channels, d.locks, d.results, d.tombstones, d.poolState, d.workerSessions, d.index, d.cursors, d.revoked, d.holds]) {
|
|
126
|
+
for (const p of [d.root, d.agents, d.dm, d.delivered, d.broadcast, d.groups, d.channels, d.locks, d.results, d.tombstones, d.poolState, d.workerSessions, d.index, d.cursors, d.revoked, d.holds, path.join(root, "logs")]) {
|
|
127
127
|
fs.mkdirSync(p, { recursive: true });
|
|
128
128
|
}
|
|
129
129
|
const metaPath = path.join(d.root, "board.json");
|