@botbuddy/cli 1.68.0 → 1.68.1
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 +4 -0
- package/daemon/bin/darwin-arm64/botbuddy-daemon +0 -0
- package/daemon/bin/linux-x64/botbuddy-daemon +0 -0
- package/daemon-release/darwin-arm64.json +4 -4
- package/daemon-release/linux-x64.json +4 -4
- package/daemon-release/manifest.json +5 -5
- package/package.json +1 -1
- package/src/status-band-read.mjs +59 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.68.1
|
|
4
|
+
|
|
5
|
+
- The bb-status band now binds a Claude Code session whose repo has no BotBuddy SessionStart hook, such as Supply Guard worktrees, instead of showing "BB identity belongs to another session". When the worktree has no session cache, an unbound one or an expired one, `bb status-band read` bootstraps this session once (ticketless, the same bootstrap `bb bootstrap` runs) and reads again. A cache another live session holds is never taken over.
|
|
6
|
+
|
|
3
7
|
## 1.68.0
|
|
4
8
|
|
|
5
9
|
- The bb-status band for Claude Code now ships in this package. `bb setup` and `bb update` install it once, at user scope, through `bb status-band install`. They point the `botbuddy-labs` marketplace at the plugin inside the installed CLI, so every worktree shows the band with no plugin command, and no repo checkout is needed. The band's reads and live wake run from the installed CLI (`bb status-band read` and `bb status-band relay`).
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.68.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.68.1",
|
|
3
|
+
"source_commit": "910247e2ef698463c9c5e1e4949caac7c6bb343c",
|
|
4
|
+
"source_sha256": "cd971a2647c6424648a30ec47b69c5eff464f408888cd66b5ea9d23a37cf6b83",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "9cbc2b6f427cc6070f27492bd1693525bcbbc4dad66aacdd2d82c5fb7f64d834"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.68.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.68.1",
|
|
3
|
+
"source_commit": "910247e2ef698463c9c5e1e4949caac7c6bb343c",
|
|
4
|
+
"source_sha256": "cd971a2647c6424648a30ec47b69c5eff464f408888cd66b5ea9d23a37cf6b83",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "2ace98b6231c22ae2cf20940ef61c5d08df4ed6af7735f8109bc91fe829eb1fb"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.68.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.68.1",
|
|
4
|
+
"source_commit": "910247e2ef698463c9c5e1e4949caac7c6bb343c",
|
|
5
|
+
"source_sha256": "cd971a2647c6424648a30ec47b69c5eff464f408888cd66b5ea9d23a37cf6b83",
|
|
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": "
|
|
11
|
+
"sha256": "9cbc2b6f427cc6070f27492bd1693525bcbbc4dad66aacdd2d82c5fb7f64d834",
|
|
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": "
|
|
18
|
+
"sha256": "2ace98b6231c22ae2cf20940ef61c5d08df4ed6af7735f8109bc91fe829eb1fb",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/status-band-read.mjs
CHANGED
|
@@ -473,7 +473,48 @@ export async function readStatus({
|
|
|
473
473
|
: null,
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
|
-
|
|
476
|
+
// BOT-3152 AC-5: a repo with no SessionStart bootstrap hook (Supply Guard) leaves
|
|
477
|
+
// the worktree cache missing, unbound (no harness id) or expired, so the band
|
|
478
|
+
// binds this session itself, once per read, through the same bootstrap
|
|
479
|
+
// `bb bootstrap` runs. A cache another harness session holds is never
|
|
480
|
+
// bootstrapped over: that session owns the worktree's identity.
|
|
481
|
+
const BINDABLE = new Set(["session_missing", "session_mismatch", "session_expired"]);
|
|
482
|
+
async function bindable(cwd, harnessSessionId, now) {
|
|
483
|
+
let state;
|
|
484
|
+
try {
|
|
485
|
+
state = JSON.parse(await readFile(join(await realpath(cwd), ".botbuddy/agent-state.json"), "utf8"));
|
|
486
|
+
} catch (error) {
|
|
487
|
+
return error?.code === "ENOENT";
|
|
488
|
+
}
|
|
489
|
+
const holder = typeof state?.harness_session_id === "string" ? state.harness_session_id.toLowerCase() : "";
|
|
490
|
+
if (!holder || holder === harnessSessionId.toLowerCase()) return true;
|
|
491
|
+
return !(Date.parse(state.expires_at) > now());
|
|
492
|
+
}
|
|
493
|
+
async function bootstrapBand({ cwd, harnessSessionId, branch }) {
|
|
494
|
+
const [{ bootstrapHarnessSession }, { getConfig }, { hostname }] = await Promise.all([
|
|
495
|
+
import("./session-bootstrap.mjs"),
|
|
496
|
+
import("./config.mjs"),
|
|
497
|
+
import("node:os"),
|
|
498
|
+
]);
|
|
499
|
+
await bootstrapHarnessSession({
|
|
500
|
+
name: `${getConfig()?.agent_name || `botbuddy-${hostname()}`}-${harnessSessionId.slice(0, 8)}`,
|
|
501
|
+
type: "claude",
|
|
502
|
+
harnessSessionId,
|
|
503
|
+
cwd,
|
|
504
|
+
branch,
|
|
505
|
+
noTicketReason: "bb-status band bound a Claude Code session its repo did not bootstrap",
|
|
506
|
+
harness: "botbuddy-claude-band",
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export async function main(args, {
|
|
511
|
+
out = process.stdout,
|
|
512
|
+
cwd = process.cwd(),
|
|
513
|
+
env = process.env,
|
|
514
|
+
read = readStatus,
|
|
515
|
+
bootstrap = bootstrapBand,
|
|
516
|
+
now = () => Date.now(),
|
|
517
|
+
} = {}) {
|
|
477
518
|
try {
|
|
478
519
|
args = [...args];
|
|
479
520
|
const skipEpic = args.at(-1) === "--skip-epic";
|
|
@@ -484,13 +525,23 @@ export async function main(args, { out = process.stdout, cwd = process.cwd(), en
|
|
|
484
525
|
(args.length === 4 && args[2] !== "--ticket-id")
|
|
485
526
|
)
|
|
486
527
|
refuse("invalid_arguments");
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
528
|
+
const request = { cwd, harnessSessionId: args[1], ticketId: args[3], linearKey: env.LINEAR_BB_API_KEY, skipEpic };
|
|
529
|
+
let snapshot;
|
|
530
|
+
try {
|
|
531
|
+
snapshot = await read(request);
|
|
532
|
+
} catch (error) {
|
|
533
|
+
if (!BINDABLE.has(error?.message) || !UUID.test(args[1]) || !(await bindable(cwd, args[1], now))) throw error;
|
|
534
|
+
let branch = null;
|
|
535
|
+
try {
|
|
536
|
+
branch = (await execFileAsync("git", ["branch", "--show-current"], { cwd })).stdout.trim() || null;
|
|
537
|
+
} catch { /* detached or not a repo: bootstrap without a branch */ }
|
|
538
|
+
try {
|
|
539
|
+
await bootstrap({ cwd, harnessSessionId: args[1].toLowerCase(), branch });
|
|
540
|
+
} catch {
|
|
541
|
+
throw error;
|
|
542
|
+
}
|
|
543
|
+
snapshot = await read(request);
|
|
544
|
+
}
|
|
494
545
|
out.write(JSON.stringify(snapshot) + "\n");
|
|
495
546
|
return 0;
|
|
496
547
|
} catch (error) {
|