@botbuddy/cli 1.110.0 → 1.112.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.112.0
4
+
5
+ - BOT-3448: a fleet host reports `tar-extract` only when its tar can extract an archive with directories inside a test child's sandbox. On Ubuntu 26.04 it cannot: under the child's DynamicUser sandbox, systemd answers `openat2` with ENOSYS, and that tar build has no fallback. Listing (`tar -t`) and reading one member to stdout (`tar -xO`) still work there, so `tar` stays its own capability. A child that unpacks archives into a directory can declare `--child-requires tar-extract`; until the host's tar can, placement refuses it by name instead of starting a run that fails mid-way. The CLI's own tests no longer extract into a directory with the system tar, so the CLI lane runs green as a host child. Needs this daemon on the host.
6
+
7
+ ## 1.111.0
8
+
9
+ - BOT-3501: the bb-status band's STATUS row shows the Docker queue as the web top bar does, `📦 N queued` (queued stack leases plus capacity waiters), linked to /docker's Queue, so an operator can see whether a new session would wait for a host. BB sends the count only to an operator (`get_session_status.docker_queue`, MCP 2.152.0); nothing shows at zero, for anyone else, or from an older server.
10
+
3
11
  ## 1.110.0
4
12
 
5
13
  - BOT-3363 (PR 3 of 3): a host test child goes through the host's memory admission ledger, the same one stack leases ask. When the ledger holds a child, `bb stack run --test-child` prints `<host>'s memory admission ledger does not admit the child yet (<code>: it needs X GiB, Y GiB free under the ceiling, cost learned|default) — waiting (no slot is held while waiting)` and waits on the pool's platform wait (a slot release, or the server's re-check deadline at most 60 s away); a child whose cost is above the host's ceiling stops at once with `ADMISSION_COST_EXCEEDS_CEILING` and its receipt. The fleet host daemon takes no new test child while the host is below its local disk or memory floor (the claim is a peek, so the run keeps its place; the log line is BOT-2849's `memory admission: deferred test-child …`), and sets the child unit's `MemoryMax` to its reservation when the claim carries one (an enforced, learned reservation). Needs MCP 2.151.0.
@@ -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.9.0"
14
+ "version": "1.10.0"
15
15
  },
16
16
  {
17
17
  "name": "bb-session",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bb-status",
3
- "version": "1.9.0",
3
+ "version": "1.10.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"
@@ -316,6 +316,8 @@ const LINKS = {
316
316
  pushes: APP + "/waits",
317
317
  // BOT-3152 AC-2: the web top bar's Staging chip link (STAGING_HREF).
318
318
  staging: APP + "/release-readiness/staging/latest",
319
+ // BOT-3501: the web top bar's Docker queue chip link (the /docker Queue section).
320
+ dockerQueue: APP + "/docker#docker-queue",
319
321
  };
320
322
  // The ↗ after an id goes straight to the source: Linear for tickets and the
321
323
  // epic, GitHub for PRs. Each tenant's tickets live in its own Linear workspace.
@@ -541,7 +543,10 @@ function waitConditions(s) {
541
543
  // BOT-3394: no signal says a held pre-push lane started, so while a push is
542
544
  // held the relay also wakes on a one-minute timer and the badge drops on the
543
545
  // next read. A platform gap (no execution-run signal), not a poll loop.
544
- const timer = pushWaitText(s.push_wait, currentTime) ? ["timer:duration=60"] : [];
546
+ // BOT-3501 (Codex P2 on #1893): nor does any signal say the host-global Docker
547
+ // queue changed, so while BB sends an operator's docker_queue (zero and null
548
+ // included) the same timer re-reads it, as the web chip polls. One timer for both.
549
+ const timer = pushWaitText(s.push_wait, currentTime) || s.docker_queue !== undefined ? ["timer:duration=60"] : [];
545
550
  // At most 5 tickets, the agent's waits, 5 PRs (state + review), blockers, epic,
546
551
  // staging and the held-push timer: 20, the relay's limit, so no wake is ever
547
552
  // dropped (review on #1616, round 4; BOT-3212; BOT-3394).
@@ -1158,6 +1163,29 @@ function uncategorisedBadge(el, key, epic) {
1158
1163
  }),
1159
1164
  ];
1160
1165
  }
1166
+ // BOT-3501: the web top bar's Docker queue chip in the STATUS row — queued stack
1167
+ // leases plus capacity waiters, "📦 N queued", amber, ↗ to /docker's Queue. BB
1168
+ // sends the count only to an operator; nothing at zero, unknown or malformed.
1169
+ function dockerQueueBadge(el, key, q) {
1170
+ const ok = (v) => Number.isSafeInteger(v) && v >= 0;
1171
+ if (!q || typeof q !== "object" || !ok(q.stack_queued) || !ok(q.capacity_queued)) return [];
1172
+ const n = q.stack_queued + q.capacity_queued;
1173
+ if (n < 1) return [];
1174
+ const text = "📦 " + n + " queued";
1175
+ const link = el.Link({ href: LINKS.dockerQueue, label: "↗" });
1176
+ if (pills() && typeof el.Svg === "function")
1177
+ return [el.Box({ key: key + "-docker-queue", flexDirection: "row", flexShrink: 0, alignItems: "center", columnGap: 1, children: [pillSvg(el, { text, fill: AMBER, bold: true }), link] })];
1178
+ return [
1179
+ el.Box({
1180
+ key: key + "-docker-queue",
1181
+ flexDirection: "row",
1182
+ flexShrink: 0,
1183
+ backgroundColor: AMBER,
1184
+ paddingX: 1,
1185
+ children: [el.Text({ color: "#ffffff", bold: true, children: [text + " "] }), link],
1186
+ }),
1187
+ ];
1188
+ }
1161
1189
  // BOT-3245: statuses and waits are separate, titled rows on the tree's grid
1162
1190
  // (Jono, 2026-11-15: "Staging green is a wait. Staging red is a status."). The
1163
1191
  // title fills the id column; the badges start in the status-badge column and
@@ -1473,6 +1501,8 @@ function bandLines(el, $, inPane) {
1473
1501
  ...(s.staging?.red ? [stagingBanner(el, $, k("line-staging"), s.staging.since, s.staging.release_manager)] : []),
1474
1502
  ...contextBadge(el, k("line-context")),
1475
1503
  ...uncategorisedBadge(el, k("line-project"), s.epic),
1504
+ // BOT-3501: whether a new session would join a host queue.
1505
+ ...dockerQueueBadge(el, k("line-status"), s.docker_queue),
1476
1506
  ];
1477
1507
  const waitsRow = headerRow(el, k("line-waits"), TITLES.waits, widths.ids, [
1478
1508
  // BOT-3394: the session's own push held for compute leads its waits.
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.110.0",
3
- "source_commit": "62787041db72a2944b3abd150da2629cd6f2d4f7",
4
- "source_sha256": "362a9e2dac87e39790748eccfd742254cf89a8177bd06184d6a3ef643d6e9d19",
2
+ "release_version": "1.112.0",
3
+ "source_commit": "9ee512fa02546dc19da38e62a7acd0c9c0fe0ec4",
4
+ "source_sha256": "ab0aeca6b4bc33f23b90662d1e36f4b11d64f4fc552b0f74ea9d653953ad58b3",
5
5
  "target": "darwin-arm64",
6
- "sha256": "445643f5f93d639933ea9fd4beb4a2da1cda84c8a3f38905cf49c186aedf6d28"
6
+ "sha256": "a3ee46320e5577495f96884ffde8e280ffd5ee9f35dfa388d396a6bac935b092"
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.110.0",
3
- "source_commit": "62787041db72a2944b3abd150da2629cd6f2d4f7",
4
- "source_sha256": "362a9e2dac87e39790748eccfd742254cf89a8177bd06184d6a3ef643d6e9d19",
2
+ "release_version": "1.112.0",
3
+ "source_commit": "9ee512fa02546dc19da38e62a7acd0c9c0fe0ec4",
4
+ "source_sha256": "ab0aeca6b4bc33f23b90662d1e36f4b11d64f4fc552b0f74ea9d653953ad58b3",
5
5
  "target": "linux-x64",
6
- "sha256": "738a3cb5e55c0716cec11eb3d126f8725128f71acce2bc41eb8e86f8b5781e95"
6
+ "sha256": "fe9b1d14b08c13bda327ea96ba53f4bd5d8a28d01bd1037baefc392645cddbfa"
7
7
  }
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "release_version": "1.110.0",
4
- "source_commit": "62787041db72a2944b3abd150da2629cd6f2d4f7",
5
- "source_sha256": "362a9e2dac87e39790748eccfd742254cf89a8177bd06184d6a3ef643d6e9d19",
3
+ "release_version": "1.112.0",
4
+ "source_commit": "9ee512fa02546dc19da38e62a7acd0c9c0fe0ec4",
5
+ "source_sha256": "ab0aeca6b4bc33f23b90662d1e36f4b11d64f4fc552b0f74ea9d653953ad58b3",
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": "445643f5f93d639933ea9fd4beb4a2da1cda84c8a3f38905cf49c186aedf6d28",
11
+ "sha256": "a3ee46320e5577495f96884ffde8e280ffd5ee9f35dfa388d396a6bac935b092",
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": "738a3cb5e55c0716cec11eb3d126f8725128f71acce2bc41eb8e86f8b5781e95",
18
+ "sha256": "fe9b1d14b08c13bda327ea96ba53f4bd5d8a28d01bd1037baefc392645cddbfa",
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.110.0",
3
+ "version": "1.112.0",
4
4
  "description": "BotBuddy — Swarm coordination CLI for multi-agent workflows",
5
5
  "type": "module",
6
6
  "bin": {
package/src/stack.mjs CHANGED
@@ -340,9 +340,12 @@ ${bold("run OPTIONS")}
340
340
  serving_host, and the slot and the lease are released. A full serving-host
341
341
  pool still waits for a slot.
342
342
  --child-requires LIST BOT-3030: what the child needs on a host (comma list: node>=24,pnpm,deno,
343
- curl,git,jq,psql,tar,playwright-chromium-libs, or a name the head's
344
- system_packages provide, e.g. playwright-webkit-libs). node, pnpm and deno count
345
- only when they run inside a child's sandbox on that host (BOT-3402).
343
+ curl,git,jq,psql,tar,tar-extract,playwright-chromium-libs, or a name the
344
+ head's system_packages provide, e.g. playwright-webkit-libs). node, pnpm
345
+ and deno count only when they run inside a child's sandbox on that host
346
+ (BOT-3402). BOT-3448: tar-extract means the host's tar can extract an
347
+ archive with directories inside a child's sandbox (Ubuntu 26.04's cannot);
348
+ tar alone covers listing and tar -xO.
346
349
  BOT-3395: curl, git, jq, psql and tar count only when they run inside a
347
350
  child's sandbox too, and the host reports each one's version. A host
348
351
  lacking one is not placed on; the child runs here and the run names what
@@ -778,7 +781,7 @@ export function parseStackArgs(argv) {
778
781
  case "--child-requires": {
779
782
  if (need(a, rest[i + 1])) {
780
783
  const list = rest[++i].split(",").map((x) => x.trim()).filter(Boolean);
781
- if (!list.length || list.some((x) => !/^(node>=[0-9]{1,3}|[a-z][a-z0-9-]{0,47})$/.test(x))) errors.push("--child-requires takes a comma list of node>=<major> or capability names (curl, git, jq, psql, tar, playwright-chromium-libs)");
784
+ if (!list.length || list.some((x) => !/^(node>=[0-9]{1,3}|[a-z][a-z0-9-]{0,47})$/.test(x))) errors.push("--child-requires takes a comma list of node>=<major> or capability names (curl, git, jq, psql, tar, tar-extract, playwright-chromium-libs)");
782
785
  else opts.childRequires.push(...list.filter((x) => !opts.childRequires.includes(x)));
783
786
  }
784
787
  break;
@@ -155,6 +155,15 @@ function pushWaitOf(own) {
155
155
  if (ratio === undefined || position === undefined || waiting === undefined) return null;
156
156
  return { reason: p.reason, load_ratio: ratio, slot_position: position, waiting_count: waiting, since: new Date(p.waiting_since).toISOString() };
157
157
  }
158
+ // BOT-3501: the web top bar's Docker queue count (queued stack leases and
159
+ // capacity waiters), which BB sends only to an operator; null when BB could not
160
+ // read it or sent anything malformed.
161
+ function dockerQueueOf(own) {
162
+ const q = own?.docker_queue;
163
+ const n = (v) => Number.isSafeInteger(v) && v >= 0 && v <= 99999;
164
+ if (!q || typeof q !== "object" || !n(q.stack_queued) || !n(q.capacity_queued)) return null;
165
+ return { stack_queued: q.stack_queued, capacity_queued: q.capacity_queued };
166
+ }
158
167
  function refuse(code, extra = {}) {
159
168
  throw Object.assign(new Error(code), extra);
160
169
  }
@@ -657,6 +666,8 @@ export async function readStatus({
657
666
  // BOT-3394: absent when BB did not say (an older server), so the band knows
658
667
  // whether a quiet timeout should re-read for a hold that began after this read.
659
668
  ...(ownOk && "push_wait" in own ? { push_wait: pushWaitOf(own) } : {}),
669
+ // BOT-3501: absent for a non-operator owner or an older server (no badge).
670
+ ...(ownOk && "docker_queue" in own ? { docker_queue: dockerQueueOf(own) } : {}),
660
671
  // BOT-3136: where the tickets came from — the registered session, an explicit
661
672
  // pick, or (only when the session registered none) a guess from the branch.
662
673
  binding: bindingKind,