- Migrated all package tsconfig files to extend tsconfig.workspace.json for unified TypeScript configuration across monorepo.
- Consolidated build and check scripts across 10+ packages to use biome for linting/formatting with separate type checking via tsgo.
- Renamed build scripts from build:native and build:binary to build for simplified command naming across packages/natives and packages/coding-agent.
- Refactored CI workflow to invoke bun tasks instead of inline shell scripts, reducing workflow complexity by 40+ lines.
- Removed sync-exports.ts and repro-stuck.ts scripts; deleted path aliases from tsconfig.base.json in favor of workspace-based configuration.
- Updated turbo.json with new task definitions (check:types, lint, fmt, fix) and removed build:native/embed:native tasks.
- Corrected blank line insertion logic to preserve tight packing for sibling declarations when editing packed containers.
- Extracted visible_child_chunks() and sibling_gap_has_blank_line() helpers to unify child filtering and gap detection logic.
- Updated VARIABLE_TRAITS to mark variables as packed and addressable_leaf for consistent spacing behavior.
- Changed Key chunk kind to use PACKED_LEAF_TRAITS for proper tight packing alignment.
- Added regression tests for TOML table and TypeScript variable packing after insertions.
- Refactored test suite to use top-level hooks instead of describe block for improved test isolation.
- Enhanced streaming mock to support delayed delta emission via waitBeforeFirstDelta promise.
- Improved auto-generated file abort test with precise timing control to verify abort occurs before delta updates.
- Fixed file not found error handling in auto-generated marker detection to gracefully return undefined instead of propagating errors.
- Made assertEditableFileContent function synchronous to simplify API and improve error handling consistency.
- Updated test assertions to match synchronous function behavior using toThrow instead of rejects patterns.
- Removed obsolete test case for doc comment preservation during replace operations.
- Extracted `structuredCloneJSON()` utility to centralized package for consistent deep cloning with JSON fallback.
- Consolidated duplicate cloning logic across openai-responses, openai-responses-shared, and validation modules.
- Added resilience to message cloning in extension runner with try-catch fallback for non-cloneable objects.
- Optimized context emission in extension runner by skipping message cloning when no handlers exist.
- Added optional `contentIndex` field to AssistantMessageEvent variants for type consistency.
- Added `onAssistantMessageEvent` callback to Agent API for inspecting and aborting assistant streaming events.
- Added `setAssistantMessageEventInterceptor()` method to dynamically update assistant message event handlers.
- Converted `checkAutoGeneratedFileContent()` from async to synchronous for improved streaming edit abort detection performance.
- Implemented LRU caching in auto-generated file detection with early path-based checks to prevent unnecessary edits.
- Refactored streaming edit pre-caching to use assistant message event interception for real-time abort capability.
- Extracted `peekFile()` utility for efficient file prefix reading with pooled buffer reuse strategy.
- Extracted image metadata detection and MIME type utilities to @oh-my-pi/pi-utils package for shared use across projects.
- Consolidated image-input.ts and mime.ts modules into image-loading.ts with simplified API removing redundant metadata parameters.
- Updated all import paths across coding-agent to use readImageMetadata from @oh-my-pi/pi-utils instead of local utilities.
- Added peek-file utility module to @oh-my-pi/pi-utils with buffer pooling for efficient file header reading.
- Removed leading trivia preservation logic that duplicated attributes during whole-chunk replacements.
- Deleted LeadingTriviaFamily enum and related detection/matching functions (preserve_attached_leading_trivia, replacement_supplies_leading_trivia, detect_leading_trivia_family, matches_leading_trivia_family).
- Added test case verifying that whole-chunk replace operations do not duplicate attributes.
- Enhanced chunk listing output with hierarchical tree visualization showing parent-child relationships and signatures.
- Refactored chunk display logic into recursive emit_children function to support nested tree traversal.
- Remove pi-ref.ts deferred barrel import (no longer needed after circular dep fix)
- Update extension/hook/custom-tool/custom-command loaders to use direct imports
- Fix warmPythonEnvironment mock return type in python tool tests (add docs field)
- 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.