Bun's global bin entry on Windows is a regular-file .exe shim, not a
symlink, so the standalone-binary override would have rerouted a
legitimate bun-managed install to in-place binary replacement and
clobbered the shim. Gate the override on POSIX, where package-manager
bin entries are always symlinks; add a regression test.
resolveUpdateMethod classified the install purely by directory containment,
so a standalone binary placed where `npm prefix -g` / `bun pm bin -g` also
points (e.g. ~/.local/bin) was misrouted to `npm install -g`, which then
aborted with EEXIST refusing to overwrite the existing regular file. Now a
plain executable (not a symlink) inside a package-manager bin dir is treated
as the standalone binary and self-updated in place.
- omp update's getBinaryName now detects a musl Linux host (Alpine release file or /lib/ld-musl-* loader, mirroring scripts/install.sh) and downloads omp-linux-musl-<arch>, so self-update no longer replaces a musl install with the glibc build.
- Updated musl-release dry-run assertions to the Bun.build output format the binaries script now emits; promoted the musl changelog entry to [Unreleased].
- Detected npm-owned global bin paths and Windows npm launcher shims before falling back to binary replacement.
- Added npm install argv construction that pins the registry and native package versions.
- Covered npm shim resolution and npm update arguments in update-cli tests.
Fixes#5053
Added timeout-backed AbortSignals to update, Hindsight, and Smithery fetch calls so stalled endpoints abort instead of hanging indefinitely.
Added regression coverage for the timeout signals on the exposed command/client paths.
Fixes#4229
- Switched to unique, timestamped backup file paths to avoid file lock collisions during binary replacement.
- Implemented a best-effort strategy for backup deletion, allowing successful updates even if the previous process image remains locked.
- Added a cleanup routine for sweeping stale backups, including legacy files, during each update attempt.
- Added Homebrew and mise install-source detection in `resolveUpdateMethod` using prefix, bin-dir, and shim checks.
- Added `runUpdateCommand` delegation to `updateViaHomebrew` and `updateViaMise` for manager installs.
- Changed `--force` behavior for package managers to run `brew reinstall` and `mise install --force`.
bun install -g <pkg>@<v> did not reliably re-resolve transitive
optionalDependencies, so @oh-my-pi/pi-natives and the platform leaf
@oh-my-pi/pi-natives-<tag> stayed at the previous version while
@oh-my-pi/pi-coding-agent moved. The loader’s validateLoadedBindings
then aborted because the .node file exposed the old
__piNativesV<old> sentinel instead of __piNativesV<new>.
buildBunInstallArgs now pins @oh-my-pi/pi-natives and (when the
running tag is one the release pipeline publishes) the platform
leaf to the same version it installs for @oh-my-pi/pi-coding-agent,
so bun replaces all three in lock-step. The leaf is gated by the
same SUPPORTED_PLATFORMS set the loader uses, so unsupported tags
still surface the original 'no matching version' diagnostic instead
of EBADPLATFORM.
Fixes#1824
omp resolves the update target by querying https://registry.npmjs.org/ directly, but `bun install -g pkg@<version>` would then consult bun's on-disk manifest snapshot AND honour the user's npm-mirror configuration (corporate proxy, Taobao, …). Either source can lag the upstream registry by minutes-to-hours, in which case bun rejects the version with `No version matching "X" found for specifier "@oh-my-pi/pi-coding-agent" (but package exists)` even though the registry omp just queried is serving it.
The bun install step now runs with both `--no-cache` (skip the manifest snapshot) and `--registry=https://registry.npmjs.org/` (pin the official catalog regardless of bunfig/.npmrc) so the install observes the same registry state the version check used. The registry URL is centralised in an `NPM_REGISTRY` constant shared by `getLatestRelease` and `buildBunInstallArgs`.
Fixes#1686
Rolled back binary updater replacements when post-install version verification fails instead of deleting the previous working binary first.
Added a release workflow gate that downloads the published macOS arm64 asset and verifies codesign plus --version before npm publishing.
Fixes#1240
- Collapsed a multi-line reinstall-warning `console.log` statement into a single line.
- Preserved the existing warning message text and only simplified its formatting.
The fallback reinstall hint printed when omp update can't verify the new
binary pointed at https://raw.githubusercontent.com/can1357/oh-my-pi/main/install.sh,
which returns 404. The installer actually lives at scripts/install.sh
(consistent with the README install instructions).
- Removed export leakage by demoting many helper and const symbols to module-local scope.
- Renamed underscore-prefixed internals and cache fields, then updated related references and `satisfies never` checks.
- Deleted obsolete logic branches and helpers, including harmony-stream interruption flow and unused benchmark runtime helpers.
- Updated Biome config and manifests by broadening lint coverage and removing an unused `@napi-rs/cli` dev dependency.
- Adjusted tests and utilities to use renamed test helpers and remove redundant private test-only helpers/locals.
isPathInDirectory only normalized strings via path.resolve, so on Windows
when Bun is installed via Scoop (~/.bun is a junction to scoop\persist\
Oven-sh.Bun\.bun) the omp path from $which and the bunBinDir from
'bun pm bin -g' compared as different directories, causing 'omp update'
to take the binary-swap path instead of 'bun install -g' and fail with
EPERM unlinking omp.exe.bak (Bun has the running exe open). Layer
fs.realpathSync.native on top of the existing lexical guard, resolving
the file's parent dir so non-existent target paths still fall through.
Fixes#845
- 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.
- Fixed resource refresh tracking by storing connection references alongside promises to prevent stale deduplication.
- Fixed update target resolution to explicitly handle missing ompPath and use path.resolve() for consistent normalization.
- Added error handling and logging in Smithery registry detail fetching to gracefully handle failures and track issues.
- Fixed virtualization context cleanup in error paths to prevent partially-started instances from remaining active.
- Fixed API key retrieval to use dynamic provider configuration instead of hardcoded provider string.
- Enhanced test utilities to capture and verify request parameters for improved test coverage and debugging.
- Consolidated @oh-my-pi/pi-utils subpath imports into single package root import across 100+ files.
- Moved tryParseJson utility from local web scrapers module to @oh-my-pi/pi-utils package for centralized JSON parsing.
- Renamed loadSkillsFromDir to scanSkillsFromDir and refactored skill discovery to use fs.promises.readdir instead of glob-based approach.
- Replaced custom parseJSON with tryParseJson across discovery modules for consistent error handling.
- Removed emitCustomToolSessionEvent method and cleanupSshResources function, consolidating shutdown logic into dispose method.
- Updated glob pattern construction to use GlobBuilder with literal_separator(true) for improved path handling.
- 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.
- Changed release info fetching from GitHub API to npm registry to avoid unauthenticated rate limiting.
- Constructed deterministic GitHub release download URLs instead of relying on API response.
- 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.
- Updated Claude Code version header to 2.1.39 and runtime version to v24.13.1.
- Increased request timeout from 60s to 600s for improved reliability on slower connections.
- Reordered Accept-Encoding header values to prioritize Brotli compression.
- Updated OAuth endpoints to use platform.claude.com and expanded scopes to include user:sessions:claude_code and user:mcp_servers.
- Removed deprecated beta features claude-code-20250219 and fine-grained-tool-streaming-2025-05-14.
- Improved Bun binary detection and update process with version verification and environment variable checking.
- 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.
- Migrated from Node.js to Bun runtime by replacing @types/node with @types/bun and bun-types dependencies.
- Downgraded @types/diff from ^8.0.0 to ^7.0.2 in coding-agent package.
- Updated tsconfig.base.json to include DOM.AsyncIterable in lib configuration for async iterable DOM API support.
- Simplified stream handling in update-cli.ts by removing Readable.fromWeb() conversions and using response.body directly with pipeline().
- Simplified TextDecoderStream instantiation in stream.ts to use default parameters instead of explicit UTF-8 encoding configuration.
- Added defensive null/undefined handling in agent-loop.ts result assignment using nullish coalescing operator.
- 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.
- 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.
- 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.
- 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.
- 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 OAuth callback server with automatic port fallback and CSRF protection.
- Added persistent SQLite-based credential storage replacing auth.json file system.
- Added logout and status CLI commands for OAuth provider management.
- Refactored all OAuth flows to use common OAuthCallbackFlow base class.
- Added automatic regex pattern validation with fallback to literal mode in grep tool.
- Added thinkingLevel field to agent frontmatter allowing subagents to override thinking level with clamping to model capabilities.
- Added structured output schema to reviewer agent ensuring consistent review output format with findings, correctness verdict, and confidence.
- Expanded system prompt with defensive reasoning guidance including assumption checks, edge case awareness, and completion reflex inhibition.
- Consolidated expandPath, parseFrontmatter, and parseAgentFields utilities into discovery/helpers module eliminating code duplication across loaders.
- Replaced silent error handling with logger.warn calls across config parsing, migrations, extension loading, and OAuth refresh failures.
- Added 30+ built-in color themes and comprehensive symbol customization via theme presets and overrides.
- Added status line segment editor with presets, separators, and customizable left/right segments.
- Added Biome CLI-based linter client as alternative to LSP for diagnostics and formatting.
- Added 20MB file size limit for image files to prevent memory issues during serialization.
- Replaced hardcoded Unicode symbols throughout codebase with theme-configurable symbol system.
- Renamed CLI binary and package from 'pi' to 'omp' across all platforms and installers.
- Changed environment variable prefix from PI_* to OMP_* with automatic migration support.
- Changed configuration directory from ~/.pi/ to ~/.omp/ with multi-path fallback discovery.
- Added getConfigDirPaths(), findConfigFile(), and readConfigFile() functions for config resolution across .omp, .pi, and .claude directories.
- Added `pi update` command for checking and installing CLI updates from GitHub releases or bun.
- Added cross-platform installer scripts (shell and PowerShell) with automatic PATH configuration.
- Changed HTML export to use compile-time bundled templates via Bun macros.
- Changed `exportToHtml` and `exportFromFile` functions to async operations.