@botbuddy/cli 1.73.2 → 1.73.3
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/claude-plugin/.claude-plugin/marketplace.json +1 -1
- package/claude-plugin/bb-status/.claude-plugin/plugin.json +1 -1
- package/claude-plugin/bb-status/README.md +10 -0
- package/claude-plugin/bb-status/hooks/register.js +82 -45
- 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 +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.73.3
|
|
4
|
+
|
|
5
|
+
- The bb-status band is tidied after its first live look (BOT-3228). It says "project", never "epic": tickets outside the session's project read "no project" or "other project". A failed read is one short, single-spaced note, such as `Couldn't load project · Couldn't load staging`, and a band that had to guess its tickets from the branch says `Guessed from branch`. Badges are a darker shade of their colour with white letters and icons, rounded outside the terminal, and the staging-red banner is the same red badge as the context alarm. Wait badges use plain words (`Staging status`, `Codex review PR 1655`, `Timer`, `Playwright lane 8`). PRs nest under their ticket by indent, with no trunk line, and the band's rows are evenly spaced. The band now reads correctly when Claude's working directory is a subfolder of the worktree. The plugin version moves to 1.4.1, so `bb update` installs it.
|
|
6
|
+
|
|
3
7
|
## 1.73.2
|
|
4
8
|
|
|
5
9
|
- `bb doctor --fix` keeps the worktree's own BB session. It renews that session in place, fresh or lapsed, and re-checks the stack-lease capability on the same session (`renew_agent_session` with `host` and `worktree`). Before, it registered a new session, which replaced the old one and cut the bb-status band off from the session's tickets and pull requests. A closed session, another Claude session's cache, or a server that returns no capability verdict still gets a new session as before.
|
|
@@ -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.4.
|
|
14
|
+
"version": "1.4.1"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "bb-session",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bb-status",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
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"
|
|
@@ -189,3 +189,13 @@ BB_STATUS_PREVIEW_HARNESS_SESSION_ID=<current-harness-uuid> \
|
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
Live receipts for each BOT-3152 criterion are on the ticket.
|
|
192
|
+
|
|
193
|
+
**BOT-3228 polish.** The band says "project", never "epic" ("no project", "other
|
|
194
|
+
project"). Failed reads share one dim note, single-spaced and joined by ` · `
|
|
195
|
+
(`Couldn't load PRs`, `Couldn't load project`, `Couldn't load staging`, and
|
|
196
|
+
`Guessed from branch` when `session_read` is not `ok`). Badges are a darker shade
|
|
197
|
+
of their status colour with white letters and white icons on every surface,
|
|
198
|
+
rounded (`borderStyle: "round"`) outside the terminal; the staging banner is the
|
|
199
|
+
same red badge as the context alarm. PRs nest by indent with no trunk line, and
|
|
200
|
+
rows sit in one column Box with an even `rowGap`. The read runs from the
|
|
201
|
+
worktree root even when Claude's working directory is a subfolder.
|
|
@@ -196,6 +196,8 @@ function validSnapshot(value, harness, now) {
|
|
|
196
196
|
(value.blockers !== null &&
|
|
197
197
|
!(value.tenant === "botbuddy" && Array.isArray(value.blockers) && value.blockers.length <= 100)) ||
|
|
198
198
|
(value.epic_unreadable !== undefined && typeof value.epic_unreadable !== "boolean") ||
|
|
199
|
+
// BOT-3228 AC-3: why the session's own read was not used.
|
|
200
|
+
(value.session_read !== undefined && !["ok", "unavailable", "other_session", "other_tenant", "malformed"].includes(value.session_read)) ||
|
|
199
201
|
(value.staging != null &&
|
|
200
202
|
!(
|
|
201
203
|
typeof value.staging.configured === "boolean" &&
|
|
@@ -758,19 +760,37 @@ function statusWidth(spec) {
|
|
|
758
760
|
if (!spec.status.length) return spec.icon ? 2 : 0;
|
|
759
761
|
return 2 + (spec.icon ? 2 : 0) + spec.status.reduce((w, part, i) => w + (i ? 3 : 0) + part.text.length, 0);
|
|
760
762
|
}
|
|
761
|
-
// BOT-3223 AC-3: the status is a badge in the band's
|
|
762
|
-
// tickets and the
|
|
763
|
-
//
|
|
764
|
-
//
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
763
|
+
// BOT-3223 AC-3 / BOT-3228: the status is a badge in the band's palette
|
|
764
|
+
// (Linear for tickets and the project, GitHub for PRs), filled with a darker
|
|
765
|
+
// shade of its colour and lettered in white, on every surface (Jono,
|
|
766
|
+
// 2026-11-14). Each fill holds at least 4.5:1 against white. On graphical
|
|
767
|
+
// surfaces the badge is rounded, as Claude Code draws its own chips.
|
|
768
|
+
const DARK = {
|
|
769
|
+
"#f2c94c": "#8a5a00", // Linear started (yellow)
|
|
770
|
+
"#4cb782": "#1f7a4d", // Linear in review (green)
|
|
771
|
+
"#5e6ad2": "#4b55b8", // Linear done (violet)
|
|
772
|
+
"#95a2b3": "#5b6675", // Linear backlog / todo / canceled (grey)
|
|
773
|
+
"#f2994a": "#a8510c", // Linear project backlog (orange)
|
|
774
|
+
"#1a7f37": "#1a7f37", // GitHub open
|
|
775
|
+
"#59636e": "#59636e", // GitHub draft
|
|
776
|
+
"#8250df": "#8250df", // GitHub merged
|
|
777
|
+
"#cf222e": "#cf222e", // GitHub closed / conflict
|
|
778
|
+
};
|
|
771
779
|
function badgeColors(hex) {
|
|
772
|
-
const
|
|
773
|
-
return
|
|
780
|
+
const bg = DARK[String(hex || "").toLowerCase()] || "#5b6675";
|
|
781
|
+
return { bg, fg: "#ffffff", muted: "#ffffff" };
|
|
782
|
+
}
|
|
783
|
+
// The status icon, redrawn in the badge's white ink: its colour strokes and
|
|
784
|
+
// fills turn white, and a white mark inside a filled shape (the Done check)
|
|
785
|
+
// takes the badge's fill so it still reads.
|
|
786
|
+
function inked(source, bg) {
|
|
787
|
+
return String(source || "")
|
|
788
|
+
.replace(/#fff\b/g, "@BG@")
|
|
789
|
+
.replace(/#[0-9a-f]{6}\b/gi, "#ffffff")
|
|
790
|
+
.replace(/@BG@/g, bg);
|
|
791
|
+
}
|
|
792
|
+
function rounded() {
|
|
793
|
+
return surface === "terminal" ? {} : { borderStyle: "round" };
|
|
774
794
|
}
|
|
775
795
|
function statusBadge(el, key, spec) {
|
|
776
796
|
if (!spec.status.length) return spec.icon ? [spec.icon] : [];
|
|
@@ -780,7 +800,7 @@ function statusBadge(el, key, spec) {
|
|
|
780
800
|
if (i) children.push(el.Text({ color: muted, children: [" · "] }));
|
|
781
801
|
children.push(el.Text({ color: part.muted ? muted : fg, children: [part.text] }));
|
|
782
802
|
});
|
|
783
|
-
return [el.Box({ key, flexDirection: "row", flexShrink: 0, backgroundColor: bg, paddingX: 1, children })];
|
|
803
|
+
return [el.Box({ key, flexDirection: "row", flexShrink: 0, backgroundColor: bg, ...rounded(), borderColor: bg, paddingX: 1, children })];
|
|
784
804
|
}
|
|
785
805
|
function bandLine(el, spec, widths, right) {
|
|
786
806
|
const ids = [];
|
|
@@ -826,18 +846,18 @@ function waitBadges(el, key, w, now) {
|
|
|
826
846
|
if (!w || !Number.isSafeInteger(w.count) || w.count < 1) return [];
|
|
827
847
|
const style = pulsing ? { bold: true } : {};
|
|
828
848
|
const { bg, fg } = badgeColors(ICON.violet);
|
|
849
|
+
const shape = { backgroundColor: bg, ...rounded(), borderColor: bg, paddingX: 1 };
|
|
829
850
|
// An older BB lists no items: the one count badge, as before.
|
|
830
851
|
if (!Array.isArray(w.items) || !w.items.length) {
|
|
831
852
|
const text = waitsText(w, now);
|
|
832
|
-
return text ? [el.Box({ key: key + "-waits", flexDirection: "row", flexShrink: 0,
|
|
853
|
+
return text ? [el.Box({ key: key + "-waits", flexDirection: "row", flexShrink: 0, ...shape, children: [el.Text({ color: fg, ...style, children: [text] })] })] : [];
|
|
833
854
|
}
|
|
834
855
|
const out = w.items.slice(0, MAX_WAIT_BADGES).map((i) =>
|
|
835
856
|
el.Box({
|
|
836
857
|
key: key + "-wait-" + i.id,
|
|
837
858
|
flexDirection: "row",
|
|
838
859
|
flexShrink: 0,
|
|
839
|
-
|
|
840
|
-
paddingX: 1,
|
|
860
|
+
...shape,
|
|
841
861
|
children: [
|
|
842
862
|
el.Text({ color: fg, ...style, children: ["⏳ " + i.label + " · " + shortAge(i.created_at, now) + " "] }),
|
|
843
863
|
el.Link({ href: LINKS.wait(i.id), label: "↗" }),
|
|
@@ -852,7 +872,7 @@ function contextLine(el, key, waits = null) {
|
|
|
852
872
|
const alarm = contextAlarm(context);
|
|
853
873
|
if (alarm)
|
|
854
874
|
children.push(
|
|
855
|
-
el.Box({ key: key + "-ctx", flexDirection: "row", flexShrink: 0, backgroundColor: "error", paddingX: 1, children: [el.Text({ color: "#ffffff", bold: true, children: [alarm] })] }),
|
|
875
|
+
el.Box({ key: key + "-ctx", flexDirection: "row", flexShrink: 0, backgroundColor: "error", ...rounded(), borderColor: "error", paddingX: 1, children: [el.Text({ color: "#ffffff", bold: true, children: [alarm] })] }),
|
|
856
876
|
);
|
|
857
877
|
children.push(...waitBadges(el, key, waits, currentTime));
|
|
858
878
|
if (!children.length) return null;
|
|
@@ -865,10 +885,14 @@ async function readContext($) {
|
|
|
865
885
|
context = null;
|
|
866
886
|
}
|
|
867
887
|
}
|
|
888
|
+
// BOT-3228 AC-1: one short, single-spaced note per failed read, joined by " · ".
|
|
889
|
+
// The band says "project", never "epic" (Jono, 2026-11-14).
|
|
868
890
|
const UNREAD = {
|
|
869
|
-
prs: "Couldn't
|
|
870
|
-
epic: "Couldn't
|
|
871
|
-
staging: "
|
|
891
|
+
prs: "Couldn't load PRs",
|
|
892
|
+
epic: "Couldn't load project",
|
|
893
|
+
staging: "Couldn't load staging",
|
|
894
|
+
// BOT-3228 AC-3: the session's own read was not used; the tickets are a guess.
|
|
895
|
+
session: "Guessed from branch",
|
|
872
896
|
};
|
|
873
897
|
// The chip's own age format: minutes, then hours under two days, then days.
|
|
874
898
|
function shortAge(fromIso, now) {
|
|
@@ -883,7 +907,17 @@ function stagingBanner(el, key, since) {
|
|
|
883
907
|
flexDirection: "row",
|
|
884
908
|
columnGap: 1,
|
|
885
909
|
children: [
|
|
886
|
-
|
|
910
|
+
// BOT-3228: the same red badge, white lettering, as the context alarm.
|
|
911
|
+
el.Box({
|
|
912
|
+
key: key + "-badge",
|
|
913
|
+
flexDirection: "row",
|
|
914
|
+
flexShrink: 0,
|
|
915
|
+
backgroundColor: "error",
|
|
916
|
+
...rounded(),
|
|
917
|
+
borderColor: "error",
|
|
918
|
+
paddingX: 1,
|
|
919
|
+
children: [el.Text({ color: "#ffffff", bold: true, children: ["▲ Staging red" + (since ? " " + shortAge(since, currentTime) : "")] })],
|
|
920
|
+
}),
|
|
887
921
|
el.Link({ href: LINKS.staging, label: "Open staging ↗" }),
|
|
888
922
|
],
|
|
889
923
|
});
|
|
@@ -919,7 +953,7 @@ function bandLines(el, $, inPane) {
|
|
|
919
953
|
key: k("line-ticket-" + t.key),
|
|
920
954
|
prefix,
|
|
921
955
|
ids: [{ label: t.key, href: LINKS.ticket(t.key), out: OUT.ticket(s.tenant, t.key) }],
|
|
922
|
-
icon: lead(el, "◆",
|
|
956
|
+
icon: lead(el, "◆", "#ffffff", "ticket " + t.status, inked(ticketIcon(t.status), badgeColors(ticketHex(t.status)).bg)),
|
|
923
957
|
hex: ticketHex(t.status),
|
|
924
958
|
status: [{ text: t.status }],
|
|
925
959
|
title: t.title,
|
|
@@ -935,7 +969,7 @@ function bandLines(el, $, inPane) {
|
|
|
935
969
|
key: k("line-pr-" + p.number),
|
|
936
970
|
prefix,
|
|
937
971
|
ids: [{ label: "PR " + p.number, href: LINKS.pr(p.repo, p.number), out: OUT.pr(p.repo, p.number) }],
|
|
938
|
-
icon: lead(el, "⎇",
|
|
972
|
+
icon: lead(el, "⎇", "#ffffff", "pr " + p.state, inked(prIcon(p.state), badgeColors(hex).bg)),
|
|
939
973
|
hex,
|
|
940
974
|
status,
|
|
941
975
|
title: p.title,
|
|
@@ -954,7 +988,7 @@ function bandLines(el, $, inPane) {
|
|
|
954
988
|
out: s.epic.url,
|
|
955
989
|
},
|
|
956
990
|
],
|
|
957
|
-
icon: lead(el, "◇",
|
|
991
|
+
icon: lead(el, "◇", "#ffffff", "project " + s.epic.state + " " + s.epic.percent + "%", inked(epicIcon(s.epic.state, s.epic.percent), badgeColors(epicHex(s.epic.state)).bg)),
|
|
958
992
|
hex: epicHex(s.epic.state),
|
|
959
993
|
status: [{ text: s.epic.percent + "%" }, ...(Number.isSafeInteger(s.epic.total) && s.epic.total > 0 ? [{ text: s.epic.done + "/" + s.epic.total, muted: true }] : [])],
|
|
960
994
|
// BOT-3213: the project a coordinator session runs, with its tickets by state.
|
|
@@ -962,14 +996,15 @@ function bandLines(el, $, inPane) {
|
|
|
962
996
|
? "Coordinating · " + (s.epic.counts ? countsText(s.epic.counts) + " · " : "") + s.epic.name
|
|
963
997
|
: s.epic.name,
|
|
964
998
|
});
|
|
965
|
-
else if (s.epic_unreadable)
|
|
966
|
-
specs.push({ key: k("line-epic"), ids: [], icon: el.Text({ color: "warning", children: ["◇ "] }), status: [], title: UNREAD.epic, dim: true });
|
|
967
999
|
const keys = s.tickets.map((t) => t.key);
|
|
968
1000
|
const prsOf = (key) => (s.prs || []).filter((p) => p.ticket === key);
|
|
969
1001
|
// A ticket whose project BB did not report (an older CLI) stays in the epic.
|
|
970
1002
|
const inEpic = (t) => !!s.epic && (t.project === undefined || t.project === s.epic.id);
|
|
971
1003
|
const branch = (last) => (last ? "└─ " : "├─ ");
|
|
972
|
-
|
|
1004
|
+
// BOT-3228: no trunk between a ticket's PRs and the next ticket. A row
|
|
1005
|
+
// draws only its own branch, so a wrapped title broke the trunk into stray
|
|
1006
|
+
// dashes (Jono, 2026-11-14); the indent alone nests the PRs.
|
|
1007
|
+
const stem = () => " ";
|
|
973
1008
|
const epicTickets = s.tickets.filter(inEpic);
|
|
974
1009
|
epicTickets.forEach((t, i) => {
|
|
975
1010
|
const last = i === epicTickets.length - 1;
|
|
@@ -979,31 +1014,31 @@ function bandLines(el, $, inPane) {
|
|
|
979
1014
|
});
|
|
980
1015
|
for (const t of s.tickets.filter((t) => !inEpic(t))) {
|
|
981
1016
|
// A ticket in another project is not epic-less (review on #1657).
|
|
982
|
-
specs.push(ticketSpec(t, "", !s.epic ? null : t.project ? "other
|
|
1017
|
+
specs.push(ticketSpec(t, "", !s.epic ? null : t.project ? "other project" : "no project"));
|
|
983
1018
|
const prs = prsOf(t.key);
|
|
984
1019
|
prs.forEach((p, j) => specs.push(prSpec(p, branch(j === prs.length - 1))));
|
|
985
1020
|
}
|
|
986
1021
|
// BOT-3152 AC-1: no PR means no row; a failed read says so.
|
|
987
1022
|
if (s.prs) for (const p of s.prs.filter((p) => !keys.includes(p.ticket))) specs.push(prSpec(p, "", "no ticket"));
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
});
|
|
997
|
-
const widths = {
|
|
998
|
-
ids: Math.max(...specs.map((x) => idsWidth(x.ids, x.prefix))),
|
|
999
|
-
status: Math.max(...specs.map(statusWidth)),
|
|
1000
|
-
};
|
|
1023
|
+
// BOT-3152 AC-1 / BOT-3228 AC-1: a failed read is a note, never an empty
|
|
1024
|
+
// state; every note shares one dim line, joined by a single " · ".
|
|
1025
|
+
const notes = [];
|
|
1026
|
+
if (s.binding === "branch" && s.session_read && s.session_read !== "ok") notes.push(UNREAD.session);
|
|
1027
|
+
if (!s.prs) notes.push(UNREAD.prs);
|
|
1028
|
+
if (s.epic_unreadable) notes.push(UNREAD.epic);
|
|
1029
|
+
// BOT-3152 edge case: unknown staging is its own signal, never a quiet green.
|
|
1030
|
+
if (s.staging == null) notes.push(UNREAD.staging);
|
|
1001
1031
|
const right = [...tag];
|
|
1002
1032
|
if (stale()) right.push(el.Text({ color: "warning", children: ["STALE"] }));
|
|
1003
|
-
|
|
1004
|
-
if (s.staging == null) right.push(dim(el, UNREAD.staging));
|
|
1033
|
+
if (notes.length) right.push(el.Text({ key: k("line-notes"), dimColor: true, children: [notes.join(" · ")] }));
|
|
1005
1034
|
if (details) right.push(details);
|
|
1006
|
-
const
|
|
1035
|
+
const widths = {
|
|
1036
|
+
ids: Math.max(0, ...specs.map((x) => idsWidth(x.ids, x.prefix))),
|
|
1037
|
+
status: Math.max(0, ...specs.map(statusWidth)),
|
|
1038
|
+
};
|
|
1039
|
+
const lines = specs.length
|
|
1040
|
+
? specs.map((spec, i) => bandLine(el, spec, widths, i === 0 ? right : null))
|
|
1041
|
+
: [el.Box({ key: k("line-notes-only"), flexDirection: "row", columnGap: 1, children: right })];
|
|
1007
1042
|
// BOT-3223 AC-1: context alarm and wait badges lead, on one wrapping line.
|
|
1008
1043
|
const ctx = contextLine(el, k("line-context"), s.waits);
|
|
1009
1044
|
if (ctx) lines.unshift(ctx);
|
|
@@ -1114,9 +1149,11 @@ export function register(on) {
|
|
|
1114
1149
|
surface = e.surface;
|
|
1115
1150
|
const theirs = await next(e);
|
|
1116
1151
|
if (unbound && mode === "live") return theirs;
|
|
1152
|
+
// BOT-3228: one even gap between the band's rows (none in the terminal,
|
|
1153
|
+
// where a row is a line; the surface's small step elsewhere).
|
|
1117
1154
|
return el.Box({
|
|
1118
1155
|
flexDirection: "column",
|
|
1119
|
-
children: [theirs,
|
|
1156
|
+
children: [theirs, el.Box({ key: "band", flexDirection: "column", rowGap: "xs", children: bandLines(el, $) })],
|
|
1120
1157
|
});
|
|
1121
1158
|
});
|
|
1122
1159
|
on("ui.render", { component: "Pane" }, async ($, e, next) => {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.73.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.73.3",
|
|
3
|
+
"source_commit": "1d11f9a0881e212eda6474d158c2d30ca54abfce",
|
|
4
|
+
"source_sha256": "13855ea27a4a26cf5ea2d49ce058d4e8ba459a78d49aa123f351eb8834f67b27",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "756319e58995c75e35175fceda15be53222c72a0cfa831e2edfee2a72ef43786"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.73.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.73.3",
|
|
3
|
+
"source_commit": "1d11f9a0881e212eda6474d158c2d30ca54abfce",
|
|
4
|
+
"source_sha256": "13855ea27a4a26cf5ea2d49ce058d4e8ba459a78d49aa123f351eb8834f67b27",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "2d292e6c266e2f797d39cd409aa103983242eb31d2fd4440f995e5161dcad272"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.73.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.73.3",
|
|
4
|
+
"source_commit": "1d11f9a0881e212eda6474d158c2d30ca54abfce",
|
|
5
|
+
"source_sha256": "13855ea27a4a26cf5ea2d49ce058d4e8ba459a78d49aa123f351eb8834f67b27",
|
|
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": "756319e58995c75e35175fceda15be53222c72a0cfa831e2edfee2a72ef43786",
|
|
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": "2d292e6c266e2f797d39cd409aa103983242eb31d2fd4440f995e5161dcad272",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/status-band-read.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { execFile } from "node:child_process";
|
|
|
5
5
|
import { promisify } from "node:util";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { homedir } from "node:os";
|
|
8
|
+
import { findAgentStateRoot } from "./agent-state.mjs";
|
|
8
9
|
const execFileAsync = promisify(execFile);
|
|
9
10
|
const UUID =
|
|
10
11
|
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
@@ -265,6 +266,17 @@ export async function readStatus({
|
|
|
265
266
|
const own = await bb("get_session_status", {});
|
|
266
267
|
const ownOk =
|
|
267
268
|
own?.session_id === state.session_id && own?.tenant_id === tenant && Array.isArray(own?.tickets);
|
|
269
|
+
// BOT-3228 AC-3: why the session's own read was not used, so a branch guess
|
|
270
|
+
// says so and the cause can be found.
|
|
271
|
+
const sessionRead = ownOk
|
|
272
|
+
? "ok"
|
|
273
|
+
: own == null
|
|
274
|
+
? "unavailable"
|
|
275
|
+
: own?.session_id !== state.session_id
|
|
276
|
+
? "other_session"
|
|
277
|
+
: own?.tenant_id !== tenant
|
|
278
|
+
? "other_tenant"
|
|
279
|
+
: "malformed";
|
|
268
280
|
const sessionKeys = ownOk && !selected
|
|
269
281
|
? [...new Set(own.tickets.map((x) => String(x?.key || "").toUpperCase()).filter((k) => keyPattern.test(k)))].slice(0, 5)
|
|
270
282
|
: [];
|
|
@@ -541,6 +553,7 @@ export async function readStatus({
|
|
|
541
553
|
// BOT-3136: where the tickets came from — the registered session, an explicit
|
|
542
554
|
// pick, or (only when the session registered none) a guess from the branch.
|
|
543
555
|
binding: bindingKind,
|
|
556
|
+
session_read: sessionRead,
|
|
544
557
|
blockers: useLinear && key
|
|
545
558
|
? [...new Map(blockers.map((b) => [b.key, b])).values()].sort((a, b) =>
|
|
546
559
|
a.key.localeCompare(b.key),
|
|
@@ -743,6 +756,10 @@ export async function main(args, {
|
|
|
743
756
|
(args.length === 4 && args[2] !== "--ticket-id")
|
|
744
757
|
)
|
|
745
758
|
refuse("invalid_arguments");
|
|
759
|
+
// BOT-3228 AC-2: Claude's working directory can be any folder of the
|
|
760
|
+
// worktree (a `cd` in the session moves it); the binding and the session
|
|
761
|
+
// cache live at the worktree's root, so read from there.
|
|
762
|
+
cwd = await findAgentStateRoot(await realpath(cwd).catch(() => cwd));
|
|
746
763
|
const request = { cwd, harnessSessionId: args[1], ticketId: args[3], linearKey: env.LINEAR_BB_API_KEY, skipEpic };
|
|
747
764
|
if (UUID.test(args[1])) await keepSessionAlive({ cwd, harnessSessionId: args[1], now, heartbeat, renew });
|
|
748
765
|
let snapshot;
|