- Added PI_STRICT_EDIT_MODE environment variable to control model-specific edit mode defaults.
- Wrapped model-specific edit mode logic behind PI_STRICT_EDIT_MODE condition for conditional behavior.
- Replaced Bun.env direct access with $env utility for consistent environment variable handling.
- Updated rate-edit-tool and typescript-edit-benchmark to set PI_STRICT_EDIT_MODE in test environments.
- 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.
- 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.
- 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.
- 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 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.
* fix(ai): update spoofed Gemini CLI User-Agent to v0.35.3 format
Gemini CLI v0.35+ changed its User-Agent format:
- Dropped 'google-api-nodejs-client/10.5.0' suffix
- Added surface field (third param in parens)
- New format: GeminiCLI/VERSION/MODEL (PLATFORM; ARCH; SURFACE)
The stale v0.34.0 UA was contributing to google-gemini-cli/gemini-3.1-pro-preview
being rejected, alongside Google's new abuse detection for third-party CCA usage
(google-gemini/gemini-cli#22970).
Verified: model responds successfully with updated UA.
* feat(scripts): add spoofed version drift checker
Fetches latest stable release from google-gemini/gemini-cli GitHub
releases and compares against the hardcoded version in the provider.
bun check-spoofed-versions # report drift, exit 1 on mismatch
bun check-spoofed-versions --update # apply version bump in-place
Extensible for additional spoofed tools (Antigravity, Copilot headers).
- Introduced Effort enum and ThinkingConfig metadata for per-model reasoning capabilities with min/max effort levels.
- Migrated thinking level API from string-based ThinkingLevel to structured Effort enum across agent and AI packages.
- Added model-thinking module with effort mapping, policy application, and semantic versioning utilities for provider-specific thinking modes.
- Removed supportsXhigh() function and replaced effort clamping with model-aware validation using ThinkingConfig metadata.
- Expanded models.json with thinking configuration objects for 50+ models including Claude, Gemini, and OpenAI variants.
- Added Python analysis scripts for edit tool usage patterns and tool invocation stream processing.
- Added sync-exports.ts script to enforce canonical package.json field ordering and auto-generate exports from filesystem structure.
- Expanded subpath exports across 11 packages (ai, agent, coding-agent, natives, stats, utils, tui, swarm-extension) to enable flexible module imports.
- Reorganized package.json field ordering to follow standard conventions with metadata before main/exports and files/exports at end.
- Consolidated wildcard export patterns to simplify import paths while maintaining backward compatibility with explicit subpath exports.
bun resolves transitive deps from the npm registry even when all
packages are provided as local tarballs. Since 12.15.0 isn't published
yet, these lookups fail. Adding overrides in package.json forces bun
to resolve all @oh-my-pi/* packages from the local tarballs.
The coding-agent tarball depends on @oh-my-pi/pi-ai@12.15.0 etc. which
aren't published yet. Two separate bun add calls caused the second to
resolve deps against npm instead of the already-installed local tarballs.
- Added support for braced escape sequences (\p{...}, \P{...}, \x{...}, \u{...}) in regex pattern sanitization to properly preserve unicode property escapes and hex escapes.
- Improved LSP client message writing by simplifying header encoding and refactoring abort signal handling with the untilAborted utility.
- Enhanced native addon installation script to dynamically fetch release tags from GitHub API instead of using hardcoded versions.
- Relaxed native addon validation to only error when no addons are found rather than when any are missing, improving flexibility in addon availability.
- Added CPU variant support for x64 native addons with modern (AVX2/x86-64-v3) and baseline (x86-64-v2) variants, enabling automatic fallback when modern variants are unavailable.
- Added automatic AVX2 CPU detection on Linux, macOS, and Windows platforms to select appropriate native addon variant at runtime.
- Updated native addon filename scheme to include CPU variant suffix (e.g., pi_natives.linux-x64-modern.node) for x64 platforms.
- Updated CLI update mechanism to support downloading and installing multiple native addon variants per platform with fallback support.
- Removed fallback untagged pi_natives.node binary creation; platform and variant-tagged binaries are now required.
- Fixed incorrect path resolution for CLI module by using Bun.fileURLToPath() to convert import.meta.resolve() result to a proper file path.
- Reordered constant declarations to ensure TMP_DIR is initialized before CLI_PATH which depends on it.
- Updated scripts/repro-stuck.ts to use consistent CLI path resolution with Bun.fileURLToPath().
- Fixed schema normalization in Google provider to handle array-valued type fields by converting them to single type with nullable flag.
- Refactored version parsing in install script to use bash parameter expansion instead of IFS field splitting.
- Changed variable declarations from let to var in theme module global scope.
- Replaced ASCII ellipsis characters (three dots '...') with Unicode ellipsis character ('...') throughout the codebase for improved typography.
- Adjusted string truncation logic to account for single-character Unicode ellipsis instead of three-character ASCII ellipsis, reducing reserved space from 3 to 1 character in truncation calculations.
- Updated truncation offsets in multiple files (session-manager, agent, executor, footer) to preserve 2 additional characters before ellipsis due to more compact Unicode representation.
- Refactored readSseJson abort handling to use pipeThrough with signal instead of manual event listeners, improving stream cancellation semantics.
- Replaced finally block with catch block to handle abort errors explicitly, preventing unnecessary cleanup operations.
- Reformatted test strings to use single quotes for consistency with project style guidelines.
- Removed unused isEnoent import and consolidated error code checking in dump-edit-history script.
- Refactored SSE stream parsing to use generic `readSseJson` utility instead of domain-specific handlers across multiple packages.
- Migrated from Node.js Buffer API to Web standard APIs (Uint8Array, TextDecoder, DataView) for cross-platform compatibility.
- Simplified stream transformation pipeline by consolidating multiple stream operations into unified `createTextLineSplitter` utility.
- Refactored `ptree.ts` to remove complex stream pumping infrastructure and simplify stderr handling with direct async iteration.
- Rewrote stream utilities to operate at binary level with byte-level parsing for improved efficiency and reduced string allocations.
- Updated TypeScript configuration to include DOM.AsyncIterable type definitions for async iterable DOM API support.
- Updated release process to create new commits with descriptive messages instead of amending previous commits.
- Changed release push strategy from force push to regular push for better git history integrity.
- Extended check:rs script to verify minimal dependency versions and Windows MSVC target compilation.
- Added x86_64-pc-windows-msvc target to Rust toolchain configuration for cross-compilation support.
- Migrated timing measurements from `performance.now()` to `Bun.nanoseconds()` for higher precision benchmarking across all benchmark and timing-sensitive code.
- Updated elapsed time calculations to convert nanoseconds to milliseconds using division by 1e6 to maintain consistent time units.
- Increased benchmark precision from 4 to 6 decimal places for per-operation timing measurements.
- Refactored grep benchmark to use averaged timing values instead of storing individual iteration times, reducing memory overhead.
- 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).
- Added Python prelude caching to improve startup performance by caching helper functions and module discovery results.
- Added OMP_DEBUG_STARTUP environment variable for detailed startup stage tracing across initialization pipeline.
- Changed Python kernel initialization to require shared gateway mode, removing support for local kernel gateway startup.
- Improved error handling in shared gateway acquisition with automatic retries on 5xx status codes.
- Added repro-stuck.ts script for reproducing and debugging rare CLI hang issues with Chrome DevTools integration.
- Added trace-loader.ts preload script for tracing module resolution during startup diagnostics.
- Added job-level status checking in CI watcher to fail fast on first job failure with detailed error reporting.
- Added automatic log tailing for failed CI jobs showing last 20 lines of output.
- Added native addon distribution and installation support to the CLI update mechanism, enabling platform-specific native modules to be downloaded and installed alongside the main binary.
- Added platform validation in native addon loader to verify supported platforms (linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64) with helpful error messages for unsupported configurations.
- Enhanced native addon loading error messages to provide platform-specific troubleshooting guidance for both npm/bun installations and local development environments.
- Updated installation scripts (install.sh, install.ps1) to download and install native addon files alongside the main binary during CLI installation.
- Renamed package directory from packages/pi-utils to packages/utils.
- Updated all path aliases and references in tsconfig.base.json to reflect new package location.
- Updated workspace references in bun.lock and package.json to point to new packages/utils directory.
- Updated documentation and build scripts to reference the renamed utils package.
- Fixed LSP servers showing as 'unknown' in status display when server warmup fails by using index-based lookup to correctly extract server name and file types.
- Fixed Read tool loading entire file into memory when offset/limit was specified by implementing streaming line-by-line processing that only collects requested range.
- Fixed slash command autocomplete applying stale completions when typing quickly by adding staleness check before applying completion on Enter/Return.
- Reorganized npm scripts to follow consistent naming pattern with separate TypeScript and Rust variants for check, lint, fmt, and fix operations.
- Updated release script to properly handle Rust workspace version updates in Cargo.toml files and regenerate lockfiles.
- Updated minimum Bun engine requirement from 1.2.0 to 1.3.7 across root and coding-agent packages.
- Added Bun version validation to install.ps1 with Get-BunVersion, Test-BunVersion, and Assert-BunVersion functions to enforce minimum version requirement.
- Added Bun version validation to install.sh with version_ge and require_bun_version functions to enforce minimum version requirement.
- Replaced external JSON/JSONL parsing libraries with Bun's built-in JSON5 and JSONL APIs across all packages.
- Removed dependencies: json5, ndjson, get-east-asian-width, json-stringify-safe, split2, through2, and @types/ndjson.
- Replaced custom text width and ANSI wrapping implementations with Bun.stringWidth() and Bun.wrapAnsi() APIs.
- Updated Bun type definitions from ^1.2.17 to ^1.2.18 and bun-types from ^1.3.5 to ^1.3.7.
- Refactored JSONL parsing throughout codebase to use Bun.JSONL.parse() and Bun.JSONL.parseChunk() with improved buffer management and error handling.
- Updated test assertions to use Bun.stringWidth() for dynamic width calculations instead of hardcoded values.
- 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.
- Fixed autocomplete race condition in editor by tracking request ID to discard stale results.
- Added guard clause in plugin-settings to prevent null reference when settings list is undefined.
- Added branch change callbacks in footer to update state after git head resolution.
- Added timing instrumentation to Python kernel startup and gateway acquisition.
- Improved error logging in settings manager for config file access failures.
- Fixed model discovery to re-check file existence after JSON to YAML migration and improved file access error handling.
- 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.
- 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
- Enhanced patch applicator with fallback variant generation and improved fuzzy matching.
- Added support for ellipsis placeholders, top-of-file anchors, and comment-prefix normalization.
- Renamed operation and moveTo parameters to op and rename across patch tool interfaces.
- Added batch processing system to benchmark runner for parallel task execution.
- Added comprehensive benchmark reports for Claude Haiku and GPT-5.1-codex-mini models.
- Added new @oh-my-pi/react-edit-benchmark package for React source code mutation testing.
- Added --no-title flag to disable automatic session title generation in coding-agent.
- Changed default behavior of read tool to omit line numbers by default.
- Added environment variable support for edit tool configuration and fuzzy matching.
- Updated test files to use import.meta.dir for ES module compatibility.
- Added Prettier configuration and CI improvements for private package handling.
- Added allowFuzzy option to control fuzzy matching behavior in patch operations.
- Added validation for line numbers to ensure they are >= 1 in patch headers and hints.
- Enhanced fuzzy matching algorithms to respect the allowFuzzy setting for precise control.
- Fixed patch application to prefer actual diff over cached preview when displaying results.
- Added Windows ARM64 binary support and architecture detection in installers.
- Updated WASM loading to use streaming with base64 fallback for binary compatibility.
- Moved TTSR settings to dedicated tab and expanded abbreviation to Time Traveling Stream Rules.
- Added comprehensive install testing infrastructure with Docker validation.
- Updated package name from @oh-my-pi/omp-coding-agent to @oh-my-pi/pi-coding-agent.
- Removed historical version entries from multiple package CHANGELOG files.
- Added changelog validation functions to release script.
- Prevented creation of empty version entries in changelog generation.
- Added --ref flag to install specific tags, branches, or commits from source or binary releases.
- Enabled source installation from git refs by cloning and checking out the specified reference.
- Added git availability check for source installations with --ref flag.
- Updated README with usage examples for --ref flag on both shell and PowerShell installers.