@yusukeshib/pi-babysit 0.6.31 → 0.6.32

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.
Files changed (3) hide show
  1. package/README.md +5 -1
  2. package/index.ts +11 -15
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -161,7 +161,7 @@ the host.
161
161
  | `/babysit` | Arrow-key picker over all sessions. Renders an **inline snapshot** (no tmux): running **process** → current rendered screen + recent output + a copy-paste `babysit attach` take-over hint (detach `Ctrl-\ Ctrl-\`); running **subagent** → read-only progress (RPC stdin stays untouchable); finished → summary. Re-run `/babysit` to refresh |
162
162
  | `/babysit gc [days]` | Preview and confirm deletion of old Pi-session roots (default 14 days). Active leases, live supervisor/child PIDs, unknown states, the current root, and recent roots are retained; old empty roots are eligible once their lease is gone. Deletion uses a GC lock and atomic rename |
163
163
 
164
- The widget below the editor lists all running sessions, newest first,
164
+ The TUI-only widget below the editor lists all running sessions, newest first,
165
165
  including reusable idle agents. Summary counts use `RUNNING` / `IDLE`; rows show
166
166
  `PROCESS RUNNING`, `AGENT RUNNING`, or `AGENT IDLE`, total session age, remote host
167
167
  and unknown-status indicators when applicable, and a colored one-line description.
@@ -208,6 +208,10 @@ targeted pattern over a broad tail, and do not read a potentially large log file
208
208
  in full. Subagent crashes return structured errors plus the full log path, never
209
209
  a raw RPC JSON tail.
210
210
 
211
+ Periodic widget updates are disabled outside TUI mode, so headless RPC workers
212
+ do not fill their logs with status/age UI requests. Background completion
213
+ notifications and actionable warnings/errors remain enabled.
214
+
211
215
  Subagents run in RPC mode with normal Pi session persistence enabled, using
212
216
  Pi's configured session storage (by default `~/.pi/agent/sessions/`). Each worker
213
217
  has its own Pi session, separate from the parent and from babysit's output log.
package/index.ts CHANGED
@@ -3574,7 +3574,9 @@ export default function (pi: ExtensionAPI) {
3574
3574
 
3575
3575
  let sessionWidget: ReturnType<typeof createWidgetComponent> | undefined;
3576
3576
  const refreshWidget = async (ctx: ExtensionContext, snapshot?: BsSession[]) => {
3577
- if (!ctx.hasUI) return;
3577
+ // RPC hasUI is also true, but every setWidget call becomes a log record.
3578
+ // Keep the age/status ticker local to the TUI, not headless worker logs.
3579
+ if (!ctx.hasUI || ctx.mode !== "tui") return;
3578
3580
  const all = snapshot ?? (await listSessions()).sessions;
3579
3581
  const { active } = widgetSessionGroups(all, (id) => readMeta(id)?.startedAt ?? 0);
3580
3582
  const subs = active.filter((session) => kindOf(session.id) === "subagent");
@@ -3606,21 +3608,15 @@ export default function (pi: ExtensionAPI) {
3606
3608
  description: description ? theme.fg("warning", theme.bold(escapeCommandForDisplay(description))) : undefined,
3607
3609
  };
3608
3610
  });
3609
- if (ctx.mode === "tui") {
3610
- if (!sessionWidget) {
3611
- ctx.ui.setWidget("pi-babysit", (tui) => {
3612
- sessionWidget = createWidgetComponent(summaryLines, displays,
3613
- (id) => copyToClipboard(sessionCliCommand(id, "log")),
3614
- () => tui.requestRender());
3615
- return sessionWidget;
3616
- }, { placement: "belowEditor" });
3617
- } else {
3618
- sessionWidget.update(summaryLines, displays);
3619
- }
3611
+ if (!sessionWidget) {
3612
+ ctx.ui.setWidget("pi-babysit", (tui) => {
3613
+ sessionWidget = createWidgetComponent(summaryLines, displays,
3614
+ (id) => copyToClipboard(sessionCliCommand(id, "log")),
3615
+ () => tui.requestRender());
3616
+ return sessionWidget;
3617
+ }, { placement: "belowEditor" });
3620
3618
  } else {
3621
- ctx.ui.setWidget("pi-babysit", createWidgetComponent(summaryLines, displays).render(10_000), {
3622
- placement: "belowEditor",
3623
- });
3619
+ sessionWidget.update(summaryLines, displays);
3624
3620
  }
3625
3621
  };
3626
3622
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yusukeshib/pi-babysit",
3
- "version": "0.6.31",
3
+ "version": "0.6.32",
4
4
  "description": "Run any shell command and pi subagents under babysit, with context-safe captured output.",
5
5
  "keywords": [
6
6
  "pi-package",