Compare commits

..

3 Commits

Author SHA1 Message Date
diegosouzapw
b090b601a5 fix(deps): bump nanoid, dompurify for 2 new Dependabot alerts (#189, #190)
Bumps: nanoid ^3.3.17 (was transitive, now overridden), dompurify ^3.4.13
(with monaco-editor scoped override). Closes Dependabot #189, #190.

Remaining #182-#188 (js-yaml + mermaid) already closed by #9651 merge —
awaiting Dependabot re-scan.

npm audit → 0 vulnerabilities.
2026-08-08 00:08:57 -03:00
Diego Rodrigues de Sa e Souza
153f453b0b fix(deps): bump deps for 13 Dependabot + audit cleanup on main
Same overrides as #9464 (ip-address, hono, fast-uri, socket.io-parser, undici) + brace-expansion, js-yaml v4, mermaid. npm audit → 0 vulnerabilities. Closes Dependabot #161-#188.
2026-08-06 23:13:28 -03:00
diegosouzapw
9233a9483c fix(deps): bump transitive deps for 6 Dependabot + remaining audit vulns on main
Same overrides as #9464 (ip-address, hono, fast-uri, socket.io-parser, undici)
applied directly to main. Also covers brace-expansion (scoped), js-yaml v4 copies,
and mermaid.

npm audit: 6→0 vulnerabilities.
Closes Dependabot #161-#166.
2026-08-06 18:58:51 -03:00
109 changed files with 1361 additions and 5485 deletions

71
.github/workflows/build-fork.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
name: Publish Fork Image to GHCR
on:
push:
branches: [main]
tags:
- "v*"
workflow_dispatch:
# Least-privilege default: read-only at the top level; the build job that pushes to
# GHCR grants packages: write itself (Scorecard TokenPermissions).
permissions:
contents: read
env:
IMAGE_NAME: ghcr.io/kang-heewon/omniroute
jobs:
build:
name: Build and Push Fork Image
if: github.repository == 'kang-heewon/OmniRoute'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,prefix=sha-
type=ref,event=tag
labels: |
org.opencontainers.image.title=omniroute
org.opencontainers.image.description=Unified AI proxy/router — fork image
org.opencontainers.image.url=https://github.com/kang-heewon/OmniRoute
org.opencontainers.image.source=https://github.com/kang-heewon/OmniRoute
org.opencontainers.image.licenses=MIT
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
target: runner-base
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -0,0 +1,39 @@
name: Build Rinseaid OmniRoute image
on:
push:
branches: [build-k3-reasoning-image]
paths:
- Dockerfile
- package-lock.json
- package.json
- open-sse/**
- scripts/build/**
- .github/workflows/build-rinseaid-image.yml
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: .
target: runner-base
platforms: linux/amd64
push: true
tags: ghcr.io/rinseaid/omniroute:k3-reasoning-${{ github.sha }}

View File

@@ -42,18 +42,6 @@ jobs:
- uses: actions/setup-node@v7
with:
node-version: ${{ env.CI_NODE_VERSION }}
# Refuse a PR that targets its own head branch before spending anything on it. #8912 has
# head == base == release/v3.8.50: no diff, can never merge, and it sits in the queue with
# a full check board attached on every push to that branch. One field comparison.
- name: Reject a PR that targets its own branch
if: github.event_name == 'pull_request'
env:
HEAD_REF: ${{ github.head_ref }}
BASE_REF: ${{ github.base_ref }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: node scripts/check/check-pr-self-target.mjs
- id: classify
env:
EVENT_NAME: ${{ github.event_name }}
@@ -137,17 +125,6 @@ jobs:
- run: npm run check:route-guard-membership
- run: npm run check:test-discovery
- run: npm run check:tracked-artifacts
# (gap 30) Also lives in quality.yml's PR-only "Merge integrity" job — because the
# CHANGELOG half of that job needs a base to diff against. This half does NOT: the
# generator either reproduces the committed SKILL.md files or it does not.
#
# Keeping it PR-only left a real hole. This cycle's merge trains landed in batches with
# `--admin`, which bypasses required checks, so three SKILL.md files drifted from the route
# catalog, rode the release squash into `main`, and the next cycle's sync-back turned them
# into a base-red that blocked EVERY PR into release/v3.8.50 until #8954. Running it here
# means a push to `main` catches the drift at the source instead of the next cycle
# inheriting it.
- run: npm run check:agent-skills-sync
# WS1.7 (v3.8.49 plan): Dockerfile lint (hadolint, pinned by digest).
# failure-threshold=error keeps the 5 pre-existing warnings (DL3008/DL3003/
# DL3016 version pinning / WORKDIR) visible without blocking; any ERROR fails.
@@ -353,16 +330,8 @@ jobs:
install -m 0755 /tmp/osv/*linux_amd64 "$HOME/.local/bin/osv-scanner"
# actionlint — official download script
bash <(curl -fsSL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) latest "$HOME/.local/bin"
# zizmor — PyPI (pipx preferred, pip --user fallback); lands in ~/.local/bin.
# PINNED on purpose. Unpinned, the runner installed whatever PyPI served that day and
# measured 1 finding MORE than the devbox on the identical commit (190 vs 189) during
# the v3.8.49 cycle — which cost a second rebaseline push per release, chasing a
# number that was never the code's. The ratchet compares counts across machines, so
# the auditor version has to be the same on both. Bump this deliberately, and
# rebaseline in the same commit: check-workflows.mjs now prints `zizmorVersion=` next
# to the count so the new number is traceable to the tool that produced it.
ZIZMOR_VERSION=1.25.2
pipx install "zizmor==$ZIZMOR_VERSION" || pip install --user "zizmor==$ZIZMOR_VERSION"
# zizmor — PyPI (pipx preferred, pip --user fallback); lands in ~/.local/bin
pipx install zizmor || pip install --user zizmor
# oasdiff — download latest linux amd64 tarball via gh (authed), extract binary
rm -rf /tmp/oasd && mkdir -p /tmp/oasd
gh release download --repo oasdiff/oasdiff --pattern '*linux_amd64.tar.gz' --dir /tmp/oasd
@@ -751,13 +720,7 @@ jobs:
test-unit:
name: Unit Tests (${{ matrix.shard }}/8)
# Same dynamic-runner rule as Build (own-origin only; fallback ubuntu-latest).
# PINNED to hosted, deliberately not on the USE_VPS_RUNNER switch (gap 19). One variable
# governed the build and the test jobs, which want OPPOSITE machines: the build needs the
# .113's RAM, the tests need the hosted runner's link. Measured on 2026-07-29 —
# actions/setup-node took 20m06s on .113 with 4 concurrent runners versus 16s hosted (npm
# cache restore saturating the link), while the tests themselves tied, 2m54 vs 2m31. So
# self-hosted is strictly worse here and there is nothing to configure.
runs-on: ubuntu-latest
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) && fromJSON('["self-hosted","omni-release"]') || 'ubuntu-latest' }}
timeout-minutes: 25
# needs: changes (not build) — this job never downloads the next-build artifact;
# gating it on Build only serialized ~20min of wall-clock for nothing. Jobs that
@@ -829,13 +792,7 @@ jobs:
test-vitest:
name: Vitest (MCP / autoCombo / UI components)
# Same dynamic-runner rule as Build (own-origin only; fallback ubuntu-latest).
# PINNED to hosted, deliberately not on the USE_VPS_RUNNER switch (gap 19). One variable
# governed the build and the test jobs, which want OPPOSITE machines: the build needs the
# .113's RAM, the tests need the hosted runner's link. Measured on 2026-07-29 —
# actions/setup-node took 20m06s on .113 with 4 concurrent runners versus 16s hosted (npm
# cache restore saturating the link), while the tests themselves tied, 2m54 vs 2m31. So
# self-hosted is strictly worse here and there is nothing to configure.
runs-on: ubuntu-latest
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) && fromJSON('["self-hosted","omni-release"]') || 'ubuntu-latest' }}
timeout-minutes: 15
# needs: changes (not build) — no artifact consumed; see test-unit note.
needs: changes
@@ -1272,8 +1229,6 @@ jobs:
- name: Generate dashboard
env:
EVENT_NAME: ${{ github.event_name }}
# Workflow-controlled data (job results), not user input — safe to read here.
NEEDS_JSON: ${{ toJSON(needs) }}
run: |
status() {
case "$1" in
@@ -1288,29 +1243,6 @@ jobs:
echo "# 🚀 CI Dashboard" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
# (gap 12) A cancelled job never reported a verdict, and in a long table that reads the
# same as a green one. `cancel-in-progress` plus incremental fixing cancels jobs on every
# push, and this cycle the Vitest job was cancelled in rounds 1, 2 and 3 — it only ran to
# completion in round 4, where it revealed a suite that had been broken the whole cycle
# plus two production bugs. A gate that never finishes is indistinguishable from one that
# passes, so name them at the TOP instead of leaving them to be spotted mid-table.
CANCELLED_JOBS=$(printf '%s' "$NEEDS_JSON" \
| jq -r 'to_entries | map(select(.value.result == "cancelled")) | .[].key' 2>/dev/null \
| sort | paste -sd", " -) || CANCELLED_JOBS=""
if [ -n "$CANCELLED_JOBS" ]; then
{
echo "> ### ⚫ Cancelled — no verdict was reported"
echo ">"
echo "> \`$CANCELLED_JOBS\`"
echo ">"
echo "> These did not fail; they never finished, so nothing was checked. Treat this"
echo "> run as INCOMPLETE for those gates. If the cancellation came from"
echo "> \`cancel-in-progress\` on a newer push, the newer run covers it — otherwise"
echo "> re-run them before reading this dashboard as green."
echo ""
} >> "$GITHUB_STEP_SUMMARY"
fi
echo "## 🧱 Core Checks" >> "$GITHUB_STEP_SUMMARY"
echo "| Job | Status |" >> "$GITHUB_STEP_SUMMARY"
echo "|-----|--------|" >> "$GITHUB_STEP_SUMMARY"

View File

@@ -120,18 +120,6 @@ jobs:
env:
JWT_SECRET: ci-build-secret-with-sufficient-length-for-validation
NODE_OPTIONS: "--max_old_space_size=6144"
# Linux builds with webpack, not Turbopack. Turbopack's production build
# allocates natively (Rust, off the V8 heap), so --max_old_space_size does
# not bound it, and on this module graph it peaks above what the hosted
# runner can give — the VM is reclaimed mid-compile with "The runner has
# received a shutdown signal", no exit code. That is what silently took the
# whole desktop channel out of v3.8.49: the linux leg died, `release` was
# skipped, and the release shipped with ZERO assets. Measured on a 32 GB
# box the same build passes and peaks past 14 GB. The webpack fallback is
# the project's documented escape hatch for RAM-constrained machines
# (docs/reference/ENVIRONMENT.md, #6409) and is the same remedy already
# applied to nightly-compat's Node 26 build (#8090).
OMNIROUTE_USE_TURBOPACK: ${{ matrix.platform == 'linux' && '0' || '1' }}
run: npm run build
- name: Sync version in electron/package.json
@@ -229,16 +217,6 @@ jobs:
release:
name: Create Release
needs: [validate, build]
# Fail-partial, not fail-closed. `build` is a 4-leg matrix with `fail-fast: false`,
# so the legs that succeed still upload their artifacts — but a default `needs:`
# gate skips this job the moment ANY leg fails, discarding all of them. That is
# exactly what happened to v3.8.49: the linux leg died and the release shipped with
# ZERO assets, throwing away 1.7 GB of good Windows/macOS installers **and** the
# source archives + SBOM, which do not depend on a build at all. The result was
# indistinguishable from "this version has no desktop channel".
# Now: attach everything that did build, then fail the job loudly (see the last
# step) so an incomplete channel is visible instead of silent.
if: ${{ !cancelled() && needs.validate.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: write # softprops/action-gh-release creates the GitHub Release
@@ -249,33 +227,11 @@ jobs:
persist-credentials: false
fetch-depth: 0
# `merge-multiple` is deliberately OFF. It resolves same-name collisions by ARRIVAL
# ORDER, and the two macOS jobs each emit their own `latest-mac.yml` listing only their
# own dmg (measured: 338 and 350 bytes, different content, identical name). One silently
# overwrote the other — arm64 won in the published v3.8.48, and since the Intel dmg
# carries no arch suffix in its name, electron-updater's
# `files.find(url includes process.arch) ?? files.shift()` sends every Intel Mac to the
# ARM dmg. Downloading into per-artifact subdirectories keeps both, so they can be
# merged on purpose instead of by luck.
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
# Writes release-assets/latest-mac.yml with BOTH dmgs, un-suffixed entry first (that is
# the one electron-updater can only reach through its fallback). Refuses to write when the
# inputs disagree on version — a manifest stitched from two builds is worse than none.
- name: Merge the per-arch macOS updater manifests
run: node scripts/release/merge-mac-update-manifest.mjs artifacts release-assets
# Everything else moves across as-is. The partial latest-mac.yml files are excluded so
# they cannot clobber the merged one; -n is a second belt on the same braces.
- name: Collect the remaining artifacts
run: |
mkdir -p release-assets
find artifacts -type f ! -name latest-mac.yml -exec cp -n {} release-assets/ \;
echo "release-assets:"
ls -la release-assets/
path: release-assets
merge-multiple: true
- name: Create source archives
env:
@@ -319,47 +275,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
verify-desktop-assets:
name: Verify desktop assets landed
needs: [validate, release]
# Deliberately a SEPARATE job, not a final step of `release`: failing inside
# `release` would cascade into `publish-npm` (which gates on `needs: release`) and
# block the npm channel over a desktop-only gap. Here the assets are attached, npm
# still publishes, and an incomplete desktop channel shows up as a red job instead
# of passing unnoticed — the v3.8.49 release had ZERO assets and every gate was
# green, because nothing ever asserted the release HAS binaries.
if: ${{ !cancelled() && needs.release.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Assert every platform is present on the release
env:
# Regex-validated (^v[0-9]+\.[0-9]+\.[0-9]+$) in the `validate` job, and
# passed via env rather than interpolated into the script body.
VERSION: ${{ needs.validate.outputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
names=$(gh release view "$VERSION" --repo "$GITHUB_REPOSITORY" \
--json assets --jq '.assets[].name')
echo "Assets on $VERSION:"
echo "$names" | sed 's/^/ /'
missing=""
# `[ ... ] && missing=...` as the last command in a branch returns 1 and
# would abort the whole script under Actions' default `set -e`. Use if/fi.
for want in '\.exe$' '\.dmg$' '\.AppImage$' '\.deb$' '^latest.*\.yml$' '\.source\.tar\.gz$'; do
if ! echo "$names" | grep -qE "$want"; then
missing="$missing $want"
fi
done
if [ -n "$missing" ]; then
echo "::error::Desktop channel incomplete on $VERSION — no asset matching:$missing"
exit 1
fi
echo "✓ every platform present on $VERSION"
publish-npm:
name: Publish to npm
needs: [validate, release]

View File

@@ -159,17 +159,6 @@ jobs:
# `head_sha` is the tree-equality guarantee: same commit, same tree.
# Best-effort by design (retention is 1 day): every miss falls through to the build
# step below, which is why the dynamic runner above matters as the backstop.
#
# The `head_repository.full_name == env.REPO` clause is a supply-chain guard, not a
# filter refinement. This artifact becomes the published npm tarball. `pull_request`
# runs from forks execute in THIS repository's context and upload their own
# `next-build` built from fork-controlled source, and the runs API returns them for a
# matching `head_sha` — 57 such runs exist in this repo today. Without the clause,
# anything that made a fork's head commit coincide with the publish commit could put
# attacker-built bytes on npm. Requiring the run to originate from this repository
# excludes every fork run while keeping the fast path intact (verified: the same
# single run is selected either way for the current tip).
# CodeQL: actions/artifact-poisoning/critical.
- name: Reuse CI's next-build artifact (skips the heavy rebuild)
if: steps.resolve.outputs.skip != 'true'
continue-on-error: true
@@ -179,36 +168,14 @@ jobs:
REPO: ${{ github.repository }}
run: |
set -uo pipefail
# The question is "which run HAS the artifact", not "which run passed" (gap 16).
# Requiring `conclusion == "success"` on the whole run discarded a perfectly good tree
# whenever any unrelated shard went red — one flaky test then pushed the publish into
# the 40-minute build this step exists to avoid. The artifact is only uploaded if the
# Build job itself succeeded, so its PRESENCE is the accurate signal; the run's overall
# conclusion is noise from jobs that have nothing to do with the tree.
#
# `head_repository.full_name == env.REPO` stays, and it is not a filter refinement:
# this tree becomes the published npm tarball, and fork `pull_request` runs execute in
# THIS repository's context uploading their own next-build. That clause is the
# supply-chain guard (CodeQL actions/artifact-poisoning).
CANDIDATES=$(gh api "repos/$REPO/actions/runs?head_sha=$HEAD_SHA&per_page=100" \
--jq '[.workflow_runs[]
| select(.name == "CI"
and .head_repository.full_name == env.REPO)]
| sort_by(.run_started_at) | reverse | .[0:5] | .[].id') || CANDIDATES=""
if [ -z "$CANDIDATES" ]; then
echo "::notice::no CI run from this repository for $HEAD_SHA — falling back to a full build"
RUN=$(gh api "repos/$REPO/actions/runs?head_sha=$HEAD_SHA&per_page=100" \
--jq '[.workflow_runs[] | select(.name == "CI" and .conclusion == "success")] | .[0].id // empty') || RUN=""
if [ -z "$RUN" ]; then
echo "::notice::no successful CI run for $HEAD_SHA — falling back to a full build"
exit 0
fi
RUN=""
for candidate in $CANDIDATES; do
if gh run download "$candidate" --repo "$REPO" --name next-build --dir /tmp/next-build 2>/dev/null; then
RUN="$candidate"
break
fi
echo " run $candidate carries no usable next-build — trying the next"
done
if [ -z "$RUN" ]; then
echo "::notice::none of the candidate runs still carries next-build (1-day retention) — falling back to a full build"
if ! gh run download "$RUN" --repo "$REPO" --name next-build --dir /tmp/next-build; then
echo "::notice::next-build artifact unavailable for run $RUN (expired?) — falling back to a full build"
exit 0
fi
tar -xzf /tmp/next-build/e2e-build.tar.gz -C .
@@ -256,18 +223,6 @@ jobs:
if: steps.resolve.outputs.skip != 'true'
run: npm run check:pack-boot
# The boot-smoke above proves a CLEAN install boots. It does not prove the path that
# actually broke us: installing over an existing version, where ~110 SQLite migrations
# run against a populated database. v3.8.48 shipped as a hotfix because the published
# 3.8.47 crashed on boot, and the v3.8.49 upgrade path was first exercised end-to-end
# by hand on a real 3.8.48 box (VPS .16) — after publishing, which is exactly backwards.
# Runs BEFORE `npm stage publish` so a broken upgrade never reaches the registry at all;
# a staged package that is never approved simply expires, with no `npm deprecate` needed.
- name: Prove clean-install AND upgrade-over-previous both boot
if: steps.resolve.outputs.skip != 'true'
timeout-minutes: 30
run: npm run check:install-upgrade
# WS1.3 (D2, v3.8.49 plan): STAGED publishing by default — `npm stage publish`
# parks the exact bytes on the registry WITHOUT making them installable; the
# owner then verifies and approves with 2FA (`npm stage approve`), moving the

View File

@@ -112,20 +112,7 @@ jobs:
# release captain has USE_VPS_RUNNER=true AND this is not a fork PR (own-origin
# branches only — a fork PR must never execute on the LAN runner). Var unset/false
# or a fork PR falls back to ubuntu-latest, so this is inert until the flag flips.
# PINNED to hosted (gap 19). This job carried the USE_VPS_RUNNER expression, and that
# expression was DEAD CONFIGURATION: across 160 quality.yml runs the job never once landed on
# a self-hosted runner — every non-skipped sample is `GitHub Actions NNNN`. The classifier is
# not at fault: in the same window ci.yml's Build demonstrably ran on omniroute-113-7 and
# omniroute-113-6, so self-hosted runs are visible when they happen.
#
# And if it ever HAD fired it would have inherited the measured penalty, because this job's
# first two steps are exactly the bottleneck: actions/setup-node + npm ci took 20m06s on .113
# with 4 concurrent runners versus 16s hosted (npm cache restore saturating the link). Median
# here is 5.6 min hosted across 72 successful runs.
#
# With this pinned, USE_VPS_RUNNER governs ONLY build-like jobs — one variable, one coherent
# purpose. That is what gap 19 asked for; a second variable turned out to be unnecessary.
runs-on: ubuntu-latest
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) && fromJSON('["self-hosted","omni-release"]') || 'ubuntu-latest' }}
# tsx gates (known-symbols, route-guard-membership) import modules that open
# SQLite on load; provide DB env so a fresh CI DB initializes cleanly.
env:
@@ -273,13 +260,7 @@ jobs:
needs: changes
if: ${{ github.event_name != 'pull_request' || ((github.event.pull_request.draft == false || startsWith(github.head_ref, 'mergify/merge-queue/')) && needs.changes.outputs.code == 'true') }}
# Dynamic runner — see fast-gates (own-origin + flag; fork/unset → ubuntu-latest).
# PINNED to hosted, deliberately not on the USE_VPS_RUNNER switch (gap 19). One variable
# governed the build and the test jobs, which want OPPOSITE machines: the build needs the
# .113's RAM, the tests need the hosted runner's link. Measured on 2026-07-29 —
# actions/setup-node took 20m06s on .113 with 4 concurrent runners versus 16s hosted (npm
# cache restore saturating the link), while the tests themselves tied, 2m54 vs 2m31. So
# self-hosted is strictly worse here and there is nothing to configure.
runs-on: ubuntu-latest
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) && fromJSON('["self-hosted","omni-release"]') || 'ubuntu-latest' }}
env:
JWT_SECRET: ci-lint-secret-with-sufficient-length-for-validation
API_KEY_SECRET: ci-lint-api-key-secret-long
@@ -315,13 +296,7 @@ jobs:
# critical path again (~8.5min → ~4.5min on ubuntu-latest; ~2min on the 8-slot
# runner box). Node's native --test-shard=N/total takes any denominator — only
# this matrix and the TEST_SHARD env below encode the shard count.
# PINNED to hosted, deliberately not on the USE_VPS_RUNNER switch (gap 19). One variable
# governed the build and the test jobs, which want OPPOSITE machines: the build needs the
# .113's RAM, the tests need the hosted runner's link. Measured on 2026-07-29 —
# actions/setup-node took 20m06s on .113 with 4 concurrent runners versus 16s hosted (npm
# cache restore saturating the link), while the tests themselves tied, 2m54 vs 2m31. So
# self-hosted is strictly worse here and there is nothing to configure.
runs-on: ubuntu-latest
runs-on: ${{ (vars.USE_VPS_RUNNER == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) && fromJSON('["self-hosted","omni-release"]') || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:

View File

@@ -8,18 +8,6 @@
---
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1440,6 +1428,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -67,46 +67,32 @@
<table>
<tr>
<td align="right"><b>🚀 Start</b></td>
<td align="center"><a href="#-quick-start">🚀 Quick Start</a></td>
<td align="center"><a href="#-more-install-methods--docker-source-pnpm-arch">📦 Install</a></td>
<td align="center"><a href="#-works-the-second-you-install-it--no-keys-no-config">🆓 Zero-config</a></td>
<td align="center"><a href="#-quick-start"><b>🚀 Quick Start</b></a></td>
<td align="center"><a href="#-combos--the-flagship"><b>🎯 Combos</b></a></td>
<td align="center"><a href="#-290-ai-providers--90-free"><b>🌐 Providers</b></a></td>
</tr>
<tr>
<td align="right"><b>💡 Learn</b></td>
<td align="center"><a href="#-full-cli--a2a--mcp"><b>🔌 CLI &amp; MCP</b></a></td>
<td align="center"><a href="#%EF%B8%8F-save-1595-tokens--automatically"><b>🗜️ Compression</b></a></td>
<td align="center"><a href="https://omniroute.online"><b>🌍 Website</b></a></td>
</tr>
</table>
<table>
<tr>
<td align="center"><a href="#-the-promise">💥 The Promise</a></td>
<td align="center"><a href="#-why-omniroute">🤔 Why OmniRoute</a></td>
<td align="center"><a href="#-why-omniroute">🤔 Why</a></td>
<td align="center"><a href="#-what-sets-omniroute-apart">🏆 What Sets Apart</a></td>
</tr>
<tr>
<td align="right"><b>⚙️ Features</b></td>
<td align="center"><a href="#-combos--the-flagship">🎯 Combos</a></td>
<td align="center"><a href="#-290-ai-providers--90-free">🌐 Providers</a></td>
<td align="center"><a href="#-full-cli--a2a--mcp">🔌 CLI &amp; MCP</a></td>
</tr>
<tr>
<td align="right"></td>
<td align="center"><a href="#%EF%B8%8F-save-1595-tokens--automatically">🗜️ Compression</a></td>
<td align="center"><a href="#-compatible-clis--coding-agents">🤖 Compatible CLIs</a></td>
<td align="center"><a href="#%EF%B8%8F-where-omniroute-runs--anywhere">🖥️ Where It Runs</a></td>
<td align="center"><a href="#-private--local-first">🔒 Private</a></td>
</tr>
<tr>
<td align="right"><b>👀 See it</b></td>
<td align="center"><a href="#-omniroute-in-action">🎬 In Action</a></td>
<td align="center"><a href="#-whats-new">✨ What's New</a></td>
<td align="center"><a href="#-compatible-clis--coding-agents">🤖 Compatible CLIs</a></td>
</tr>
<tr>
<td align="right"><b>💚 Support</b></td>
<td align="center"><a href="#-support-omniroute">💚 Support / Donate</a></td>
<td align="center"><a href="#-community--help">💬 Community</a></td>
<td align="center"><a href="#-sponsors">💖 Sponsors</a></td>
</tr>
<tr>
<td align="right"><b>📦 Project</b></td>
<td align="center"><a href="#%EF%B8%8F-tech-stack">🛠️ Tech Stack</a></td>
<td align="center"><a href="#-documentation">📖 Docs</a></td>
<td align="center"><a href="#-500-contributors">👥 Contributors</a></td>
<td align="center"><a href="#-dashboard-screenshots">📸 Screenshots</a></td>
<td align="center"><a href="#-support--community">📧 Support</a></td>
</tr>
</table>
@@ -404,50 +390,13 @@ All **19** strategies — mix & match per combo step:
<br/>
## 💚 Support OmniRoute
## ❤️ Support
OmniRoute is MIT-licensed and maintained in the open. If it saves you time or money, here's how to keep it independent — pick whatever fits you. Sponsorship never affects routing priority; it buys visibility, not ranking.
OmniRoute is free and open source, built and maintained in the open. If it saves you time or money, consider supporting development:
<table>
<tr><td nowrap>⭐ <b>Star the repo</b></td><td>Free — genuinely helps visibility</td><td><a href="https://github.com/diegosouzapw/OmniRoute">Star OmniRoute</a></td></tr>
<tr><td nowrap>🐙 <b>GitHub Sponsors</b></td><td>One-off or monthly · zero platform fee</td><td><a href="https://github.com/sponsors/diegosouzapw">github.com/sponsors/diegosouzapw</a></td></tr>
<tr><td nowrap>🏢 <b>Open Collective</b></td><td><b>Companies</b> — issues an invoice/receipt · transparent books</td><td><a href="https://opencollective.com/omniroute">opencollective.com/omniroute</a></td></tr>
<tr><td nowrap>☕ <b>Ko-fi</b></td><td>Quick one-off tip, no signup for the donor</td><td><a href="https://ko-fi.com/diegosouzapw">ko-fi.com/diegosouzapw</a></td></tr>
<tr><td nowrap>🧋 <b>Buy Me a Coffee</b></td><td>Small, informal gesture</td><td><a href="https://www.buymeacoffee.com/diegosouzapw">buymeacoffee.com/diegosouzapw</a></td></tr>
<tr><td nowrap>🖐 <b>Liberapay</b></td><td>Recurring · non-profit · open source</td><td><a href="https://liberapay.com/diegosouzapw">liberapay.com/diegosouzapw</a></td></tr>
<tr><td nowrap>🇧🇷 <b>PIX</b> (Brazil)</td><td>Instant, no fees</td><td>key &amp; QR below</td></tr>
<tr><td nowrap>₿ <b>Crypto</b></td><td>BTC · ETH · USDT-TRC20 · USDC-Solana</td><td>addresses below</td></tr>
</table>
**🇧🇷 PIX** — instant, no fees (Brazil)
<img src="docs/assets/pix-qr.png" width="140" align="right" alt="OmniRoute PIX QR code"/>
Key (random): `5d865059-bc44-483a-962d-43ceb80126eb`
Pix copia-e-cola:
```
00020101021126580014br.gov.bcb.pix01365d865059-bc44-483a-962d-43ceb80126eb5204000053039865802BR5922OMNIROUTE CONTRIBUICAO6006BRASIL62070503***630475DD
```
<br clear="right"/>
<details>
<summary><b>₿ Crypto</b> — BTC · ETH · USDT-TRC20 · USDC-Solana (click to expand)</summary>
<table>
<tr><td nowrap><b>₿ BTC</b></td><td nowrap>Bitcoin (SegWit)</td><td><code>bc1qh00smz004sy85wyl28v77tenkt3ckl6eaep7fd</code></td></tr>
<tr><td nowrap><b>Ξ ETH</b></td><td nowrap>Ethereum (ERC20)</td><td><code>0x64Cf6B68A6Ff34288e89172950a2d00102337a84</code></td></tr>
<tr><td nowrap><b>₮ USDT</b></td><td nowrap>Tron (TRC20)</td><td><code>TKAF41JpuQrHbKTnsQa9svJE2T192Hvsc2</code></td></tr>
<tr><td nowrap><b>$ USDC</b></td><td nowrap>Solana</td><td><code>2emNNZzVVWQc3FQ2wk9M6qXUQmW8AKdjjL174fXR28Tu</code></td></tr>
</table>
<sub>⚠️ Send each coin only on the network shown — sending on the wrong network can lose the funds.</sub>
</details>
🐛 Found a bug or have feedback? Open a [Discussion](https://github.com/diegosouzapw/OmniRoute/discussions).
-**Star the repo** — it genuinely helps visibility
- 💖 **[GitHub Sponsors](https://github.com/sponsors/diegosouzapw)** — fund ongoing maintenance and new providers
- 🐛 **Report bugs and share feedback** in [Discussions](https://github.com/diegosouzapw/OmniRoute/discussions)
<br/>
@@ -956,7 +905,7 @@ same process on one port, so there is no separate CLI-only package today.
<div align="center">
# 📧 Community & Help
# 📧 Support & Community
> Everything in one place — follow the maintainer, chat with the community, or open an issue.
@@ -972,7 +921,7 @@ same process on one port, so there is no separate CLI-only package today.
| 📦 **Source code** | [github.com/diegosouzapw/OmniRoute](https://github.com/diegosouzapw/OmniRoute) |
| 🐛 **Report a bug** | [open an issue](https://github.com/diegosouzapw/OmniRoute/issues) — attach `npm run system-info` output |
| 🤝 **Contribute** | [CONTRIBUTING.md](CONTRIBUTING.md) · [Branching & Release Model](docs/ops/BRANCHING_MODEL.md) · pick a `good first issue` |
| 💚 **Support the project** | [Ways to support ↑](#-support-omniroute) · [GitHub Sponsors](https://github.com/sponsors/diegosouzapw) |
| **Support the project** | [Star the repo](https://github.com/diegosouzapw/OmniRoute) · [GitHub Sponsors](https://github.com/sponsors/diegosouzapw) |
</div>

View File

@@ -1 +0,0 @@
- **feat(sse):** deprecated the legacy `gemini-cli` **upstream provider**. It was not routable (no registry entry, no executor), yet the scheduler kept refreshing its token against Google — maintaining a credential that could never serve a request. A stored connection now becomes terminal with a legible reason and a working migration path: re-add the account under `gemini`, which uses the same Google OAuth client. The `gemini-cli` **client identity** (requests arriving *from* the Gemini CLI, issue #7034) is untouched ([#8980](https://github.com/diegosouzapw/OmniRoute/pull/8980))

View File

@@ -1 +0,0 @@
- **fix(ci):** the reconciliation helper no longer bounds its scan with `git describe --tags` — releases squash-merge, so that range re-listed 1361 commits instead of the cycle's real 22, which is how ~200 PRs once slipped through without a changelog bullet. The base is now resolved from the commit that opened the cycle, and a new `sweep:stale-fragments` gate removes `changelog.d/` fragments that a back-merge from `main` resurrected after they had already been folded in ([#8985](https://github.com/diegosouzapw/OmniRoute/pull/8985))

View File

@@ -1 +0,0 @@
- **fix(ci):** fixed a live auto-update defect where **Intel Macs downloaded the ARM dmg** — the two macOS jobs each emitted their own `latest-mac.yml` and `merge-multiple` let one silently overwrite the other by arrival order, leaving `electron-updater`'s arch fallback pointing at the wrong build. The manifests are now merged deliberately, un-suffixed entry first. Also: test jobs pinned to hosted runners (`setup-node` measured 20m06s self-hosted vs 16s hosted), the npm publish no longer discards a valid build artifact because an unrelated shard was flaky, the agent-skills gate now runs on pushes to `main` instead of PRs only, and the CI summary names every job that ended cancelled ([#8988](https://github.com/diegosouzapw/OmniRoute/pull/8988))

View File

@@ -1 +0,0 @@
- **chore(sse):** dropped the leftover `iflow` entry from the token-refresh TTL map — the provider was removed from the product but its 24-hour refresh lead outlived it, and the identifier had exactly two occurrences left repo-wide ([#8966](https://github.com/diegosouzapw/OmniRoute/pull/8966))

View File

@@ -1 +0,0 @@
- **chore(ci):** removed two fork-owned image-publish workflows that had ridden into the repo as unrelated extra files in on-topic PRs — `build-fork.yml` (`ghcr.io/kang-heewon`, job-level guard, so it instantiated a skipped run on every push to main and every tag) and `build-rinseaid-image.yml` (`ghcr.io/rinseaid`, no guard, never fired). Neither could authenticate against this repository's token; a new policy guard now fails CI on any workflow targeting a foreign registry namespace ([#8967](https://github.com/diegosouzapw/OmniRoute/pull/8967))

View File

@@ -1 +0,0 @@
- **test(ci):** fixed the intermittent `spawnSync bash EPIPE` failure in the `:latest` promotion guard — the script exits on a pre-release version before reading stdin, so the harness's pipe-backed `input:` raced that exit; stdin is now file-backed, which makes the race structurally impossible ([#8977](https://github.com/diegosouzapw/OmniRoute/pull/8977))

View File

@@ -1,6 +0,0 @@
{
"_doc": "Tables that exist ONLY in databases upgraded from an older version — residue whose CREATE left the migration set in some past cycle but survives where it already existed. Harmless (nothing references them), but recorded here so check-install-upgrade.mjs can still fail on a NEW divergence. The opposite direction (a table a clean install creates but an upgrade does not) is NEVER allowlisted: it means every existing user is missing structure the code expects.",
"residualTables": {
"cache_metrics": "Measured 2026-07-30 on a real 3.8.48 install upgraded to 3.8.49 (VPS .16, 165 MB database, 114 → 117 tables). Present in upgraded databases, absent from clean installs. No code path referenced it during the upgrade (zero `no such table` in 150 log lines, both installs healthy). Left in place rather than dropped: a DROP migration on a table we cannot prove is unused everywhere is the riskier change. Revisit when the cache subsystem is next touched."
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -8,18 +8,6 @@
---
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1154,7 +1142,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1440,6 +1427,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -6,18 +6,6 @@
## [3.8.31] — 2026-06-20
## [3.8.50] — TBD
_Living section — cycle opened at the v3.8.49 freeze (parallel-cycle model). Bullets are aggregated from `changelog.d/` fragments at each `/generate-release` phase._
### ✨ New Features
### 🐛 Bug Fixes
### 📝 Maintenance
---
## [3.8.49] — 2026-07-28
_Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62333b0 → tip). Bullets carry the merged PR and its author; direct pushes listed separately. Finalized at the v3.8.49 release._
@@ -1152,7 +1140,6 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- **fix(api):** stop JSON.stringify-ing messages before estimateTokens (restores #8368 image estimate) [recovered from #8599] ([#8740](https://github.com/diegosouzapw/OmniRoute/pull/8740))
- **fix(quality):** let --update remove baseline entries that already fit the cap ([#8741](https://github.com/diegosouzapw/OmniRoute/pull/8741)) — thanks @MumuTW
- **fix:** escape angle brackets in i18n messages to prevent next-intl INVALID_MESSAGE errors ([#8747](https://github.com/diegosouzapw/OmniRoute/pull/8747)) — thanks @SteeleHu
- **fix(dashboard):** the /home quick-start cards no longer prefetch — #8292 opted the sidebar out of automatic route prefetch but left the landing page's own five links untouched, so first paint still fired 12 speculative RSC requests. The e2e guard shipped in that same PR could not catch it: it hung in the auth helper and never reached its assertion until this release's CI.
- **fix(dashboard):** Request Logs detail no longer crashes on a structured error object — #7920 introduced `formatErrorForDisplay` for exactly this, but the combo-503 / cooldown checks added by #8213 read the raw field and called `.toLowerCase()` on it. Both paths now share the helper.
- **fix(dashboard):** the logs detail modal stops reopening on first close again — #6830 fixed it by reading the deep-link id once, and the #8354 page rewrite regressed it by reading the live `searchParams` on every render, flipping the prop mid-session.
### 📚 Docs
@@ -1438,6 +1425,10 @@ _Living section — regenerated 2026-07-19 from all 306 cycle commits (bump 2c62
- chore(tests): fix all 70 failing `test:vitest:ui` tests across 30 files (was advisory/parked) — root causes were 15 node:test-authored `.tsx` files never collected by vitest, a missing `window.matchMedia` jsdom polyfill, stale assertions against a redesigned BuildTab wizard / CompressionHub Phase-2 UI, and one obsolete test for a retired Plans screen; suite is now 158/158 files, 870/870 tests green (promotion to blocking is a follow-up)
### 🙌 Contributors
Thanks to everyone whose work landed in v3.8.49:

View File

@@ -1,168 +0,0 @@
# [Feature] Pluginization Phase 1: Extract Playwright/CloakBrowser Browser Pool
**Labels:** `enhancement`, `plugin`, `architecture`
## Problem / Use Case
OmniRoute's Playwright/CloakBrowser dependency is a **large, non-essential dependency** (~1500+ LOC across 22 source files + ~35 test files) pulled into every installation regardless of whether the user needs browser-backed chat. Users who run OmniRoute purely as a proxy/router (the majority) pay for:
- **Disk space**: ~200+ MB from Playwright browsers + Chromium binaries (installed via `npx playwright install`)
- **Build complexity**: Turbopack must handle the `cloakbrowser` package
- **Bundle size**: All browser-pool code is compiled into the main codebase
- **Surface area**: 7 files with direct Playwright imports (4 dynamic, 3 static type imports)
- **CI/cache impact**: Playwright installs in CI pipelines even when not needed
Currently, only environment variables (`OMNIROUTE_BROWSER_POOL=off`) gate _runtime_ execution — the code still loads, imports get resolved, and Playwright must be installed.
## Proposed Solution
Extract the Playwright/CloakBrowser browser pool into an **optional package** loaded via dynamic `import()` at runtime, following the existing pattern used for `cloakbrowser` (computed-string dynamic import to avoid resolution). The core retains thin interface stubs that gracefully degrade when the optional package is absent.
### Architecture
```
open-sse/
interfaces/
browserPool.ts ← NEW: BrowserPoolProvider interface + types
services/
browserPool.ts ← BECOMES: thin stub, delegates to optional package
browserBackedChat.ts ← BECOMES: thin stub, delegates to optional package
grokClearance.ts ← BECOMES: thin stub
packages/browser-pool/ ← NEW: optional package
index.ts ← exports BrowserPoolProvider implementation
src/
browserPool.ts ← extracted from open-sse/services/browserPool.ts
browserBackedChat.ts ← extracted from open-sse/services/browserBackedChat.ts
grokClearance.ts ← extracted from open-sse/services/grokClearance.ts
claudeTurnstileSolver.ts ← extracted (tightly coupled, moved as-is)
inAppLoginService.ts ← extracted (own Playwright instance, separate lifecycle)
package.json
tsconfig.json
```
### Phase Breakdown
**Phase 1 — Core pool extraction (this issue):**
1. Define `BrowserPoolProvider` interface in `open-sse/interfaces/browserPool.ts`
2. Extract `browserPool.ts` (~502 LOC), `browserBackedChat.ts` (~270 LOC), `grokClearance.ts` (~84 LOC) into `packages/browser-pool/`
3. Replace core files with thin stubs that try `import('../../../packages/browser-pool')` with graceful fallback
4. Keep `poolTools.ts` importing the core stub (unchanged from consumer perspective)
5. Make Playwright an optional dependency (not in root `package.json`)
6. Typecheck core passes with and without the package installed
7. All existing tests pass (with plugin installed)
**Phase 2 — Turnstile solver extraction (future):**
- Extract `claudeTurnstileSolver.ts` (~212 LOC) — has static Playwright type imports, needs type interface
- Move `claudeWebAutoRefresh.ts` (depends on turnstile solver)
**Phase 3 — Standalone Playwright instances (future):**
- Extract `inAppLoginService.ts` (~257 LOC)
- Refactor `gemini-web.ts` executor's own Playwright path (~553 LOC)
### Interface Design (Phase 1)
```typescript
// open-sse/interfaces/browserPool.ts
export interface BrowserPoolProvider {
acquireBrowserContext(options?: BrowserPoolContextOptions): Promise<PooledContext>;
releaseBrowserContext(ctx: PooledContext): Promise<void>;
getBrowserPoolMetrics(): BrowserPoolMetrics;
shutdownPool(): Promise<void>;
isPoolEnabled(): boolean;
openPage(url: string, ctx?: PooledContext): Promise<{ page: any }>;
readPageResponseBody(page: any): Promise<string>;
getBrowserPoolStatus(): BrowserPoolStatus;
}
```
### Stub Pattern
```typescript
// open-sse/services/browserPool.ts — thin stub
let _impl: BrowserPoolProvider | null = null;
async function getImpl(): Promise<BrowserPoolProvider> {
if (!_impl) {
try {
const { createBrowserPoolProvider } = await import("../../packages/browser-pool");
_impl = createBrowserPoolProvider();
} catch {
// Graceful fallback — disabled
_impl = createNullBrowserPoolProvider();
}
}
return _impl;
}
export async function acquireBrowserContext(...args) {
return (await getImpl()).acquireBrowserContext(...args);
}
```
## Alternatives Considered
1. **Existing hook-based PluginManager**: Rejected. The current PluginManager operates via child-process IPC and request-pipeline hooks (`onRequest`, `onResponse`, `onError`). A browser pool is an in-process runtime service with composable lifecycle — not a request pipeline hook. Forcing it through IPC would add ~50ms+ per browser operation and break the existing synchronous pool pattern.
2. **Keep as-is, just lazy-load the import**: Minimal improvement — the dependency tree still references Playwright types, requiring it to be available. Doesn't reduce bundle size or simplify CI.
3. **Replace Playwright with a protocol-level abstraction**: Too ambitious and would change the behavior of the pool. Playwright's CDP capabilities (context isolation, cookies, screenshots) are fundamental to how the pool works.
4. **Monorepo workspace**: Too heavy for this scope. A simple extracted package avoids workspace tooling changes.
## Acceptance Criteria
1. `open-sse/interfaces/browserPool.ts` exists and exports `BrowserPoolProvider`, `PooledContext`, `BrowserPoolMetrics` types
2. `open-sse/services/browserPool.ts` becomes a thin stub with zero Playwright imports
3. `packages/browser-pool/` contains all extracted implementation (browserPool, browserBackedChat, grokClearance)
4. Core typecheck (`npm run typecheck:core`) passes with 0 errors **without** the browser-pool package installed
5. Core typecheck passes with the package installed
6. All existing tests pass when the browser-pool package is installed
7. `poolTools.ts` `omniroute_browser_pool_status` tool works end-to-end when the package is installed
8. Graceful degradation: when the package is absent, `getBrowserPoolStatus()` returns `{ enabled: false }` without crashing
9. Playwright is moved from root `dependencies` to optional/peer in the extracted package
10. Documentation updated in `docs/reference/ENVIRONMENT.md`
## Expected Test Plan
- Unit tests for the stub fallback path (simulate import failure, verify graceful degradation)
- Unit tests moved to the extracted package
- Verify `tests/unit/browser-pool-optional-import.test.ts` passes (still validates cloakbrowser isn't statically resolved)
- Verify `tests/unit/browserPool-proxy.test.ts` passes
- Verify `tests/unit/browserBackedChat-matcher.test.ts` passes
- E2E: `npm run typecheck:core` without the package installed → 0 errors
- E2E: `npm run test:coverage` (with package installed) → existing coverage gates pass
## Additional Context
Current dependency graph (simplified):
```
open-sse/services/browserPool.ts (502 LOC, singleton Playwright/CloakBrowser pool)
├── open-sse/services/browserBackedChat.ts (270 LOC, browser-backed chat runner)
│ ├── open-sse/executors/claude-web.ts (imports tryBackedChat)
│ └── open-sse/executors/duckduckgo-web.ts (imports tryBackedChat)
├── open-sse/services/grokClearance.ts (84 LOC, CF clearance via browser)
└── open-sse/mcp-server/tools/poolTools.ts (imports getBrowserPoolMetrics)
Standalone Playwright users (separate, future phases):
├── open-sse/services/claudeTurnstileSolver.ts (212 LOC, static Playwright type imports)
├── open-sse/services/inAppLoginService.ts (257 LOC, own browser lifecycle)
└── open-sse/executors/gemini-web.ts (553 LOC, private Playwright path)
Kill switches: OMNIROUTE_BROWSER_POOL, WEB_COOKIE_USE_BROWSER (both env vars)
```
Total extracted in Phase 1: ~856 LOC, 3 files.
Total deferred to Phase 2/3: ~1022 LOC, 4 files.
This is the first pluginization step. Future targets (separate issues): memory/compression plugin, additional provider support extraction.
## Related References
- PR #8219 (model catalog connection filter + cache TTL) — same baseline `release/v3.8.49`
- `docs/reference/ENVIRONMENT.md` — browser pool env vars documentation
- Plugin system docs at `docs/PLUGINS.md` — existing PluginManager (not used here, referenced for contrast)

View File

@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: OmniRoute API
version: 3.8.50
version: 3.8.49
description: |
OmniRoute is a local-first AI API proxy router. It provides an OpenAI-compatible
endpoint that routes requests to multiple AI providers with load balancing,

View File

@@ -1,14 +1,14 @@
---
title: "Provider Reference"
version: 3.8.50
lastUpdated: 2026-07-30
version: 3.8.49
lastUpdated: 2026-07-28
---
# Provider Reference
> **Auto-generated** from `src/shared/constants/providers.ts` — do not edit by hand.
> Regenerate with: `npm run gen:provider-reference`
> **Last generated:** 2026-07-30
> **Last generated:** 2026-07-28
Total providers: **290**. See category breakdown below.

View File

@@ -1,6 +1,6 @@
{
"name": "omniroute-desktop",
"version": "3.8.50",
"version": "3.8.49",
"description": "OmniRoute Desktop Application",
"main": "main.js",
"author": {

View File

@@ -1,6 +1,6 @@
{
"name": "@omniroute/open-sse",
"version": "3.8.50",
"version": "3.8.49",
"description": "Express SSE sidecar for OmniRoute — handles streaming, protocol translation, and provider orchestration",
"type": "module",
"main": "index.js",

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,35 @@
/**
* grokClearance.ts — gated browser-backed cf_clearance acquisition for
* grok-web (#8019).
*
* grok.com sits behind Cloudflare Enterprise, which pins `cf_clearance` to
* the client's IP+TLS+UA fingerprint. Pure cookie-replay from
* `grokTlsClient.ts` (TLS-impersonating fetch) cannot forge a fresh
* clearance from a datacenter egress that Cloudflare has already flagged —
* only a real browser solving the challenge natively can mint one bound to
* that egress's own fingerprint.
*
* This module reuses the EXISTING provider-agnostic browser pool
* (`browserPool.ts`, already live for claude-web + duckduckgo-web) rather
* than adding a new Turnstile solver — `claudeTurnstileSolver.ts` is
* claude.ai-specific and does not apply here.
*
* Opt-in only: gated behind `OMNIROUTE_BROWSER_POOL` / `WEB_COOKIE_USE_BROWSER`
* (the same env gate already used by claude-web.ts / duckduckgo-web.ts).
* With the gate off, `acquireFreshGrokClearance` is never called — the
* executor stays on the Step-1 `cloudflare_challenge` classification.
*/
import { acquireBrowserContext, type PooledContext } from "./browserPool.ts";
const GROK_WARMUP_URL = "https://grok.com/";
const GROK_COOKIE_DOMAIN = ".grok.com";
const GROK_POOL_KEY = "grok-web";
/**
* Reads the same opt-in gate as claude-web/duckduckgo-web
* (`WEB_COOKIE_USE_BROWSER` or `OMNIROUTE_BROWSER_POOL`). Off by default.
*/
export function shouldUseGrokBrowserBacked(): boolean {
const flag = process.env.WEB_COOKIE_USE_BROWSER;
if (flag === "1" || flag === "true" || flag === "on") return true;
@@ -5,16 +37,48 @@ export function shouldUseGrokBrowserBacked(): boolean {
return poolFlag === "on" || poolFlag === "1" || poolFlag === "true";
}
let grokClearanceAcquireOverride: ((signal?: AbortSignal) => Promise<string | null>) | null = null;
type AcquireGrokClearanceFn = (signal?: AbortSignal | null) => Promise<string | null>;
// Test-only injection point — mirrors browserBackedChat.ts's
// __setBrowserBackedChatOverrideForTesting pattern so unit tests can prove
// the gating/wiring without launching a real browser (no chromium in CI).
let acquireOverride: AcquireGrokClearanceFn | null = null;
export function __setGrokClearanceAcquireOverrideForTesting(
fn: ((signal?: AbortSignal) => Promise<string | null>) | null,
fn: AcquireGrokClearanceFn | null
): void {
grokClearanceAcquireOverride = fn;
acquireOverride = fn;
}
export async function acquireFreshGrokClearance(signal?: AbortSignal): Promise<string | null> {
if (grokClearanceAcquireOverride) return grokClearanceAcquireOverride(signal);
const mod = await import("@omniroute/browser-pool");
return mod.acquireFreshGrokClearance(signal);
async function readCfClearanceFromContext(pooled: PooledContext): Promise<string | null> {
const cookies = await pooled.context.cookies(GROK_WARMUP_URL);
const match = cookies.find((c) => c.name === "cf_clearance");
return match?.value || null;
}
async function acquireViaPool(): Promise<string | null> {
try {
const pooled = await acquireBrowserContext(GROK_POOL_KEY, {
cookieDomain: GROK_COOKIE_DOMAIN,
cookieString: null,
warmupUrl: GROK_WARMUP_URL,
});
return await readCfClearanceFromContext(pooled);
} catch {
return null;
}
}
/**
* Acquire a fresh `.grok.com` cf_clearance via the shared browser pool.
* Never throws — resolves to `null` on any failure so callers can fall
* through to the Cloudflare-challenge error rather than crash the request.
*/
export async function acquireFreshGrokClearance(signal?: AbortSignal | null): Promise<string | null> {
if (acquireOverride) return acquireOverride(signal);
try {
return await acquireViaPool();
} catch {
return null;
}
}

View File

@@ -109,50 +109,15 @@ export const REFRESH_LEAD_MS: Record<string, number> = {
"gitlab-duo": 5 * 60 * 1000, // GitLab token family revocation on misuse
kiro: 5 * 60 * 1000, // AWS SSO OIDC issues one-time-use refresh tokens
"kimi-coding": 5 * 60 * 1000, // Moonshot rotates per-refresh
// Non-rotating providers — longer lead is safe.
iflow: 24 * 60 * 60 * 1000, // 24 hours
// Google OAuth refresh_tokens are permanent (non-rotating) — longer lead
// is safe and reduces unnecessary upstream chatter.
antigravity: 15 * 60 * 1000,
agy: 15 * 60 * 1000, // same Google backend as antigravity (non-rotating refresh tokens)
"gemini-cli": 15 * 60 * 1000, // legacy stored connections; provider is no longer public
};
/**
* Upstream providers that stored connections may still name, but that this build no
* longer serves. They are NOT routable — absent from PROVIDERS, from the chat REGISTRY,
* and without an executor — so keeping their token fresh maintains a credential that can
* never answer a request.
*
* Deprecation, not deletion: a connection here becomes terminal with a reason that names
* where to go instead, rather than silently sitting at `active` doing nothing. The
* migration target must be routable — `tests/unit/gemini-cli-deprecation.test.ts` asserts
* that, so the notice can never point somewhere useless.
*/
export const DEPRECATED_PROVIDERS: Readonly<
Record<string, { readonly migrateTo: string; readonly reason: string }>
> = {
"gemini-cli": {
migrateTo: "gemini",
// The legacy path redeemed the token with PROVIDERS.gemini's client — the very same
// public Gemini CLI / Code Assist OAuth client — which is why re-adding the account
// under `gemini` is a real migration and not a suggestion to start over.
reason:
"The gemini-cli provider was discontinued and is not routable. Re-add this account " +
"under the `gemini` provider — it uses the same Google OAuth client, so the same " +
"login works and the account becomes usable again.",
},
};
/** Whether `provider` is a deprecated upstream that must not be refreshed. */
export function isDeprecatedProvider(provider: string): boolean {
return Boolean(provider) && Object.prototype.hasOwnProperty.call(DEPRECATED_PROVIDERS, provider);
}
/** The migration notice for a deprecated provider, or null when it is not deprecated. */
export function getDeprecationNotice(
provider: string
): { migrateTo: string; reason: string } | null {
return isDeprecatedProvider(provider) ? DEPRECATED_PROVIDERS[provider] : null;
}
/**
* Get the proactive refresh lead time (ms) for a given provider.
*
@@ -298,27 +263,17 @@ export async function refreshAccessToken(
*/
async function _getAccessTokenInternal(provider, credentials, log, proxyConfig: unknown = null) {
switch (provider) {
case "gemini-cli": {
// Deprecated (see DEPRECATED_PROVIDERS). This used to refresh successfully against
// PROVIDERS.gemini's client, but the provider is not routable, so the fresh token
// had nowhere to go — periodic upstream calls maintaining an unusable credential.
//
// Return the ESTABLISHED unrecoverable contract, so every existing caller
// (isUnrecoverableRefreshError, the manual-refresh route) already stops retrying —
// but with a code that says WHY and a target to migrate to. A bare `null` here would
// read as a transient failure and be retried forever.
const notice = DEPRECATED_PROVIDERS[provider];
log?.warn?.(
"TOKEN_REFRESH",
`${provider} is deprecated — not refreshing; migrate this account to ${notice.migrateTo}`
case "gemini-cli":
// Legacy DB rows can retain this discontinued provider id. Refresh them
// with the same public OAuth client used by Gemini CLI without restoring
// gemini-cli to the routable provider or OAuth UI registries.
return await refreshGoogleToken(
credentials.refreshToken,
PROVIDERS.gemini.clientId,
PROVIDERS.gemini.clientSecret,
log,
proxyConfig
);
return {
error: "unrecoverable_refresh_error",
code: "provider_deprecated",
migrateTo: notice.migrateTo,
reason: notice.reason,
};
}
case "gemini":
case "antigravity":
@@ -435,6 +390,7 @@ async function _getAccessTokenInternal(provider, credentials, log, proxyConfig:
export function supportsTokenRefresh(provider) {
const explicitlySupported = new Set([
"gemini",
"gemini-cli", // legacy refresh compatibility only; not a routable provider
"antigravity",
"agy",
"claude",

View File

@@ -40,7 +40,6 @@ interface FetchOptions {
body?: unknown;
redirect?: string;
signal?: AbortSignal;
fingerprint?: { userAgent: string; secChUa: string; secChUaPlatform: string };
}
function normalizeHeaders(headers: HeadersInit | undefined): Record<string, string> | undefined {

523
package-lock.json generated
View File

@@ -1,17 +1,16 @@
{
"name": "omniroute",
"version": "3.8.50",
"version": "3.8.49",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "omniroute",
"version": "3.8.50",
"version": "3.8.49",
"hasInstallScript": true,
"license": "MIT",
"workspaces": [
"open-sse",
"packages/browser-pool"
"open-sse"
],
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.1073.0",
@@ -32,7 +31,7 @@
"clsx": "^2.1.1",
"commander": "^15.0.0",
"csv-stringify": "^6.7.0",
"dompurify": "^3.4.12",
"dompurify": "^3.4.13",
"express": "^5.2.1",
"fetch-socks": "^1.3.3",
"fflate": "^0.8.3",
@@ -104,7 +103,7 @@
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@types/better-sqlite3": "^7.6.13",
"@types/bun": "*",
"@types/bun": "latest",
"@types/node": "^26.1.0",
"@types/react": "^19.2.15",
"@types/react-dom": "^19.2.3",
@@ -462,9 +461,9 @@
}
},
"node_modules/@apidevtools/json-schema-ref-parser/node_modules/js-yaml": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
"integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
"integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -3075,9 +3074,9 @@
}
},
"node_modules/@eslint/eslintrc/node_modules/js-yaml": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
"integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
"integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -3693,6 +3692,9 @@
"cpu": [
"arm"
],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -3709,6 +3711,9 @@
"cpu": [
"arm64"
],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -3725,6 +3730,9 @@
"cpu": [
"ppc64"
],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -3741,6 +3749,9 @@
"cpu": [
"riscv64"
],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -3757,6 +3768,9 @@
"cpu": [
"s390x"
],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -3773,6 +3787,9 @@
"cpu": [
"x64"
],
"libc": [
"glibc"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -3789,6 +3806,9 @@
"cpu": [
"arm64"
],
"libc": [
"musl"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -3805,6 +3825,9 @@
"cpu": [
"x64"
],
"libc": [
"musl"
],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -3821,6 +3844,9 @@
"cpu": [
"arm"
],
"libc": [
"glibc"
],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -3843,6 +3869,9 @@
"cpu": [
"arm64"
],
"libc": [
"glibc"
],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -3865,6 +3894,9 @@
"cpu": [
"ppc64"
],
"libc": [
"glibc"
],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -3887,6 +3919,9 @@
"cpu": [
"riscv64"
],
"libc": [
"glibc"
],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -3909,6 +3944,9 @@
"cpu": [
"s390x"
],
"libc": [
"glibc"
],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -3931,6 +3969,9 @@
"cpu": [
"x64"
],
"libc": [
"glibc"
],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -3953,6 +3994,9 @@
"cpu": [
"arm64"
],
"libc": [
"musl"
],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -3975,6 +4019,9 @@
"cpu": [
"x64"
],
"libc": [
"musl"
],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -5847,29 +5894,6 @@
"node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/@npmcli/arborist/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@npmcli/arborist/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@npmcli/arborist/node_modules/lru-cache": {
"version": "11.5.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",
@@ -6063,29 +6087,6 @@
"node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/@npmcli/map-workspaces/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@npmcli/map-workspaces/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
@@ -6283,10 +6284,6 @@
"node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/@omniroute/browser-pool": {
"resolved": "packages/browser-pool",
"link": true
},
"node_modules/@omniroute/open-sse": {
"resolved": "open-sse",
"link": true
@@ -10045,29 +10042,6 @@
"node": ">=20.0.0"
}
},
"node_modules/@stryker-mutator/core/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@stryker-mutator/core/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@stryker-mutator/core/node_modules/chalk": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
@@ -10696,6 +10670,9 @@
"arm64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -10713,6 +10690,9 @@
"arm64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -10730,6 +10710,9 @@
"x64"
],
"dev": true,
"libc": [
"glibc"
],
"license": "MIT",
"optional": true,
"os": [
@@ -10747,6 +10730,9 @@
"x64"
],
"dev": true,
"libc": [
"musl"
],
"license": "MIT",
"optional": true,
"os": [
@@ -11247,29 +11233,6 @@
"node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/@tufjs/models/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@tufjs/models/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@tufjs/models/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
@@ -12078,29 +12041,6 @@
"typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
@@ -12770,9 +12710,9 @@
}
},
"node_modules/@yarnpkg/parsers/node_modules/js-yaml": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
"integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
"integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -12839,6 +12779,9 @@
"arm"
],
"dev": true,
"libc": [
"glibc"
],
"optional": true,
"os": [
"linux"
@@ -12852,6 +12795,9 @@
"arm"
],
"dev": true,
"libc": [
"musl"
],
"optional": true,
"os": [
"linux"
@@ -12865,6 +12811,9 @@
"arm64"
],
"dev": true,
"libc": [
"glibc"
],
"optional": true,
"os": [
"linux"
@@ -12878,6 +12827,9 @@
"arm64"
],
"dev": true,
"libc": [
"musl"
],
"optional": true,
"os": [
"linux"
@@ -12891,6 +12843,9 @@
"x64"
],
"dev": true,
"libc": [
"glibc"
],
"optional": true,
"os": [
"linux"
@@ -12904,6 +12859,9 @@
"x64"
],
"dev": true,
"libc": [
"musl"
],
"optional": true,
"os": [
"linux"
@@ -14083,9 +14041,9 @@
}
},
"node_modules/brace-expansion": {
"version": "1.1.16",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.16.tgz",
"integrity": "sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==",
"version": "1.1.18",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
"integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -17106,9 +17064,9 @@
"license": "MIT"
},
"node_modules/dompurify": {
"version": "3.4.12",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.12.tgz",
"integrity": "sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==",
"version": "3.4.13",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.13.tgz",
"integrity": "sha512-2vmYIoqjze2d+kakP8S/nS5shfsl587kzwEjcGlTdiksUVgFHnFCsLYDVj/JNqJVOQZGSYBTmuycv0PodwmnMQ==",
"license": "(MPL-2.0 OR Apache-2.0)",
"optionalDependencies": {
"@types/trusted-types": "^2.0.7"
@@ -18439,29 +18397,6 @@
"eslint": "^8.0.0 || ^9.0.0 || ^10.0.0"
}
},
"node_modules/eslint-plugin-sonarjs/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/eslint-plugin-sonarjs/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/eslint-plugin-sonarjs/node_modules/globals": {
"version": "17.7.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-17.7.0.tgz",
@@ -19108,9 +19043,9 @@
}
},
"node_modules/fast-uri": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.4.tgz",
"integrity": "sha512-8JnbkQ4juDyvYs4mgFGQqg4yCYtFDtUtmp2QIQq11ZZe5CFQ5wcqm1rqDgAh/QdMySuBnPzMUiJUNZG5N/AiQw==",
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz",
"integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==",
"funding": [
{
"type": "github",
@@ -20208,29 +20143,6 @@
"node": ">=10.13.0"
}
},
"node_modules/glob/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/glob/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/glob/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
@@ -21043,9 +20955,9 @@
"license": "MIT"
},
"node_modules/hono": {
"version": "4.12.31",
"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.31.tgz",
"integrity": "sha512-zJIHFrl6bq3RDd2YusFNCDlM8qUprxKswyi/OPzPyzKDdyBXDqWx8bZlZ7R+saTdSTatUmb3O7K4SspGPaEOQg==",
"version": "4.13.0",
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.0.tgz",
"integrity": "sha512-jhunvfHWxd7J5EFfSgH4xsYJzSe/lfqbUCxiyyeaQasUsXeEHXtzVid+7EOGByc5JnFa23SSFL3Y2RV/z1T+eQ==",
"license": "MIT",
"engines": {
"node": ">=16.9.0"
@@ -21734,29 +21646,6 @@
"node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/ignore-walk/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/ignore-walk/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/ignore-walk/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
@@ -22630,9 +22519,9 @@
}
},
"node_modules/ip-address": {
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz",
"integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==",
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.4.0.tgz",
"integrity": "sha512-oSK96Grm3aP6OrS263xVxbNDGVL7rzBtYdpGqlDG8iQdoenDoTs/nkki+DflYbAEE8Xl6o5YxhxlrKvI3nqKXQ==",
"license": "MIT",
"engines": {
"node": ">= 12"
@@ -23732,9 +23621,9 @@
}
},
"node_modules/jsdom/node_modules/undici": {
"version": "7.28.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-7.28.0.tgz",
"integrity": "sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==",
"version": "7.29.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-7.29.0.tgz",
"integrity": "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -24008,29 +23897,6 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/junit-to-ctrf/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/junit-to-ctrf/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/junit-to-ctrf/node_modules/cliui": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz",
@@ -24611,17 +24477,6 @@
"node": ">= 14"
}
},
"node_modules/libxmljs2/node_modules/brace-expansion": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.2.tgz",
"integrity": "sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/libxmljs2/node_modules/cacache": {
"version": "19.0.1",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-19.0.1.tgz",
@@ -25407,9 +25262,9 @@
}
},
"node_modules/lockfile-lint/node_modules/js-yaml": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
"integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
"integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -26216,9 +26071,9 @@
}
},
"node_modules/mermaid": {
"version": "11.16.0",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.16.0.tgz",
"integrity": "sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==",
"version": "11.16.1",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.16.1.tgz",
"integrity": "sha512-TQsq6u22fAn3rek5VOubrhKPo1g5hwC3FXUN9hiyupTckcYiGuuKGkNQrKYwGJkXUxZdojwRG46gsSCFZMDp4g==",
"license": "MIT",
"dependencies": {
"@braintree/sanitize-url": "^7.1.2",
@@ -27721,9 +27576,9 @@
"optional": true
},
"node_modules/nanoid": {
"version": "3.3.16",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz",
"integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==",
"version": "3.3.18",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",
"integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",
"funding": [
{
"type": "github",
@@ -28199,9 +28054,9 @@
}
},
"node_modules/node-gyp/node_modules/undici": {
"version": "6.27.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz",
"integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==",
"version": "6.28.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz",
"integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -30515,29 +30370,6 @@
"sharp": "^0.34.5"
}
},
"node_modules/promptfoo/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/promptfoo/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/promptfoo/node_modules/chalk": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
@@ -30793,9 +30625,9 @@
}
},
"node_modules/promptfoo/node_modules/undici": {
"version": "7.28.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-7.28.0.tgz",
"integrity": "sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==",
"version": "7.29.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-7.29.0.tgz",
"integrity": "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -30838,9 +30670,9 @@
"license": "ISC"
},
"node_modules/protobufjs": {
"version": "7.6.4",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.4.tgz",
"integrity": "sha512-RJJPTTpvFfHcWLkIa2JFWK4XvtSzS0yEWDmunqHXli1h3JlkbcQZXDZdcWxv+JK3Xsl5/UFDPZ0iGm7DAengYw==",
"version": "7.6.5",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.5.tgz",
"integrity": "sha512-/FPD0nUc9jH6rfFjji9IBqOz4pcSE3CsT1m7Ep6Mdb0LxSUMj8hgl6GomOvZzpNpAqqGaXA0P3VSrZLFzIhQrw==",
"devOptional": true,
"hasInstallScript": true,
"license": "BSD-3-Clause",
@@ -32192,9 +32024,9 @@
}
},
"node_modules/rimraf/node_modules/brace-expansion": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.2.tgz",
"integrity": "sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==",
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz",
"integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -33217,9 +33049,9 @@
}
},
"node_modules/socket.io-parser": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.6.tgz",
"integrity": "sha512-asJqbVBDsBCJx0pTqw3WfesSY0iRX+2xzWEWzrpcH7L6fLzrhyF8WPI8UaeM4YCuDfpwA/cgsdugMsmtz8EJeg==",
"version": "4.2.7",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.7.tgz",
"integrity": "sha512-IH/iSeO9T6gz1KkFleGDWkG9N3dl4jXVYUtMhIqH10Md0ttMer8nUNWiP1DKuNrybD2xBrixLJdCC9J6ECoYkg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -34268,9 +34100,9 @@
}
},
"node_modules/tar": {
"version": "7.5.20",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.20.tgz",
"integrity": "sha512-9FcyK4PA6+WbzlTM9WhQm6vB5W7cP7dUiPsv1g7YDwEQnQ1CGpK3MGlKk/ITVWMk05kHZuBhmVhiv8LZoy/PFQ==",
"version": "7.5.22",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.22.tgz",
"integrity": "sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==",
"devOptional": true,
"license": "BlueOak-1.0.0",
"dependencies": {
@@ -34361,29 +34193,6 @@
"node": "20 || >=22"
}
},
"node_modules/test-exclude/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/test-exclude/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/test-exclude/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
@@ -34914,29 +34723,6 @@
"typescript": "2 || 3 || 4 || 5"
}
},
"node_modules/type-coverage-core/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/type-coverage-core/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/type-coverage-core/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
@@ -36664,9 +36450,9 @@
}
},
"node_modules/xmlbuilder2/node_modules/js-yaml": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
"integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
"integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -37006,39 +36792,12 @@
},
"open-sse": {
"name": "@omniroute/open-sse",
"version": "3.8.50",
"version": "3.8.49",
"dependencies": {
"@toon-format/toon": "^4.1.0",
"safe-regex": "^2.1.1",
"smol-toml": "1.7.1"
}
},
"packages/browser-pool": {
"name": "@omniroute/browser-pool",
"version": "0.1.0",
"dependencies": {
"playwright": "1.61.1"
},
"devDependencies": {
"@types/node": "^22"
}
},
"packages/browser-pool/node_modules/@types/node": {
"version": "22.20.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz",
"integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
}
},
"packages/browser-pool/node_modules/undici-types": {
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"dev": true,
"license": "MIT"
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "omniroute",
"version": "3.8.50",
"version": "3.8.49",
"description": "Unified AI router with 160+ providers, RTK+Caveman compression, auto fallback, MCP/A2A, desktop, PWA, and OpenAI-compatible APIs.",
"type": "module",
"bin": {
@@ -47,8 +47,7 @@
"!**/*.spec.tsx"
],
"workspaces": [
"open-sse",
"packages/browser-pool"
"open-sse"
],
"engines": {
"node": ">=22.22.2 <23 || >=24.0.0 <27"
@@ -144,7 +143,6 @@
"check:node-runtime": "node --import tsx scripts/check/check-supported-node-runtime.ts",
"check:pack-artifact": "node --import tsx scripts/build/validate-pack-artifact.ts",
"check:pack-boot": "node scripts/check/check-pack-boot.mjs",
"check:install-upgrade": "node scripts/check/check-install-upgrade.mjs",
"check:pack-policy": "node --import tsx scripts/build/validate-pack-artifact.ts --policy-only",
"check:cli-i18n": "node scripts/check/check-cli-i18n.mjs",
"check:openapi-coverage": "node scripts/check/check-openapi-coverage.mjs",
@@ -163,7 +161,6 @@
"check:test-masking": "node scripts/check/check-test-masking.mjs",
"check:test-runner-api": "node scripts/check/check-test-runner-api.mjs",
"check:changelog-integrity": "node scripts/check/check-changelog-integrity.mjs",
"sweep:stale-fragments": "node scripts/release/sweep-stale-fragments.mjs",
"changelog:aggregate": "node scripts/release/aggregate-changelog.mjs",
"check:agent-skills-sync": "node --import tsx/esm scripts/skills/generate-agent-skills.mjs",
"check:build-scope": "node scripts/check/check-build-scope.mjs",
@@ -259,7 +256,7 @@
"clsx": "^2.1.1",
"commander": "^15.0.0",
"csv-stringify": "^6.7.0",
"dompurify": "^3.4.12",
"dompurify": "^3.4.13",
"express": "^5.2.1",
"fetch-socks": "^1.3.3",
"fflate": "^0.8.3",
@@ -304,6 +301,7 @@
"smol-toml": "1.7.1",
"socks": "^2.8.7",
"sql.js": "^1.14.1",
"sqlite-vec": "^0.1.9",
"tailwind-merge": "^3.6.0",
"tsx": "^4.23.0",
"undici": "^8.3.0",
@@ -323,8 +321,7 @@
"js-tiktoken": "^1.0.20",
"keytar": "^7.9.0",
"tls-client-node": "^0.2.0",
"wreq-js": "^2.3.1",
"sqlite-vec": "^0.1.9"
"wreq-js": "^2.3.1"
},
"devDependencies": {
"@axe-core/playwright": "^4.11.3",
@@ -398,29 +395,28 @@
]
},
"overrides": {
"dompurify": "^3.4.12",
"fast-xml-parser": "^5.10.1",
"sharp": "^0.35.0",
"postcss": "^8.5.18",
"ip-address": "10.2.0",
"ip-address": "^10.3.1",
"qs": "^6.15.2",
"uuid": "^14.0.0",
"form-data": "^4.0.6",
"vite": "^8.0.16",
"protobufjs": "^7.6.3",
"protobufjs": "^7.6.5",
"@babel/core": "^7.29.6",
"hono": "^4.12.27",
"hono": "^4.12.34",
"@hono/node-server": "^2.0.5",
"fast-uri": "^3.1.3",
"fast-uri": "^3.1.5",
"body-parser": "^2.3.0",
"@yarnpkg/parsers": {
"js-yaml": "^4.2.0"
"js-yaml": "^4.3.1"
},
"jsdom": {
"undici": "^7.28.0"
"undici": "^7.29.0"
},
"node-gyp": {
"undici": "^6.27.0"
"undici": "^6.28.0"
},
"concurrently": {
"shell-quote": "^1.9.0"
@@ -428,9 +424,39 @@
"adm-zip": "^0.6.0",
"promptfoo": {
"js-yaml": "^5.2.2",
"@apidevtools/json-schema-ref-parser": {
"js-yaml": "^4.2.0"
"undici": "^7.29.0"
},
"socket.io-parser": "^4.2.7",
"tar": "^7.5.21",
"brace-expansion": "^5.0.9",
"minimatch": {
"brace-expansion": "^1.1.18"
},
"libxmljs2": {
"minimatch": {
"brace-expansion": "^2.1.4"
}
},
"rimraf": {
"minimatch": {
"brace-expansion": "^2.1.4"
}
},
"@apidevtools/json-schema-ref-parser": {
"js-yaml": "^4.3.1"
},
"@eslint/eslintrc": {
"js-yaml": "^4.3.1"
},
"lockfile-lint": {
"js-yaml": "^4.3.1"
},
"xmlbuilder2": {
"js-yaml": "^4.3.1"
},
"nanoid": "^3.3.17",
"monaco-editor": {
"dompurify": "^3.4.13"
}
}
}

View File

@@ -1,15 +0,0 @@
{
"name": "@omniroute/browser-pool",
"version": "0.1.0",
"private": true,
"description": "Optional browser pool service for OmniRoute — CloakBrowser and Playwright-backed chat",
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts",
"dependencies": {
"playwright": "1.61.1"
},
"devDependencies": {
"@types/node": "^22"
}
}

View File

@@ -1,37 +0,0 @@
/**
* @omniroute/browser-pool — Optional browser pool for Playwright-backed
* executor support (claude-web, duckduckgo-web, grok).
*
* Core stubs dynamically import this package at runtime. When the package
* is not installed, the stubs degrade gracefully (fallback or error).
*/
// ── Re-exports from browserPool ──────────────────────────────────────────
export {
acquireBrowserContext,
releaseBrowserContext,
getBrowserPoolMetrics,
readPageResponseBody,
openPage,
shutdownPool,
setProxyResolver,
__resetBrowserPoolMetricsForTest,
} from "./services/browserPool.ts";
export type { BrowserPoolContextOptions, BrowserPoolMetrics, PooledContext } from "./interfaces.ts";
// ── Re-exports from browserBackedChat ────────────────────────────────────
export {
browserBackedChat,
startBrowserWarmup,
getFreshCookiesWithWarmup,
} from "./services/browserBackedChat.ts";
// ── Re-exports from grokClearance ─────────────────────────────────────────
export {
getCachedCookies,
setCachedCookies,
clearCookieCache,
} from "./services/browserBackedChat.ts";
export { shouldUseGrokBrowserBacked, acquireFreshGrokClearance } from "./services/grokClearance.ts";

View File

@@ -1,94 +0,0 @@
/**
* interfaces.ts — Shared type definitions for @omniroute/browser-pool.
*
* These types are used by both the package entry and the core stubs.
* The core stubs re-export them so existing import paths remain stable.
*/
import type { BrowserContext, Page } from "playwright";
// ── Browser pool ───────────────────────────────────────
export interface BrowserPoolContextOptions {
cookieDomain: string;
cookieString?: string | null;
warmupUrl?: string | null;
userAgent?: string;
locale?: string;
timezone?: string;
preferCloakbrowser?: boolean;
/** Time (ms) to wait for the warmup page to be ready. */
waitFor?: number;
}
export interface PooledContext {
id: string;
context: BrowserContext;
warmupPage: Page | null;
lastUsed: number;
isStealth: boolean;
}
export interface BrowserPoolMetrics {
browserLaunches: number;
browserLaunchFailures: number;
contextsCreated: number;
contextsReused: number;
contextsEvicted: number;
contextsReleased: number;
contextCreateFailures: number;
shutdowns: number;
lastShutdownReason: string | null;
}
// ── Browser-backed chat ────────────────────────────────
export interface BrowserBackedChatRequest {
/** Pool key — typically a provider id like "duckduckgo-web" or
* "claude-web", optionally suffixed by user/account id. */
poolKey: string;
/** Chat URL the page should submit to (captured via waitForResponse). */
chatUrl: string;
/** Chat page URL to navigate to before typing. */
chatPageUrl: string;
/** The text the user wants to send. */
userMessage: string;
/** Cookie string (raw) to inject into the browser context. */
cookieString?: string | null;
/** Cookie domain (used together with cookieString). */
cookieDomain?: string;
/** Domain for the page's fetch to identify the chat endpoint. */
chatUrlMatchDomain: string;
/** User-Agent string for the browser context. */
userAgent?: string;
/** Locale (BCP 47). Defaults to en-US. */
locale?: string;
/** IANA timezone. Defaults to America/New_York. */
timezone?: string;
/** Selector for the chat input. */
inputSelector: string;
/** Selector for the submit button (optional — falls back to Enter). */
submitButtonSelector?: string;
/** Wait after submit for SSE/JSON to arrive. Default 15 seconds. */
postSubmitWaitMs?: number;
/** Optional AbortSignal. Cancels navigation/submit. */
signal?: AbortSignal | null;
/** Reuse the same context across requests. Default true. */
reuseContext?: boolean;
}
export interface BrowserBackedChatTiming {
acquireContextMs: number;
navigateMs: number;
submitMs: number;
captureResponseMs: number;
totalMs: number;
}
export interface BrowserBackedChatResult {
status: number;
contentType: string | null;
body: Buffer;
isStealth: boolean;
timing: BrowserBackedChatTiming;
}

View File

@@ -1,461 +0,0 @@
/**
* browserBackedChat.ts — Full browser-backed chat interaction for @omniroute/browser-pool.
*
* Opens a page on a shared browser context, navigates to the provider's
* chat page, types the user's message, clicks Send, and returns the
* upstream SSE/JSON response body as a structured result.
*
* Providers using this path: duckduckgo-web, claude-web.
*
* The browser solves the provider's challenge natively (VQD, Cloudflare
* Turnstile, etc.) by computing real DOM measurement values. The
* Node-side challenge solver still runs as a first-line best-effort;
* this module is the fallback.
*/
import { Buffer } from "node:buffer";
import {
acquireBrowserContext,
openPage,
readPageResponseBody,
releaseBrowserContext,
} from "./browserPool.ts";
import type {
PooledContext,
BrowserBackedChatRequest,
BrowserBackedChatResult,
} from "../interfaces.ts";
// Safety constants
const MAX_RESPONSE_BYTES = 10 * 1024 * 1024; // 10 MB
// Cookie cache constants
const COOKIE_CACHE_TTL_MS = 5 * 60 * 1000; // Cache fresh cookies for 5 minutes
const COOKIE_POLL_INTERVAL_MS = 500; // Poll for cookies every 500ms
const COOKIE_POLL_TIMEOUT_MS = 5000; // Max poll time for cookies
// Cookie cache — avoids repeated browser launches when cookies are still valid
interface CachedCookies {
cookieString: string;
expiresAt: number;
domain: string;
}
const cookieCache = new Map<string, CachedCookies>();
export function getCachedCookies(domain: string): string | null {
const cached = cookieCache.get(domain);
if (cached && Date.now() < cached.expiresAt) return cached.cookieString;
cookieCache.delete(domain);
return null;
}
export function setCachedCookies(domain: string, cookieString: string, ttlMs?: number): void {
cookieCache.set(domain, {
cookieString,
expiresAt: Date.now() + (ttlMs ?? COOKIE_CACHE_TTL_MS),
domain,
});
}
export function clearCookieCache(): void {
cookieCache.clear();
}
// Dedup pending cookie refreshes per pool key
const pendingRefreshes = new Map<string, Promise<string | null>>();
/** Sanitize an error message for safe JSON transport. */
const MAX_ERROR_LEN = 512;
function sanitizeErrorMessage(message: unknown): string {
let str = typeof message === "string" ? message : String(message ?? "");
if (str.length > MAX_ERROR_LEN) str = str.slice(0, MAX_ERROR_LEN);
const nl = str.indexOf("\n");
if (nl >= 0) str = str.slice(0, nl);
return str.replace(/[^ -~]/g, "").trim();
}
/** Wait N milliseconds, abortable via signal. */
async function waitWithSignal(ms: number, signal?: AbortSignal | null): Promise<void> {
if (signal?.aborted) throw new DOMException("Aborted", "AbortError");
return new Promise<void>((resolve, reject) => {
const onAbort = () => {
clearTimeout(timer);
reject(new DOMException("Aborted", "AbortError"));
};
const timer = setTimeout(() => {
signal?.removeEventListener("abort", onAbort);
resolve();
}, ms);
signal?.addEventListener("abort", onAbort, { once: true });
});
}
/**
* waitForCookiesWithPolling — Poll for cookies every 500ms up to 5s.
* Returns as soon as challenge cookies appear, instead of always
* waiting the full timeout. Saves 1-4s when anti-bot resolves quickly.
*/
async function waitForCookiesWithPolling(
context: import("playwright").BrowserContext,
cookieDomain: string,
signal: AbortSignal | null
): Promise<string | null> {
const deadline = Date.now() + COOKIE_POLL_TIMEOUT_MS;
while (Date.now() < deadline) {
if (signal?.aborted) throw new DOMException("Aborted", "AbortError");
const cookies = await context.cookies(cookieDomain);
const cookieString = cookies.map((c) => `${c.name}=${c.value}`).join("; ");
if (cookieString) return cookieString;
const remaining = deadline - Date.now();
if (remaining <= 0) break;
await waitWithSignal(Math.min(COOKIE_POLL_INTERVAL_MS, remaining), signal);
}
return null;
}
/**
* doCookieRefreshOnContext — Run cookie extraction on an already-acquired
* browser context. Opens a temporary page, navigates to the chat URL,
* polls for cookies, and returns the result.
* NOTE: Does NOT pass AbortSignal to Playwright methods — signals are
* handled via waitWithSignal wrapping instead.
*/
async function doCookieRefreshOnContext(
pooled: PooledContext,
chatPageUrl: string,
cookieDomain: string,
signal: AbortSignal | null
): Promise<string | null> {
const page = await openPage(pooled);
try {
await page.goto(chatPageUrl, {
waitUntil: "domcontentloaded",
timeout: 60000,
});
return await waitForCookiesWithPolling(pooled.context, cookieDomain, signal);
} catch (err) {
if (err instanceof DOMException && err.name === "AbortError") throw err;
return null;
} finally {
await page.close().catch(() => {});
}
}
/**
* Match a URL against a chat URL template, allowing a single dynamic
* id segment (PLACEHOLDER) in the template.
*/
function chatUrlMatcher(u: string, matchDomain: string, chatUrl: string): boolean {
if (u === chatUrl) return true;
let parsed: URL;
let chatParsed: URL;
try {
parsed = new URL(u);
chatParsed = new URL(chatUrl);
} catch {
return false;
}
if (!parsed.host.endsWith(matchDomain)) return false;
const chatSeg = chatParsed.pathname.split("/").filter(Boolean);
const reqSeg = parsed.pathname.split("/").filter(Boolean);
if (chatSeg.length < 2 || reqSeg.length !== chatSeg.length) return false;
let allowedDynamic = 1;
for (let i = 0; i < chatSeg.length; i++) {
if (chatSeg[i] === reqSeg[i]) continue;
if (chatSeg[i] === "PLACEHOLDER" && allowedDynamic > 0) {
allowedDynamic--;
continue;
}
return false;
}
return true;
}
/** Resolve a unique pool key; when reuseContext is false, create a unique key. */
async function settlePoolKey(
requestedKey: string,
reuseContext: boolean
): Promise<{ key: string; acquired: boolean }> {
if (reuseContext) return { key: requestedKey, acquired: true };
return {
key: `${requestedKey}-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
acquired: false,
};
}
// ── Cookie refresh helpers ──────────────────────────
/**
* doRefresh — Acquire a fresh browser context, navigate to the
* chat page, and poll for cookies. Returns the cookie string
* or null on failure.
* NOTE: Does NOT pass AbortSignal to Playwright methods — signals
* are handled via waitWithSignal wrapping instead.
*/
async function doRefresh(options: {
chatPageUrl: string;
cookieDomain: string;
poolKey: string;
signal: AbortSignal | null;
}): Promise<string | null> {
const pooled = await acquireBrowserContext(options.poolKey + "-refresh", {
cookieDomain: options.cookieDomain,
cookieString: null,
warmupUrl: options.chatPageUrl,
});
const page = await openPage(pooled);
try {
await page.goto(options.chatPageUrl, {
waitUntil: "domcontentloaded",
timeout: 60000,
});
return await waitForCookiesWithPolling(pooled.context, options.cookieDomain, options.signal);
} catch (err) {
if (err instanceof DOMException && err.name === "AbortError") throw err;
return null;
} finally {
await page.close().catch(() => {});
// release context — we got the cookies
setTimeout(() => {
releaseBrowserContext(options.poolKey + "-refresh").catch(() => {});
}, 1000);
}
}
/**
* refreshCookiesViaBrowser — Refresh cookies using a browser context.
* Uses pendingRefreshes dedup so concurrent requests share one browser launch.
* NOTE: Override check (httpOverride) is handled in the core stub — this
* package version always attempts browser cookie refresh.
*/
async function refreshCookiesViaBrowser(
chatUrl: string,
chatPageUrl: string,
cookieDomain: string,
poolKey: string,
signal: AbortSignal | null
): Promise<string | null> {
const pending = pendingRefreshes.get(poolKey);
if (pending) return pending;
const promise = doRefresh({ chatPageUrl, cookieDomain, poolKey, signal });
pendingRefreshes.set(poolKey, promise);
try {
return await promise;
} finally {
pendingRefreshes.delete(poolKey);
}
}
/**
* startBrowserWarmup — Pre-warm a browser context for the given pool key.
* This is a fire-and-forget operation: errors are caught and ignored.
* The warmup page serves as a readiness indicator — we open a page in the
* pooled context to force early navigation before the actual request.
*/
export async function startBrowserWarmup(
poolKey: string,
chatPageUrl: string,
cookieDomain: string,
signal: AbortSignal | null
): Promise<void> {
if (process.env.OMNIROUTE_BROWSER_POOL === "off") return;
const pooled = await acquireBrowserContext(poolKey, {
cookieDomain,
cookieString: null,
warmupUrl: chatPageUrl,
waitFor: 2000,
});
// Warmup: open a page in the pooled context — this can happen in parallel
openPage(pooled).catch(() => {});
}
/**
* getFreshCookiesWithWarmup — Try cached cookies first; if none, start
* a browser warmup in parallel with a cookie refresh. Returns cookie string
* or null. Caches successful results.
*/
export async function getFreshCookiesWithWarmup(
chatUrl: string,
chatPageUrl: string,
cookieDomain: string,
poolKey: string,
signal: AbortSignal | null
): Promise<string | null> {
// Try cached cookies first
const cached = getCachedCookies(cookieDomain);
if (cached) return cached;
// Start warmup in parallel with refresh
const warmup = startBrowserWarmup(poolKey, chatPageUrl, cookieDomain, signal);
const fresh = await refreshCookiesViaBrowser(chatUrl, chatPageUrl, cookieDomain, poolKey, signal);
// Await warmup (errors are non-fatal)
await warmup.catch(() => {});
if (fresh) {
setCachedCookies(cookieDomain, fresh);
return fresh;
}
return null;
}
// ── Main entry point ───────────────────────────────────
export async function browserBackedChat(
req: BrowserBackedChatRequest
): Promise<BrowserBackedChatResult> {
const t0 = Date.now();
const {
poolKey,
chatUrl,
chatPageUrl,
userMessage,
cookieString,
cookieDomain,
chatUrlMatchDomain,
userAgent,
locale,
timezone,
inputSelector,
submitButtonSelector,
postSubmitWaitMs = 15000,
signal,
reuseContext = true,
} = req;
const { key, acquired: reuseAcquired } = await settlePoolKey(poolKey, reuseContext);
const tAcquireStart = Date.now();
const pooled: PooledContext = await acquireBrowserContext(key, {
cookieDomain: cookieDomain || chatUrlMatchDomain,
cookieString: cookieString || null,
warmupUrl: chatPageUrl,
userAgent,
locale,
timezone,
});
const acquireContextMs = Date.now() - tAcquireStart;
const page = await openPage(pooled);
try {
const tNavStart = Date.now();
await page.goto(chatPageUrl, {
waitUntil: "domcontentloaded",
timeout: 60000,
});
const navigateMs = Date.now() - tNavStart;
const inputLocator = page.locator(inputSelector).first();
await inputLocator.waitFor({ state: "visible", timeout: 10000 });
await waitWithSignal(800, signal);
const responsePromise = page.waitForResponse(
(r) =>
r.request().method() === "POST" && chatUrlMatcher(r.url(), chatUrlMatchDomain, chatUrl),
{ timeout: 30000 }
);
let abortListener: (() => void) | undefined;
const signalPromise = signal
? new Promise<never>((_, reject) => {
if (signal.aborted) return reject(new DOMException("Aborted", "AbortError"));
abortListener = () => reject(new DOMException("Aborted", "AbortError"));
signal.addEventListener("abort", abortListener, { once: true });
})
: null;
if (submitButtonSelector) {
const btn = page.locator(submitButtonSelector).first();
if ((await btn.count()) > 0) {
try {
await btn.click({ timeout: 2000 });
} catch {
await page.keyboard.press("Enter");
}
} else {
await page.keyboard.press("Enter");
}
} else {
await page.keyboard.press("Enter");
}
const tCaptureStart = Date.now();
const response = signalPromise
? await Promise.race([responsePromise, signalPromise]).catch(() => null)
: await responsePromise.catch(() => null);
if (signal && abortListener) {
signal.removeEventListener("abort", abortListener);
}
if (response) {
await waitWithSignal(Math.min(postSubmitWaitMs, 30000), signal);
} else {
await waitWithSignal(postSubmitWaitMs, signal);
}
const captureResponseMs = Date.now() - tCaptureStart;
const submitMs = captureResponseMs;
let status = 0;
let contentType: string | null = null;
let body: Buffer = Buffer.alloc(0);
if (response) {
const captured = await readPageResponseBody(response);
if (captured.body.length > MAX_RESPONSE_BYTES) {
body = Buffer.from(
JSON.stringify({
error: {
message: "Response too large",
type: "upstream_error",
},
})
);
status = 502;
contentType = "application/json";
} else {
body = captured.body as unknown as Buffer;
contentType = captured.headers["content-type"] || null;
}
}
return {
status,
contentType,
body,
isStealth: pooled.isStealth,
timing: {
acquireContextMs,
navigateMs,
submitMs,
captureResponseMs,
totalMs: Date.now() - t0,
},
};
} catch (err) {
const msg = err instanceof Error ? err.message : String(err);
const body = Buffer.from(
JSON.stringify({
error: {
message: sanitizeErrorMessage(`browserBackedChat failed: ${msg}`),
type: "upstream_error",
},
})
);
return {
status: 502,
contentType: "application/json",
body,
isStealth: pooled.isStealth,
timing: {
acquireContextMs,
navigateMs: 0,
submitMs: 0,
captureResponseMs: 0,
totalMs: Date.now() - t0,
},
};
} finally {
await page.close();
if (!reuseAcquired) {
try {
await pooled.context.close();
} catch {
/* ignore */
}
}
}
}

View File

@@ -1,440 +0,0 @@
/**
* browserPool.ts — Shared stealth browser pool for web-cookie providers.
*
* The DuckDuckGo VQD challenge and Claude web's Cloudflare Turnstile both
* validate values that only a real browser can produce (DOM layout
* measurements like offsetWidth/Height, getBoundingClientRect,
* getComputedStyle, iframe contentWindow probes). Plain Node fetch + a
* VM-stubs solver structurally runs the JS but cannot match those values,
* so the server rejects the request.
*
* This pool keeps one Chromium instance warm and serves "browser contexts"
* (one per provider) on demand. Each context owns one or more pages; the
* caller is expected to be polite (one page per request, close on done).
*
* The pool prefers `cloakbrowser` (npm) when available — its binary-level
* fingerprint patches (--fingerprint-timezone, --fingerprint-locale, and
* dozens more) are the only thing that gets past DuckDuckGo's anti-bot
* in this environment. Falls back to plain `playwright` if cloakbrowser
* is not installed; the fallback works for Claude web (which only needs
* valid cookies) but not for DDG's VQD challenge.
*
* Opt-in: pool only launches Chromium when an executor explicitly asks
* for a context, so users who never use the browser-backed path pay zero
* startup cost. Set OMNIROUTE_BROWSER_POOL=off to fully disable.
*/
import { Buffer } from "node:buffer";
import type {
BrowserPoolContextOptions,
BrowserPoolMetrics,
PooledContext,
} from "../interfaces.ts";
type Browser = import("playwright").Browser;
type BrowserContext = import("playwright").BrowserContext;
type Page = import("playwright").Page;
/** Proxy resolver injected by the core stub after dynamic import. */
type ProxyResolverFn = (
providerKey: string
) => Promise<import("playwright").LaunchOptions["proxy"] | undefined>;
let injectedProxyResolver: ProxyResolverFn | null = null;
export function setProxyResolver(fn: ProxyResolverFn): void {
injectedProxyResolver = fn;
}
function createBrowserPoolMetrics(): BrowserPoolMetrics {
return {
browserLaunches: 0,
browserLaunchFailures: 0,
contextsCreated: 0,
contextsReused: 0,
contextsEvicted: 0,
contextsReleased: 0,
contextCreateFailures: 0,
shutdowns: 0,
lastShutdownReason: null,
};
}
interface PoolState {
browser: Browser | null;
contexts: Map<string, PooledContext>;
pendingContexts: Map<string, Promise<PooledContext>>;
launching: Promise<Browser> | null;
lastActivity: number;
idleTimer: NodeJS.Timeout | null;
evictTimer: NodeJS.Timeout | null;
cloakLaunch: ((opts: unknown) => Promise<Browser>) | null;
cloakLaunchResolved: boolean;
metrics: BrowserPoolMetrics;
}
const POOL_IDLE_TIMEOUT_MS = 5 * 60 * 1000;
const CONTEXT_TTL_MS = 10 * 60 * 1000; // 10 min — evict stale contexts
const EVICT_INTERVAL_MS = 60 * 1000; // check every 60s
const DEFAULT_USER_AGENT =
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36";
const state: PoolState = {
browser: null,
contexts: new Map(),
pendingContexts: new Map(),
launching: null,
lastActivity: 0,
idleTimer: null,
evictTimer: null,
cloakLaunch: null,
cloakLaunchResolved: false,
metrics: createBrowserPoolMetrics(),
};
function getCloakbrowserModuleId(): string {
// Keep this computed: cloakbrowser is an optional runtime enhancer, and a literal
// dynamic import with the package name makes Turbopack resolve it during route compilation.
return ["cloak", "browser"].join("");
}
async function resolveCloakLaunch(): Promise<((opts: unknown) => Promise<Browser>) | null> {
if (state.cloakLaunchResolved) return state.cloakLaunch;
state.cloakLaunchResolved = true;
try {
const mod = (await import(getCloakbrowserModuleId())) as unknown as {
launch?: (opts: unknown) => Promise<Browser>;
};
state.cloakLaunch = mod.launch ?? null;
} catch {
state.cloakLaunch = null;
}
return state.cloakLaunch;
}
function isPoolEnabled(): boolean {
const flag = process.env.OMNIROUTE_BROWSER_POOL;
if (flag === undefined) return true;
return flag !== "off" && flag !== "0" && flag !== "false";
}
function resetIdleTimer(): void {
if (state.idleTimer) clearTimeout(state.idleTimer);
state.idleTimer = setTimeout(() => {
void shutdownPool("idle-timeout");
}, POOL_IDLE_TIMEOUT_MS);
state.idleTimer.unref?.();
}
function evictStaleContexts(): void {
const now = Date.now();
for (const [key, pooled] of state.contexts) {
if (now - pooled.lastUsed > CONTEXT_TTL_MS) {
console.log(
"[BrowserPool] Evicted stale context:",
key,
"(idle",
((now - pooled.lastUsed) / 1000).toFixed(0) + "s)"
);
state.contexts.delete(key);
state.metrics.contextsEvicted++;
pooled.context.close().catch(() => {});
}
}
if (state.contexts.size === 0 && !state.launching) {
void shutdownPool("all-contexts-evicted");
}
}
function startEvictTimer(): void {
if (state.evictTimer) clearInterval(state.evictTimer);
state.evictTimer = setInterval(() => evictStaleContexts(), EVICT_INTERVAL_MS);
state.evictTimer.unref?.();
}
async function launchBrowser(): Promise<Browser> {
if (state.browser) return state.browser;
if (state.launching) return state.launching;
state.launching = (async () => {
const cloakLaunch = await resolveCloakLaunch();
let browser: Browser;
if (cloakLaunch) {
browser = await cloakLaunch({
headless: true,
args: ["--no-sandbox", "--disable-dev-shm-usage"],
});
} else {
// Fallback: plain Playwright. Works for Claude web (cookie-only
// auth) but DDG's VQD challenge will detect this Chromium build.
const { chromium } = await import("playwright");
browser = await chromium.launch({
headless: true,
args: [
"--no-sandbox",
"--disable-dev-shm-usage",
"--disable-blink-features=AutomationControlled",
],
});
}
state.browser = browser;
state.launching = null;
state.metrics.browserLaunches++;
return browser;
})();
try {
return await state.launching;
} catch (err) {
state.launching = null;
state.metrics.browserLaunchFailures++;
throw err;
}
}
function parseCookieString(
raw: string,
domain: string
): Array<{
name: string;
value: string;
domain: string;
path: string;
expires: number;
httpOnly: boolean;
secure: boolean;
sameSite: "Lax" | "Strict" | "None";
}> {
return raw
.split(";")
.map((p) => p.trim())
.filter(Boolean)
.map((pair) => {
const eq = pair.indexOf("=");
if (eq < 0) return null;
const name = pair.slice(0, eq).trim();
const value = pair.slice(eq + 1).trim();
if (!name || !value) return null;
return {
name,
value,
domain: domain.startsWith(".") ? domain : `.${domain}`,
path: "/",
expires: -1,
httpOnly: false,
secure: true,
sameSite: "Lax" as const,
};
})
.filter(Boolean) as Array<{
name: string;
value: string;
domain: string;
path: string;
expires: number;
httpOnly: boolean;
secure: boolean;
sameSite: "Lax" | "Strict" | "None";
}>;
}
// Clear a key from the pending-creation map once its promise settles, counting
// failures. Kept as a leaf helper so acquireBrowserContext stays under the
// function-length ceiling (#3368 PR7 metrics).
function settlePendingContext(key: string, failed: boolean): void {
if (failed) state.metrics.contextCreateFailures++;
state.pendingContexts.delete(key);
}
export async function acquireBrowserContext(
key: string,
options: BrowserPoolContextOptions
): Promise<PooledContext> {
if (!isPoolEnabled()) {
throw new Error(
"browserPool: OMNIROUTE_BROWSER_POOL=off — context requested but pool is disabled"
);
}
const existing = state.contexts.get(key);
if (existing) {
existing.lastUsed = Date.now();
state.lastActivity = Date.now();
state.metrics.contextsReused++;
resetIdleTimer();
return existing;
}
// Dedup concurrent creations for the same key
const pending = state.pendingContexts.get(key);
if (pending) return pending;
const createPromise = (async (): Promise<PooledContext> => {
const proxy = injectedProxyResolver ? await injectedProxyResolver(key) : undefined;
const [browser] = await Promise.all([launchBrowser()]);
const isStealth = state.cloakLaunch !== null;
const context = await browser.newContext({
userAgent: options.userAgent || DEFAULT_USER_AGENT,
locale: options.locale || "en-US",
timezoneId: options.timezone || "America/New_York",
viewport: { width: 1280, height: 800 },
...(proxy ? { proxy } : {}),
});
if (options.cookieString) {
const cookies = parseCookieString(options.cookieString, options.cookieDomain);
if (cookies.length > 0) {
await context.addCookies(cookies);
}
}
let warmupPage: Page | null = null;
if (options.warmupUrl) {
try {
warmupPage = await context.newPage();
await warmupPage.goto(options.warmupUrl, {
waitUntil: "domcontentloaded",
timeout: 30000,
});
// Give the warmup a moment for the upstream's status/auth/country
// JSON endpoints to fire. Without this, the first chat request would
// pay the warmup cost on the hot path.
await new Promise((r) => setTimeout(r, 1500));
} catch (err) {
try {
await warmupPage?.close();
} catch {
/* ignore */
}
warmupPage = null;
void err;
}
}
// Guard: if shutdownPool() ran while we were creating this context,
// the browser we obtained is now closed. Close our temp context and
// throw so the caller knows to retry.
if (state.browser !== browser) {
await context.close().catch(() => {});
if (warmupPage) {
await warmupPage.close().catch(() => {});
}
throw new Error("Pool shut down during context creation");
}
const pooled: PooledContext = {
id: key,
context,
warmupPage,
lastUsed: Date.now(),
isStealth,
};
state.contexts.set(key, pooled);
state.metrics.contextsCreated++;
state.lastActivity = Date.now();
resetIdleTimer();
startEvictTimer();
return pooled;
})();
state.pendingContexts.set(key, createPromise);
createPromise
.then(() => settlePendingContext(key, false))
.catch(() => settlePendingContext(key, true));
return createPromise;
}
export async function openPage(pooled: PooledContext): Promise<Page> {
return pooled.context.newPage();
}
export async function releaseBrowserContext(key: string): Promise<void> {
const pooled = state.contexts.get(key);
if (!pooled) return;
state.contexts.delete(key);
state.metrics.contextsReleased++;
try {
await pooled.context.close();
} catch {
/* ignore */
}
if (state.contexts.size === 0) {
await shutdownPool("last-context-closed");
}
}
export async function shutdownPool(reason: string): Promise<void> {
state.metrics.shutdowns++;
state.metrics.lastShutdownReason = reason;
if (state.idleTimer) {
clearTimeout(state.idleTimer);
state.idleTimer = null;
}
if (state.evictTimer) {
clearInterval(state.evictTimer);
state.evictTimer = null;
}
state.pendingContexts.clear();
for (const [key, pooled] of state.contexts) {
try {
await pooled.context.close();
} catch {
/* ignore */
}
state.contexts.delete(key);
}
if (state.browser) {
try {
await state.browser.close();
} catch {
/* ignore */
}
state.browser = null;
}
state.lastActivity = Date.now();
// Avoid unused-parameter lint: log reason via debug if anyone hooks
// process.on('exit') and prints state.
void reason;
}
function getBrowserPoolStatus(): {
enabled: boolean;
contexts: number;
browserRunning: boolean;
stealthAvailable: boolean;
lastActivityAgoMs: number;
} {
return {
enabled: isPoolEnabled(),
contexts: state.contexts.size,
browserRunning: state.browser !== null,
stealthAvailable: state.cloakLaunch !== null,
lastActivityAgoMs: state.lastActivity === 0 ? -1 : Date.now() - state.lastActivity,
};
}
/**
* #3368 PR7 — browser-pool observability. Returns live status plus cumulative
* lifecycle telemetry (launches, context create/reuse/evict/release counts,
* failures, shutdowns). Surfaced via the omniroute_browser_pool_status MCP tool.
*/
export function getBrowserPoolMetrics(): {
status: ReturnType<typeof getBrowserPoolStatus>;
metrics: BrowserPoolMetrics;
} {
return { status: getBrowserPoolStatus(), metrics: { ...state.metrics } };
}
/** Test-only: reset cumulative metrics so assertions start from a clean slate. */
export function __resetBrowserPoolMetricsForTest(): void {
state.metrics = createBrowserPoolMetrics();
}
export async function readPageResponseBody(
response: import("playwright").Response
): Promise<{ status: number; headers: Record<string, string>; body: Buffer }> {
const headers: Record<string, string> = {};
for (const [name, value] of Object.entries(response.headers())) {
headers[name] = value;
}
const body = await response.body();
return { status: response.status(), headers, body: Buffer.from(body) };
}

View File

@@ -1,73 +0,0 @@
/**
* grokClearance.ts — gated browser-backed cf_clearance acquisition for
* grok-web (#8019).
*
* grok.com sits behind Cloudflare Enterprise, which pins `cf_clearance` to
* the client's IP+TLS+UA fingerprint. Pure cookie-replay from
* `grokTlsClient.ts` (TLS-impersonating fetch) cannot forge a fresh
* clearance from a datacenter egress that Cloudflare has already flagged —
* only a real browser solving the challenge natively can mint one bound to
* that egress's own fingerprint.
*
* This module reuses the EXISTING provider-agnostic browser pool
* (`browserPool.ts`, already live for claude-web + duckduckgo-web) rather
* than adding a new Turnstile solver — `claudeTurnstileSolver.ts` is
* claude.ai-specific and does not apply here.
*
* Opt-in only: gated behind `OMNIROUTE_BROWSER_POOL` / `WEB_COOKIE_USE_BROWSER`
* (the same env gate already used by claude-web.ts / duckduckgo-web.ts).
* With the gate off, `acquireFreshGrokClearance` is never called — the
* executor stays on the Step-1 `cloudflare_challenge` classification.
*/
import { acquireBrowserContext } from "./browserPool.ts";
import type { PooledContext } from "../interfaces.ts";
const GROK_WARMUP_URL = "https://grok.com/";
const GROK_COOKIE_DOMAIN = ".grok.com";
const GROK_POOL_KEY = "grok-web";
/**
* Reads the same opt-in gate as claude-web/duckduckgo-web
* (`WEB_COOKIE_USE_BROWSER` or `OMNIROUTE_BROWSER_POOL`). Off by default.
*/
export function shouldUseGrokBrowserBacked(): boolean {
const flag = process.env.WEB_COOKIE_USE_BROWSER;
if (flag === "1" || flag === "true" || flag === "on") return true;
const poolFlag = process.env.OMNIROUTE_BROWSER_POOL;
return poolFlag === "on" || poolFlag === "1" || poolFlag === "true";
}
async function readCfClearanceFromContext(pooled: PooledContext): Promise<string | null> {
const cookies = await pooled.context.cookies(GROK_WARMUP_URL);
const match = cookies.find((c) => c.name === "cf_clearance");
return match?.value || null;
}
async function acquireViaPool(): Promise<string | null> {
try {
const pooled = await acquireBrowserContext(GROK_POOL_KEY, {
cookieDomain: GROK_COOKIE_DOMAIN,
cookieString: null,
warmupUrl: GROK_WARMUP_URL,
});
return await readCfClearanceFromContext(pooled);
} catch {
return null;
}
}
/**
* Acquire a fresh `.grok.com` cf_clearance via the shared browser pool.
* Never throws — resolves to `null` on any failure so callers can fall
* through to the Cloudflare-challenge error rather than crash the request.
*/
export async function acquireFreshGrokClearance(
signal?: AbortSignal | null
): Promise<string | null> {
try {
return await acquireViaPool();
} catch {
return null;
}
}

View File

@@ -1,17 +0,0 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "esnext",
"moduleResolution": "bundler",
"noEmit": true,
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"esModuleInterop": true,
"strict": false,
"lib": ["esnext"],
"types": ["node"],
"allowJs": false
},
"include": ["src/**/*.ts"]
}

View File

@@ -1,5 +1,4 @@
packages:
- "packages/*"
- "open-sse"
allowBuilds:
"@parcel/watcher": true

View File

@@ -94,18 +94,6 @@ const IGNORE_FROM_CODE = new Set([
// CI passes BASE_REF=${{ github.base_ref }} to the OpenAPI breaking-change gate
// (scripts/check/check-openapi-breaking.mjs) — a build/check signal, not OmniRoute runtime config.
"BASE_REF",
// Same class as BASE_REF above: the `changes` job passes these four to the
// self-targeting-PR guard (scripts/check/check-pr-self-target.mjs) so it can compare a PR's
// head against its base. CI-only signals from github.head_ref / github.base_ref /
// pull_request.{head,base}.sha — never OmniRoute runtime config, and meaningless in a .env.
"HEAD_REF",
"HEAD_SHA",
"BASE_SHA",
// Escape hatch for the test-masking gate's release-scale skip
// (scripts/check/check-test-masking.mjs): above ~300 changed test files the per-file diff
// subchecks are skipped, and this raises that cap for anyone who wants the full pass anyway.
// A gate tuning knob, not application configuration.
"TEST_MASKING_MAX_CHANGED_TESTS",
// PR body injected by GitHub Actions into the pr-evidence gate (github.event.pull_request.body);
// a CI-only signal, never an OmniRoute runtime config (Phase 7.10).
"PR_BODY",

View File

@@ -1,342 +0,0 @@
#!/usr/bin/env node
/**
* check-install-upgrade — proves the two install paths a real user takes, BEFORE publishing.
*
* `check:pack-boot` already proves a fresh install boots. It does NOT prove the path that
* actually broke us: installing the new version OVER an existing one, where ~110 SQLite
* migrations run against a populated database. v3.8.48 shipped as a hotfix precisely because
* the published 3.8.47 crashed on boot, and a v3.8.49 manual test on a real 3.8.48 box was
* what first exercised the upgrade path end to end.
*
* Phase A — clean install: fresh prefix + fresh DATA_DIR, install the packed tarball, boot.
* Phase B — upgrade install: fresh prefix + fresh DATA_DIR, install the PREVIOUS published
* version, boot it (creates + migrates the DB), stop, install the
* packed tarball over the SAME prefix, boot against the SAME DATA_DIR.
*
* Schema convergence is the third assertion, and its DIRECTION is what matters:
*
* fresh upgraded ≠ ∅ → FAIL. A table a clean install creates but an upgrade does not
* means every existing user is missing structure the code expects.
* This is the failure mode that only ever bites upgraders.
* upgraded fresh ≠ ∅ → WARN. Residue: a table whose CREATE left the migration set in
* some past cycle but survives in databases that already had it.
* Harmless, but it means the two paths do not converge — allowlist
* it explicitly so a NEW divergence is still visible.
*
* Usage:
* node scripts/check/check-install-upgrade.mjs [--from <version>] [--skip-upgrade]
*
* `--from` pins the previous version (default: the current `latest` dist-tag on npm).
* Requires `npm run build:cli` first — this is a --with-build gate, like check:pack-boot.
*/
import { execFileSync, spawn } from "node:child_process";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { DatabaseSync } from "node:sqlite";
const BOOT_DEADLINE_MS = 180_000;
const POLL_INTERVAL_MS = 2_000;
const ALLOWLIST_PATH = "config/quality/install-upgrade-allowlist.json";
const log = (msg) => console.log(`[install-upgrade] ${msg}`);
const warn = (msg) => console.log(`[install-upgrade] ⚠️ ${msg}`);
function pickTarball(packJson) {
const filename = JSON.parse(packJson)?.[0]?.filename;
if (!filename) throw new Error("npm pack --json returned no filename");
return filename;
}
/** Free-ish port per phase so a leaked child from a previous run cannot collide. */
function pickPort(offset) {
return 21000 + offset + (process.pid % 500);
}
function loadAllowlist(root) {
const file = path.join(root, ALLOWLIST_PATH);
if (!fs.existsSync(file)) return { residualTables: {} };
return JSON.parse(fs.readFileSync(file, "utf8"));
}
/**
* Pure verdict on schema convergence — exported so the asymmetry can be tested without
* building, packing and booting anything (the same reason check-test-masking exports its
* helpers: reproducing the deterministic part must not cost a full gate run).
*
* The two directions are NOT symmetric:
* onlyFresh → always a failure. Upgraders would be missing structure.
* onlyUpgraded → residue. Fails only when not recorded in the allowlist.
*/
export function evaluateConvergence({ freshTables, upgradedTables, residualAllowlist = {} }) {
const fresh = freshTables instanceof Set ? freshTables : new Set(freshTables ?? []);
const upgraded = upgradedTables instanceof Set ? upgradedTables : new Set(upgradedTables ?? []);
const onlyFresh = [...fresh].filter((t) => !upgraded.has(t)).sort();
const onlyUpgraded = [...upgraded].filter((t) => !fresh.has(t)).sort();
const unknownResidue = onlyUpgraded.filter((t) => !(t in residualAllowlist));
const failures = [];
if (onlyFresh.length) {
failures.push(
`schema divergence — tables a CLEAN install creates but an UPGRADE does not: ${onlyFresh.join(", ")}. ` +
"Every existing user would be missing these; add the migration."
);
}
if (unknownResidue.length) {
failures.push(
`NEW residual table(s) not in ${ALLOWLIST_PATH}: ${unknownResidue.join(", ")}. ` +
"Either drop them in a migration or record them with a justification."
);
}
return { ok: failures.length === 0, failures, onlyFresh, onlyUpgraded, unknownResidue };
}
/** Table names in a SQLite file, excluding sqlite_* internals. */
function readTables(dbPath) {
if (!fs.existsSync(dbPath)) return null;
const db = new DatabaseSync(dbPath, { readOnly: true });
try {
const rows = db
.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%'")
.all();
return new Set(rows.map((r) => r.name));
} finally {
db.close();
}
}
function findDb(dataDir) {
const candidates = ["storage.sqlite", "omniroute.sqlite", "data.sqlite"];
for (const name of candidates) {
const p = path.join(dataDir, name);
if (fs.existsSync(p)) return p;
}
const found = fs.readdirSync(dataDir).find((f) => f.endsWith(".sqlite"));
return found ? path.join(dataDir, found) : null;
}
/** Boot an installed CLI and poll health. Returns { ok, version, failures, tail }. */
async function bootAndProbe({ prefix, dataDir, port, expectVersion, label }) {
const binPath = path.join(prefix, "bin", "omniroute");
if (!fs.existsSync(binPath)) {
return { ok: false, failures: [`${label}: bin not found at ${binPath}`], tail: [] };
}
const child = spawn(binPath, ["serve", "--port", String(port)], {
env: {
...process.env,
PORT: String(port),
DATA_DIR: dataDir,
JWT_SECRET: "install-upgrade-gate-secret-with-sufficient-length",
API_KEY_SECRET: "install-upgrade-gate-api-key-secret-long",
DISABLE_SQLITE_AUTO_BACKUP: "true",
OMNIROUTE_SKIP_SYSTEM_TRUST: "1",
},
stdio: ["ignore", "pipe", "pipe"],
detached: true,
});
const tail = [];
const keepTail = (chunk) => {
tail.push(String(chunk));
while (tail.length > 80) tail.shift();
};
child.stdout.on("data", keepTail);
child.stderr.on("data", keepTail);
let childExit = null;
child.on("exit", (code) => {
childExit = code ?? -1;
});
const deadline = Date.now() + BOOT_DEADLINE_MS;
let result = { ok: false, failures: [`${label}: never became healthy`], tail };
while (Date.now() < deadline) {
if (childExit !== null) {
result = { ok: false, failures: [`${label}: exited with code ${childExit} before serving`], tail };
break;
}
try {
const res = await fetch(`http://127.0.0.1:${port}/api/monitoring/health`);
const body = await res.json().catch(() => null);
if (res.status === 200 && body && typeof body === "object") {
const failures = [];
// `status` may legitimately report degraded (no providers configured) — the gate
// targets boot crashes and version mismatches, not health of a bare install.
if (expectVersion && body.version !== expectVersion) {
failures.push(`${label}: health reports version ${body.version}, expected ${expectVersion}`);
}
result = { ok: failures.length === 0, version: body.version, failures, tail };
break;
}
} catch {
// not listening yet
}
await new Promise((r) => setTimeout(r, POLL_INTERVAL_MS));
}
try {
if (childExit === null) process.kill(-child.pid, "SIGTERM");
} catch {
/* already gone */
}
// Give the process a moment to flush and release the SQLite handle before we read the file.
await new Promise((r) => setTimeout(r, 3_000));
return result;
}
function npmInstallInto(prefix, spec) {
execFileSync("npm", ["install", "-g", "--prefix", prefix, "--no-audit", "--no-fund", spec], {
encoding: "utf8",
maxBuffer: 128 * 1024 * 1024,
});
}
function resolvePreviousVersion(current, explicit) {
if (explicit) return explicit;
const out = execFileSync("npm", ["view", "omniroute", "dist-tags.latest"], { encoding: "utf8" });
const latest = out.trim();
if (!latest) throw new Error("could not resolve omniroute@latest from npm");
if (latest === current) {
// The version under test is already published (re-run of a shipped release): step back
// to the highest published version strictly below it.
const all = JSON.parse(execFileSync("npm", ["view", "omniroute", "versions", "--json"], { encoding: "utf8" }));
const stable = all.filter((v) => !/-(rc|alpha|beta|pre|next)/.test(v) && v !== current);
return stable[stable.length - 1];
}
return latest;
}
async function main() {
const ROOT = process.cwd();
const args = process.argv.slice(2);
const fromIdx = args.indexOf("--from");
const explicitFrom = fromIdx >= 0 ? args[fromIdx + 1] : null;
const skipUpgrade = args.includes("--skip-upgrade");
if (!fs.existsSync(path.join(ROOT, "dist", "server.js"))) {
console.error("[install-upgrade] dist/server.js missing — run `npm run build:cli` first");
process.exit(2);
}
const version = JSON.parse(fs.readFileSync(path.join(ROOT, "package.json"), "utf8")).version;
const allowlist = loadAllowlist(ROOT);
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-install-upgrade-"));
const failures = [];
const warnings = [];
try {
log(`packing v${version}`);
const packOut = execFileSync("npm", ["pack", "--json", "--pack-destination", tmp], {
cwd: ROOT,
encoding: "utf8",
maxBuffer: 128 * 1024 * 1024,
});
const tarball = path.join(tmp, pickTarball(packOut));
// ---- Phase A: clean install -------------------------------------------------
log("PHASE A — clean install of the packed tarball");
const aPrefix = path.join(tmp, "a-prefix");
const aData = path.join(tmp, "a-data");
fs.mkdirSync(aData, { recursive: true });
npmInstallInto(aPrefix, tarball);
const a = await bootAndProbe({
prefix: aPrefix,
dataDir: aData,
port: pickPort(0),
expectVersion: version,
label: "clean",
});
failures.push(...a.failures);
if (a.ok) log(`clean install healthy on v${a.version}`);
const aDb = findDb(aData);
const freshTables = aDb ? readTables(aDb) : null;
if (!freshTables) failures.push("clean: no SQLite database was created");
else log(`clean install schema: ${freshTables.size} tables`);
// ---- Phase B: upgrade over the previous published version -------------------
let upgradedTables = null;
if (skipUpgrade) {
warn("PHASE B skipped (--skip-upgrade)");
} else {
const previous = resolvePreviousVersion(version, explicitFrom);
log(`PHASE B — upgrade path: omniroute@${previous} → v${version}`);
const bPrefix = path.join(tmp, "b-prefix");
const bData = path.join(tmp, "b-data");
fs.mkdirSync(bData, { recursive: true });
npmInstallInto(bPrefix, `omniroute@${previous}`);
const before = await bootAndProbe({
prefix: bPrefix,
dataDir: bData,
port: pickPort(1),
expectVersion: previous,
label: `previous(${previous})`,
});
if (!before.ok) {
// A broken PREVIOUS version is not this release's fault — degrade to a warning so a
// historically bad publish cannot block the current one.
warnings.push(`previous version ${previous} did not boot cleanly — upgrade path unverified`);
for (const f of before.failures) warn(f);
} else {
const beforeDb = findDb(bData);
const beforeTables = beforeDb ? readTables(beforeDb) : new Set();
log(`previous(${previous}) schema: ${beforeTables.size} tables — upgrading in place`);
npmInstallInto(bPrefix, tarball);
const after = await bootAndProbe({
prefix: bPrefix,
dataDir: bData,
port: pickPort(2),
expectVersion: version,
label: "upgraded",
});
failures.push(...after.failures);
if (after.ok) log(`upgrade healthy on v${after.version}`);
const afterDb = findDb(bData);
upgradedTables = afterDb ? readTables(afterDb) : null;
if (!upgradedTables) {
failures.push("upgraded: database disappeared after the upgrade");
} else {
log(`upgraded schema: ${upgradedTables.size} tables`);
const dropped = [...beforeTables].filter((t) => !upgradedTables.has(t));
if (dropped.length) {
failures.push(`upgrade DROPPED tables that existed before: ${dropped.join(", ")}`);
}
}
}
}
// ---- Schema convergence -----------------------------------------------------
if (freshTables && upgradedTables) {
const verdict = evaluateConvergence({
freshTables,
upgradedTables,
residualAllowlist: allowlist.residualTables ?? {},
});
if (verdict.onlyUpgraded.length) {
warn(`residual tables present only after upgrade: ${verdict.onlyUpgraded.join(", ")}`);
}
failures.push(...verdict.failures);
if (verdict.ok) log("schema convergence OK (no new divergence)");
}
if (warnings.length) for (const w of warnings) warn(w);
if (failures.length) {
console.error(`[install-upgrade] FAIL — ${failures.length} problem(s):`);
for (const f of failures) console.error(`${f}`);
process.exit(1);
}
log("PASS — clean install and upgrade path both boot; schema converges.");
process.exit(0);
} finally {
fs.rmSync(tmp, { recursive: true, force: true });
}
}
// Only run the (expensive) gate when invoked directly — importing this module for the pure
// helper above must not pack, install or boot anything.
if (process.argv[1] && path.resolve(process.argv[1]) === path.resolve(new URL(import.meta.url).pathname)) {
main().catch((err) => {
console.error(`[install-upgrade] crashed: ${err?.message ?? err}`);
process.exit(1);
});
}

