@botbuddy/cli 1.77.0 → 1.78.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.78.0
4
+
5
+ - `bb release-notes tags` lists the tenant's release-note tag groups: each group's rules, values, retired values and what the internal and external views show; `--json` prints the server's answer (BOT-3164). `tags group <key> [--label …] [--min n] [--max n] [--position n] [--internal-only] [--carries-version]`, `tags add|retire <group> <value>` and `tags view <group> --audience internal|external --show|--tag-only|--hide [--label …]` change them with your own sign-in (the manage scope). A refusal prints its code and changes nothing.
6
+
3
7
  ## 1.77.0
4
8
 
5
9
  - The bb-status band's project row shows BB's Must + unsure progress (BOT-3259). The badge is the percent alone, for example `88%`, followed by `22 done · 3 left · 3 unsure`: done and left count Must tickets and tickets with no Must/Could milestone, and unsure counts the open ones with no milestone. Could, canceled and duplicate tickets no longer count. Each number links to the project drawer filtered to those tickets (`/kanban?card=project:<id>&progress=done|left|unsure`). The figure comes from BB (`v_project_progress`, through `get_session_status` and `get_epic_health`), so it matches the drawer exactly; against an older MCP the row keeps its previous `done/total`. bb-status plugin 1.5.0.
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.77.0",
3
- "source_commit": "08cb1b1f5270e4ee981f6b525b15af0441d06e2e",
4
- "source_sha256": "81ec69696b1ee15b6210102383e8e799659bcba7b3c0bde2911ce51e51b2aa84",
2
+ "release_version": "1.78.0",
3
+ "source_commit": "d1d71be9cf32932eb09adaca324829bf643c9c3a",
4
+ "source_sha256": "d6e8bde1777cdcee29120aac387cf7dc0c0cfcb11495f99c1b6ec22ed457e154",
5
5
  "target": "darwin-arm64",
6
- "sha256": "5f535e56d83f0112fc4ac9c3fa968f022df2d8cb8bf1fdf31892faa4a2000527"
6
+ "sha256": "744982a2a08a8d796911eb2cb37229a6a9de5b43ab41848d2d797d31093ac3e7"
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.77.0",
3
- "source_commit": "08cb1b1f5270e4ee981f6b525b15af0441d06e2e",
4
- "source_sha256": "81ec69696b1ee15b6210102383e8e799659bcba7b3c0bde2911ce51e51b2aa84",
2
+ "release_version": "1.78.0",
3
+ "source_commit": "d1d71be9cf32932eb09adaca324829bf643c9c3a",
4
+ "source_sha256": "d6e8bde1777cdcee29120aac387cf7dc0c0cfcb11495f99c1b6ec22ed457e154",
5
5
  "target": "linux-x64",
6
- "sha256": "58d108a786afd745ddf1994ac8f2efe0c682bc72078b033c5876622a7163d595"
6
+ "sha256": "fe36d3e84ca6cf34e4a718356aeb295fc86d04914c5649fc1ddd10ce45ea9ec6"
7
7
  }
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "release_version": "1.77.0",
4
- "source_commit": "08cb1b1f5270e4ee981f6b525b15af0441d06e2e",
5
- "source_sha256": "81ec69696b1ee15b6210102383e8e799659bcba7b3c0bde2911ce51e51b2aa84",
3
+ "release_version": "1.78.0",
4
+ "source_commit": "d1d71be9cf32932eb09adaca324829bf643c9c3a",
5
+ "source_sha256": "d6e8bde1777cdcee29120aac387cf7dc0c0cfcb11495f99c1b6ec22ed457e154",
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": "5f535e56d83f0112fc4ac9c3fa968f022df2d8cb8bf1fdf31892faa4a2000527",
11
+ "sha256": "744982a2a08a8d796911eb2cb37229a6a9de5b43ab41848d2d797d31093ac3e7",
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": "58d108a786afd745ddf1994ac8f2efe0c682bc72078b033c5876622a7163d595",
18
+ "sha256": "fe36d3e84ca6cf34e4a718356aeb295fc86d04914c5649fc1ddd10ce45ea9ec6",
19
19
  "mode": "0755"
