@botbuddy/cli 1.82.0 → 1.84.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/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/commands.mjs +4 -0
- package/src/release-notes.mjs +73 -0
- package/src/wait.mjs +33 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.84.0
|
|
4
|
+
|
|
5
|
+
- `bb wait` tells the staging suspect to act (BOT-3287): a wait ended because you were elected release manager says your change may have broken staging and to fix staging as a priority; a `staging-release` wake on a red train for the suspect PR says to call `claim_release_manager` now (seat open) or names the release manager (seat held); a wake with `reason: cancelled` says the run did not release your PR and how to re-arm with `after_run=<run_id>`.
|
|
6
|
+
|
|
7
|
+
## 1.83.0
|
|
8
|
+
|
|
9
|
+
- `bb release-notes publish <source_key> --to internal` shows a note to your team using the agent session; `--to external` publishes its external wording to your customers, and `bb release-notes withdraw <source_key>` takes it out of every feed. Both of those use your own sign-in and need the manage scope (BOT-3163). Each prints the new state and revision, or says that nothing changed; `--json` prints the receipt.
|
|
10
|
+
|
|
3
11
|
## 1.82.0
|
|
4
12
|
|
|
5
13
|
- 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.
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.84.0",
|
|
3
|
+
"source_commit": "4122a36c869b9a83a460f5a22f35b893a4a72afc",
|
|
4
|
+
"source_sha256": "b86a6b6fa46c92581ae1325ad301176dc3267137c3426c82a21a0b33c2bcca69",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "c19990b17a4a41f4fffe010584a544fa87ba597dd8b17f9f7efea98bb4f8fa3a"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.84.0",
|
|
3
|
+
"source_commit": "4122a36c869b9a83a460f5a22f35b893a4a72afc",
|
|
4
|
+
"source_sha256": "b86a6b6fa46c92581ae1325ad301176dc3267137c3426c82a21a0b33c2bcca69",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "f6d5ad986be0d473fea2bed4eb9ca5dcedc450b11ae0e0d798ea41f7bfe3d8bc"
|
|
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.84.0",
|
|
4
|
+
"source_commit": "4122a36c869b9a83a460f5a22f35b893a4a72afc",
|
|
5
|
+
"source_sha256": "b86a6b6fa46c92581ae1325ad301176dc3267137c3426c82a21a0b33c2bcca69",
|
|
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": "c19990b17a4a41f4fffe010584a544fa87ba597dd8b17f9f7efea98bb4f8fa3a",
|
|
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": "f6d5ad986be0d473fea2bed4eb9ca5dcedc450b11ae0e0d798ea41f7bfe3d8bc",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/commands.mjs
CHANGED
|
@@ -349,6 +349,10 @@ ${bold("EVIDENCE")} (${cyan("bb help evidence")})
|
|
|
349
349
|
Prepare or send a BotBuddy issue report
|
|
350
350
|
release-notes submit <note.json>
|
|
351
351
|
Submit one release note for your tenant (stored as draft)
|
|
352
|
+
release-notes publish <source_key> --to internal|external
|
|
353
|
+
Publish a note to your team, or its external wording to customers
|
|
354
|
+
release-notes withdraw <source_key>
|
|
355
|
+
Take a note out of every feed (kept, never deleted)
|
|
352
356
|
release-notes grants list|add|remove
|
|
353
357
|
Owners grant members the release-note submit or manage scope
|
|
354
358
|
release-notes tags [group|add|retire|view]
|
package/src/release-notes.mjs
CHANGED
|
@@ -8,6 +8,8 @@ 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
10
|
export const RELEASE_NOTES_USAGE = `Usage: bb release-notes submit <note.json> [--pack <pack.json>] [--json]
|
|
11
|
+
bb release-notes publish <source_key> --to internal|external [--tenant <slug>] [--json]
|
|
12
|
+
bb release-notes withdraw <source_key> [--tenant <slug>] [--json]
|
|
11
13
|
bb release-notes list [--tag <group>=<value>]... [--type <type>] [--state <state>] [--cursor <cursor>] [--json]
|
|
12
14
|
bb release-notes get <source_key> [--json]
|
|
13
15
|
bb release-notes grants list [--tenant <slug>] [--json]
|
|
@@ -78,6 +80,16 @@ the effective grants and the newest changes. Grants use your own sign-in
|
|
|
78
80
|
owner), member_not_in_tenant, owner_scope_is_implicit, scope_unknown,
|
|
79
81
|
entitlement_missing.
|
|
80
82
|
|
|
83
|
+
Publishing (BOT-3163). publish --to internal shows a draft to your team
|
|
84
|
+
(submit scope; uses the agent session). publish --to external shows the
|
|
85
|
+
note's external title, body and links to your customers, and withdraw takes
|
|
86
|
+
a note out of every feed; both need the manage scope and use your own sign-in
|
|
87
|
+
(bb login). Publishing externally needs external wording in the note
|
|
88
|
+
(external_copy_missing otherwise). After an external publish, a resubmit is
|
|
89
|
+
held for customers until a change manager publishes again. A withdrawn note
|
|
90
|
+
keeps every revision and can be published again. Refusals: scope_missing,
|
|
91
|
+
not_found, external_copy_missing, entitlement_missing.
|
|
92
|
+
|
|
81
93
|
Tags. Each tenant manages its own tag groups (Component and Module to start,
|
|
82
94
|
then Persona and Customer, plus any it adds). Customer is internal only and
|
|
83
95
|
filled from Linear: never submit it. tags lists each group's values, retired
|
|
@@ -108,6 +120,7 @@ export async function cmdReleaseNotes(args, {
|
|
|
108
120
|
return args.length === 0 ? 2 : CALL_EXIT.OK;
|
|
109
121
|
}
|
|
110
122
|
if (args[0] === "grants") return cmdGrants(args.slice(1), { resolveAuth, call, log, errorLog });
|
|
123
|
+
if (args[0] === "publish" || args[0] === "withdraw") return await cmdPublish(args[0], args.slice(1), { resolveAuth, call, log, errorLog });
|
|
111
124
|
if (args[0] === "tags") return cmdTags(args.slice(1), { resolveAuth, call, log, errorLog });
|
|
112
125
|
// BOT-3166: list and read the tenant's notes.
|
|
113
126
|
if (args[0] === "list") return cmdList(args.slice(1), { resolveAuth, call, log, errorLog });
|
|
@@ -432,6 +445,66 @@ async function cmdTags(argv, { resolveAuth, call, log, errorLog }) {
|
|
|
432
445
|
return CALL_EXIT.OK;
|
|
433
446
|
}
|
|
434
447
|
|
|
448
|
+
// ── BOT-3163: bb release-notes publish|withdraw ───────────────────────
|
|
449
|
+
|
|
450
|
+
const STATE_TOOLS = { publish: "publish_release_note", withdraw: "withdraw_release_note" };
|
|
451
|
+
const PUBLISHED_TO = { published_internal: "published to your team", published_external: "published to customers", withdrawn: "withdrawn" };
|
|
452
|
+
|
|
453
|
+
async function cmdPublish(action, argv, { resolveAuth, call, log, errorLog }) {
|
|
454
|
+
const json = argv.includes("--json");
|
|
455
|
+
let tenant = null;
|
|
456
|
+
let to = null;
|
|
457
|
+
const rest = [];
|
|
458
|
+
for (let i = 0; i < argv.length; i++) {
|
|
459
|
+
const a = argv[i];
|
|
460
|
+
if (a === "--json") continue;
|
|
461
|
+
if (a === "--tenant" || a === "--to") {
|
|
462
|
+
const v = argv[i + 1];
|
|
463
|
+
if (!v || v.startsWith("-")) { errorLog(RELEASE_NOTES_USAGE); return 2; }
|
|
464
|
+
if (a === "--tenant") tenant = v; else to = v;
|
|
465
|
+
i++;
|
|
466
|
+
continue;
|
|
467
|
+
}
|
|
468
|
+
rest.push(a);
|
|
469
|
+
}
|
|
470
|
+
const [sourceKey, ...extra] = rest;
|
|
471
|
+
const badTarget = action === "publish" ? to !== "internal" && to !== "external" : to !== null;
|
|
472
|
+
if (!sourceKey || sourceKey.startsWith("-") || extra.length > 0 || badTarget) {
|
|
473
|
+
errorLog(RELEASE_NOTES_USAGE);
|
|
474
|
+
return 2;
|
|
475
|
+
}
|
|
476
|
+
const tool = STATE_TOOLS[action];
|
|
477
|
+
const args = action === "publish" ? { source_key: sourceKey, to, route: "cli" } : { source_key: sourceKey, route: "cli" };
|
|
478
|
+
// Publishing to the team is an agent's job; publishing to customers and
|
|
479
|
+
// withdrawing are a change manager's, so they use the person's own sign-in.
|
|
480
|
+
const preferSession = action === "publish" && to === "internal";
|
|
481
|
+
|
|
482
|
+
let result;
|
|
483
|
+
try {
|
|
484
|
+
const resolved = await resolveAuth({ toolName: tool, preferSession });
|
|
485
|
+
result = resolved?.error || !resolved?.auth
|
|
486
|
+
? { ok: false, auth: true }
|
|
487
|
+
: await call(tool, args, { auth: resolved.auth, ...(tenant ? { tenant } : {}), signal: AbortSignal.timeout(30_000) });
|
|
488
|
+
} catch {
|
|
489
|
+
result = { ok: false, status: null };
|
|
490
|
+
}
|
|
491
|
+
const data = result?.data;
|
|
492
|
+
if (!(result?.ok && data?.ok === true && typeof data.source_key === "string")) {
|
|
493
|
+
return printRefusalOrFailure(result, json, log, errorLog, "Nothing was changed.");
|
|
494
|
+
}
|
|
495
|
+
if (json) {
|
|
496
|
+
log(JSON.stringify(data));
|
|
497
|
+
return CALL_EXIT.OK;
|
|
498
|
+
}
|
|
499
|
+
const where = data.tenant ? `, tenant ${data.tenant}` : "";
|
|
500
|
+
if (data.changed === false) {
|
|
501
|
+
log(`Release note ${data.source_key} is already ${PUBLISHED_TO[data.state] ?? data.state}; nothing changed (revision ${data.revision}).`);
|
|
502
|
+
} else {
|
|
503
|
+
log(`Release note ${data.source_key} ${PUBLISHED_TO[data.state] ?? data.state}: state ${data.state}, revision ${data.revision}${where}.`);
|
|
504
|
+
}
|
|
505
|
+
return CALL_EXIT.OK;
|
|
506
|
+
}
|
|
507
|
+
|
|
435
508
|
// ── BOT-3166: bb release-notes list | get ──────────────────────────────
|
|
436
509
|
|
|
437
510
|
function readUsage(errorLog) {
|
package/src/wait.mjs
CHANGED
|
@@ -946,7 +946,7 @@ export function waitPreemptedNotice(receipt, conditionArgs = [], options = {}) {
|
|
|
946
946
|
`${inc.run_url ? ` (${inc.run_url})` : ""}`;
|
|
947
947
|
let role;
|
|
948
948
|
if (st.role === "release_manager") {
|
|
949
|
-
role = "you are now the release manager — call get_staging_gate for the next steps";
|
|
949
|
+
role = "you are now the release manager — your change may have broken staging, so fix staging as a priority; call get_staging_gate for the next steps";
|
|
950
950
|
} else if (st.rm_seat_open) {
|
|
951
951
|
role = "the release-manager seat is OPEN — call claim_release_manager, then get_staging_gate";
|
|
952
952
|
} else {
|
|
@@ -957,9 +957,40 @@ export function waitPreemptedNotice(receipt, conditionArgs = [], options = {}) {
|
|
|
957
957
|
`bb-wait: re-arm (exit ${EXIT.PREEMPTED}): ${rearm}`;
|
|
958
958
|
}
|
|
959
959
|
|
|
960
|
+
/**
|
|
961
|
+
* BOT-3287: a `staging-release` wake that needs the agent to act, not triage.
|
|
962
|
+
* - The suspect PR's waiter on a red train is told its change may have broken staging,
|
|
963
|
+
* and either to claim the open release-manager seat now or who holds it.
|
|
964
|
+
* - A train that carried the PR and ended cancelled (reason "cancelled") is named, so a
|
|
965
|
+
* dead candidate is noticed at once.
|
|
966
|
+
* Returns null for every other receipt.
|
|
967
|
+
*/
|
|
968
|
+
export function stagingSuspectNotice(receipt) {
|
|
969
|
+
if (receipt?.outcome !== "matched" || !Array.isArray(receipt.matched)) return null;
|
|
970
|
+
const entry = receipt.matched.find((m) => m?.signal_type === "staging_release");
|
|
971
|
+
const p = entry?.payload;
|
|
972
|
+
if (!p || typeof p !== "object") return null;
|
|
973
|
+
const repo = p.repo ?? "?";
|
|
974
|
+
const lines = [];
|
|
975
|
+
if (p.reason === "cancelled") {
|
|
976
|
+
lines.push(`bb-wait: staging ${repo} run ${p.workflow_run_id ?? "?"} ended ${p.conclusion ?? "cancelled"} — it did not release your PR; ` +
|
|
977
|
+
`re-arm with after_run=${p.workflow_run_id ?? "?"} for the next train, or re-run it.`);
|
|
978
|
+
}
|
|
979
|
+
const inc = p.incident && typeof p.incident === "object" ? p.incident : null;
|
|
980
|
+
if (inc?.you_are_suspect === true) {
|
|
981
|
+
const head = `bb-wait: staging ${repo} is red and your PR #${inc.suspect_pr_number ?? p.pr_number ?? "?"} is the suspect — your change may have broken staging`;
|
|
982
|
+
if (inc.next_action === "claim_release_manager" || inc.rm_seat_open === true) {
|
|
983
|
+
lines.push(`${head}. The release-manager seat is OPEN — call claim_release_manager now, then fix staging as a priority (get_staging_gate for the next steps).`);
|
|
984
|
+
} else {
|
|
985
|
+
lines.push(`${head}; release manager: ${inc.release_manager_name ?? "assigned"}. If that is you, fix staging as a priority (get_staging_gate for the next steps).`);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
return lines.length > 0 ? lines.join("\n") : null;
|
|
989
|
+
}
|
|
990
|
+
|
|
960
991
|
function writeLeaseLostNotice(receipt, conditionArgs = [], options = {}) {
|
|
961
992
|
const notice = leaseLostNotice(receipt) ?? waitAbandonedNotice(receipt) ?? reviewTimeoutNotice(receipt) ??
|
|
962
|
-
waitPreemptedNotice(receipt, conditionArgs, options);
|
|
993
|
+
waitPreemptedNotice(receipt, conditionArgs, options) ?? stagingSuspectNotice(receipt);
|
|
963
994
|
if (notice) process.stderr.write(`${notice}\n`);
|
|
964
995
|
}
|
|
965
996
|
|