View File

@@ -1,90 +0,0 @@
#!/usr/bin/env node
// Refuse a pull request that targets its own head branch.
//
// WHY: PR #8912 has head == base == release/v3.8.50 — a PR from a branch to itself. It has no
// diff, it can never merge, and GitHub keeps it in the queue forever with a full check board
// attached. It survived because nothing looks wrong: the checks are green (there is nothing to
// check), the mergeability just reads "unknown", and it quietly costs review attention and CI
// minutes on every push to that branch.
//
// The check is one field comparison, which is the point — it is cheaper than the confusion.
//
// Usage (in CI, inside a pull_request job):
// HEAD_REF="$GITHUB_HEAD_REF" BASE_REF="$GITHUB_BASE_REF" \
// HEAD_SHA=... BASE_SHA=... node scripts/check/check-pr-self-target.mjs
// Exit: 0 when the PR is well-formed or there is no PR context, 1 when it targets itself.
import fs from "node:fs";
import { fileURLToPath } from "node:url";
/**
* Classify a PR's head/base pair.
*
* Both signals are checked because either alone can be absent: `*_REF` is empty for
* cross-fork events in some contexts, and the SHAs coincide on a freshly branched PR that is
* NOT self-targeting (branch cut, nothing pushed yet) — so an equal-SHA alone must not fail.
* Only an equal REF is conclusive; equal SHAs are reported as a warning.
*/
export function classifyPrTarget({ headRef, baseRef, headSha, baseSha } = {}) {
const hr = String(headRef ?? "").trim();
const br = String(baseRef ?? "").trim();
const hs = String(headSha ?? "").trim();
const bs = String(baseSha ?? "").trim();
if (!hr && !br) return { verdict: "no-pr-context" };
if (hr && br && hr === br) {
return {
verdict: "self-targeting",
reason: `head and base are the same branch (${hr}) — this PR has no diff and can never merge`,
};
}
if (hs && bs && hs === bs) {
// Legitimate right after cutting a branch: the tip has not moved yet. Not a failure.
return {
verdict: "empty-diff",
reason: `head and base point at the same commit (${hs.slice(0, 10)}) — nothing to review yet`,
};
}
return { verdict: "ok" };
}
function main() {
const r = classifyPrTarget({
headRef: process.env.HEAD_REF,
baseRef: process.env.BASE_REF,
headSha: process.env.HEAD_SHA,
baseSha: process.env.BASE_SHA,
});
if (r.verdict === "self-targeting") {
process.stderr.write(
`::error::PR targets its own branch — ${r.reason}.\n` +
`Close it, or repoint the base at the branch you actually want to merge into ` +
`(gh pr edit <N> --base <branch>, then VERIFY with gh pr view <N> --json baseRefName — ` +
`the edit fails silently).\n`
);
return 1;
}
if (r.verdict === "empty-diff") {
process.stdout.write(`::warning::${r.reason}.\n`);
return 0;
}
process.stdout.write(
r.verdict === "no-pr-context"
? "[pr-self-target] no PR context — skipping.\n"
: "[pr-self-target] OK — head and base differ.\n"
);
return 0;
}
if (
process.argv[1] &&
fs.realpathSync(process.argv[1]) === fs.realpathSync(fileURLToPath(import.meta.url))
) {
process.exit(main());
}

