@botbuddy/cli 1.110.0 → 1.111.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,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.111.0
4
+
5
+ - 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.
6
+
3
7
  ## 1.110.0
4
8
 
5
9
  - 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.111.0",
3
+ "source_commit": "e535ac011ab3e80c350d5c34818d32c45874027e",
4
+ "source_sha256": "e60de0a865bcb5fc2c037089a52fc6d3fe6b2933cc34ddd4df55778cff19341e",
5
5
  "target": "darwin-arm64",
6
- "sha256": "445643f5f93d639933ea9fd4beb4a2da1cda84c8a3f38905cf49c186aedf6d28"
6
+ "sha256": "82e57baa52b665ae624396d535db23c2de3cdf1e7c352276fe6d4a61d9891a5f"
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.111.0",
3
+ "source_commit": "e535ac011ab3e80c350d5c34818d32c45874027e",
4
+ "source_sha256": "e60de0a865bcb5fc2c037089a52fc6d3fe6b2933cc34ddd4df55778cff19341e",
5
5
  "target": "linux-x64",
6
- "sha256": "738a3cb5e55c0716cec11eb3d126f8725128f71acce2bc41eb8e86f8b5781e95"
6
+ "sha256": "aa94920b442ad5cdd1b6d0210bb6e2739c1e86ebb7614851f6a4bc348ab19022"
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.111.0",
4
+ "source_commit": "e535ac011ab3e80c350d5c34818d32c45874027e",
5
+ "source_sha256": "e60de0a865bcb5fc2c037089a52fc6d3fe6b2933cc34ddd4df55778cff19341e",
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": "82e57baa52b665ae624396d535db23c2de3cdf1e7c352276fe6d4a61d9891a5f",
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": "aa94920b442ad5cdd1b6d0210bb6e2739c1e86ebb7614851f6a4bc348ab19022",
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.111.0",
4
4
  "description": "BotBuddy — Swarm coordination CLI for multi-agent workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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,