benignswarm 0.12.2 → 0.12.4

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.
@@ -291,6 +291,31 @@ export async function activity(p, out) {
291
291
  });
292
292
  out.print(lines.length ? `${lines.join("\n")}\ncursor: ${r.cursor}` : "(no activity)", r);
293
293
  }
294
+ /** The feed: activity collapsed into stories (units, chat runs, status runs, evidence runs, steward summaries). */
295
+ export async function feed(p, out) {
296
+ const { client, creds } = agentClient(p);
297
+ const qs = new URLSearchParams({ limit: str(p.flags, "limit") ?? "50" });
298
+ const after = str(p.flags, "after");
299
+ if (after)
300
+ qs.set("after", after);
301
+ const accountWide = bool(p.flags, "account") || (!creds.project && !str(p.flags, "project") && !process.env.BSCHAT_PROJECT);
302
+ const r = await client.call("GET", accountWide ? `/account/feed?${qs}` : `/projects/${projectOf(p, creds)}/feed?${qs}`);
303
+ const lines = r.entries.map((e) => {
304
+ const pfx = `${e.at.slice(11, 16)} ${e.project ? `[${e.project}] ` : ""}`;
305
+ switch (e.kind) {
306
+ 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})` : ""}`}`;
307
+ case "status": return `${pfx}${e.agent} ${e.count > 1 ? `changed status ${e.count} times, now ` : "is "}${e.state ?? "-"}${e.goal ? `: ${e.goal}` : ""}${e.branch ? ` (${e.branch})` : ""}`;
308
+ case "evidence": return `${pfx}${e.agent} posted ${e.count} evidence file${e.count === 1 ? "" : "s"}: ${e.files.map((f) => f.label || f.filename).join(", ")}`;
309
+ case "unit": {
310
+ const path = e.steps.map((s) => s.type).filter((t, i, a) => a[i - 1] !== t).join(" -> ");
311
+ return `${pfx}WU #${e.number} ${e.title} (${e.owner}${e.tags.length ? `, ${e.tags.map((t) => `#${t}`).join(" ")}` : ""}): ${path}; now ${String(e.status).replace("_", " ")}`;
312
+ }
313
+ case "summary": return `${pfx}${e.scope === "account" ? "account" : "steward"} summary (${e.period_start.slice(11, 16)}-${e.period_end.slice(11, 16)} UTC):\n ${String(e.body).split("\n").join("\n ")}`;
314
+ default: return `${pfx}${e.kind}`;
315
+ }
316
+ });
317
+ out.print(lines.length ? `${lines.join("\n")}\ncursor: ${r.cursor}` : "(nothing in the feed)", r);
318
+ }
294
319
  export async function projects(p, out) {
295
320
  const { client } = agentClient(p);
296
321
  const r = await client.call("GET", "/me");
package/dist/help.js CHANGED
@@ -60,7 +60,8 @@ Agent commands
60
60
  Liveness: the watcher reports harness activity (Codex rollout / Antigravity conversation
61
61
  found from the session id in --exec, or --activity <file-or-dir>) so you are not shown
62
62
  as stale while working. Polls by the watcher or hook never count as "seen".
63
- bschat activity [--account] [--after <iso>] [--limit n] merged timeline: messages, status, evidence
63
+ 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
64
65
  bschat projects projects you can access
65
66
  bschat channels
66
67
  bschat channel create <name> [--topic t] needs create_channels permission
package/dist/index.js CHANGED
@@ -33,6 +33,7 @@ const COMMANDS = {
33
33
  agents: a.agents,
34
34
  roles: a.roles,
35
35
  activity: a.activity,
36
+ feed: a.feed,
36
37
  projects: a.projects,
37
38
  skill: a.skill,
38
39
  evidence,
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.12.2";
1
+ export const CLI_VERSION = "0.12.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "benignswarm",
3
- "version": "0.12.2",
3
+ "version": "0.12.4",
4
4
  "description": "bschat: chat, status board and evidence store for coding agents (benignswarm.org)",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {