@botbuddy/cli 1.69.7 → 1.69.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.69.8
4
+
5
+ - The bb-status band's context row is simpler: just `Context 45%`, right-aligned, without the token counts. It turns amber above 30% context use and red above 50%, on every surface, so a session running low on context stands out. The colour is judged on the rounded percent the row shows. The band's plugin version moves to 1.1.1, so `bb update` re-installs it.
6
+
3
7
  ## 1.69.6
4
8
 
5
9
  - A new Claude Code session in a reused worktree binds its bb-status band even when the worktree's BotBuddy session was started by an earlier Claude session that has since gone. Before, the band said "BB identity belongs to another session" for as long as that BB session stayed live, and other sessions' `bb` commands in the worktree kept renewing it. The band now judges the holder by its Claude session: when the holder's transcript has been silent for 30 minutes, the band moves its cache aside to `.botbuddy/agent-state.superseded-<id>.json` and binds this session. The old BB session is not closed, so waits still running on it carry on, and it expires on its own. A holder whose Claude session is active is never replaced.
@@ -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 and staging, for BotBuddy and Supply Guard sessions",
14
- "version": "1.1.0"
14
+ "version": "1.1.1"
15
15
  }
16
16
  ]
17
17
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bb-status",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "BB session status above the prompt: tickets, PRs with review counts, epic, staging and context use, live only while the session is on screen.",
5
5
  "author": {
6
6
  "name": "BotBuddy"
@@ -32,12 +32,15 @@ session. Once a surface draws the session again, the 5 s display tick does one
32
32
  read and re-arms the relay.
33
33
 
34
34
  **BOT-3211 context row.** The last row shows the session's context use as
35
- Claude Code's status line has it, for example `Context 62% · 124k of 200k`. The
35
+ Claude Code's status line has it, right-aligned, for example `Context 62%`
36
+ (BOT-3217 dropped the token counts). The
36
37
  mod reads it once with the free `$.session.usage()` (no `breakdown`) at
37
38
  session start and resume, then only from the `session.measure` event the
38
39
  engine pushes after each main-thread turn: no timer reads it. The row is hidden
39
40
  while the runtime has no fill figure (a fresh or just-compacted session before
40
- its next response), never shown as 0%.
41
+ its next response), never shown as 0%. It is dim up to 30%, amber (`warning`)
42
+ above 30% and red (`error`) above 50% (BOT-3217), judged on the rounded percent
43
+ it shows.
41
44
 
42
45
  ## Install
43
46
 
@@ -696,33 +696,31 @@ function bandLine(el, spec, widths, right) {
696
696
  // Top-aligned: with a wrapped title, the id and status sit on its first line.
697
697
  return el.Box({ key: spec.key, flexDirection: "row", alignItems: "flex-start", columnGap: 1, children });
698
698
  }
699
- // BOT-3211: 124000 → "124k", 1000000 → "1M".
700
- function tokens(n) {
701
- if (n >= 999500) return String(Math.round(n / 100000) / 10).replace(/\.0$/, "") + "M";
702
- if (n >= 1000) return Math.round(n / 1000) + "k";
703
- return String(n);
704
- }
705
- // The row's text, or null when the runtime has no fill figure (a fresh or
706
- // just-compacted session): hidden, never "0%".
699
+ // BOT-3211/BOT-3217: "Context 62%", or null when the runtime has no fill
700
+ // figure (a fresh or just-compacted session): hidden, never "0%".
707
701
  function contextText(c) {
708
- if (
709
- !c ||
710
- !Number.isFinite(c.percent) ||
711
- c.percent < 0 ||
712
- c.percent > 100 ||
713
- !Number.isSafeInteger(c.window) ||
714
- c.window <= 0
715
- )
716
- return null;
717
- const pct = "Context " + Math.round(c.percent) + "%";
718
- return Number.isSafeInteger(c.tokens) && c.tokens >= 0
719
- ? pct + " · " + tokens(c.tokens) + " of " + tokens(c.window)
720
- : pct + " of " + tokens(c.window);
702
+ if (!c || !Number.isFinite(c.percent) || c.percent < 0 || c.percent > 100) return null;
703
+ return "Context " + Math.round(c.percent) + "%";
704
+ }
705
+ // BOT-3217: amber above 30%, red above 50%, judged on the rounded percent the
706
+ // row shows, so the colour always matches the number.
707
+ function contextColor(c) {
708
+ const pct = Math.round(c.percent);
709
+ if (pct > 50) return "error";
710
+ if (pct > 30) return "warning";
711
+ return null;
721
712
  }
