@mariozechner/pi-coding-agent
0.73.1 · 7 May 2026MIT443.1k / weekRepositoryHomepagenpmAtom feed
0.73.1 is the newest release of 0.69.x.
In short
2 breaking7 new5 fixed
- Breaking
Migrated first-party coding-agent code, SDK/examples/docs, and package metadata from
@sinclair/typebox0.34.x totypebox1.x. New extensions, SDK integrations, and pi packages should depend on and import fromtypebox. Legacy extension loading still aliases the root@sinclair/typeboxpackage, but@sinclair/typebox/compileris no longer shimmed. This migration also picks up the new@mariozechner/pi-aiTypeBox-native validator path, so tool argument validation now works in eval-restricted runtimes such as Cloudflare Workers instead of being skipped - Breaking
Session-replacement commands now invalidate captured pre-replacement session-bound extension objects after
ctx.newSession(),ctx.fork(), andctx.switchSession(). Oldpiand commandctxreferences now throw instead of silently targeting the replaced session. Migration: if code needs to keep working in the replacement session after one of those calls, passwithSessionto that same method and do the post-switch work there. In practice, move post-switchpi.sendUserMessage(),pi.sendMessage(), and command-ctx/session-manager access intowithSession, and use only theReplacedSessionContextpassed to that callback for session-bound operations. Footguns:withSessionruns after the old extension instance has already receivedsession_shutdown, old cleanup may already have invalidated captured state, captured oldpi/ old commandctxare stale, and previously extracted raw objects such asconst sm = ctx.sessionManagerremain the caller's responsibility and must not be reused after the switch.
Security
3 advisories affect 0.69.0
- HighPi Agent: Predictable temporary extension install paths allow local privilege escalation on shared Linux hostsGHSA-jfgx-wxx8-mp94 · 17 Jun 2026No fix yet
- LowPi Agent: Race condition in Pi auth.json writes could expose stored credentialsGHSA-r95r-rj6r-c39x · 17 Jun 2026No fix yet
- LowPi Agent: Potential XSS in HTML session exports via Markdown URL sanitization bypassGHSA-7v5m-pr3q-6453 · 16 Jun 2026No fix yet
Release note
New Features
TypeBox 1.x migration for extensions and SDK integrations, including TypeBox-native tool argument validation that now works in eval-restricted runtimes such as Cloudflare Workers. See docs/extensions.md and docs/sdk.md.
Stacked extension autocomplete providers via
ctx.ui.addAutocompleteProvider(...), allowing extensions to layer custom completion logic on top of built-in slash and path completion. See docs/extensions.md#autocomplete-providers and examples/extensions/github-issue-autocomplete.ts.Terminating tool results via
terminate: true, allowing custom tools to end on a final tool call without paying for an automatic follow-up LLM turn. See docs/extensions.md and examples/extensions/structured-output.ts.OSC 9;4 terminal progress indicators during agent streaming and compaction for supporting terminals.
Breaking Changes
- Breaking
Migrated first-party coding-agent code, SDK/examples/docs, and package metadata from
@sinclair/typebox0.34.x totypebox1.x. New extensions, SDK integrations, and pi packages should depend on and import fromtypebox. Legacy extension loading still aliases the root@sinclair/typeboxpackage, but@sinclair/typebox/compileris no longer shimmed. This migration also picks up the new@mariozechner/pi-aiTypeBox-native validator path, so tool argument validation now works in eval-restricted runtimes such as Cloudflare Workers instead of being skipped - Breaking
Session-replacement commands now invalidate captured pre-replacement session-bound extension objects after
ctx.newSession(),ctx.fork(), andctx.switchSession(). Oldpiand commandctxreferences now throw instead of silently targeting the replaced session. Migration: if code needs to keep working in the replacement session after one of those calls, passwithSessionto that same method and do the post-switch work there. In practice, move post-switchpi.sendUserMessage(),pi.sendMessage(), and command-ctx/session-manager access intowithSession, and use only theReplacedSessionContextpassed to that callback for session-bound operations. Footguns:withSessionruns after the old extension instance has already receivedsession_shutdown, old cleanup may already have invalidated captured state, captured oldpi/ old commandctxare stale, and previously extracted raw objects such asconst sm = ctx.sessionManagerremain the caller's responsibility and must not be reused after the switch.
Added
Added support for terminating tool results via
terminate: true, allowing custom tools to end the current tool batch without an automatic follow-up LLM call, plus astructured-output.tsextension example and extension docs showing the patternAdded OSC 9;4 terminal progress indicators during agent streaming and compaction, so terminals like iTerm2, WezTerm, Windows Terminal, and Kitty show activity in their tab bar
Added
ctx.ui.addAutocompleteProvider(...)for stacking extension autocomplete providers on top of the built-in slash/path provider, plus agithub-issue-autocomplete.tsexample and extension docs
Fixed
Fixed exported session HTML to sanitize markdown link URLs before rendering them into anchor tags, blocking
javascript:-style payloads while preserving safe links in shared/exported sessionsFixed
ctx.getSystemPrompt()insidebefore_agent_startto reflect chained system-prompt changes made by earlierbefore_agent_starthandlers, and clarified the extension docs around provider-payload rewrites and whatctx.getSystemPrompt()does and does not reportFixed built-in
google-gemini-climodel lists and selector entries to includegemini-3.1-flash-lite-preview, so Cloud Code Assist users no longer need manual--modelfallback selection to use itFixed extension session-replacement flows so
ctx.newSession(),ctx.fork(),ctx.switchSession(), and imported-session replacements fully rebind before post-switch work runs, addedwithSessionreplacement callbacks with freshReplacedSessionContexthelpers, and make stale pre-replacementpi/ctxsession-bound accesses throw instead of silently targeting the wrong sessionFixed
models.jsonbuilt-in provider overrides to acceptheaderswithout requiringbaseUrl, so request-header-only overrides now load and apply correctly
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.