pi-processes: v0.13.0
Minor Changes
-
4d53443: Persist context-level notifications immediately instead of deferring them to the next user prompt
contextand emittedignorenotifications (watch log matches, suppressed-match summaries,onKilled: "context") are now sent withtriggerTurn: falseand nodeliverAs, so Pi appends them as displayed custom messages right away — immediately when the agent is idle, and after the running turn’s tool results otherwise. They still never wake or steer the agent.Requires the Pi extension host that appends custom messages at the turn’s tool boundary (pi 0.84.4+, which fixed the mid-run append that made Anthropic requests 400). Peer ranges stay
*, so there is no enforced floor: on pi ≤0.84.3 this option shape is unsafe (≤0.84.1 steers the active run; 0.84.2–0.84.3 appends mid-run and 400s). This release is developed and tested against pi 0.87.0, which the devDependencies pin.Previously these messages waited for the next user prompt: nothing appeared in the UI and nothing entered model context until the user typed again.
Also bumps the tested pi toolchain to 0.87.0 (devDependencies only; peer ranges remain
*). -
c3a8e28: Adopt pi’s structured tool-output contract for the
processtoolThe
processtool now declaresProcessToolOutputSchema, a single union schema discriminated byaction(pi allows oneoutputSchemaper tool, so per-action schemas are impossible), and every action returnsstructuredContentalongside the model-facing text. Codemode scripts that call the nested process tool receive structured objects instead of parsing the text preview; model-facingcontentand the TUI renderers are unchanged.Every shape is declared once, schema-first: shared shapes live next to their owners —
ProcessInfoSchemaand the status/reason tuples insrc/types.ts, the log-matcher/notify schemas in the notifications registry, match modes insrc/utils/match-line— and each action’s details type is derived from its member schema (Static), so the input schema, runtime config, details types, and structured output cannot drift apart. The only hand-kept translation left is pi’sTruncationResult(a TS interface, not a schema), mirrored for the output truncation and enforced at its single assignment site.The
outputaction’s payload additionally carries the raw filtered selection lines behind the preview, bounded bytailLines(≤2000 per stream) and the 5000-line scan window rather than the preview byte limit, mirroring pi’sbashcontract. Those line arrays live only instructuredContent: pi persistsdetailsin the session transcript but never persistsstructuredContent, so the transcript entry stays bounded while codemode callers get the full selection.truncationstill describes only the model-facing preview.Also bumps the tested pi toolchain to 1.0.0 (
@earendil-works/pi-ai,@earendil-works/pi-coding-agent,@earendil-works/pi-tui; devDependencies only, peer ranges remain*and optional).typeboxstays at 1.3.27, the exact version pi 1.0.0 bundles.
Patch Changes
-
6708947: Fire
before_agent_startfor turns woken by process notifications on an idle hostWhen the host agent is idle,
turnnotifications are now persisted as displayed custom messages withtriggerTurn: false, and the host is woken with a user message instead of atriggerTurnsteer. A steer wake on an idle host starts the run through Pi’s custom-message path, which never firesbefore_agent_start(#121), so the woken turn ran without system-prompt additions from that hook — and setups that require them rejected the request outright. The user-message wake goes throughpi.prompt(), which firesbefore_agent_startlike a user-typed prompt.While a run is active — or before any host lifecycle event has been observed — delivery still steers the active run unchanged. The delivery listener tracks host idleness from the session lifecycle, where
agent_settledis the idle signal (ctx.isIdle()is still false inagent_endandturn_endhandlers), sends at most one wake until the woken run starts, and re-arms once the host is idle again.