@botbuddy/cli 1.104.1 → 1.105.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.105.0
4
+
5
+ - BOT-3445: the bb-status band (plugin 1.9.0) draws a `BLOCKED` row with one badge per open blocker of the session's primary ticket, five at most and then `+N more`. Each badge is the blocker's key (BB's drawer) and ↗ (Linear), a red status pill, and who works it: on Desktop a button that opens their Claude or Codex session, in the terminal a link, plain text without a verified session link, `no session` when nobody does. Linear still lists the blockers; `bb status-band read` adds each one's `agent` from `get_session_status.blocker_agents` (MCP 2.144.0). An older MCP gives plain badges with no session control.
6
+
7
+ ## 1.104.2
8
+
9
+ - BOT-3443: a host test child's leased stack connection file (`$BOTBUDDY_STACK_CONNECTION_FILE`, `/run/bb-child/connection.json`) is now mode 0600 and owned by the child's own DynamicUser uid. The daemon creates it owner-only (a fresh `O_EXCL` file renamed into place, so neither the umask nor an earlier file can widen it), and the unit's privileged pre-start hands it to the run's uid after the workspace. Before, it was 0644 root-owned, so Supply Guard's lease shim, which requires an owner-only file, refused every host child. Other uids on the host can no longer read the lease credentials.
10
+
3
11
  ## 1.104.1
4
12
 
5
13
  - BOT-3397: a host whose packed artifact set holds no file (every declared glob matched nothing) asks for no upload and reports `ARTIFACTS_NONE_MATCHED`, keeping each glob's `ARTIFACT_GLOB_NO_MATCH` refusal, instead of `ARTIFACTS_UPLOAD_FAILED`. The control-plane half of the same fix lets a host-bound Daemon credential reach `/test-child-runs/artifacts`, so the upload grant no longer answers 403 `daemon_host_scope`.
@@ -11,7 +11,7 @@
11
11
  "name": "bb-status",
12
12
  "source": "./bb-status",
13
13
  "description": "BB session status above the prompt: tickets, PRs with review counts, epic, staging, context use and active waits, for BotBuddy and Supply Guard sessions",
14
- "version": "1.8.0"
14
+ "version": "1.9.0"
15
15
  },
16
16
  {
17
17
  "name": "bb-session",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bb-status",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "BB session status above the prompt: tickets, PRs with review counts, epic, staging, context use and active waits, live only while the session is on screen.",
5
5
  "author": {
6
6
  "name": "BotBuddy"
@@ -244,6 +244,18 @@ for, or an older CLI or MCP, shows no badge, never "no customers". No wait
244
244
  signal carries a customer change yet, so an open band shows it on its next
245
245
  read (a relay wake, Refresh or a new session).
246
246
 
247
+ **BOT-3445 blocker badges.** Under `STATUS` and `WAITS`, a `BLOCKED` row holds
248
+ one badge per open Linear blocker of the primary ticket, at most five, then
249
+ `+N more`: the blocker's key (BB's ticket drawer) and ↗ (Linear), a red status
250
+ pill, then who works it. On Desktop the agent's name is a Button that runs
251
+ macOS `open` on their Claude (`claude://claude.ai/epitaxy/local_<uuid>`) or
252
+ Codex (`codex://threads/<uuid>`) session; in the terminal it is a `Link`;
253
+ without a verified link it is plain text; `no session` only when BB reports nobody (unknown ownership shows nothing).
254
+ The agent comes from `get_session_status.blocker_agents` (the blocker's freshest
255
+ non-ended session, live first); an older CLI or MCP draws the badges with no
256
+ agent. An agent link outside the two accepted forms rejects the snapshot. No
257
+ row with no open blockers or outside the BotBuddy workspace.
258
+
247
259
  **BOT-3245 STATUS and WAITS.** The band opens with up to two titled rows on
248
260
  the tree's grid: `STATUS` (staging red, its release manager and link, the
249
261
  context alarm) and `WAITS` (each active wait, three at most, then `+N more`).
