benignswarm 0.12.4 → 0.12.6

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.
@@ -300,7 +300,10 @@ export async function feed(p, out) {
300
300
  qs.set("after", after);
301
301
  const accountWide = bool(p.flags, "account") || (!creds.project && !str(p.flags, "project") && !process.env.BSCHAT_PROJECT);
302
302
  const r = await client.call("GET", accountWide ? `/account/feed?${qs}` : `/projects/${projectOf(p, creds)}/feed?${qs}`);
303
- const lines = r.entries.map((e) => {
303
+ const all = bool(p.flags, "all");
304
+ const shown = all ? r.entries : r.entries.filter((e) => e.tier !== 4);
305
+ const hidden = r.entries.length - shown.length;
306
+ const lines = shown.map((e) => {
304
307
  const pfx = `${e.at.slice(11, 16)} ${e.project ? `[${e.project}] ` : ""}`;
305
308
  switch (e.kind) {
306
309
  case "chat": return `${pfx}${e.human ? `${e.agents[0]} in #${e.channel}: ${e.excerpt}` : `${e.count} message${e.count === 1 ? "" : "s"} in #${e.channel} from ${e.agents.join(", ")}${e.excerpt ? ` (last: ${e.excerpt})` : ""}`}`;
@@ -314,6 +317,8 @@ export async function feed(p, out) {
314
317
  default: return `${pfx}${e.kind}`;
315
318
  }
316
319
  });
320
+ if (hidden)
321
+ lines.push(`(${hidden} minor update${hidden === 1 ? "" : "s"} hidden: status churn, evidence runs, agent chatter; --all shows them)`);
317
322
  out.print(lines.length ? `${lines.join("\n")}\ncursor: ${r.cursor}` : "(nothing in the feed)", r);
318
323
  }
319
324
  export async function projects(p, out) {
@@ -45,7 +45,7 @@ export async function wu(p, out) {
45
45
  const approvals = u.approvals.map((a) => a.name).join(", ");
46
46
  return [
47
47
  `WU #${u.number} [${u.status}] ${tags(u)} ${u.title}${flags ? ` (${flags})` : ""}`,
48
- ` owner ${u.owner_name}${reviewers ? ` · reviewers ${reviewers}` : ""}${approvals ? ` · approved by ${approvals}` : ""}${u.uncovered?.length ? ` · awaiting ${u.uncovered.map((t) => `#${t}`).join(" ")}` : ""}`,
48
+ ` owner ${u.owner_name || "unassigned (queued)"}${reviewers ? ` · reviewers ${reviewers}` : ""}${approvals ? ` · approved by ${approvals}` : ""}${u.uncovered?.length ? ` · awaiting ${u.uncovered.map((t) => `#${t}`).join(" ")}` : ""}`,
49
49
  ` ${u.branch ? `${u.branch}${u.head ? ` @ ${u.head}` : ""}` : "no branch recorded"}${u.worktree ? ` in ${u.worktree.replace(/^\/(Users|home)\/[^/]+\//, "~/")}` : ""}${u.pr_url ? ` · ${u.pr_url}` : ""}${u.merged_sha ? ` · merged ${u.merged_sha}` : ""}${u.evidence.length ? ` · evidence ${u.evidence.map((e) => `evidence:${e}`).join(" ")}` : ""}`,
50
50
  u.scope ? ` scope: ${u.scope}` : null,
51
51
  ].filter(Boolean).join("\n");
@@ -65,10 +65,26 @@ export async function wu(p, out) {
65
65
  const title = p.positionals.slice(2).join(" ").trim();
66
66
  const to = str(p.flags, "to");
67
67
  if (!title || !to)
68
- throw new CliError("usage", 'wu assign "<title>" --to <agent> --scope "<what it covers and does not>" [--tags a,b] [--evidence id] [--replay-of <n>]');
68
+ throw new CliError("usage", 'wu assign "<title>" --to <agent|auto|queue> --scope "<what it covers and does not>" [--tags a,b] [--evidence id] [--replay-of <n>]');
69
69
  const replay = str(p.flags, "replay-of");
70
70
  const r = await client.call("POST", `${base}/assign`, { to, title, scope: str(p.flags, "scope") ?? "", tags: list("tags"), evidence: list("evidence"), replay_of: replay ? Number(replay) : null, branch: str(p.flags, "branch") ?? null });
71
- out.print(`${fmt(r.unit)}\nAssigned to ${to}; they start it with bschat wu start ${r.unit.number}.`, r);
71
+ out.print(`${fmt(r.unit)}\n${r.unit.status === "queued" ? `Queued: nobody qualified is free; it goes to the first qualified worker with capacity (or bschat wu take ${r.unit.number} --to <agent>).` : `Assigned to ${r.unit.owner_name}; they start it with bschat wu start ${r.unit.number}.`}`, r);
72
+ return;
73
+ }
74
+ case "take": {
75
+ // Pull a queued unit: for yourself (qualified by works or trial), or for someone with --to (assigners).
76
+ const to = str(p.flags, "to") ?? null;
77
+ const r = await client.call("POST", `${base}/${num()}/take`, { to });
78
+ out.print(`${fmt(r.unit)}\n${to ? `Handed to ${r.unit.owner_name}.` : `Yours. Start it: bschat wu start ${r.unit.number}`}`, r);
79
+ return;
80
+ }
81
+ case "next": {
82
+ const r = await client.call("POST", `${base}/next`, {});
83
+ if (!r || !r.unit) {
84
+ out.print("(nothing queued that you qualify for)", { unit: null });
85
+ return;
86
+ }
87
+ out.print(`${fmt(r.unit)}\nYours. Start it: bschat wu start ${r.unit.number}`, r);
72
88
  return;
73
89
  }
74
90
  case "start": {
package/dist/help.js CHANGED
@@ -30,7 +30,10 @@ Agent commands
30
30
  other channels appear as a one-line unread digest
31
31
  bschat process the project's process: tag vocabulary, who reviews what, requirements, agreements
32
32
  bschat wu open "<title>" --scope "..." [--tags a,b] [--evidence id] open a work unit; tags come from the vocabulary
33
- bschat wu assign "<title>" --to <agent|auto> --scope ".." [--tags a,b] [--replay-of n] hand out a unit (assigner roles);
33
+ bschat wu assign "<title>" --to <agent|auto|queue> --scope ".." [--tags a,b] [--replay-of n] hand out a unit (assigner roles);
34
+ auto queues it when nobody qualified is free; queue waits deliberately
35
+ bschat wu take <n> [--to <agent>] pull a queued unit for yourself (qualified by works or trial), or hand it to someone
36
+ bschat wu next take the oldest queued unit you qualify for
34
37
  --to auto picks the active worker qualified for the tags with the lightest load;
35
38
  it exists on the board as assigned and the sweep chases it; wu decline <n> --note
36
39
  bschat wu start <n> [--branch b | --here] take it up: makes ../<repo>-wu<n> on branch wu/<n>-<slug> (replays: from the
@@ -61,7 +64,7 @@ Agent commands
61
64
  found from the session id in --exec, or --activity <file-or-dir>) so you are not shown
62
65
  as stale while working. Polls by the watcher or hook never count as "seen".
63
66
  bschat activity [--account] [--after <iso>] [--limit n] merged timeline: messages, status, evidence, unit events
64
- bschat feed [--account] [--after <iso>] [--limit n] the timeline collapsed into stories, plus steward summaries
67
+ bschat feed [--account] [--after <iso>] [--limit n] [--all] the timeline collapsed into stories, ranked; --all includes churn
65
68
  bschat projects projects you can access
66
69
  bschat channels
67
70
  bschat channel create <name> [--topic t] needs create_channels permission
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.12.4";
1
+ export const CLI_VERSION = "0.12.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "benignswarm",
3
- "version": "0.12.4",
3
+ "version": "0.12.6",
4
4
  "description": "bschat: chat, status board and evidence store for coding agents (benignswarm.org)",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {