@yusukeshib/pi-babysit 0.6.26 → 0.6.29
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/README.md +19 -54
- package/index.ts +131 -680
- package/package.json +1 -3
- package/log-source.ts +0 -232
- package/log-viewer.ts +0 -496
package/README.md
CHANGED
|
@@ -131,12 +131,8 @@ waits use this mapping; manual remote sessions are never adopted or killed.
|
|
|
131
131
|
Resume the same Pi session to reconnect. Remote logs stay remote: results show
|
|
132
132
|
an executable `babysit --host … log -s …` locator instead of a local file path.
|
|
133
133
|
Remote output is a bounded tail (200 lines by default) or CLI `--grep` search
|
|
134
|
-
(no local line numbers). The widget shows host/state and
|
|
135
|
-
|
|
136
|
-
is open, pi-babysit incrementally mirrors the remote raw log (`log --since
|
|
137
|
-
--raw --json`) into the local session root and pages it like a local log; a
|
|
138
|
-
replaced or truncated remote log rebuilds the mirror, and a finished log stops
|
|
139
|
-
syncing once its final output has been read.
|
|
134
|
+
(no local line numbers). The passive widget shows host/state and the session
|
|
135
|
+
description; it never fetches or mirrors remote output.
|
|
140
136
|
|
|
141
137
|
An SSH failure is **unknown status**, not process exit. Remote workers may
|
|
142
138
|
survive disconnects. An uncertain launch keeps its identity and reports the
|
|
@@ -155,56 +151,25 @@ before local retention can collect their metadata.
|
|
|
155
151
|
| Command | What it does |
|
|
156
152
|
| ------- | ------------ |
|
|
157
153
|
| `/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 |
|
|
158
|
-
| `/babysit view` | Keyboard picker to open a session in the widget log viewer (Pi TUI) |
|
|
159
154
|
| `/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 |
|
|
160
155
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
`PROCESS RUNNING`, `AGENT RUNNING`, or `AGENT IDLE
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
Pi's scrollbar theme. Wheel, scrollbar drag/track clicks, and ↑/↓ navigate the
|
|
179
|
-
log without requiring any Pi core changes. Home/End and PageUp/PageDown remain
|
|
180
|
-
Pi's transcript shortcuts. At the bottom it follows new output; scrolling up
|
|
181
|
-
pauses following until you return to the bottom. The viewer resizes with the
|
|
182
|
-
terminal, leaving room for the editor/status/footer. Agent logs separate
|
|
183
|
-
assistant text, tool calls, and results; process logs show terminal output.
|
|
184
|
-
When babysit provides `output.timestamps.jsonl`, process lines begin with a muted
|
|
185
|
-
local `[YYYY-MM-DD HH:mm:ss]` capture time, with wrapped text aligned beneath the
|
|
186
|
-
message. Agent lines show the capture time of their block's first available event
|
|
187
|
-
in the same left column, with the assistant/tool/result/error label beside the
|
|
188
|
-
first content line; streamed updates and duplicate results keep that time. This
|
|
189
|
-
is the time babysit received the first byte of the event or line, not an
|
|
190
|
-
application event time. Narrow views place the date above the text. Old logs and
|
|
191
|
-
lines without capture metadata remain readable without invented timestamps.
|
|
192
|
-
Only the selected log is loaded: the viewer starts at the tail and lazily reads
|
|
193
|
-
older/newer pages as you scroll to the loaded window's edges. The scrollbar
|
|
194
|
-
represents that window, not the entire file; the footer shows its byte range.
|
|
195
|
-
Normally a small sliding window of roughly 64 KiB pages is retained. Page limits
|
|
196
|
-
are soft for oversized records and individual assistant-response/tool-result
|
|
197
|
-
groups (streaming snapshots and duplicate results stay together), and for pages
|
|
198
|
-
intersecting the viewport. Agent tasks are split at assistant-message boundaries,
|
|
199
|
-
not loaded as a whole; older logs lacking those events can form larger groups.
|
|
200
|
-
All saved history remains reachable, with no log records discarded or modified.
|
|
201
|
-
Capture-time sidecars are sought by byte range rather than read in full. Empty
|
|
202
|
-
logs show a placeholder. Works in the released Pi 1.0 widget host. Mouse interaction
|
|
203
|
-
requires fullscreen mode; `/babysit view` opens the viewer using a keyboard
|
|
204
|
-
picker, and `/babysit` still provides a snapshot. The displayed `age` is total
|
|
205
|
-
session age, not time spent in the current state. Transcript details
|
|
206
|
-
from tool results, snapshots, and completion notifications collapse or expand
|
|
207
|
-
with Pi's tool-output toggle (`Ctrl+O` by default).
|
|
156
|
+
The widget below the editor lists all running sessions, newest first,
|
|
157
|
+
including reusable idle agents. Summary counts use `RUNNING` / `IDLE`; rows show
|
|
158
|
+
`PROCESS RUNNING`, `AGENT RUNNING`, or `AGENT IDLE`, total session age, remote host
|
|
159
|
+
and unknown-status indicators when applicable, and a colored one-line description.
|
|
160
|
+
Older sessions fall back to their command or task. Rows truncate to terminal width
|
|
161
|
+
with `…`. In fullscreen mode, click the single `⧉` icon at the right edge of a row
|
|
162
|
+
to copy that session's shell-quoted `babysit log` command. It includes the local
|
|
163
|
+
`BABYSIT_DIR` or remote host/worker ID, without executing the command or changing
|
|
164
|
+
the input buffer. The icon changes in place: `…` while copying, `✓` on success,
|
|
165
|
+
or `!` on failure. The result stays visible for two seconds before returning to
|
|
166
|
+
`⧉`, including across list refreshes. Only the icon is clickable; rows never expand.
|
|
167
|
+
There is no paging, all/running toggle, keyboard handling, or log fetching. Very narrow widgets omit the icon.
|
|
168
|
+
Finished sessions disappear from the widget. Without mouse support, or for finished
|
|
169
|
+
sessions, use the keyboard picker `/babysit`; its snapshot includes the log command
|
|
170
|
+
for manual copying. The babysit tools also remain available to inspect output.
|
|
171
|
+
Transcript details from tool results, snapshots, and completion notifications still
|
|
172
|
+
use Pi's tool-output toggle (`Ctrl+O` by default).
|
|
208
173
|
|
|
209
174
|
## Logs without context flooding
|
|
210
175
|
|