- 860d98e: Add an adopt API so other extensions can hand an already-running child process over to the manager.
ProcessManager.adopt(name, command, cwd, child, { initialStdout, initialStderr, startTime })registers an externally spawned child (detached process group, piped stdio) as a managed process, and the newprocesses:command:adoptevent-bus channel exposes it cross-extension. Adopted processes get the full managed lifecycle: log capture (including output produced before the handover), liveness watching, kill/stop, notifications, and dock//psvisibility. This enables tools like a bash override that moves a long-running foreground command into the background without losing output.
- 622ee56: Fix session corruption when
context/ignorenotifications fire mid tool call. Pi appends non-turn custom messages directly into message history, so one arriving between an assistanttool_useand its pendingtool_resultmade every later Anthropic request 400 until compaction or/new. These notifications now usenextTurndelivery, which safely defers them until the next user prompt.turnnotifications are unaffected.
- 07ad522: Fix the process dock remaining visible after unpinning a finished process from
/pswhen no managed processes are still running.
-
2eff528: The
/ps:logsoverlay now has an opt-in soft-wrap mode (wkey toggle). When enabled, long log lines expand into multiple display rows instead of being hard-clipped, making full content visible. Truncation remains the default for the/psoverview, dock, and the logs overlay. -
ca7c31d: The
/ps:logsoverlay now supports page scrolling:PageUp/PageDownmove by a full viewport andctrl+u/ctrl+dby half a viewport.Footers (
/psoverview and/ps:logsoverlay) now render compact shortcut hints: when a hint's key letter appears in its word, only the word is shown with the key highlighted in accent + bold ("w wrap" becomes "wrap"). When the hint list does not fit the footer width, a leading "? more" affordance appears; pressing?opens a stacked shortcuts overlay listing every available key.
- bb2666a: Fix the process dock not auto-closing after very short-lived processes.
hasSeenRunningProcessis now set synchronously in theSTARTEDevent handler (handleStarted) rather than only inside the throttledhardRefresh. Previously, a process that exited within the 125msscheduleRefreshthrottle window on a fresh session never set the flag, so the auto-close condition inhardRefreshnever fired and the dock stayed open showing the finished process. - 41a0bfd: Intentional process kills via /ps are now delivered as a context-level notification instead of being fully suppressed. The agent is not woken, but it receives the lifecycle message so it can keep its state accurate.
- 30163ff: Fixed a dead zone in the
/ps:logsoverlay where up to a screenful of scroll keypresses could be swallowed. The clamped viewport end is now written back to the scroll anchor in both the truncated and full render paths, so every keypress moves the view.
- 6e76b70: Update
@aliou/shfrom ^0.1.0 to ^0.2.2. Adaptsshell-utilsword stringification to the new AST: structured parameter expansions (exp/slice/replace/index), typed arithmetic expressions, and the newBraceExp/ExtGlobword parts.
- d5643bc: Detect tool render themes by shape instead of class identity so Pi and oh-my-pi render process calls correctly when package copies differ.
-
91adc0e: Support oh-my-pi's
renderCall(args, options, theme)argument order.pi invokes
renderCall(args, theme, context)while oh-my-pi passes the render options second and the theme third (documented in OMP's docs/extensions.md). The tool call renderer now detects pi's order by itsThemeclass instance and normalizes both orders, fixingTypeError: theme.fg is not a functioncrashes when renderingprocesstool calls under oh-my-pi. Supersedes #55.
-
6ec7e61: Adopt versioned config migrations from
@aliou/pi-utils-settings0.19.1.Migrations now declare a semver
versionand the loader stamps settings files automatically: the v0.9.4 shape migration targets0.10.0, and a terminal migration stamps every config with0.10.6. Settings files get"version": "0.10.6"on next load; no other user-visible change.schema.jsonis now generated by the bundledpi-settings-schemaCLI, which owns the reserved$schemaandversionkeys.
-
4ffc66e: Tweak process output and watch matcher rendering.
Collapsed process output now separates the header from the preview with an empty line, and the
filter:label uses a distinct tone from the pattern value. Pattern filters are quoted: double quotes for literal matches, single quotes when the literal contains a double quote, and slashes for regex. Expanded watch matcher lines instartandupdateapply the same quoting. -
c7f60f6: Improve the expanded process notification message (log match or process end).
The expanded detail line now honors the
outputPadsetting instead of a hardcoded value, no longer leaves a blank line between the summary and detail line, and colors each field to match existing conventions elsewhere in the extension (status/exit tone, accent pattern). Log match notifications now surface the matched pattern and stream in the expanded view, and kill notifications surface signal details.The
attentionfield is renamed tonotifyand reads in plain language (now/next turn/silent) instead of the rawturn/context/ignoreenum. The log matchstreamfield no longer repeatsliteralorregex, since the pattern itself is now quoted ("...") or slash-wrapped (/.../) to show that.
-
94bf16e: Render carriage-return progress output as the final visible update in
/ps:logsand the dock.Log watches now match the same plain visible line shown in the UI, so hidden CR-overwritten text, dropped escape payloads, and invisible styling bytes no longer trigger notifications.
-
7031d86: Default
notify.onSuccesstoturnso a finished process wakes an idle agent.Under v0.9.5 the flat
alertOnSuccess: trueboolean was clear enough that the agent set it on almost every start, so a completed build, test run, or encode always got a turn. The 0.10 rewrite replaced it withnotify.onSuccess, defaulting tocontext, and the agent stopped opting in.contextonly reaches the agent if it happens to still be streaming when the process ends; an idle agent is never woken, so long one-shot commands finished silently and the user had to prod the agent.Servers and watchers that should not interrupt on a clean exit can still pass
notify.onSuccess: "context".The tool descriptions, prompt guidelines, and skill now state plainly that only
turnreaches an idle agent, instead of claiming every exit notification brings the agent back.
-
000e0dc: Sanitize process output before rendering it in the
/ps:logsoverlay and the/pspreview. Both paths rendered raw log text since the 0.10 rewrite, so cursor movement, screen erase, alternate-screen switches, scroll regions, OSC/DCS/APC strings, and stray carriage returns reached the terminal and could corrupt the whole screen. v0.9.5 stripped these at render; the rewrite dropped that step.Escape sequences other than SGR colors are now removed, tabs are expanded so measured width matches drawn width, and colors are preserved (v0.9.5 dropped them). The dock gets the same treatment on top of its existing strip.
-
e4d6cc5: Sanitize and width-truncate every place that renders process-controlled text: the
/pslist, the dock tab strip, log labels and status widget, the pickers and completions,/ps:killnotifications, the plain-mode process lists, the process tool renders, and the notification summary. A name, command, or matched log line carrying an escape sequence could otherwise drive the terminal.Commands and names are now measured in terminal cells rather than JavaScript characters, so a wide-character name no longer draws 21 columns in a 12-column dock tab and emoji are no longer cut mid-surrogate. Colors cut off by truncation are re-closed instead of bleeding into the rest of the frame.
-
5c00907: Use one ANSI-safe
truncateToWidthacross every extension. Pi's version injectsESC[0mafter the kept prefix and around the ellipsis, which ends a caller-applied background or foreground early and leaves the ellipsis and padding unstyled; it also mis-parses CSI sequences that do not end inm,G,K,H, orJ, and can swallow visible text. The repo already had a corrected fork used by three tool renderers only. It now lives inextensions/shared/truncate.ts, has tests, and is used by the/psoverview, the/ps:logsoverlay, and the dock as well. -
bf76d4d: Render log lines through one shared helper in the
/pspreview, the/ps:logsoverlay, and the dock. The three views each had their own copy of sanitize, truncate, and stream/match toning, which is how the overlay and preview ended up missing sanitization in the first place. The dock now shows process colors like the other two views.
- 544cdf3: Guard process-group helpers against non-positive pgids.
isProcessGroupAlivenow returnsfalseandkillProcessGroupnow throws aRangeErrorwhen given a0or negative process-group ID, instead of probing or signaling the caller's own process group. - 4cdc5c4: Handle async spawn errors on failed starts. When a spawn fails during initialization (e.g. a non-existent cwd), the child has no pid and emits its
errorevent asynchronously; the null-pid path now attaches an error listener so the failure is captured on the record (realENOENT/EACCESreason) instead of crashing the host viauncaughtException.
-
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.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.
- 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.
- 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.
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.
- 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.
/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.
/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.
- 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.
- 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.
- 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.
- Targets Pi 0.80.3. 508 unit tests and 6 e2e tests pass; typecheck and lint clean. Tests are excluded from published files.
-
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.
-
96bbcd3: Fix cwd parameter being ignored on process start
The process tool always used the session working directory (ctx.cwd) when spawning processes, ignoring the cwd parameter passed by the LLM. This caused commands with relative paths to fail when a different working directory was specified.
- e812981: Relax Pi peer dependency ranges to avoid npm update conflicts in extension environments with older Pi package peers.
- c2287ac: Leave one terminal column unused in the collapsed log dock so long process output does not wrap into the editor.
- fbdf652: Refresh dependencies and migrate Pi imports to the
@earendil-worksnamespace. - 7ccfa67: Sanitize terminal control characters before rendering process logs in the UI.
- 8f15f76: Prevent crash on
/newwith running background processes
- b3060fb: Update Pi packages to 0.69.0. Migrate from @sinclair/typebox 0.34.x to typebox 1.x. Fix stale context in widget setup with mount/unmount pattern via session_shutdown handler.
- da0de08: Remove @aliou/pi-evals devDependency
- e7cbf6b: Name tool explicitly in promptGuidelines so it makes sense in the global system prompt Guidelines section
-
36fd5c6: Update Pi packages to 0.65.0.
Migrate widget session lifecycle handling to current Pi session events, and align custom tool rendering with current Pi renderer requirements.
-
80f81ff: perf: replace polling timers with event-driven output rendering
-
a8965ad: Add runtime log watch alerts for managed processes.
- New
logWatchesoption onprocesstoolstartaction - Watches match log lines on
stdout,stderr, orboth - Default one-time behavior (
repeat: false), with optional repeat mode - On watch match, emit visible UI event and trigger an immediate agent turn
- Invalid watch config (including bad regex patterns) now fails fast at start time
- New
-
2f33586: Process lookup now uses exact ID matching only. Fuzzy name/command matching via
find()has been removed. Theidparameter in tool actions accepts only the process ID returned bystartandlist. The/pslist UI merges the ID and Name columns into a single "Process" column showingname (id).
- 11d03ca: Ship the bundled
pi-processesskill and improve the published package docs. - 2bdee75: Sync process help text and docs references with the current
/pscommands and config paths.
- e1aa8cb: update Pi deps to 0.61.0
- 705b650: bump @aliou/pi-utils-settings to ^0.10.0 (local scope fix)
-
902eccb: Remove the unused dock follow-mode keyboard shortcut (
Shift+F) and clean up stale docs.- remove
toggleFollowfrom dock actions and keybinding types/defaults - update README command docs (
/ps:pin,/ps:logs,/ps:dock show|hide|toggle) - remove incorrect global shortcut docs and clarify follow mode control via settings
- remove
-
67da7e3: Add
/ps:dock,/ps:focus,/ps:logscommands. Add deprecated/process:*commands. Replace status widget with log dock. Preserve ANSI colors. Fix duplicate notifications. Use proper ThemeColor type. -
8cd4247: Exclude local implementation plan documents from version control.
-
47bd895: Split widget hook into focused modules for types, status rendering, and setup.
-
905a499: Add
writeaction to write to process stdinThe process tool now supports writing to a running process's stdin:
process action=write id=proc_1 input="hello\n"- write data to stdinprocess action=write id=proc_1 input="quit\n" end=true- write and close stdin
Useful for interactive programs, testing RPC mode, and any scenario requiring input to be sent to a background process.
-
265d8ff: Reorganize process commands into per-command directories and split settings command internals.
- 9fa2188: Restore bottom border line on log overlay
- dbcd3d1: Split commands into separate files for better organization
- d0814e6: Improve tool result display when collapsed: show last 2 output lines, first 3 processes with status. Remove redundant action/status footer on success.
-
da665cd: Add opt-in blocker for background bash commands: when enabled,
bashtool calls that would spawn a background process (&) are held for approval before execution.Fix process list column truncation on narrow terminals. Move
@mariozechner/pi-tuito peer dependencies.
- 3ccf461: Fix TUI crash when rendered lines exceed terminal width. Add width guards to widget status line, process list panel, and process picker component.
- abcfd26: mark pi SDK peer deps as optional to prevent koffi OOM in Gondolin VMs
- be41cbd: Fix: include real source files
- 328571f: Move to standalone repository
-
18a2b3e: Fix process command shell resolution to avoid relying on
$SHELL.- Keep explicit settings override via
execution.shellPath - Fallback to known bash paths for consistent
-lcbehavior - Add/update unit tests for resolver behavior
- Keep explicit settings override via
- Updated dependencies [7df01a2]
- @aliou/pi-utils-settings@0.4.0
- d8b1ecd: Align process tool renderCall header with shared tool header guidelines (tool/action/main args/options/long args) and keep result footer spacing consistent.
- 1167a3d: Remove auto-stream of logs widget on process start. The log stream widget should only appear when the user explicitly runs /process:stream.
- Updated dependencies [756552a]
- @aliou/pi-utils-settings@0.3.0
- 393b9d7: Rename tool and commands from
processestoprocess. Add /process:stream, /process:logs, /process:kill, /process:clear commands with autocomplete. Add settings support via /process:settings. Auto-stream logs widget on process start.
- 228d44d: Fix spurious "requires interactive mode" notification on TUI dismiss
- e9916ca: Strip all CSI sequences in stripAnsi, not just SGR and a few cursor codes
- b5c4cd1: Update demo video and image URLs for the Pi package browser.
- dccbf2d: Add preview video to package.json for the pi package browser.
- 7736c67: Update pi peerDependencies to 0.51.0. Reorder tool execute parameters to match new signature.
- 055fae4: Trigger agent turn on process end based on alert flags. Rename
notifyOnSuccess/notifyOnFailure/notifyOnKilltoalertOnSuccess/alertOnFailure/alertOnKill. These flags now control whether the agent gets a turn to react when a process ends, rather than just sending a silent message.
-
308278c: Fix ANSI rendering and output truncation in process tool results.
- Strip ANSI escape codes from tool output rendering to prevent background color artifacts.
- Show "ANSI escape codes were stripped from output" warning when codes were present.
- Truncate output sent to agent context (200 lines / 50KB tail) to avoid flooding context window.
- Append full log file paths in truncation notice.
- Fix widget crash when many processes exceed terminal width.
- Fix /processes panel crash from header scroll suffix and long process names.
- 5f27afd: Bump to Pi v0.50.0.
-
6477f44: Major refactor for Unix-correct process lifecycle and event-driven architecture.
Breaking changes:
- Unix-only: extension now disables itself on Windows with a UI warning
startaction now requires explicitnameparameter (no auto-inference)
New features:
- Process group signals (SIGTERM/SIGKILL) for reliable termination
- New process statuses:
terminating,terminate_timeout - Event-driven manager API (
process_started,status_changed,ended) - Widget and TUI are now event-driven (no polling)
Improvements:
- Immediate SIGKILL on shutdown for fast pi exit
- Spawns via
/bin/bash -lcwith detached process groups - Process-group liveness checks
- Codebase restructured: types in
constants/, utils inutils/, tool actions split
- a0cecd3: Migrate from overlay to full-screen editor-replacing view. Remove vendored tui-utils build step.
- 626f610: Initial release for the processes extension.