- Replaced all direct `process.cwd()` calls with `getProjectDir()` utility function across 40+ files to centralize project directory resolution logic.
- Added `getProjectDir()` and `setProjectDir()` functions to `@oh-my-pi/pi-utils/dirs` module to provide abstracted project directory management.
- Made `SessionManager.list()` method asynchronous to support asynchronous session discovery operations.
- Updated default working directory resolution throughout codebase to use `getProjectDir()` instead of `process.cwd()` for improved project directory detection.
- Extracted directory path utilities from multiple packages into a centralized '@oh-my-pi/pi-utils/dirs' module.
- Moved 30+ path helper functions (getAgentDir, getConfigRootDir, getPluginsDir, getMCPConfigPath, etc.) from scattered locations into a single shared utility module.
- Consolidated APP_NAME, CONFIG_DIR_NAME, and VERSION constants into the centralized dirs module for reuse across packages.
- Updated 70+ import statements across packages/ai, packages/coding-agent, packages/stats, and packages/tui to use the new centralized module.
- Removed local path construction logic and replaced with utility function calls for improved maintainability and consistency.
- Deleted packages/coding-agent/src/extensibility/plugins/paths.ts as its functions were moved to the centralized dirs module.
- Removed support for `.pi` configuration directory alias in favor of `.omp` across all packages.
- Updated all configuration paths and references from `.pi` to `.omp` in user and project directories.
- Refactored configuration discovery in builtin.ts to simplify directory traversal logic and remove multi-alias support.
- Simplified Python module discovery to use single directory paths instead of arrays of aliases.
- Updated debug and crash log paths from `.pi/agent/` to `.omp/agent/` in TUI package.
- Changed hashline format separator from two spaces to pipe character (|) throughout codebase for consistency.
- Simplified ollama installation checks in test files by replacing execSync with Bun.which() and inverting PI_NO_LOCAL_LLM to PI_LOCAL_LLM environment variable.
- Added early return guards in test beforeAll hooks to skip tests when required tools (ollama, magick) are unavailable.
- Added debug instrumentation to system prompt building via PI_DEBUG_STARTUP environment variable for startup performance monitoring.
- Removed prompt cache retention assertion from openai-codex streaming test.
- Changed hashline display format separator from pipe to two spaces for improved readability.
- Removed `lines` and `hashes` parameters from read tool in favor of automatic file display mode resolution.
- Added `resolveFileDisplayMode` utility to centralize file display mode configuration logic.
- Integrated file display mode settings into grep and read tools for consistent output formatting.
- Consolidated tool parameter types to use schema-derived types via Typebox `Static` utility.
- Updated parseLineRef to handle both legacy pipe-separator and new two-space hashline formats.
- Added new `replace` hashline edit operation for substring-style fuzzy text replacement without line references, with optional `all` flag for replace-all behavior.
- Added `noopEdits` array to `applyHashlineEdits` return value to report edits that produced no changes, including edit index, location, and current content for diagnostics.
- Added validation to detect and reject hashline edits using wrong-format fields (`old_text`/`new_text` from replace mode, `diff` from patch mode) with helpful error messages.
- Renamed hashline edit operation keys from `single`/`range`/`insertAfter` to `set_line`/`replace_lines`/`insert_after` for clearer semantics.
- Enhanced error messages for wrong-format hashline edits to guide users toward correct operation syntax.
- Added noopEdits array to applyHashlineEdits return type to track edits that produce no changes.
- Added validation to reject edits with wrong-format fields (old_text/new_text from replace mode, diff from patch mode) that indicate model confusion.
- Added additionalProperties tolerance to hashline edit schemas to allow flexible field handling.
- Added deduplication logic to remove duplicate edits targeting the same line(s) with identical destination content.
- Improved error handling for missing end fields in edit ranges by returning single-line specs instead of requiring both start and end.
- Enhanced no-op error recovery guidance in prompts with detailed instructions to re-read file and function context after consecutive no-op errors.
- Removed whitespace preservation logic that was overriding model-generated formatting choices in patch application.
- Deleted `preserveWhitespaceOnlyLines` and `preserveWhitespaceOnlyLinesLoose` functions that were incorrectly reverting intentional formatting changes.
- Updated test to reflect that model whitespace choices are now respected without override.
- Renamed hashline edit operation types from replaceLine/replaceLines to single/range for improved clarity.
- Renamed content field to replacement in hashline edit operations to better reflect its purpose.
- Enhanced no-op edit diagnostics to perform line-by-line comparisons and distinguish between identical and normalized replacements.
- Improved error messages for hashline edits to clarify differences between literal identical content and whitespace-normalized content.
- Removed timeout-retries configuration option from react-edit-benchmark CLI and simplified retry logic.
- Updated all test cases and documentation to reflect renamed hashline edit operation types and fields.
- Removed insertBefore and substr hashline edit operations, simplifying the edit API to support only replaceLine, replaceLines, and insertAfter operations.
- Updated hashline edit schema and type definitions to remove insertBefore and substr operation types from the ParsedRefs union and edit validation logic.
- Removed insertBefore and substr test cases from hashline test suite, including tests for insert-before functionality, anchor echo stripping, and substring matching.
- Updated benchmark runner to refactor edit operations from src/dst format to discriminated union types (replaceLine, replaceLines, insertAfter) and adjusted insertAfter line references.
- Redesigned hashline edit API to use discriminated union variants (replaceLine, replaceLines, insertAfter, insertBefore, substr) instead of nested src/dst structure.
- Changed hash algorithm from xxHash64 hex to xxHash32 base36 encoding and increased hash length from 2 to 3 characters.
- Added substr edit variant to match and replace content by unique substring when line hashes are unavailable.
- Implemented line relocation heuristics to resolve stale line references when hash uniquely identifies a moved line.
- Moved substr needle search from edit application phase to pre-validation phase for earlier error detection.
- Migrated hashline edit type definitions from manual TypeScript interfaces to schema-derived types using Static<typeof schema> pattern.
- Added `substr` source specification kind to match and replace lines by unique substring without requiring line-hash references.
- Implemented substring matching logic in hashline edits with validation for uniqueness and error handling for not-found and ambiguous cases.
- Added schema definition and type guards for the new `substr` operation type across patch system.
- Added mutation preview hints to error messages when edits fail with 'No changes made' errors, showing line numbers, hashes, and added/removed lines.
- Changed formatter to pin JavaScript fixtures to the flow parser to avoid parser-dependent formatting drift.
- Added whitespace preservation logic to treat whitespace-only differences as passing in file verification.
- Removed substring source specification kind from hashline edits, requiring users to use line-hash references instead.
- Simplified SrcSpec type to use generic type parameter for line references, removing substring variant from union.
- Updated react-edit-benchmark to use --max-tasks option for deterministic task sampling and changed default batch sizes to 1.
- Added streaming functions `streamHashLinesFromUtf8` and `streamHashLinesFromLines` for processing large files with configurable chunking.
- Added `HashlineStreamOptions` interface to control streaming behavior with `startLine`, `maxChunkLines`, and `maxChunkBytes` options.
- Changed hashline format from 4-character to 2-character hex hashes for more compact output.
- Updated `computeLineHash` function to normalize whitespace and removed line number from hash seed for consistency.
- Improved CLI argument parsing with explicit handling of `--help`, `--version`, and subcommand detection.
- Removed `@types/diff` dev dependency as it is no longer needed.
- Changed `HashlineEdit.src` from string format (e.g., `"5:ab"`, `"5:ab..9:ef"`) to structured `SrcSpec` object with discriminated union types (`{ kind: "single", ref: "..." }`, `{ kind: "range", start: "...", end: "..." }`, `{ kind: "insertAfter", after: "..." }`, `{ kind: "insertBefore", before: "..." }`, `{ kind: "substring", needle: "..." }`).
- Refactored `parseSrc` function to `parseSrcSpec` to handle structured `SrcSpec` objects instead of string parsing, replacing string validation and delimiter parsing logic with explicit case handling for each operation kind.
- Updated tool schema in `index.ts` to define `srcSpecSchema` as a discriminated union type with five variants, replacing the previous simple string-based `src` parameter definition.
- Added substring-based source matching for hashline edits to support matching lines by content when hash references are unavailable.
- Added automatic detection and repair of single-line merges where models incorrectly combine multiple lines into one.
- Added normalization of Unicode-confusable hyphens to ASCII hyphens to handle model-generated variations.
- Added heuristics to restore indentation and preserve wrapped line formatting during edits.
- Relaxed comma validation in src to allow commas while rejecting inputs with multiple line references.
- Enhanced parseLineRef to accept shorter hash prefixes instead of requiring exact hash matches.
- Improved error messages for hash mismatches to provide more actionable guidance.
- Replaced HashlineEdit API from old/new/after fields to src/dst fields with unified range syntax supporting single lines, ranges, insert-after, and insert-before operations.
- Added parseSrc() function to parse structured line references from src strings supporting formats like '5:ab', '5:ab..9:ef', '5:ab..', and '..5:ab'.
- Added heuristics to strip anchor line echoes and range boundary echoes from model-generated replacement content.
- Implemented preserveWhitespaceOnlyLinesLoose() for improved whitespace preservation using loose matching strategy when replacement line counts don't match.
- Added comprehensive benchmark reports for Claude Sonnet 4.5, Gemini 2.5 Flash Lite, and GPT-5.1 Codex Mini models evaluating hashline edit performance across 60 tasks.
- Added `toArray()` helper function to normalize `string | string[]` inputs for hashline edit operations with comma-separated line reference support.
- Added `HashlineMismatchError` class that displays grep-style output with `>>>` markers for hash validation failures.
- Added `HashMismatch` type for representing individual hash mismatches with line number, expected hash, and actual hash.
- Updated `HashlineEdit` type to accept `string | string[]` for `old` and `new` fields, allowing both singular and plural input formats.
- Reduced hash length from 4 to 2 hex characters (16-bit hashes) for more concise line references.
- Enhanced `parseLineRef()` to strip display-format suffixes and `validateLineRef()` to throw `HashlineMismatchError` with context lines for better error reporting.
- Added HashlineMismatchError class with formatted error messages showing mismatched hashes with context lines.
- Added HashMismatch type to represent hash validation errors with line number, expected, and actual hash values.
- Enhanced hash validation in applyHashlineEdits to collect all hash mismatches before applying edits instead of failing on first mismatch.
- Renamed HashlineEdit fields from 'src'/'dst' to 'old'/'new' for improved naming clarity and consistency.
- Added hashline edit mode for line-addressed edits using hash-verified line references with xxHash64 integrity verification.
- Replaced `edit.patchMode` boolean setting with `edit.mode` enum supporting 'replace', 'patch', and 'hashline' modes.
- Added `readHashLines` configuration setting to include line hashes in read output for hashline edit mode.
- Implemented `computeLineHash`, `formatHashLines`, `parseLineRef`, `validateLineRef`, and `applyHashlineEdits` utility functions for hashline operations.
- Updated read tool to support optional `hashes` parameter and prioritize hash lines over line numbers when both are requested.
- Changed `getEditModelVariants()` return type from `Record<string, 'patch' | 'replace'>` to `Record<string, EditMode | null>` and removed hardcoded model-specific defaults.
- Fixed patch applicator to preserve indentation in context-only hunks by skipping unnecessary adjustments when pattern equals actual content.
- Implemented linear regression-based tab width inference to correctly convert space-indented diffs to tab-indented files using ax+b model.
- Added regression tests for context-only hunk handling and space-to-tab indentation conversion with offset models.
- Updated patch tool documentation to emphasize never using edit operations for indentation or formatting fixes.
- Migrated all environment variable access from Node.js `process.env` to Bun runtime `Bun.env` API across the entire codebase.
- Updated 71 files including source code, tests, documentation, and configuration to use Bun's native environment variable API.
- Added comprehensive environment variables documentation in `packages/coding-agent/docs/environment-variables.md` covering 100+ environment variables organized by category.
- Updated CHANGELOG entries to reflect migration from `process.env` to `Bun.env` and environment variable prefix changes (PI_* vs OMP_*).
- Maintained identical behavior and logic across all changes - only the environment variable access method was updated.
- Migrated environment variable access from direct process.env to centralized getEnv() utility function across all packages.
- Renamed environment variable prefix from OMP_ to PI_ throughout codebase (e.g., OMP_CODING_AGENT_DIR -> PI_CODING_AGENT_DIR).
- Removed automatic environment variable migration from PI_ to OMP_ prefixes via migrate-env.ts module.
- Removed env setting from configuration schema and applyEnvironmentVariables() method from settings.
- Updated CI/CD build configuration to use PI_COMPILED flag instead of OMP_COMPILED.
- Changed venvPath property in PythonRuntime from nullable (string | null) to optional (string | undefined).
- Refactored ExecutablePathSearch to remove generic type parameter N and use pre-computed filename candidates instead of single filename.
- Extracted platform-specific candidate_filenames() functions to generate executable filename variants on Windows and Unix-like systems.
- Replaced manual PATH string splitting with std::env::split_paths() for cross-platform path parsing.
- Simplified find_in_path() method to delegate to pathsearch::search_for_executable() instead of custom path searching logic.
- Implemented executable_extensions() function with lazy initialization to parse PATHEXT environment variable on Windows.
- Enhanced executable() method to validate file extensions against known executable extensions instead of returning hardcoded true.
- Replaced SettingsManager class with new Settings singleton providing synchronous get/set API and background persistence.
- Introduced settings-schema.ts as single source of truth for all configuration definitions with 100+ settings organized into logical groups.
- Migrated from method-based settings access (getTheme(), setTheme()) to path-based access using dot notation (settings.get('theme'), settings.set('theme', value)).
- Removed 2035-line settings-manager.ts file and replaced with modular settings.ts (693 lines) and settings-schema.ts (836 lines) for improved maintainability.
- Unified settings schema into single source of truth eliminating duplicate definitions across settings-defs.ts and settings-manager.ts.
- Added persistent shell session support for bash tool with environment variable preservation across commands.
- Added shellForceBasic setting to force bash/sh even if user's default shell is different (default: true).
- Added OMP_SHELL_PERSIST environment variable to control persistent shell behavior (set to 0 to disable).
- Restructured system prompt with coordinator-specific guidance for parallel task delegation.
- Fixed incorrect byte and line limit calculations in file read tool that were applying user limits to total selected content instead of just user-limited content.
- Updated test to use SettingsManager.getGlobalShellConfig() instead of shell.getShellConfig() for consistent shell configuration access.
- Reorganized import statements across multiple files for consistency and alphabetical ordering.
- Changed firstLinePreviewChunks from let to const in read tool since it is only mutated via array methods.
- Added ToolChoice type and toolChoice parameter support across all AI providers (OpenAI, Azure OpenAI, Anthropic, Google) enabling fine-grained control over tool/function selection during LLM calls.
- Added toolChoice override capability to Agent.prompt() method and session prompt options allowing callers to control tool selection behavior per request.
- Added provider-specific tool choice mapping functions (mapAnthropicToolChoice, mapGoogleToolChoice, mapOpenAiToolChoice) to normalize tool choice formats across different LLM APIs.
- Removed kernel heartbeat/ping mechanism from PythonKernel, simplifying health monitoring by relying on direct isAlive() checks instead of periodic HTTP requests.
- Removed Prettier configuration files (.prettierignore and .prettierrc) and migrated formatting to Biome.
- Updated Biome configuration from version 2.3.11 to 2.3.12 and changed arrowParentheses rule from 'always' to 'asNeeded'.
- Pinned @biomejs/biome dependency to exact version 2.3.12 in package.json and bun.lock.
- Applied consistent arrow function formatting across 489 files by removing unnecessary parentheses around single parameters.
- Removed blank lines after comment blocks and reorganized imports for consistency across the codebase.
- Changed loadCustomModels from async to sync using fs.readFileSync for immediate resolution.
- Updated discoverModels to return synchronously, removing await from main.ts, pipeline.ts, and commit index.ts.
- Migrated sdk.ts to use node:fs instead of node:fs/promises for synchronous operations.
- Refactored scanDirectoryForSkills to use recursive traversal instead of batch Promise.all.
- Added tarball Dockerfile for testing npm publish/install flow with verdaccio registry.
- Converted named imports from node modules (fs, path, os) to namespace imports across all packages.
- Extended extension loader error handling with isEacces and hasFsCode type guards.
- Converted readdirSync, readFileSync, and statSync to async readdir, readFile, stat across skills and agent discovery.
- Made scanDirectoryForSkills async and refactored custom directory scanning to use Promise.all for concurrent processing.
- Updated agent discovery to use fs/promises for async file reading and refactored helper patterns.
- Added AgentParsingError exception class for better error handling during agent parsing.
- Added filesystem error type guards (isEnoent, isEacces, isPerm, etc.) to pi-utils for safe error checking.
- Added color manipulation utilities to pi-utils for accessibility features.
- Added color-blind mode setting to settings manager.
- Migrated plugins, settings, and config modules from sync to async file operations.
- Updated error handling to use new pi-utils type guards for type-safe checking.
- Removed WASM generation script; use Bun `wasm?raw` loader for imports.
- Added bunfig.toml with loaders for `.md`, `.py`, and `.wasm?raw` text imports.
- Added types/assets/index.d.ts for global TypeScript module declarations.
- Unified TypeScript configuration with tsgo-based checking across monorepo.
- Removed build and WASM steps from install and publish pipelines.
- Added tsconfig.publish.json files to all packages with optimized publish-time configuration.
- Updated all package.json scripts with prepublishOnly hooks for correct type checking during publish.
- Added @oh-my-pi/omp-stats path mappings to root tsconfig.json for consistent imports.
- Added WASM generation script for photon module and integrated into install:dev script.
- 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.
- converted relative imports to path aliases ($c/*, $ai/*, $tui/*, etc.) across all packages
- added per-package tsconfig.json with complete path mappings for runtime resolution
- set importModuleSpecifier to non-relative for IDE auto-import preferences
- updated dev script to run from monorepo root for consistent path resolution
- Added output-utils module with tail buffer and artifact allocation helpers.
- Added tool-result module for standardized tool result construction with metadata.
- Replaced inline output truncation with structured metadata system across all tools.
- Updated executors to track detailed output statistics instead of full file paths.
- Standardized artifact storage using pre-allocated paths instead of inline writing.
- Simplified Python gateway coordination by removing reference counting and idle timeout functionality.
- Updated Python kernel initialization to support environment variable setup and working directory configuration.
- Modified interactive status display to show Python and venv paths instead of client counts.
- Updated system prompt to clarify CHECKPOINT step 0 timing after user request completion.
- Added artifact storage system with artifact:// URL protocol for truncated outputs.
- Added structured output metadata system with OutputMetaBuilder for consistent notices.
- Added standardized tool error types (ToolError, MultiError, ToolAbortError).
- Updated all tools to use structured metadata instead of inline notices.
- Removed activeForm field from TodoItem interface and simplified todo display logic.
- Converted dynamic imports to static imports in installer and exa tools.
- Renamed task parameter from vars to args throughout task tool interface.
- Simplified task template validation by removing strict placeholder requirements.