@botbuddy/cli 1.80.0 → 1.81.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 +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/release-notes.mjs +64 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.81.0
|
|
4
|
+
|
|
5
|
+
- `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`.
|
|
6
|
+
|
|
3
7
|
## 1.79.0
|
|
4
8
|
|
|
5
9
|
- 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.
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.81.0",
|
|
3
|
+
"source_commit": "3e272e88f4b4c4e668a69bb804bd262570b96a4a",
|
|
4
|
+
"source_sha256": "e82a3837cf2ed15fce1e360819e1c41a70f328e455e1a80a8ade9ae19077df64",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "4c4a922b177fb8ccc37d3b822e1fa828719189fa7c2719f6c6b3d41645e26ae0"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.81.0",
|
|
3
|
+
"source_commit": "3e272e88f4b4c4e668a69bb804bd262570b96a4a",
|
|
4
|
+
"source_sha256": "e82a3837cf2ed15fce1e360819e1c41a70f328e455e1a80a8ade9ae19077df64",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "806739b52d332caa0da7bccecbd4fc46cd65ffdb43021324cd7f3dd46a7e4c40"
|
|
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.81.0",
|
|
4
|
+
"source_commit": "3e272e88f4b4c4e668a69bb804bd262570b96a4a",
|
|
5
|
+
"source_sha256": "e82a3837cf2ed15fce1e360819e1c41a70f328e455e1a80a8ade9ae19077df64",
|
|
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": "4c4a922b177fb8ccc37d3b822e1fa828719189fa7c2719f6c6b3d41645e26ae0",
|
|
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": "806739b52d332caa0da7bccecbd4fc46cd65ffdb43021324cd7f3dd46a7e4c40",
|
|
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" };
|