@@ -166,6 +166,18 @@ function validCoordinator(c) {
166
166
  c.others <= 999
167
167
  );
168
168
  }
169
+ // BOT-3445: the agent working one blocker: a safe name, its provider, live or
170
+ // idle, and a verified session link or none. undefined (no key) = BB did not say.
171
+ function validSessionAgent(a) {
172
+ return (
173
+ !!a &&
174
+ typeof a === "object" &&
175
+ safeLabel(a.name, 80) &&
176
+ ["claude", "codex", "botbuddy"].includes(a.provider) &&
177
+ ["live", "idle"].includes(a.state) &&
178
+ (a.href === null || SESSION_HREF.some((re) => re.test(a.href)))
179
+ );
180
+ }
169
181
  function countsText(c) {
170
182
  return [c.done + " done", c.in_progress + " in progress", c.blocked + " blocked", c.todo + " todo"].join(" · ");
171
183
  }
@@ -285,7 +297,8 @@ function validSnapshot(value, harness, now) {
285
297
  /^BOT-[1-9]\d*$/.test(b.key) &&
286
298
  safeLabel(b.title) &&
287
299
  safeLabel(b.status) &&
288
- safeLink(b.url, b.key),
300
+ safeLink(b.url, b.key) &&
301
+ (b.agent === undefined || b.agent === null || validSessionAgent(b.agent)),
289
302
  );
290
303
  }
291
304
  // Canonical BB drawers (?card=…, any route; BOT-2896/BOT-3100/BOT-3136). A PR
@@ -363,6 +376,14 @@ function demoSnapshot(now) {
363
376
  title: "Example dependency",
364
377
  status: "In Progress",
365
378
  url: "https://linear.app/botbuddy/issue/BOT-1200",
379
+ agent: { name: "Ada Okafor (demo)", provider: "claude", state: "live", href: null },
380
+ },
381
+ {
382
+ key: "BOT-1201",
383
+ title: "Second example dependency",
384
+ status: "Todo",
385
+ url: "https://linear.app/botbuddy/issue/BOT-1201",
386
+ agent: null,
366
387
  },
367
388
  ],
368
389
  };