20
20
  }
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbuddy/cli",
3
- "version": "1.77.0",
3
+ "version": "1.78.0",
4
4
  "description": "BotBuddy — Swarm coordination CLI for multi-agent workflows",
5
5
  "type": "module",
6
6
  "bin": {
package/src/commands.mjs CHANGED
@@ -350,6 +350,8 @@ ${bold("EVIDENCE")} (${cyan("bb help evidence")})
350
350
  Submit one release note for your tenant (stored as draft)
351
351
  release-notes grants list|add|remove
352
352
  Owners grant members the release-note submit or manage scope
353
+ release-notes tags [group|add|retire|view]
354
+ List or manage the tenant's release-note tag groups
353
355
  release-notes keys|origins Viewer keys and allowed origins for your own app (owners)
354
356
  status-band install Install the bb-status band into Claude Code (bb setup does it)
355
357
  status-band read|relay The band's own reads and live wake (run by the mod)
@@ -11,6 +11,10 @@ export const RELEASE_NOTES_USAGE = `Usage: bb release-notes submit <note.json> [
11
11
  bb release-notes grants list [--tenant <slug>] [--json]
12
12
  bb release-notes grants add <email> <submit|manage> [--tenant <slug>] [--json]
13
13
  bb release-notes grants remove <email> <submit|manage> [--tenant <slug>] [--json]
14
+ bb release-notes tags [--json]
15
+ bb release-notes tags group <key> [--label <label>] [--min <n>] [--max <n>] [--position <n>] [--internal-only] [--carries-version]
16
+ bb release-notes tags add|retire <group> <value>
17
+ bb release-notes tags view <group> --audience internal|external --show|--tag-only|--hide [--label <label>]
14
18
 
15
19
  Submits one release note for your tenant. The file is a schema-1 payload:
16
20
 
@@ -20,7 +24,8 @@ Submits one release note for your tenant. The file is a schema-1 payload:
20
24
  "internal": { "title": "…", "body": "…" },
21
25
  "external": { "title": "…", "body": "…" },
22
26
  "internal_links": [ { "name": "PR #12", "url": "https://github.com/…", "kind": "pr" } ],
23
- "external_links": [ { "name": "Open the report", "url": "/reports?tab=x", "kind": "deep_link" } ] }
27
+ "external_links": [ { "name": "Open the report", "url": "/reports?tab=x", "kind": "deep_link" } ],
28
+ "tags": { "component": ["Web app"], "module": ["Reports"] } }
24
29
 
25
30
  type is one of Feature, Improvement, Fix, Security, Deprecation, Internal.
26
31
  external and both link lists are optional. A body uses bbrn-md-1: paragraphs,
@@ -44,6 +49,16 @@ the effective grants and the newest changes. Grants use your own sign-in
44
49
  owner), member_not_in_tenant, owner_scope_is_implicit, scope_unknown,
45
50
  entitlement_missing.
46
51
 
52
+ Tags. Each tenant manages its own tag groups (Component and Module to start,
53
+ plus any it adds, such as Customer). tags lists each group's values, retired
54
+ values and what the internal and external views show; read it before you
55
+ submit. A note may carry only listed values: tag_group_unknown,
56
+ tag_value_unknown (the message lists the allowed values) and tag_count_invalid
57
+ store nothing. group, add, retire and view need the manage scope and use your
58
+ own sign-in. A value is retired, never deleted: notes that carry it keep it.
59
+ --internal-only marks a group that is never shown externally (one-way).
60
+ view --show shows the tag and its filter, --tag-only the tag, --hide neither.
61
+
47
62
  Exit codes: 0 stored · 1 refused · 2 usage · 3 authentication · 5 BotBuddy unreachable.
48
63
 
49
64
  Viewer keys and origins (tenant owners, BOT-3158):
@@ -63,6 +78,7 @@ export async function cmdReleaseNotes(args, {
63
78
  return args.length === 0 ? 2 : CALL_EXIT.OK;
64
79
  }
65
80
  if (args[0] === "grants") return cmdGrants(args.slice(1), { resolveAuth, call, log, errorLog });
81
+ if (args[0] === "tags") return cmdTags(args.slice(1), { resolveAuth, call, log, errorLog });
66
82
  // BOT-3158: viewer keys and allowed origins.
67
83
  if (args[0] === "keys") return await cmdReleaseNotesKeys(args.slice(1), { resolveAuth, call, log, errorLog });
68
84
  if (args[0] === "origins") return await cmdReleaseNotesOrigins(args.slice(1), { resolveAuth, call, log, errorLog });
@@ -213,3 +229,132 @@ async function cmdGrants(argv, { resolveAuth, call, log, errorLog }) {
213
229
  }
214
230
  return CALL_EXIT.OK;
215
231
  }
232
+
233
+ // ── BOT-3164: bb release-notes tags [list] | group | add | retire | view ──
234
+
235
+ const TAG_TOOLS = {
236
+ list: "list_release_note_tags",
237
+ group: "save_release_note_tag_group",
238
+ add: "save_release_note_tag_value",
239
+ retire: "retire_release_note_tag_value",
240
+ view: "set_release_note_view_config",
241
+ };
242
+
243
+ function tagUsage(errorLog) {
244
+ errorLog(RELEASE_NOTES_USAGE);
245
+ return 2;
246
+ }
247
+
248
+ /** Parse `tags …` into { tool, args } or null for a usage error. Values are sent as typed; the server validates. */
249
+ export function parseTagsArgs(argv) {
250
+ const positional = [];
251
+ const flags = {};
252
+ const BOOL = new Set(["--internal-only", "--carries-version", "--show", "--tag-only", "--hide", "--json"]);
253
+ const VALUED = new Set(["--label", "--min", "--max", "--position", "--audience", "--tenant"]);
254
+ for (let i = 0; i < argv.length; i++) {
255
+ const a = argv[i];
256
+ if (BOOL.has(a)) { flags[a] = true; continue; }
257
+ if (VALUED.has(a)) {
258
+ const v = argv[i + 1];
259
+ if (v === undefined || v.startsWith("--")) return null;
260
+ flags[a] = v;
261
+ i++;
262
+ continue;
263
+ }
264
+ if (a.startsWith("--")) return null;
265
+ positional.push(a);
266
+ }
267
+ const [sub = "list", ...rest] = positional;
268
+ const tool = TAG_TOOLS[sub];
269
+ if (!tool) return null;
270
+ const json = flags["--json"] === true;
271
+ const tenant = flags["--tenant"] ?? null;
272
+ const int = (flag) => {
273
+ if (flags[flag] === undefined) return undefined;
274
+ return /^\d+$/.test(flags[flag]) ? Number(flags[flag]) : NaN;
275
+ };
276
+ if (sub === "list") return rest.length === 0 ? { sub, tool, args: {}, json, tenant } : null;
277
+ if (sub === "add" || sub === "retire") {
278
+ if (rest.length !== 2) return null;
279
+ return { sub, tool, args: { group: rest[0], value: rest[1] }, json, tenant };
280
+ }
281
+ if (sub === "group") {
282
+ if (rest.length !== 1) return null;
283
+ const args = { key: rest[0] };
284
+ if (flags["--label"] !== undefined) args.label = flags["--label"];
285
+ for (const [flag, field] of [["--min", "min_values"], ["--max", "max_values"], ["--position", "position"]]) {
286
+ const n = int(flag);
287
+ if (Number.isNaN(n)) return null;
288
+ if (n !== undefined) args[field] = n;
289
+ }
290
+ if (flags["--internal-only"]) args.internal_only = true;
291
+ if (flags["--carries-version"]) args.carries_version = true;
292
+ return { sub, tool, args, json, tenant };
293
+ }
294
+ // view
295
+ if (rest.length !== 1) return null;
296
+ const audience = flags["--audience"];
297
+ if (audience !== "internal" && audience !== "external") return null;
298
+ const modes = ["--show", "--tag-only", "--hide"].filter((f) => flags[f]);
299
+ if (modes.length > 1 || (modes.length === 0 && flags["--label"] === undefined)) return null;
300
+ const args = { group: rest[0], audience };
301
+ if (modes[0] === "--show") Object.assign(args, { show_tag: true, show_filter: true });
302
+ if (modes[0] === "--tag-only") Object.assign(args, { show_tag: true, show_filter: false });
303
+ if (modes[0] === "--hide") Object.assign(args, { show_tag: false, show_filter: false });
304
+ if (flags["--label"] !== undefined) args.label = flags["--label"];
305
+ return { sub, tool, args, json, tenant };
306
+ }
307
+
308
+ function describeView(v) {
309
+ if (!v || !v.show_tag) return "hidden";
310
+ return `${v.show_filter ? "tag + filter" : "tag only"}${v.label ? ` as "${v.label}"` : ""}`;
311
+ }
312
+
313
+ async function cmdTags(argv, { resolveAuth, call, log, errorLog }) {
314
+ const parsed = parseTagsArgs(argv);
315
+ if (!parsed) return tagUsage(errorLog);
316
+ const { sub, tool, args, json, tenant } = parsed;
317
+ const isChange = sub !== "list";
318
+ let result;
319
+ try {
320
+ // A vocabulary change is a change manager's decision: their own sign-in, like grants.
321
+ const resolved = await resolveAuth({ toolName: tool, preferSession: !isChange });
322
+ result = resolved?.error || !resolved?.auth
323
+ ? { ok: false, auth: true }
324
+ : await call(tool, args, { auth: resolved.auth, tenant, signal: AbortSignal.timeout(30_000) });
325
+ } catch {
326
+ result = { ok: false, status: null };
327
+ }
328
+ const data = result?.data;
329
+ if (!(result?.ok && data?.ok === true)) return printRefusalOrFailure(result, json, log, errorLog, isChange ? "Nothing was changed." : "");
330
+ if (json) {
331
+ log(JSON.stringify(data));
332
+ return CALL_EXIT.OK;
333
+ }
334
+ const where = `in tenant ${data.tenant}`;
335
+ if (sub === "add") {
336
+ log(data.changed ? `${data.restored ? "Restored" : "Added"} ${data.value} to ${data.group} ${where}.` : `${data.group} already has ${data.value} ${where}; nothing changed.`);
337
+ } else if (sub === "retire") {
338
+ log(data.changed
339
+ ? `Retired ${data.value} from ${data.group} ${where}. Notes that carry it keep it; new notes cannot use it.`
340
+ : `${data.value} was already retired from ${data.group} ${where}; nothing changed.`);
341
+ } else if (sub === "group") {
342
+ const g = data.group ?? {};
343
+ log(data.created ? `Created tag group ${g.key} (${g.label}) ${where}.` : data.changed ? `Updated tag group ${g.key} ${where}.` : `Tag group ${g.key} is unchanged ${where}.`);
344
+ } else if (sub === "view") {
345
+ log(data.changed ? `${data.group}, ${data.audience} view: ${describeView(data.view)} ${where}.` : `${data.group}, ${data.audience} view is unchanged ${where}.`);
346
+ } else {
347
+ const groups = Array.isArray(data.groups) ? data.groups : [];
348
+ log(`Release-note tags in tenant ${data.tenant}`);
349
+ if (groups.length === 0) log("No tag groups.");
350
+ for (const g of groups) {
351
+ const count = g.min_values === g.max_values ? `exactly ${g.min_values}` : `${g.min_values}-${g.max_values}`;
352
+ const marks = [g.carries_version ? "carries the version" : null, g.internal_only ? "internal only" : null].filter(Boolean);
353
+ log(`${g.key} (${g.label}) · ${count} per note${marks.length ? ` · ${marks.join(" · ")}` : ""}`);
354
+ log(` values: ${Array.isArray(g.values) && g.values.length ? g.values.join(", ") : "none"}`);
355
+ if (Array.isArray(g.retired) && g.retired.length) log(` retired: ${g.retired.join(", ")}`);
356
+ log(` internal: ${describeView(g.views?.internal)} · external: ${describeView(g.views?.external)}`);
357
+ }
358
+ }
359
+ return CALL_EXIT.OK;
360
+ }