@botbuddy/cli 1.123.3 → 1.123.5

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.123.4
4
+
5
+ - BOT-3678: a checkout whose `.botbuddy-agent.json` predates the `tenant` field (the pre-BOT-1608 `{"schema_version":1,"profile":…}` shape, found on old branches) no longer shows "This repo is bound to a tenant BB status does not support". `bb status-band read` refuses a new `repo_binding_stale` code, and the band (1.12.3) says the checkout's `.botbuddy-agent.json` predates tenant binding and to update this branch from main. A binding that names an unknown tenant still refuses `tenant_mismatch`. No tenant is ever inferred from `profile`.
6
+
3
7
  ## 1.123.3
4
8
 
5
9
  - BOT-3667: a new Claude session in a reused worktree connects to BB at once. Claude Desktop reuses worktree folders, and the previous session's BB identity was treated as live for 30 minutes after its transcript was last written, so the new session's band showed "BB identity belongs to another session" and the SessionStart hook did not register it. `bb status-band read` and `bb bootstrap --type claude` now ask Claude's running-session registry (`~/.claude/sessions/<pid>.json`, kept only while a session's process runs): a holder with no entry for a live process has exited, and its cache is set aside at once. A holder that is still running is never taken over. A host with no readable registry, and a holder with no Claude transcript (another harness), keep the previous rules. The band (1.12.2) also retries recoverable identity failures (`session_mismatch`, `session_missing`, `session_bind_failed`, `session_renewal_failed`, `session_changed`) by itself on the same 30 s to 5 min backoff, so it binds once the other session exits. Configuration failures still wait for a fix.
@@ -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.12.2"
14
+ "version": "1.12.3"
15
15
  },
16
16
  {
17
17
  "name": "bb-session",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bb-status",
3
- "version": "1.12.2",
3
+ "version": "1.12.3",
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"
@@ -86,6 +86,9 @@ const ERRORS = {
86
86
  session_renewal_failed: "BB session renewal failed. Refresh to retry, or run `bb doctor --fix`.",
87
87
  session_file_unsafe: "BB session file must be private (mode 0600).",
88
88
  tenant_mismatch: "This repo is bound to a tenant BB status does not support.",
89
+ // BOT-3678: an old branch's .botbuddy-agent.json has no tenant field.
90
+ repo_binding_stale:
91
+ "This checkout's .botbuddy-agent.json predates tenant binding: update this branch from main, then Refresh.",
89
92
  agent_mismatch:
90
93
  "BB returned a different agent. Reconnect BB for this session.",
91
94
  worktree_mismatch: "BB identity belongs to a different worktree.",
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.123.3",
3
- "source_commit": "81598ae767d6a28ec5615319c87b45a56292c6ab",
4
- "source_sha256": "dfda001e9197f3e42cc30d57a182f8b4d39adbc1cd21e3ffd4bef5764345f61d",
2
+ "release_version": "1.123.5",
3
+ "source_commit": "d7e0fbf3a5bb19574ec32f1f6051b0db396e9fd2",
4
+ "source_sha256": "c9b00d299977d1d17ed6da59b3dac32229da0e2014ee84bca6c4cdb6705574de",
5
5
  "target": "darwin-arm64",
6
- "sha256": "efddc5acb85b5f35ca797c9119dceb918ba618e14e445c62a4079db5a95abdc8"
6
+ "sha256": "97d7b621f9970f17c07a9b02d42110fc7b0dc74f3410eebc5be4fe4cc64bce76"
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.123.3",
3
- "source_commit": "81598ae767d6a28ec5615319c87b45a56292c6ab",
4
- "source_sha256": "dfda001e9197f3e42cc30d57a182f8b4d39adbc1cd21e3ffd4bef5764345f61d",
2
+ "release_version": "1.123.5",
3
+ "source_commit": "d7e0fbf3a5bb19574ec32f1f6051b0db396e9fd2",
4
+ "source_sha256": "c9b00d299977d1d17ed6da59b3dac32229da0e2014ee84bca6c4cdb6705574de",
5
5
  "target": "linux-x64",
6
- "sha256": "e789286cb13b8220cf074c412d7f00c93d3d4795107f6ee89ba87b1723fb997f"
6
+ "sha256": "cd22194965d32299b1887c880944fd44596d5bdb42fe2889fae7f09ce7bb6166"
7
7
  }
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "release_version": "1.123.3",
4
- "source_commit": "81598ae767d6a28ec5615319c87b45a56292c6ab",
5
- "source_sha256": "dfda001e9197f3e42cc30d57a182f8b4d39adbc1cd21e3ffd4bef5764345f61d",
3
+ "release_version": "1.123.5",
4
+ "source_commit": "d7e0fbf3a5bb19574ec32f1f6051b0db396e9fd2",
5
+ "source_sha256": "c9b00d299977d1d17ed6da59b3dac32229da0e2014ee84bca6c4cdb6705574de",
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": "efddc5acb85b5f35ca797c9119dceb918ba618e14e445c62a4079db5a95abdc8",
11
+ "sha256": "97d7b621f9970f17c07a9b02d42110fc7b0dc74f3410eebc5be4fe4cc64bce76",
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": "e789286cb13b8220cf074c412d7f00c93d3d4795107f6ee89ba87b1723fb997f",
18
+ "sha256": "cd22194965d32299b1887c880944fd44596d5bdb42fe2889fae7f09ce7bb6166",
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.123.3",
3
+ "version": "1.123.5",
4
4
  "description": "BotBuddy — Swarm coordination CLI for multi-agent workflows",
5
5
  "type": "module",
6
6
  "bin": {
package/src/report.mjs CHANGED
@@ -49,7 +49,7 @@ Example:
49
49
  Refusals (exit 1, nothing stored): report_not_html, report_too_large,
50
50
  report_type_unknown, report_digest_mismatch, scope_missing (the key needs the
51
51
  write scope, or a tenant owner). MCP_TENANT_PIN_REQUIRED (exit 3): your login
52
- reaches several workspaces; retry with --tenant <slug>. Uploading needs an agent key with the write
52
+ reaches several workspaces; retry with --tenant <slug>. Uploading needs an MCP key with the write
53
53
  scope (bb login --tenant, then bb mcp setup). Guide: docs/stored-reports.md.`;
54
54
 
55
55
  const BEGIN = "begin_report_upload";
@@ -298,7 +298,12 @@ export async function readStatus({
298
298
  } catch {
299
299
  refuse("repo_binding_missing");
300
300
  }
301
- if (binding.schema_version !== 1 || !Object.hasOwn(TENANTS, binding.tenant))
301
+ // BOT-3678: a v1 binding with no tenant field predates BOT-1608 (the legacy
302
+ // `profile` shape on an old branch); it is stale, not foreign. No tenant is
303
+ // ever inferred from `profile`.
304
+ if (binding?.schema_version === 1 && !Object.hasOwn(binding, "tenant"))
305
+ refuse("repo_binding_stale");
306
+ if (binding?.schema_version !== 1 || !Object.hasOwn(TENANTS, binding.tenant))
302
307
  refuse("tenant_mismatch");
303
308
  const tenant = binding.tenant;
304
309
  const prefix = TENANTS[tenant];