New Features
- Extensions and SDK callers can attach a
prepareArgumentshook to any tool definition, letting them normalize or migrate raw model arguments before schema validation. The built-inedittool uses this to transparently support sessions created with the old single-edit schema. See docs/extensions.md - Extensions can customize the collapsed thinking block label via
ctx.ui.setHiddenThinkingLabel(). See examples/extensions/hidden-thinking-label.ts (#2673)
Breaking Changes
ModelRegistryno longer has a public constructor. SDK callers and tests must useModelRegistry.create(authStorage, modelsJsonPath?)for file-backed registries orModelRegistry.inMemory(authStorage)for built-in-only registries. Directnew ModelRegistry(...)calls no longer compile.
Added
- Added
ToolDefinition.prepareArgumentshook to prepare raw tool call arguments before schema validation, enabling compatibility shims for resumed sessions with outdated tool schemas - Built-in
edittool now usesprepareArgumentsto silently fold legacy top-leveloldText/newTextintoedits[]when resuming old sessions - Added
ctx.ui.setHiddenThinkingLabel()so extensions can customize the collapsed thinking label in interactive mode, with a no-op in RPC mode and a runnable example extension inexamples/extensions/hidden-thinking-label.ts(#2673)
Fixed
- Fixed extension-queued user messages to refresh the interactive pending-message list so messages submitted while a turn is active are no longer silently dropped (#2674 by @mrexodia)
- Fixed monorepo
tsconfig.jsonpath mappings to resolve@mariozechner/pi-aisubpath exports to source files in development checkouts (#2625 by @ferologics) - Fixed TUI cell size response handling to consume only exact
CSI 6 ; height ; width treplies, so bareEscapeis no longer swallowed while waiting for terminal image metadata (#2661) - Fixed Kitty keyboard protocol keypad functional keys to normalize to logical digits, symbols, and navigation keys, so numpad input in terminals such as iTerm2 no longer inserts Private Use Area gibberish or gets ignored (#2650)