Files
oh-my-pi/packages/utils/CHANGELOG.md
T

9.1 KiB

Changelog

[Unreleased]

Added

  • Added profile-aware directory helpers and isolated profile state roots, while keeping the install ID shared across profiles.

[15.12.4] - 2026-06-13

Fixed

  • Fixed abortable stream wrappers to cancel the source stream on abort, so timeout watchdogs release upstream HTTP bodies instead of only stopping the local reader.

[15.12.0] - 2026-06-12

Added

  • Added support for a runtime overrides map in RuntimeInstallSpec, which is now written into generated runtime package.json manifests to force dependency pins (including transitive ones) across the runtime tree
  • Added a lightweight loop-phase breadcrumb stack (pushLoopPhase/popLoopPhase/currentLoopPhase, plus takeRecentLoopPhase which returns the live phase or the most recently popped one and clears it) so the TUI event-loop watchdog can attribute a main-thread block to the phase that caused it — including a synchronous phase already popped before the watchdog's delayed tick runs (#2485)
  • Added FetchWithRetryOptions.timeout (forwarded to the underlying fetch call). false disables Bun's native ~300s pre-response timeout; a positive number overrides the ceiling. Bare browser/Node fetch ignores it (#2422)
  • Added runtime-install: shared on-demand runtime dependency support — ensureRuntimeInstalled() (locked, idempotent bun install of a pinned dependency set into a cache dir) and a multi-root installRuntimeModuleResolver()/resolveRuntimeModule() for loading those graphs inside compiled binaries (Bun #1763). Extracted from the coding-agent tiny-model worker; now also backs Mnemopi's on-demand fastembed runtime (#2389)
  • Added getFastembedRuntimeDir() (~/.omp/cache/fastembed-runtime) alongside getFastembedCacheDir()
  • Added getEditorConfigFormatting(file): returns the .editorconfig-pinned tabSize/insertSpaces (both optional, no fallback) so LSP-format callers can layer per-file defaults under it without paving over silence with the renderer's display tab width (#2329).
  • Added the path-tree module (buildPathTree, walkPathTree, formatGroupedPaths, isUrlLikePath), moved from the coding agent's grouped file output so compaction file lists can share the same prefix-folded directory-tree rendering; formatGroupedPaths gains an optional annotate callback for per-file suffixes
  • Restored PI_DEBUG_STARTUP streaming startup markers: logger.time now writes a synchronous [startup] <op>:start / :done / :fail stderr line per phase (independent of PI_TIMING), so a startup that hangs hard still names the phase it is stuck in — the PI_TIMING tree only prints after startup completes and is structurally unable to diagnose a hang. The CLI runner emits cli:load:<name> markers around each lazily-imported command module for the same reason.
  • Added logger.openSpanPath(): ops of the currently-open timing-span chain (root → deepest), used by the coding agent's startup watchdog to name the in-flight phase of a stalled startup.
  • Added declareWorkerHostEntry() / workerHostEntry() in the side-effect-free worker-host module (also re-exported from env): self-dispatching CLI entrypoints declare Bun.main as the worker host so worker spawn sites can re-enter the single entry module with WorkerOptions.argv selectors across source, npm-bundle, and compiled distributions
  • Added getAuthBrokerSnapshotCachePath() with OMP_AUTH_BROKER_SNAPSHOT_CACHE override support for isolating the encrypted broker snapshot cache.
  • Added color helpers colorLuma (perceptual luma), relativeLuminance (WCAG, linearized sRGB), and hslToHex to the color utilities. The luminance helpers parse #rgb/#rrggbb hex and 256-color palette indices, returning undefined for unparseable values.
  • Added peekFileEnds, a single-open head-and-tail file peek helper that reuses the head bytes for the tail when the file fits the head window.
  • Added peekFileTail, the tail mirror of peekFile: reads up to the last maxBytes of a file ending at EOF, reusing the same pooled-buffer strategy (no per-call allocation for small reads).
  • Added getFastembedCacheDir to return the FastEmbed model cache directory under ~/.omp/cache/fastembed
  • Added an XDG-aware tiny-title model cache directory helper for coding-agent local title models.

Changed

  • Changed prompt.compile() to cache compiled templates by the raw template string so repeated calls reuse the same compiled function without re-disambiguating
  • Snowflake.formatParts packs the id as a single 64-bit BigInt hex format instead of stitching four 16-bit segments (simpler and ~1.7x faster), and getTimestamp extracts via exact double arithmetic instead of a BigInt round-trip. Output is bit-identical.
  • Logger initialization is lazy: the winston logger, file transport, and log-directory creation now happen on first log emission instead of at module import (the import previously cost ~8ms of fs work on the CLI startup path); the in-memory timing infrastructure never touches winston
  • prompt.format() post-processing got cheap per-line guards and a single-pass ASCII-symbol replacement (was 7 chained regex passes per line), roughly halving render post-processing cost; output is byte-identical
  • logger.printTimings() (the PI_TIMING startup tree) now surfaces two previously-invisible regions: a (before instrumentation) line for runtime init / uncaptured pre-marker work, and an (unattributed self) line for the root span's own untimed work so the gap between visible top-level spans and Total is no longer swallowed. Total is now labelled (since first marker) to make the window explicit. The restored module-timer.ts preload can feed module spans into the report: each module records onLoad → final top-level marker as total, a prepended body marker → final marker as body/TLA, and resolved static imports as a bounded dependency tree so the report separates graph wait from actual top-level module work.

Fixed

  • Made TempDir cleanup retry transient Windows EBUSY/EPERM/ENOTEMPTY removal failures so tests are less likely to fail when deleting just-used temp directories.
  • Fixed abortable stream wrappers to cancel the source stream on abort, so timeout watchdogs release upstream HTTP bodies instead of only stopping the local reader.
  • Fixed cleanup reentry noise during fatal shutdown: recursive cleanup requests now no-op idempotently instead of logging repeated Cleanup invoked recursively errors (#2284).
  • Fixed the {{join}} prompt helper joining with a literal two-character \n when templates pass "\n" as the separator — Handlebars string literals carry no escape processing. The separator now unescapes \n/\t, matching the {{#list}} helper's documented convention (visible as literal \n between paths in compaction <read-files> lists).
  • Fixed prompt.format() so ASCII symbol replacements such as --> and != still run on lines containing a closing HTML comment token when not inside a comment
  • isCompiledBinary() now also honors a define-folded process.env.PI_COMPILED (only Bun.env was checked), so builds that constant-fold process.env keep compiled-binary detection without relying on import.meta.url bunfs markers
  • omp <cmd> --help now loads only the requested command module instead of the entire command table, so an unrelated command whose import graph hangs or crashes can no longer take down every per-command help invocation.
  • Hardened getIndentation against malformed paths: any filesystem error from the .editorconfig probe (e.g. ENAMETOOLONG on oversized garbage path segments) is now swallowed and cached as a miss instead of escaping and crashing the TUI mid-render (#1871).
  • Fixed getIndentation (and the edit renderer's replaceTabs callers) crashing with ENAMETOOLONG/ENOTDIR/etc. when handed a path with an overlong component or a non-directory in its parent chain. Editorconfig discovery now short-circuits to the default tab width on any path component above NAME_MAX (255 bytes) and absorbs any FsError while walking the editorconfig chain — best-effort discovery must never escape as an uncaught exception (#1872).
  • Fixed $flag environment parsing to accept lowercase truthy values such as y, true, yes, and on

Removed

  • Removed the exported hookFetch API, which previously intercepted globalThis.fetch via middleware handlers
  • Removed hookFetch from the package entrypoint, so imports from @.../utils no longer provide this fetch interception helper

[15.13.0] - 2026-06-14

[15.12.4] - 2026-06-13

[15.12.0] - 2026-06-12

[15.11.4] - 2026-06-12

[15.11.3] - 2026-06-11

[15.11.1] - 2026-06-11

[15.11.0] - 2026-06-10

[15.10.11] - 2026-06-10

[15.10.8] - 2026-06-09

[15.10.0] - 2026-06-06

[15.9.2] - 2026-06-05

[15.9.1] - 2026-06-04

[15.9.0] - 2026-06-04

[15.7.3] - 2026-05-31

[15.6.0] - 2026-05-30