- Avoided value-imports of `puppeteer-core` in main startup files to prevent eager loading of the browser-data dependency graph.
- Used `import type` and literal string checks to defer `puppeteer-core` initialization until browser tools are actually invoked.
- Added a test to verify that `puppeteer-core` and `@puppeteer/browsers` remain off the eager startup import graph.
- Externalized additional heavy dependencies to reduce bundle size and improved minification settings in the build script.
- Added `chunkSize` configuration to coding-agent test buckets to prevent OOM errors in CI.
- Updated `codingAgentTestCommands` to generate multiple test processes when a bucket exceeds its chunk limit.
- Refactored `commandsForMode` to support flattened arrays of chunked test commands.
This change introduces a new `openrouter` API type and extensively refactors OpenAI-family streaming providers, centralizing shared logic and improving robustness.
Key changes include:
- **Unified OpenAI-family Logic:** Consolidated core utilities, compat resolution, request shaping, and stream processing into `openai-shared.ts`, reducing duplication across `openai-completions`, `openai-responses`, and `openai-codex-responses`.
- **OpenRouter API Type:** Introduced a dedicated `openrouter` API type with dual-surface compatibility, allowing it to dispatch requests as either OpenAI Chat Completions or Responses.
- **Enhanced Provider Integration:**
- Improved Perplexity search to leverage shared OpenAI streaming transports, including API-key fallback to OpenRouter and support for Perplexity's Responses API.
- Integrated xAI-specific logic directly into the shared `stream.ts` dispatch, removing the dedicated `xai-responses` provider.
- Refined credential parsing for Google Gemini CLI and handling of Azure deployment names.
- **Robustness & Consistency:** Improved error handling for Codex, standardized output token parameter resolution, and ensured consistent application of reasoning suppression across all Chat Completions dialects.
- **New Documentation:** Added `provider-endpoint-constraints.md` to detail endpoint-specific behaviors and quirks for various providers.
- **Telemetry & Debugging:** Extended telemetry propagation to advisor calls and overflow compaction tasks. Improved debugging for Codex WebSocket failures and stream error messages.
- **Tooling & Security:** Updated browser stealth scripts to prevent detection and added a new `ts-no-inline-cast-access` TTSR rule.
- Removed render_mermaid from tool discovery, task definitions, and registries.
- Removed renderMermaid setting and prompt/docs references tied to the deleted tool.
- Added maxWidth and theme color options to Mermaid ASCII resolution in markdown flow.
- Re-rendered Mermaid ASCII in both directions and clipped output to available width.
- Removed the `--only-failures` flag from workspace test commands so CI runs complete test passes.
- Raised native test mode parallelism from 1 to 4 for native and integration package execution.
- Renamed line and block patch op verbs to XCHG, DEL, and INS in parsing and formatting.
- Updated grammar and tokenizer to support XCHG.BLK, DEL.BLK, and INS.PRE/POST/HEAD/TAIL forms.
- Updated diagnostics, docs, prompts, tests, and changelog to use XCHG/DEL/INS-based operators.
- Expanded session-stats parsing to normalize legacy op aliases to compact IDs.
- Added a `refs/clog` baseline and updated the fixer to prefer it over older `v*` tags when resolving the changelog diff floor.
- Constrained recovery scans to tags containing the baseline and added `--pin` to advance that baseline to `HEAD` after authoritative rewrites.
- Updated release tagging/tag lookup behavior and added a regression test covering recovered released bullets not being re-promoted.
- Added --recover CLI option to rebuild changelog fixes from tagged history.
- Pruned Unreleased bullets that match historical released items across all tags.
- Normalized output by sorting release sections by version and compacting bullet spacing.
- Fixed OAuth credentials to keep unknown fields in schema while preserving existing shape checks.
- Fixed MCP OAuth IDs to be profile-scoped and avoid deleting credentials from non-active profiles.
- Fixed string-flag parsing so PROFILE_BOOTSTRAP_BOUNDARY tokens are not consumed as values.
- Fixed active-profile directory resolution to refresh after env updates so profile .env overrides apply.
- Removed the mnemopi Bun preload file and added explicit `./setup` imports in the changed test suites.
- Deleted the `RUN_EMBEDDINGS` flag path and shifted `MNEMOPI_NO_EMBEDDINGS` handling into per-suite before/after hooks.
- Excluded `packages/mnemopi` from the fast parallel CI test bucket with a note about missing fastembed models.
- Updated workspace-mode CI to run `workspaceTestCommand` with 8 workers instead of 4.
- Raised the documented ARC runner CPU limit from 8 to 16 in caching docs.
Two issues caught in review on #2597:
1. `gh release list` in GitHub Actions requires GH_TOKEN. The release
notes step in `.github/workflows/ci.yml` had no env block, so gh would
exit non-zero and the script's silent fallback would re-strand the
silent-tag entries this change is meant to recover. Pass
`GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}` to the step.
2. Silently degrading to legacy single-version output on gh failure is
itself the regression vector — a future token misconfig or gh outage
would lose data with no signal. `resolvePublishedFloorTag` now throws
on gh failure with an actionable hint ("pass GH_TOKEN in Actions; set
OMP_RELEASE_NOTES_FLOOR= locally to opt into legacy mode"). The
thrown error propagates out of `main` and exits non-zero, failing the
CI step loudly so the release is rebuilt with the fix.
The legitimate null path is preserved: `OMP_RELEASE_NOTES_FLOOR=`
(empty) still forces single-version mode, and a successful gh call with
no candidate < target still returns null (first-ever publish case).
Verified locally: hiding gh from PATH now exits 1 with the hint;
`OMP_RELEASE_NOTES_FLOOR=` with hidden gh still produces the legacy
84-bullet single-version output.
Refs #2596
scripts/ci-release-notes.ts previously extracted only the single
target-version section, so changelog entries finalized under tags pushed
without a GitHub Release (e.g. v15.12.5 and v15.12.6 — collateral from
the pre-#2564 release-cancellation bug) were stranded out of the next
published release body.
The generator now walks the range (latest-published-release, target],
resolved via 'gh release list', and merges every in-range '## [X.Y.Z]'
section per package — grouped by '### <category>' with bullet-level
dedup so post-release changelog flattening cannot surface the same
entry twice. Versions iterate newest-first so newer phrasing wins on
dup resolution, and categories are sorted into the canonical
Breaking/Added/Changed/Fixed/Removed order regardless of source order.
Falls back to legacy single-version extraction when 'gh' is unavailable
or no prior published release resolves (safe no-op);
'OMP_RELEASE_NOTES_FLOOR=v15.12.4' overrides the lookup for manual
re-runs (empty string forces legacy mode).
Adds scripts/ci-release-notes.test.ts covering: range inclusion above
floor, target-inclusive boundary, dedup of bullets flattened forward
into multiple versions, canonical category ordering, the null-floor
legacy fallback, empty version sections skipped, and no empty-category
emission when dedup drains a bucket. Wired into 'bun run test:scripts'.
Fixes#2596
- Added explicit environment variable blacklists for credential and cache-related prefixes and names used by CI test runs.
- Added a helper that also strips provider API, OAuth, and bearer token variables by pattern.
- Updated test command spawning to pass a filtered environment, making suites run without inherited secret credentials.
- Added a setup-system-deps action with preloaded-runner guards and apt fallbacks.
- Updated CI workflows to download Linux x64 native artifacts and gate on native job success.
- Renamed coding-agent fast mode to singleton in scripts and test partitioning logic.
- Added settings test-state begin/restore helpers with recursive cleanup in affected tests.
- Added a mode-based `ci-test-ts.ts` runner with `--dry-run` support.
- Partitioned coding-agent tests into fast/ui/runtime/native/heavy buckets and separated workspace/native runs.
- Added coding-agent bucket modes that fail CI when a target bucket has no matching tests.
- Updated CI scripts/workflow to run the new TS buckets, use `omp-kata`, and gate releases on them.
Restored the released coding-agent changelog sections that the previous pre-publish fix run flattened into Unreleased. The local checkout only had tags through v15.5.15, so fix-changelogs compared against an old tag and promoted entire newly-added release sections.
- Kept newly-added release-section hunks out of collectPromotableAddedItemLines so the fixer still promotes individual new items added under an existing released section, but does not rewrite whole release blocks.
- Added regression coverage for the release-section case.
- Restored the coding-agent changelog history and kept only the #2582 entry under Unreleased.
Fixes#2582
- Updated the CI workflow concurrency rules to treat `workflow_dispatch` like a release path, grouping those runs by SHA and disabling cancel-in-progress.
- Extended the `GhaEval` expression evaluator in `scripts/ci-concurrency.test.ts` to support `==`/`!=` and align falsy checks.
- Added a regression test covering tagged-main `workflow_dispatch` runs using the release-style concurrency behavior.
The workflow-wide concurrency group was `${{ github.workflow }}-${{ github.ref }}`
with `cancel-in-progress: true`, so the release-script's atomic
`refs/heads/main + v* tag` push shared the `CI-refs/heads/main` group with every
later main push. The newer run cancelled the older release run before
`release_binary` / `release_github` / `release_npm` could execute, and no
future run carried the tag at HEAD, so the tag stayed published-as-a-ref but
unreleased on GitHub and npm (v15.12.6 in the wild).
Release runs are now routed to a per-sha group with `cancel-in-progress: false`
when either:
* the push subject starts with `chore: bump version to ` (the release-script
commit convention from scripts/release.ts), or
* `github.ref` is a `v*` tag (workflow_dispatch recovery from a tag ref).
Other events keep the cheap branch-wide cancel-in-progress for PR/main churn.
release.ts's retry hint now uses the same release commit subject so manual
retries also land in the per-sha group.
Added scripts/ci-concurrency.test.ts: a regression test with a minimal GHA
expression evaluator that asserts the resolved group / cancel-in-progress for
auto-release pushes, retry pushes, tag-ref dispatches, plain main pushes, PRs,
distinct release shas, and a benign `revert: chore: bump version to ...`
follow-up.
Fixes#2564
Render Formula/omp.rb with two changes so the formula actually installs:
- Stamp `using: :nounzip` on every per-platform `url` stanza so Homebrew
leaves the downloaded bare Mach-O/ELF asset in the staging CWD; the
default `CurlDownloadStrategy` was routing through
`UnpackStrategy::Uncompressed#extract_nestedly`, nesting the file
outside CWD so `Dir["omp-*"].first` returned `nil` and
`bin.install nil => "omp"` raised.
- Wrap `generate_completions_from_executable` in
`with_env(HOME: buildpath)` so the popened binary's `os.homedir()`
resolves into the writable staging dir instead of the real
`/Users/<user>/.omp`, which Homebrew's sandbox profile denies read
access to.
Also export `renderFormula` (gated by `import.meta.main`) and add a
unit test that pins the rendered stanza shape for future regressions.
Fixes#2398
- Added scripts/tool-prompt-usage.ts as a Bun CLI to estimate rendered tool prompt sizes.
- Implemented path-based prompt collection and configurable --encoding/--json options.
- Computed per-prompt and aggregate token, character, and line totals from rendered prompts.
- Added a new @oh-my-pi/snapcompact package and redirected compaction call sites to it.
- Added provider-aware snapcompact shape resolution for model-specific mixed-frame behavior.
- Added optional image detail support by extending ImageContent and passing hints through OpenAI providers.
- Added native snapcompact render options, including 5x8/8x8 font loading and palette/geometry controls.
- Added standalone Bun script reading session JSONL with real per-request usage.
- Scanned main-vs-subagent split, residency, repeated reads, and edit churn.
- Classified costliest sessions via pi-ai for hygiene, spawn, and waste verdicts.
- Added stats:audit script, prompt, and scanFile unit tests.
- Fixed npm CLI bundling by invoking `generate-client-bundle.ts --generate` before build and `--reset` after.
- Added `PI_BUNDLED` handling in `packages/stats/src/server.ts` and switched bundled distributions to embedded assets.
- Decoded embedded archives via `decodeEmbeddedClientArchive` and treated legacy placeholder content as missing.
- Handled missing dashboard source/build directories as ENOENT during mtime scans to avoid startup crashes.
- Extended `--smoke-test` to start the stats server and validate dashboard HTML contains expected asset markers.
- Switched `bin.omp` to `src/cli.ts` so `bun link`/`install.sh --source` work without a build.
- Added `publishBin` override so release rewrites `bin` to the prepack bundle `dist/cli.js`.
- Exported `applyPublishBin` and packed the agent with its published bin in the install smoke.
Move bundled models, model cache/manager, thinking metadata, effort helpers,
provider descriptors/discovery, wire constants, and model identity utilities
into the new @oh-my-pi/pi-catalog package.
Update pi-ai to keep provider runtime/auth concerns, move catalog provider
metadata into CATALOG_PROVIDERS, and migrate coding-agent, agent, stats, docs,
and tests to import catalog values from pi-catalog.
Split coding-agent model registry helpers into discovery, roles, and models
config modules while preserving registry orchestration.
BREAKING CHANGE: @oh-my-pi/pi-ai no longer exports catalog subpaths such as
/models, /model-cache, /model-manager, /model-thinking, /effort,
/provider-models*, discovery helpers, and provider wire constants; use the
matching @oh-my-pi/pi-catalog subpaths instead.
- Rerouted sync, tab, js-eval, and tiny workers to re-enter CLI modes via `__omp_*` selectors.
- Adjusted `cli.ts` startup to dispatch worker entrypoints before parsing and exit 1 on uncaught errors.
- Bundled CLI as `dist/cli.js` in prepack, switching `omp` binary and published files.
- Removed explicit Bun `--compile` worker entrypoints from build/release scripts in favor of host-entry dispatch.
- Added `declareWorkerHostEntry()` and `workerHostEntry()` environment helpers and `PI_COMPILED` binary detection.
- Renamed the gate and native jobs in CI for consistent release naming.
- Renamed reusable-artifact output keys for native lookup compatibility.
- Rewired release and test jobs to read tags, flags, and hashes from metadata outputs.
- Added macOS CI signing and notarization steps when APPLE_* secrets are configured.
- Added strict darwin verification checks to reject ad-hoc signatures and run smoke tests.
- Added Homebrew formula publishing from release assets with SHA-256 checksums.
- Added helper scripts for signing secret upload, entitlements, and release workflows.
- Added a new `--since` CLI window option and applied a timestamp cutoff to tools, edits, and followups queries, including session-count updates.
- Updated edit analytics to treat `is_error` as authoritative, added hashline op parsing from edit input, and expanded failure classification patterns for hashline error cases.
- Pushed HEAD sha into the remote tag ref so the push has no dependency on a local tag.
- Avoided both "cannot be resolved to branch" and "src refspec does not match" prune races.
- Dropped the retry loop and explicit git lfs push; the atomic push uploads LFS objects.
- Pushed LFS objects for main explicitly before tagging.
- Set GIT_LFS_SKIP_PUSH so the pre-push hook no-ops on the tag ref.
- Used explicit refspecs to avoid hook resolving tag refs to branches.
- Peels prose lines, preserving fragile tokens and code blocks byte-exact.
- Rewrites via OpenRouter in id-keyed batches, falling back on dropped tokens.
- Converted the system prompt to the terse implementation-scratchpad voice.
- Runs changelog fixer against commits since the latest tag before updating changelogs for release.
- Logs promoted items, merged duplicate headings, and removed empty headings per file.
- Added `fix:changelogs` npm script backed by `scripts/fix-changelogs.ts`.
- Detects items added to released sections since the latest tag and moves them to `[Unreleased]`.
- Merges duplicate and removes empty `###` category headings as a side effect.
- Supports `--dry-run`, `--check`, and `--since` CLI flags.
- Added local CONNECT proxy with TLS interception to capture Claude API traffic.
- Drives Claude Code via headless PTY/xterm and extracts the first /v1/messages exchange.
- Added `claude:trace` npm script and CLI with JSON/text output modes.
- Added integration test using a fake Claude script against a local TLS server.
Moved the tiny title/memory worker from a Bun Worker thread into a child process spawned via Bun.spawn IPC. The agent CLI gains a hidden --tiny-worker dispatch the parent invokes through process.execPath; the parent SIGKILLs the child on dispose so onnxruntime-node's NAPI finalizer never runs in any address space the agent owns. On Windows that finalizer was segfaulting Bun at shutdown after the tiny title model loaded (issue #1606). Drops the now-dead 'close'/'closed' handshake and the unused parentPort bootstrap, and removes tiny/worker.ts from --compile worker entries in both build scripts plus the regression test that pinned them.
Fixes#1606
- Removed `tags: ["v*"]` trigger; release now fires from the single atomic `main` push that carries the tag.
- Replaced `gate.skip` with `gate.is-release` and `gate.release-tag` so downstream jobs detect the tag via `git tag --points-at HEAD`.
- Passed `release-tag` explicitly to release steps (gh-release, curl, release notes) since `github.ref` is now `refs/heads/main`, not the tag.
- Fixed rust-cache key collision on macOS x64 by setting `RUSTFLAGS` (target-cpu) before cache restore and including the native source hash in the shared key.
- Added repeatable `--tag` argument parsing in `gen-npm-packages.ts` and threaded parsed tags into `generateNpmPackages` for targeted leaf publishing.
- Exported `prepareNativeCorePackage` and expanded package manifest typing to support scripted manifest rewrites used by release workflows.
- Reworked install-test smoke logic to pack the host leaf package, pack the rewritten natives core, and assert the platform leaf package resolves from the core optional dependency.
- CI now enabled OIDC publishing in the build matrix, installed Node 24/npm, and added a per-target native addon publish step.
- The release script now accepts `--native-leaf <tag>` and publishes only the matching generated native leaf package.
- Native package generation gained optional tag filtering with validation of requested leaf tags for targeted release publishing.
- Added a workflow `gate` job that marks `main` pushes with a `v*` tag at `HEAD` as duplicate release runs.
- Conditioned native, lint/test, and install CI jobs on that gate so redundant build and publish work is skipped on duplicate tagged pushes.
- Updated `scripts/ci-release-publish.ts` to publish packed tarballs via `npm publish` after `bun pm pack`, handling already-published versions as a no-op.
- Added tiny-title protocol contracts, including progress-state unions, message payloads, and transport interfaces.
- Added title text utilities to truncate long inputs, wrap `<user-message>` blocks, and normalize generated titles.
- Added tiny-title model registry and helpers with type-safe keys and runtime optional loading via optionalDependencies.
- Added client-side worker orchestration with spawn fallback, request queueing, progress/error routing, and smoke-test APIs.
- Added worker runtime for model resolution, prompt-based inference, lock-based install retries, and close-time cache clear.
- Added `gen-npm-packages.ts` script to generate per-platform leaf packages under `npm/-/`.
- Updated CI release publisher to generate and publish leaf packages before rewriting the core manifest with pinned `optionalDependencies`.
- Core package now ships only JS loader and declarations; installs fetch only the host platform's `.node` binary.