- 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.
- 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.
- 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 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.
- 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 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 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.
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.
- Simplified chunk path parsing to extract selector separately from CRC field.
- Refactored chunk edit operations to conditionally strip CRC for auto-accepted batch operations.
- Enhanced chunk edit preview formatting to display operation types with target and line ranges.
- Improved chunk state rendering with clamped visible range and unified notice message format.
- Refactored error handling in chunk resolution from map_err to let-else pattern.
- Added MacOSPowerAssertion native module to prevent idle-sleep on macOS during active sessions.
- Integrated power assertion lifecycle management into coding-agent session with automatic start/stop.
- Implemented N-API bindings for macOS IOKit power assertions with RAII cleanup and cross-platform no-op fallback.
- Reformatted indentation from spaces to tabs across Rust chunk module for consistency.
- Refactored chunk selector resolution to extract and preserve raw selector strings separately from parsed CRC checksums.
- Reorganized chunk state lookup infrastructure with dedicated maps for checksum, leaf, and suffix-based chunk resolution.
- Simplified batch operation CRC validation to auto-accept stale checksums for subsequent operations on the same chunk.
- Unified TypeScript interface and Nix attrset chunk classification with consistent naming and nested expression handling.
- Extracted clipboard utility functions to dedicated module with improved OSC 52 and Termux support.
- Updated chunk read formatting with anchorStyle parameter and ellipsis standardization for improved consistency.
- Removed error on stale CRC when a chunk was already modified by an earlier batch op; the model can only know the pre-batch checksum.
- `ensure_batch_operation_target_current` now returns `Ok(true)` to signal auto-accept, skipping redundant CRC validation.
- Updated prompt to clarify batched line-scoped edits are supported and to require fully qualified chunk paths.
- Replaced nested operation objects with a flat edit schema using a single `target` field.
- Merged `sel` and `crc` into a unified `target: "chunk#CRC"` string copied from read output.
- Replaced `operations` array with `edits` and added `append`, `prepend`, `after`, `before` fields for insert positioning.
- Removed `defaultSelector` and `defaultCrc` top-level params; CRC is now always explicit per-edit.
- Fixed chunk edit operations to extract and use embedded CRC checksums from selectors as fallback validation.
- Refactored patch operations to parse selectors and strip CRC suffix before processing insert, replace, and delete commands.
- Extended parseChunkSelector to return optional CRC field extracted from selector suffix for validation.
- Improved operator precedence clarity in read tool by adding parentheses around nullish coalescing expression.
- Migrated native bindings from TypeScript wrappers to NAPI-RS generated modules with auto-generated type definitions and runtime enums.
- Replaced chunk tree API with stateful ChunkState class supporting render, edit, and resolve operations with improved error handling.
- Converted callback signatures to error-first pattern (error, result) for shell, PTY, glob, and grep operations.
- Introduced type-safe enums for MacOSAppearance, GrepOutputMode, KeyEventType, ImageFormat, and AstMatchStrictness replacing string literals.
- Refactored chunk tree implementation with dedicated modules for edit, indent, resolve, and state management with comprehensive validation.
- Moved clipboard utilities from native bindings to coding-agent package with improved OSC 52 and Termux compatibility.
- Added `anchorStyle` setting ("full", "kind", "bare") to control anchor name verbosity in chunk output.
- Changed anchor tag delimiters from `` to `[…]` and gutter separator from `│` to `|`.
- Changed edit response to render only changed hunks with context instead of the full chunk tree.
- Added `read.prosechunks` setting to enable chunk rendering for prose files (markdown, text, log, asciidoc, restructuredtext) in chunk edit mode.
- Added `read.explorechunks` setting to show chunk tree without checksums for read-only agents like explore.
- Implemented prose language detection and conditional chunk skipping logic based on file type and agent capabilities.
- Fixed zero-width insert detection to derive target indent from neighboring lines instead of replaced range.
- Improved indent selection for body-level insertions by picking deeper indent between two neighbors.
- Updated error messages to clarify insert vs splice operations and line range validation.
- Modified assertChecksum() return type to handle cases with default CRC and no explicit selector.
- Distributed language-specific AST classification logic from defaults module to individual language modules for 15+ languages.
- Simplified defaults module to minimal catch-all fallbacks, removing 341 lines of match-based classification logic.
- Consolidated chunk edit operations by removing splice operation and unifying with line-scoped replace parameters.
- Simplified chunk rendering output format by reducing thresholds and changing line count display from 'lines' to 'ln' suffix.
- Removed PI_CHUNK_SPLICES environment variable and chunkSplicesEnabled conditional logic throughout codebase.
- Changed chunk edit operation format from flat `op` field to nested keyed union structure with operation name as object key.
- Added parseKeyedChunkOp() function to normalize both keyed and legacy flat operation formats for backward compatibility.
- Enhanced chunk selector sanitization with filename prefix stripping and case-insensitive CRC checksum matching.
- Updated chunk edit prompt documentation and test suite to reflect new nested operation JSON structure.
- Added `new_segment` parameter to `init_experiment` to force new segment creation when contract fields match.
- Added `skip_restore` parameter to `log_experiment` to preserve working tree state and pre-existing uncommitted changes.
- Changed `log_experiment` to revert only run-modified files instead of entire working tree, preserving user changes.
- Changed `init_experiment` to detect matching contract fields and skip re-initialization unless `new_segment=true`.
- Added git status parsing utilities to track pre-run dirty paths and distinguish tracked vs untracked modifications.
- Removed secondary metrics validation requirement, making secondary metrics informational only.
- Fixed indentation and formatting across multiple files for consistency.
- Reformatted code blocks to use tabs instead of spaces and improved line breaks for readability.
- Added connection timeout configuration to benchmark runner for early abort on no events.
- Implemented two-phase timeout strategy in benchmark runner with connection and activity phases.