- Remove unused ParsedChunkTarget type alias (lint error)
- Increase setImmediate timing in history storage compat test
- Mock warmPythonEnvironment in python tool tests
- Fix tlaplus LSP test to spy on $which instead of Bun.which
- Added bounds clamping to prologue and epilogue byte calculations to prevent out-of-range boundary violations.
- Extended chunk boundaries for indent-based languages when epilogue exceeds calculated range with trailing newline.
- Added comprehensive test coverage for Python chunk editing operations including body/head replacement and indentation preservation.
- Extracted working directory formatting logic into reusable utility function and applied tab sanitization to bash command previews.
- Renamed ChunkRegion::Inner variant to Body across Rust and TypeScript for clearer semantics.
- Renamed chunk edit tool parameter from target to sel and made op required instead of optional.
- Removed region aliases (prologue, epilogue, inner) and simplified region validation to accept only head, body, tail.
- Replaced db.exec() calls with db.run() for SQL execution in auth-storage, agent-storage, and history-storage.
- Enhanced chunk edit documentation with comprehensive examples, indentation rules, and CRC refresh guidance.
- Improved chunk statement merging logic to consolidate leaf statements into parent function bodies by default.
- Added Auto QA tool (`report_tool_issue`) for automated tracking of unexpected tool behavior with environment variable and setting support.
- Added Python tool environment warmup on first execution to ensure prelude helpers are available before use.
- Fixed Python prelude introspection to respect execution timeout and signal options, preventing hangs.
- Refactored prelude documentation caching and loading logic into reusable helper functions with test environment awareness.
- Enhanced kernel introspection with optional timeout and signal parameters for better execution control.
- Added system prompt guidance to encourage agents to report tool issues via Auto QA when available.
- Refactored chunk anchor format from bracket notation to marker-based syntax with +++ and --- delimiters.
- Renamed chunk edit regions from @container/@prologue/@body/@epilogue to @head/@inner/@tail for clearer semantics.
- Simplified line-number selector resolution to auto-convert line targets to chunk paths with checksum format.
- Removed PI_DEV debug addon loading logic; PI_DEV now only enables loader diagnostics without changing candidate filenames.
- Added full-name aliases for chunk kind patterns (decls, expr, fn, meth, mod, params, ret, stmts, var) alongside abbreviated forms.
- Refactored sanitize_node_kind() to return &str instead of String; adjusted identifier passing logic across AST modules.
- Replaced string-based chunk naming with type-safe ChunkKind enum across 35+ AST classifier modules.
- Refactored ChunkNode to use optional identifier and ChunkKind instead of name string for semantic clarity.
- Created new kind.rs module with ChunkKind enum (150+ variants) and trait-based metadata system.
- Removed string prefix-based chunk type detection and replaced with ChunkKind enum matching throughout.
- Updated chunk API signatures to accept ChunkKind and optional identifier instead of formatted names.
- Added automatic cleaning of literal escape sequences (`\n`, `\t`, `\r`) in JSON parsing to handle LLM encoding confusion.
- Added support for healing JSON with trailing junk after balanced containers (e.g., `]\n</invoke>`).
- Implemented `cleanLiteralEscapes()` function to distinguish between literal backslash sequences outside JSON strings and actual escape sequences within strings.
- Added 2 test cases validating escape sequence cleaning and trailing junk recovery in tool argument coercion.
- Removed explicit js_name attributes from NAPI macros across all modules, relying on automatic snake_case to camelCase conversion.
- Renamed internal functions in keys.rs for clarity: parse_kitty_sequence_napi() -> parse_kitty_sequence() and parse_kitty_sequence() -> parse_kitty_sequence_bytes().
- Renamed text.rs functions for consistency: set_env_tab_width() -> set_default_tab_width() and get_env_tab_width() -> get_default_tab_width().
- Updated documentation to reflect automatic NAPI naming convention and simplified export mapping tables.
- Renamed chunk region identifiers from Container/Prologue/Body/Epilogue to Head/Inner/Tail with updated semantics.
- Changed default chunk edit region behavior to omit @region suffix for full chunk targeting instead of explicit @container.
- Made trait and interface members addressable by preventing collapsing in chunk resolution logic.
- Updated chunk read and edit documentation with new region names and simplified selector examples.
- Refactored region handling to use Option<ChunkRegion> for optional region targeting across Rust and TypeScript implementations.
- Added ParsedSelector struct and is_known_region_name() validation function for improved region parsing.
- Added auto-retry event tracking and message-end event handling to improve agent completion detection.
- Implemented is_effectively_complete() method to detect agent completion based on review sections, todo state, and quiet period.
- Enhanced wait_for_settle() logic to handle auto-retry delays and graceful timeout recovery instead of immediate failure.
- Added token usage tracking from partial message updates to capture intermediate token counts.
- Refactored note_tool_end() to only update activity on error, removing redundant success case.
- Removed last_activity updates from todo reminder and auto-clear handlers to simplify state management.
- Added real-time LSP server status updates in welcome banner when background warmup completes.
- Changed welcome banner status icon from warning to muted pending symbol for improved visual clarity.
- Extracted LSP server conversion logic into dedicated helper methods for better maintainability.
- Added comprehensive test coverage for interactive mode LSP startup welcome banner updates.
- Fixed newline preservation in prologue/epilogue replacements to prevent unintended body content joining.
- Fixed markdown table pipe detection to treat pipes as content rather than gutter markers.
- Fixed region display calculation to extend to line beginning for consistent indentation handling.
- Removed unused `region` field from `ResolvedChunk` struct to simplify internal state management.
- Added test coverage for body-only content extraction, prologue indentation consistency, and container prepend operations.
- Made Codex websocket prewarm asynchronous and non-blocking during session creation for faster startup.
- Added Codex websocket status updates in interactive mode when prewarm completes or fails.
- Introduced `getOpenAICodexTransportDetails()` to determine transport preferences before prewarm initialization.
- Refactored Codex prewarm to fire in background without awaiting, matching LSP server warmup pattern.
- Updated CHANGELOG entries for ai and coding-agent packages to reflect Codex startup event monitoring and async prewarm behavior.
- Replaced xcrun subprocess spawning with cached directory listing for 10-100x faster macOS toolchain binary resolution.
- Introduced XCODE_BINS set and isXcodeBin() filter to fast-reject non-Xcode commands without filesystem access.
- Implemented getDeveloperDirs() to resolve active Xcode directory via $DEVELOPER_DIR and /var/db/xcode_select_link symlink without spawning processes.
- Added getMacosToolPaths() to lazily compute and cache deduplicated toolchain bin directory listings on first lookup.
- Refactored logger.time() API to accept function references and arguments separately instead of wrapped callbacks.
- Replaced RingBuffer-based timing with wall-clock markers and async span tracking for improved timing accuracy.
- Updated 20+ call sites across executor, kernel, main, and tools modules to use new logger.time() signature.
- Removed parsePath() helper function and inlined path.split() calls in settings module.
- Added test case verifying model selection without auth validation during startup.
- Added asynchronous LSP server discovery and warmup at startup via `discoverStartupLspServers()` function.
- Added LSP startup event channel (`lsp:startup`) for real-time server status notifications during warmup.
- Added `LspStartupServerInfo` type to track LSP server status (connecting, ready, error) throughout lifecycle.
- Changed LSP server warmup from blocking synchronous operation to non-blocking background task.
- Refactored interactive mode to subscribe to LSP startup events and display real-time server status updates.
- Added comprehensive code-editing tool evaluation framework with `rate-edit-tool.py` supporting multi-model benchmarking across TypeScript, Rust, Python, and Markdown.
- Enhanced chunk edit error messages to display fresh chunk context with resolved selectors and anchors for improved debugging.
- Added `--no-lsp` flag to benchmark RPC arguments for TypeScript edit task evaluation.
- Improved chunk body boundary calculation to correctly include closing line indentation in epilogue.
- Added comprehensive benchmark results dataset (`all_models_results.json`) with performance metrics for 6 AI models.
- Enhanced chunk-edit documentation with clarified `@body` selector behavior and append/prepend examples.
- Added multi-session support to ACP mode enabling session forking, resumption, and closure operations.
- Added session model state reporting and unstable_setSessionModel RPC command for direct model configuration.
- Added turn-level usage tracking and stable message ID tracking for assistant chunks in ACP responses.
- Added Settings.cloneForCwd() method and ExtensionRunner.getFlagValues() for configuration isolation across sessions.
- Fixed ACP session cleanup to properly cancel in-flight prompts and dispose resources on disconnect.
- Refactored AcpAgent to manage multiple concurrent sessions with per-session lifecycle instead of single session.
- Refactored chunk tree initialization to use explicit prologue/epilogue byte boundaries instead of None values.
- Extracted chunk resolution logic to use split_selector_crc_and_region() helper for improved code reuse.
- Reorganized package.json exports across multiple modules (autoresearch, cli, dap, edit, modes) for better API surface clarity.
- Updated test expectations for Go receiver method rendering and chunk selector formats to match refactored output.
- Consolidated notebook conversion logic and removed unused _createErrorToolResult helper function.
- Improved leading trivia preservation in chunk edits by detecting and maintaining line prefix whitespace.
- Added host tool execution framework with HostTool, HostToolContext, and host_tool() factory for custom tool integration.
- Added RpcConcurrencyError exception and _PromptLifecycleCoordinator to enforce single-flight constraint on prompt lifecycle methods.
- Enhanced JSON parsing with 10 validation helpers and enum frozensets for safe field extraction with detailed error messages.
- Replaced manual event/error list management with _BoundedHistory for bounded-size history with offset tracking.
- Added deep JSON cloning to prevent external mutations of stored payloads and improved UTF-8 error handling in subprocess stderr.
- Added custom_tools parameter to RpcClient and set_custom_tools() method for runtime tool registration.
- Extracted line-hash utilities into dedicated module for improved code organization.
- Moved computeLineHash, formatLineHash, and HASHLINE_NIBBLE_ALPHABET from hashline.ts to new line-hash.ts module.
- Updated import paths across 6 files to reference new line-hash module location.
- Consolidated line-hashing functionality into single-responsibility module without behavior changes.
- Extracted prompt rendering and formatting utilities from coding-agent to centralized pi-utils package with new API surface (prompt.render, prompt.format, prompt.registerHelper).
- Migrated parseFrontmatter utility from coding-agent to pi-utils package; updated 8 files to import from @oh-my-pi/pi-utils.
- Removed 170-line prompt-format.ts module and consolidated 192 lines of Handlebars helper registrations into pi-utils prompt module.
- Updated 60+ files across coding-agent and typescript-edit-benchmark to use new prompt.render() and prompt.format() API from pi-utils.
- Simplified prompt-templates.ts by delegating core functionality to pi-utils while retaining custom helper registrations (jtdToTypeScript, jsonStringify, etc.).
- Replaced all Bun.which() calls with $which() utility from @oh-my-pi/pi-utils across 22 files.
- Removed findBashOnPath() wrapper function from procmgr.ts, consolidating binary path resolution.
- Updated AGENTS.md documentation to reflect new $which() API usage pattern.
- Centralized binary detection logic through shared utility, reducing code duplication.
- Added error handling callbacks (on_protocol_error, on_listener_error) and error history tracking (protocol_errors, listener_errors properties) for RPC failures.
- Added max_event_history and max_stderr_chunks parameters to bound retained history in long-lived hosts, preventing unbounded memory growth.
- Added assistant_text_with_thinking() and message_text_with_thinking() helper functions for backward compatibility with thinking block inclusion.
- Improved error correlation for id-less parse/unknown-command failures to waiting requests and changed prompt scheduling failures to raise instead of timing out.
- Refactored event dispatch to _dispatch_listeners() with exception handling and error recording for robust listener failure management.
- Added advanced DAP debugging capabilities including instruction breakpoints, data breakpoints, disassembly, memory introspection, and module inspection.
- Added reverse request handling in DAP client for runInTerminal and startDebugging to support child process debugging.
- Replaced Bun.which() with $which() utility providing flexible cache control and macOS Xcode toolchain fallback.
- Expanded debug tool schema with 20+ new parameters and 11 new action handlers for low-level debugging operations.
- Added instructionPointerReference field to debug session snapshots for enhanced low-level debugging context.
- Added region-based chunk targeting with @container, @prologue, @body, @epilogue selectors for precise edit operations.
- Simplified chunk edit operations from 6 variants to 5 (replace, before, after, prepend, append) with unified region parameter.
- Removed checksum requirement from insert operations; only replace operations require #CRC suffix in selector.
- Added canonical indentation normalization with normalize_indent parameter for consistent tab-based rendering across file types.
- Refactored chunk selector format from separate crc/anchor fields to unified selector#CRC@region syntax for mutations.
- Added UnsupportedRegion status to chunk read operations for explicit handling of region availability per chunk type.
- Added typed event listeners and granular event handling for all RPC notification types.
- Added set_todos RPC command and todoPhases session state field for todo phase management.
- Added RpcClient initialization parameters (thinking, tools, no_session, rpc_defaults) for startup configuration.
- Added install_headless_ui() method and todo management methods (get_todos, set_todos, clear_todos).
- Added TodoItem and TodoPhase dataclasses with parser functions for structured todo representation.
- Added RPC mode behavior: disables session title generation by default and resets workflow settings to built-in defaults.
- Added RpcClient class with subprocess-based RPC communication, thread-safe request/response handling, and 30+ public methods for agent operations.
- Defined 65+ public API symbols including protocol types, dataclasses, parser functions, and custom exception types for RPC communication.
- Implemented event listener system with on_event, on_ui_request, and on_extension_error callbacks for asynchronous RPC event handling.
- Added comprehensive test suite with integration tests for RpcClient and unit tests for protocol parsing functions.
- Configured Python package with setuptools, PEP 561 type hints support, and documentation for usage and API reference.
- Reorganized edit tool from `patch/` to `edit/` directory with dedicated mode subdirectories (chunk, patch, hashline, replace).
- Replaced line-scoped edit operations with substring-based `find` parameter and added `replace_body` operation for preserving signatures.
- Added chunk focus modes (Expanded, Collapsed, Container) and focused rendering to display only touched chunks and adjacent siblings.
- Implemented notebook (ipynb) language support with virtual source conversion and cell-based chunk parsing.
- Enhanced chunk edit error messages with consistent checksum mismatch reporting and improved chunk selector auto-resolution.
- Extracted edit mode implementations into separate modules with improved helper functions and LSP integration for diagnostics.
- Added deferred diagnostics support in LSP writethrough: `onDeferredDiagnostics` callback and `deferredSignal` in `WritethroughOptions` allow callers to receive diagnostics that arrive after the main 5-second timeout.
- Added language detection for `.pm` (Perl modules), `.astro` (Astro framework), and special filenames `containerfile` and `justfile`.
- Added workspace-scoped diagnostics and reload actions via `*` file parameter; `diagnostics` action now supports `*` for workspace-wide diagnostics across all configured servers.
- Reduced LSP diagnostics timeout from 10 seconds to 5 seconds for faster feedback; slow diagnostics now fetch in background via deferred mechanism.
- Added automatic healing of malformed JSON with single-character bracket errors at the end of strings, improving LLM tool argument parsing robustness.
- Implemented tryHealMalformedJson() function to correct common LLM mistakes like misplaced or extra brackets via single-character edits.
- Added 3 test cases covering bracket healing scenarios: extra bracket, wrong bracket type, and deeply broken JSON rejection.
- Added support for 16 new programming languages (Astro, CMake, Dockerfile, Erlang, GraphQL, INI, Just, OCaml, Perl, PowerShell, Protocol Buffers, R, SQL, Svelte, Vue, Jupyter notebooks).
- Implemented language-specific AST classifiers for semantic code chunking across all new languages with proper node type handling.
- Added Jupyter notebook (.ipynb) support with virtual source assembly, cell-level chunking, and round-trip JSON serialization.
- Expanded language detection with 40+ new file extension aliases and special filename handling (Justfile, CMakeLists.txt, Dockerfile variants).
- Removed Go language post-processing logic for receiver method and constructor reparenting, simplifying the classifier.
- Added socket-mode transport support for DAP adapters, enabling network socket debuggers like dlv alongside stdio mode.
- Improved extensionless binary debugging to prioritize native debuggers and adapters with root markers.
- Fixed DAP session initialization to subscribe to stop events before launching/attaching, preventing missed stopOnEntry events.
- Refactored session event handling to fetch stack frames outside dispatch loop, eliminating deadlocks and improving responsiveness.
- Enhanced evaluate requests to default to top stopped frame when frameId is not explicitly provided.
- Eager todo enforcement now skips prompts ending with question marks or exclamation marks, treating them as queries or commands rather than statements requiring task planning.
- Added 2 test cases validating that eager todo enforcement is skipped for prompts ending with question and exclamation marks.
- Added fully-qualified anchor paths in chunk read output showing complete path hierarchy with CRC checksums.
- Added exact chunk selector resolution with CRC validation to enforce canonical chunk paths in edit operations.
- Added `?` selector option to read syntax-aware chunks by canonical path listing when anchor paths are unclear.
- Improved tree-sitter range handling with `end_row_as_line()` function to correctly convert half-open ranges to 1-indexed line numbers.
- Extracted anchor label logic into `chunk_anchor_label()` const function and consolidated style-based selection.
- Removed --dev flag support from native build pipeline and dev:native npm scripts.
- Fixed plan review previews to re-append at the chat tail on refresh, keeping them adjacent to the active selector instead of updating off-screen.
- Added comprehensive test coverage for plan review rendering behavior across multiple refresh cycles.
- Removed logger.time() instrumentation calls from native module loading and CPU detection logic.
- Simplified resolveCpuVariant() and runCommand() functions by eliminating timing wrapper overhead.
- Unwrapped maybeExtractEmbeddedAddon() and require_() calls to reduce nesting and improve readability.
- Removed native binding validation function that checked required exports at load time.
- Enhanced native module loader to check XDG_DATA_HOME environment variable before ~/.omp/natives fallback.
- Removed dependency on @oh-my-pi/pi-utils from native module loader by inlining helper functions.
- Migrated child process termination from waitForChildProcess utility to killTree native binding.
native/index.js eagerly required @oh-my-pi/pi-utils at module top to
read getNativesDir + logger. In a tarball install, bun pm pack ships
the package.json with workspace:* unchanged, so pi-utils is not
hoisted into a position the nested native/index.js can resolve, and
the CLI crashes at first import:
ResolveMessage: Cannot find module '@oh-my-pi/pi-utils' from
.../node_modules/@oh-my-pi/pi-natives/native/index.js
Wrap the require in try/catch and provide a minimal inline fallback
(getNativesDir defaulting to ~/.omp/natives, logger.time as a no-op
passthrough). The fallback only fires when pi-utils is genuinely
unresolvable; normal monorepo and source/binary installs continue to
use the real implementations.
The four extension/hook/custom-tool/custom-command loaders statically
imported the package barrel `@oh-my-pi/pi-coding-agent` to expose it as
`pi` to user code. This created a self-referential cycle:
tools/index -> task -> sdk -> custom-commands/loader
-> @oh-my-pi/pi-coding-agent (package barrel)
-> modes/components -> tool-execution -> renderers
-> tools/read (TDZ on readToolRenderer)
Triggered at startup by 'omp --help' / 'omp stats --help' depending on
ESM evaluation order, manifesting as:
ReferenceError: Cannot access 'readToolRenderer' before initialization
Introduce `extensibility/pi-ref.ts` that resolves the barrel lazily via
`require` on first call. All four loaders use `getPiRef()` instead of a
static `import * as piCodingAgent`. The barrel is fully initialized by
the time any loader function actually runs, so the lookup is safe.
- build-native.ts: bunx @napi-rs/cli was picking up Mono's /usr/bin/cli
on Ubuntu runners; resolve the napi bin from node_modules/.bin instead.
- power.rs: non-macOS build strips the cfg body, leaving stop() as a no-op
that clippy wants const. Allow the lint since the macOS branch can't be const.