# Changelog ## [Unreleased] ### Added - Added grep CLI subcommand (`omp grep`) for testing pattern matching - Added fuzzy matching for model resolution with scoring and ranking fallback - Added 'Open: artifact folder' menu option to debug selector for quick access to session artifacts - Added Kimi API format setting for selecting between OpenAI and Anthropic formats - Added Codex and Gemini web search providers with OAuth and grounding support - Added /debug command with interactive menu for profiling, heap snapshots, session dumps, and diagnostics - Added configurable ask timeout and notification settings - Added gitignore-aware project tree scanning with ripgrep integration - Added project tree visualization to system prompts with configurable depth and entry limits - Added reset() method to CountdownTimer with integration into HookSelectorComponent - Added custom message support to AgentSession via promptCustomMessage() method - Added skill message component for rendering /skill command messages as compact entries - Added model preference matching system for intelligent model selection based on usage history - Added designer agent with UI/UX review and accessibility audit capabilities - Added model-specific edit variant configuration for patch/replace modes - Added automatic browser opening when stats dashboard starts - Added model statistics table and TTFT/throughput metrics to stats dashboard - Added artifact allocation for truncated fetch responses to preserve full content - Added 30-second timeout to ask tool with auto-selection of recommended option - Added recommended parameter (0-indexed) to ask tool for specifying default option - Added JTD to TypeScript converter for rendering schemas in system prompts - Added tools list to system prompt for better agent awareness - Added synthetic message flag for system-injected prompts - Added session compaction enhancements with auto-continue, tool pruning, and remote endpoint support - Added detection and rendering of missing complete tool warning in subagent output - Added outline UI components for bordered list containers - Added macOS NFD normalization and curly quote variant resolution for file paths - Enhanced session compaction with dynamic token ratio adjustment and improved summary preservation ### Changed - Simplified find tool API by consolidating path and pattern parameters - Replaced bulk file loading with streaming for read tool to reduce memory overhead - Migrated grep and find tools to WASM-based implementation - Replaced ripgrep-based file listing with glob-based file discovery for project scans - Updated minimum Bun runtime requirement to >=1.3.7 - Renamed task parameter from output to schema - Renamed complete tool to submit_result for clarity and consistency - Improved output preview logic: shows full output for ≤30 lines, truncates to 10 lines for larger output ### Fixed - Enhanced error reporting with debug stack trace when DEBUG env is set - Improved OAuth token refresh error handling to distinguish transient vs definitive failures - Added windowsHide option to child process spawn calls to prevent console windows on Windows - External edits to config.yml are now preserved when omp reloads or saves settings - Exposed LSP server startup errors in session display and logs - Improved error handling and security in agent storage initialization with restrictive file permissions - Fixed LSP server display showing unknown when server warmup fails - Preserved null timeout when user disables ask timeout setting - Removed incorrect timeout unit conversion logic in cursor, fetch, gemini-image, and ssh tools - Blocked /fork command while streaming to prevent split session logs ## [9.0.0] - 2026-01-29 ### Fixed - External edits to `config.yml` are now preserved when omp reloads or saves unrelated settings. Previously, editing config.yml directly (e.g., removing a package from `packages` array) would be silently reverted on next omp startup when automatic setters like `setLastChangelogVersion()` triggered a save. ([#1046](https://github.com/badlogic/pi-mono/pull/1046) by [@nicobailonMD](https://github.com/nicobailonMD)) ## [8.13.0] - 2026-01-29 ### Added - Added `/debug` command with interactive menu for bug report generation: - `Report: performance issue` - CPU profiling with reproduction flow - `Report: dump session` - Immediate session bundle creation - `Report: memory issue` - Heap snapshot with bundle - `View: recent logs` - Display last 50 log entries - `View: system info` - Show environment details - `Clear: artifact cache` - Remove old session artifacts ### Fixed - Fixed LSP server errors not being visible in `/session` output or logs when startup fails ## [8.12.7] - 2026-01-29 ### Fixed - Fixed LSP servers showing as "unknown" in status display when server warmup fails - Fixed Read tool loading entire file into memory when offset/limit was specified ## [8.12.2] - 2026-01-28 ### Changed - Replaced ripgrep-based file listing with fs.glob for project scans and find/read tooling ## [8.11.14] - 2026-01-28 ### Changed - Rendered /skill command messages as compact skill entries instead of full prompt text ## [8.8.8] - 2026-01-28 ### Added - Added `/fork` command to create a new session with the exact same state (entries and artifacts) as the current session ### Changed - Renamed the `complete` tool to `submit_result` for subagent result submission ## [8.6.0] - 2026-01-27 ### Added - Added `plan` model role for specifying the model used by the plan agent - Added `--plan` CLI flag and `OMP_PLAN_MODEL` environment variable for ephemeral plan model override - Added plan model selection in model selector UI with PLAN badge ### Changed - Task tool subagents now execute in-process instead of using worker threads ### Fixed - Queued skill commands as follow-ups when the agent is already streaming to avoid load failures - Deduplicated repeated review findings in subagent progress rendering - Restored MCP proxy tool timeout handling to prevent subagent hangs ## [8.5.0] - 2026-01-27 ### Added - Added subagent support for preloading skill contents into the system prompt instead of listing available skills - Added session init entries to capture system prompt, task, tools, and output schema for subagent session logs ### Fixed - Reduced Task tool progress update overhead to keep the UI responsive during high-volume streaming output - Fixed subagent session logs dropping pre-assistant entries (user/task metadata) before the first assistant response ### Removed - Removed enter-plan-mode tool ## [8.4.5] - 2026-01-26 ### Added - Model usage tracking to record and retrieve most recently used models - Model sorting in selector based on usage history ### Changed - Renamed `head_limit` parameter to `limit` in grep and find tools for consistency - Added `context` as an alias for the `c` context parameter in grep tool - Made hidden files inclusion configurable in find tool via `hidden` parameter (defaults to true) - Added support for reading ignore patterns from .gitignore and .ignore files in find tool ### Fixed - Respected .gitignore rules when filtering find tool results by glob pattern ## [8.4.2] - 2026-01-25 ### Changed - Clarified and condensed plan mode prompts for improved clarity and consistency ## [8.4.1] - 2026-01-25 ### Added - Added core plan mode with plan file approval workflow and tool gating - Added plan:// internal URLs for plan file access and subagent plan-mode system prompt - Added plan mode toggle shortcut with paused status indicator ### Fixed - Fixed plan reference injection and workflow prompt parameters for plan mode - Fixed tool downloads hanging on slow/blocked GitHub by adding timeouts and zip extraction fallback - Fixed missing UI notification when tools are downloaded or installed on demand ## [8.4.0] - 2026-01-25 ### Added - Added extension API to set working/loading messages during streaming - Added task worker propagation of context files, skills, and prompt templates - Added subagent option to skip Python preflight checks when Python tooling is unused - Model field now accepts string arrays for fallback model prioritization ### Changed - Merged patch application warnings into edit tool diagnostics output - Cached Python prelude docs for subagent workers to avoid repeated warmups - Simplified image placeholders inserted on paste to match Claude-style markers ### Fixed - Rewrote empty or corrupted session files to restore valid headers - Improved patch applicator ambiguity errors with match previews and overlap detection - Fixed Task tool agent model resolution to honor comma-separated model lists ## [8.3.0] - 2026-01-25 ### Changed - Added request parameter tracking to LSP tool rendering for better diagnostics visibility - Added async diff computation and Kitty protocol support to tool execution rendering - Refactored patch applicator with improved fuzzy matching (7-pass sequence matching with Levenshtein distance) and indentation adjustment - Added inline rendering flag to bash and fetch tool renderers - Extracted constants for preview formatting to improve code maintainability - Exposed mergeCallAndResult and inline rendering options from tools to their wrappers - Added timeout validation and normalization for tool timeout parameters ### Fixed - Fixed output block border rendering (bottom-right corner was missing) - Added background control parameter to output block rendering ## [8.2.2] - 2026-01-24 ### Removed - Removed git utility functions (_git, git_status, git_diff, git_log, git_show, git_file_at, git_branch, git_has_changes) from IPython prelude ## [8.2.0] - 2026-01-24 ### Added - Added `omp commit` command to generate conventional commits with changelog updates - Added agentic commit mode with commit-specific tools and `--legacy` fallback - Added configurable settings for map-reduce analysis including concurrency, timeout, file thresholds, and token limits - Added support for excluding YAML lock files (`.lock.yml`, `.lock.yaml`, `-lock.yml`, `-lock.yaml`) from commit analysis - Added new TUI component library with reusable rendering utilities including code cells, file lists, tree lists, status lines, and output blocks - Added renderCodeCell component for displaying code with optional output sections, supporting syntax highlighting and status indicators - Added renderFileList component for rendering file/directory listings with language icons and metadata - Added renderTreeList component for hierarchical tree-based item rendering with expand/collapse support - Added renderStatusLine component for standardized tool status headers with icons, descriptions, and metadata - Added renderOutputBlock component for bordered output containers with structured sections - Added renderOutputBlock to Bash tool for improved output formatting with status indicators - Added `--legacy` flag to `omp commit` for using the deterministic pipeline instead of agentic mode - Added split commit support to automatically create multiple atomic commits for unrelated changes - Added git hunk inspection tools for fine-grained diff analysis in commit generation - Added commit message validation with filler word and meta phrase detection - Added automatic unicode normalization in commit summaries - Added real-time progress output to agentic commit mode showing thinking status, tool calls, and completion summary - Added hunk-level staging support in split commits allowing partial file changes per commit - Added dependency ordering for split commits ensuring commits are applied in correct sequence - Added circular dependency detection with validation errors for split commit plans - Added parallel file analysis with cross-file context awareness via `analyze_files` tool - Added AGENTS.md context file discovery for commit generation - Added progress indicators during changelog generation and model resolution - Added propose_changelog tool for agent-provided changelog entries in agentic commit workflow - Added fallback commit generation when agentic mode fails, using file pattern analysis and heuristic-based type inference - Added trivial change detection to automatically classify whitespace-only and import-reorganization commits - Added support for pre-computed file observations in commit agent to skip redundant analyze_files calls - Added diff content caching with smart file prioritization to optimize token usage in large changesets - Added lock file filtering (17 patterns including Cargo.lock, package-lock.json, bun.lock) from commit analysis - Added changelog deletion support to remove outdated entries via the changelog proposal interface - Added support for pre-computed changelog entries in commit agent to display existing unreleased sections for potential deletion - Added `ExistingChangelogEntries` interface to track changelog sections by path for changelog proposal context - Added conditional `analyze_files` skipping in commit agent when pre-analyzed observations are provided - Added guidance to commit agent prompts instructing subagents to write files directly instead of returning changes for manual application - Added mermaid diagram rendering with terminal graphics support (Kitty/iTerm2) for markdown output - Added renderMermaidToPng utility for converting mermaid code blocks to terminal-displayable PNG images via mmdc CLI - Added mermaid block extraction with content-addressed hashing for deduplication and cache lookup - Added background mermaid pre-rendering in assistant messages for responsive diagram display - Added two-level mermaid caching with pending deduplication to prevent redundant renders - Added Python kernel session pooling with MAX_KERNEL_SESSIONS limit and automatic eviction of oldest sessions - Added automatic idle kernel session cleanup timer (5-minute timeout, 30-second interval) - Added types/assets/index.d.ts for global TypeScript module declarations supporting `.md`, `.py`, and `.wasm?raw` imports - Added bunfig.toml loader configuration for importing markdown, Python, and WASM files as text modules - Added color manipulation utilities (hexToHsv, hsvToHex, shiftHue) to pi-utils for accessible theme adjustments - Added color-blind mode setting for improved accessibility - Added filesystem error type guards (isEnoent, isEacces, isPerm, isEnotempty, isFsError, hasFsCode) to pi-utils for safe error handling - Added tarball installation test Dockerfile to validate npm publish/install flow ### Changed - Changed changelog diff truncation limit to be configurable via settings - Changed tool result rendering to use new TUI component library across multiple tools (bash, calculator, fetch, find, grep, ls, notebook, python, read, ssh, write, lsp, web search) for consistent output formatting - Changed Bash tool output rendering to use renderOutputBlock with proper section handling and width-aware truncation - Changed Python tool output rendering to use renderCodeCell component for code cell display with status indicators - Changed Read tool output rendering to use renderCodeCell with syntax highlighting and warnings display - Changed Write tool output rendering to use renderCodeCell for code display with streaming preview support - Changed Fetch tool output rendering to use renderOutputBlock with metadata and content preview sections - Changed LSP tool output rendering to use renderStatusLine and renderOutputBlock for structured output display - Changed Web Search result rendering to use renderOutputBlock with answer, sources, related questions, and metadata sections - Changed Find, Grep, and Ls tools to use renderFileList and renderTreeList for consistent file/item listing - Changed Calculator tool result rendering to use renderTreeList for result item display - Changed Notebook and TodoWrite tools to use new TUI rendering components for consistent output format - Refactored render-utils to move tree-related utilities to TUI module (getTreeBranch, getTreeContinuePrefix) - Changed import organization in sdk.ts for consistency - Changed tool result rendering to merge call and result displays, showing tool arguments (command, pattern, query, path) in result headers for Bash, Calculator, Fetch, Find, Grep, Ls, LSP, Notebook, Read, SSH, TodoWrite, Web Search, and Write tools - Changed Read tool title to display line range when offset or limit arguments are provided - Changed worker instantiation to use direct URL import instead of pre-bundled worker files - Changed `omp commit` to use agentic mode by default with tool-based git inspection - Changed agentic commit progress output to show real-time thinking previews and structured tool argument details - Changed agentic commit progress output to display full multi-line assistant messages and render tool arguments with tree-style formatting for improved readability - Changed agentic commit progress output to render assistant messages as formatted Markdown with proper word wrapping - Changed output block border color to reflect state (error, success, warning) for improved visual feedback - Changed LSP hover rendering to display documentation text before code blocks in both collapsed and expanded views - Changed Write tool to show streaming preview of content being written with syntax highlighting - Changed Read tool to display resolved path information when reading from URLs or symlinks - Changed Calculator tool result display to show both expression and output (e.g., `2+2 = 4`) instead of just the result - Changed Python tool output to group status information under a labeled section for clearer organization - Changed SSH tool output to apply consistent styling to non-ANSI output lines - Changed Todo Write tool to respect expanded/collapsed state and use standard preview limits - Changed Web Search related questions to respect expanded/collapsed state instead of always showing all items - Changed empty and error state rendering across multiple tools (Find, Grep, Ls, Notebook, Calculator, Ask) to include consistent status headers - Changed split commit to support hunk selectors (all, indices, or line ranges) instead of whole-file staging - Changed `analyze_file` tool to `analyze_files` for batch parallel analysis of multiple files - Switched agentic commit from auto-generated changelogs to agent-proposed entries with validation and retry logic - Commit agent now resolves a separate smaller model for commit generation instead of reusing the primary model - Normalized code formatting and indentation across tool renderers and UI components - Changed git-file-diff tool to prioritize files by type and respect token budget limits with intelligent truncation - Changed git-overview tool to filter and report excluded lock files separately from staged files - Changed analyze-file tool to include file type inference and enriched related files with line counts - Changed propose-changelog tool to support optional deletion entries for removing existing changelog items - Changed commit agent to accept pre-computed file observations and format them into session prompts - Changed changelog skip condition in `applyChangelogProposals` to also check for empty deletions object - Changed `createCommitTools()` to build tools array incrementally with conditional `analyze_files` inclusion based on `enableAnalyzeFiles` flag - Changed system prompt guidance to clarify that pre-computed observations prevent redundant `analyze_files` calls - Removed map-reduce preprocessing phase from commit agent for faster iteration - Changed commit agent to process full diff text directly instead of pre-computed file observations - Changed commit agent initialization to load settingsManager, authStorage, modelRegistry, and stagedFiles in parallel - Changed commit agent prompt to remove pre-computed observations guidance and encourage direct analyze_files usage - Changed AuthStorage from constructor-based instantiation to async factory method (AuthStorage.create()) - Changed Python kernel resource management with gateway shutdown on session disposal - Updated TypeScript configuration for better publish-time configuration handling with tsconfig.publish.json - Updated TypeScript and Bun configuration for monorepo-wide build consistency and reduced boilerplate - Removed WASM base64 encoding build script; imports now use Bun loader with `wasm?raw` query parameter - Unified TypeScript checking pipeline with tsgo-based configuration instead of per-package tsconfig.publish.json boilerplate - Refactored scanDirectoryForSkills to use async/await with concurrent directory scanning via Promise.all - Improved error logging in settings manager for config file access failures - Migrated node module imports from named to namespace imports across all packages for consistency with project guidelines - Improved filesystem error handling in extension loader with additional type guards (isEacces, hasFsCode) for permission and EPERM errors - Changed model discovery to synchronous file operations for more immediate initialization ### Fixed - Fixed database busy errors during concurrent access by adding retry logic with exponential backoff when opening storage - Find tool now rejects searches from root directory and enforces a 5-second timeout on fd operations - Commit command now exits cleanly with exit code 0 on success - Handle undefined code parameter in code cell renderer - Fixed indentation formatting in split-commit tool function signature - Fixed changelog application to process proposals containing only deletion entries without additions - Fixed indentation formatting in Python tool output renderer - Fixed Python kernel resource management with proper timing instrumentation for performance monitoring - Fixed model discovery to re-check file existence after JSON to YAML migration - Fixed branch change callbacks in footer component to properly update state after git resolution - Added guard clause in plugin-settings to prevent null reference when settings list is undefined - Fixed agent task discovery to support symlinks and improved error handling for file access failures ## [8.0.0] - 2026-01-23 ### Added - Added antigravity provider support for image generation with Google Cloud authentication - Added support for google-antigravity API credentials in model registry - Added antigravity-specific request handling with SSE streaming - Added projectId parameter to antigravity credentials parsing - Added antigravity provider to preferred image provider selection - Added list-limit utility for consistent result limiting across tools - Added output-utils module with tail buffer and artifact allocation helpers - Added tool-result module for standardized tool result construction - Added truncation summary options to OutputMetaBuilder for better output tracking - Added artifact storage system for truncated tool outputs with artifact:// URL protocol - Added structured output metadata system with fluent OutputMetaBuilder for consistent notices - Added standardized tool error types (ToolError, MultiError, ToolAbortError) for better error handling - Added internal URL routing system with protocol handlers: - `agent://` - access agent output artifacts - `agent:///` and `agent://?q=` - JSON extraction from agent outputs - `skill://` and `skill:///` - read skill files and relative paths - `rule://` - read rule content - URL resolution includes filesystem path in output for bash/python interop - Added fetch tool for URL content retrieval with enhanced processing capabilities - Added `isolated` option to task tool for git worktree execution with automatic patch generation and application - Added format-prompts script to standardize prompt file formatting ### Changed - Updated default line limit from 4000 to 3000 lines for output truncation - Reordered truncation notice to show offset continuation before artifact reference - Applied meta notice wrapper to all tools in createTools function - Updated test expectations to reflect new 3000 line limit - Removed output tool from schema validation test list - Replaced inline output truncation notices with structured metadata system across all tools - Updated bash, python, and ssh executors to track detailed output statistics (total lines/bytes vs output lines/bytes) - Modified artifact storage to use pre-allocated paths instead of inline file writing - Changed message format to use meta field instead of fullOutputPath for truncation information - Updated interactive components to display truncation metadata from structured format - Standardized tool result building with new ToolResultBuilder for consistent metadata handling - Simplified Python gateway coordination by removing reference counting and client tracking - Updated Python gateway to use global shared instance instead of per-process coordination - Modified Python kernel initialization to set working directory and environment per kernel - Updated interactive status display to show Python and venv paths instead of client count - Changed system prompt to clarify CHECKPOINT step 0 timing - Updated Python environment warming to use await instead of void for proper error handling - Updated interactive mode shutdown to use postmortem.quit instead of process.exit - Updated bash tool documentation to clarify specialized tool usage - Updated task tool documentation to escape placeholder syntax in examples - Updated Python environment warming to use await instead of void for proper error handling - Updated interactive mode shutdown to use postmortem.quit instead of process.exit - Updated bash tool documentation to clarify specialized tool usage - Updated task tool documentation to escape placeholder syntax in examples - Updated all tools to use structured metadata instead of inline notices for truncation, limits, and diagnostics - Replaced manual error formatting with ToolError.render() and standardized error handling - Enhanced bash and python executors to save full output as artifacts when truncated - Improved abort signal handling across all tools with consistent ToolAbortError - Renamed task parameter from `vars` to `args` throughout task tool interface and updated template rendering to support built-in `{{id}}` and `{{description}}` placeholders - Simplified todo-write tool by removing active_form parameter, using single content field for task descriptions - Updated system prompt structure with `` and `` tags, clearer critical sections, and standardized whitespace handling - Renamed web_fetch tool to fetch and removed internal URL handling (use read tool instead) - Standardized tool parameter names from camelCase to snake_case across edit, grep, python, and todo-write tools - Unified timeout parameters across all tools with auto-conversion from milliseconds and reasonable clamping (1s-3600s for bash/ssh, 1s-600s for python/gemini-image) - Simplified web-search tool by removing advanced parameters (`max_tokens`, `model`, `search_domain_filter`, `search_context_size`, `return_related_questions`) and using `recency` instead of `search_recency_filter` - Restructured tool documentation with standardized ``, ``, ``, and `` sections across all 18 tools - Updated find tool to always sort results by modification time - Updated bash prompt to use `cwd` parameter instead of `workdir` - Improved output truncation limits: bash to 50KB/2000 lines, python to 100KB - Removed model parameter from task and gemini-image tools to use session/provider defaults - Improved MCP tool name handling with explicit server and tool name properties - Marked read tool as non-abortable to improve performance - Converted dynamic imports to static imports in installer and exa tools ### Removed - Removed output tool (replaced by `agent://` URLs via read tool) - Removed web_fetch tool (replaced by fetch tool) ### Fixed - Fixed Python kernel environment initialization for external and shared gateways - Fixed gateway status reporting to include Python and virtual environment paths - Fixed inconsistent error formatting across tools by standardizing on ToolError types - Fixed timeout parameter handling to auto-convert milliseconds to seconds and clamp to reasonable ranges - Fixed whitespace formatting in json-query.ts comment - Fixed interactive shutdown to await postmortem cleanup so Python kernel gateways are terminated - Fixed shared Python gateway reuse across working directories by initializing kernel cwd and env per kernel - Fixed Python gateway coordination to use a single global gateway without ref counting ## [7.0.0] - 2026-01-21 ### Added - Added usage report deduplication to prevent duplicate account entries - Added debug logging for usage fetch operations to aid diagnostics - Added provider sorting in usage display by total usage amount - Added `isolated` parameter to task tool for running each task in separate git worktrees - Added git worktree management for isolated task execution with patch generation - Added patch application system that applies changes only when all patches are valid - Added working directory information to environment info display - Added `/usage` command to display provider usage and limits - Added support for multiple usage providers beyond Codex - Added usage report caching with configurable TTL - Added visual usage bars and account aggregation in usage display - Added `fetchUsageReports()` method to agent session - Added `output()` function to read task/agent outputs by ID with support for multiple formats and queries - Added session file support to Python executor for accessing task outputs - Added support for jq-like queries when reading JSON outputs - Added offset and limit parameters for reading specific line ranges from outputs - Added "." and "c" shortcuts to continue agent without sending visible message - Added debug logging for usage fetch results to aid /usage diagnostics ### Changed - Updated discoverSkills function to return object with skills property - Enhanced usage report merging to combine limits and metadata from duplicate accounts - Improved OAuth credential handling to preserve existing fields when updating - Removed cd function from Python prelude to encourage using cwd parameter - Updated task tool to generate and apply patches when running in isolated mode - Enhanced task tool rendering to display isolated execution status and patch paths - Updated system prompt structure and formatting for better readability - Reorganized tool hierarchy and discipline sections - Added parallel work guidance for task-based workflows - Enhanced verification and integration methodology sections - Updated skills and rules formatting for cleaner presentation - Added stronger emphasis on completeness and quality standards - Refactored usage tracking from Codex-specific to generic provider system - Updated usage limit detection to work with multiple provider APIs - Changed usage cache to use persistent storage instead of in-memory only - Limited diagnostic messages to 50 items to prevent overwhelming output when processing files with many issues - Changed `/dump` command to include complete agent context: system prompt, model config, available tools with schemas, and all message types (bash/python executions, custom messages, branch summaries, compaction summaries, file mentions) - Changed `/dump` format to use YAML instead of JSON for tool schemas and arguments (more readable) ### Fixed - Fixed TypeScript error in bash executor by properly typing caught exception - Fixed usage display ordering to show providers with lowest usage first - Fixed task tool result rendering to show fallback text when no results are available - Fixed external editor to work properly on Unix systems by correctly handling terminal I/O - Fixed external editor to show warning message when it fails to open instead of silently failing - Fixed find tool to properly handle no matches case without treating as error - Fixed find tool to wait for fd exit so error messages no longer report exit null - Fixed read tool to properly handle no matches case without treating as error - Fixed orphaned Python kernel gateway processes not being killed on process exit - Fixed /usage provider ordering to sort by aggregate usage (most used last) - Fixed /usage account dedupe to collapse identical accounts using usage metadata ## [6.9.69] - 2026-01-21 ### Added - Added cell-by-cell status tracking with duration and exit code for Python execution - Added syntax highlighting for Python code in execution display - Added template system with {{placeholders}} for task tool context - Added task variables support for filling context placeholders - Added enhanced task progress display with variable values - Added concurrent work handling guidance in system prompt - Added extension system support for user Python execution events - Added Python mode border color theming across all themes - Added Python execution indicator to welcome screen help text - Added `omp stats` command for viewing AI usage statistics dashboard - Added support for JSON output and console summary of usage statistics - Added configurable port option for stats dashboard server - Added multi-cell Python execution with sequential processing in persistent kernel - Added cell titles for better Python code organization and debugging - Added `$` command prefix for user-initiated Python execution in shared kernel - Added `$$` prefix variant for Python execution excluded from LLM context ### Changed - Updated Python execution to display cells in bordered blocks with status indicators - Changed task tool to use template-based context instead of simple concatenation - Enhanced Python execution component with proper syntax highlighting - Improved patch applicator to preserve exact indentation when intended - Updated task tool schema to require vars instead of task field - Updated Python execution component to use pythonMode theming instead of bashMode - Enhanced UI helpers to handle pending Python components properly - Changed Python tool to use `cells` array instead of single `code` parameter - Renamed `workdir` parameter to `cwd` in Bash and Python tools for consistency - Updated Python tool to display cell-by-cell output when multiple cells are provided ### Fixed - Fixed indentation preservation for exact matches and indentation-only patches - Fixed Python execution status updates to show real-time cell progress - Fixed indentation adjustment logic to handle edge cases with mixed indentation levels - Fixed patch indentation normalization for fuzzy matches, tab/space diffs, and ambiguous context alignment ## [6.9.0] - 2026-01-21 ### Removed - Removed Git tool and all related functionality - Removed voice control and TTS features - Removed worktree management system - Removed bundled wt custom command - Removed voice-related settings and configuration options - Removed @oh-my-pi/pi-git-tool dependency ## [6.8.5] - 2026-01-21 ### Breaking Changes - Changed timeout parameter from seconds to milliseconds in Python tool - Updated PythonExecutorOptions interface to use timeoutMs instead of timeout ### Changed - Updated default timeout to 30000ms (30 seconds) for Python tool - Improved streaming output handling and buffer management ## [6.8.4] - 2026-01-21 ### Changed - Updated output sink to properly handle large outputs - Improved error message formatting in SSH executor - Updated web fetch timeout bounds and conversion ### Fixed - Fixed output truncation handling in streaming output - Fixed timeout handling in web fetch tool - Fixed async stream dumping in executors ## [6.8.3] - 2026-01-21 ### Changed - Updated keybinding system to normalize key IDs to lowercase - Changed label edit shortcut from 'l' to 'Shift+L' in tree selector - Changed output file extension from `.out.md` to `.md` for artifacts ### Removed - Removed bundled worktree command from custom commands loader ### Fixed - Fixed keybinding case sensitivity issues by normalizing all key IDs - Fixed task artifact path handling and simplified file structure ## [6.8.2] - 2026-01-21 ### Fixed - Improved error messages when multiple text occurrences are found by showing line previews and context - Enhanced patch application to better handle duplicate content in context lines - Added occurrence previews to help users disambiguate between multiple matches - Fixed cache invalidation for streaming edits to prevent stale data - Fixed file existence check for prompt templates directory - Fixed bash output streaming to prevent premature stream closure - Fixed LSP client request handling when signal is already aborted - Fixed git apply operations with stdin input handling ### Security - Updated Anthropic authentication to handle manual code input securely ## [6.8.1] - 2026-01-20 ### Fixed - Fixed unhandled promise rejection when tool execution fails by adding missing `.catch()` to floating `.finally()` chain in `createAbortablePromise` ## [6.8.0] - 2026-01-20 ### Added - Added streaming abort setting to control edit tool behavior when patch preview fails ### Changed - Replaced internal logger with @oh-my-pi/pi-utils logger across all modules - Updated process spawning to use cspawn and ptree utilities from pi-utils - Migrated file operations to use async fs/promises and Bun file APIs - Refactored promise handling to use Promise.withResolvers and utility functions - Updated timeout and abort handling to use standardized utility functions - Refactored authentication login method to use OAuthController interface instead of individual callbacks ### Fixed - Fixed Python package installation to handle async operations properly - Fixed streaming output truncation to use consistent column limits - Fixed shell command execution to properly handle process cleanup and timeouts - Fixed SSH connection management to properly await async operations - Fixed voice supervisor process cleanup to use proper async handling - Added automatic regex pattern validation in grep tool to handle invalid patterns by switching to literal mode ### Security - Updated temporary file cleanup to use secure async removal methods ## [6.7.67] - 2026-01-19 ### Added - Added normative rewrite setting to control tool call argument normalization in session history - Added read line numbers setting to prepend line numbers to read tool output by default - Added streaming preview for edit and write tools with spinner animation - Added automatic anchor derivation for normative patches when anchors not specified ### Changed - Enhanced edit and write tool renderers to show streaming content preview - Updated read tool to respect default line numbers setting - Improved normative patch anchor handling to support undefined anchors ## [6.7.0] - 2026-01-19 ### Added - Normative patch generation to canonicalize edit tool output with tool call argument rewriting for session history - Patch matching fallback variants: trimmed context, collapsed duplicates, single-line reduction, comment-prefix normalization - Extended anchor syntax: ellipsis placeholders, `top of file`/`start of file`, `@@ line N`, nested `@@` anchors, space-separated hierarchical contexts - Relaxed fuzzy threshold fallback and unique substring acceptance for context matching - Added `--no-title` flag to disable automatic session title generation - Environment variables for edit tool configuration (OMP_EDIT_VARIANT, OMP_EDIT_FUZZY, OMP_EDIT_FUZZY_THRESHOLD) - Configurable fuzzy matching threshold setting (0.85 lenient to 0.98 strict) - Apply-patch mode for edit tool (`edit.patchMode` setting) with create, update, delete, and rename operations - Added MCP tool caching for faster startup with cached tool definitions ### Changed - Patch applicator now supports normalized input, implicit context lines, and improved indentation adjustment - Patch operation schema uses 'op' instead of 'operation' and 'rename' instead of 'moveTo' - Fuzzy matching tries comment-prefix normalized matches before unicode normalization - Updated patch prompts with clearer anchor selection rules and verbatim context requirements - Changed default behavior of read tool to omit line numbers by default - Changed default edit tool mode to use apply-patch format instead of oldText/newText - Converted tool implementations from factory functions to class-based architecture - Refactored edit tool with modular patch architecture (moved from `edit/` to `patch/` module) - Enhanced patch parsing: unified diff format, Codex-style patches, nested anchors, multi-file markers - Improved fuzzy matching with multiple match tracking, ambiguity detection, and out-of-order hunk processing - Better diff rendering: smarter truncation, optional line numbers, trailing newline preservation - Improved error messages with hierarchical context display using `>` separator - Centralized output sanitization in streaming-output module - Enhanced MCP startup with deferred tool loading and cached fallback ### Fixed - Patch application handles repeated context blocks, preserves original indentation on fuzzy match - Ambiguous context matching resolves duplicates using adjacent @@ anchor positioning - Patch parser handles bare \*\*\* terminators, model hallucination markers, line hint ranges - Function context matching handles signatures with and without empty parentheses - Fixed session title generation to respect OMP_NO_TITLE environment variable - Fixed Python module discovery to use import.meta.dir for ES module compatibility - Fixed LSP writethrough batching to flush when delete operations complete a batch - Fixed line number validation, BOM detection, and trailing newline preservation in patches - Fixed hierarchical context matching and space-separated anchor parsing - Fixed fuzzy matching to avoid infinite loops when `allowFuzzy` is disabled - Fixed tool completion logic to only mark tools as complete when streaming is not aborted or in error state - Fixed MCP tool path formatting to correctly display provider information ## [6.2.0] - 2026-01-19 ### Changed - Improved LSP batching to coalesce formatting and diagnostics for parallel edits - Updated edit and write tools to support batched LSP operations ### Fixed - Coalesced LSP formatting/diagnostics for parallel edits so only the final write triggers LSP across touched files ## [6.1.0] - 2026-01-19 ### Added - Added lspmux integration for LSP server multiplexing to reduce startup time and memory usage - Added LSP tool proxy support for subagent workers - Updated LSP status command to show lspmux connection state - Added maxdepth and mindepth parameters to find function for depth-controlled file search - Added counter function to count occurrences and sort by frequency - Added basenames function to extract base names from paths ### Changed - Simplified rust-analyzer default configuration by removing custom initOptions and settings ## [6.0.0] - 2026-01-19 ### Added - Added Cursor and OpenAI Codex OAuth providers - Added Windows installer bash shell auto-configuration - Added dedicated TTSR settings tab (separated from Voice/TTS) ### Fixed - Fixed TTSR abbreviation expansion from TTSR to Time Traveling Stream Rules ## [5.8.0] - 2026-01-19 ### Changed - Updated WASM loading to use streaming for development environments with base64 fallback - Added scripts directory to published package files ## [5.7.68] - 2026-01-18 ### Changed - Updated WASM loading to use base64-encoded WASM for better compatibility with compiled binaries ### Fixed - Fixed WASM loading issues in compiled binary builds ## [5.7.67] - 2026-01-18 ### Changed - Replaced external photon-node dependency with vendored WebAssembly implementation - Updated image processing to use local photon library for better performance ## [5.6.70] - 2026-01-18 ### Added - Added support for loading Python prelude extension modules from user and project directories - Added automatic discovery of Python modules from `.omp/modules` and `.pi/modules` directories - Added prioritized module loading with project-level modules overriding user-level modules ## [5.6.7] - 2026-01-18 ### Added - Added Python shared gateway setting to enable resource-efficient kernel reuse across sessions - Added Python tool cancellation support with proper timeout and cleanup handling - Added enhanced Python prelude helpers including file operations, text processing, and Git utilities - Added Python tool documentation rendering with categorized helper functions - Added session-scoped Python kernel isolation with workdir-aware session IDs - Added structured status events for Python prelude functions with TUI rendering - Added status event display system with operation icons and formatted descriptions - Added support for rich output using IPython.display.display() in Python tool - Added setup subcommand to install dependencies for optional features - Added Python setup component to install Jupyter kernel dependencies - Added setup command help with component and option documentation - Added Python tool dependency check in help output - Added file locking mechanism for shared Python gateway to prevent race conditions - Added Python gateway status monitoring with URL, PID, client count, and uptime information - Added comprehensive Git helpers to Python prelude including status, diff, log, show, branch, and file operations - Added line-based operations to Python prelude including line extraction, deletion, insertion, and pattern matching - Added automatic categorization system for Python prelude functions with discoverable documentation - Added enhanced `/status` command display showing Python gateway, LSP servers, and MCP server connections - Added shared Python gateway coordinator for resource-efficient kernel management across sessions - Added Python shared gateway setting with session-scoped kernel reuse and fallback behavior - Added automatic idle shutdown for shared Python gateway after 30 seconds of inactivity - Added environment filtering for shared Python gateway to exclude sensitive API keys - Added virtual environment detection and automatic PATH configuration for Python gateway - Added IPython-backed Python tool with streaming output, image/JSON rendering, and Jupyter kernel gateway integration - Added Python prelude with 30+ shell-like utility functions for file operations - Added Python tool exposure settings with session-scoped kernel reuse and fallback behavior - Added streaming output system with automatic spill-to-disk for large outputs - Added extension input interception with source metadata and command argument completion - Added extension command context `compact()` helper plus context usage accessors - Added ExtensionAPI `setLabel()` for extension and entry labels - Added startup quiet setting to suppress welcome screen and startup messages - Added support for auto-discovering APPEND_SYSTEM.md files - Added support for piped input in non-interactive mode (auto-print mode) - Added global session listing across all project directories with enhanced search metadata - Added session fork prompt when resolving sessions from other projects - Added key hint formatting utilities plus public exports for getShellConfig/getAgentDir/VERSION - Added bash tool timeout display in tool output - Added fuzzy text normalization for improved edit diff matching - Added $@ argument slicing syntax in prompt templates - Added configurable keybindings for expand tools and dequeue actions - Added process title update on CLI startup ### Changed - Updated Python tool description to display categorized helper functions with improved formatting - Enhanced Python kernel startup to use shared gateway by default for better resource utilization - Improved Python prelude functions to emit structured status events instead of text output - Updated agent prompts to use bash tool instead of exec for git operations - Changed default Python tool mode from ipy-only to both to enable shell execution - Enhanced Python gateway coordination with Windows environment support and stale process cleanup - Updated Python prelude functions to emit structured status events instead of text output - Enhanced Python tool renderer to display status events alongside output - Improved Python tool output formatting with status event integration - Improved shared Python gateway coordination with environment validation and stale process cleanup - Updated Python prelude to rename `bash()` function to `sh()` for consistency - Changed default Python tool mode from "ipy-only" to "both" to enable both IPython and shell execution - Enhanced Python gateway metadata tracking to include Python path and virtual environment information - Improved Python kernel startup to use shared gateway by default for better resource utilization - Updated Python tool to support proxy execution mode for worker processes - Enhanced Python kernel availability checking with faster validation - Optimized Python environment warming to avoid blocking during tool initialization - Reorganized settings interface into behavior, tools, display, voice, status, lsp, and exa tabs - Migrated environment variables from PI* to OMP* prefix with automatic migration - Updated model selector to use TabBar component for provider navigation - Changed role badges to inverted style with colored backgrounds - Added support for /models command alias in addition to /model - Improved error retry detection to include fetch failures - Enhanced session selector search and overflow handling - Updated skill command execution to include skill path metadata - Surfaced loaded prompt templates during initialization - Updated compaction summarization to use serialized prompt text - Cleaned up Python prelude `sh()` and `run()` output to only show stdout/stderr without noisy metadata ### Fixed - Fixed Python kernel cancellation handling and WebSocket cleanup for in-flight executions - Fixed Python tool session scoping to include workdir and honor sharedGateway settings - Fixed gist sharing output draining to avoid truncated URLs - Fixed streaming output byte accounting and UTF-8 decoder flushing - Fixed Python prelude integration tests to detect virtual environments and cover helper exports - Fixed Python kernel cancellation/timeout handling and WebSocket close cleanup for in-flight executions - Fixed Python output byte accounting and UTF-8 decoder flushing in streaming output - Fixed shared Python gateway coordination (Windows env allowlist, lock staleness, refcount recovery) - Fixed Python tool session scoping to include workdir and honor sharedGateway settings - Fixed subagent Python proxy session isolation and cancellation/timeout propagation - Fixed print-mode cleanup to dispose Python sessions before exit - Fixed gist share output draining to avoid truncated URLs - Fixed explore agent tool list to use bash for git operations - Fixed Python prelude integration tests to detect venv-only Python and cover helper exports ### Security - Enhanced Python gateway environment filtering to exclude sensitive API keys and Windows system paths ## [5.5.0] - 2026-01-18 ### Changed - Updated task execution guidelines to improve prompt framing and parallelization instructions ## [5.4.2] - 2026-01-16 ### Changed - Updated model resolution to accept pre-serialized settings for better performance - Improved system prompt guidance for position-addressed vs content-addressed file edits - Enhanced edit tool documentation with clear use cases for bash alternatives ## [5.3.0] - 2026-01-15 ### Changed - Expanded bash tool guidance to explicitly list appropriate use cases including file operations, build commands, and process management ## [5.2.1] - 2026-01-14 ### Fixed - Fixed stale diagnostic results by tracking diagnostic versions before file sync operations - Fixed race condition where LSP diagnostics could return outdated results after file modifications ## [5.2.0] - 2026-01-14 ### Added - Added `withLines` parameter to read tool for optional line number output (default: true, cat -n format) ### Changed - Changed find/grep/ls tool output to render inline without background box for cleaner visual flow ### Fixed - Fixed task tool abort to return partial results instead of failing (completed tasks preserved, cancelled tasks shown as skipped) - Fixed TUI crash when bash output metadata lines exceed terminal width on narrow terminals - Fixed find tool not matching `**/filename` patterns (was incorrectly using `--full-path` for glob depth wildcards) ## [5.1.1] - 2026-01-14 ### Fixed - Fixed clipboard image paste getting stuck on Wayland when no image is present (was falling back to X11 and timing out) ## [5.1.0] - 2026-01-14 ### Changed - Updated light theme colors for WCAG AA compliance (4.5:1 contrast against white background) - Changed dequeue hint text from "restore" to "edit all queued messages" ### Fixed - Fixed session selector staying open when current folder has no sessions (shows hint to press Tab) - Fixed print mode JSON output to emit session header at start - Fixed "database is locked" SQLite errors when running subagents by serializing settings to workers instead of opening the database - Fixed `/new` command to create a new session file (previously reused the same file when `--session` was specified) - Fixed session selector page up/down navigation ## [5.0.1] - 2026-01-12 ### Changed - Replaced wasm-vips with Photon for more stable WASM image processing - Added graceful fallback to original images when image resizing fails - Added error handling for image conversion failures in interactive mode to prevent crashes - Replace wasm-vips with Photon for more stable WASM image processing (fixes worker thread crashes) ## [5.0.0] - 2026-01-12 ### Added - Implemented `xhigh` thinking level for Anthropic models with increased reasoning limits ## [4.8.3] - 2026-01-12 ### Changed - Replace sharp with wasm-vips for cross-platform image processing without native dependencies ## [4.8.0] - 2026-01-12 ### Fixed - Move `sharp` to optional dependencies with all platform binaries to fix arm64 runtime errors ## [4.7.0] - 2026-01-12 ### Added - Add `omp config` subcommand for managing settings (`list`, `get`, `set`, `reset`, `path`) - Add `todoCompletion` setting to warn agent when it stops with incomplete todos (up to 3 reminders) - Add multi-part questions support to `ask` tool via `questions` array parameter ### Changed - Updated multi-select cursor behavior in `ask` tool to stay on the toggled option instead of jumping to top - Single-file reads now render inline (e.g., `Read AGENTS.md:23`) instead of tree structure ### Fixed - Subagent model resolution now respects explicit provider prefix (e.g., `zai/glm-4.7` no longer matches `cerebras/zai-glm-4.7`) - Auto-compaction now skips to next model candidate when retry delay exceeds 30 seconds ## [4.6.0] - 2026-01-12 ### Added - Add `/skill:name` slash commands for quick skill access (toggle via `skills.enableSkillCommands` setting) - Add `cwd` to SessionInfo for session list display - Add custom summarization instructions option in tree selector - Add Alt+Up (dequeue) to restore all queued messages at once - Add `shutdownRequested` and `checkShutdownRequested()` for extension-initiated shutdown ### Fixed - Component `invalidate()` now properly rebuilds content on theme changes - Force full re-render after returning from external editor ## [4.4.8] - 2026-01-12 ### Changed - Changed review finding priority format from numeric (0-3) to string labels (P0-P3) for clearer severity indication - Replaced Type.Union with Type.Literal patterns with StringEnum helper across tool schemas for cleaner enum definitions ## [4.4.5] - 2026-01-11 ### Changed - Removed `format: "date-time"` from timestamp type conversion in JTD to JSON Schema transformation - Reorganized system prompt to display context, environment, and tools sections before discipline guidelines - Updated system prompt to show file paths more clearly in output - Improved YAML frontmatter parsing with better error messages including source file information ### Fixed - Fixed frontmatter parsing to properly report source location when YAML parsing fails ## [4.4.4] - 2026-01-11 ### Added - Added `todo_write` tool for creating and managing structured task lists during coding sessions - Added persistent todo panel above the editor that displays task progress - Added `Ctrl+T` keybinding to toggle todo list expansion - Added grouped display for consecutive Read tool calls, showing multiple file reads in a compact tree view - Added `todo_write` tool and persistent todo panel above the editor ### Changed - Changed `Ctrl+Enter` to insert a newline when not streaming (previously `Alt+Enter`) - Changed `Ctrl+T` from toggling thinking block visibility to toggling todo list expansion - Changed system prompt to use more direct, field-oriented language with emphasis on verification and assumptions - Changed temporary model selector keybinding from Ctrl+Y to Alt+P - Changed expand hint text from "Ctrl+O to expand" to "Ctrl+O for more" - Changed Read tool result display to hide content by default, showing only file path and status - Changed `Ctrl+T` to toggle todo panel expansion ### Removed - Removed `yaml` package dependency in favor of Bun's built-in YAML parser ### Fixed - Fixed Alt+Enter to insert a newline when not streaming, instead of submitting the message - Fixed Alt+Enter inserting a new line when not streaming instead of submitting a message - Fixed Cursor provider to avoid advertising the Edit tool, relying on full-file Write operations instead - Fixed prompt template loading to strip leading HTML comment metadata blocks ## [4.3.2] - 2026-01-11 ### Changed - Increased default bash output preview from 5 to 10 lines when collapsed - Updated expanded bash output view to show full untruncated output when available ## [4.3.1] - 2026-01-11 ### Changed - Expanded system prompt with defensive reasoning guidance and assumption checks - Allowed agent frontmatter to override subagent thinking level, clamped to model capabilities ### Fixed - Ensured reviewer agents use structured output schemas and include reported findings in task outputs ## [4.3.0] - 2026-01-11 ### Added - Added Cursor provider support with browser-based OAuth authentication - Added default model configuration for Cursor provider (claude-sonnet-4-5) - Added execution bridge for Cursor tool calls including read, ls, grep, write, delete, shell, diagnostics, and MCP operations ### Fixed - Improved fuzzy matching accuracy for edit operations when file and target have inconsistent indentation patterns ## [4.2.3] - 2026-01-11 ### Changed - Changed default for `hidden` option in find tool from `false` to `true`, now including hidden files by default ### Fixed - Fixed serialized auth storage initialization so OAuth refreshes in subagents don't crash ## [4.2.2] - 2026-01-11 ### Added - Added persistent cache storage for Codex usage data that survives application restarts - Added `--no-lsp` to disable LSP tools, formatting, diagnostics, and warmup for a session ### Changed - Changed `SettingsManager.create()` to be async, requiring `await` when creating settings managers - Changed `loadSettings()` to be async, requiring `await` when loading settings - Changed `discoverSkills()` to be async, requiring `await` when discovering skills - Changed `loadSlashCommands()` to be async, requiring `await` when loading slash commands - Changed `buildSystemPrompt()` to be async, requiring `await` when building system prompts - Changed `loadSkills()` to be async, requiring `await` when loading skills - Changed `loadProjectContextFiles()` to be async, requiring `await` when loading context files - Changed `getShellConfig()` to be async, requiring `await` when getting shell configuration - Changed capability provider `load()` methods to be async-only, removing synchronous `loadSync` API - Updated `plan` agent with enhanced structured planning process, parallel exploration via `explore` agent spawning, and improved output format with examples - Removed `planner` agent command template, consolidating planning functionality into the `plan` agent ## [4.2.1] - 2026-01-11 ### Added - Added automatic discovery and listing of AGENTS.md files in the system prompt, providing agents with an authoritative list of project-specific instruction files without runtime searching - Added `planner` built-in agent for comprehensive implementation planning with slow model ### Changed - Refactored skill discovery to use unified `loadSkillsFromDir` helper across all providers, reducing code duplication - Updated skill discovery to scan only `skills/*/SKILL.md` entries instead of recursive walks in Codex provider - Added guidance to Task tool documentation to isolate file scopes when assigning tasks to prevent agent conflicts - Updated Task tool documentation to emphasize that subagents have no access to conversation history and require all relevant context to be explicitly passed - Revised task agent prompt to clarify that subagents have full tool access and can make file edits, run commands, and create files - OpenAI Codex: updated to use bundled system prompt from upstream - Changed `complete` tool to make `data` parameter optional when aborting, while still requiring it for successful completions - Skills discovery now scans only `skills/*/SKILL.md` entries instead of recursive walks ### Removed - Removed `architect-plan`, `implement`, and `implement-with-critic` built-in agent commands ### Fixed - Fixed editor border rendering glitch after canceling slash command autocomplete - Fixed login/logout credential path message to reference agent.db ## [4.2.0] - 2026-01-10 ### Added - Added `/dump` slash command to copy the full session transcript to the clipboard - Added automatic Nerd Fonts detection for terminals like iTerm, WezTerm, Kitty, Ghostty, and Alacritty to set appropriate symbol preset - Added `NERD_FONTS` environment variable override (`1` or `0`) to manually control Nerd Fonts symbol preset - Added Handlebars templating engine for prompt template rendering with `{{arg}}` helper for positional arguments - Added support for custom share scripts at ~/.omp/agent/share.ts to replace default GitHub Gist sharing ### Changed - Changed rules system to use `read` tool for loading rule content instead of dedicated `rulebook` tool - Separated `/export` and `/dump` commands—`/export` now only exports to HTML file, while `/dump` copies session transcript to clipboard - Updated `/export` command to no longer accept `--copy` flag (use `/dump` instead) - Changed prompt template rendering to use Handlebars instead of simple string replacement - Updated prompt layout optimization to normalize indentation and collapse excessive blank lines - Changed auth migration to merge credentials per-provider instead of skipping when any credentials exist in database - Migrated settings and auth credential storage from JSON files to SQLite database (agent.db) - Updated credential migration message to reference agent.db instead of auth.json - Renamed Glob tool references to Find tool throughout prompts and documentation - Updated project context formatting to use XML-style tags for clearer structure - Refined bash tool guidance to prefer dedicated tools (read/grep/find/ls) over bash for file operations - Updated system prompt with clearer tone guidelines emphasizing directness and conciseness - Revised workflow instructions to require explicit planning for non-trivial tasks - Enhanced verification guidance to prefer external feedback loops like tests and linters - Added explicit alignment and prohibited behavior sections to improve response quality ### Removed - Removed `rulebook` tool - rules are now loaded via the `read` tool instead of a dedicated tool ### Fixed - Fixed message submission lag caused by synchronous history database writes by deferring DB operations with setImmediate ### Security - Hardened file permissions on agent database directory (700) and database file (600) to restrict access ## [4.1.0] - 2026-01-10 ### Added - Added persistent prompt history with SQLite-backed storage and Ctrl+R search ### Fixed - Fixed credential blocking logic to correctly check for remaining available credentials instead of always returning true ## [4.0.1] - 2026-01-10 ### Added - Added usage limit error detection to enable automatic credential switching when Codex accounts hit rate limits - Added Codex usage API integration to proactively check account limits before credential selection - Added credential backoff tracking to temporarily skip rate-limited accounts during selection - Multi-credential usage-aware selection for OpenAI Codex OAuth accounts with automatic fallback when rate limits are reached - Consistent session-to-credential hashing (FNV-1a) for stable credential assignment across sessions - Codex usage API integration to detect and cache rate limit status per account - Automatic mid-session credential switching when usage limits are hit ### Changed - Changed credential selection to use deterministic FNV-1a hashing for consistent session-to-credential mapping - Changed OAuth credential resolution to try credentials in priority order, skipping blocked ones ## [4.0.0] - 2026-01-10 ### Added - Exported `InteractiveModeOptions` type for programmatic SDK usage - Exported additional UI components for extensions: `ArminComponent`, `AssistantMessageComponent`, `BashExecutionComponent`, `BranchSummaryMessageComponent`, `CompactionSummaryMessageComponent`, `CustomEditor`, `CustomMessageComponent`, `FooterComponent`, `ExtensionEditorComponent`, `ExtensionInputComponent`, `ExtensionSelectorComponent`, `LoginDialogComponent`, `ModelSelectorComponent`, `OAuthSelectorComponent`, `SessionSelectorComponent`, `SettingsSelectorComponent`, `ShowImagesSelectorComponent`, `ThemeSelectorComponent`, `ThinkingSelectorComponent`, `ToolExecutionComponent`, `TreeSelectorComponent`, `UserMessageComponent`, `UserMessageSelectorComponent` - Exported `renderDiff`, `truncateToVisualLines`, and related types for extension use - `setFooter()` and `setHeader()` methods on `ExtensionUIContext` for custom footer/header components - `setEditorComponent()` method on `ExtensionUIContext` for custom editor components - `supportsUsageInStreaming` model config option to control `stream_options: { include_usage: true }` behavior - Terminal setup documentation for Kitty keyboard protocol configuration (Ghostty, wezterm, Windows Terminal) - Documentation for paid Cloud Code Assist subscriptions via `GOOGLE_CLOUD_PROJECT` env var - Environment variables reference section in README - `--no-tools` flag to disable all built-in tools, enabling extension-only setups - `--no-extensions` flag to disable extension discovery while still allowing explicit `-e` paths - `blockImages` setting to prevent images from being sent to LLM providers - `thinkingBudgets` setting to customize token budgets per thinking level - `PI_SKIP_VERSION_CHECK` environment variable to disable new version notifications at startup - Anthropic OAuth support via `/login` to authenticate with Claude Pro/Max subscription - OpenCode Zen provider support via `OPENCODE_API_KEY` env var and `opencode/` syntax - Session picker (`pi -r`) and `--session` flag support searching/resuming by session ID (UUID prefix) - Session ID forwarding to LLM providers for session-based caching (used by OpenAI Codex for prompt caching) - `dequeue` keybinding (`Alt+Up`) to restore queued steering/follow-up messages back into the editor - Pluggable operations for built-in tools enabling remote execution via SSH or other transports (`ReadOperations`, `WriteOperations`, `EditOperations`, `BashOperations`, `LsOperations`, `GrepOperations`, `FindOperations`) - `/model ` pre-filters the model selector or auto-selects on exact match; use `provider/model` syntax to disambiguate - Managed binaries directory (`~/.omp/bin/`) for fd and rg tools - `FooterDataProvider` for custom footers with `getGitBranch()`, `getExtensionStatuses()`, and `onBranchChange()` - `ctx.ui.custom()` accepts `{ overlay: true }` option for floating modal components - `ctx.ui.getAllThemes()`, `ctx.ui.getTheme(name)`, `ctx.ui.setTheme(name | Theme)` for theme management - `setActiveTools()` for dynamic tool management - `setModel()`, `getThinkingLevel()`, `setThinkingLevel()` methods for runtime model and thinking level changes - `ctx.shutdown()` for requesting graceful shutdown - `pi.sendUserMessage()` for sending user messages from extensions - Extension UI dialogs (`select`, `confirm`, `input`) support `timeout` option with live countdown display - Extension UI dialogs accept optional `AbortSignal` to programmatically dismiss dialogs - Async extension factories for dynamic imports and lazy-loaded dependencies - `user_bash` event for intercepting user `!`/`!!` commands - Built-in renderers used automatically for tool overrides without custom `renderCall`/`renderResult` - `InteractiveMode`, `runPrintMode()`, `runRpcMode()` exported for building custom run modes - Copy link button on messages for deep linking to specific entries - Codex injection info display showing system prompt modifications - URL parameter support for `leafId` and `targetId` deep linking - Wayland clipboard support for `/copy` command using wl-copy with xclip/xsel fallback ### Changed - Bash tool output truncation now recalculates on terminal resize instead of using cached width - Web search tool headers updated to match Claude Code client format for better compatibility - `discoverSkills()` return type documented as `{ skills: Skill[], warnings: SkillWarning[] }` in SDK docs - Default model for OpenCode provider changed from `claude-sonnet-4-5` to `claude-opus-4-5` - Terminal color mode detection defaults to truecolor for modern terminals instead of 256color - System prompt restructured with XML tags and clearer instructions format - `before_agent_start` event receives `systemPrompt` in the event object and returns `systemPrompt` (full replacement) instead of `systemPromptAppend` - `discoverSkills()` returns `{ skills: Skill[], warnings: SkillWarning[] }` instead of `Skill[]` - `ctx.ui.custom()` factory signature changed from `(tui, theme, done)` to `(tui, theme, keybindings, done)` - `ExtensionRunner.initialize()` signature changed from options object to positional params `(actions, contextActions, commandContextActions?, uiContext?)` ### Fixed - Wayland clipboard copy (`wl-copy`) no longer blocks when the process doesn't exit promptly - Empty `--tools` flag now correctly enables all built-in tools instead of disabling them - Bash tool handles spawn errors gracefully instead of crashing the agent - Components properly rebuild their content on theme change via `invalidate()` override - `setTheme()` triggers a full rerender so previously rendered components update with new theme colors - Session ID updates correctly when branching sessions - External edits to `settings.json` while pi is running are preserved when pi saves settings - Default thinking level from settings applies correctly when `enabledModels` is configured - LM Studio compatibility for OpenAI Responses tool strict mapping - Symlinked directories in `prompts/` folders are followed when loading prompt templates - String `systemPrompt` in `createAgentSession()` works as a full replacement instead of having context files and skills appended - Update notification for bun binary installs shows release download URL instead of npm command - ESC key works during "Working..." state after auto-retry - Abort messages show correct retry attempt count - Antigravity provider returning 429 errors despite available quota - Malformed thinking text in Gemini/Antigravity responses where thinking content appeared as regular text - `--no-skills` flag correctly prevents skills from loading in interactive mode - Overflow-based compaction skips if error came from a different model or was already handled - OpenAI Codex context window reduced from 400k to 272k tokens to match Codex CLI defaults - Context overflow detection recognizes `context_length_exceeded` errors - Key presses no longer dropped when input is batched over SSH - Clipboard image support works on Alpine Linux and other musl-based distros - Queued steering/follow-up messages no longer wipe unsent editor input - OAuth token refresh failure no longer crashes app at startup - Status bar shows correct git branch when running in a git worktree - Ctrl+V clipboard image paste works on Wayland sessions - Extension directories in `settings.json` respect `package.json` manifests ## [3.37.0] - 2026-01-10 ### Changed - Improved bash command display to show relative paths for working directories within the current directory, and hide redundant `cd` prefix when working directory matches current directory ## [3.36.0] - 2026-01-10 ### Added - Added `calc` tool for basic mathematical calculations with support for arithmetic operators, parentheses, and hex/binary/octal literals - Added support for multiple API credentials per provider with round-robin distribution across sessions - Added file locking for auth.json to prevent concurrent write corruption - Added clickable OAuth login URL display in terminal - Added `workdir` parameter to bash tool to execute commands in a specific directory without requiring `cd` commands ### Changed - Updated bash tool rendering to display working directory context when `workdir` parameter is used ### Fixed - Fixed completion notification to only send when interactive mode is in foreground - Improved completion notification message to include session title when available ## [3.35.0] - 2026-01-09 ### Added - Added retry logic with exponential backoff for auto-compaction failures - Added fallback to alternative models when auto-compaction fails with the primary model - Added support for `pi/` model aliases in task tool (e.g., `pi/slow`, `pi/default`) - Added visual cycle indicator when switching between role models showing available roles - Added automatic model inheritance for subtasks when parent uses default model - Added `--` separator in grep tool to prevent pattern interpretation as flags ### Changed - Changed role model cycling to remember last selected role instead of matching current model - Changed edit tool to merge call and result displays into single block - Changed model override behavior to persist in settings when explicitly set via CLI ### Fixed - Fixed retry-after parsing from error messages supporting multiple header formats (retry-after, retry-after-ms, x-ratelimit-reset) - Fixed image attachments being dropped when steering/follow-up messages are queued during streaming - Fixed image auto-resize not applying to clipboard images before sending - Fixed clipboard image attachments being dropped when steering/follow-up messages are queued while streaming - Fixed clipboard image attachments ignoring the auto-resize setting before sending ## [3.34.0] - 2026-01-09 ### Added - Added caching for system environment detection to improve startup performance - Added disk usage information to automatic environment detection in system prompt - Added `compat` option for SSH hosts to wrap commands in a POSIX shell on Windows systems - Added automatic working directory handling for PowerShell and cmd.exe on Windows SSH hosts - Added automatic environment detection to system prompt including OS, distro, kernel, CPU, GPU, shell, terminal, desktop environment, and window manager information - Added SSH tool with project ssh.json/.ssh.json discovery, persistent connections, and optional sshfs mounts - Added SSH host OS/shell detection with compat mode and persistent host info cache ### Changed - Changed GPU detection on Linux to prioritize discrete GPUs (NVIDIA, AMD) over integrated graphics and skip server management adapters - Changed SSH host info cache to use versioned format for automatic refresh on schema changes - Changed SSH compat shell detection to actively probe for bash/sh availability on Windows hosts - Changed SSH tool description to show detected shell type and available commands per host ## [3.33.0] - 2026-01-08 ### Added - Added `env` support in `settings.json` for automatically setting environment variables on startup - Added environment variable management methods to SettingsManager (get/set/clear) ### Fixed - Fixed bash output previews to recompute on resize, preventing TUI line width overflow crashes - Fixed session title generation to retry alternate smol models when the primary model errors or is rate-limited - Fixed file mentions to resolve extensionless paths and directories, using read tool truncation limits for injected content - Fixed interactive UI to show auto-read file mention indicators - Fixed task tool tree rendering to use consistent tree connectors for progress, findings, and results - Fixed last-branch tree connector symbol in the TUI - Fixed output tool previews to use compact JSON when outputs are formatted with leading braces ## [3.32.0] - 2026-01-08 ### Added - Added progress indicator when starting LSP servers at session startup - Added bundled `/init` slash command available by default ### Changed - Changed LSP server warmup to use a 5-second timeout, falling back to lazy initialization for slow servers ### Fixed - Fixed Task tool subagent model selection to inherit explicit CLI `--model` overrides ## [3.31.0] - 2026-01-08 ### Added - Added temporary model selection: `Ctrl+Y` opens model selector for session-only model switching (not persisted to settings) - Added `setModelTemporary()` method to AgentSession for ephemeral model changes - Added empty Enter to flush queued messages: pressing Enter with empty editor while streaming aborts current stream - Added auto-chdir to temp directories when starting in home unless `--allow-home` is set - Added upfront diff parsing and filtering for code review command to exclude lock files, generated code, and binary assets ### Fixed - Fixed auto-chdir to only use existing directories and fall back to `tmpdir()` - Added automatic reviewer agent count recommendation based on diff weight and file count - Added file grouping guidance for parallel review distribution across multiple agents - Added diff preview mode for large changesets that exceed size thresholds - Added in-memory session storage implementation for testing and ephemeral sessions - Added `createToolUIKit` helper to consolidate common UI formatting utilities across tool renderers - Added configurable bash interceptor rules via `bashInterceptor.patterns` setting for custom command blocking - Added `bashInterceptor.simpleLs` setting to control interception of bare ls commands - Added LSP server configuration via external JSON defaults file for easier customization - Added abort signal propagation to web scrapers for improved cancellation handling - Added `diagnosticsVersion` tracking to LSP client for more reliable diagnostic polling - Added 80+ specialized web scrapers for structured content extraction from popular sites including GitHub, GitLab, npm, PyPI, crates.io, Wikipedia, YouTube, Stack Overflow, Hacker News, Reddit, arXiv, PubMed, and many more - Added site-specific API integrations for package registries (npm, PyPI, crates.io, Hex, Hackage, NuGet, Maven, RubyGems, Packagist, pub.dev, Go packages) - Added scrapers for social platforms (Mastodon, Bluesky, Lemmy, Lobsters, Dev.to, Discourse) - Added scrapers for academic sources (arXiv, bioRxiv, PubMed, Semantic Scholar, ORCID, CrossRef, IACR) - Added scrapers for security databases (NVD, OSV, CISA KEV) - Added scrapers for documentation sites (MDN, Read the Docs, RFC Editor, W3C, SPDX, tldr, cheat.sh) - Added scrapers for media platforms (YouTube, Vimeo, Spotify, Discogs, MusicBrainz) - Added scrapers for AI/ML platforms (Hugging Face, Ollama) - Added scrapers for app stores and marketplaces (VS Code Marketplace, JetBrains Marketplace, Firefox Add-ons, Open VSX, Flathub, F-Droid, Snapcraft) - Added scrapers for business data (SEC EDGAR, OpenCorporates, CoinGecko) - Added scrapers for reference sources (Wikipedia, Wikidata, OpenLibrary, Choose a License) ### Changed - Changed `Ctrl+P` to cycle through role models (slow → default → smol) instead of all available models - Changed `Shift+Ctrl+P` to cycle role models temporarily (not persisted) - Changed Extension Control Center to scale with terminal height instead of fixed 25-line limit - Changed review command to parse git diff upfront and provide structured context to reviewer agents - Changed session persistence to use structured logging instead of console.error for persistence failures - Changed find tool to use fd command for .gitignore discovery instead of Bun.Glob for better abort handling - Changed LSP config loading to only mark overrides when servers are actually defined - Changed task tool to require explicit task `id` field instead of auto-generating names from agent type - Changed grep and find tools to use native Bun file APIs instead of Node.js fs module for improved performance - Changed YouTube scraper to use async command execution with proper stream handling - Improved rust-analyzer diagnostic polling to use version-based stability detection instead of time-based delays - Changed theme icons for extension types to use Unicode symbols (✧, ⚒) instead of text abbreviations (SK, TL, MCP) - Changed task tool to use short CamelCase task IDs instead of agent-based naming (e.g., 'SessionStore' instead of 'explore_0') - Changed task tool to accept single `agent` parameter at top level instead of per-task agent specification - Changed reviewer agent to use `complete` tool instead of `submit_review` for finishing reviews - Changed theme icons for extensions to use Unicode symbols instead of text abbreviations - Changed LSP file type matching to support exact filename matches in addition to extensions - Improved rust-analyzer diagnostic polling to use version-based stability detection - Refactored web-fetch tool to use modular scraper architecture for improved maintainability ### Removed - Removed `submit_review` tool - reviewers now finish via `complete` tool with structured output ### Fixed - Fixed session persistence to call fsync before renaming temp file for durability - Fixed duplicate persistence error logging by tracking whether error was already reported - Fixed byte counting in task output truncation to correctly handle multi-byte Unicode characters - Fixed parallel task execution to propagate abort signals and fail fast on first error - Fixed task worker abort handling to properly clean up on cancellation - Fixed parallel task execution to fail fast on first error instead of waiting for all workers - Fixed byte counting in task output truncation to handle multi-byte Unicode characters correctly ## [3.30.0] - 2026-01-07 ### Added - Added environment variable configuration for task limits: `OMP_TASK_MAX_PARALLEL`, `OMP_TASK_MAX_CONCURRENCY`, `OMP_TASK_MAX_OUTPUT_BYTES`, `OMP_TASK_MAX_OUTPUT_LINES`, and `OMP_TASK_MAX_AGENTS_IN_DESCRIPTION` - Added specialized web-fetch handlers for 50+ platforms including GitHub, GitLab, npm, PyPI, crates.io, Stack Overflow, Wikipedia, arXiv, PubMed, Hacker News, Reddit, Mastodon, Bluesky, and many more - Added automatic yt-dlp installation for YouTube transcript extraction - Added YouTube video support with automatic transcript extraction via yt-dlp ### Changed - Changed task executor to gracefully handle worker termination with proper cleanup and timeout handling ### Fixed - Fixed Lobsters front page handler to use correct API endpoint (`/hottest.json` instead of invalid `.json`) - Fixed task worker error handling to prevent hanging on worker crashes, uncaught errors, and unhandled rejections - Fixed double-stringified JSON output from subagents being returned as escaped strings instead of parsed objects - Fixed markitdown tool installation to use automatic tool installer instead of requiring manual installation ## [3.25.0] - 2026-01-07 ### Added - Added `complete` tool for structured subagent output with JSON schema validation - Added `query` parameter to output tool for jq-like JSON querying - Added `output_schema` parameter to task tool for structured subagent completion - Added JTD (JSON Type Definition) to JSON Schema converter for schema flexibility - Added memorable two-word task identifiers (e.g., SwiftFalcon) for better task tracking ### Changed - Changed task output IDs from `agent_index` format to memorable names for easier reference - Changed subagent completion flow to require explicit `complete` tool call with retry reminders - Simplified worker agent system prompt to be more concise and focused ## [3.24.0] - 2026-01-07 ### Added - Added `ToolSession` interface to unify tool creation with session context including cwd, UI availability, and rulebook rules - Added Bun Worker-based execution for subagent tasks, replacing subprocess spawning for improved performance and event streaming - Added `toolNames` option to filter which built-in tools are included in agent sessions - Added `BUILTIN_TOOLS` registry constant for programmatic access to available tool factories - Added unit tests for `createTools` function covering tool filtering and conditional tool creation ### Changed - Changed subagent execution from spawning separate `omp` processes to running in Bun Workers with direct event streaming - Changed tool factories to accept `ToolSession` parameter instead of separate cwd and options arguments - Changed `createTools` to return tools as a Map and support conditional tool creation based on session context - Changed system prompt builder to dynamically generate tool descriptions from the tool registry - Changed task tool description to be generated from a template with dynamic agent list injection - Changed tool creation to use a unified `ToolSession` interface instead of separate parameters for cwd, options, and callbacks - Changed `createTools` to return tools as a Map instead of an array for consistent tool registry access - Changed system prompt builder to receive tool registry Map for dynamic tool description generation - Changed subprocess usage tracking to accumulate incrementally from message_end events rather than parsing stored events after completion ### Removed - Removed `browser` embedded agent from task tool agent discovery - Removed `recursive` property from agent definitions - Removed environment variables `OMP_NO_SUBAGENTS`, `OMP_BLOCKED_AGENT`, and `OMP_SPAWNS` for subagent control - Removed pre-instantiated tool exports (`readTool`, `bashTool`, `editTool`, `writeTool`, `grepTool`, `findTool`, `lsTool`) in favor of factory functions - Removed `createCodingTools` and `createReadOnlyTools` helper functions - Removed `codingTools` and `readOnlyTools` convenience exports - Removed `wrapToolsWithExtensions` function from extensions API - Removed `hidden` property support from custom tools - Removed subagent and question custom tool examples ### Fixed - Fixed memory accumulation in task subprocess by streaming events directly to disk instead of storing in memory - Fixed session persistence to exclude transient streaming data (partialJson, jsonlEvents) that was causing unnecessary storage bloat - Fixed createTools respecting explicit tool lists instead of returning all non-hidden tools ## [3.21.0] - 2026-01-06 ### Changed - Switched from local `@oh-my-pi/pi-ai` to upstream `@oh-my-pi/pi-ai` package ### Added - Added `webSearchProvider` setting to override auto-detection priority (Exa > Perplexity > Anthropic) - Added `imageProvider` setting to override auto-detection priority (OpenRouter > Gemini) - Added `git.enabled` setting to enable/disable the structured git tool - Added `offset` and `limit` parameters to Output tool for paginated reading of large outputs - Added provider fallback chain for web search that tries all configured providers before failing - Added `WebSearchProviderError` class with HTTP status for actionable provider error messages - Added bash interceptor rule to block git commands when structured git tool is enabled - Added validation requiring `message` parameter for git commit operations (prevents interactive editor) - Added output ID hints in multi-agent Task results pointing to Output tool for full logs - Added fuzzy matching support for `all: true` mode in edit tool, enabling replacement of similar text blocks with whitespace differences - Added `all` parameter to edit tool for replacing all occurrences instead of requiring unique matches - Added OpenRouter support for image generation when `OPENROUTER_API_KEY` is set - Added ImageMagick fallback for image processing when sharp module is unavailable - Added slash commands to the extensions inspector panel for visibility and management - Added support for file-based slash commands from `commands/` directories - Added `$ARGUMENTS` placeholder for slash command argument substitution, aligning with Claude and Codex conventions ### Changed - Refactored tool renderers to be co-located with their respective tool implementations for improved code organization - Changed web search to try all configured providers in sequence with fallback before reporting errors - Changed default Anthropic web search model from `claude-sonnet-4-5-20250514` to `claude-haiku-4-5` - Changed read tool to show first 50KB of oversized lines instead of directing users to bash sed - Changed web_fetch to use `Bun.which()` instead of spawning `which`/`where` for command detection - Changed web_fetch to check Content-Length header before downloading to reject oversized files early - Changed generate_image tool to save images to temp files and report paths instead of inline base64 - Changed system prompt with tool usage guidance (ground answers with tools, minimize context, iterate on results) - Changed Task tool prompt with plan-then-execute guidance and output tool hints - Changed edit tool success message to report count when replacing multiple occurrences with `all: true` - Changed default image generation model to `gemini-3-pro-image-preview` - Changed error message for multiple occurrences to suggest using `all: true` option - Changed web_fetch tool label from `web_fetch` to `Web Fetch` for improved display - Changed argument substitution order in slash commands to process positional args ($1, $2) before wildcards ($@, $ARGUMENTS) to prevent re-substitution issues - Changed image tool name from `gemini_image` to `generate_image` with label `GenerateImage` ### Fixed - Fixed read tool markitdown truncation message using broken template string (missing `${` around format call) - Fixed web_fetch URL normalization order to run before special handlers - Fixed TUI image display for generate_image tool by sourcing images from details.images in addition to content blocks - Fixed context file preview in inspector panel to display content correctly instead of attempting async file reads - Fixed Linux ARM64 installs failing on fresh Debian when the `sharp` module is unavailable during session image compression ## [3.20.1] - 2026-01-06 ### Fixed - Fixed find tool failing to match patterns with path separators (e.g., `reports/**`) by enabling full-path matching in fd ### Changed - Changed multi-task display to show task descriptions instead of agent names when available - Changed ls tool to show relative modification times (e.g., "2d ago", "just now") for each entry ## [3.20.0] - 2026-01-06 ### Added - Added extensions API with auto-discovery (`.omp/extensions`) and `--extension`/`-e` loading for custom tools, commands, and lifecycle hooks - Added prompt templates loaded from global and project `.omp/prompts` directories with `/template` expansion in the input box - Built-in provider overrides in `models.json`: override just `baseUrl` to route a built-in provider through a proxy while keeping all its models, or define `models` to fully replace the provider - Shell commands without context contribution: use `!!command` to execute a bash command that is shown in the TUI and saved to session history but excluded from LLM context. Useful for running commands you don't want the AI to see - Added VoiceSupervisor class for realtime voice mode using OpenAI Realtime API with continuous mic streaming and semantic VAD turn detection - Added VoiceController class for steering user input and deciding presentation of assistant responses - Added echo suppression and noise floor filtering for microphone input during voice playback - Added fallback transcript handling when realtime assistant produces no tool call or audio output - Added voice progress notifications that speak partial results after 15 seconds of streaming - Added platform-specific audio tool detection with helpful installation instructions for missing tools - Added realtime voice mode using OpenAI gpt-5-realtime with continuous mic streaming, interruptible input, and supervisor-controlled spoken updates - Added `gemini_image` tool for Gemini Nano Banana image generation when `GEMINI_API_KEY` (or `GOOGLE_API_KEY`) is set - Added `description` field to task tool for displaying short user-facing summaries in progress output - Added `getApiKeyForProvider()` method to ModelRegistry for retrieving API keys by provider name - Added voice settings configuration for transcription model, TTS model, voice, and audio format - Added shared render utilities module with standardized formatting functions for truncation, byte/token/duration display, and tree rendering - Added `resolveOmpCommand()` helper to resolve subprocess command from environment or entry point - Added `/background` (or `/bg`) command to detach UI and continue agent execution in the background - Added completion notification system with configurable methods (bell, osc99, osc9, auto, off) when agent finishes - Added `completionNotification` setting to configure how the agent notifies on completion - Added `OMP_NOTIFICATIONS` environment variable to suppress notifications globally - Added `/wt` slash command for git worktree management with create, list, merge, remove, status, spawn, and parallel operations - Added worktree library with collapse strategies (simple, merge-base, rebase) for merging changes between worktrees - Added worktree session tracking for managing agent tasks across isolated worktrees - Added structured git tool with safety guards, caching, and GitHub operations - Added `cycleRoleModels()` method to cycle through configured role-based models in a fixed order with deduplication - Added language-specific file icons to LSP diagnostics output showing file locations - Added language-specific file icon to edit tool header display ### Changed - Changed voice mode toggle from Caps Lock to Ctrl+Y with auto-send on silence behavior - Changed default TTS model from gpt-4o-mini-tts to tts-1 - Changed voice mode description to reflect realtime input/output with auto-send on silence - Updated hotkeys help to show Ctrl+Y for voice mode toggle instead of Caps Lock - Voice mode now uses OpenAI Realtime (gpt-5-realtime) with Ctrl+Y toggle and auto-send on silence - Updated web search tool to support `auto` as explicit provider option for auto-detection - Standardized tool result rendering across grep, find, ls, notebook, ask, output, and web search tools with consistent tree formatting and expand hints - Updated grep and find tool output to display language-specific icons for files and folder icons for directories - Updated file listing to display language-specific icons based on file extension instead of generic file icons ### Fixed - Fixed task tool race condition where subprocess stdout events were skipped due to `resolved` flag being set before stream readers finished, causing completed tasks to display "0 tools · 0 tokens" - `/model` selector now opens instantly instead of waiting for OAuth token refresh. Token refresh is deferred until a model is actually used - Fixed cross-platform browser opening to work on Windows (via cmd /c start) and fail gracefully when unavailable ## [3.15.1] - 2026-01-05 ### Added - Added 65 new built-in color themes including dark variants (abyss, aurora, cavern, copper, cosmos, eclipse, ember, equinox, lavender, lunar, midnight, nebula, rainforest, reef, sakura, slate, solstice, starfall, swamp, taiga, terminal, tundra, twilight, volcanic), light variants (aurora-day, canyon, cirrus, coral, dawn, dunes, eucalyptus, frost, glacier, haze, honeycomb, lagoon, lavender, meadow, mint, opal, orchard, paper, prism, sand, savanna, soleil, wetland, zenith), and material themes (alabaster, amethyst, anthracite, basalt, birch, graphite, limestone, mahogany, marble, obsidian, onyx, pearl, porcelain, quartz, sandstone, titanium) ### Fixed - Fixed status line end cap rendering to properly apply background colors and use correct powerline separator characters ## [3.15.0] - 2026-01-05 ### Added - Added spinner type variants (status and activity) with distinct animation frames per symbol preset - Added animated spinner for task tool progress display during subagent execution - Added language/file type icons for read tool output with support for 35+ file types - Added async cleanup registry for graceful session flush on SIGINT, SIGTERM, and SIGHUP signals - Added subagent token usage aggregation to session statistics and task tool results - Added streaming NDJSON writer for session persistence with proper backpressure handling - Added `flush()` method to SessionManager for explicit control over pending write completion - Added `/exit` slash command to exit the application from interactive mode - Added fuzzy path matching suggestions when read tool encounters file-not-found errors, showing closest matches using Levenshtein distance - Added `status.shadowed` symbol for theme customization to properly indicate shadowed extension state - Added Biome CLI-based linter client as alternative to LSP for more reliable diagnostics - Added LinterClient interface for pluggable formatter/linter implementations - Added status line segment editor for arranging and toggling status line components - Added status line presets (default, minimal, compact, developer, balanced) for quick configuration - Added status line separator styles (powerline, powerline-thin, arrow, slash, pipe, space) - Added configurable status line segments including time, hostname, and subagent count - Added symbol customization via theme overrides for icons, separators, and glyphs - Added 30+ built-in color themes including Catppuccin, Dracula, Nord, Gruvbox, Tokyo Night, and more - Added configurable status line with customizable segments, presets, and separators - Added status line segment editor for arranging and toggling status line components - Added symbol preset setting to switch between Unicode, Nerd Font, and ASCII glyphs - Added file size limit (20MB) for image files to prevent memory issues during serialization ### Changed - Changed `isError` property in tool result events to be optional instead of required - Changed `SessionManager.open()` and `SessionManager.continueRecent()` to async methods for proper initialization - Changed session file writes to use atomic rename pattern with fsync for crash-safe persistence - Changed read tool display to show file type icons and metadata inline with path - Changed `AgentSession.dispose()` to async method that flushes pending writes before cleanup - Changed read tool result display to hide content by default with expand hint, showing only metadata until expanded - Changed diagnostics display to group messages by file with tree structure and severity icons - Changed diff stats formatting to use colored +/- indicators with slash separators - Changed session persistence to use streaming writes instead of synchronous file appends for better performance - Changed read tool to automatically redirect to ls when given a directory path instead of a file - Changed tool description prompts to be more concise with clearer usage guidelines and structured formatting - Moved tool description prompts from inline strings to external markdown files in `src/prompts/tools/` directory for better maintainability - Changed Exa web search provider from MCP protocol to direct REST API for simpler integration - Changed web search result rendering to handle malformed response data with fallback text display - Changed compaction prompts to preserve tool outputs, command results, and repository state in context summaries - Changed init prompt to include runtime/tooling preferences section and improved formatting guidelines - Changed reviewer prompt to require evidence-backed findings anchored to diff hunks with stricter suggestion block formatting - Changed system prompt to include explicit core behavior guidelines for task completion and progress updates - Changed task prompt to emphasize end-to-end task completion and tool verification - Moved all prompt templates from inline strings to external markdown files in `src/prompts/` directory for better maintainability - Changed tool result renderers to use structured tree layouts with consistent expand hints and truncation indicators - Changed grep, find, and ls tools to show scope path and detailed truncation reasons in output - Changed web search and web fetch result rendering to display structured metadata sections with bounded content previews - Changed task/subagent progress rendering to use badge-style status labels and structured output sections - Changed notebook tool to display cell content preview with line counts - Changed ask tool result to show checkbox-style selection indicators - Changed output tool to include provenance metadata and content previews for retrieved outputs - Changed collapsed tool views to show consistent "Ctrl+O to expand" hints with remaining item counts - Changed Biome integration to use CLI instead of LSP to avoid stale diagnostics issues - Changed hardcoded UI symbols throughout codebase to use theme-configurable glyphs - Changed tree drawing characters to use theme-defined box-drawing symbols - Changed status line rendering to support left/right segment positioning with separators - Changed hardcoded UI symbols to use theme-configurable glyphs throughout the interface - Changed tree drawing characters to use theme-defined box-drawing symbols - Changed CLI image attachments to resize if larger than 2048px (fit within 1920x1080) and convert >2MB images to JPEG ### Removed - Removed custom renderers for ls, find, and grep tools in favor of generic tool display ### Fixed - Fixed spinner animation crash when spinner frames array is empty by adding length check - Fixed session persistence to properly await all queued writes before closing or switching sessions - Fixed session persistence to truncate oversized content blocks before writing to prevent memory exhaustion - Fixed extension list and inspector panel to use correct symbols for disabled and shadowed states instead of reusing unrelated status icons - Fixed token counting for subagent progress to handle different usage object formats (camelCase and snake_case) - Fixed image file handling by adding 20MB size limit to prevent memory issues during serialization - Fixed session persistence to truncate oversized entries before writing JSONL to prevent out-of-memory errors ## [3.14.0] - 2026-01-04 ### Added - Added `getUsageStatistics()` method to SessionManager for tracking cumulative token usage and costs across session messages ### Changed - Changed status line to display usage statistics more efficiently by using centralized session statistics instead of recalculating from entries ## [3.9.1337] - 2026-01-04 ### Changed - Changed default for `lsp.formatOnWrite` setting from `true` to `false` - Updated status line thinking level display to use emoji icons instead of abbreviated text - Changed auto-compact indicator from "(auto)" text to icon ### Fixed - Fixed status line not updating token counts and cost after starting a new session - Fixed stale diagnostics persisting after file content changes in LSP client ## [3.8.1337] - 2026-01-04 ### Added - Added automatic browser opening after exporting session to HTML - Added automatic browser opening after sharing session as a Gist ### Fixed - Fixed session titles not persisting to file when set before first flush ## [3.7.1337] - 2026-01-04 ### Added - Added `EditMatchError` class for structured error handling in edit operations - Added `utils` module export with `once` and `untilAborted` helper functions - Added in-memory LSP content sync via `syncContent` and `notifySaved` client methods ### Changed - Refactored LSP integration to use writethrough callbacks for edit and write tools, improving performance by syncing content in-memory before disk writes - Simplified FileDiagnosticsResult interface with renamed fields: `diagnostics` → `messages`, `hasErrors` → `errored`, `serverName` → `server` - Session title generation now triggers before sending the first message rather than after agent work begins ### Fixed - Fixed potential text decoding issues in bash executor by using streaming TextDecoder instead of Buffer.toString() ## [3.5.1337] - 2026-01-03 ### Added - Added session header and footer output in text mode showing version, model, provider, thinking level, and session ID - Added Extension Control Center dashboard accessible via `/extensions` command for unified management of all providers and extensions - Added ability to enable/disable individual extensions with persistent settings - Added three-column dashboard layout with sidebar tree, extension list, and inspector panel - Added fuzzy search filtering for extensions in the dashboard - Added keyboard navigation with Tab to cycle panes, j/k for navigation, Space to toggle, Enter to expand/collapse ### Changed - Redesigned Extension Control Center from 3-column layout to tabbed interface with horizontal provider tabs and 2-column grid - Replaced sidebar tree navigation with provider tabs using TAB/Shift+TAB cycling ### Fixed - Fixed title generation flag not resetting when starting a new session ## [3.4.1337] - 2026-01-03 ### Added - Added Time Traveling Stream Rules (TTSR) feature that monitors agent output for pattern matches and injects rule reminders mid-stream - Added `ttsr_trigger` frontmatter field for rules to define regex patterns that trigger mid-stream injection - Added TTSR settings for enabled state, context mode (keep/discard partial output), and repeat mode (once/after-gap) ### Fixed - Fixed excessive subprocess spawns by caching git status for 1 second in the footer component ## [3.3.1337] - 2026-01-03 ### Changed - Improved `/status` command output formatting to use consistent column alignment across all sections - Updated version update notification to suggest `omp update` instead of manual npm install command ## [3.1.1337] - 2026-01-03 ### Added - Added `spawns` frontmatter field for agent definitions to control which sub-agents can be spawned - Added spawn restriction enforcement preventing agents from spawning unauthorized sub-agents ### Fixed - Fixed duplicate skill loading when the same SKILL.md file was discovered through multiple paths ## [3.0.1337] - 2026-01-03 ### Added - Added unified capability-based discovery system for loading configuration from multiple AI coding tools (Claude Code, Cursor, Windsurf, Gemini, Codex, Cline, GitHub Copilot, VS Code) - Added support for discovering MCP servers, rules, skills, hooks, tools, slash commands, prompts, and context files from tool-specific config directories - Added Discovery settings tab in interactive mode to enable/disable individual configuration providers - Added provider source attribution showing which tool contributed each configuration item - Added support for Cursor MDC rule format with frontmatter (description, globs, alwaysApply) - Added support for Windsurf rules from .windsurf/rules/\*.md and global_rules.md - Added support for Cline rules from .clinerules file or directory - Added support for GitHub Copilot instructions with applyTo glob patterns - Added support for Gemini extensions and system.md customization files - Added support for Codex AGENTS.md and config.toml settings - Added automatic migration of `PI_*` environment variables to `OMP_*` equivalents for backwards compatibility - Added multi-path config discovery supporting `.omp`, `.pi`, and `.claude` directories with priority ordering - Added `getConfigDirPaths()`, `findConfigFile()`, and `readConfigFile()` functions for unified config resolution - Added documentation for config module usage patterns ### Changed - Changed MCP tool name parsing to use last underscore separator for better server name handling - Changed /config output to show provider attribution for discovered items - Renamed CLI binary from `pi` to `omp` and updated all command references - Changed config directory from `.pi` to `.omp` with fallback support for legacy paths - Renamed environment variables from `PI_*` to `OMP_*` prefix (e.g., `OMP_SMOL_MODEL`, `OMP_SLOW_MODEL`) - Changed model role alias prefix from `pi/` to `omp/` (e.g., `omp/slow` instead of `pi/slow`) ## [2.1.1337] - 2026-01-03 ### Added - Added `omp update` command to check for and install updates from GitHub releases or via bun ### Changed - Changed HTML export to use compile-time bundled templates via Bun macros for improved performance - Changed `exportToHtml` and `exportFromFile` functions to be async - Simplified build process by embedding assets (themes, templates, agents, commands) directly into the binary at compile time - Removed separate asset copying steps from build scripts ## [2.0.1337] - 2026-01-03 ### Added - Added shell environment snapshot to preserve user aliases, functions, and shell options when executing bash commands - Added support for `OMP_BASH_NO_CI`, `OMP_BASH_NO_LOGIN`, and `OMP_SHELL_PREFIX` environment variables for shell customization - Added zsh support alongside bash for shell detection and configuration ### Changed - Changed shell detection to prefer user's `$SHELL` when it's bash or zsh, with improved fallback path resolution - Changed Edit tool to reject `.ipynb` files with guidance to use NotebookEdit tool instead ## [1.500.0] - 2026-01-03 ### Added - Added provider tabs to model selector with Tab/Arrow navigation for filtering models by provider - Added context menu to model selector for choosing model role (Default, Smol, Slow) instead of keyboard shortcuts - Added LSP diagnostics display in tool execution output showing errors and warnings after file edits - Added centralized file logger with daily rotation to `~/.omp/logs/` for debugging production issues - Added `logger` property to hook and custom tool APIs for error/warning/debug logging - Added `output` tool to read full agent/task outputs by ID when truncated previews are insufficient - Added `task` tool to reviewer agent, enabling parallel exploration of large codebases during reviews - Added subprocess tool registry for extracting and rendering tool data from subprocess agents in real-time - Added combined review result rendering showing verdict and findings in a tree structure - Auto-read file mentions: Reference files with `@path/to/file.ext` syntax in prompts to automatically inject their contents, eliminating manual Read tool calls - Added `hidden` property for custom tools to exclude them from default tool list unless explicitly requested - Added `explicitTools` option to `createAgentSession` for enabling hidden tools by name - Added example review tools (`report_finding`, `submit_review`) with structured findings accumulation and verdict rendering - Added `/review` example command for interactive code review with branch comparison, uncommitted changes, and commit review modes - Custom TypeScript slash commands: Create programmable commands at `~/.omp/agent/commands/[name]/index.ts` or `.omp/commands/[name]/index.ts`. Commands export a factory returning `{ name, description, execute(args, ctx) }`. Return a string to send as LLM prompt, or void for fire-and-forget actions. Full access to `HookCommandContext` for UI dialogs, session control, and shell execution. - Claude command directories: Markdown slash commands now also load from `~/.claude/commands/` and `.claude/commands/` (parallel to existing `.omp/commands/` support) - `commands.enableClaudeUser` and `commands.enableClaudeProject` settings to disable Claude command directory loading - `/export --copy` option to copy entire session as formatted text to clipboard ### Changed - Changed model selector keyboard shortcuts from S/L keys to a context menu opened with Enter - Changed model role indicators from symbols (✓ ⚡ 🧠) to labeled badges ([ DEFAULT ] [ SMOL ] [ SLOW ]) - Changed model list sorting to include secondary sort by model ID within each provider - Changed silent error suppression to log warnings and debug info for tool errors, theme loading, and command loading failures - Changed Task tool progress display to show agent index (e.g., `reviewer(0)`) for easier Output tool ID derivation - Changed Task tool output to only include file paths when Output tool is unavailable, providing Read tool fallback - Changed Task tool output references to use simpler ID format (e.g., `reviewer_0`) with line/char counts for Output tool integration - Changed subagent recursion prevention from blanket blocking to same-agent blocking. Non-recursive agents can now spawn other agent types (e.g., reviewer can spawn explore agents) but cannot spawn themselves. - Changed `/review` command from markdown to interactive TypeScript with mode selection menu (branch comparison, uncommitted changes, commit review, custom) - Changed bundled commands to be overridable by user/project commands with same name - Changed subprocess termination to wait for message_end event to capture accurate token counts - Changed token counting in subprocess to accumulate across messages instead of overwriting - Updated bundled `reviewer` agent to use structured review tools with priority-based findings (P0-P3) and formal verdict submission - Task tool now streams artifacts in real-time: input written before spawn, session jsonl written by subprocess, output written at completion ### Removed - Removed separate Exa error logger in favor of centralized logging system - Removed `findings_count` parameter from `submit_review` tool - findings are now counted automatically - Removed artifacts location display from task tool output ### Fixed - Fixed race condition in event listener iteration by copying array before iteration to prevent mutation during callbacks - Fixed potential memory leak from orphaned abort controllers by properly aborting existing controllers before replacement - Fixed stream reader resource leak by adding proper `releaseLock()` calls in finally blocks - Fixed hook API methods throwing clear errors when handlers are not initialized instead of silently failing - Fixed LSP client race conditions with concurrent client creation and file operations using proper locking - Fixed Task tool progress display showing stale data by cloning progress objects before passing to callbacks - Fixed Task tool missing final progress events by waiting for readline to close before resolving - Fixed RPC mode race condition with concurrent prompt commands by serializing execution - Fixed pre-commit hook race condition causing `index.lock` errors when GitKraken/IDE git integrations detect file changes during formatting - Fixed Task tool output artifacts (`out.md`) containing duplicated text from streaming updates - Fixed Task tool progress display showing repeated nearly-identical lines during streaming - Fixed Task tool subprocess model selection ignoring agent's configured model and falling back to settings default. The `--model` flag now accepts `provider/model` format directly. - Fixed Task tool showing "done + succeeded" when aborted; now correctly displays "⊘ aborted" status ## [1.341.0] - 2026-01-03 ### Added - Added interruptMode setting to control when queued messages are processed during tool execution. - Implemented getter and setter methods in SettingsManager for interrupt mode persistence. - Exposed interruptMode configuration in interactive settings UI with immediate/wait options. - Wired interrupt mode through AgentSession and SDK to enable runtime configuration. - Model roles: Configure different models for different purposes (default, smol, slow) via `/model` selector - Model selector key bindings: Enter sets default, S sets smol, L sets slow, Escape closes - Model selector shows role markers: ✓ for default, ⚡ for smol, 🧠 for slow - `pi/` model aliases in Task tool agent definitions (e.g., `model: pi/smol, haiku, flash, mini`) - Smol model auto-discovery using priority chain: haiku > flash > mini - Slow model auto-discovery using priority chain: gpt-5.2-codex > codex > gpt > opus > pro - CLI args for model roles: `--smol ` and `--slow ` (ephemeral, not persisted) - Env var overrides: `OMP_SMOL_MODEL` and `OMP_SLOW_MODEL` - Title generation now uses configured smol model from settings - LSP diagnostics on edit: Edit tool can now return LSP diagnostics after editing code files. Disabled by default to avoid noise during multi-edit sequences. Enable via `lsp.diagnosticsOnEdit` setting. - LSP workspace diagnostics: New `lsp action=workspace_diagnostics` command checks the entire project for errors. Auto-detects project type and uses appropriate checker (rust-analyzer/cargo for Rust, tsc for TypeScript, go build for Go, pyright for Python). - LSP local binary resolution: LSP servers installed in project-local directories are now discovered automatically. Checks `node_modules/.bin/` for Node.js projects, `.venv/bin/`/`venv/bin/` for Python projects, and `vendor/bundle/bin/` for Ruby projects before falling back to `$PATH`. - LSP format on write: Write tool now automatically formats code files using LSP after writing. Uses the language server's built-in formatter (e.g., rustfmt for Rust, gofmt for Go). Controlled via `lsp.formatOnWrite` setting (enabled by default). - LSP diagnostics on write: Write tool now returns LSP diagnostics (errors/warnings) after writing code files. This gives immediate feedback on syntax errors and type issues. Controlled via `lsp.diagnosticsOnWrite` setting (enabled by default). - LSP server warmup at startup: LSP servers are now started at launch to avoid cold-start delays when first writing files. - LSP server status in welcome banner: Shows which language servers are active and ready. - Edit fuzzy match setting: Added `edit.fuzzyMatch` setting (enabled by default) to control whether the edit tool accepts high-confidence fuzzy matches for whitespace/indentation differences. Toggle via `/settings`. - Multi-server LSP diagnostics: Diagnostics now query all applicable language servers for a file type. For TypeScript/JavaScript projects with Biome, this means both type errors (from tsserver) and lint errors (from Biome) are reported together. - Comprehensive LSP server configurations for 40+ languages including Rust, Go, Python, Java, Kotlin, Scala, Haskell, OCaml, Elixir, Ruby, PHP, C#, Lua, Nix, and many more. Each server includes sensible defaults for args, settings, and init options. - Extended LSP config file search paths: Now searches for `lsp.json`, `.lsp.json` in project root and `.omp/` subdirectory, plus user-level configs in `~/.omp/` and home directory. ### Changed - LSP settings moved to dedicated "LSP" tab in `/settings` for better organization - Improved grep tool description to document pagination options (`headLimit`, `offset`) and clarify recursive search behavior - LSP idle timeout now disabled by default. Configure via `idleTimeoutMs` in lsp.json to auto-shutdown inactive servers. - Model settings now use role-based storage (`modelRoles` map) instead of single `defaultProvider`/`defaultModel` fields. Supports multiple model roles (default, small, etc.) - Session model persistence now uses `"provider/modelId"` string format with optional role field ### Fixed - Recent sessions now show in welcome banner (was never wired up). - Auto-generated session titles: Sessions are now automatically titled based on the first message using a small model (Haiku/GPT-4o-mini/Flash). Titles are shown in the terminal window title, recent sessions list, and --resume picker. The resume picker shows title with dimmed first message preview below. ## [1.340.0] - 2026-01-03 ### Changed - Replaced vendored highlight.js and marked.js with CDN-hosted versions for smaller exports - Added runtime minification for HTML, CSS, and JS in session exports - Session share URL now uses gistpreview.github.io instead of shittycodingagent.ai ## [1.339.0] - 2026-01-03 ### Added - MCP project config setting to disable loading `.mcp.json`/`mcp.json` from project root - Support for both `mcp.json` and `.mcp.json` filenames (prefers `mcp.json` if both exist) - Automatic Exa MCP server filtering with API key extraction for native integration ## [1.338.0] - 2026-01-03 ### Added - Bash interceptor setting to block shell commands that have dedicated tools (disabled by default, enable via `/settings`) ### Changed - Refactored settings UI to declarative definitions for easier maintenance - Shell detection now respects `$SHELL` environment variable before falling back to bash/sh - Tool binary detection now uses `Bun.which()` instead of spawning processes ### Fixed - CLI help text now accurately lists all default tools ## [1.337.1] - 2026-01-02 ### Added - MCP support and plugin system for external tool integration - Git context to system prompt for repo awareness - Bash interception to guide tool selection - Fuzzy matching to handle indentation variance in edit tool - Specialized Exa tools with granular toggles - `/share` command for exporting conversations to HTML - Edit diff preview before tool execution ### Changed - Renamed package scope to @oh-my-pi for consistent branding - Simplified toolset and enhanced navigation - Improved process cleanup with tree kill - Updated CI/CD workflows for GitHub Actions with provenance-signed npm publishing ### Fixed - Template string interpolation in image read output - Prevented full re-renders during write tool streaming - Edit tool failing on files with UTF-8 BOM ## [1.337.0] - 2026-01-02 Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mono](https://github.com/badlogic/pi-mono). ## [0.31.1] - 2026-01-02 ### Fixed - Model selector no longer allows negative index when pressing arrow keys before models finish loading ([#398](https://github.com/badlogic/pi-mono/pull/398) by [@mitsuhiko](https://github.com/mitsuhiko)) - Type guard functions (`isBashToolResult`, etc.) now exported at runtime, not just in type declarations ([#397](https://github.com/badlogic/pi-mono/issues/397)) ## [0.31.0] - 2026-01-02 This release introduces session trees for in-place branching, major API changes to hooks and custom tools, and structured compaction with file tracking. ### Session Tree Sessions now use a tree structure with `id`/`parentId` fields. This enables in-place branching: navigate to any previous point with `/tree`, continue from there, and switch between branches while preserving all history in a single file. **Existing sessions are automatically migrated** (v1 → v2) on first load. No manual action required. New entry types: `BranchSummaryEntry` (context from abandoned branches), `CustomEntry` (hook state), `CustomMessageEntry` (hook-injected messages), `LabelEntry` (bookmarks). See [docs/session.md](docs/session.md) for the file format and `SessionManager` API. ### Hooks Migration The hooks API has been restructured with more granular events and better session access. **Type renames:** - `HookEventContext` → `HookContext` - `HookCommandContext` is now a new interface extending `HookContext` with session control methods **Event changes:** - The monolithic `session` event is now split into granular events: `session_start`, `session_before_switch`, `session_switch`, `session_before_branch`, `session_branch`, `session_before_compact`, `session_compact`, `session_shutdown` - `session_before_switch` and `session_switch` events now include `reason: "new" | "resume"` to distinguish between `/new` and `/resume` - New `session_before_tree` and `session_tree` events for `/tree` navigation (hook can provide custom branch summary) - New `before_agent_start` event: inject messages before the agent loop starts - New `context` event: modify messages non-destructively before each LLM call - Session entries are no longer passed in events. Use `ctx.sessionManager.getEntries()` or `ctx.sessionManager.getBranch()` instead **API changes:** - `pi.send(text, attachments?)` → `pi.sendMessage(message, triggerTurn?)` (creates `CustomMessageEntry`) - New `pi.appendEntry(customType, data?)` for hook state persistence (not in LLM context) - New `pi.registerCommand(name, options)` for custom slash commands (handler receives `HookCommandContext`) - New `pi.registerMessageRenderer(customType, renderer)` for custom TUI rendering - New `ctx.isIdle()`, `ctx.abort()`, `ctx.hasQueuedMessages()` for agent state (available in all events) - New `ctx.ui.editor(title, prefill?)` for multi-line text editing with Ctrl+G external editor support - New `ctx.ui.custom(component)` for full TUI component rendering with keyboard focus - New `ctx.ui.setStatus(key, text)` for persistent status text in footer (multiple hooks can set their own) - New `ctx.ui.theme` getter for styling text with theme colors - `ctx.exec()` moved to `pi.exec()` - `ctx.sessionFile` → `ctx.sessionManager.getSessionFile()` - New `ctx.modelRegistry` and `ctx.model` for API key resolution **HookCommandContext (slash commands only):** - `ctx.waitForIdle()` - wait for agent to finish streaming - `ctx.newSession(options?)` - create new sessions with optional setup callback - `ctx.branch(entryId)` - branch from a specific entry - `ctx.navigateTree(targetId, options?)` - navigate the session tree These methods are only on `HookCommandContext` (not `HookContext`) because they can deadlock if called from event handlers that run inside the agent loop. **Removed:** - `hookTimeout` setting (hooks no longer have timeouts; use Ctrl+C to abort) - `resolveApiKey` parameter (use `ctx.modelRegistry.getApiKey(model)`) See [docs/hooks.md](docs/hooks.md) and [examples/hooks/](examples/hooks/) for the current API. ### Custom Tools Migration The custom tools API has been restructured to mirror the hooks pattern with a context object. **Type renames:** - `CustomAgentTool` → `CustomTool` - `ToolAPI` → `CustomToolAPI` - `ToolContext` → `CustomToolContext` - `ToolSessionEvent` → `CustomToolSessionEvent` **Execute signature changed:** ```typescript // Before (v0.30.2) execute(toolCallId, params, signal, onUpdate) // After execute(toolCallId, params, onUpdate, ctx, signal?) ``` The new `ctx: CustomToolContext` provides `sessionManager`, `modelRegistry`, `model`, and agent state methods: - `ctx.isIdle()` - check if agent is streaming - `ctx.hasQueuedMessages()` - check if user has queued messages (skip interactive prompts) - `ctx.abort()` - abort current operation (fire-and-forget) **Session event changes:** - `CustomToolSessionEvent` now only has `reason` and `previousSessionFile` - Session entries are no longer in the event. Use `ctx.sessionManager.getBranch()` or `ctx.sessionManager.getEntries()` to reconstruct state - Reasons: `"start" | "switch" | "branch" | "tree" | "shutdown"` (no separate `"new"` reason; `/new` triggers `"switch"`) - `dispose()` method removed. Use `onSession` with `reason: "shutdown"` for cleanup See [docs/custom-tools.md](docs/custom-tools.md) and [examples/custom-tools/](examples/custom-tools/) for the current API. ### SDK Migration **Type changes:** - `CustomAgentTool` → `CustomTool` - `AppMessage` → `AgentMessage` - `sessionFile` returns `string | undefined` (was `string | null`) - `model` returns `Model | undefined` (was `Model | null`) - `Attachment` type removed. Use `ImageContent` from `@oh-my-pi/pi-ai` instead. Add images directly to message content arrays. **AgentSession API:** - `branch(entryIndex: number)` → `branch(entryId: string)` - `getUserMessagesForBranching()` returns `{ entryId, text }` instead of `{ entryIndex, text }` - `reset()` → `newSession(options?)` where options has optional `parentSession` for lineage tracking - `newSession()` and `switchSession()` now return `Promise` (false if cancelled by hook) - New `navigateTree(targetId, options?)` for in-place tree navigation **Hook integration:** - New `sendHookMessage(message, triggerTurn?)` for hook message injection **SessionManager API:** - Method renames: `saveXXX()` → `appendXXX()` (e.g., `appendMessage`, `appendCompaction`) - `branchInPlace()` → `branch()` - `reset()` → `newSession(options?)` with optional `parentSession` for lineage tracking - `createBranchedSessionFromEntries(entries, index)` → `createBranchedSession(leafId)` - `SessionHeader.branchedFrom` → `SessionHeader.parentSession` - `saveCompaction(entry)` → `appendCompaction(summary, firstKeptEntryId, tokensBefore, details?)` - `getEntries()` now excludes the session header (use `getHeader()` separately) - `getSessionFile()` returns `string | undefined` (undefined for in-memory sessions) - New tree methods: `getTree()`, `getBranch()`, `getLeafId()`, `getLeafEntry()`, `getEntry()`, `getChildren()`, `getLabel()` - New append methods: `appendCustomEntry()`, `appendCustomMessageEntry()`, `appendLabelChange()` - New branch methods: `branch(entryId)`, `branchWithSummary()` **ModelRegistry (new):** `ModelRegistry` is a new class that manages model discovery and API key resolution. It combines built-in models with custom models from `models.json` and resolves API keys via `AuthStorage`. ```typescript import { discoverAuthStorage, discoverModels } from "@oh-my-pi/pi-coding-agent"; const authStorage = discoverAuthStorage(); // ~/.omp/agent/auth.json const modelRegistry = discoverModels(authStorage); // + ~/.omp/agent/models.json // Get all models (built-in + custom) const allModels = modelRegistry.getAll(); // Get only models with valid API keys const available = await modelRegistry.getAvailable(); // Find specific model const model = modelRegistry.find("anthropic", "claude-sonnet-4-20250514"); // Get API key for a model const apiKey = await modelRegistry.getApiKey(model); ``` This replaces the old `resolveApiKey` callback pattern. Hooks and custom tools access it via `ctx.modelRegistry`. **Renamed exports:** - `messageTransformer` → `convertToLlm` - `SessionContext` alias `LoadedSession` removed See [docs/sdk.md](docs/sdk.md) and [examples/sdk/](examples/sdk/) for the current API. ### RPC Migration **Session commands:** - `reset` command → `new_session` command with optional `parentSession` field **Branching commands:** - `branch` command: `entryIndex` → `entryId` - `get_branch_messages` response: `entryIndex` → `entryId` **Type changes:** - Messages are now `AgentMessage` (was `AppMessage`) - `prompt` command: `attachments` field replaced with `images` field using `ImageContent` format **Compaction events:** - `auto_compaction_start` now includes `reason` field (`"threshold"` or `"overflow"`) - `auto_compaction_end` now includes `willRetry` field - `compact` response includes full `CompactionResult` (`summary`, `firstKeptEntryId`, `tokensBefore`, `details`) See [docs/rpc.md](docs/rpc.md) for the current protocol. ### Structured Compaction Compaction and branch summarization now use a structured output format: - Clear sections: Goal, Progress, Key Information, File Operations - File tracking: `readFiles` and `modifiedFiles` arrays in `details`, accumulated across compactions - Conversations are serialized to text before summarization to prevent the model from "continuing" them The `before_compact` and `before_tree` hook events allow custom compaction implementations. See [docs/compaction.md](docs/compaction.md). ### Interactive Mode **`/tree` command:** - Navigate the full session tree in-place - Search by typing, page with ←/→ - Filter modes (Ctrl+O): default → no-tools → user-only → labeled-only → all - Press `l` to label entries as bookmarks - Selecting a branch switches context and optionally injects a summary of the abandoned branch **Entry labels:** - Bookmark any entry via `/tree` → select → `l` - Labels appear in tree view and persist as `LabelEntry` **Theme changes (breaking for custom themes):** Custom themes must add these new color tokens or they will fail to load: - `selectedBg`: background for selected/highlighted items in tree selector and other components - `customMessageBg`: background for hook-injected messages (`CustomMessageEntry`) - `customMessageText`: text color for hook messages - `customMessageLabel`: label color for hook messages (the `[customType]` prefix) Total color count increased from 46 to 50. See [docs/theme.md](docs/theme.md) for the full color list and copy values from the built-in dark/light themes. **Settings:** - `enabledModels`: allowlist models in `settings.json` (same format as `--models` CLI) ### Added - `ctx.ui.setStatus(key, text)` for hooks to display persistent status text in the footer ([#385](https://github.com/badlogic/pi-mono/pull/385) by [@prateekmedia](https://github.com/prateekmedia)) - `ctx.ui.theme` getter for styling status text and other output with theme colors - `/share` command to upload session as a secret GitHub gist and get a shareable URL via shittycodingagent.ai ([#380](https://github.com/badlogic/pi-mono/issues/380)) - HTML export now includes a tree visualization sidebar for navigating session branches ([#375](https://github.com/badlogic/pi-mono/issues/375)) - HTML export supports keyboard shortcuts: Ctrl+T to toggle thinking blocks, Ctrl+O to toggle tool outputs - HTML export supports theme-configurable background colors via optional `export` section in theme JSON ([#387](https://github.com/badlogic/pi-mono/pull/387) by [@mitsuhiko](https://github.com/mitsuhiko)) - HTML export syntax highlighting now uses theme colors and matches TUI rendering - **Snake game example hook**: Demonstrates `ui.custom()`, `registerCommand()`, and session persistence. See [examples/hooks/snake.ts](examples/hooks/snake.ts). - **`thinkingText` theme token**: Configurable color for thinking block text. ([#366](https://github.com/badlogic/pi-mono/pull/366) by [@paulbettner](https://github.com/paulbettner)) ### Changed - **Entry IDs**: Session entries now use short 8-character hex IDs instead of full UUIDs - **API key priority**: `ANTHROPIC_OAUTH_TOKEN` now takes precedence over `ANTHROPIC_API_KEY` - HTML export template split into separate files (template.html, template.css, template.js) for easier maintenance ### Fixed - HTML export now properly sanitizes user messages containing HTML tags like `