@botbuddy/cli 1.80.0 → 1.82.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 +8 -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 +12 -0
- package/claude-plugin/bb-status/hooks/register.js +53 -2
- 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/release-notes.mjs +64 -5
- package/src/status-band-read.mjs +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.82.0
|
|
4
|
+
|
|
5
|
+
- The bb-status band's STATUS row leads with the session project's coordinator (BOT-3286): `Coordinator <name> ↗` opens the coordinator's Claude Code or Codex session (a button on Desktop, a link in the terminal), with `· you` on the coordinator's own band, `· idle` after 15 quiet minutes and `+N` when the project has several. A project with none reads `No coordinator`; a session with no project, or an older MCP, shows nothing. `bb status-band read` carries it as `epic.coordinator`. bb-status plugin 1.7.0.
|
|
6
|
+
|
|
7
|
+
## 1.81.0
|
|
8
|
+
|
|
9
|
+
- `bb release-notes submit <note.json> --pack <pack.json>` adds the pack file to the note unchanged as its internal `bbrn-pack-1` pack (BOT-3260) and prints the customers BotBuddy derived from Linear, or `unavailable (<reason>)`; `--json` includes them as `customers`. An unreadable pack file, a note that already has a `pack`, or `--pack` with no file is a usage error and sends nothing. The help lists the pack fields and `pack_field_missing`; each field's good and bad example is in `docs/release-notes/pack-fields.md`.
|
|
10
|
+
|
|
3
11
|
## 1.79.0
|
|
4
12
|
|
|
5
13
|
- The bb-status band's STATUS line warns while the session's project has tickets with none of the Must, Unsure or Could labels (BOT-3263): an amber `⚠ 26 project tickets not categorised` with a ↗ to the project drawer filtered to them (`&progress=uncategorised`). The count is BB's `progress_uncategorised`; against an older MCP that does not send it there is no warning. The project row's badge is unchanged. bb-status plugin 1.6.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.
|
|
14
|
+
"version": "1.7.0"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "bb-session",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bb-status",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.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"
|
|
@@ -223,6 +223,18 @@ Only `claude://claude.ai/epitaxy/local_<uuid>` and `codex://threads/<uuid>` are
|
|
|
223
223
|
accepted; any other link rejects the snapshot. No session: the name is plain
|
|
224
224
|
text; none elected: `No release manager yet`.
|
|
225
225
|
|
|
226
|
+
**BOT-3286 project coordinator.** The `STATUS` row leads with who coordinates
|
|
227
|
+
the session's project (`epic.coordinator`, from `get_session_status.project_coordinator`):
|
|
228
|
+
`Coordinator <name> ↗`, opening their session the same way as the release
|
|
229
|
+
manager's name, then `· you` on the coordinator's own band, `· idle` when they
|
|
230
|
+
have been quiet 15 minutes or more, and `+N` when the project has more
|
|
231
|
+
coordinators. A project with none shows `No coordinator`. No project, an older
|
|
232
|
+
CLI or MCP, or a failed read shows nothing. A coordinator link outside the two
|
|
233
|
+
accepted forms rejects the snapshot. No signal carries a coordinator registering, ending or
|
|
234
|
+
going idle, so while the badge is shown each quiet relay timeout (about 9.5
|
|
235
|
+
minutes) reads again. BB reads the project's newest 200 coordinator edges; a
|
|
236
|
+
full page is a failed read (no badge), never `No coordinator`.
|
|
237
|
+
|
|
226
238
|
**BOT-3245 STATUS and WAITS.** The band opens with up to two titled rows on
|
|
227
239
|
the tree's grid: `STATUS` (staging red, its release manager and link, the
|
|
228
240
|
context alarm) and `WAITS` (each active wait, three at most, then `+N more`).
|
|
@@ -151,6 +151,21 @@ function validProgress(p) {
|
|
|
151
151
|
(p.uncategorised === undefined || (Number.isSafeInteger(p.uncategorised) && p.uncategorised >= 0 && p.uncategorised <= 100000))
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
|
+
// BOT-3286: the coordinator of the session's project, as the CLI re-validated it.
|
|
155
|
+
function validCoordinator(c) {
|
|
156
|
+
return (
|
|
157
|
+
!!c &&
|
|
158
|
+
typeof c === "object" &&
|
|
159
|
+
safeLabel(c.name, 80) &&
|
|
160
|
+
["claude", "codex", "botbuddy"].includes(c.provider) &&
|
|
161
|
+
["live", "idle"].includes(c.state) &&
|
|
162
|
+
(c.href === null || SESSION_HREF.some((re) => re.test(c.href))) &&
|
|
163
|
+
typeof c.you === "boolean" &&
|
|
164
|
+
Number.isSafeInteger(c.others) &&
|
|
165
|
+
c.others >= 0 &&
|
|
166
|
+
c.others <= 999
|
|
167
|
+
);
|
|
168
|
+
}
|
|
154
169
|
function countsText(c) {
|
|
155
170
|
return [c.done + " done", c.in_progress + " in progress", c.blocked + " blocked", c.todo + " todo"].join(" · ");
|
|
156
171
|
}
|
|
@@ -217,7 +232,10 @@ function validSnapshot(value, harness, now) {
|
|
|
217
232
|
(Number.isSafeInteger(value.epic.total) && Number.isSafeInteger(value.epic.done) && value.epic.done >= 0 && value.epic.done <= value.epic.total)) &&
|
|
218
233
|
(value.epic.role === undefined || value.epic.role === "coordinator") &&
|
|
219
234
|
(value.epic.counts === undefined || validCounts(value.epic.counts)) &&
|
|
220
|
-
(value.epic.progress === undefined || validProgress(value.epic.progress))
|
|
235
|
+
(value.epic.progress === undefined || validProgress(value.epic.progress)) &&
|
|
236
|
+
// BOT-3286: the project's coordinator: absent (unknown), null (none) or a
|
|
237
|
+
// safe name with a verified session link or none.
|
|
238
|
+
(value.epic.coordinator === undefined || value.epic.coordinator === null || validCoordinator(value.epic.coordinator))
|
|
221
239
|
)) ||
|
|
222
240
|
(value.blockers !== null &&
|
|
223
241
|
!(value.tenant === "botbuddy" && Array.isArray(value.blockers) && value.blockers.length <= 100)) ||
|
|
@@ -585,6 +603,10 @@ function startRelay($) {
|
|
|
585
603
|
await wakeRead();
|
|
586
604
|
} else if (res.exit === 2) {
|
|
587
605
|
since = cursor || since;
|
|
606
|
+
// BOT-3286 (Codex P2 on #1727): no signal carries a coordinator
|
|
607
|
+
// registering, ending or going idle, so a shown badge re-reads on each
|
|
608
|
+
// quiet timeout (~9.5 min).
|
|
609
|
+
if (snapshot?.epic && snapshot.epic.coordinator !== undefined) await wakeRead();
|
|
588
610
|
} else if (res.exit === 5) {
|
|
589
611
|
backoffMs = Math.min(backoffMs ? backoffMs * 2 : 30000, 300000);
|
|
590
612
|
since = cursor || since;
|
|
@@ -1115,6 +1137,33 @@ function releaseManager(el, $, rm) {
|
|
|
1115
1137
|
}),
|
|
1116
1138
|
];
|
|
1117
1139
|
}
|
|
1140
|
+
// BOT-3286 AC-2/4: "Coordinator <name> ↗" for the session's project, opening the
|
|
1141
|
+
// coordinator's session as the release manager's name does; "· you" on the
|
|
1142
|
+
// coordinator's own band; "· idle" and "+N" more. null says "No coordinator";
|
|
1143
|
+
// undefined (no project, an older CLI or MCP, a failed read) shows nothing.
|
|
1144
|
+
function coordinatorBadge(el, $, key, c) {
|
|
1145
|
+
if (c === undefined) return [];
|
|
1146
|
+
const row = (children) => el.Box({ key, flexDirection: "row", alignItems: "center", columnGap: 1, flexShrink: 0, children });
|
|
1147
|
+
if (c === null) return [row([dim(el, "No coordinator")])];
|
|
1148
|
+
let name;
|
|
1149
|
+
if (!c.href || !SESSION_HREF.some((re) => re.test(c.href))) name = el.Text({ children: [c.name] });
|
|
1150
|
+
else if (surface === "terminal") name = el.Link({ href: c.href, label: c.name + " ↗" });
|
|
1151
|
+
else
|
|
1152
|
+
name = el.Button({
|
|
1153
|
+
key: "coordinator",
|
|
1154
|
+
label: c.name + " ↗",
|
|
1155
|
+
onPress: async () => {
|
|
1156
|
+
try {
|
|
1157
|
+
const r = await $.process.run(["open", c.href], { timeoutMs: 10000 });
|
|
1158
|
+
if (r?.exitCode !== 0) $.ui.toast("Couldn't open " + c.name + "'s session");
|
|
1159
|
+
} catch {
|
|
1160
|
+
$.ui.toast("Couldn't open " + c.name + "'s session");
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
});
|
|
1164
|
+
const tail = [c.you ? "· you" : null, c.state === "idle" ? "· idle" : null, c.others ? "+" + c.others : null].filter(Boolean);
|
|
1165
|
+
return [row([dim(el, "Coordinator"), name, ...(tail.length ? [dim(el, tail.join(" "))] : [])])];
|
|
1166
|
+
}
|
|
1118
1167
|
function stagingBanner(el, $, key, since, rm) {
|
|
1119
1168
|
const text = "▲ Staging red" + (since ? " " + shortAge(since, currentTime) : "");
|
|
1120
1169
|
return el.Box({
|
|
@@ -1280,8 +1329,10 @@ function bandLines(el, $, inPane) {
|
|
|
1280
1329
|
? [el.Box({ key: k("line-notes-only"), flexDirection: "row", columnGap: 1, children: right })]
|
|
1281
1330
|
: [];
|
|
1282
1331
|
if (noteLine) lines.push(noteLine);
|
|
1283
|
-
// BOT-3245: STATUS (staging red, then the context alarm), then WAITS, then the tree.
|
|
1332
|
+
// BOT-3245: STATUS (the coordinator, staging red, then the context alarm), then WAITS, then the tree.
|
|
1284
1333
|
const statuses = [
|
|
1334
|
+
// BOT-3286: the project's coordinator leads the first row.
|
|
1335
|
+
...(s.epic ? coordinatorBadge(el, $, k("line-coordinator"), s.epic.coordinator) : []),
|
|
1285
1336
|
...(s.staging?.red ? [stagingBanner(el, $, k("line-staging"), s.staging.since, s.staging.release_manager)] : []),
|
|
1286
1337
|
...contextBadge(el, k("line-context")),
|
|
1287
1338
|
...uncategorisedBadge(el, k("line-project"), s.epic),
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.82.0",
|
|
3
|
+
"source_commit": "84e7afe95e670861bdde3e88de613cb7e8692a70",
|
|
4
|
+
"source_sha256": "b3e55278822bb7fe8b703b7ffa6a50919dde616b27fe451eee396979b4b9ee5b",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "1b72b6becac4cf505c10a38baf8085374b7b60c0e91013fb05c4030177b6ebaa"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.82.0",
|
|
3
|
+
"source_commit": "84e7afe95e670861bdde3e88de613cb7e8692a70",
|
|
4
|
+
"source_sha256": "b3e55278822bb7fe8b703b7ffa6a50919dde616b27fe451eee396979b4b9ee5b",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "dfc4050c693b81549c7cbdc94703aa0e8c5000e5957f91333ebdf5049cdca38b"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.82.0",
|
|
4
|
+
"source_commit": "84e7afe95e670861bdde3e88de613cb7e8692a70",
|
|
5
|
+
"source_sha256": "b3e55278822bb7fe8b703b7ffa6a50919dde616b27fe451eee396979b4b9ee5b",
|
|
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": "1b72b6becac4cf505c10a38baf8085374b7b60c0e91013fb05c4030177b6ebaa",
|
|
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": "dfc4050c693b81549c7cbdc94703aa0e8c5000e5957f91333ebdf5049cdca38b",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/release-notes.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { readFile } from "node:fs/promises";
|
|
|
7
7
|
import { CALL_EXIT, callToolJson, resolveCallAuth } from "./api.mjs";
|
|
8
8
|
import { cmdReleaseNotesKeys, cmdReleaseNotesOrigins, RELEASE_NOTES_KEYS_USAGE } from "./release-notes-keys.mjs";
|
|
9
9
|
|
|
10
|
-
export const RELEASE_NOTES_USAGE = `Usage: bb release-notes submit <note.json> [--json]
|
|
10
|
+
export const RELEASE_NOTES_USAGE = `Usage: bb release-notes submit <note.json> [--pack <pack.json>] [--json]
|
|
11
11
|
bb release-notes list [--tag <group>=<value>]... [--type <type>] [--state <state>] [--cursor <cursor>] [--json]
|
|
12
12
|
bb release-notes get <source_key> [--json]
|
|
13
13
|
bb release-notes grants list [--tenant <slug>] [--json]
|
|
@@ -36,10 +36,28 @@ No HTML and no links inside a body. A link url is https://… or an app path
|
|
|
36
36
|
starting with one /. Write the text yourself: BotBuddy stores exactly what you
|
|
37
37
|
submit.
|
|
38
38
|
|
|
39
|
+
Pack (bbrn-pack-1, internal only, BOT-3260). --pack adds the file as the
|
|
40
|
+
note's "pack": the fields a release pack and testing tour are built from.
|
|
41
|
+
|
|
42
|
+
{ "schema": "bbrn-pack-1", "category": "Feature",
|
|
43
|
+
"audience": ["Release manager"],
|
|
44
|
+
"before": "…", "after": "…", "benefit": "…", "ui": "none",
|
|
45
|
+
"tour": { "find_it": "/release-notes", "try": "…", "look_for": "…",
|
|
46
|
+
"watch": "…", "role": ["Release manager"] } }
|
|
47
|
+
|
|
48
|
+
category is Feature, Bug fix or Chore. A Feature or Bug fix needs before,
|
|
49
|
+
after, benefit, ui (bbrn-md-1, or "none" when there is no UI) and the tour's
|
|
50
|
+
find_it (an app path or https URL), try and look_for; a Chore needs only
|
|
51
|
+
category and after. A missing field is refused with pack_field_missing naming
|
|
52
|
+
it. audience and tour.role are values of your tenant's persona tag group.
|
|
53
|
+
Never write customers: BotBuddy derives them from the linked Linear tickets'
|
|
54
|
+
customer needs and the receipt prints them (or why they are unavailable).
|
|
55
|
+
Each field, with a good and a bad example: docs/release-notes/pack-fields.md.
|
|
56
|
+
|
|
39
57
|
Submitting the same source_key again updates the note and adds a revision.
|
|
40
58
|
An unchanged resubmit (a retry) adds none. A refusal names its code
|
|
41
59
|
(schema_invalid, type_unknown, markup_refused, link_refused,
|
|
42
|
-
entitlement_missing) and stores nothing.
|
|
60
|
+
entitlement_missing, pack_field_missing) and stores nothing.
|
|
43
61
|
|
|
44
62
|
Reading. list shows your tenant's notes, newest change first, 50 a page:
|
|
45
63
|
source key, type, state, revision count, internal title and tags. Filters
|
|
@@ -61,7 +79,8 @@ owner), member_not_in_tenant, owner_scope_is_implicit, scope_unknown,
|
|
|
61
79
|
entitlement_missing.
|
|
62
80
|
|
|
63
81
|
Tags. Each tenant manages its own tag groups (Component and Module to start,
|
|
64
|
-
plus any it adds
|
|
82
|
+
then Persona and Customer, plus any it adds). Customer is internal only and
|
|
83
|
+
filled from Linear: never submit it. tags lists each group's values, retired
|
|
65
84
|
values and what the internal and external views show; read it before you
|
|
66
85
|
submit. A note may carry only listed values: tag_group_unknown,
|
|
67
86
|
tag_value_unknown (the message lists the allowed values) and tag_count_invalid
|
|
@@ -97,7 +116,18 @@ export async function cmdReleaseNotes(args, {
|
|
|
97
116
|
if (args[0] === "keys") return await cmdReleaseNotesKeys(args.slice(1), { resolveAuth, call, log, errorLog });
|
|
98
117
|
if (args[0] === "origins") return await cmdReleaseNotesOrigins(args.slice(1), { resolveAuth, call, log, errorLog });
|
|
99
118
|
const json = args.includes("--json");
|
|
100
|
-
|
|
119
|
+
let rest = args.filter((a) => a !== "--json");
|
|
120
|
+
// BOT-3260: --pack <pack.json>, anywhere after submit.
|
|
121
|
+
let packFile = null;
|
|
122
|
+
const at = rest.indexOf("--pack");
|
|
123
|
+
if (at !== -1) {
|
|
124
|
+
packFile = rest[at + 1];
|
|
125
|
+
if (!packFile || packFile.startsWith("-")) {
|
|
126
|
+
errorLog(RELEASE_NOTES_USAGE);
|
|
127
|
+
return 2;
|
|
128
|
+
}
|
|
129
|
+
rest = [...rest.slice(0, at), ...rest.slice(at + 2)];
|
|
130
|
+
}
|
|
101
131
|
if (rest[0] !== "submit" || rest.length !== 2 || !rest[1] || rest[1].startsWith("-")) {
|
|
102
132
|
errorLog(RELEASE_NOTES_USAGE);
|
|
103
133
|
return 2;
|
|
@@ -110,6 +140,21 @@ export async function cmdReleaseNotes(args, {
|
|
|
110
140
|
errorLog(`Could not read ${file} as JSON; nothing was submitted.`);
|
|
111
141
|
return 2;
|
|
112
142
|
}
|
|
143
|
+
if (packFile) {
|
|
144
|
+
let pack;
|
|
145
|
+
try {
|
|
146
|
+
pack = JSON.parse(await read(packFile, "utf8"));
|
|
147
|
+
} catch {
|
|
148
|
+
errorLog(`Could not read ${packFile} as JSON; nothing was submitted.`);
|
|
149
|
+
return 2;
|
|
150
|
+
}
|
|
151
|
+
if (note && typeof note === "object" && !Array.isArray(note) && "pack" in note) {
|
|
152
|
+
errorLog(`${file} already has a pack; pass it in the note or with --pack, not both. Nothing was submitted.`);
|
|
153
|
+
return 2;
|
|
154
|
+
}
|
|
155
|
+
// Sent unchanged: the server is the only validator.
|
|
156
|
+
note = { ...note, pack };
|
|
157
|
+
}
|
|
113
158
|
|
|
114
159
|
let result;
|
|
115
160
|
try {
|
|
@@ -123,11 +168,15 @@ export async function cmdReleaseNotes(args, {
|
|
|
123
168
|
|
|
124
169
|
const data = result?.data;
|
|
125
170
|
if (result?.ok && data?.ok === true && typeof data.source_key === "string" && Number.isInteger(data.revision)) {
|
|
126
|
-
const receipt = {
|
|
171
|
+
const receipt = {
|
|
172
|
+
ok: true, source_key: data.source_key, state: data.state, revision: data.revision, created: data.created === true, changed: data.changed === true, tenant: data.tenant ?? null,
|
|
173
|
+
...(data.customers && typeof data.customers === "object" ? { customers: data.customers } : {}),
|
|
174
|
+
};
|
|
127
175
|
if (json) log(JSON.stringify(receipt));
|
|
128
176
|
else {
|
|
129
177
|
const what = receipt.created ? "stored" : receipt.changed ? "updated" : "unchanged (no new revision)";
|
|
130
178
|
log(`Release note ${receipt.source_key} ${what}: state ${receipt.state}, revision ${receipt.revision}${receipt.tenant ? `, tenant ${receipt.tenant}` : ""}.`);
|
|
179
|
+
if (receipt.customers) log(describeCustomers(receipt.customers));
|
|
131
180
|
}
|
|
132
181
|
return CALL_EXIT.OK;
|
|
133
182
|
}
|
|
@@ -152,6 +201,16 @@ export async function cmdReleaseNotes(args, {
|
|
|
152
201
|
return CALL_EXIT.ERROR;
|
|
153
202
|
}
|
|
154
203
|
|
|
204
|
+
/** BOT-3260: the receipt's derived customers in one line. "none" only when Linear said so. */
|
|
205
|
+
export function describeCustomers(c) {
|
|
206
|
+
const tickets = Array.isArray(c.tickets) && c.tickets.length ? c.tickets.join(", ") : "no linked ticket";
|
|
207
|
+
if (c.status === "resolved") {
|
|
208
|
+
const names = Array.isArray(c.customers) ? c.customers.map((x) => x?.name).filter(Boolean) : [];
|
|
209
|
+
return names.length ? `Customers (from Linear): ${names.join(", ")}.` : `Customers (from Linear): none on ${tickets}.`;
|
|
210
|
+
}
|
|
211
|
+
return `Customers: unavailable (${c.reason ?? "unknown"}) for ${tickets}.`;
|
|
212
|
+
}
|
|
213
|
+
|
|
155
214
|
// ── BOT-3160: bb release-notes grants list|add|remove ─────────────────
|
|
156
215
|
|
|
157
216
|
const GRANT_TOOLS = { add: "grant_release_note_scope", remove: "revoke_release_note_scope", list: "list_release_note_scope_grants" };
|
package/src/status-band-read.mjs
CHANGED
|
@@ -90,6 +90,26 @@ const SESSION_HREF = [
|
|
|
90
90
|
function sessionHref(v) {
|
|
91
91
|
return typeof v === "string" && SESSION_HREF.some((re) => re.test(v)) ? v : null;
|
|
92
92
|
}
|
|
93
|
+
// BOT-3286: the coordinator of the session's own project, for the band's STATUS
|
|
94
|
+
// row. null = the project has none; undefined (no key) = BB did not say (an older
|
|
95
|
+
// server, a failed read, or something malformed): the band then shows nothing.
|
|
96
|
+
const COORDINATOR_PROVIDERS = ["claude", "codex", "botbuddy"];
|
|
97
|
+
function projectCoordinatorOf(own) {
|
|
98
|
+
if (!own || !("project_coordinator" in own)) return undefined;
|
|
99
|
+
const c = own.project_coordinator;
|
|
100
|
+
if (c === null) return null;
|
|
101
|
+
if (!c || typeof c !== "object" || !["live", "idle"].includes(c.state)) return undefined;
|
|
102
|
+
const name = safeText(c.name, 80);
|
|
103
|
+
if (!name) return undefined;
|
|
104
|
+
return {
|
|
105
|
+
name,
|
|
106
|
+
provider: COORDINATOR_PROVIDERS.includes(c.provider) ? c.provider : "botbuddy",
|
|
107
|
+
state: c.state,
|
|
108
|
+
href: sessionHref(c.href),
|
|
109
|
+
you: c.is_self === true,
|
|
110
|
+
others: Number.isSafeInteger(c.others) && c.others >= 0 && c.others <= 999 ? c.others : 0,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
93
113
|
// BOT-3212 AC-1: the session agent's active bb waits, for the band's badge; null
|
|
94
114
|
// when BB did not say (no badge rather than a false "none").
|
|
95
115
|
function waitsOf(own) {
|
|
@@ -518,6 +538,8 @@ export async function readStatus({
|
|
|
518
538
|
}
|
|
519
539
|
// BOT-3259: BB's Must + unsure figure wins over every older count.
|
|
520
540
|
Object.assign(epic, mustUnsureProgress(se) || {});
|
|
541
|
+
const pc = projectCoordinatorOf(own);
|
|
542
|
+
if (pc !== undefined) epic.coordinator = pc;
|
|
521
543
|
}
|
|
522
544
|
if (owner) {
|
|
523
545
|
const total = Math.max(0, (owner.children_total ?? 0) - (owner.children_canceled ?? 0));
|