View File

@@ -436,22 +436,6 @@ function resolveBase() {
return null;
}
/**
* Whether the per-file diff subchecks should be skipped for being too large to be a
* reviewable unit. Exported so the threshold behavior is testable without a repo: the
* boundary is what matters, and an off-by-one here either blocks a release or silently
* disables the check on a big-but-legitimate PR.
*
* `max <= 0` disables the skip entirely (always analyze) — a deliberate escape hatch.
*/
export function shouldSkipDiffSubchecks(changedCount, max) {
const n = Number(changedCount);
const cap = Number(max);
if (!Number.isFinite(n) || n < 0) return false;
if (!Number.isFinite(cap) || cap <= 0) return false;
return n > cap;
}
function main() {
// (#6404) Absolute floor scan — runs unconditionally, PR or not, so a tautology
// that is already merged into the base (and thus invisible to the diff-only
@@ -523,34 +507,6 @@ function main() {
.map((s) => s.trim())
.filter((f) => TEST_RE.test(f) && fs.existsSync(f));
// (gap 6) A release PR is not a reviewable unit, and this is where that stops being free.
// Releases squash-merge into `main`, so a release PR's merge-base is the PREVIOUS cycle's
// fork point and the diff spans the whole cycle. In the v3.8.49 run that was ~1277 changed
// test files, each costing a `git show base:file` process plus a full regex pass — the check
// ran twice without finishing, >30 min pegged on one core, and the release waited on it.
//
// Every one of those files was already gated by this same check on its own PR during the
// cycle. Re-analyzing the aggregate buys nothing and blocks the release, so above the
// threshold the per-file diff subchecks are skipped — LOUDLY, naming the count, because a
// silent skip is how a gate becomes indistinguishable from a passing one (that is gap 12,
// and it cost two production bugs this cycle).
//
// The floor is untouched: scanBareTautologies() above already ran unconditionally over all
// tracked test files (3977 files, ~1 s), so nothing here lowers absolute coverage.
const maxChangedTests = Number(process.env.TEST_MASKING_MAX_CHANGED_TESTS || 300);
if (shouldSkipDiffSubchecks(changed.length + renamePerFile.length, maxChangedTests)) {
console.log(
`[test-masking] ${changed.length} teste(s) modificado(s) + ${renamePerFile.length} ` +
`renomeado(s) excede o teto de ${maxChangedTests} — pulando os subchecks de diff.\n` +
` Um diff desse tamanho é um PR de release (base = main, merge-base = fork do ciclo ` +
`anterior por causa do squash), não uma unidade revisável.\n` +
` Cada um desses arquivos já passou por este mesmo gate no PR de origem.\n` +
` O scan absoluto de tautologias rodou sobre TODOS os testes rastreados e está OK.\n` +
` Para forçar a análise completa: TEST_MASKING_MAX_CHANGED_TESTS=999999`
);
return;
}
const perFile = [...renamePerFile];
for (const file of changed) {
const baseSrc = git(["show", `${base}:${file}`]);

View File

@@ -235,23 +235,6 @@ export function runActionlint(files) {
* @param {string} workflowsDir - Path to .github/workflows
* @returns {{ count: number, diagnostics: unknown[], skipped: boolean }}
*/
/**
* The zizmor version actually doing the auditing, or "unknown".
*
* Emitted next to the count because the two must be read together. The GitHub runner measured
* 1 finding MORE than the devbox on the identical commit (190 vs 189) during the v3.8.49 cycle,
* which cost a second rebaseline push: CI installed whatever PyPI served that day while the
* devbox had an older build. A count without the version that produced it is not a
* reproducible number, and rebaselining against it just moves the disagreement.
*/
export function zizmorVersion() {
try {
return execFileSync("zizmor", ["--version"], { encoding: "utf8" }).trim() || "unknown";
} catch {
return "unknown";
}
}
export function runZizmor(workflowsDir) {
const args = ["--format", "json"];
if (fs.existsSync(ZIZMOR_CONFIG)) {
@@ -354,9 +337,6 @@ function main() {
process.stdout.write(`workflowFindings=${total}\n`);
process.stdout.write(`actionlintFindings=${actionlintCount}\n`);
process.stdout.write(`zizmorFindings=${zizmorCount}\n`);
// Read this line with the count above: a finding total is only reproducible against the
// version that produced it. See zizmorVersion().
process.stdout.write(`zizmorVersion=${hasZizmor ? zizmorVersion() : "absent"}\n`);
if (STRICT && total > 0) {
console.error(`\n[check-workflows] FAIL — ${total} workflow finding(s) total (--strict mode).`);

View File

@@ -78,39 +78,6 @@ export function flattenLeaves(node, prefix = "", out = {}) {
* @param {Record<string, object>} args.headLocales locale -> catalog in the working tree
* @returns {Array<{ key: string, locale: string }>} sorted, stable
*/
/**
* Whether an English rewrite is COSMETIC — the same sentence, differently cased, spaced, or
* terminally punctuated. A translation of the old string is still a correct translation of the
* new one, so it must not be marked stale.
*
* Why this exists: `"Reset Defaults"` → `"Reset defaults"` marked the key stale in 41 locales
* during the v3.8.49 cycle. Every one of those translations was still correct, and in locales
* with no letter case the "fix" is not even expressible. Worse, the documented escape hatch
* (a `__MISSING__:` placeholder) is BANNED in `vi` by tests/unit/i18n-vi-completeness.test.ts,
* so `vi` had no legitimate way out of a purely cosmetic English edit.
*
* Deliberately narrow: ONLY letter case and trailing terminal punctuation.
*
* **Whitespace is NOT folded, on purpose.** A first version of this folded whitespace runs and
* trimmed, and it collided with a pre-existing, deliberately conservative decision —
* tests/unit/i18n-ui-value-drift.test.ts, "a value that only changes whitespace still counts as
* an edit", whose comment reads: *"trailing-space churn is rare, and treating it as a no-op would
* let a real reword slip through behind an innocuous-looking diff."* That call belongs to whoever
* made it; the problem actually reported here was CASE
* (`"Reset Defaults"` → `"Reset defaults"`, 41 locales invalidated), and quietly reversing
* someone else's documented decision to fix something they never reported is not this change's
* job. Narrowed to the reported scope instead.
*
* Any change to the words themselves — added or removed words, and any change inside an
* interpolation like `{count}` — is a real rewrite and still flags.
*/
export function isCosmeticRewrite(before, after) {
if (typeof before !== "string" || typeof after !== "string") return false;
if (before === after) return true;
const norm = (s) => s.replace(/[.:!?;,]+$/u, "").toLowerCase();
return norm(before) === norm(after);
}
export function findStaleTranslations({ baseEn, headEn, baseLocales, headLocales }) {
const baseFlat = flattenLeaves(baseEn);
const headFlat = flattenLeaves(headEn);
@@ -118,14 +85,8 @@ export function findStaleTranslations({ baseEn, headEn, baseLocales, headLocales
// Keys whose English copy was REWRITTEN by this change. A key absent from either side
// is an add or a delete: nothing can be stale against text that did not exist, and a
// renamed key (delete + add) is exactly the safe fix pattern.
//
// Cosmetic rewrites (case, spacing, trailing punctuation) are excluded — see
// isCosmeticRewrite. They used to invalidate correct translations in 41 locales at once.
const rewritten = Object.keys(headFlat).filter(
(key) =>
key in baseFlat &&
baseFlat[key] !== headFlat[key] &&
!isCosmeticRewrite(baseFlat[key], headFlat[key])
(key) => key in baseFlat && baseFlat[key] !== headFlat[key]
);
if (rewritten.length === 0) return [];

View File

@@ -25,56 +25,6 @@ const git = (args) => execFileSync("git", args, { cwd: ROOT, encoding: "utf8" })
const ROLLUP_TYPES = new Set(["chore", "ci", "test", "refactor", "build", "docs", "style"]);
/**
* Pick the commit that OPENED the current development cycle, and use that as the range base.
*
* `git describe --tags` is wrong here, and wrong in a way that hides work rather than
* announcing itself. Releases reach `main` by SQUASH, so no commit on a release branch is
* ever an ancestor of the tag — `v3.8.49..HEAD` therefore re-lists the un-squashed history
* of every prior cycle. Measured on release/v3.8.50 at 7eca04fd12:
*
* v3.8.49..HEAD ............ 1361 commits
* cycle open..HEAD ......... 22 commits
*
* 62× the real range. The report drowns in noise, which is exactly how a previous
* reconciliation let ~200 PRs through with no CHANGELOG bullet.
*
* Resolved by CONTENT, not by commit message: the cycle opens when package.json first
* carries this version, so `git log -S` on that exact string finds it regardless of how the
* subject was worded. The wording has already changed once —
* `chore(release): bump v3.8.49 (development cycle version)` became
* `chore(release): open v3.8.50 development cycle` — and a message-matching resolver would
* have silently fallen back to the broken tag base on the newer format.
*
* Falls back to the tag with an explicit stderr warning, so a shallow clone or a rewritten
* history degrades loudly instead of quietly reproducing the original bug.
*/
export function resolveCycleBase(version, runGit = git) {
let openCommit = "";
try {
// Oldest commit that introduced this version string = the cycle-open commit.
const hits = runGit(["log", "--format=%H", "-S", `"version": "${version}"`, "--", "package.json"]);
openCommit = hits ? hits.split("\n").filter(Boolean).pop() : "";
} catch {
openCommit = "";
}
if (openCommit) return { base: openCommit, source: "cycle-open" };
let tag = "";
try {
tag = runGit(["describe", "--tags", "--abbrev=0"]);
} catch {
tag = "";
}
process.stderr.write(
`[list-uncovered-commits] WARNING: could not find the commit that opened v${version} ` +
`(searched package.json for the version string). Falling back to ` +
`${tag || "the repository root"} — because releases squash-merge, that range re-lists ` +
`previous cycles and the report below will contain noise.\n`
);
return { base: tag, source: "tag-fallback" };
}
export function refsOf(subject) {
return [...subject.matchAll(/#(\d+)/g)].map((m) => Number(m[1]));
}
@@ -187,10 +137,9 @@ export function changelogRefWindow(changelog, version) {
function main(argv) {
const jsonOut = argv.includes("--json");
const lastTag = git(["describe", "--tags", "--abbrev=0"]);
const version = JSON.parse(fs.readFileSync(path.join(ROOT, "package.json"), "utf8")).version;
const { base, source } = resolveCycleBase(version);
const lastTag = base ? git(["rev-parse", "--short", base]) : base;
const log = git(["log", "--no-merges", `${base}..HEAD`, "--pretty=format:%h%x09%s"]);
const log = git(["log", "--no-merges", `${lastTag}..HEAD`, "--pretty=format:%h%x09%s"]);
const commits = log
? log.split("\n").map((l) => {
const [hash, subject] = l.split("\t");
@@ -204,19 +153,14 @@ function main(argv) {
if (jsonOut) {
process.stdout.write(
JSON.stringify(
{ version, base: lastTag, baseSource: source, total: commits.length, covered, uncovered },
null,
2
) + "\n"
JSON.stringify({ version, lastTag, total: commits.length, covered, uncovered }, null, 2) +
"\n"
);
return;
}
const bulletsWorthy = uncovered.filter((c) => !c.rollup);
const rollupCandidates = uncovered.filter((c) => c.rollup);
process.stdout.write(
`# Uncovered-commit reconciliation — v${version} (${lastTag}..HEAD, base from ${source})\n\n`
);
process.stdout.write(`# Uncovered-commit reconciliation — v${version} (${lastTag}..HEAD)\n\n`);
process.stdout.write(
`Commits: ${commits.length} · covered: ${covered} · uncovered: ${uncovered.length}\n\n`
);

View File

@@ -1,173 +0,0 @@
#!/usr/bin/env node
// Merge the per-architecture `latest-mac.yml` manifests into one that serves BOTH Macs.
//
// THE BUG THIS FIXES IS LIVE IN v3.8.48: an Intel Mac downloads the ARM dmg.
//
// electron-builder runs once per macOS job (macos-intel, macos-arm64) and each run emits its
// own `latest-mac.yml` listing only its own dmg — 338 and 350 bytes, different content, same
// filename. `actions/download-artifact` with `merge-multiple: true` resolves that name
// collision by ARRIVAL ORDER, so one silently overwrites the other. In the published v3.8.48
// manifest the arm64 build won.
//
// Why that breaks Intel, from electron-updater's own selection code
// (electron-updater/out/providers/Provider.js):
//
// const result = filteredFiles.find(it =>
// [it.url.pathname, it.info.url].some(n => n.includes(process.arch))
// ) ?? filteredFiles.shift();
//
// The Intel dmg is named `OmniRoute-X.Y.Z.dmg` — no arch suffix. On an Intel Mac
// `process.arch` is `"x64"`, no file URL contains "x64", the find misses, and the fallback
// takes the FIRST entry. With an arm64-only manifest that is the ARM dmg.
//
// So ORDER IS THE FIX, not merely tidiness: the entry without an arch suffix must come first,
// because it is the one that can only ever be reached by that fallback. arm64 is found by
// substring wherever it sits.
//
// Usage:
// node scripts/release/merge-mac-update-manifest.mjs <dir-with-per-artifact-subdirs> <out-dir>
// Exit: 0 on success or when there is nothing to merge (a release with no mac build), 1 when
// the inputs are present but unusable — a wrong manifest is worse than none.
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
/** Parse the tiny subset of YAML electron-builder emits. No dependency, no surprises. */
export function parseManifest(text) {
const src = String(text ?? "");
const out = { version: "", files: [], path: "", sha512: "", releaseDate: "" };
const top = /^(version|path|sha512|releaseDate):\s*'?([^'\n]*)'?\s*$/gm;
for (const m of src.matchAll(top)) out[m[1]] = m[2].trim();
// files: entries are ` - url: X` followed by indented `sha512:` / `size:` / `blockMapSize:`.
const fileBlocks = src.split(/^\s*-\s+url:\s*/m).slice(1);
for (const block of fileBlocks) {
const url = block.split("\n")[0].trim();
if (!url) continue;
const grab = (k) => {
const m = new RegExp(`^\\s+${k}:\\s*(.+)$`, "m").exec(block);
return m ? m[1].trim() : "";
};
const entry = { url, sha512: grab("sha512"), size: grab("size") };
const bms = grab("blockMapSize");
if (bms) entry.blockMapSize = bms;
out.files.push(entry);
}
return out;
}
/** True when the URL carries an explicit architecture electron-updater can match on. */
export function hasArchSuffix(url) {
return /-(arm64|x64|universal)\./.test(String(url ?? ""));
}
/**
* Merge parsed manifests into one, ordered so electron-updater resolves every arch.
*
* Entries WITHOUT an arch suffix come first, because the un-suffixed build is only ever
* reachable through electron-updater's `?? shift()` fallback. Suffixed entries are found by
* substring regardless of position. Duplicate URLs are collapsed, keeping the first.
*/
export function mergeManifests(manifests) {
const usable = (manifests ?? []).filter((m) => m && Array.isArray(m.files) && m.files.length);
if (usable.length === 0) return null;
const seen = new Set();
const files = [];
for (const m of usable) {
for (const f of m.files) {
if (!f.url || seen.has(f.url)) continue;
seen.add(f.url);
files.push(f);
}
}
// Stable partition: un-suffixed first, order otherwise preserved.
files.sort((a, b) => Number(hasArchSuffix(a.url)) - Number(hasArchSuffix(b.url)));
const primary = files[0];
const versions = [...new Set(usable.map((m) => m.version).filter(Boolean))];
return {
version: versions[0] ?? "",
versionConflict: versions.length > 1 ? versions : null,
files,
// The legacy top-level fields older clients read must agree with the first entry.
path: primary.url,
sha512: primary.sha512,
releaseDate: usable.map((m) => m.releaseDate).filter(Boolean).sort().pop() ?? "",
};
}
export function renderManifest(merged) {
const lines = [`version: ${merged.version}`, "files:"];
for (const f of merged.files) {
lines.push(` - url: ${f.url}`);
lines.push(` sha512: ${f.sha512}`);
lines.push(` size: ${f.size}`);
if (f.blockMapSize) lines.push(` blockMapSize: ${f.blockMapSize}`);
}
lines.push(`path: ${merged.path}`);
lines.push(`sha512: ${merged.sha512}`);
lines.push(`releaseDate: '${merged.releaseDate}'`);
return lines.join("\n") + "\n";
}
function main(argv) {
const [inDir, outDir] = argv;
if (!inDir || !outDir) {
process.stderr.write("usage: merge-mac-update-manifest.mjs <in-dir> <out-dir>\n");
return 1;
}
if (!fs.existsSync(inDir)) {
process.stdout.write(`[merge-mac-manifest] ${inDir} does not exist — nothing to merge.\n`);
return 0;
}
// Every latest-mac.yml under the per-artifact subdirectories.
const found = [];
const walk = (dir) => {
for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
const p = path.join(dir, e.name);
if (e.isDirectory()) walk(p);
else if (e.name === "latest-mac.yml") found.push(p);
}
};
walk(inDir);
if (found.length === 0) {
process.stdout.write("[merge-mac-manifest] no latest-mac.yml found — nothing to merge.\n");
return 0;
}
const parsed = found.map((p) => parseManifest(fs.readFileSync(p, "utf8")));
const merged = mergeManifests(parsed);
if (!merged) {
process.stderr.write(
`[merge-mac-manifest] found ${found.length} manifest(s) but none listed any file — ` +
`refusing to write a manifest that would send every Mac to nothing.\n`
);
return 1;
}
if (merged.versionConflict) {
process.stderr.write(
`[merge-mac-manifest] the manifests disagree on version (${merged.versionConflict.join(", ")}) ` +
`— that means artifacts from two different builds are mixed. Refusing.\n`
);
return 1;
}
fs.mkdirSync(outDir, { recursive: true });
fs.writeFileSync(path.join(outDir, "latest-mac.yml"), renderManifest(merged));
process.stdout.write(
`[merge-mac-manifest] merged ${found.length} manifest(s) → ${merged.files.length} file(s), ` +
`first entry ${merged.path} (the arch electron-updater reaches by fallback).\n`
);
return 0;
}
if (
process.argv[1] &&
fs.realpathSync(process.argv[1]) === fs.realpathSync(fileURLToPath(import.meta.url))
) {
process.exit(main(process.argv.slice(2)));
}

View File

@@ -1,166 +0,0 @@
#!/usr/bin/env node
// Remove `changelog.d/` fragments whose bullet is ALREADY in CHANGELOG.md.
//
// WHY: the release reaches `main` as a single squash commit, so `main` still carries every
// fragment the reconciliation already folded in and deleted. The moment the release branch
// back-merges `main`, git faithfully restores all of them — 191 in the v3.8.49 run. Nothing
// is broken at that instant, which is the problem: the next aggregation folds them in a
// SECOND time and the section grows duplicate bullets that then have to be hand-unpicked.
//
// The rule is deliberately the simple one: a fragment is stale iff its content is already
// represented in CHANGELOG.md. Not "iff it belongs to an older version" — that needs the
// script to reason about which section owns it and gets the in-flight cycle wrong. Already
// present means redundant, wherever it is.
//
// Identity comes from the FILENAME (`<PR-number>-<slug>.md`), which is what that convention
// exists for, and NOT from the `#N` refs inside the bullet. Matching on any body ref looked
// right and was wrong — caught by running this against the live repo, where
// `changelog.d/features/8980-deprecate-gemini-cli-provider.md` was flagged stale because its
// bullet cites issue **#7034** for context, and #7034 shipped in an earlier cycle. That would
// have deleted an unreleased fragment and dropped its credit. A bullet routinely cites issues
// it merely references; only the filename says which PR the fragment *is*.
//
// Fragments with no number in the filename fall back to normalized text, and anything matching
// neither is always kept. Keeping a duplicate is a visible nuisance someone notices; deleting
// an unreleased bullet silently loses a contributor's credit — so every ambiguous case
// resolves toward keeping.
//
// Usage:
// node scripts/release/sweep-stale-fragments.mjs # report only
// node scripts/release/sweep-stale-fragments.mjs --apply # delete the stale ones
// Exit: 0 when nothing stale (or after a successful --apply), 1 when stale fragments remain
// in report mode — so the back-merge step can gate on it.
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..");
const FRAGMENT_DIRS = ["features", "fixes", "maintenance"];
/** Every `#N` in a piece of text. */
export function refsIn(text) {
return [...String(text ?? "").matchAll(/#(\d+)/g)].map((m) => Number(m[1]));
}
/**
* The fragment's own PR number, taken from the `<PR-number>-<slug>.md` filename convention.
* Returns null when the name carries no leading number — those fall back to text matching.
*/
export function prNumberOf(filename) {
const m = /^(\d+)-/.exec(String(filename ?? ""));
return m ? Number(m[1]) : null;
}
/**
* Collapse a bullet to a comparable shape: drop markdown emphasis, links, refs and
* punctuation, fold whitespace, lowercase. Two bullets that say the same thing in slightly
* different markdown must collide here, or the text fallback is useless.
*/
export function normalizeBullet(text) {
return String(text ?? "")
.replace(/\[([^\]]+)\]\([^)]*\)/g, "$1") // [label](url) → label
.replace(/#\d+/g, "") // refs are handled separately
.replace(/[*_`~]/g, "")
.replace(/^[-*+]\s*/gm, "")
.replace(/[^\p{L}\p{N}\s]/gu, " ")
.replace(/\s+/g, " ")
.trim()
.toLowerCase();
}
/**
* Split fragments into `stale` (already in the changelog) and `keep`.
*
* Pure — takes the changelog text and the fragment list, touches no disk. That is what makes
* the dangerous direction (deleting a bullet that never shipped) testable.
*/
export function classifyFragments({ fragments = [], changelog = "" }) {
const changelogRefs = new Set(refsIn(changelog));
// Index the changelog's own bullets by normalized text for the ref-less fallback.
const changelogBullets = new Set(
changelog
.split("\n")
.filter((l) => /^\s*[-*+]\s/.test(l))
.map((l) => normalizeBullet(l))
.filter((s) => s.length >= 12) // too-short lines collide by accident
);
const stale = [];
const keep = [];
for (const frag of fragments) {
// The filename carries the fragment's OWN PR number. Body refs are context, not identity.
const own = prNumberOf(frag.name);
if (own !== null) {
if (changelogRefs.has(own)) {
stale.push({ ...frag, reason: `#${own} already in CHANGELOG.md`, matchedBy: "pr-number" });
} else {
keep.push(frag);
}
continue;
}
const norm = normalizeBullet(frag.body);
if (norm.length >= 12 && changelogBullets.has(norm)) {
stale.push({ ...frag, reason: "identical bullet text already in CHANGELOG.md", matchedBy: "text" });
} else {
keep.push(frag);
}
}
return { stale, keep };
}
export function readFragments(root) {
const out = [];
for (const sub of FRAGMENT_DIRS) {
const dir = path.join(root, "changelog.d", sub);
if (!fs.existsSync(dir)) continue;
for (const name of fs.readdirSync(dir)) {
if (!name.endsWith(".md") || name === "README.md") continue;
const rel = path.join("changelog.d", sub, name);
out.push({ name, rel, body: fs.readFileSync(path.join(root, rel), "utf8") });
}
}
return out;
}
function main(argv) {
const apply = argv.includes("--apply");
const changelog = fs.readFileSync(path.join(ROOT, "CHANGELOG.md"), "utf8");
const fragments = readFragments(ROOT);
const { stale, keep } = classifyFragments({ fragments, changelog });
process.stdout.write(
`[sweep-stale-fragments] ${fragments.length} fragment(s): ${stale.length} already in ` +
`CHANGELOG.md, ${keep.length} pending.\n`
);
if (stale.length === 0) {
process.stdout.write("[sweep-stale-fragments] nothing to sweep.\n");
return 0;
}
const byRef = stale.filter((s) => s.matchedBy === "ref").length;
const byText = stale.length - byRef;
process.stdout.write(` matched by ref: ${byRef} · by text: ${byText}\n`);
for (const s of stale) process.stdout.write(` ${apply ? "removed" : "stale"}: ${s.rel}${s.reason}\n`);
if (!apply) {
process.stdout.write(
"\n[sweep-stale-fragments] report only. Re-run with --apply to delete them.\n" +
"These are almost certainly fragments that a back-merge from main restored after the\n" +
"reconciliation had already folded them in — leaving them duplicates the bullets on the\n" +
"next aggregation.\n"
);
return 1;
}
for (const s of stale) fs.rmSync(path.join(ROOT, s.rel));
process.stdout.write(`[sweep-stale-fragments] removed ${stale.length} stale fragment(s).\n`);
return 0;
}
if (process.argv[1] && fs.realpathSync(process.argv[1]) === fs.realpathSync(fileURLToPath(import.meta.url))) {
process.exit(main(process.argv.slice(2)));
}

View File

@@ -36,37 +36,6 @@ curl -X POST https://localhost:20128/api/auth/logout \
-d '{}'
```
### GET /api/auth/oidc/login
Start OIDC login for the dashboard admin gate
Builds an authorization URL from the configured OIDC issuer/client (discovered
via `{issuer}/.well-known/openid-configuration`, falling back to `{issuer}/authorize`),
sets a short-lived `oidc_state` cookie, and redirects the browser. Password login
remains available as a fallback while OIDC is enabled.
```bash
curl https://localhost:20128/api/auth/oidc/login \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
```
### GET /api/auth/oidc/callback
Complete OIDC login for the dashboard admin gate
Validates the `state` cookie, exchanges the authorization `code` for tokens,
verifies the ID token against the issuer's JWKS (audience = client id), and —
if `oidcAllowedSubjects` is configured — checks the token's `sub`/`email` against
that allowlist. On success it mints the same 30-day `auth_token` dashboard-session
JWT used by password login and redirects to `/dashboard`.
```bash
curl https://localhost:20128/api/auth/oidc/callback \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
```
## Payloads
See the full OpenAPI specification at `GET /api/openapi/spec` or `docs/openapi.yaml` for detailed request/response schemas.

View File

@@ -219,87 +219,6 @@ curl https://localhost:20128/api/v1/providers/{provider}/models \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
```
### GET /api/v1/management/proxy-subscriptions
List proxy subscriptions
Lists all operator-supplied proxy subscription links. Also starts the background auto-refresh scheduler (idempotent) so enabled subscriptions stay in sync. Credentials embedded in `url` are redacted in the response.
```bash
curl https://localhost:20128/api/v1/management/proxy-subscriptions \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
```
### POST /api/v1/management/proxy-subscriptions
Create a proxy subscription
Creates a subscription record. If `mode` is `rule`, at least one entry in `ruleProviders` is required. `updateIntervalMinutes` defaults to 60 and `enabled` defaults to `false` when omitted or not exactly `true`.
```bash
curl -X POST https://localhost:20128/api/v1/management/proxy-subscriptions \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
-H "Content-Type: application/json" \
-d '{}'
```
### GET /api/v1/management/proxy-subscriptions/{id}
Get a proxy subscription
```bash
curl https://localhost:20128/api/v1/management/proxy-subscriptions/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
```
### PATCH /api/v1/management/proxy-subscriptions/{id}
Update a proxy subscription
Partial update — only fields present in the body are changed (name/url/mode/ruleProviders/localCoreEndpoint/updateIntervalMinutes/enabled).
```bash
curl -X PATCH https://localhost:20128/api/v1/management/proxy-subscriptions/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
-H "Content-Type: application/json" \
-d '{}'
```
### DELETE /api/v1/management/proxy-subscriptions/{id}
Delete a proxy subscription
Removes the subscription record and unbinds/drops its synced proxy_registry rows.
```bash
curl -X DELETE https://localhost:20128/api/v1/management/proxy-subscriptions/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
```
### GET /api/v1/management/proxy-subscriptions/{id}/nodes
Get a subscription's last-parsed node summary
Returns the last-parsed node list without re-fetching the (possibly slow) subscription URL.
```bash
curl https://localhost:20128/api/v1/management/proxy-subscriptions/{id}/nodes \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
```
### POST /api/v1/management/proxy-subscriptions/{id}/refresh
Refresh a proxy subscription
Re-fetches and re-parses the subscription URL, syncs its nodes into `proxy_registry`, and (re)binds the pool.
```bash
curl -X POST https://localhost:20128/api/v1/management/proxy-subscriptions/{id}/refresh \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
-H "Content-Type: application/json" \
-d '{}'
```
### POST /api/v1/ocr
Document OCR

View File

@@ -110,33 +110,6 @@ curl -X POST https://localhost:20128/api/usage/budget \
-d '{}'
```
### GET /api/usage/cache-health
Get prompt-cache health summary
Summarizes the `write/read` cache ratio from `call_logs` for a time window:
distribution (p50/p90/p99/max of cache-write tokens), warm/cold/rewrite/uncached
call counts, the "heavy write" outlier share (10x the window median, floored at
1024 tokens — Anthropic's cache-creation minimum), and a per-model breakdown.
Only successful (`status = 200`) calls with a non-null cache column are counted.
```bash
curl https://localhost:20128/api/usage/cache-health \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
```
### GET /api/usage/model-latency-stats
Get per-model/provider latency statistics
Aggregates `usage_history` rows into per-(provider, model) latency stats (avg/p50/p95/p99, std-dev, TTFT, tokens/sec) over a rolling window. Falls back from successful-only to all-sample rows when the successful count is below `minSamples`.
```bash
curl https://localhost:20128/api/usage/model-latency-stats \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
```
## Payloads
See the full OpenAPI specification at `GET /api/openapi/spec` or `docs/openapi.yaml` for detailed request/response schemas.

View File

@@ -94,30 +94,12 @@ export async function POST(_request: Request, { params }: { params: Promise<{ id
newCredentials.error === "refresh_token_reused" ||
newCredentials.error === "invalid_grant"
) {
// A deprecated provider reuses the unrecoverable contract so callers stop
// retrying, but "Refresh token expired" would be a lie: the token is fine, the
// provider is gone. Say that, and say where to go — the operator otherwise
// re-authenticates in a loop against something that no longer exists.
const isDeprecated = newCredentials.code === "provider_deprecated";
const reason =
isDeprecated && typeof newCredentials.reason === "string"
? newCredentials.reason
: "Refresh token expired. Please re-authenticate this account.";
await updateProviderConnection(id, {
testStatus: isDeprecated ? "expired" : "invalid",
lastError: reason,
...(isDeprecated
? { lastErrorType: "provider_deprecated", errorCode: "provider_deprecated" }
: {}),
testStatus: "invalid",
lastError: "Refresh token expired. Please re-authenticate this account.",
});
return NextResponse.json(
{
error: isDeprecated
? "This provider was deprecated and can no longer be refreshed"
: "Token refresh failed — provider returned no new token",
requiresReauth: true,
...(isDeprecated ? { deprecated: true, migrateTo: newCredentials.migrateTo } : {}),
},
{ error: "Token refresh failed — provider returned no new token", requiresReauth: true },
{ status: 401 }
);
}

View File

@@ -20,7 +20,6 @@ import {
} from "@/lib/localDb";
import {
getAccessToken,
getDeprecationNotice,
supportsTokenRefresh,
isUnrecoverableRefreshError,
refreshCopilotToken,
@@ -426,33 +425,6 @@ export async function checkConnection(conn) {
return;
}
// Deprecated upstream (see DEPRECATED_PROVIDERS in tokenRefresh): the provider is not
// routable, so refreshing kept a credential alive that could never answer a request.
// Surface that as a terminal state naming the migration, instead of the silent
// `Skipping … (refresh unsupported)` that dropping it from supportsTokenRefresh alone
// would produce — which would leave the row at "active" forever, doing nothing.
//
// Placed AFTER the terminal-status guard above, which makes this idempotent for free:
// once marked "expired" the connection is skipped on every later sweep, so this writes
// exactly once instead of rewriting the same reason each cycle.
const deprecation = getDeprecationNotice(String(conn.provider || ""));
if (deprecation) {
const now = new Date().toISOString();
await updateProviderConnection(conn.id, {
testStatus: "expired",
lastHealthCheckAt: now,
lastError: deprecation.reason,
lastErrorAt: now,
lastErrorType: "provider_deprecated",
lastErrorSource: "oauth",
errorCode: "provider_deprecated",
});
log(
`${LOG_PREFIX} ${conn.provider}/${getConnectionLogLabel(conn)} is a deprecated provider; marking expired (migrate to ${deprecation.migrateTo})`
);
return;
}
if (!conn.refreshToken || typeof conn.refreshToken !== "string") {
if (isGitHubAccessTokenOnlyConnection(conn)) {
const now = new Date().toISOString();

View File

@@ -1,7 +1,4 @@
import type { Tiktoken } from "js-tiktoken";
import { createRequire } from "module";
const _require = createRequire(import.meta.url);
import { getEncoding, type Tiktoken } from "js-tiktoken";
export type TokenizerEncoding = "cl100k_base" | "o200k_base";
@@ -44,15 +41,9 @@ export function resolveTokenizerEncoding(context?: TokenizerContext): TokenizerE
function getEncoder(encoding: TokenizerEncoding): Tiktoken {
const cached = encoders.get(encoding);
if (cached) return cached;
let tiktoken: { getEncoding: (name: string) => Tiktoken } | null = null;
try {
tiktoken ??= _require("js-tiktoken") as { getEncoding: (name: string) => Tiktoken };
const created = tiktoken.getEncoding(encoding);
encoders.set(encoding, created);
return created;
} catch {
throw new Error(`js-tiktoken not available: cannot create encoder for ${encoding}`);
}
const created = getEncoding(encoding);
encoders.set(encoding, created);
return created;
}
/**

View File

@@ -16,54 +16,18 @@
import test from "node:test";
import assert from "node:assert/strict";
import { execFileSync } from "node:child_process";
import { closeSync, mkdtempSync, openSync, rmSync, writeFileSync } from "node:fs";
import os from "node:os";
import path from "node:path";
import { fileURLToPath } from "node:url";
const here = path.dirname(fileURLToPath(import.meta.url));
const SCRIPT = path.resolve(here, "../../../scripts/ci/should-promote-latest.sh");
/**
* Run the helper with `version` as argv[1] and `tags` (joined by \n) on stdin.
*
* stdin is a real FILE, not a pipe, and that is the whole point. The script
* short-circuits a pre-release VERSION and `exit 0`s WITHOUT ever reading stdin:
*
* case "$VERSION" in
* *-*) echo "false"; exit 0 ;;
* esac
*
* Feeding it through `input:` makes the parent write to a pipe whose reader has
* already gone away, so the write raises `spawnSync bash EPIPE` — the test throws
* before it can assert anything. It is a race, not load: whether the write lands
* before the child exits depends on the 64 KB pipe buffer and the scheduler, which
* is why it failed intermittently in CI (#8953, #8966) while passing locally.
* Measured deterministically:
*
* 2 tags ( 11 bytes) → ok
* 100 tags ( 689 bytes) → ok
* 5 000 tags ( 43 889 bytes) → ok
* 20 000 tags (188 889 bytes) → EPIPE, every time
*
* A regular file has no reader to lose, so the child may exit whenever it likes.
* The script's interface is unchanged — it still reads candidate tags from stdin,
* exactly as docker-publish.yml pipes them in.
*/
/** Run the helper with `version` as argv[1] and `tags` (joined by \n) on stdin. */
function shouldPromote(version: string, tags: string[]): string {
const dir = mkdtempSync(path.join(os.tmpdir(), "should-promote-latest-"));
const stdinPath = path.join(dir, "tags");
writeFileSync(stdinPath, tags.join("\n") + (tags.length ? "\n" : ""));
const fd = openSync(stdinPath, "r");
try {
return execFileSync("bash", [SCRIPT, version], {
stdio: [fd, "pipe", "pipe"],
encoding: "utf8",
}).trim();
} finally {
closeSync(fd);
rmSync(dir, { recursive: true, force: true });
}
return execFileSync("bash", [SCRIPT, version], {
input: tags.join("\n") + (tags.length ? "\n" : ""),
encoding: "utf8",
}).trim();
}
test("#5301 race: new tag not yet synced → still promotes latest", () => {
@@ -103,20 +67,3 @@ test("numeric (not lexical) semver ordering", () => {
test("candidate tags with a leading `v` are normalized", () => {
assert.equal(shouldPromote("3.8.39", ["v3.8.38", "v3.8.37"]), "true");
});
test("a pre-release VERSION is decided without reading stdin, at any input size", () => {
// The regression guard for the harness itself. The script `exit 0`s on a
// pre-release VERSION before touching stdin; with a pipe-backed stdin this
// combination raised `spawnSync bash EPIPE` once the payload outgrew the 64 KB
// pipe buffer — deterministically at 20 000 tags, and intermittently at CI's
// real tag count, which is what reddened #8953 and #8966 on unrelated diffs.
//
// 20 000 tags ≈ 189 KB, comfortably past the buffer. If someone reverts the
// helper to `input:`, this case throws instead of asserting.
const manyTags = Array.from({ length: 20_000 }, (_, i) => `3.8.${i}`);
assert.equal(shouldPromote("3.8.40-rc.1", manyTags), "false");
// And the decision itself must not depend on the candidate set at all.
assert.equal(shouldPromote("3.8.40-rc.1", []), "false");
assert.equal(shouldPromote("4.0.0-beta.2", ["3.8.39"]), "false");
});

View File

@@ -1,95 +0,0 @@
import assert from "node:assert/strict";
import test from "node:test";
// @ts-expect-error — plain .mjs gate script, no type declarations by design
import { evaluateConvergence } from "../../scripts/check/check-install-upgrade.mjs";
/**
* The whole point of this gate is that the two directions of schema divergence are NOT
* equivalent, and the cheap symmetric check ("do the table sets match?") would either
* block every release on harmless residue or let a real upgrade bug through.
*
* Measured on 2026-07-30: a real 3.8.48 install on VPS .16 upgraded to 3.8.49 ended with
* 117 tables while a clean 3.8.49 install had 116 — the extra one being `cache_metrics`.
*/
test("converged schemas pass", () => {
const v = evaluateConvergence({
freshTables: ["a", "b", "c"],
upgradedTables: ["c", "b", "a"],
});
assert.equal(v.ok, true);
assert.deepEqual(v.failures, []);
assert.deepEqual(v.onlyFresh, []);
assert.deepEqual(v.onlyUpgraded, []);
});
test("a table only a CLEAN install creates is ALWAYS a failure — upgraders lack structure", () => {
const v = evaluateConvergence({
freshTables: ["a", "b", "new_feature_table"],
upgradedTables: ["a", "b"],
});
assert.equal(v.ok, false);
assert.deepEqual(v.onlyFresh, ["new_feature_table"]);
assert.match(v.failures[0], /CLEAN install creates but an UPGRADE does not/);
assert.match(v.failures[0], /new_feature_table/);
});
test("that direction cannot be silenced by the residual allowlist", () => {
const v = evaluateConvergence({
freshTables: ["a", "missing_on_upgrade"],
upgradedTables: ["a"],
// Even if someone lists it here, the dangerous direction must still fail.
residualAllowlist: { missing_on_upgrade: "please ignore me" },
});
assert.equal(v.ok, false);
assert.deepEqual(v.onlyFresh, ["missing_on_upgrade"]);
});
test("known residue (cache_metrics, the real 3.8.48→3.8.49 finding) passes but is reported", () => {
const v = evaluateConvergence({
freshTables: ["a", "b"],
upgradedTables: ["a", "b", "cache_metrics"],
residualAllowlist: { cache_metrics: "measured 2026-07-30 on VPS .16" },
});
assert.equal(v.ok, true, "allowlisted residue must not block a release");
assert.deepEqual(v.onlyUpgraded, ["cache_metrics"], "still surfaced so it stays visible");
assert.deepEqual(v.unknownResidue, []);
});
test("UNKNOWN residue fails — a new divergence must not hide behind the allowlist", () => {
const v = evaluateConvergence({
freshTables: ["a"],
upgradedTables: ["a", "cache_metrics", "surprise_table"],
residualAllowlist: { cache_metrics: "known" },
});
assert.equal(v.ok, false);
assert.deepEqual(v.unknownResidue, ["surprise_table"]);
assert.match(v.failures[0], /surprise_table/);
assert.doesNotMatch(v.failures[0], /cache_metrics/, "the known one must not be re-reported as new");
});
test("both directions at once report both failures", () => {
const v = evaluateConvergence({
freshTables: ["shared", "only_fresh"],
upgradedTables: ["shared", "only_upgraded"],
});
assert.equal(v.ok, false);
assert.equal(v.failures.length, 2);
assert.deepEqual(v.onlyFresh, ["only_fresh"]);
assert.deepEqual(v.unknownResidue, ["only_upgraded"]);
});
test("accepts Sets as well as arrays (the gate passes Sets from sqlite_master)", () => {
const v = evaluateConvergence({
freshTables: new Set(["a", "b"]),
upgradedTables: new Set(["a", "b"]),
});
assert.equal(v.ok, true);
});
test("empty/missing inputs do not crash", () => {
const v = evaluateConvergence({ freshTables: undefined, upgradedTables: undefined });
assert.equal(v.ok, true);
assert.deepEqual(v.onlyFresh, []);
});

View File

@@ -1,138 +0,0 @@
/**
* Regression guard for the v3.8.49 desktop channel, which shipped with ZERO assets
* while every gate stayed green.
*
* What actually happened, measured from the run (30503231362) and not inferred:
*
* Build Electron (windows) ....... success
* Build Electron (macos-intel) ... success
* Build Electron (macos-arm64) ... success
* Build Electron (linux) ......... failure — "The runner has received a shutdown
* signal", 8 min into "Creating an optimized
* production build", on runner `GitHub Actions
* 1000378558` (github-hosted)
* Create Release ................. skipped
* Publish to npm ................. skipped
*
* Three independent defects compounded:
*
* 1. Turbopack's production build allocates natively (Rust, off the V8 heap), so
* `--max_old_space_size` does not bound it. On this module graph it outgrows what
* the hosted runner can give and the VM is reclaimed mid-compile — the same wall
* nightly-compat hit on Node 26 (#8090) and the same documented remedy applies:
* the webpack fallback (OMNIROUTE_USE_TURBOPACK=0, docs/reference/ENVIRONMENT.md,
* #6409). The identical build passes on a 32 GB machine, peaking past 14 GB.
*
* 2. `release` gated on `needs: [validate, build]` with no `if:`, so ONE failing
* matrix leg skipped it and discarded the three artifacts that DID build (1.7 GB,
* retained for 90 days and recoverable by hand) plus the source archives, which
* depend on no build at all. Fail-closed made a partial failure look total.
*
* 3. Nothing anywhere asserted the release HAS assets. A release with 16 binaries and
* a release with 0 were indistinguishable to CI.
*/
import test from "node:test";
import assert from "node:assert/strict";
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const workflowPath = path.join(repoRoot, ".github/workflows/electron-release.yml");
function readWorkflow(): string {
return fs.readFileSync(workflowPath, "utf-8");
}
/** Job keys live at 2-space indentation under `jobs:`; the next such key ends the block. */
function extractJobBlock(yaml: string, jobName: string): string {
const lines = yaml.split("\n");
const startIdx = lines.findIndex((l) => new RegExp(`^ ${jobName}:\\s*$`).test(l));
assert.ok(startIdx !== -1, `electron-release.yml must define the ${jobName} job`);
const block: string[] = [];
for (let i = startIdx + 1; i < lines.length; i++) {
if (/^ \S/.test(lines[i])) break;
block.push(lines[i]);
}
return block.join("\n");
}
test("the linux leg builds with the webpack fallback, not Turbopack", () => {
const buildBlock = extractJobBlock(readWorkflow(), "build");
assert.match(buildBlock, /npm run build/, "the build job must still run the production build");
assert.match(
buildBlock,
/OMNIROUTE_USE_TURBOPACK:/,
"the build job must pin the bundler explicitly — leaving it to the default is what " +
"let the linux leg die on the hosted runner and take the whole desktop channel down"
);
// The value is per-platform: linux gets webpack ('0'), the platforms that already
// build fine keep Turbopack. A blanket '0' would slow Windows/macOS for no reason.
assert.match(
buildBlock,
/matrix\.platform == 'linux'[^\n]*'0'/,
"linux specifically must select the webpack fallback ('0')"
);
});
test("one failing platform does not discard the platforms that built", () => {
const releaseBlock = extractJobBlock(readWorkflow(), "release");
assert.match(
releaseBlock,
/if:\s*\$\{\{\s*!cancelled\(\)/,
"the release job must run even when a build leg failed — a bare `needs: [.., build]` " +
"skips it on the first failure and throws away every artifact that succeeded"
);
assert.match(
releaseBlock,
/needs\.validate\.result == 'success'/,
"…but it must still require `validate` to have passed, so a bad version never releases"
);
assert.match(
releaseBlock,
/fail_on_unmatched_files:\s*false/,
"attaching a partial set requires tolerating globs that match nothing"
);
});
test("a release with no binaries fails a job instead of passing unnoticed", () => {
const wf = readWorkflow();
const verifyBlock = extractJobBlock(wf, "verify-desktop-assets");
for (const pattern of ["exe", "dmg", "AppImage", "deb"]) {
assert.ok(
verifyBlock.includes(pattern),
`the asset check must assert a ${pattern} installer is present`
);
}
assert.match(verifyBlock, /exit 1/, "a missing platform must fail the job, not just warn");
});
test("the asset check is a separate job, so it cannot block the npm channel", () => {
const wf = readWorkflow();
// publish-npm gates on `release`. If the assert lived inside `release`, a desktop-only
// gap would also stop the npm publish — the primary distribution channel.
const publishBlock = extractJobBlock(wf, "publish-npm");
assert.match(
publishBlock,
/needs:\s*\[validate, release\]/,
"publish-npm is expected to gate on release; if that changes, revisit this reasoning"
);
assert.doesNotMatch(
publishBlock,
/verify-desktop-assets/,
"publish-npm must NOT depend on the desktop asset check — npm must publish even when " +
"a desktop platform is missing"
);
const releaseBlock = extractJobBlock(wf, "release");
assert.doesNotMatch(
releaseBlock,
/exit 1/,
"the release job must not fail on missing assets — that would cascade into publish-npm; " +
"the dedicated verify-desktop-assets job carries that failure instead"
);
});

View File

@@ -1,111 +0,0 @@
/**
* Deprecation of the `gemini-cli` UPSTREAM provider (not the client identity).
*
* Why this is a deprecation and not a deletion — measured on 2026-07-30:
*
* - `gemini-cli` is NOT routable: absent from PROVIDERS (open-sse/config/constants),
* REGISTRY (providerRegistry), OAUTH_PROVIDERS, and no executor references it. A
* stored connection can therefore never serve a request, no matter how fresh its
* token is.
* - The legacy refresh path DID work: it redeemed the token with
* `PROVIDERS.gemini.clientId`, which is the same public Gemini CLI / Code Assist
* OAuth client. So refreshing kept a credential alive that had nowhere to go.
* - Removing it from `supportsTokenRefresh` alone would produce a SILENT skip
* (`Skipping … (refresh unsupported)` in tokenHealthCheck) — the connection would
* sit at `active` forever while doing nothing.
*
* So the deprecation has to be *legible*: the connection becomes terminal with a
* reason that names the migration. `gemini` uses the very same OAuth client, so
* re-adding the account there is a real, working path — not advice to nowhere.
*
* NOT touched, and asserted here so a future edit cannot conflate them: the
* `gemini-cli` CLIENT identity (issue #7034) — requests ARRIVING from the Gemini CLI
* or any @google/genai-based client, where OmniRoute is the server.
*/
import test from "node:test";
import assert from "node:assert/strict";
import { PROVIDERS } from "../../open-sse/config/constants.ts";
import { REGISTRY } from "../../open-sse/config/providerRegistry.ts";
import {
DEPRECATED_PROVIDERS,
getAccessToken,
getDeprecationNotice,
getRefreshLeadMs,
isDeprecatedProvider,
REFRESH_LEAD_MS,
supportsTokenRefresh,
TOKEN_EXPIRY_BUFFER_MS,
} from "../../open-sse/services/tokenRefresh.ts";
import { CLIENT_IDENTITY_PROFILES } from "../../src/shared/constants/clientIdentityProfiles.ts";
test("gemini-cli is registered as deprecated, with a migration target that is routable", () => {
assert.equal(isDeprecatedProvider("gemini-cli"), true);
assert.equal(isDeprecatedProvider("gemini"), false);
assert.equal(isDeprecatedProvider("antigravity"), false);
assert.equal(isDeprecatedProvider(""), false);
const notice = getDeprecationNotice("gemini-cli");
assert.ok(notice, "a deprecated provider must carry a notice");
assert.equal(notice.migrateTo, "gemini");
assert.match(notice.reason, /gemini/i);
// The migration target must actually be usable — otherwise the notice sends the
// operator nowhere. This is the assertion that makes the advice honest.
assert.ok(REGISTRY[notice.migrateTo], "the migration target must be a routable provider");
assert.ok(PROVIDERS[notice.migrateTo], "the migration target must have OAuth config");
});
test("a deprecated provider is no longer refresh-capable and carries no refresh lead", () => {
assert.equal(supportsTokenRefresh("gemini-cli"), false);
// The TTL entry existed only to pace a refresh that no longer happens. Dropping it
// means the generic fallback applies, which is the honest answer for a provider the
// scheduler no longer refreshes.
assert.equal(REFRESH_LEAD_MS["gemini-cli"], undefined);
assert.equal(getRefreshLeadMs("gemini-cli"), TOKEN_EXPIRY_BUFFER_MS);
});
test("refreshing a stored gemini-cli connection fails with a CLASSIFIED code, not silence", async () => {
const originalFetch = globalThis.fetch;
let upstreamCalls = 0;
globalThis.fetch = (async () => {
upstreamCalls++;
return new Response("{}", { status: 200 });
}) as typeof fetch;
try {
const result = await getAccessToken(
"gemini-cli",
{ refreshToken: "legacy-gemini-cli-refresh" },
{}
);
assert.equal(upstreamCalls, 0, "a deprecated provider must not touch the upstream at all");
assert.equal(
result.error,
"unrecoverable_refresh_error",
"reuse the established unrecoverable contract so every existing caller stops retrying"
);
assert.equal(result.code, "provider_deprecated", "…but with a code that says WHY");
assert.equal(result.migrateTo, "gemini", "and the migration target, for a legible message");
assert.equal(result.accessToken, undefined);
} finally {
globalThis.fetch = originalFetch;
}
});
test("the gemini-cli CLIENT identity is untouched (issue #7034)", () => {
// Category A. Requests ARRIVING from the Gemini CLI — OmniRoute is the server here.
// Deleting this is the failure mode the deprecation must never cause.
assert.ok(
CLIENT_IDENTITY_PROFILES["gemini-cli"],
"the gemini-cli client-identity profile must survive the provider deprecation"
);
assert.equal(CLIENT_IDENTITY_PROFILES["gemini-cli"].id, "gemini-cli");
});
test("deprecation does not resurrect the provider into any routable registry", () => {
assert.equal(REGISTRY["gemini-cli"], undefined);
assert.equal(PROVIDERS["gemini-cli"], undefined);
assert.ok(Object.prototype.hasOwnProperty.call(DEPRECATED_PROVIDERS, "gemini-cli"));
});

View File

@@ -11,27 +11,10 @@ import {
} from "../../open-sse/services/tokenRefresh.ts";
import { OAUTH_PROVIDERS } from "../../src/shared/constants/providers.ts";
// The arc of this file, kept whole because each step is the reason the next made sense:
//
// #8232 Restored OAuth auto-refresh for stored `gemini-cli` connections — a real user
// report: the UI advertises automatic token rotation for OAuth providers, and
// these rows never rotated. It overshot, restoring a routable, UI-visible
// provider along the way.
// #8275 Narrowed that to the legacy refresh path ONLY, keeping the discontinued
// provider out of the public registries and out of routing.
// now Deprecated. What #8275 left was a refresh that WORKED (it redeemed against
// PROVIDERS.gemini's client — the same public Gemini CLI OAuth client) for a
// provider that is NOT routable. So the token stayed fresh and could never
// answer a request: periodic upstream calls maintaining a dead credential.
//
// The refresh assertions below therefore now assert the deprecation instead of the
// refresh. They were rewritten, not removed — the count is unchanged and the behavior is
// pinned harder than before (a silent skip would pass a weaker test; a classified code
// does not). Registry-exclusion coverage from #8275 is untouched, because that guarantee
// still holds and is still worth guarding.
//
// Companion: tests/unit/gemini-cli-deprecation.test.ts covers the notice itself, the
// routability of the migration target, and the untouched CLIENT identity (#7034).
// #8232 set out to repair OAuth refresh for legacy stored connections, but
// exceeded that compatibility goal by restoring a complete routable and
// UI-visible Gemini CLI provider. Preserve only the legacy refresh path while
// keeping the discontinued provider out of public registries and routing.
test("Gemini CLI stays out of the chat and OAuth provider registries", () => {
assert.equal(REGISTRY["gemini-cli"], undefined);
@@ -41,13 +24,9 @@ test("Gemini CLI stays out of the chat and OAuth provider registries", () => {
assert.ok(REGISTRY.antigravity);
});
test("legacy Gemini CLI connections are no longer refreshed at all", () => {
// Was: lead time equal to antigravity's, supportsTokenRefresh === true.
assert.equal(supportsTokenRefresh("gemini-cli"), false);
assert.equal(REFRESH_LEAD_MS["gemini-cli"], undefined);
// The sibling Google-backed providers must NOT be affected by the deprecation.
assert.equal(supportsTokenRefresh("gemini"), true);
assert.equal(REFRESH_LEAD_MS.antigravity, 15 * 60 * 1000);
test("legacy Gemini CLI connections retain proactive token refresh", () => {
assert.equal(REFRESH_LEAD_MS["gemini-cli"], REFRESH_LEAD_MS.antigravity);
assert.equal(supportsTokenRefresh("gemini-cli"), true);
});
test("Gemini CLI stays out of the provider translation snapshot", () => {
@@ -56,20 +35,22 @@ test("Gemini CLI stays out of the provider translation snapshot", () => {
assert.equal(snapshot["gemini-cli"], undefined);
});
test("legacy Gemini CLI refresh never reaches Google's token endpoint anymore", async () => {
// Was: asserted a successful POST to OAUTH_ENDPOINTS.google.token carrying
// PROVIDERS.gemini's client_id/secret, returning a new access token. That call is the
// waste the deprecation removes — the token it produced could not route anywhere. Now
// the assertion is stronger: not "it fails", but "no upstream call happens at all".
test("legacy Gemini CLI refresh reuses Gemini OAuth credentials without a provider entry", async () => {
const originalFetch = globalThis.fetch;
const calls: string[] = [];
const calls: Array<{ url: string; options: RequestInit }> = [];
globalThis.fetch = (async (url) => {
calls.push(String(url));
return new Response(JSON.stringify({ access_token: "should-never-be-requested" }), {
status: 200,
headers: { "content-type": "application/json" },
});
globalThis.fetch = (async (url, options: RequestInit = {}) => {
calls.push({ url: String(url), options });
return new Response(
JSON.stringify({
access_token: "legacy-gemini-cli-access-new",
expires_in: 3600,
}),
{
status: 200,
headers: { "content-type": "application/json" },
}
);
}) as typeof fetch;
try {
@@ -79,27 +60,27 @@ test("legacy Gemini CLI refresh never reaches Google's token endpoint anymore",
{}
);
assert.deepEqual(calls, [], `expected zero upstream calls, got ${calls.join(", ")}`);
assert.notEqual(
calls[0],
OAUTH_ENDPOINTS.google.token,
"the Google token endpoint must not be contacted for a deprecated provider"
);
assert.equal(result.accessToken, undefined, "no token may be handed back");
assert.equal(result.code, "provider_deprecated");
assert.equal(calls.length, 1);
assert.equal(calls[0].url, OAUTH_ENDPOINTS.google.token);
const body = new URLSearchParams(String(calls[0].options.body));
assert.equal(body.get("grant_type"), "refresh_token");
assert.equal(body.get("refresh_token"), "legacy-gemini-cli-refresh-old");
assert.equal(body.get("client_id"), LEGACY_PROVIDERS.gemini.clientId);
assert.equal(body.get("client_secret"), LEGACY_PROVIDERS.gemini.clientSecret);
assert.deepEqual(result, {
accessToken: "legacy-gemini-cli-access-new",
refreshToken: "legacy-gemini-cli-refresh-old",
expiresIn: 3600,
});
} finally {
globalThis.fetch = originalFetch;
}
});
test("legacy Gemini CLI refresh reports deprecation, not a revoked token", async () => {
// Was: a 400 invalid_grant from upstream surfaced as
// { error: "unrecoverable_refresh_error", code: "invalid_grant" }. The envelope is
// deliberately unchanged — every existing caller keys on `error` and must keep
// stopping its retries (isUnrecoverableRefreshError, the manual-refresh route). Only
// the `code` differs, and that difference is the whole point: "your token was revoked"
// and "this provider no longer exists" demand different actions from the operator.
test("legacy Gemini CLI refresh surfaces revoked tokens as unrecoverable", async () => {
const originalFetch = globalThis.fetch;
globalThis.fetch = (async () =>
new Response(JSON.stringify({ error: "invalid_grant" }), {
status: 400,
@@ -112,16 +93,10 @@ test("legacy Gemini CLI refresh reports deprecation, not a revoked token", async
{ refreshToken: "legacy-gemini-cli-refresh-revoked" },
{}
);
assert.equal(result.error, "unrecoverable_refresh_error");
assert.equal(result.code, "provider_deprecated");
assert.equal(result.migrateTo, "gemini");
assert.match(result.reason, /gemini/i);
// The pre-deprecation behavior for a genuinely revoked token still works for the
// provider that IS routable — proof the deprecation did not blunt the real path.
const geminiResult = await getAccessToken("gemini", { refreshToken: "revoked" }, {});
assert.equal(geminiResult.error, "unrecoverable_refresh_error");
assert.equal(geminiResult.code, "invalid_grant");
assert.deepEqual(result, {
error: "unrecoverable_refresh_error",
code: "invalid_grant",
});
} finally {
globalThis.fetch = originalFetch;
}

View File

@@ -1,142 +0,0 @@
/**
* Guard for the macOS updater manifest merge (gap 31) — a bug that is LIVE in v3.8.48:
* an Intel Mac downloads the ARM dmg.
*
* electron-builder runs once per macOS job and each run emits its own `latest-mac.yml` listing
* only its own dmg — measured at 338 and 350 bytes, different content, identical filename.
* `actions/download-artifact` with `merge-multiple: true` resolves that collision by ARRIVAL
* ORDER, so one silently overwrites the other; arm64 won in the published v3.8.48.
*
* Why that breaks Intel, from electron-updater's own code
* (electron-updater/out/providers/Provider.js):
*
* files.find(it => [...].some(n => n.includes(process.arch))) ?? files.shift()
*
* The Intel dmg is `OmniRoute-X.Y.Z.dmg` — no arch suffix. On Intel `process.arch` is `"x64"`,
* nothing matches, and the fallback takes the FIRST entry.
*
* So ORDER is the fix, not tidiness, and that is what most of these tests pin: the un-suffixed
* entry must be first, because it is the only one reachable through that fallback.
*/
import test from "node:test";
import assert from "node:assert/strict";
// @ts-expect-error — plain .mjs release script, no type declarations by design
import {
hasArchSuffix,
mergeManifests,
parseManifest,
renderManifest,
} from "../../scripts/release/merge-mac-update-manifest.mjs";
// Verbatim shape of what the two jobs produced for v3.8.49.
const INTEL = `version: 3.8.49
files:
- url: OmniRoute-3.8.49.dmg
sha512: FSRnh09fSyOSeB7VXXe==
size: 392717602
path: OmniRoute-3.8.49.dmg
sha512: FSRnh09fSyOSeB7VXXe==
releaseDate: '2026-07-30T01:07:13.268Z'
`;
const ARM = `version: 3.8.49
files:
- url: OmniRoute-3.8.49-arm64.dmg
sha512: 2eVsFVsY0JiCKgNkNYg==
size: 390627465
path: OmniRoute-3.8.49-arm64.dmg
sha512: 2eVsFVsY0JiCKgNkNYg==
releaseDate: '2026-07-30T01:22:47.282Z'
`;
test("parses electron-builder's manifest shape", () => {
const m = parseManifest(INTEL);
assert.equal(m.version, "3.8.49");
assert.equal(m.files.length, 1);
assert.equal(m.files[0].url, "OmniRoute-3.8.49.dmg");
assert.equal(m.files[0].size, "392717602");
assert.equal(m.path, "OmniRoute-3.8.49.dmg");
assert.match(m.releaseDate, /^2026-07-30T01:07/);
});
test("the un-suffixed (Intel) entry is FIRST — this is the entire fix", () => {
// Fed in the order that lost in production: arm64 first.
const merged = mergeManifests([parseManifest(ARM), parseManifest(INTEL)]);
assert.equal(merged.files.length, 2);
assert.equal(
merged.files[0].url,
"OmniRoute-3.8.49.dmg",
"electron-updater's `?? shift()` fallback takes files[0]; only the un-suffixed build " +
"depends on it, so it must be there"
);
assert.equal(merged.files[1].url, "OmniRoute-3.8.49-arm64.dmg");
});
test("order is stable regardless of input order", () => {
const a = mergeManifests([parseManifest(INTEL), parseManifest(ARM)]);
const b = mergeManifests([parseManifest(ARM), parseManifest(INTEL)]);
assert.deepEqual(
a.files.map((f: { url: string }) => f.url),
b.files.map((f: { url: string }) => f.url),
"arrival order is exactly what broke v3.8.48 — the merge must not inherit it"
);
});
test("the legacy top-level fields agree with the first entry", () => {
// Older clients read `path`/`sha512` instead of `files[]`; disagreement sends them to the
// wrong download.
const merged = mergeManifests([parseManifest(ARM), parseManifest(INTEL)]);
assert.equal(merged.path, merged.files[0].url);
assert.equal(merged.sha512, merged.files[0].sha512);
});
test("checksums and sizes travel untouched", () => {
const merged = mergeManifests([parseManifest(INTEL), parseManifest(ARM)]);
const byUrl = Object.fromEntries(merged.files.map((f: { url: string }) => [f.url, f]));
assert.equal(byUrl["OmniRoute-3.8.49.dmg"].sha512, "FSRnh09fSyOSeB7VXXe==");
assert.equal(byUrl["OmniRoute-3.8.49-arm64.dmg"].size, "390627465");
});
test("the newest releaseDate wins", () => {
const merged = mergeManifests([parseManifest(INTEL), parseManifest(ARM)]);
assert.match(merged.releaseDate, /01:22:47/, "arm64 built later");
});
test("duplicate URLs collapse", () => {
const merged = mergeManifests([parseManifest(INTEL), parseManifest(INTEL)]);
assert.equal(merged.files.length, 1);
});
test("mixed-version inputs are refused, not merged", () => {
// Artifacts from two different builds in one release-assets dir means something is wrong
// upstream; a manifest stitched from both would point at files that were never published
// together.
const merged = mergeManifests([parseManifest(INTEL), parseManifest(ARM.replace("3.8.49", "3.8.48"))]);
assert.ok(merged.versionConflict, "the caller must be able to refuse");
assert.deepEqual(merged.versionConflict.sort(), ["3.8.48", "3.8.49"]);
});
test("no usable input yields null rather than an empty manifest", () => {
assert.equal(mergeManifests([]), null);
assert.equal(mergeManifests([{ files: [] }]), null);
assert.equal(mergeManifests(undefined), null);
});
test("hasArchSuffix recognizes only real arch markers", () => {
assert.equal(hasArchSuffix("OmniRoute-3.8.49-arm64.dmg"), true);
assert.equal(hasArchSuffix("OmniRoute-3.8.49-x64.dmg"), true);
assert.equal(hasArchSuffix("OmniRoute-3.8.49-universal.dmg"), true);
assert.equal(hasArchSuffix("OmniRoute-3.8.49.dmg"), false);
// "arm64" must be a suffix segment, not any substring of the name.
assert.equal(hasArchSuffix("OmniRoute-arm64beta-3.8.49.dmg"), false);
});
test("the rendered manifest round-trips", () => {
const merged = mergeManifests([parseManifest(ARM), parseManifest(INTEL)]);
const reparsed = parseManifest(renderManifest(merged));
assert.equal(reparsed.files.length, 2);
assert.equal(reparsed.files[0].url, "OmniRoute-3.8.49.dmg", "order survives serialization");
assert.equal(reparsed.version, "3.8.49");
assert.equal(reparsed.path, "OmniRoute-3.8.49.dmg");
});

View File

@@ -1,112 +0,0 @@
/**
* Supply-chain guard for the `next-build` fast path in npm-publish.yml.
*
* The publish job restores a CI-built standalone tree and ships it as the npm tarball.
* The run it restores from is picked by querying the runs API for `head_sha`. That query
* also returns `pull_request` runs from FORKS — they execute in this repository's context
* and upload their own `next-build`, built from fork-controlled source. Measured on
* 2026-07-30: 57 runs in this repo have a `head_repository` other than the repo itself.
*
* Selecting on name + conclusion alone therefore trusts bytes by coincidence of commit
* SHA. The `head_repository.full_name == env.REPO` clause is what makes the provenance
* explicit. Raised as CodeQL `actions/artifact-poisoning/critical`.
*
* This is a guard, not a reproduction: nothing here can exercise a real poisoning attempt.
* It asserts the clause cannot be dropped in a future edit without a test turning red.
*/
import test from "node:test";
import assert from "node:assert/strict";
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
function readPublishWorkflow(): string {
return fs.readFileSync(path.join(repoRoot, ".github/workflows/npm-publish.yml"), "utf-8");
}
/** The `run:` body of the step whose `name:` matches, at any indentation. */
function extractStep(yaml: string, stepName: string): string {
const lines = yaml.split("\n");
const startIdx = lines.findIndex((l) => l.includes(`- name: ${stepName}`));
assert.ok(startIdx !== -1, `npm-publish.yml must define the "${stepName}" step`);
const indent = lines[startIdx].indexOf("- name:");
const block: string[] = [];
for (let i = startIdx + 1; i < lines.length; i++) {
// The next list item at the same indentation ends this step.
if (lines[i].slice(indent).startsWith("- ")) break;
block.push(lines[i]);
}
return block.join("\n");
}
const ARTIFACT_STEP = "Reuse CI's next-build artifact (skips the heavy rebuild)";
test("the artifact fast path only trusts runs from THIS repository", () => {
const step = extractStep(readPublishWorkflow(), ARTIFACT_STEP);
assert.match(
step,
/head_repository\.full_name == env\.REPO/,
"the run selection must require the run to originate from this repository — without it, " +
"a fork's pull_request run supplies the bytes that get published to npm"
);
// Provenance is necessary but not sufficient: tree-equality still comes from head_sha.
assert.match(
step,
/head_sha=\$HEAD_SHA/,
"the run must still be matched on head_sha — that is the tree-equality guarantee"
);
// Was: `assert.match(step, /\.conclusion == "success"/)`. That assertion encoded the wrong
// criterion (gap 16) and is deliberately INVERTED here, not deleted. Requiring the whole run to
// have concluded successfully discarded a perfectly good tree whenever any unrelated shard went
// red, pushing the publish into the 40-minute build this fast path exists to avoid. The artifact
// is only uploaded when the Build job itself succeeded, so its PRESENCE is the accurate signal.
//
// The replacement is strictly stronger: it pins BOTH that the loose criterion is gone AND that
// the step actually probes candidates for the artifact, which the old assertion never checked.
assert.doesNotMatch(
step,
/\.conclusion == "success"/,
"an unrelated red shard must not discard a valid build artifact"
);
assert.match(
step,
/gh run download .*--name next-build/,
"the criterion is now whether the run HAS the artifact — so it must try to download it"
);
assert.match(
step,
/for candidate in \$CANDIDATES/,
"…across more than one candidate run, or a single miss still falls back to a full build"
);
});
test("REPO is passed through env, never interpolated into the script body", () => {
const step = extractStep(readPublishWorkflow(), ARTIFACT_STEP);
assert.match(step, /REPO:\s*\$\{\{\s*github\.repository\s*\}\}/, "REPO must come from env:");
// Hard rule #13 / zizmor template-injection: no ${{ }} inside the run: body.
const runBody = step.slice(step.indexOf("run: |"));
assert.doesNotMatch(
runBody,
/\$\{\{/,
"the run: body must not interpolate any ${{ }} expression — pass values via env:"
);
});
test("a miss falls through to a real build instead of publishing an empty tree", () => {
const step = extractStep(readPublishWorkflow(), ARTIFACT_STEP);
assert.match(
step,
/continue-on-error:\s*true/,
"the fast path is best-effort — a miss must not fail the publish"
);
assert.match(
step,
/falling back to a full build/,
"a miss must say so, so a silent no-op cannot look like a restore"
);
});

View File

@@ -1,80 +0,0 @@
/**
* Guard for the self-targeting-PR check (gap 23).
*
* PR #8912 has head == base == release/v3.8.50 — a PR from a branch to itself. No diff, can
* never merge, and it sits in the queue with a full check board attached, burning review
* attention and CI minutes on every push to that branch. It survived precisely because nothing
* looks wrong: the checks pass (there is nothing to check) and mergeability just reads unknown.
*
* The distinction these tests protect is the one that makes the check safe to block on: an
* equal head/base BRANCH is conclusive, an equal head/base SHA is not. A branch cut moments ago
* has an identical tip and is perfectly legitimate — failing on that would block real work.
*/
import test from "node:test";
import assert from "node:assert/strict";
// @ts-expect-error — plain .mjs gate script, no type declarations by design
import { classifyPrTarget } from "../../scripts/check/check-pr-self-target.mjs";
test("the #8912 shape is rejected: same branch on both sides", () => {
const r = classifyPrTarget({
headRef: "release/v3.8.50",
baseRef: "release/v3.8.50",
headSha: "abc1234567",
baseSha: "abc1234567",
});
assert.equal(r.verdict, "self-targeting");
assert.match(r.reason, /release\/v3\.8\.50/);
assert.match(r.reason, /never merge/);
});
test("a normal PR passes", () => {
const r = classifyPrTarget({
headRef: "fix/something",
baseRef: "release/v3.8.50",
headSha: "aaaaaaaaaa",
baseSha: "bbbbbbbbbb",
});
assert.equal(r.verdict, "ok");
});
test("equal SHAs on DIFFERENT branches only warn — a fresh branch cut is legitimate", () => {
// This is the case that must not block: branch created, nothing pushed yet.
const r = classifyPrTarget({
headRef: "fix/just-cut",
baseRef: "release/v3.8.50",
headSha: "cccccccccc",
baseSha: "cccccccccc",
});
assert.equal(r.verdict, "empty-diff", "must NOT be self-targeting");
assert.match(r.reason, /nothing to review yet/);
});
test("branch equality wins over SHA difference", () => {
// Same branch but the tip moved between the two reads — still self-targeting.
const r = classifyPrTarget({
headRef: "release/v3.8.50",
baseRef: "release/v3.8.50",
headSha: "aaaaaaaaaa",
baseSha: "bbbbbbbbbb",
});
assert.equal(r.verdict, "self-targeting");
});
test("no PR context is a skip, not a failure", () => {
// The same job runs on push and workflow_dispatch, where these vars are empty.
assert.equal(classifyPrTarget({}).verdict, "no-pr-context");
assert.equal(classifyPrTarget({ headRef: "", baseRef: "" }).verdict, "no-pr-context");
assert.equal(classifyPrTarget().verdict, "no-pr-context");
});
test("whitespace does not create a false pass", () => {
const r = classifyPrTarget({ headRef: " release/v3.8.50 ", baseRef: "release/v3.8.50" });
assert.equal(r.verdict, "self-targeting", "a stray space must not disguise the same branch");
});
test("only one ref present is not conclusive either way", () => {
// Half a signal must not fail the PR — the check blocks, so it has to be certain.
assert.equal(classifyPrTarget({ headRef: "fix/x", baseRef: "" }).verdict, "ok");
assert.equal(classifyPrTarget({ headRef: "", baseRef: "main" }).verdict, "ok");
});

Some files were not shown because too many files have changed in this diff Show More