@@ -1141,8 +1162,10 @@ function uncategorisedBadge(el, key, epic) {
1141
1162
  // (Jono, 2026-11-15: "Staging green is a wait. Staging red is a status."). The
1142
1163
  // title fills the id column; the badges start in the status-badge column and
1143
1164
  // wrap there, never under the title. No badges, no row.
1144
- const TITLES = { status: "STATUS", waits: "WAITS" };
1145
- const TITLE_CELLS = Math.max(...Object.values(TITLES).map((t) => t.length));
1165
+ const TITLES = { status: "STATUS", waits: "WAITS", blocked: "BLOCKED" };
1166
+ // The id column's floor: the STATUS / WAITS titles. BLOCKED only widens it when
1167
+ // its row is drawn, so a band with no blockers keeps its layout.
1168
+ const TITLE_CELLS = Math.max(TITLES.status.length, TITLES.waits.length);
1146
1169
  function headerRow(el, key, title, idsCells, badges) {
1147
1170
  if (!badges.length) return null;
1148
1171
  return el.Box({
@@ -1199,14 +1222,7 @@ function releaseManager(el, $, rm) {
1199
1222
  el.Button({
1200
1223
  key: "release-manager",
1201
1224
  label: rm.name,
1202
- onPress: async () => {
1203
- try {
1204
- const r = await $.process.run(["open", rm.href], { timeoutMs: 10000 });
1205
- if (r?.exitCode !== 0) $.ui.toast("Couldn't open " + rm.name + "'s session");
1206
- } catch {
1207
- $.ui.toast("Couldn't open " + rm.name + "'s session");
1208
- }
1209
- },
1225
+ onPress: () => openSession($, rm.href, rm.name),
1210
1226
  }),
1211
1227
  ];
1212
1228
  }
@@ -1225,18 +1241,64 @@ function coordinatorBadge(el, $, key, c) {
1225
1241
  name = el.Button({
1226
1242
  key: "coordinator",
1227
1243
  label: c.name + " ↗",
1228
- onPress: async () => {
1229
- try {
1230
- const r = await $.process.run(["open", c.href], { timeoutMs: 10000 });
1231
- if (r?.exitCode !== 0) $.ui.toast("Couldn't open " + c.name + "'s session");
1232
- } catch {
1233
- $.ui.toast("Couldn't open " + c.name + "'s session");
1234
- }
1235
- },
1244
+ onPress: () => openSession($, c.href, c.name),
1236
1245
  });
1237
1246
  const tail = [c.you ? "· you" : null, c.state === "idle" ? "· idle" : null, c.others ? "+" + c.others : null].filter(Boolean);
1238
1247
  return [row([dim(el, "Coordinator"), name, ...(tail.length ? [dim(el, tail.join(" "))] : [])])];
1239
1248
  }
1249
+ // BOT-3445: one badge per open blocker of the primary ticket, at most
1250
+ // MAX_BLOCKER_BADGES, then "+N more": the key (BB's drawer) and ↗ (Linear) as the
1251
+ // tree's ids are, a red status pill, then who works it — on Desktop a Button that
1252
+ // opens their Claude or Codex session with macOS `open`, in the terminal a Link,
1253
+ // plain text without a verified link, "no session" when BB says nobody does, and
1254
+ // nothing when ownership is unknown (no agent field).
1255
+ const MAX_BLOCKER_BADGES = 5;
1256
+ async function openSession($, href, name) {
1257
+ try {
1258
+ const r = await $.process.run(["open", href], { timeoutMs: 10000 });
1259
+ if (r?.exitCode !== 0) $.ui.toast("Couldn't open " + name + "'s session");
1260
+ } catch {
1261
+ $.ui.toast("Couldn't open " + name + "'s session");
1262
+ }
1263
+ }
1264
+ function blockerAgent(el, $, b) {
1265
+ const a = b.agent;
1266
+ // undefined = ownership unknown (older CLI/MCP, failed read, relation not yet
1267
+ // mirrored): say nothing. Only BB's explicit null means nobody works it.
1268
+ if (a === undefined) return [];
1269
+ if (a === null) return [dim(el, "no session")];
1270
+ const tail = a.state === "idle" ? [dim(el, "· idle")] : [];
1271
+ if (!a.href || !SESSION_HREF.some((re) => re.test(a.href))) return [el.Text({ children: [a.name] }), ...tail];
1272
+ if (surface === "terminal") return [el.Link({ href: a.href, label: a.name + " ↗" }), ...tail];
1273
+ return [
1274
+ el.Button({ key: "blocker-agent-" + b.key, label: a.name + " ↗", onPress: () => openSession($, a.href, a.name) }),
1275
+ ...tail,
1276
+ ];
1277
+ }
1278
+ function blockerBadges(el, $, key, s) {
1279
+ if (s.tenant !== "botbuddy" || !Array.isArray(s.blockers) || !s.blockers.length) return [];
1280
+ const svg = pills() && typeof el.Svg === "function";
1281
+ const out = s.blockers.slice(0, MAX_BLOCKER_BADGES).map((b) => {
1282
+ const icon = inked(ticketIcon(b.status), RED);
1283
+ const pill = svg
1284
+ ? el.Box({ key: key + "-pill-" + b.key, flexDirection: "row", flexShrink: 0, children: [pillSvg(el, { text: b.status, icon, fill: RED, alt: "blocker " + b.status })] })
1285
+ : el.Box({ key: key + "-pill-" + b.key, flexDirection: "row", flexShrink: 0, backgroundColor: "error", paddingX: 1, children: [el.Text({ color: "#ffffff", children: ["⛔ " + b.status] })] });
1286
+ return el.Box({
1287
+ key: "line-blocker-" + b.key,
1288
+ flexDirection: "row",
1289
+ flexShrink: 0,
1290
+ alignItems: "center",
1291
+ columnGap: 1,
1292
+ children: [
1293
+ el.Box({ flexDirection: "row", flexShrink: 0, children: [el.Link({ href: LINKS.ticket(b.key), label: b.key }), el.Text({ children: [" "] }), el.Link({ href: b.url, label: "↗" })] }),
1294
+ pill,
1295
+ ...blockerAgent(el, $, b),
1296
+ ],
1297
+ });
1298
+ });
1299
+ if (s.blockers.length > out.length) out.push(dim(el, "+" + (s.blockers.length - out.length) + " more"));
1300
+ return out;
1301
+ }
1240
1302
  function stagingBanner(el, $, key, since, rm) {
1241
1303
  const text = "▲ Staging red" + (since ? " " + shortAge(since, currentTime) : "");
1242
1304
  return el.Box({
@@ -1391,9 +1453,10 @@ function bandLines(el, $, inPane) {
1391
1453
  : null;
1392
1454
  if (details) right.push(details);
1393
1455
  const svgPills = pills() && typeof el.Svg === "function";
1456
+ const blocked = blockerBadges(el, $, k("line-blocked"), s);
1394
1457
  const widths = {
1395
1458
  // BOT-3245: at least as wide as the STATUS / WAITS titles that share the column.
1396
- ids: Math.max(TITLE_CELLS, ...specs.map((x) => idsWidth(x.ids, x.prefix))),
1459
+ ids: Math.max(TITLE_CELLS, blocked.length ? TITLES.blocked.length : 0, ...specs.map((x) => idsWidth(x.ids, x.prefix))),
1397
1460
  status: Math.max(0, ...specs.map(statusWidth)),
1398
1461
  statusPx: svgPills ? Math.max(0, ...specs.filter((x) => x.iconSource).map((x) => pillWidth(statusPill(x)))) : 0,
1399
1462
  };
@@ -1417,6 +1480,9 @@ function bandLines(el, $, inPane) {
1417
1480
  ...waitBadges(el, k("line-context"), s.waits, currentTime),
1418
1481
  ]);
1419
1482
  const statusRow = headerRow(el, k("line-status"), TITLES.status, widths.ids, statuses);
1483
+ // BOT-3445: BLOCKED sits under STATUS and WAITS, right above the tree it blocks.
1484
+ const blockedRow = headerRow(el, k("line-blocked"), TITLES.blocked, widths.ids, blocked);
1485
+ if (blockedRow) lines.unshift(blockedRow);
1420
1486
  if (waitsRow) lines.unshift(waitsRow);
1421
1487
  if (statusRow) lines.unshift(statusRow);
1422
1488
  return lines;
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.104.1",
3
- "source_commit": "0ec20a780e646468a7c42f92a3e7e7d2887af252",
4
- "source_sha256": "d34a5d2844f48b24373a6411cc2683552052c8cb260f53caab3f50e3ab70cfc5",
2
+ "release_version": "1.105.0",
3
+ "source_commit": "5aa299a50b219f26995750835e75af780080dae8",
4
+ "source_sha256": "9457c7bf38527e5fa6a9a9aed1ab8231b295bd520e1d5ecb3c3d0878f1e23420",
5
5
  "target": "darwin-arm64",
6
- "sha256": "cd20b5fe2e820bc803a568eb9490821939a06b540442a8a0cba35493e0147450"
6
+ "sha256": "116e790b4a39f4c77c675186026977f9b085bdc09283b472ed7c2d7d3fb87209"
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.104.1",
3
- "source_commit": "0ec20a780e646468a7c42f92a3e7e7d2887af252",
4
- "source_sha256": "d34a5d2844f48b24373a6411cc2683552052c8cb260f53caab3f50e3ab70cfc5",
2
+ "release_version": "1.105.0",
3
+ "source_commit": "5aa299a50b219f26995750835e75af780080dae8",
4
+ "source_sha256": "9457c7bf38527e5fa6a9a9aed1ab8231b295bd520e1d5ecb3c3d0878f1e23420",
5
5
  "target": "linux-x64",
6
- "sha256": "970c8b969e19772d925cf27afd4b857769f381868fb45514c0d45a4d4595dc66"
6
+ "sha256": "2f9cc3a267fd850338dcaf63d20cea6a09a48586e3be54b9c3cd238521c612c3"
7
7
  }
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "release_version": "1.104.1",
4
- "source_commit": "0ec20a780e646468a7c42f92a3e7e7d2887af252",
5
- "source_sha256": "d34a5d2844f48b24373a6411cc2683552052c8cb260f53caab3f50e3ab70cfc5",
3
+ "release_version": "1.105.0",
4
+ "source_commit": "5aa299a50b219f26995750835e75af780080dae8",
5
+ "source_sha256": "9457c7bf38527e5fa6a9a9aed1ab8231b295bd520e1d5ecb3c3d0878f1e23420",
6
6
  "targets": {
7
7
  "darwin-arm64": {
8
8
  "goos": "darwin",
9
9
  "goarch": "arm64",
10
10
  "binary": "daemon/bin/darwin-arm64/botbuddy-daemon",
11
- "sha256": "cd20b5fe2e820bc803a568eb9490821939a06b540442a8a0cba35493e0147450",
11
+ "sha256": "116e790b4a39f4c77c675186026977f9b085bdc09283b472ed7c2d7d3fb87209",
12
12
  "mode": "0755"
13
13
  },
14
14
  "linux-x64": {
15
15
  "goos": "linux",
16
16
  "goarch": "amd64",
17
17
  "binary": "daemon/bin/linux-x64/botbuddy-daemon",
18
- "sha256": "970c8b969e19772d925cf27afd4b857769f381868fb45514c0d45a4d4595dc66",
18
+ "sha256": "2f9cc3a267fd850338dcaf63d20cea6a09a48586e3be54b9c3cd238521c612c3",
19
19
  "mode": "0755"
20
20
  }
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbuddy/cli",
3
- "version": "1.104.1",
3
+ "version": "1.105.0",
4
4
  "description": "BotBuddy — Swarm coordination CLI for multi-agent workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -110,6 +110,24 @@ function projectCoordinatorOf(own) {
110
110
  others: Number.isSafeInteger(c.others) && c.others >= 0 && c.others <= 999 ? c.others : 0,
111
111
  };
112
112
  }
113
+ // BOT-3445: who works one Linear blocker, from BB's blocker_agents: the agent
114
+ // (href only when it is a verified session link), null when BB says nobody, or
115
+ // undefined (no key) when BB did not say or sent something unsafe.
116
+ function blockerAgentOf(own, key) {
117
+ const map = own?.blocker_agents;
118
+ if (!map || typeof map !== "object" || Array.isArray(map) || !Object.hasOwn(map, key)) return undefined;
119
+ const a = map[key];
120
+ if (a === null) return null;
121
+ if (!a || typeof a !== "object" || !["live", "idle"].includes(a.state)) return undefined;
122
+ const name = safeText(a.name, 80);
123
+ if (!name) return undefined;
124
+ return {
125
+ name,
126
+ provider: COORDINATOR_PROVIDERS.includes(a.provider) ? a.provider : "botbuddy",
127
+ state: a.state,
128
+ href: sessionHref(a.href),
129
+ };
130
+ }
113
131
  // BOT-3212 AC-1: the session agent's active bb waits, for the band's badge; null
114
132
  // when BB did not say (no badge rather than a false "none").
115
133
  function waitsOf(own) {
@@ -414,11 +432,13 @@ export async function readStatus({
414
432
  )
415
433
  refuse("blockers_incomplete");
416
434
  if (["completed", "canceled"].includes(blocker.state.type)) continue;
435
+ const agent = ownOk ? blockerAgentOf(own, blocker.identifier) : undefined;
417
436
  blockers.push({
418
437
  key: blocker.identifier,
419
438
  title: label(blocker.title),
420
439
  status: label(blocker.state.name),
421
440
  url: issueLink(blocker.url, blocker.identifier),
441
+ ...(agent === undefined ? {} : { agent }),
422
442
  });
423
443
  }
424
444
  linearTicket = {