pi-processes: v0.10.0
Minor Changes
-
a146230: Bound in-memory process output by both line count and a new configurable byte budget.
/ps,/ps:logs, and the dock now append live output without repeatedly reading full log files, and show a marker when a burst drops lines. -
530dd99: Create the per-session log directory lazily, so a session that never starts a process leaves no temp directory behind. Cap each log file at 64 MB via truncate-and-restart; when a file exceeds the cap it is reset to a marker line and writing continues, so old history is discarded to bound disk (and RAM on tmpfs) usage. Budget ~128-192 MB per process.
-
e6937a3: Rewrite
@aliou/pi-processesinto a pi-agnostic core plus three focused Pi extensions, each owning a self-contained UI.One package, three extensions
extensions/processes— the core: theprocesstool, settings, notifications, and the/psoverview panel,/ps:kill,/ps:clear,/ps:settings.extensions/processes-logs— the/ps:logslog overlay with per-process tabs, stream filtering, follow, and search.extensions/processes-dock— the dock UI:/ps:dock,/ps:pin, the dock widget, and the status widget.extensions/shared— shared UI primitives (statusDot,processStatusTone,LineComponent) so all three extensions render status the same way.src/— the pi-agnostic process manager. No UI, no Pi imports.
Harmonized UI
- One status-dot glyph system across the
/pspanel, the/ps:logsoverlay tabs, and the dock. Every surface shows the same running / terminating / killed / success / failure states. - The panel, overlay, and dock read from the same shared helpers, so truncation, color, and status tone never drift between surfaces.
/psEnter pins to the dock (pin/unpin toggle) instead of focusing.- The status widget below the editor shares the same dot system and reflows on terminal resize with
+N moreoverflow.
Better log watches
- Watches are manageable at runtime via the new
process updateaction: add, replace, remove, or clear watches on a running process without restarting it. startandlistoutput show active watches, and the/ps:logsoverlay highlights matches.- Stale log-match notifications are suppressed after a process ends or is cleared — watches are unregistered on
process_ended, so belated output events for a cleared id short-circuit instead of flooding the conversation. Closes #54. - Empty match patterns (literal and regex) are rejected at
start.
Process tool
Seven actions:
start,list,output,update,write,stop,clear.startrestores thecwdparameter.outputfilters by stream (stdout/stderr/both) and matches patterns.writesends stdin and optionally closes it; no-op calls are rejected.clearremoves finished process entries.
/ps:logsoverlay- Per-process tabs (
tab), stream cycling (s), follow toggle (f), search (/), match navigation (n/N), jump-to-bottom (G), close (q). LogFileVieweris cached per process across tab switches.- Tab labels share the panel’s status system, so they match the overview rows.
Dock and status widget
/ps:dock(expand/collapse/close) and/ps:pin. Dock height is measured in log rows.- The dock auto-unpins a killed focused process via
processes-changed, so/ps:killnever has to touch the dock. - Status widget (
widget.showStatusWidget, off by default) renders a compact line of status dots under the editor, reflowing on resize.
Settings and migration
/ps:settingscovers process-list, output, dock, follow, status-widget, and interception options, persisted across sessions.- Imports the legacy
process.jsonon first run and migrates v0.9.4 settings forward to v0.10.0, preservingwidget.showStatusWidget. - Stamps migrated
processes.jsonfiles withversion: "0.10.0", so future migrations can key off an explicit config version instead of inferring from shape.
Notifications
- Configurable events (
onSuccess/onFailure/onKilled) with attention levels (turn/context/ignore). Defaults:onKilled=context,blockBackgroundCommands=false. - Log-watch alerts fan out and are highlighted in the overlay; the dead
timeoutkind is removed.
Intentional changes
- Log watches match literally by default with one-shot
repeat: falsedefaults. - Process IDs are opaque; sorting, truncation, and color are UI concerns only.
- Managed processes keep running in detached process groups when pi is suspended (
Ctrl+Z); log capture continues and match notifications deliver once pi is foregrounded.
Polish and runtime fixes
- Rate-limit delivered log-match notifications to 20 per minute across all processes, summarize suppressed matches, and cool down repeated matchers to 15 seconds.
- Share one
statusColor/statusDotmapping across panel, overlay, dock, and widget; exited-success uses✓, and the widget collapses finished-success processes into a✓ N donesummary. - Clamp dock sidebar width to the longest active process name; truncate tab labels instead of padding.
- Drop the dock bottom border and fix a line-overflow crash on narrow terminals.
- Re-read dock widget config on each render so
/ps:settingschanges apply immediately. - Reap old finished records from the manager.
- Preserve leading empty lines in tail-style log views.
Tooling
- Targets Pi 0.80.3. 508 unit tests and 6 e2e tests pass; typecheck and lint clean. Tests are excluded from published files.
Patch Changes
-
df8478b: Polish the dock chrome for a cleaner look.
- Drop the vertical side rails and corner borders.
- Use a single space of side padding instead of
│rails. - Keep a top bar with the title.
- In expanded mode, add a full-width rule between the process strip and the streaming logs.
- In collapsed mode, show only the header and a short log preview — no process strip.
- Leave the bottom open so the dock still sits flush against the editor.
-
4d5b4d6: Fix issue #58:
process outputno longer persists raw stdout/stderr arrays in tool-resultdetails. Output details now contain only metadata, including optional truncation info, while the bounded text preview is returned as tool-resultcontent. -
f0111d9: Limit delivered log-match notifications to 20 per minute across all processes, summarize suppressed matches, and increase repeated matcher cooldowns to 15 seconds. Lifecycle notifications remain exempt.