722
713
  function contextLine(el, key) {
723
714
  const text = contextText(context);
724
715
  if (!text) return null;
725
- return el.Box({ key, flexDirection: "row", children: [dim(el, text)] });
716
+ const color = contextColor(context);
717
+ // Right-aligned on its own row (Jono, BOT-3217).
718
+ return el.Box({
719
+ key,
720
+ flexDirection: "row",
721
+ justifyContent: "flex-end",
722
+ children: [color ? el.Text({ color, children: [text] }) : dim(el, text)],
723
+ });
726
724
  }
727
725
  async function readContext($) {
728
726
  try {
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.69.7",
3
- "source_commit": "52aeefbc6a3f3a3227d48751cf58574975ad59c2",
4
- "source_sha256": "fcfafa031f43c1216a917942b1d33030ccb67d3031d22f1dbb7cd82c264ec62f",
2
+ "release_version": "1.69.8",
3
+ "source_commit": "704da4fe10bcbc13f1ca3abc6b0d47d2260e2c62",
4
+ "source_sha256": "2465657c2fe4fa188d73f3b7efda0f608144afcfd8d7eba465ece55ccb1204f3",
5
5
  "target": "darwin-arm64",
6
- "sha256": "d7206dcfb3c2b5c3ca5d15efc42de45c13c9d0fe874555a10968bf08585f0cae"
6
+ "sha256": "865f29aebd07e09de6c5b77fd5297db5a568c30843c4395e8ae4e927b0d4e7ad"
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.69.7",
3
- "source_commit": "52aeefbc6a3f3a3227d48751cf58574975ad59c2",
4
- "source_sha256": "fcfafa031f43c1216a917942b1d33030ccb67d3031d22f1dbb7cd82c264ec62f",
2
+ "release_version": "1.69.8",
3
+ "source_commit": "704da4fe10bcbc13f1ca3abc6b0d47d2260e2c62",
4
+ "source_sha256": "2465657c2fe4fa188d73f3b7efda0f608144afcfd8d7eba465ece55ccb1204f3",
5
5
  "target": "linux-x64",
6
- "sha256": "c57454938647984335e54841948df3a07797deaebf75694225b4843a3b65b372"
6
+ "sha256": "6ad28e621587a5a697621c54c5a9b09f90c79b0687a4ae1f25f380ef02843d4b"
7
7
  }
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "release_version": "1.69.7",
4
- "source_commit": "52aeefbc6a3f3a3227d48751cf58574975ad59c2",
5
- "source_sha256": "fcfafa031f43c1216a917942b1d33030ccb67d3031d22f1dbb7cd82c264ec62f",
3
+ "release_version": "1.69.8",
4
+ "source_commit": "704da4fe10bcbc13f1ca3abc6b0d47d2260e2c62",
5
+ "source_sha256": "2465657c2fe4fa188d73f3b7efda0f608144afcfd8d7eba465ece55ccb1204f3",
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": "d7206dcfb3c2b5c3ca5d15efc42de45c13c9d0fe874555a10968bf08585f0cae",
11
+ "sha256": "865f29aebd07e09de6c5b77fd5297db5a568c30843c4395e8ae4e927b0d4e7ad",
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": "c57454938647984335e54841948df3a07797deaebf75694225b4843a3b65b372",
18
+ "sha256": "6ad28e621587a5a697621c54c5a9b09f90c79b0687a4ae1f25f380ef02843d4b",
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.69.7",
3
+ "version": "1.69.8",
4
4
  "description": "BotBuddy — Swarm coordination CLI for multi-agent workflows",
5
5
  "type": "module",
6
6
  "bin": {