github badlogic/pi-mono v0.51.0

latest releases: v0.55.3, v0.55.2, v0.55.1...
26 days ago

Breaking Changes

  • Extension tool signature change: ToolDefinition.execute now uses (toolCallId, params, signal, onUpdate, ctx) parameter order to match AgentTool.execute. Previously it was (toolCallId, params, onUpdate, ctx, signal). This makes wrapping built-in tools trivial since the first four parameters now align. Update your extensions by swapping the signal and onUpdate parameters:
    // Before
    async execute(toolCallId, params, onUpdate, ctx, signal) { ... }
    
    // After
    async execute(toolCallId, params, signal, onUpdate, ctx) { ... }

New Features

  • Android/Termux support: Pi now runs on Android via Termux. Install with:
    pkg install nodejs termux-api git
    npm install -g @mariozechner/pi-coding-agent
    mkdir -p ~/.pi/agent
    echo "You are running on Android in Termux." > ~/.pi/agent/AGENTS.md
    Clipboard operations fall back gracefully when termux-api is unavailable. (#1164)
  • Bash spawn hook: Extensions can now intercept and modify bash commands before execution via pi.setBashSpawnHook(). Adjust the command string, working directory, or environment variables. See docs/extensions.md. (#1160 by @mitsuhiko)
  • Linux ARM64 musl support: Pi now runs on Alpine Linux ARM64 (linux-arm64-musl) via updated clipboard dependency.
  • Nix/Guix support: PI_PACKAGE_DIR environment variable overrides the package path for content-addressed package managers where store paths tokenize poorly. See README.md#environment-variables. (#1153 by @odysseus0)
  • Named session filter: /resume picker now supports filtering to show only named sessions via Ctrl+N. Configurable via toggleSessionNamedFilter keybinding. See docs/keybindings.md. (#1128 by @w-winter)
  • Typed tool call events: Extension developers can narrow ToolCallEvent types using isToolCallEventType() for better TypeScript support. See docs/extensions.md#tool-call-events. (#1147 by @giuseppeg)
  • Extension UI Protocol: Full RPC documentation and examples for extension dialogs and notifications, enabling headless clients to support interactive extensions. See docs/rpc.md#extension-ui-protocol. (#1144 by @aliou)

Added

  • Added Linux ARM64 musl (Alpine Linux) support via clipboard dependency update
  • Added Android/Termux support with graceful clipboard fallback (#1164)
  • Added bash tool spawn hook support for adjusting command, cwd, and env before execution (#1160 by @mitsuhiko)
  • Added typed ToolCallEvent.input per tool with isToolCallEventType() type guard for narrowing built-in tool events (#1147 by @giuseppeg)
  • Exported discoverAndLoadExtensions from package to enable extension testing without a local repo clone (#1148)
  • Added Extension UI Protocol documentation to RPC docs covering all request/response types for extension dialogs and notifications (#1144 by @aliou)
  • Added rpc-demo.ts example extension exercising all RPC-supported extension UI methods (#1144 by @aliou)
  • Added rpc-extension-ui.ts TUI example client demonstrating the extension UI protocol with interactive dialogs (#1144 by @aliou)
  • Added PI_PACKAGE_DIR environment variable to override package path for content-addressed package managers (Nix, Guix) where store paths tokenize poorly (#1153 by @odysseus0)
  • /resume session picker now supports named-only filter toggle (default Ctrl+N, configurable via toggleSessionNamedFilter) to show only named sessions (#1128 by @w-winter)

Fixed

  • Fixed pi update not updating npm/git packages when called without arguments (#1151)
  • Fixed models.json validation requiring fields documented as optional. Model definitions now only require id; all other fields (name, reasoning, input, cost, contextWindow, maxTokens) have sensible defaults. (#1146)
  • Fixed models resolving relative paths in skill files from cwd instead of skill directory by adding explicit guidance to skills preamble (#1136)
  • Fixed tree selector losing focus state when navigating entries (#1142 by @Perlence)
  • Fixed cacheRetention option not being passed through in buildBaseOptions (#1154)
  • Fixed OAuth login/refresh not using HTTP proxy settings (HTTP_PROXY, HTTPS_PROXY env vars) (#1132)
  • Fixed pi update <source> installing packages locally when the source is only registered globally (#1163 by @aliou)
  • Fixed tree navigation with summarization overwriting editor content typed during the summarization wait (#1169 by @aliou)

Don't miss a new pi-mono release

NewReleases is sending notifications on new releases.