github badlogic/pi-mono v0.62.0

5 hours ago

New Features

  • Built-in tools as extensible ToolDefinitions. Extension authors can now override rendering of built-in read/write/edit/bash/grep/find/ls tools with custom renderCall/renderResult components. See docs/extensions.md.
  • Unified source provenance via sourceInfo. All resources, commands, tools, skills, and prompt templates now carry structured sourceInfo with path, scope, and source metadata. Visible in autocomplete, RPC discovery, and SDK introspection. See docs/extensions.md.
  • AWS Bedrock cost allocation tagging. New requestMetadata option on BedrockOptions forwards key-value pairs to the Bedrock Converse API for AWS Cost Explorer split cost allocation.

Breaking Changes

  • Changed ToolDefinition.renderCall and renderResult semantics. Fallback rendering now happens only when a renderer is not defined for that slot. If renderCall or renderResult is defined, it must return a Component.
  • Changed slash command provenance to use sourceInfo consistently. RPC get_commands, RpcSlashCommand, and SDK SlashCommandInfo no longer expose location or path. Use sourceInfo instead (#1734)
  • Removed legacy source fields from Skill and PromptTemplate. Use sourceInfo.source for provenance instead (#1734)
  • Removed ResourceLoader.getPathMetadata(). Resource provenance is now attached directly to loaded resources via sourceInfo (#1734)
  • Removed extensionPath from RegisteredCommand and RegisteredTool. Use sourceInfo.path for provenance instead (#1734)

Migration Notes

Resource, command, and tool provenance now use sourceInfo consistently.

Common updates:

  • RPC get_commands: replace path and location with sourceInfo.path, sourceInfo.scope, and sourceInfo.source
  • SlashCommandInfo: replace command.path and command.location with command.sourceInfo
  • Skill and PromptTemplate: replace .source with .sourceInfo.source
  • RegisteredCommand and RegisteredTool: replace .extensionPath with .sourceInfo.path
  • Custom ResourceLoader implementations: remove getPathMetadata() and read provenance from loaded resources directly

Examples:

  • command.path -> command.sourceInfo.path
  • command.location === "user" -> command.sourceInfo.scope === "user"
  • skill.source -> skill.sourceInfo.source
  • tool.extensionPath -> tool.sourceInfo.path

Changed

  • Built-in tools now work like custom tools in extensions. To get built-in tool definitions, import readToolDefinition / createReadToolDefinition() and the equivalent bash, edit, write, grep, find, and ls exports from @mariozechner/pi-coding-agent.
  • Cleaned up buildSystemPrompt() so built-in tool snippets and tool-local guidelines come from built-in ToolDefinition metadata, while cross-tool and global prompt rules stay in system prompt construction.
  • Added structured sourceInfo to pi.getAllTools() results for built-in, SDK, and extension tools (#1734)

Fixed

  • Fixed extension command name conflicts so extensions with duplicate command names can load together. Conflicting extension commands now get numeric invocation suffixes in load order, for example /review:1 and /review:2 (#1061)
  • Fixed slash command source attribution for extension commands, prompt templates, and skills in autocomplete and command discovery (#1734)
  • Fixed auto-resized image handling to enforce the inline image size limit on the final base64 payload, return text-only fallbacks when resizing cannot produce a safe image, and avoid falling back to the original image in read and @file auto-resize paths (#2055)
  • Fixed pi update for git packages to skip destructive reset, clean, and reinstall steps when the fetched target already matches the local checkout (#2503)
  • Fixed print and JSON mode to take over stdout during non-interactive startup, keeping package-manager and other incidental chatter off protocol/output stdout (#2482)
  • Fixed cli-highlight auto-detection for languageless code blocks that misidentified prose as programming languages and colored random English words as keywords
  • Fixed Anthropic thinking disable handling to send thinking: { type: "disabled" } for reasoning-capable models when thinking is explicitly off (#2022)
  • Fixed explicit thinking disable handling across Google, Google Vertex, Gemini CLI, OpenAI Responses, Azure OpenAI Responses, and OpenRouter-backed OpenAI-compatible completions (#2490)
  • Fixed OpenAI Responses replay for foreign tool-call item IDs by hashing foreign IDs into bounded fc_<hash> IDs
  • Fixed OpenAI-compatible completions streams to ignore null chunks instead of crashing (#2466 by @Cheng-Zi-Qing)
  • Fixed truncateToWidth() performance for very large strings by streaming truncation (#2447)
  • Fixed markdown heading styling being lost after inline code spans within headings

Don't miss a new pi-mono release

NewReleases is sending notifications on new releases.