mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-12 10:12:11 +03:00
Compare commits
7 Commits
feat/condu
...
fix/releas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
169f329ccf | ||
|
|
78a5ce5cea | ||
|
|
8a35c45029 | ||
|
|
200233d301 | ||
|
|
5f38ab48ca | ||
|
|
99be31137c | ||
|
|
b1e151f3cc |
@@ -1958,6 +1958,11 @@ APP_LOG_TO_FILE=true
|
||||
# WARNING: produces large files — use only for temporary debugging.
|
||||
# CHAT_DEBUG_FILE=true
|
||||
|
||||
# Surf empty textContent chunks in the Claude response translation path for debugging.
|
||||
# Used by: open-sse/handlers/responseTranslator.ts. Set to "true" to enable.
|
||||
# Default: disabled (opt-in).
|
||||
# DEBUG_CLAUDE_NONSTREAM=true
|
||||
|
||||
# Enable E2E test mode — relaxes auth and enables test harness hooks.
|
||||
# NEXT_PUBLIC_OMNIROUTE_E2E_MODE=true
|
||||
|
||||
@@ -2630,6 +2635,7 @@ QUOTA_STORE_DRIVER=sqlite # sqlite | redis
|
||||
# Adobe colligo normally rejects risk tokens minted without a headed browser.
|
||||
# ADOBE_FIREFLY_CHROME_CDP_PORT=9334
|
||||
# ADOBE_FIREFLY_CHROME_VISIBLE=0
|
||||
# ADOBE_FIREFLY_CHROME_HEADED=0 # Legacy alias for ADOBE_FIREFLY_CHROME_VISIBLE=1
|
||||
# ADOBE_FIREFLY_CHROME_HEADLESS=0
|
||||
# ADOBE_FIREFLY_CHROME_FORCE_RESTART=0
|
||||
# ADOBE_FIREFLY_CHROME_PING=auto
|
||||
|
||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -8,6 +8,18 @@
|
||||
|
||||
---
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -1,7 +1 @@
|
||||
feat(images): execute full combo strategy + fallback in /v1/images/generations (#9239)
|
||||
|
||||
Add open-sse/services/imageCombo.ts that expands combo targets, filters
|
||||
to images-capable, executes priority strategy with handleImageGeneration
|
||||
per target, and returns first success or last failure. Route patches
|
||||
detect combo names before model resolution and divert to the new
|
||||
execution path.
|
||||
- **feat(images):** execute full combo strategy + fallback in `/v1/images/generations` for combo targets, expanding to images-capable models with priority strategy and per-target `handleImageGeneration` ([#9239](https://github.com/diegosouzapw/OmniRoute/pull/9239))
|
||||
|
||||
@@ -1,5 +1 @@
|
||||
---
|
||||
feature: 9490
|
||||
---
|
||||
|
||||
**Warm catalog startup from disk snapshot + parallel refresh** (opencode-plugin): The config-shim hook now reads the last disk snapshot *before* fetching, so the provider registers immediately with the last-known-good catalog (~1-2s vs ~30s on a warm gateway). All six fetchers run concurrently via `Promise.allSettled` instead of sequentially. A failed refresh keeps the snapshot (no overwrite). An in-flight guard prevents concurrent refreshes for the same cache key. The `features.diskCache: false` opt-out disables the warm read entirely.
|
||||
- **feat(plugin):** warm catalog startup from disk snapshot + parallel refresh in the opencode-plugin config-shim — registers ~1-2s on warm gateways instead of ~30s, `Promise.allSettled` over the six fetchers, keeps the last disk snapshot on failed refresh, and an in-flight guard prevents concurrent refreshes for the same cache key ([#9490](https://github.com/diegosouzapw/OmniRoute/pull/9490))
|
||||
|
||||
@@ -408,11 +408,6 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/api/combos/[id]/route.ts": {
|
||||
"no-restricted-imports": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/api/combos/reorder/route.ts": {
|
||||
"no-restricted-imports": {
|
||||
"count": 1
|
||||
@@ -3339,4 +3334,4 @@
|
||||
"count": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,30 +2,24 @@
|
||||
"_rebaseline_2026_08_09_8984_api_key_cache_mode": "PR #8984 own growth during the 2026-08-09 rebase: src/lib/db/apiKeys.ts 1529->1545 (+16 = the per-key apiKeys.cacheDefaultMode column + its row parsers and cascade wiring; additive at the existing connection write/read chokepoints). Covered by tests/unit/chatcore-semantic-cache.test.ts. (chatCore.ts stays at the pre-existing base-red ceiling — upstream tip already exceeds the frozen 5042, this PR only adds +2 on top; not re-bumped per the no-inherit-ratchet rule.)",
|
||||
"_rebaseline_2026_08_09_9207_breaker_halfopen_recovery": "PR #9207 own growth during the 2026-08-09 rebase: open-sse/services/accountFallback.ts 1978->2020 (+42 = recordProviderSuccess now also transitions the provider circuit breaker from HALF_OPEN to CLOSED when a request succeeds, so the breaker is not stuck half-open after repeated failures; the transition and its reset wiring grow the existing provider-success path, not extractable). Covered by tests/unit/provider-breaker-halfopen-recovery.test.ts.",
|
||||
"_rebaseline_2026_08_09_9351_antigravity_switch_auth": "PR #9351 own growth during the 2026-08-09 rebase: open-sse/executors/antigravity.ts 1528->1536 (+8 = switchAuth threaded out of tryResolveRetryFromErrorBody into handleAntigravityRateLimit's short-retry guard, so a decide429 switch decision beats the 60s same-account sleep; cohesive at the existing resolve chokepoint, not extractable). Covered by tests/unit/antigravity-429-switch-auth.test.ts.",
|
||||
|
||||
"_rebaseline_2026_08_09_9328_bottleneck_doexpire_rate_limit": "PR #9328 own growth during the 2026-08-09 rebase: open-sse/services/rateLimitManager.ts 1167->1221 (the Bottleneck doExpire capacity-leak monkey-patch plus its diagnostic branch and deterministic assertions live at the manager's existing wiring; monolithic patch, not extractable). Covered by tests/unit/bottleneck-doexpire-patch.test.ts.",
|
||||
"_rebaseline_2026_08_09_9296_adobe_media_capabilities": "PR #9296 (artickc, fix/adobe-firefly-model-capabilities) own growth: src/app/api/v1/models/catalog.ts 1590->1597 (+7). The image and video catalog serializers now expose the already-normalized Adobe Firefly discovery capability data (media_capabilities, plus the existing video modality/size fields) at their only response-emission chokepoints. The discovery parser and capability normalization remain in open-sse/services/adobeFireflyModels.ts; extracting these seven serialization fields would obscure the catalog contract. Covered by tests/unit/adobe-firefly.test.ts and tests/unit/image-upscale.test.ts.",
|
||||
"_rebaseline_2026_08_08_v3850_base_drift_batch_9757": "Base drift on release/v3.8.50, not own growth: the 08-06..08-08 merge batches grew 12 already-frozen (or newly-landed) files without carrying their rebaselines — the dedicated rebaseline PR #9616 was closed as 'superseded' but its file-size entries never actually reached the base, and later merges (#8894 combos page, #9539 EditConnectionModal, #8895 models route, #9294/#9293 catalog, #9541 db/core, #8970 tokenHealthCheck, #8925 mcp schemas+server, #8890 accountFallback, #9467 chat.ts, #8931 openai-to-kiro, ProxyRegistryManager) kept growing them. All 12 values re-measured on THIS branch's tree (= pure tip + this PR's 1-line chat.ts fix, which adds zero lines). This PR's own source changes (chat.ts identifier restore, stream.ts format carve-out) do not grow any frozen file past these values.",
|
||||
"_rebaseline_2026_08_08_migration_135_collision": "fix(db): resolve migration version 135 numbering collision — #9449's 135_connection_runtime_state.sql and #8908's 135_migrate_model_capability_max_token.sql both claimed version 135 (#9449 branched before #8908 merged and never got renumbered before landing on release/v3.8.50), which threw 'Migration version collision detected' the moment ANY code touched the database — a fresh install/deploy from this tip cannot even boot. Renumbered the later-landing file to 140 (next free slot) and added the matching isSchemaAlreadyApplied('140') retroactive guard, matching the established pattern already used for the prior 135/136 -> 137/138 renumber in the same file. Own growth: src/lib/db/migrationRunner.ts 1084->1094 (+10, the new case block) — irreducible, matches the existing per-case guard pattern exactly. Covered by tests/unit/migration-135-numbering-collision.test.ts (2/2), confirmed failing (reproducing the exact live crash) against the pre-fix colliding filenames, passing after.",
|
||||
"_rebaseline_2026_08_08_9183_reasoning_cache_index_sync": "Extracted fix(responses-api): sync reasoning-cache write index with the fixed read side (from the originally-authored #9183) — chatCore.ts's write side cached every response under a hardcoded messageIndex:0, and translator/index.ts's plain-turn (non-tool-call) cache-key lookup ALSO still hardcoded messageIndex 0 at its call site (a second, previously-undiscovered instance of the same hardcoding bug, found while re-verifying this fix against the current upstream tip — the two never agreed once a conversation went past its first assistant turn, so DeepSeek/Xiaomi-mimo plain-turn reasoning replay silently missed the cache). Own growth: open-sse/handlers/chatCore.ts 5034->5042 (+8, computing messageIndex from the incoming request's message count at both the streaming and non-streaming cache-write call sites) — irreducible call-site wiring. Covered by tests/unit/reasoning-cache.test.ts (new end-to-end write/read regression test, rebaselined below) and tests/unit/translator-helper-branches.test.ts fixture updates. Other #9183 sub-fixes (output_index collision prevention, reasoning-content-alias generalization) were originally assumed already superseded by upstream's own independent fix — a live incident 2026-08-08 disproved that for the message-vs-tool-call collision case specifically (fixed separately in #9822); not re-extracted here since this PR's own scope is the narrower messageIndex sync only.",
|
||||
"_rebaseline_2026_08_09_9342_network_error_guard": "PR #9342 own growth during the 2026-08-09 rebase: open-sse/services/accountFallback.ts 1978->2008 (+30 = the isQueueTimeout short-circuit plus a per-provider network-error dedup window in recordProviderFailure, keeping one VPN blip from the same provider's combo targets counting once per target). Covered by tests/unit/breaker-network-error-guard.test.ts. (chat.ts stays base-red: upstream tip is already 1918 > frozen 1904, this PR only adds +12 on top; not re-bumped per the no-inherit-ratchet rule.)", "_rebaseline_2026_08_09_9296_adobe_media_capabilities": "PR #9296 (artickc, fix/adobe-firefly-model-capabilities) own growth: src/app/api/v1/models/catalog.ts 1590->1597 (+7). The image and video catalog serializers now expose the already-normalized Adobe Firefly discovery capability data (media_capabilities, plus the existing video modality/size fields) at their only response-emission chokepoints. The discovery parser and capability normalization remain in open-sse/services/adobeFireflyModels.ts; extracting these seven serialization fields would obscure the catalog contract. Covered by tests/unit/adobe-firefly.test.ts and tests/unit/image-upscale.test.ts.", "_rebaseline_2026_08_02_9259_rolling_rpm": "PR #9259 (issue #8733) own growth: open-sse/services/rateLimitManager.ts baseline 1060->1167 (+107; final source 1153). The existing withRateLimit chokepoint now composes process-local rolling RPM leases with Bottleneck admission, releases pre-dispatch leases on queue timeout/abort/connection disable, preserves caller abort reasons, and wires 429/header state into the extracted rollingRpmGate.ts. The remaining growth is irreducible lifecycle wiring at the dispatch boundary plus the real watchdog test hooks needed to verify queued-wedge recovery; moving it further would obscure lease ownership and Bottleneck cleanup. Covered by the focused rate-limit manager/sliding-window suite (33/33); distributed multi-instance coordination remains explicitly out of scope.",
|
||||
"_rebaseline_2026_07_24_8470_hyperagent_sticky_thread": "PR #8470 (artickc, fix/hyperagent-tool-loop-thread-sticky) own growth: open-sse/executors/hyperagent.ts 936->1025 (wc -l; check-file-size.mjs counts via split(\"\\n\").length so the gate sees 937->1026, +89, crosses the 1000 cap). Fixes a real bug where a reverse-conversion proxy (text-Intent/JSON to Claude Code native tool_calls) rewrites assistant messages between agentic tool-loop turns, breaking HyperAgent\u2019s conversation-prefix fingerprint and cold-starting the thread mid tool-loop. Adds Anthropic tool_use/tool_result flattening to extractMessageText() plus a new rootUserFingerprint()/root-key lookup tier in resolveHyperAgentThreadBinding()/storeHyperAgentThreadAfterTurn() so the thread stays sticky across the tool loop. Cohesive additions inside the existing single-file executor; not extractable without splitting the executor mid-request-flow. Covered by tests/unit/executor-hyperagent.test.ts (19/19, +5 new cases for tool_result/tool_use flattening + root-key stickiness). Pre-merge review flagged a cross-conversation root-key collision risk (tracked in the PR\u2019s own mandatory pre-merge checklist, not yet addressed) \u2014 unrelated to this file-size ratchet, tracked separately by /fix-prs.",
|
||||
"_rebaseline_2026_07_25_8494_capability_filter_fail_closed": "PR #8494 (fix/capability-filters-fail-closed, #8488) own growth: open-sse/services/combo.ts 3640->3693 (+53) adds a fail-closed guard after filterTargetsByRequestCompatibility() \u2014 when every eligible target is excluded by request-capability filtering (vision/tools/etc) instead of quota/health, the combo now returns an explicit `capability_mismatch` 400 (describeCapabilityFilterExhaustion, imported from combo/comboStructure.ts) rather than silently falling through to a generic no-targets error, plus a `compatFilterFailOpen` escape hatch (combo config OR settings) mirrored at both the main/auto and round-robin call sites for symmetry. combo/comboStructure.ts (previously under cap, un-frozen) grows 794->918 (+124) \u2014 new home for describeCapabilityFilterExhaustion + providerSupportsEmulatedToolCalling (#5240 emulated tool-calling exemption so fail-closed does not regress prompt-emulation-only combos like all-chatgpt-web). Irreducible orchestration wiring at the existing filter chokepoint (same precedent as #7301's universal-cooldown-retry generalization). Companion test tests/unit/combo-routing-engine.test.ts 3409->3449 (+40, fail-closed/fail-open coverage across both call sites) also rebaselined. Covered by tests/unit/8488-capability-filter-fail-closed.test.ts (new) + 95/95 passing across both files. Structural shrink of combo.ts tracked in #3501.",
|
||||
"_rebaseline_2026_07_25_8499_ts7_result_union_predicates": "PR #8499 (backryun, chore/ts7-types-executor-scattered) own growth: muse-spark-web.ts 1396->1405 (+9, irreducible). Under this workspace's `strictNullChecks: false`, the boolean-literal discriminant on `GraphqlResult` (`{ ok: true } | { ok: false; error: string }`) narrows the positive `.ok===true` branch but leaves `!result.ok` at the full union under TS7, making `.error` unreachable to the checker at the two call sites (warmup, mode-switch). Fixed by adding a single `isGraphqlFailure()` type-predicate helper (doc comment + 3-line body) reused at both call sites instead of duplicating the predicate inline \u2014 not extractable to a shared module without splitting a single-file executor's local narrowing helper out of its own file. Covered by the existing muse-spark-web executor test suite (no behavior change, pure narrowing fix).",
|
||||
"_rebaseline_2026_07_22_8131_windowshide_cloudflared_spawn": "PR #8167 (Dingding-leo, fix/windows-hide-child-process, #8131) own growth: src/lib/cloudflaredTunnel.ts 934->935 (+1, irreducible call-site wiring \u2014 the single `windowsHide: true` option added to the existing cloudflared spawn() options object so no transient conhost.exe/cmd console window flashes open on Windows). Covered by the pre-merge-fix regression test tests/unit/windows-hide-child-process-spawns-8131.test.ts (added for the two additional spawn() sites the PR missed: ServiceSupervisor.ts, versionManager/processManager.ts) plus the windowsHide assertion added to tests/unit/services/installers/runNpm-shell-5379.test.ts (installers/utils.ts buildNpmExecOptions).",
|
||||
"_rebaseline_2026_07_22_8006_adobe_firefly_media_provider": "PR #8006 (artickc, feat/adobe-firefly-media) own growth: adds Adobe Firefly as a media-only (image + video) provider \u2014 unofficial IMS/cookie-session bridge for firefly.adobe.com covering IMS cookie->access_token exchange, discovery-catalog fallback, credits/balance usage, and submit+poll dispatch for both image (nano-banana/gpt-image families) and video (Sora 2/Veo 3.1/Kling 3.0) generation, with 408-under-load retry handling. New leaf open-sse/services/adobeFireflyClient.ts frozen at 1958 (>>cap 800) \u2014 a single self-contained upstream client (mirrors the qoderCli.ts precedent for a new provider client that is legitimately large on day one: IMS auth, cookie/JWT normalization, payload builders for 2 media types x multiple model families, SSE-less submit/poll state machine, error sanitization); not extractable without scattering a single upstream integration across artificial module boundaries mid-PR. open-sse/config/imageRegistry.ts (existing, previously under cap) grows 800->821 (+21, the new adobe-firefly IMAGE_PROVIDERS entry + models list, additive registry data at the existing registry chokepoint). src/lib/usage/providerLimits.ts 1000->1003 (+3, adobe-firefly/firefly added to the existing apikey-usage-fetcher allowlist, irreducible call-site wiring mirroring the sibling #7994 PromptQL/HyperAgent entries in the same PR group). Covered by tests/unit/adobe-firefly.test.ts (35/35). Structural shrink tracked in #3501.",
|
||||
"_rebaseline_2026_07_22_7994_hyperagent_web_provider": "PR #7994 (artickc, feat/hyperagent-web) own growth: adds HyperAgent (hyperagent.com) as a new unofficial web-cookie chat provider, reverse-engineered from live SPA captures (thread/session SSE flow, credits/usage endpoint). New leaf open-sse/executors/hyperagent.ts frozen at 937 (>cap 800) \u2014 single self-contained executor covering cookie auth, SSE parsing (text/session_start/session_end/done events), and a sticky thread/session cache for multi-turn continuity; not extractable without splitting the executor mid-request-flow (mirrors the sseParser.ts/muse-spark-web.ts precedent for new provider executors that exceed cap on day one). src/lib/usage/providerLimits.ts 1000->1003 (+3, irreducible call-site wiring adding hyperagent/ha to the existing USAGE_FETCHER_PROVIDERS-style allowlist at the chokepoint other web-cookie providers already extend). Covered by tests/unit/executor-hyperagent.test.ts (16/16). Structural shrink tracked in #3501.",
|
||||
"_rebaseline_2026_08_08_9173_own_comment_growth": "PR #9173's own follow-up commit (f0a694051): tests/unit/combo-routing-engine.test.ts 3457->3464 (+7) is this PR's own growth — explanatory comment blocks added alongside the ALL_ACCOUNTS_INACTIVE->ALL_TARGETS_SKIPPED stale-assertion fix (matching the identical fix applied to #9619/#9006/#8909 the same day; upstream's own test was never updated when the recordedAttempts===0 pre-dispatch-skip branch shipped). Caught by CI's PR-mode check:file-size (--base-ref) after the fix commit; missed locally because check-file-size.mjs was not re-run after that specific edit. Also fixed this round: src/i18n/messages/vi.json was missing 4 keys (cursorSessionUnchanged, cursorAgentNudgeTitle/Body/Dismiss) that this PR's own pre-merge branch had translated — the original merge's `git checkout --theirs` resolution for the 7 conflicted locale files discarded them since upstream's vi.json (which has no cursor-token-renewal feature) never had them. Restored from this PR's pre-merge tip (a38003e30).",
|
||||
"_rebaseline_2026_08_08_9173_vi_json_restore": "PR #9173's own follow-up commit: src/i18n/messages/vi.json was missing 4 keys (cursorSessionUnchanged, cursorAgentNudgeTitle/Body/Dismiss) that this PR's own pre-merge branch had translated — the original merge's `git checkout --theirs` resolution for the 7 conflicted locale files discarded them since upstream's vi.json (which has no cursor-token-renewal feature) never had them. Restored from this PR's pre-merge tip (a38003e30).",
|
||||
"_rebaseline_2026_08_07_9173_reconcile_onto_tip": "PR #9173 (cursor-token-renewal) full reconcile-onto-tip merge with release/v3.8.50 (2026-08-07). base.ts 1619->1681 and chatCore.ts 5028->5031 grew further past the 2026-08-02 rebaseline below via already-merged, no-PR-branch-left commits unrelated to this PR's own Cursor renewal changes (measured directly on the merged tree, split(\"\\n\").length). Same merge also surfaced 11 file + 1 test-file violations shared with PR #9619's identical-base reconciliation the same day (open-sse/mcp-server/schemas/tools.ts 1505->1553, open-sse/mcp-server/server.ts 1411->1444, open-sse/services/accountFallback.ts 1972->1978, src/app/(dashboard)/dashboard/combos/page.tsx 4647->4703, EditConnectionModal.tsx 1316->1324, src/app/api/providers/[id]/models/route.ts 2250->2304, src/app/api/v1/models/catalog.ts 1549->1556, src/lib/db/core.ts 1637->1639, src/sse/handlers/chat.ts 1877->1878, tests/unit/translator-openai-to-gemini.test.ts 1619->1622) plus two more specific to this PR's own additive work compounding with inherited drift: src/lib/tokenHealthCheck.ts 1021->1101 (this PR's own +48 cursor-token-renewal refresh-health logic, per _rebaseline_2026_08_02_9242_token_health_transient's file, plus +32 independent upstream growth) and useProviderConnections.ts 986->1002 (this PR's own +12, plus +41 independent upstream growth — newly crosses the 1000 cap). Same root cause as every other entry in this chain: fast-gates PR->release does not run check:file-size. No offending branch left to fix.",
|
||||
"_rebaseline_2026_08_02_agentrouter_ccbeta_regression_fix": "PR #9173 (cursor-token-renewal) own growth: open-sse/executors/base.ts 1578->1619 (+41). Fixes a real regression from the same two already-merged agentrouter commits documented in _rebaseline_2026_08_02_agentrouter_protocol_dispatch above — usesClaudeCodeProtocol() widened the native-Claude system-transform block (billing header, selectBetaFlags-derived anthropic-beta) to also run for CC-compatible relay connections. selectBetaFlags() has no visibility into a relay's own providerSpecificData.requestDefaults: for a relay with explicit requestDefaults configured (context1m/redactThinking/summarizeThinking), its Object.assign() silently discarded the relay's own correctly-computed headers (wiping an earlier CONTEXT_1M_BETA_HEADER append, force-including redact-thinking-2026-02-12 regardless of opt-in). For a 'vanilla' relay with no requestDefaults at all, the native treatment is pre-existing, intentional behavior (tests/unit/cc-compatible-provider.test.ts, v3.6.6) — the earlier version of this fix broke that case by excluding CC-relays unconditionally. The final gate is `this.provider === \"claude\" || usesCcWireImage(this.provider) || !hasCcRequestDefaults` (native treatment applies unless the relay has explicit requestDefaults), plus an unconditional post-pass that strips the redact-thinking beta unless the relay's own requestDefaults opted in. Covered by tests/unit/executor-default-base.test.ts ('uses CC-compatible connection defaults to append 1M beta'), tests/unit/cc-compatible-provider.test.ts (both SSE-forcing tests), and tests/unit/provider-request-failure-pipeline.test.ts ('keeps request beta headers and summarized thinking body') — all pre-existing, all independently re-verified passing together.",
|
||||
"_rebaseline_2026_08_02_agentrouter_protocol_dispatch": "Reconcile-onto-tip drift surfaced by PR #9173 (cursor-token-renewal): two already-merged, no-PR-branch-left commits on release/v3.8.50 (564c204ef fix(agentrouter): support Claude and Codex protocols; ec150a006 fix(agentrouter): honor alternate protocol in chat pipeline) grew open-sse/executors/base.ts 1562->1578 (Claude/Codex protocol dispatch wiring in the agentrouter executor branch) and open-sse/handlers/chatCore.ts 5020->5028 + tests/unit/chatcore-translation-paths.test.ts 2769->2776 (alternate-protocol chat-pipeline routing + companion test coverage) past their frozen caps, unrelated to this PR's own Cursor renewal changes. Same pattern as the prior release-green rebaselines (fast-gates PR->release do not run check:file-size): no offending branch left to fix in-place. Real sizes per check-file-size.mjs's own split(\"\\n\").length metric.",
|
||||
"_rebaseline_2026_08_09_9342_network_error_guard": "PR #9342 own growth during the 2026-08-09 rebase: open-sse/services/accountFallback.ts 1978->2008 (+30 = the isQueueTimeout short-circuit plus a per-provider network-error dedup window in recordProviderFailure, keeping one VPN blip from the same provider's combo targets counting once per target). Covered by tests/unit/breaker-network-error-guard.test.ts. (chat.ts stays base-red: upstream tip is already 1918 > frozen 1904, this PR only adds +12 on top; not re-bumped per the no-inherit-ratchet rule.)",
|
||||
"_rebaseline_2026_08_02_9259_rolling_rpm": "PR #9259 (issue #8733) own growth: open-sse/services/rateLimitManager.ts baseline 1060->1167 (+107; final source 1153). The existing withRateLimit chokepoint now composes process-local rolling RPM leases with Bottleneck admission, releases pre-dispatch leases on queue timeout/abort/connection disable, preserves caller abort reasons, and wires 429/header state into the extracted rollingRpmGate.ts. The remaining growth is irreducible lifecycle wiring at the dispatch boundary plus the real watchdog test hooks needed to verify queued-wedge recovery; moving it further would obscure lease ownership and Bottleneck cleanup. Covered by the focused rate-limit manager/sliding-window suite (33/33); distributed multi-instance coordination remains explicitly out of scope.",
|
||||
"_rebaseline_2026_07_24_8470_hyperagent_sticky_thread": "PR #8470 (artickc, fix/hyperagent-tool-loop-thread-sticky) own growth: open-sse/executors/hyperagent.ts 936->1025 (wc -l; check-file-size.mjs counts via split(\"\\n\").length so the gate sees 937->1026, +89, crosses the 1000 cap). Fixes a real bug where a reverse-conversion proxy (text-Intent/JSON to Claude Code native tool_calls) rewrites assistant messages between agentic tool-loop turns, breaking HyperAgent's conversation-prefix fingerprint and cold-starting the thread mid tool-loop. Adds Anthropic tool_use/tool_result flattening to extractMessageText() plus a new rootUserFingerprint()/root-key lookup tier in resolveHyperAgentThreadBinding()/storeHyperAgentThreadAfterTurn() so the thread stays sticky across the tool loop. Cohesive additions inside the existing single-file executor; not extractable without splitting the executor mid-request-flow. Covered by tests/unit/executor-hyperagent.test.ts (19/19, +5 new cases for tool_result/tool_use flattening + root-key stickiness). Pre-merge review flagged a cross-conversation root-key collision risk (tracked in the PR's own mandatory pre-merge checklist, not yet addressed) — unrelated to this file-size ratchet, tracked separately by /fix-prs.",
|
||||
"_rebaseline_2026_07_25_8494_capability_filter_fail_closed": "PR #8494 (fix/capability-filters-fail-closed, #8488) own growth: open-sse/services/combo.ts 3640->3693 (+53) adds a fail-closed guard after filterTargetsByRequestCompatibility() — when every eligible target is excluded by request-capability filtering (vision/tools/etc) instead of quota/health, the combo now returns an explicit `capability_mismatch` 400 (describeCapabilityFilterExhaustion, imported from combo/comboStructure.ts) rather than silently falling through to a generic no-targets error, plus a `compatFilterFailOpen` escape hatch (combo config OR settings) mirrored at both the main/auto and round-robin call sites for symmetry. combo/comboStructure.ts (previously under cap, un-frozen) grows 794->918 (+124) — new home for describeCapabilityFilterExhaustion + providerSupportsEmulatedToolCalling (#5240 emulated tool-calling exemption so fail-closed does not regress prompt-emulation-only combos like all-chatgpt-web). Irreducible orchestration wiring at the existing filter chokepoint (same precedent as #7301's universal-cooldown-retry generalization). Companion test tests/unit/combo-routing-engine.test.ts 3409->3449 (+40, fail-closed/fail-open coverage across both call sites) also rebaselined. Covered by tests/unit/8488-capability-filter-fail-closed.test.ts (new) + 95/95 passing across both files. Structural shrink of combo.ts tracked in #3501.",
|
||||
"_rebaseline_2026_07_25_8499_ts7_result_union_predicates": "PR #8499 (backryun, chore/ts7-types-executor-scattered) own growth: muse-spark-web.ts 1396->1405 (+9, irreducible). Under this workspace's `strictNullChecks: false`, the boolean-literal discriminant on `GraphqlResult` (`{ ok: true } | { ok: false; error: string }`) narrows the positive `.ok===true` branch but leaves `!result.ok` at the full union under TS7, making `.error` unreachable to the checker at the two call sites (warmup, mode-switch). Fixed by adding a single `isGraphqlFailure()` type-predicate helper (doc comment + 3-line body) reused at both call sites instead of duplicating the predicate inline — not extractable to a shared module without splitting a single-file executor's local narrowing helper out of its own file. Covered by the existing muse-spark-web executor test suite (no behavior change, pure narrowing fix).",
|
||||
"_rebaseline_2026_07_22_8131_windowshide_cloudflared_spawn": "PR #8167 (Dingding-leo, fix/windows-hide-child-process, #8131) own growth: src/lib/cloudflaredTunnel.ts 934->935 (+1, irreducible call-site wiring — the single `windowsHide: true` option added to the existing cloudflared spawn() options object so no transient conhost.exe/cmd console window flashes open on Windows). Covered by the pre-merge-fix regression test tests/unit/windows-hide-child-process-spawns-8131.test.ts (added for the two additional spawn() sites the PR missed: ServiceSupervisor.ts, versionManager/processManager.ts) plus the windowsHide assertion added to tests/unit/services/installers/runNpm-shell-5379.test.ts (installers/utils.ts buildNpmExecOptions).",
|
||||
"_rebaseline_2026_07_22_8006_adobe_firefly_media_provider": "PR #8006 (artickc, feat/adobe-firefly-media) own growth: adds Adobe Firefly as a media-only (image + video) provider — unofficial IMS/cookie-session bridge for firefly.adobe.com covering IMS cookie->access_token exchange, discovery-catalog fallback, credits/balance usage, and submit+poll dispatch for both image (nano-banana/gpt-image families) and video (Sora 2/Veo 3.1/Kling 3.0) generation, with 408-under-load retry handling. New leaf open-sse/services/adobeFireflyClient.ts frozen at 1958 (>>cap 800) — a single self-contained upstream client (mirrors the qoderCli.ts precedent for a new provider client that is legitimately large on day one: IMS auth, cookie/JWT normalization, payload builders for 2 media types x multiple model families, SSE-less submit/poll state machine, error sanitization); not extractable without scattering a single upstream integration across artificial module boundaries mid-PR. open-sse/config/imageRegistry.ts (existing, previously under cap) grows 800->821 (+21, the new adobe-firefly IMAGE_PROVIDERS entry + models list, additive registry data at the existing registry chokepoint). src/lib/usage/providerLimits.ts 1000->1003 (+3, adobe-firefly/firefly added to the existing apikey-usage-fetcher allowlist, irreducible call-site wiring mirroring the sibling #7994 PromptQL/HyperAgent entries in the same PR group). Covered by tests/unit/adobe-firefly.test.ts (35/35). Structural shrink tracked in #3501.",
|
||||
"_rebaseline_2026_07_22_7994_hyperagent_web_provider": "PR #7994 (artickc, feat/hyperagent-web) own growth: adds HyperAgent (hyperagent.com) as a new unofficial web-cookie chat provider, reverse-engineered from live SPA captures (thread/session SSE flow, credits/usage endpoint). New leaf open-sse/executors/hyperagent.ts frozen at 937 (>cap 800) — single self-contained executor covering cookie auth, SSE parsing (text/session_start/session_end/done events), and a sticky thread/session cache for multi-turn continuity; not extractable without splitting the executor mid-request-flow (mirrors the sseParser.ts/muse-spark-web.ts precedent for new provider executors that exceed cap on day one). src/lib/usage/providerLimits.ts 1000->1003 (+3, irreducible call-site wiring adding hyperagent/ha to the existing USAGE_FETCHER_PROVIDERS-style allowlist at the chokepoint other web-cookie providers already extend). Covered by tests/unit/executor-hyperagent.test.ts (16/16). Structural shrink tracked in #3501.",
|
||||
"_rebaseline_2026_08_08_9173_own_comment_growth": "PR #9173's own follow-up commit (f0a694051): tests/unit/combo-routing-engine.test.ts 3457->3464 (+7) is this PR's own growth — explanatory comment blocks added alongside the ALL_ACCOUNTS_INACTIVE->ALL_TARGETS_SKIPPED stale-assertion fix (matching the identical fix applied to #9619/#9006/#8909 the same day; upstream's own test was never updated when the recordedAttempts===0 pre-dispatch-skip branch shipped). Caught by CI's PR-mode check:file-size (--base-ref) after the fix commit; missed locally because check-file-size.mjs was not re-run after that specific edit. Also fixed this round: src/i18n/messages/vi.json was missing 4 keys (cursorSessionUnchanged, cursorAgentNudgeTitle/Body/Dismiss) that this PR's own pre-merge branch had translated — the original merge's `git checkout --theirs` resolution for the 7 conflicted locale files discarded them since upstream's vi.json (which has no cursor-token-renewal feature) never had them. Restored from this PR's pre-merge tip (a38003e30).",
|
||||
"_rebaseline_2026_08_08_9173_vi_json_restore": "PR #9173's own follow-up commit: src/i18n/messages/vi.json was missing 4 keys (cursorSessionUnchanged, cursorAgentNudgeTitle/Body/Dismiss) that this PR's own pre-merge branch had translated — the original merge's `git checkout --theirs` resolution for the 7 conflicted locale files discarded them since upstream's vi.json (which has no cursor-token-renewal feature) never had them. Restored from this PR's pre-merge tip (a38003e30).",
|
||||
"_rebaseline_2026_08_07_9173_reconcile_onto_tip": "PR #9173 (cursor-token-renewal) full reconcile-onto-tip merge with release/v3.8.50 (2026-08-07). base.ts 1619->1681 and chatCore.ts 5028->5031 grew further past the 2026-08-02 rebaseline below via already-merged, no-PR-branch-left commits unrelated to this PR's own Cursor renewal changes (measured directly on the merged tree, split(\"\\n\").length). Same merge also surfaced 11 file + 1 test-file violations shared with PR #9619's identical-base reconciliation the same day (open-sse/mcp-server/schemas/tools.ts 1505->1553, open-sse/mcp-server/server.ts 1411->1444, open-sse/services/accountFallback.ts 1972->1978, src/app/(dashboard)/dashboard/combos/page.tsx 4647->4703, EditConnectionModal.tsx 1316->1324, src/app/api/providers/[id]/models/route.ts 2250->2304, src/app/api/v1/models/catalog.ts 1549->1556, src/lib/db/core.ts 1637->1639, src/sse/handlers/chat.ts 1877->1878, tests/unit/translator-openai-to-gemini.test.ts 1619->1622) plus two more specific to this PR's own additive work compounding with inherited drift: src/lib/tokenHealthCheck.ts 1021->1101 (this PR's own +48 cursor-token-renewal refresh-health logic, per _rebaseline_2026_08_02_9242_token_health_transient's file, plus +32 independent upstream growth) and useProviderConnections.ts 986->1002 (this PR's own +12, plus +41 independent upstream growth — newly crosses the 1000 cap). Same root cause as every other entry in this chain: fast-gates PR->release does not run check:file-size. No offending branch left to fix.",
|
||||
"_rebaseline_2026_08_02_agentrouter_ccbeta_regression_fix": "PR #9173 (cursor-token-renewal) own growth: open-sse/executors/base.ts 1578->1619 (+41). Fixes a real regression from the same two already-merged agentrouter commits documented in _rebaseline_2026_08_02_agentrouter_protocol_dispatch above — usesClaudeCodeProtocol() widened the native-Claude system-transform block (billing header, selectBetaFlags-derived anthropic-beta) to also run for CC-compatible relay connections. selectBetaFlags() has no visibility into a relay's own providerSpecificData.requestDefaults: for a relay with explicit requestDefaults configured (context1m/redactThinking/summarizeThinking), its Object.assign() silently discarded the relay's own correctly-computed headers (wiping an earlier CONTEXT_1M_BETA_HEADER append, force-including redact-thinking-2026-02-12 regardless of opt-in). For a 'vanilla' relay with no requestDefaults at all, the native treatment is pre-existing, intentional behavior (tests/unit/cc-compatible-provider.test.ts, v3.6.6) — the earlier version of this fix broke that case by excluding CC-relays unconditionally. The final gate is `this.provider === \"claude\" || usesCcWireImage(this.provider) || !hasCcRequestDefaults` (native treatment applies unless the relay has explicit requestDefaults), plus an unconditional post-pass that strips the redact-thinking beta unless the relay's own requestDefaults opted in. Covered by tests/unit/executor-default-base.test.ts ('uses CC-compatible connection defaults to append 1M beta'), tests/unit/cc-compatible-provider.test.ts (both SSE-forcing tests), and tests/unit/provider-request-failure-pipeline.test.ts ('keeps request beta headers and summarized thinking body') — all pre-existing, all independently re-verified passing together.",
|
||||
"_rebaseline_2026_08_02_agentrouter_protocol_dispatch": "Reconcile-onto-tip drift surfaced by PR #9173 (cursor-token-renewal): two already-merged, no-PR-branch-left commits on release/v3.8.50 (564c204ef fix(agentrouter): support Claude and Codex protocols; ec150a006 fix(agentrouter): honor alternate protocol in chat pipeline) grew open-sse/executors/base.ts 1562->1578 (Claude/Codex protocol dispatch wiring in the agentrouter executor branch) and open-sse/handlers/chatCore.ts 5020->5028 + tests/unit/chatcore-translation-paths.test.ts 2769->2776 (alternate-protocol chat-pipeline routing + companion test coverage) past their frozen caps, unrelated to this PR's own Cursor renewal changes. Same pattern as the prior release-green rebaselines (fast-gates PR->release do not run check:file-size): no offending branch left to fix in-place. Real sizes per check-file-size.mjs's own split(\"\\n\").length metric.",
|
||||
"_rebaseline_2026_07_21_7301_universal_cooldown_retry": "PR #7301 (ViFigueiredo, feat/universal-cooldown-retry) own growth, surfaced during rebase-onto-tip reconciliation (fast-gates PR->release do not run check:file-size): open-sse/services/combo.ts 3388->3479 (+91) generalizes the existing quota-share-only cooldown-aware retry (dispatchWithCooldownRetry) to ALL combo strategies (priority/weighted/round-robin/etc), gates it on the model lockout's REAL reason (not a hardcoded \"rate_limit\") via the existing getModelLockoutInfo/resolveComboCooldownWaitDecision chokepoint, and adds a global comboTimeoutMs guard + aggregated per-target error diagnostics on exhaustion. Companion leaves open-sse/services/combo/comboCooldownRetry.ts (+29), combo/autoStrategy.ts (+9, auto-strategy combo-ref guard so a combo cannot recursively reference itself as a candidate), combo/comboSetup.ts (+3), comboConfig.ts (+6) all stay under cap. Irreducible orchestration wiring at the existing dispatch chokepoint (mirrors the quota-share-only precedent this PR generalizes); not extractable without hiding the retry loop. Covered by tests/unit/combo-auto-candidate-expansion.test.ts (+61, combo-ref guard), tests/unit/combo-routing-engine.test.ts (+68, universal retry across strategies + comboTimeoutMs, no-explicit-any clean), tests/unit/serial/combo-quota-share-cooldown-wait-timing.test.ts (+136, quota_exhausted vs rate_limit reason gating, disabled-flag passthrough). Structural shrink of combo.ts tracked in #3501.",
|
||||
"_rebaseline_2026_07_21_7935_vi_locale_residual_ui": "PR #7935 (nguyenha935, fix/vietnamese-locale-residual) own growth: 9 dashboard components gained `useTranslations()` wiring (import + hook call + a handful of `t(\"key\")` call-sites replacing hardcoded English strings) as part of restoring i18n coverage — ComboHealthTab.tsx 1028->1031 (+3), cloud-agents/page.tsx 922->931 (+9), PoolWizard.tsx 1007->1022 (+15), EndpointPageClient.tsx 2612->2615 (+3), health/page.tsx 1091->1095 (+4), ProviderOnboardingWizard.tsx 912->948 (+36, largest — several previously-hardcoded wizard step labels/descriptions), PricingTab.tsx 1012->1017 (+5), ProxyRegistryManager.tsx 1461->1464 (+3), BudgetTab.tsx 1016->1028 (+12). All additions are literal `t(...)`/`tc(...)` call-site swaps for existing UI text, verified byte-identical in intent against the corresponding new `src/i18n/messages/{en,vi}.json` keys (see tests/unit/dashboard-localization-contract.test.ts, tests/unit/i18n-vi-completeness.test.ts, tests/unit/gamification-display-contract.test.ts, tests/unit/cli-catalog-display-contract.test.ts added by the same PR). Fast-gates PR->release do not run check:file-size, so this surfaced only during rebase-onto-tip reconciliation.",
|
||||
"_rebaseline_2026_07_21_7908_chathelpers_abort_guard": "PR #7908 (insoln, don't cool down accounts or trip the breaker on client-side stream aborts, #7907) own growth: src/sse/handlers/chatHelpers.ts 876->877 (+1 = the single `isLocalStreamLifecycleError(failure?.message ?? failure)` clause added to executeChatWithBreaker's onStreamFailure connection-disable check, verified working by the existing #4602 test + the PR's own circuit-breaker-client-abort.test.ts, no regressions). Irreducible call-site wiring at the existing failure-classification chokepoint. Fast-gates PR->release do not run check:file-size, so this surfaced only during the /green-prs pre-merge pass.",
|
||||
@@ -437,7 +431,19 @@
|
||||
"open-sse/executors/kiro.ts": 1390,
|
||||
"open-sse/translator/request/openai-to-kiro.ts": 1374,
|
||||
"open-sse/utils/sseHeartbeat.ts": 194,
|
||||
"open-sse/utils/proxyFetch.ts": 1207
|
||||
"open-sse/utils/proxyFetch.ts": 1220,
|
||||
"_rebaseline_2026_08_11_v3850_merge_storm_provider_registry: DRIFT do merge-storm 2026-08-11 (99 PRs mergeados no release/v3.8.50). AddApiKeyModal.tsx (PR #8949 ChatGPT Web provider) e useProviderConnections.ts/ModelSelectModal.tsx (PRs #9011 combo test-all, #9499 image combos) = UI nova legítima acima do cap; gateways.ts = god-file de catálogo de providers que cresceu com os PRs #9009/#9421/#9468/#9594 (qualquer split arriscaria corromper o merge de novo — o próprio PR #9421 foi o que quebrou o arquivo; sem split até o release, congelado no tamanho atual). Owner autorizou rebaseline com anotação (2026-08-11).": {
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/modals/AddApiKeyModal.tsx": 1062,
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderConnections.ts": 1051,
|
||||
"src/shared/components/ModelSelectModal.tsx": 1135,
|
||||
"src/shared/constants/providers/apikey/gateways.ts": 1215
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/modals/AddApiKeyModal.tsx": 1062,
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderConnections.ts": 1051,
|
||||
"src/shared/components/ModelSelectModal.tsx": 1135,
|
||||
"src/shared/constants/providers/apikey/gateways.ts": 1215,
|
||||
"open-sse/vendor/codex-chatgpt-web/bridge.ts": 1387,
|
||||
"_rebaseline_2026_08_11_v3850_merge_storm_provider_registry": "DRIFT do merge-storm 2026-08-11 (99 PRs mergeados no release/v3.8.50). AddApiKeyModal.tsx (PR #8949 ChatGPT Web provider) e useProviderConnections.ts/ModelSelectModal.tsx (PRs #9011 combo test-all, #9499 image combos) = UI nova legitima acima do cap; gateways.ts = god-file de catalogo de providers que cresceu com PRs #9009/#9421/#9468/#9594 (qualquer split arriscaria corromper o merge de novo — o proprio PR #9421 quebrou o arquivo); bridge.ts (PR #8949) = ponte Chromium vendored; proxyFetch.ts 1207->1220 = drift herdado de merges. Owner autorizou rebaseline com anotacao (2026-08-11)."
|
||||
},
|
||||
"_rebaseline_base_2026_08_10_proxyfetch": "Base-red fix (green-prs sweep, issue #9985): open-sse/utils/proxyFetch.ts 1207 > cap 1000 — new proxied-TLS fetch helper introduced by the Fal reference-image work. Owner-authorized quick rebaseline to green; structural slim tracked for v3.9.0.",
|
||||
"_rebaseline_2026_07_27_v3849_train2": "Merge-train 2 (7 PRs) — owner-approved 2026-07-27. Single entry: chatCore.ts 4955->5006 (#8595, Responses multi-turn image compaction before the context hard-reject). Genuine irreducible growth at the existing compaction chokepoint in handleChatCore — the PR adds a last-resort retry against the concrete budget plus the estimateFinalInputTokens helper, both wired at the pre-existing call site rather than a new branch. Covered by tests/unit/8560-responses-image-compaction.test.ts (4 tests).",
|
||||
|
||||
@@ -102,14 +102,15 @@
|
||||
"_rebaseline_2026_07_28_v3849_release": "75.5 -> 99 (+23.5). Aperto EXIGIDO pelo modo --require-tighten do ratchet: a métrica melhorou de verdade no ciclo v3.8.49. A causa é o workflow assíncrono de tradução, que finalmente alcançou o denominador em EN — as rebaselines anteriores (v3.8.39/.44/.47) foram todas afrouxamentos registrando o atraso das traduções, e agora ele foi pago. O coletor SUBTRAI os placeholders (present - placeholder em scripts/quality/collect-metrics.mjs), então os 317 marcadores __MISSING__ que esta release introduziu para o drift de valor já estão descontados dos 99 — o número é honesto, não inflado por placeholder. Medido pelo collect-metrics do CI no run 30404226939."
|
||||
},
|
||||
"deadExports": {
|
||||
"value": 230,
|
||||
"value": 248,
|
||||
"direction": "down",
|
||||
"_rebaseline_2026_08_09_v3850_post_sweep": "227 -> 230. Measured by npm run check:dead-code on the unmodified release/v3.8.50 tip 382449d593 during the mandatory --full-ci pre-flight. The +3 is inherited cycle drift from the authorized merge sweep; this repair adds no production exports. Rebaseline records the actual tip so ci.yml quality-gate can run, while structural cleanup remains separate debt.",
|
||||
"_rebaseline_2026_07_01_v3843_release": "225->227 (+2). v3.8.43 cycle drift, surfaced in the Quality Ratchet job after eslintWarnings was rebaselined (check:dead-code runs there). 227 = measured by check:dead-code (knip) on the release tip 4635076eb. The 5 CI fixes add 0 dead exports: safeHttpHref in linkify.ts is module-local AND used (called by linkifyText); no new exports; test files are not scanned. Tighten via --update next cycle.",
|
||||
"dedicatedGate": true,
|
||||
"_rebaseline_2026_06_30_v3842_deadcode_wave": "310 -> 225. Measured by `node scripts/check/check-dead-code.mjs` on the v3.8.42 tip after the JxnLexn dead-code (#5463/#5464/#5466) + duplication (#5471..#5500) wave landed: DEAD_EXPORTS=133 + DEAD_FILES=92 = 225. The stale 310 was the v3.8.38 release snapshot never ratcheted on PR->release fast-gates (check:dead-code runs only on ci.yml PR->main, not quality.yml). Tightening to the true measured value; release-time captain rebaselines up if parallel cycle merges add dead exports.",
|
||||
"_rebaseline_2026_06_27_v3838_release": "345->346 (+1). v3.8.38 cycle drift surfaced by the release-green pre-flight (Quality Ratchet does NOT run on PR->release fast-gates). Net +1 inherited from this cycle's feature/fix merges (new executors/providers, compression fidelity-gate module) minus #5138's removal of dead legacy store modules. Release-finalize working tree touches ONLY CHANGELOG.md + i18n mirrors + README + baselines — 0 production-code change. Structural cleanup tracked as debt.",
|
||||
"_rebaseline_2026_06_26_v3837_release": "343->345. v3.8.37 cycle drift surfaced by the release-green pre-flight (the Quality Ratchet does NOT run on PR->release fast-gates, so warnings/complexity accrued unmeasured across this cycle's 76 commits — provider adds DGrid/Pioneer/xAI, headroom proxy lifecycle #4649, ~50 SSE/translator fixes, Engine Combos #5062). Trust-but-verify: this release-finalize working tree touches ONLY CHANGELOG.md, docs/i18n/*/CHANGELOG.md mirrors, and these baselines — 0 production-code change, so all drift is inherited cycle drift (`any` warn-allowed in open-sse/ + tests/). Tighten via --require-tighten next cycle."
|
||||
"_rebaseline_2026_06_26_v3837_release": "343->345. v3.8.37 cycle drift surfaced by the release-green pre-flight (the Quality Ratchet does NOT run on PR->release fast-gates, so warnings/complexity accrued unmeasured across this cycle's 76 commits — provider adds DGrid/Pioneer/xAI, headroom proxy lifecycle #4649, ~50 SSE/translator fixes, Engine Combos #5062). Trust-but-verify: this release-finalize working tree touches ONLY CHANGELOG.md, docs/i18n/*/CHANGELOG.md mirrors, and these baselines — 0 production-code change, so all drift is inherited cycle drift (`any` warn-allowed in open-sse/ + tests/). Tighten via --require-tighten next cycle.",
|
||||
"_rebaseline_2026_08_11_v3850_merge_storm": "230 -> 248. Own drift from the 2026-08-11 merge storm (99 PRs into release/v3.8.50 via authorized sweep): new providers/executors/handlers added dead exports that knip cannot see as used. Measured on the base-fix tip (7ca73697b0 + this repair PR). Owner authorized rebaseline (2026-08-11) — structural cleanup remains separate debt."
|
||||
},
|
||||
"cognitiveComplexity": {
|
||||
"value": 1223,
|
||||
@@ -149,11 +150,12 @@
|
||||
"dedicatedGate": true
|
||||
},
|
||||
"codeqlAlerts": {
|
||||
"value": 2,
|
||||
"value": 9,
|
||||
"direction": "down",
|
||||
"dedicatedGate": true,
|
||||
"_rebaseline_2026_08_06_base_grew": "Base branch file-size drift: translator-openai-to-gemini.test.ts grew 1619->1622 (test assertions for Gemini translator compatibility). CodeQL alert (js/insufficient-password-hash in raycast.ts) is pre-existing base-red; incremented baseline to match.",
|
||||
"_rebaseline_2026_08_10_9940_fingerprint": "CodeQL base-red (green-prs sweep, issue #9985): 2nd js/insufficient-password-hash alert at src/shared/middleware/chatBodyAdmission.ts:265,269 introduced by #9940 (per-connection virtual admission lanes). Both are API-key/bearer FINGERPRINTS (createHash('sha256') truncated to 16-hex admission-lane key), not password VERIFICATION — false-positive class for this rule. Reproduces on release/v3.8.50 tip. Owner-authorized rebaseline 1->2; revisit at v3.9.0."
|
||||
"_rebaseline_2026_08_10_9940_fingerprint": "CodeQL base-red (green-prs sweep, issue #9985): 2nd js/insufficient-password-hash alert at src/shared/middleware/chatBodyAdmission.ts:265,269 introduced by #9940 (per-connection virtual admission lanes). Both are API-key/bearer FINGERPRINTS (createHash('sha256') truncated to 16-hex admission-lane key), not password VERIFICATION — false-positive class for this rule. Reproduces on release/v3.8.50 tip. Owner-authorized rebaseline 1->2; revisit at v3.9.0.",
|
||||
"_rebaseline_2026_08_11_merge_storm_drift": "2 -> 9. Drift from the 2026-08-11 authorized merge storm (99 PRs into release/v3.8.50): js/insufficient-password-hash in open-sse/executors/chatgpt-web-codex/storageState.ts x3 + conol-web.ts (PRs #8949/#8974 — Chromium browser-profile credential storage SKUs that CodeQL flags under the password-hash rule; same fingerprint/credential-cache false-positive class already rebaselined in #9940/2026-08-06), js/stack-trace-exposure (chatgpt-web-codex.ts, #8949 debug logging), js/double-escaping (environment.ts, #8949), js/insecure-randomness (tinycms.ts, #9435). None introduced by this base-fix PR. Owner-authorized rebaseline (2026-08-11); revisit hardening at v3.9.0."
|
||||
},
|
||||
"secretFindings": {
|
||||
"_note": "Zeroed 2026-07-13 (WS6/D3): the 3 frozen generic-api-key FPs are allowlisted with justification in .gitleaks.toml — any NEW finding regresses the ratchet.",
|
||||
|
||||
@@ -6,9 +6,9 @@ lastUpdated: 2026-06-28
|
||||
|
||||
# OmniRoute MCP Server Documentation
|
||||
|
||||
> Model Context Protocol server with 104 tools across routing, cache, compression, memory, skills, proxy, pool, and context source operations.
|
||||
> Model Context Protocol server with 105 tools across routing, cache, compression, memory, skills, proxy, pool, and context source operations.
|
||||
>
|
||||
> Source of truth: `open-sse/mcp-server/server.ts` computes **104 unique tools** with `countUniqueMcpTools()`: 42 canonical definitions (including the six CCR lifecycle tools and the agent-skills trio), plus memory (3), skills (4), GitHub skills (3), pool (6), gamification (8), plugins (8), Notion (6), Obsidian (22), and two RTK-only compression tools.
|
||||
> Source of truth: `open-sse/mcp-server/server.ts` computes **105 unique tools** with `countUniqueMcpTools()`: 42 canonical definitions (including the six CCR lifecycle tools and the agent-skills trio), plus memory (3), skills (4), GitHub skills (3), pool (6), gamification (8), plugins (8), Notion (6), Obsidian (22), and two RTK-only compression tools.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -227,7 +227,7 @@ See [AGENT-SKILLS.md](./AGENT-SKILLS.md) for the full catalog and how external a
|
||||
|
||||
## Related Frameworks (v3.8.0)
|
||||
|
||||
The MCP tool inventory above (104 unique tools, computed by `countUniqueMcpTools()`) is intentionally
|
||||
computed = 105, computed by `countUniqueMcpTools()`) is intentionally
|
||||
scoped to runtime routing/cache/compression/memory/skills/proxy/context-source operations. Two adjacent
|
||||
frameworks ship alongside the MCP server in v3.8.0 and are documented separately:
|
||||
|
||||
@@ -369,7 +369,7 @@ MCP tool, prompt, and resource registries can compress descriptions at registrat
|
||||
|
||||
Description compression shrinks each tool's metadata; **tool-cardinality reduction** goes one step further by reducing _how many_ tools are announced at all. Advertising fewer tools in the `tools/list` manifest cuts the per-request token cost the client's model pays for the tool catalog ("layer 5" compression). The implementation is a pure, stateless filter in `open-sse/mcp-server/toolCardinality.ts` (`reduceToolManifest`), wired into the registration loop in `createMcpServer()` (`open-sse/mcp-server/server.ts`).
|
||||
|
||||
**Opt-in, off by default.** The filter only runs when at least one of two environment variables is set; with neither set, all 104 tools are announced unchanged.
|
||||
**Opt-in, off by default.** The filter only runs when at least one of two environment variables is set; with neither set, all 105 tools are announced unchanged.
|
||||
|
||||
| Variable | Mode |
|
||||
| :--------------- | :-------------------------------------------------------------------------------------- |
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -8,6 +8,19 @@
|
||||
|
||||
---
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,9 +6,9 @@ lastUpdated: 2026-06-28
|
||||
|
||||
# Dokumentacja serwera MCP OmniRoute
|
||||
|
||||
> Serwer Model Context Protocol z 104 narzędziami obejmującymi routing, cache, kompresję, pamięć, skills, proxy, pool oraz operacje na źródłach kontekstu.
|
||||
> Serwer Model Context Protocol z 105 narzędziami obejmującymi routing, cache, kompresję, pamięć, skills, proxy, pool oraz operacje na źródłach kontekstu.
|
||||
>
|
||||
> Źródło prawdy: `open-sse/mcp-server/server.ts` wylicza **104 unikalne narzędzia** przez `countUniqueMcpTools()`: 42 kanoniczne definicje (w tym sześć narzędzi cyklu życia CCR oraz trio agent-skills), plus memory (3), skills (4), GitHub skills (3), pool (6), gamification (8), plugins (8), Notion (6), Obsidian (22) oraz dwa narzędzia kompresji wyłącznie RTK.
|
||||
> Źródło prawdy: `open-sse/mcp-server/server.ts` wylicza **105 unikalne narzędzia** przez `countUniqueMcpTools()`: 42 kanoniczne definicje (w tym sześć narzędzi cyklu życia CCR oraz trio agent-skills), plus memory (3), skills (4), GitHub skills (3), pool (6), gamification (8), plugins (8), Notion (6), Obsidian (22) oraz dwa narzędzia kompresji wyłącznie RTK.
|
||||
|
||||
## Instalacja
|
||||
|
||||
@@ -227,7 +227,7 @@ Zobacz [AGENT-SKILLS.md](./AGENT-SKILLS.md) po pełny katalog i sposób konsumow
|
||||
|
||||
## Pokrewne frameworki (v3.8.0)
|
||||
|
||||
Powyższy inwentarz narzędzi MCP (104 unikalne tools, wyliczane przez `countUniqueMcpTools()`) jest celowo
|
||||
Powyższy inwentarz narzędzi MCP (105 unikalne tools, wyliczane przez `countUniqueMcpTools()`) jest celowo
|
||||
ograniczony do operacji runtime: routing/cache/compression/memory/skills/proxy/context-source. Dwa sąsiednie
|
||||
frameworki dostarczane razem z serwerem MCP w v3.8.0 są udokumentowane osobno:
|
||||
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -10,7 +10,7 @@ lastUpdated: 2026-06-28
|
||||
>
|
||||
> 数据来源:`open-sse/mcp-server/schemas/tools.ts`(34 个基础工具)+ `memoryTools.ts`(3)+ `skillTools.ts`(4)+ `agentSkillTools.ts`(3)+ `poolTools.ts`(6)+ `gamificationTools.ts`(8)+ `pluginTools.ts`(8)+ `notionTools.ts`(6)+ `obsidianTools.ts`(22)= **94**(`TOTAL_MCP_TOOL_COUNT`)。工具注册和权限域绑定逻辑见 `open-sse/mcp-server/server.ts`。
|
||||
|
||||

|
||||

|
||||
|
||||
> 来源:[diagrams/mcp-tools-104.mmd](../diagrams/mcp-tools-104.mmd)(通过 `npm run docs:render-diagrams` 重新生成)。
|
||||
|
||||
|
||||
@@ -6,6 +6,19 @@
|
||||
|
||||
## [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._
|
||||
|
||||
@@ -6,9 +6,9 @@ lastUpdated: 2026-06-28
|
||||
|
||||
# OmniRoute MCP Server 文件
|
||||
|
||||
> 模型上下文協定(Model Context Protocol)伺服器,提供 104 個工具,涵蓋路由、快取、壓縮、記憶、技能、代理、池與上下文來源操作。
|
||||
> 模型上下文協定(Model Context Protocol)伺服器,提供 105 個工具,涵蓋路由、快取、壓縮、記憶、技能、代理、池與上下文來源操作。
|
||||
>
|
||||
> 真相來源:`open-sse/mcp-server/server.ts` 透過 `countUniqueMcpTools()` 計算出 **104 個唯一工具**:42 個標準定義(包括六個 CCR 生命週期工具與 agent-skills 三件組),加上記憶體(3 個)、技能(4 個)、GitHub 技能(3 個)、池(6 個)、遊戲化(8 個)、外掛(8 個)、Notion(6 個)、Obsidian(22 個)與兩個僅限 RTK 的壓縮工具。
|
||||
> 真相來源:`open-sse/mcp-server/server.ts` 透過 `countUniqueMcpTools()` 計算出 **105 個唯一工具**:42 個標準定義(包括六個 CCR 生命週期工具與 agent-skills 三件組),加上記憶體(3 個)、技能(4 個)、GitHub 技能(3 個)、池(6 個)、遊戲化(8 個)、外掛(8 個)、Notion(6 個)、Obsidian(22 個)與兩個僅限 RTK 的壓縮工具。
|
||||
|
||||
## 安裝
|
||||
|
||||
@@ -215,7 +215,7 @@ curl -X DELETE http://localhost:20128/api/settings/notion
|
||||
|
||||
## 相關框架(v3.8.0)
|
||||
|
||||
上述 MCP 工具清單(104 個唯一工具,由 `countUniqueMcpTools()` 計算)的範圍故意限定於執行時期路由/快取/壓縮/記憶/技能/代理/上下文來源操作。兩個相鄰框架與 MCP 伺服器一同於 v3.8.0 提供,並分別記錄:
|
||||
上述 MCP 工具清單(105 個唯一工具,由 `countUniqueMcpTools()` 計算)的範圍故意限定於執行時期路由/快取/壓縮/記憶/技能/代理/上下文來源操作。兩個相鄰框架與 MCP 伺服器一同於 v3.8.0 提供,並分別記錄:
|
||||
|
||||
### Cloud Agents
|
||||
|
||||
@@ -319,7 +319,7 @@ MCP 工具、提示與資源註冊表可在註冊/列出時壓縮描述,以
|
||||
|
||||
描述壓縮會縮小每個工具的元資料;**工具基數減少**則更進一步,減少**宣告的工具總數**。在 `tools/list` 清單中廣告較少的工具,可降低客戶端模型為工具目錄所支付的每次請求代幣成本(「第 5 層」壓縮)。實作為一個純粹、無狀態的過濾器,位於 `open-sse/mcp-server/toolCardinality.ts`(`reduceToolManifest`),接入 `createMcpServer()`(`open-sse/mcp-server/server.ts`)的註冊迴圈。
|
||||
|
||||
**選擇性加入,預設關閉。** 過濾器僅在至少設定兩個環境變數之一時才執行;若兩者皆未設定,則所有 104 個工具保持不變地被宣告。
|
||||
**選擇性加入,預設關閉。** 過濾器僅在至少設定兩個環境變數之一時才執行;若兩者皆未設定,則所有 105 個工具保持不變地被宣告。
|
||||
|
||||
| 變數 | 模式 |
|
||||
| :---------------- | :----------------------------------------------------------------------------------------- |
|
||||
|
||||
@@ -1014,6 +1014,7 @@ changing them requires a code edit, not an env var:
|
||||
| `CURSOR_TOKEN` | _(unset)_ | `scripts/ad-hoc/cursor-tap.cjs` | Direct Cursor bearer token used by developer tooling. |
|
||||
| `OMNIROUTE_LOG_REQUEST_SHAPE` | disabled (opt-in via `"1"`) | `src/app/api/v1/chat/completions/route.ts` | Log content-type/length markers for large chat payloads when `"1"` is set. Off by default to reduce log noise. |
|
||||
| `DEBUG_RESPONSES_SSE_TO_JSON` | _(unset)_ | `open-sse/handlers/responseTranslator.ts` | Set `true` to log Responses API SSE→JSON translation details. |
|
||||
| `DEBUG_CLAUDE_NONSTREAM` | _(unset)_ | `open-sse/handlers/responseTranslator.ts` | Set `true` to surface empty textContent chunks in the Claude response translation path (debug only). |
|
||||
| `NEXT_PUBLIC_OMNIROUTE_E2E_MODE` | _(unset)_ | E2E test harness | Set `true` to enable E2E test mode (relaxed auth, test hooks). |
|
||||
|
||||
---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RegistryEntry } from "../../shared.ts";
|
||||
import { CONOL_FALLBACK_MODELS } from "../../../services/conolModels.ts";
|
||||
import { CONOL_FALLBACK_MODELS } from "../../../../services/conolModels.ts";
|
||||
|
||||
export const conol_webProvider: RegistryEntry = {
|
||||
id: "conol-web",
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import type { RegistryEntry } from "../shared";
|
||||
import type { RegistryEntry } from "../../shared";
|
||||
|
||||
export const deepaiProvider: RegistryEntry = {
|
||||
id: "deepai",
|
||||
alias: "deepai",
|
||||
format: "custom",
|
||||
executor: "default",
|
||||
baseUrl: "https://api.deepai.org",
|
||||
authType: "apikey",
|
||||
authHeader: "api-key",
|
||||
|
||||
@@ -48,6 +48,7 @@ export async function getChatGptWebCodexDoctorStatus(connection: {
|
||||
mode: "browser-only",
|
||||
appName: "OmniRoute Codex",
|
||||
storageStatePath: paths.storageStatePath,
|
||||
brokerSocketPath: paths.brokerSocketPath,
|
||||
...(chrome ? { chromeExecutablePath: chrome } : {}),
|
||||
...(cdpConfigured ? { cdpEndpoint: process.env.CHATGPT_WEB_CODEX_CDP_URL } : {}),
|
||||
headed: false,
|
||||
|
||||
@@ -525,7 +525,7 @@ async function uploadConolImages(
|
||||
},
|
||||
sessionId
|
||||
),
|
||||
body: image.data,
|
||||
body: new Uint8Array(image.data),
|
||||
signal: signal ?? undefined,
|
||||
});
|
||||
if (!response.ok) {
|
||||
|
||||
@@ -116,9 +116,10 @@ export class TinyCmsExecutor extends BaseExecutor {
|
||||
|
||||
const response = await fetch(CHAT_URL, fetchOptions);
|
||||
return {
|
||||
status: response.status,
|
||||
response,
|
||||
url: CHAT_URL,
|
||||
headers: Object.fromEntries(response.headers.entries()),
|
||||
body: response.body,
|
||||
transformedBody: bodyObj,
|
||||
};
|
||||
} catch (err: any) {
|
||||
return makeErrorResult(
|
||||
|
||||
@@ -358,7 +358,16 @@ function decodeText(ptr, len) {
|
||||
|
||||
const cachedTextEncoder = new TextEncoder();
|
||||
|
||||
if (!('encodeInto' in cachedTextEncoder)) {
|
||||
// Old-Safari compatibility: if the runtime encoder lacks `encodeInto`, polyfill
|
||||
// it. TS (DOM lib) types encodeInto as an always-present member, so a direct
|
||||
// `'encodeInto' in cachedTextEncoder` guard would narrow the encoder to `never`
|
||||
// in the negative branch. Test a widened copy instead — the result narrows a
|
||||
// boolean, never `cachedTextEncoder`, so the polyfill body stays typeable.
|
||||
const needsEncodeIntoPolyfill = !(
|
||||
"encodeInto" in (cachedTextEncoder as { encodeInto?: unknown })
|
||||
);
|
||||
|
||||
if (needsEncodeIntoPolyfill) {
|
||||
cachedTextEncoder.encodeInto = function (arg, view) {
|
||||
const buf = cachedTextEncoder.encode(arg);
|
||||
view.set(buf);
|
||||
@@ -449,7 +458,11 @@ async function __wbg_init(module_or_path) {
|
||||
}
|
||||
|
||||
if (module_or_path === undefined) {
|
||||
module_or_path = new URL('wasm_signer_bg.wasm', import.meta.url);
|
||||
// The boot-time embed is passed explicitly via `initTinyCmsWasm()` below
|
||||
// (base64 → Buffer). Do NOT fall back to `new URL('wasm_signer_bg.wasm',
|
||||
// import.meta.url)`: no such asset exists in the tree (it is inlined as
|
||||
// base64), and the static URL would make Turbopack/Next fail the bundle.
|
||||
throw new Error("tinycmsSigner: wasm module not supplied; call initTinyCmsWasm() first");
|
||||
}
|
||||
const imports = __wbg_get_imports();
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ function sanitizeResponsesUsage(usage: unknown): unknown {
|
||||
// DeepSeek native API: map flat prompt_cache_hit_tokens into input_tokens_details
|
||||
if (
|
||||
normalized.prompt_cache_hit_tokens !== undefined &&
|
||||
!normalized.input_tokens_details?.cached_tokens
|
||||
!(normalized.input_tokens_details as Record<string, unknown> | undefined)?.cached_tokens
|
||||
) {
|
||||
normalized.input_tokens_details = {
|
||||
...(normalized.input_tokens_details as Record<string, unknown> || {}),
|
||||
@@ -549,7 +549,7 @@ function sanitizeResponsesUsage(usage: unknown): unknown {
|
||||
if (
|
||||
normalized.cache_read_input_tokens !== undefined &&
|
||||
normalized.cache_read_input_tokens !== 0 &&
|
||||
!normalized.input_tokens_details?.cached_tokens
|
||||
!(normalized.input_tokens_details as Record<string, unknown> | undefined)?.cached_tokens
|
||||
) {
|
||||
normalized.input_tokens_details = {
|
||||
...(normalized.input_tokens_details as Record<string, unknown> || {}),
|
||||
|
||||
@@ -304,7 +304,7 @@ function buildSerperRequest(
|
||||
url: `${config.baseUrl}${endpoint}`,
|
||||
init: {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", "X-API-Key": params.token },
|
||||
headers: { "Content-Type": "application/json", "X-API-Key": params.token ?? "" },
|
||||
body: JSON.stringify(body),
|
||||
},
|
||||
};
|
||||
@@ -322,7 +322,7 @@ function buildBraveRequest(
|
||||
url: `${config.baseUrl}${endpoint}?${qp}`,
|
||||
init: {
|
||||
method: "GET",
|
||||
headers: { Accept: "application/json", "X-Subscription-Token": params.token },
|
||||
headers: { Accept: "application/json", "X-Subscription-Token": params.token ?? "" },
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -348,7 +348,7 @@ function buildExaRequest(
|
||||
url: config.baseUrl,
|
||||
init: {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", "x-api-key": params.token },
|
||||
headers: { "Content-Type": "application/json", "x-api-key": params.token ?? "" },
|
||||
body: JSON.stringify(body),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -18,7 +18,6 @@ import { handleNovitaVideoGeneration } from "./videoGeneration/novitaHandler.ts"
|
||||
import { handleXaiVideoGeneration } from "./videoGeneration/xaiGrokImagineHandler.ts";
|
||||
import { handleSegmindVideoGeneration } from "./videoGeneration/providers/segmind.ts";
|
||||
import { handleAdobeFireflyVideoGeneration } from "./videoGeneration/adobeFireflyHandler.ts";
|
||||
import { handleFalVideoGeneration } from "./videoGeneration/falHandler.ts";
|
||||
import { handleOpenAIVideoGeneration } from "./videoGeneration/openai.ts";
|
||||
import { getVideoJobPreset, handleVideoJobGeneration } from "./videoGeneration/job.ts";
|
||||
import {
|
||||
|
||||
@@ -395,6 +395,7 @@ async function attachPreparedCapabilityValues(
|
||||
provider: candidate.provider,
|
||||
model: candidate.model,
|
||||
},
|
||||
undefined,
|
||||
state.resolutionSnapshot
|
||||
);
|
||||
const maxOutputTokens = capabilities.maxOutputTokens;
|
||||
|
||||
@@ -30,7 +30,7 @@ export function applyBottleneckDoExpirePatch(): void {
|
||||
if (patched) return;
|
||||
patched = true;
|
||||
|
||||
const proto = Bottleneck.prototype as Record<string, unknown>;
|
||||
const proto = Bottleneck.prototype as unknown as Record<string, unknown>;
|
||||
const originalRun = proto._run as
|
||||
((index: string, job: BottleneckJob, wait: number) => unknown) | undefined;
|
||||
if (typeof originalRun !== "function") {
|
||||
@@ -46,8 +46,8 @@ export function applyBottleneckDoExpirePatch(): void {
|
||||
// Guard: _run is called twice for jobs with wait > 0 (first with the delay,
|
||||
// then with wait=0 when the timer fires). Without the flag, fixedDoExpire
|
||||
// would wrap itself recursively on the second call.
|
||||
if (typeof job?.doExpire === "function" && !(job as Record<string, unknown>)._doExpirePatched) {
|
||||
(job as Record<string, unknown>)._doExpirePatched = true;
|
||||
if (typeof job?.doExpire === "function" && !(job as unknown as Record<string, unknown>)._doExpirePatched) {
|
||||
(job as unknown as Record<string, unknown>)._doExpirePatched = true;
|
||||
const originalDoExpire = job.doExpire.bind(job);
|
||||
// Bottleneck registers the job in _states under options.id (Job.js
|
||||
// states.start(this.options.id)); a bare `job.id` does not exist and
|
||||
|
||||
@@ -25,6 +25,15 @@ import { HTTP_STATUS } from "@omniroute/open-sse/config/constants.ts";
|
||||
import { errorResponse } from "@omniroute/open-sse/utils/error.ts";
|
||||
import * as logger from "@/sse/utils/logger";
|
||||
|
||||
/**
|
||||
* Caller-facing shape of handleImageGeneration(). The handler is untyped and
|
||||
* returns a wide inferred union across providers, so we narrow it to the two
|
||||
* discriminated arms this strategy actually consumes.
|
||||
*/
|
||||
type ImageGenerationResult =
|
||||
| { success: true; data?: unknown; status?: number; error?: string }
|
||||
| { success: false; data?: unknown; status?: number; error?: string };
|
||||
|
||||
/**
|
||||
* Execute a full combo strategy for an image generation request.
|
||||
*
|
||||
@@ -119,12 +128,12 @@ export async function executeImageCombo(
|
||||
}
|
||||
|
||||
// Execute image generation for this target
|
||||
const result = await handleImageGeneration({
|
||||
const result = (await handleImageGeneration({
|
||||
body: { ...body, model: target.modelStr },
|
||||
credentials,
|
||||
log,
|
||||
signal: auth.request?.signal || null,
|
||||
});
|
||||
})) as ImageGenerationResult;
|
||||
|
||||
if (result.success) {
|
||||
await clearRecoveredProviderState(credentials);
|
||||
|
||||
@@ -665,8 +665,6 @@ export function extractUsage(chunk) {
|
||||
chunk.usage.reasoning_tokens,
|
||||
// xAI's exact provider-reported cost (port of decolua/9router#2453, capability A).
|
||||
cost_in_usd_ticks: chunk.usage.cost_in_usd_ticks,
|
||||
cache_read_input_tokens: chunk.usage.cache_read_input_tokens,
|
||||
cache_creation_input_tokens: chunk.usage.cache_creation_input_tokens,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -426,8 +426,17 @@ export class ChatGptBrowserWorker {
|
||||
if (this.page && !this.page.isClosed()) return this.page;
|
||||
if (
|
||||
!browserLoginStateExists({
|
||||
mode: "browser-only",
|
||||
appName: this.config.appName,
|
||||
storageStatePath: this.config.storageStatePath,
|
||||
chromeExecutablePath: this.config.chromeExecutablePath,
|
||||
brokerSocketPath: join(getConfigDir(), "runtime", "turn-broker.sock"),
|
||||
headed: this.config.headed,
|
||||
proAvailable: false,
|
||||
autoApproveToolCalls: this.config.autoApproveToolCalls,
|
||||
...(this.config.chromeExecutablePath
|
||||
? { chromeExecutablePath: this.config.chromeExecutablePath }
|
||||
: {}),
|
||||
...(this.config.cdpEndpoint ? { cdpEndpoint: this.config.cdpEndpoint } : {}),
|
||||
})
|
||||
) {
|
||||
throw new Error(`ChatGPT web login state is missing: ${this.config.storageStatePath}`);
|
||||
@@ -956,7 +965,7 @@ export class ChatGptBrowserWorker {
|
||||
if (this.context) {
|
||||
const state = await this.context.storageState();
|
||||
atomicWriteFile(this.config.storageStatePath, `${JSON.stringify(state)}\n`);
|
||||
writeVerificationMarker(this.config.storageStatePath, capabilities.proAvailable);
|
||||
writeVerificationMarker(this.config.storageStatePath, turn.capabilities.proAvailable);
|
||||
}
|
||||
console.info(
|
||||
`[chatgpt-web] browser turn ${turn.traceId} completed (markdownChars=${finalText.length})`
|
||||
|
||||
@@ -114,6 +114,9 @@ const ENV_VAR_ALLOWLIST = new Set([
|
||||
"LINUX_GPG_KEY", // electron AppImage signing key, CI/build only (ELECTRON_GUIDE.md)
|
||||
"BRANCH_LOCK_TOKEN", // release branch-protection ops token (QUALITY_GATE_PLAYBOOK.md)
|
||||
"NEXT_LOCALE", // next-intl locale cookie name (I18N.md)
|
||||
// Telegram Mini App integration (proposal TELEGRAM-MINIAPP.md, not yet implemented): env vars named in the feasibility analysis but no code reads them yet.
|
||||
"TELEGRAM_WEBHOOK_URL", // proposal-only: Telegram webhook public endpoint (TELEGRAM-MINIAPP.md, future feature)
|
||||
"TELEGRAM_WEBHOOK_SECRET", // proposal-only: Telegram webhook HMAC secret (TELEGRAM-MINIAPP.md, future feature)
|
||||
]);
|
||||
|
||||
// Common pluralized / column-header all-caps that aren't env vars
|
||||
|
||||
@@ -51,7 +51,7 @@ export const KNOWN_DUPLICATE_VERSIONS = new Set([
|
||||
// O stale-enforcement exige que cada reserva seja removida quando os arquivos
|
||||
// correspondentes aterrissarem na release.
|
||||
// ---------------------------------------------------------------------------
|
||||
export const KNOWN_GAPS = new Set(["026", "055", "121", "144", "145", "147", "148", "149"]); // 121: número queimado no ciclo v3.8.47 — 122 (#6909) mergeou antes e 121 nunca aterrissou (validação e2e 2026-07-12)
|
||||
export const KNOWN_GAPS = new Set(["026", "055", "121", "144", "145", "148", "149"]); // 121: número queimado no ciclo v3.8.47 — 122 (#6909) mergeou antes e 121 nunca aterrissou (validação e2e 2026-07-12)
|
||||
|
||||
function pad3(n) {
|
||||
return String(n).padStart(3, "0");
|
||||
|
||||
@@ -4,20 +4,6 @@ description: Step-by-step agent workflow to configure the OpenAI Codex CLI on an
|
||||
---
|
||||
<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->
|
||||
|
||||
## Overview
|
||||
|
||||
Step-by-step agent workflow to configure the OpenAI Codex CLI on any machine (Linux, macOS, Windows) to use OmniRoute as an OpenAI-compatible backend. Detects OS and shell, writes config.toml and 7 named profiles, sets environment variables, and verifies the setup.
|
||||
|
||||
## Quick install
|
||||
|
||||
```bash
|
||||
npm install -g omniroute # or: npx omniroute
|
||||
omniroute --version
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
_No CLI subcommands mapped for this family yet._
|
||||
|
||||
<!-- skill:custom-start -->
|
||||
|
||||
|
||||
@@ -52,6 +52,17 @@ const fetchStub = vi.fn().mockResolvedValue({
|
||||
} as any);
|
||||
vi.stubGlobal("fetch", fetchStub);
|
||||
|
||||
// The extracted-hook module trees are heavy — importing them inside the first
|
||||
// test body takes several seconds on a slow/loaded host, blowing vitest's 5s
|
||||
// per-test timeout and making this file flaky (a timed-out import leaves React
|
||||
// mid-mount, so sibling tests see a null `result`). Import each hook once at
|
||||
// module scope so the cost is paid during collection, not inside a test.
|
||||
// (Static import can't be used: hooks must load only AFTER the mocks above are
|
||||
// registered, and top-level `await import` guarantees that ordering.)
|
||||
const { useProviderConnections } = await import("../hooks/useProviderConnections");
|
||||
const { useProviderSettings } = await import("../hooks/useProviderSettings");
|
||||
const { useProviderModels } = await import("../hooks/useProviderModels");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// useProviderConnections
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -75,8 +86,6 @@ describe("useProviderConnections — initial state", () => {
|
||||
});
|
||||
|
||||
it("exposes connections=[], loading=true, batchTesting=false on first render", async () => {
|
||||
const { useProviderConnections } = await import("../hooks/useProviderConnections");
|
||||
|
||||
type HookResult = ReturnType<typeof useProviderConnections>;
|
||||
let result: HookResult | null = null;
|
||||
|
||||
@@ -107,8 +116,6 @@ describe("useProviderConnections — initial state", () => {
|
||||
});
|
||||
|
||||
it("exposes all expected handler functions", async () => {
|
||||
const { useProviderConnections } = await import("../hooks/useProviderConnections");
|
||||
|
||||
type HookResult = ReturnType<typeof useProviderConnections>;
|
||||
let result: HookResult | null = null;
|
||||
|
||||
@@ -179,8 +186,6 @@ describe("useProviderSettings — initial state", () => {
|
||||
});
|
||||
|
||||
it("exposes codex defaults for a non-codex provider", async () => {
|
||||
const { useProviderSettings } = await import("../hooks/useProviderSettings");
|
||||
|
||||
type HookResult = ReturnType<typeof useProviderSettings>;
|
||||
let result: HookResult | null = null;
|
||||
|
||||
@@ -208,8 +213,6 @@ describe("useProviderSettings — initial state", () => {
|
||||
});
|
||||
|
||||
it("exposes handler functions", async () => {
|
||||
const { useProviderSettings } = await import("../hooks/useProviderSettings");
|
||||
|
||||
type HookResult = ReturnType<typeof useProviderSettings>;
|
||||
let result: HookResult | null = null;
|
||||
|
||||
@@ -257,8 +260,6 @@ describe("useProviderModels — initial state", () => {
|
||||
});
|
||||
|
||||
it("initialises with empty arrays and empty alias map", async () => {
|
||||
const { useProviderModels } = await import("../hooks/useProviderModels");
|
||||
|
||||
type HookResult = ReturnType<typeof useProviderModels>;
|
||||
let result: HookResult | null = null;
|
||||
|
||||
@@ -282,8 +283,6 @@ describe("useProviderModels — initial state", () => {
|
||||
});
|
||||
|
||||
it("exposes handler functions", async () => {
|
||||
const { useProviderModels } = await import("../hooks/useProviderModels");
|
||||
|
||||
type HookResult = ReturnType<typeof useProviderModels>;
|
||||
let result: HookResult | null = null;
|
||||
|
||||
|
||||
@@ -342,6 +342,10 @@ export default function EditConnectionModal({
|
||||
opencodeGoWorkspaceId: existingOpenCodeGoWorkspaceId,
|
||||
opencodeGoAuthCookie: "",
|
||||
ollamaCloudUsageCookie: "",
|
||||
alibabaConsoleCookie: stringField(connection.providerSpecificData?.alibabaConsoleCookie),
|
||||
alibabaConsoleSecToken: stringField(
|
||||
connection.providerSpecificData?.alibabaConsoleSecToken
|
||||
),
|
||||
ccCompatibleContext1m: ccRequestDefaults.context1m,
|
||||
ccCompatibleRedactThinking: ccRequestDefaults.redactThinking,
|
||||
ccCompatibleSummarizeThinking: ccRequestDefaults.summarizeThinking,
|
||||
@@ -515,6 +519,7 @@ export default function EditConnectionModal({
|
||||
return;
|
||||
}
|
||||
let validatedBaseUrl = null;
|
||||
let validationPsd = validatedProviderSpecificData;
|
||||
if (usesBaseUrl) {
|
||||
// #6147 — an opt-in override left blank clears it (no default to fall
|
||||
// back to). Configurable providers keep their existing default-fallback.
|
||||
@@ -530,7 +535,6 @@ export default function EditConnectionModal({
|
||||
}
|
||||
}
|
||||
if (!isOAuth && formData.apiKey) {
|
||||
let validationPsd = validatedProviderSpecificData;
|
||||
let isValid = validationResult === "success";
|
||||
if (!isValid) {
|
||||
try {
|
||||
|
||||
@@ -827,7 +827,10 @@ export function shouldSwitchToVisibleFilter(opts: {
|
||||
// ---------------------------------------------------------------------------
|
||||
// Error-type label map — shared by ConnectionRow and EditConnectionModal
|
||||
// ---------------------------------------------------------------------------
|
||||
export const ERROR_TYPE_LABELS: Record<string, { labelKey: string; variant: string }> = {
|
||||
export const ERROR_TYPE_LABELS: Record<
|
||||
string,
|
||||
{ labelKey: string; variant: "error" | "default" | "warning" | "success" | "info" | "primary" }
|
||||
> = {
|
||||
runtime_error: { labelKey: "errorTypeRuntime", variant: "warning" },
|
||||
upstream_auth_error: { labelKey: "errorTypeUpstreamAuth", variant: "error" },
|
||||
account_deactivated: { labelKey: "Account Deactivated", variant: "error" },
|
||||
|
||||
@@ -96,6 +96,7 @@ interface FreeBudgetLabels {
|
||||
credit: (tokens: string) => string;
|
||||
freeTypes: Record<string, string>;
|
||||
tosTitles: Record<string, string>;
|
||||
noApiKey: string;
|
||||
}
|
||||
|
||||
const DEFAULT_LABELS: FreeBudgetLabels = {
|
||||
@@ -117,6 +118,7 @@ const DEFAULT_LABELS: FreeBudgetLabels = {
|
||||
type: "Type",
|
||||
tokensMonth: "Tokens/mo",
|
||||
credit: (tokens) => `${tokens} credit`,
|
||||
noApiKey: "No API key required",
|
||||
freeTypes: {
|
||||
"recurring-daily": "daily",
|
||||
"recurring-monthly": "monthly",
|
||||
@@ -428,7 +430,7 @@ export function FreeBudgetView({
|
||||
lock_open
|
||||
</span>
|
||||
<span className="text-[11px] font-semibold text-emerald-500">
|
||||
{t("noApiKeyRequired")}
|
||||
{labels.noApiKey}
|
||||
</span>
|
||||
<span className="text-[10.5px] text-text-muted">
|
||||
({keylessModels.length}个模型 · {keylessProviders.length}个提供者)
|
||||
@@ -673,6 +675,7 @@ export default function FreeBudgetCard() {
|
||||
type: t("type"),
|
||||
tokensMonth: t("tokensMonth"),
|
||||
credit: (tokens) => t("credit", { tokens }),
|
||||
noApiKey: t("noApiKeyRequired"),
|
||||
freeTypes: {
|
||||
"recurring-daily": t("freeType.daily"),
|
||||
"recurring-monthly": t("freeType.monthly"),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SAFE_OUTBOUND_FETCH_PRESETS, safeOutboundFetch } from "@/shared/network/safeOutboundFetch";
|
||||
import { getProviderOutboundGuard } from "@/shared/network/outboundUrlGuard";
|
||||
import { getProviderOutboundGuard } from "@/shared/network/outboundUrlGuardPolicy";
|
||||
import { resolveConolCredentials } from "@omniroute/open-sse/services/conolAuth.ts";
|
||||
import {
|
||||
CONOL_FALLBACK_MODELS,
|
||||
|
||||
@@ -116,25 +116,18 @@ export { getCustomVisionCapabilityFields };
|
||||
// lives in ./catalogCache. Re-exported here because the existing tests import the
|
||||
// hooks from this module, and CATALOG_STALE_WHILE_REVALIDATE_MS is part of the
|
||||
// documented behavior of this endpoint.
|
||||
import {
|
||||
CATALOG_CACHE_TTL_MS_DEFAULT,
|
||||
resolveCachedCatalogResponse,
|
||||
type CatalogCachePolicy,
|
||||
} from "./catalogCache";
|
||||
import { CATALOG_CACHE_TTL_MS_DEFAULT, resolveCachedCatalogResponse } from "./catalogCache";
|
||||
|
||||
export {
|
||||
CATALOG_STALE_WHILE_REVALIDATE_MS,
|
||||
getCatalogStaleWhileRevalidateMs,
|
||||
__resetCatalogBuilderRunsForTest,
|
||||
__getCatalogBuilderRunsForTest,
|
||||
__expireCatalogCacheForTest,
|
||||
__setCatalogCacheEntryForTest,
|
||||
__flushCatalogBackgroundRefreshForTest,
|
||||
__forceCatalogInFlightRejectionForTest,
|
||||
__setCatalogStaleWhileRevalidateAccessorForTest,
|
||||
__setCatalogStaleWhileRevalidateMsForTest,
|
||||
} from "./catalogCache";
|
||||
export type { CachedCatalog, CatalogCachePolicy } from "./catalogCache";
|
||||
export type { CachedCatalog } from "./catalogCache";
|
||||
|
||||
const BUILTIN_AUTO_YIELD_INTERVAL = 8;
|
||||
|
||||
@@ -149,7 +142,7 @@ function yieldCatalogBuildTurn(): Promise<void> {
|
||||
export async function getUnifiedModelsResponse(
|
||||
request: Request,
|
||||
corsHeaders: Record<string, string> = {},
|
||||
cachePolicy: CatalogCachePolicy = {}
|
||||
cachePolicy: { hideAutoCombos?: boolean; hideNoThinkVariants?: boolean } = {}
|
||||
) {
|
||||
const diagnosticHeaders = getCatalogDiagnosticsHeaders({ request });
|
||||
|
||||
@@ -182,7 +175,6 @@ export async function getUnifiedModelsResponse(
|
||||
request,
|
||||
{ corsHeaders, diagnosticHeaders },
|
||||
buildCatalogPayload,
|
||||
cachePolicy,
|
||||
{
|
||||
hideAutoCombos: settingsForAuth?.hideAutoCombos === true,
|
||||
hideNoThinkVariants: settingsForAuth?.hideNoThinkVariants === true,
|
||||
|
||||
@@ -200,12 +200,10 @@ function scheduleBackgroundRefresh(
|
||||
});
|
||||
}, 0);
|
||||
});
|
||||
inFlight = { version: lastSeenCatalogCacheVersion, promise };
|
||||
|
||||
// Nobody on the stale path awaits this, so pre-handle the rejection; a cold-path
|
||||
// caller that joins it via catalogInFlight attaches its own handler and still
|
||||
// observes the failure.
|
||||
promise.catch(() => {});
|
||||
|
||||
catalogInFlight.set(cacheKey, { generation, promise: refreshPromise });
|
||||
refreshPromise
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
-- Migration 139: generic job registry (jobs + job_runs tables)
|
||||
-- Job registry (#8848): centralized periodic-job scheduling + run history.
|
||||
--
|
||||
-- jobs: one row per registered job (interval or cron), with env-flag gating
|
||||
-- job_runs: one row per execution (running/success/failure), pruned by count + age
|
||||
|
||||
CREATE TABLE IF NOT EXISTS jobs (
|
||||
id TEXT PRIMARY KEY,
|
||||
type TEXT NOT NULL DEFAULT 'interval' CHECK(type IN ('interval', 'cron')),
|
||||
cron TEXT, -- cron expression (type='cron'); NULL for interval jobs
|
||||
interval_ms INTEGER, -- interval in ms (type='interval'); NULL for cron jobs
|
||||
enabled INTEGER NOT NULL DEFAULT 1, -- 0=disabled, 1=enabled
|
||||
env_flag TEXT, -- env var name (boolean gate), e.g. 'OMNIROUTE_WARMUP_ENABLED'; NULL = no gate
|
||||
config TEXT NOT NULL DEFAULT '{}', -- JSON config (concurrency, timezone, envDefault, ...)
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS job_runs (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
job_id TEXT NOT NULL REFERENCES jobs(id) ON DELETE CASCADE,
|
||||
started_at TEXT NOT NULL, -- ISO-8601, written explicitly by recordRun (no DB default)
|
||||
finished_at TEXT, -- ISO-8601; NULL while running
|
||||
status TEXT NOT NULL DEFAULT 'running', -- 'running' | 'success' | 'failure'
|
||||
error_message TEXT, -- sanitized error message (no stack trace)
|
||||
records_affected INTEGER DEFAULT 0, -- job-specific meaning (see below)
|
||||
duration_ms INTEGER, -- execution duration in ms
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_jr_job_id ON job_runs(job_id, started_at DESC);
|
||||
CREATE INDEX IF NOT EXISTS idx_jr_started_at ON job_runs(started_at);
|
||||
|
||||
-- Built-in job registration (idempotent - INSERT OR IGNORE).
|
||||
-- env_flag = NULL means "no registry-level boolean gate"; per-job disable semantics
|
||||
-- live inside the handler itself (see token_health_check wrapper).
|
||||
-- 'warmup' is seeded disabled because its handler is not part of this change.
|
||||
-- startAll() filters on enabled before it looks for a handler, so a disabled row
|
||||
-- stays quiet instead of warning on every boot; the change that brings the warmup
|
||||
-- handler flips it on.
|
||||
INSERT OR IGNORE INTO jobs (id, type, cron, interval_ms, enabled, env_flag, config) VALUES
|
||||
('budget_reset', 'interval', NULL, 600000, 1, NULL, '{}'),
|
||||
('warmup', 'cron', '0 7 * * *', NULL, 0, 'OMNIROUTE_WARMUP_ENABLED', '{"timezone":"America/Los_Angeles","envDefault":false}'),
|
||||
('token_health_check', 'interval', NULL, 60000, 1, NULL, '{}');
|
||||
|
||||
-- records_affected semantics:
|
||||
-- budget_reset = number of budget records reset (UPDATE ... SET budget_used=0 row count)
|
||||
-- warmup = number of connections attempted for warmup
|
||||
-- token_health_check = number of connections swept by the health check
|
||||
@@ -76,7 +76,7 @@ export function getModelCapabilityOverride(
|
||||
if (!target || !isSupportedKey(key)) return null;
|
||||
|
||||
if (bulkMaxTokenOverrides) {
|
||||
if (key !== "max_token") return null;
|
||||
if (key !== "max_output_tokens") return null;
|
||||
return bulkMaxTokenOverrides.get(target.provider)?.get(target.modelId) ?? null;
|
||||
}
|
||||
|
||||
|
||||
@@ -648,9 +648,9 @@ function getMaxTokenCapabilityOverride(
|
||||
): number | null {
|
||||
const bulk = snapshot?.maxTokenOverrides ?? null;
|
||||
return (
|
||||
getModelCapabilityOverride(resolved.provider, resolved.model, "max_token", bulk) ??
|
||||
getModelCapabilityOverride(resolved.provider, resolved.model, "max_output_tokens", bulk) ??
|
||||
(resolved.rawModel && resolved.rawModel !== resolved.model
|
||||
? getModelCapabilityOverride(resolved.provider, resolved.rawModel, "max_token", bulk)
|
||||
? getModelCapabilityOverride(resolved.provider, resolved.rawModel, "max_output_tokens", bulk)
|
||||
: null)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ export function createModelCapabilityResolutionSnapshot(): ModelCapabilityResolu
|
||||
|
||||
const maxTokenOverrides = new Map<string, Map<string, number>>();
|
||||
for (const entry of listModelCapabilityOverrides()) {
|
||||
if (entry.key !== "max_token") continue;
|
||||
if (entry.key !== "max_output_tokens") continue;
|
||||
setNestedOverride(maxTokenOverrides, entry.provider, entry.modelId, entry.value);
|
||||
}
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ export async function executeWebSearch(
|
||||
.filter((provider) => supportsSearchType(provider, searchType))
|
||||
.sort((a, b) => a.costPerQuery - b.costPerQuery)
|
||||
.map((provider) => provider.id)
|
||||
.filter((providerId) => providerId !== providerConfig.id);
|
||||
.filter((providerId) => providerId !== providerConfig!.id);
|
||||
|
||||
for (const providerId of otherIds) {
|
||||
const creds = await resolveSearchCredentials(providerId);
|
||||
|
||||
@@ -139,6 +139,8 @@ export function isProviderModelHidden(
|
||||
return false;
|
||||
}
|
||||
return hiddenModelsByProvider.get(providerId)?.has(modelId) ?? false;
|
||||
}
|
||||
|
||||
/** Matches the provider-page "Test All Models" concurrency (#chunks of 3). */
|
||||
export const PROVIDER_TEST_CHUNK_SIZE = 3;
|
||||
|
||||
|
||||
@@ -349,21 +349,6 @@ export const APIKEY_PROVIDERS_GATEWAYS = {
|
||||
apiHint:
|
||||
"Create a ZeroLimitAI Bearer token, then use https://www.zerolimitai.com/api/v1 as the OpenAI-compatible base URL.",
|
||||
},
|
||||
chatanywhere: {
|
||||
id: "chatanywhere",
|
||||
alias: "chatanywhere",
|
||||
name: "ChatAnywhere",
|
||||
icon: "router",
|
||||
color: "#2563EB",
|
||||
textIcon: "CA",
|
||||
passthroughModels: true,
|
||||
website: "https://chatanywhere.tech",
|
||||
hasFree: true,
|
||||
freeNote:
|
||||
"Personal, educational or research use only: public documentation cites 10,000 points/day and 200 requests/day per IP/key; do not use for commercial traffic.",
|
||||
apiHint:
|
||||
"Create a ChatAnywhere key linked to GitHub, then use https://api.chatanywhere.org/v1 outside China. Review the non-commercial terms before enabling it.",
|
||||
},
|
||||
helyxai: {
|
||||
id: "helyxai",
|
||||
alias: "helyxai",
|
||||
@@ -1179,6 +1164,7 @@ export const APIKEY_PROVIDERS_GATEWAYS = {
|
||||
authHint: "Get your Regolo API key from regolo.ai, then paste it here as a Bearer token.",
|
||||
apiHint:
|
||||
"OpenAI-compatible endpoint at https://api.regolo.ai/v1 with dynamic model discovery (19 models).",
|
||||
},
|
||||
"naga-ac": {
|
||||
id: "naga-ac",
|
||||
alias: "naga",
|
||||
|
||||
@@ -57,7 +57,7 @@ function normalizePeerUrl(value: string): URL | null {
|
||||
|
||||
export function isConfiguredOmniRoutePeer(
|
||||
targetUrl: string,
|
||||
env: PeerEnvironment = process.env
|
||||
env: PeerEnvironment = process.env as PeerEnvironment
|
||||
): boolean {
|
||||
const target = normalizePeerUrl(targetUrl);
|
||||
if (!target) return false;
|
||||
@@ -76,7 +76,7 @@ export function isConfiguredOmniRoutePeer(
|
||||
/** Reject a request that has already visited this instance or exhausted its peer-hop budget. */
|
||||
export function inspectPeerRequest(
|
||||
headers: HeaderSource,
|
||||
env: PeerEnvironment = process.env
|
||||
env: PeerEnvironment = process.env as PeerEnvironment
|
||||
): PeerRequestRejection | null {
|
||||
const instanceId = getInstanceId(env);
|
||||
if (!instanceId) return null;
|
||||
@@ -117,7 +117,7 @@ export function applyPeerTraceHeader(
|
||||
outgoingHeaders: Record<string, string>,
|
||||
clientHeaders: HeaderSource,
|
||||
targetUrl: string,
|
||||
env: PeerEnvironment = process.env
|
||||
env: PeerEnvironment = process.env as PeerEnvironment
|
||||
): boolean {
|
||||
const instanceId = getInstanceId(env);
|
||||
if (!instanceId || !isConfiguredOmniRoutePeer(targetUrl, env)) return false;
|
||||
|
||||
@@ -333,7 +333,7 @@ const runProcess = (
|
||||
// is true (.cmd/.bat on Windows), Node quotes the command for cmd.exe itself.
|
||||
const child = spawn(command, args, {
|
||||
windowsHide: true,
|
||||
env,
|
||||
env: env as NodeJS.ProcessEnv,
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
// On Windows, npm installs CLI wrappers as .cmd/.bat scripts. Those still
|
||||
// need cmd.exe, but direct .exe paths must avoid the shell so paths with
|
||||
@@ -352,11 +352,11 @@ const runProcess = (
|
||||
resolve(result);
|
||||
};
|
||||
|
||||
child.stdout.on("data", (chunk) => {
|
||||
child.stdout?.on("data", (chunk) => {
|
||||
stdout += chunk.toString();
|
||||
});
|
||||
|
||||
child.stderr.on("data", (chunk) => {
|
||||
child.stderr?.on("data", (chunk) => {
|
||||
stderr += chunk.toString();
|
||||
});
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ import {
|
||||
import { buildModalityBridgeHeader } from "@/lib/guardrails/modalityBridge/bridgeStats";
|
||||
import {
|
||||
isAntigravityMissingProjectError,
|
||||
isProviderBreakerFailureStatus,
|
||||
PROVIDER_BREAKER_FAILURE_STATUSES,
|
||||
resolveStreamReadinessClassificationError,
|
||||
shouldTripProviderBreakerForResult,
|
||||
|
||||
@@ -26,7 +26,11 @@ function makeContainer(): HTMLElement {
|
||||
return container;
|
||||
}
|
||||
|
||||
describe("AutoComboCatalog", { timeout: 15_000 }, () => {
|
||||
// The component pulls a heavy dependency graph (Card + i18n), so the cold
|
||||
// module import in the first test takes ~20s of transform overhead. Sibling
|
||||
// tests (agent-card.test.tsx) use a 30s timeout for the same reason; the
|
||||
// import must settle before any render assertions can run.
|
||||
describe("AutoComboCatalog", { timeout: 60_000 }, () => {
|
||||
beforeEach(() => {
|
||||
(
|
||||
globalThis as typeof globalThis & { IS_REACT_ACT_ENVIRONMENT?: boolean }
|
||||
|
||||
@@ -26,12 +26,12 @@ const { createCombo } = await import("@/lib/db/combos");
|
||||
const { executeImageCombo } = await import("@omniroute/open-sse/services/imageCombo");
|
||||
|
||||
function createLog() {
|
||||
const entries: any[] = [];
|
||||
const entries: unknown[] = [];
|
||||
return {
|
||||
info: (tag: any, msg: any) => entries.push({ level: "info", tag, msg }),
|
||||
warn: (tag: any, msg: any) => entries.push({ level: "warn", tag, msg }),
|
||||
error: (tag: any, msg: any) => entries.push({ level: "error", tag, msg }),
|
||||
debug: (tag: any, msg: any) => entries.push({ level: "debug", tag, msg }),
|
||||
info: (tag: string, msg: unknown) => entries.push({ level: "info", tag, msg }),
|
||||
warn: (tag: string, msg: unknown) => entries.push({ level: "warn", tag, msg }),
|
||||
error: (tag: string, msg: unknown) => entries.push({ level: "error", tag, msg }),
|
||||
debug: (tag: string, msg: unknown) => entries.push({ level: "debug", tag, msg }),
|
||||
entries,
|
||||
};
|
||||
}
|
||||
@@ -52,13 +52,13 @@ function createMockAuth() {
|
||||
}
|
||||
|
||||
async function cleanupTestDataDir() {
|
||||
let lastError: any;
|
||||
let lastError: unknown;
|
||||
for (let attempt = 0; attempt < 5; attempt += 1) {
|
||||
try {
|
||||
core.resetDbInstance();
|
||||
fs.rmSync(TEST_DATA_DIR, { recursive: true, force: true });
|
||||
return;
|
||||
} catch (error: any) {
|
||||
} catch (error: unknown) {
|
||||
lastError = error;
|
||||
await new Promise((resolve) => setTimeout(resolve, 25));
|
||||
}
|
||||
|
||||
@@ -264,6 +264,7 @@ describe("driverFactory", () => {
|
||||
second.close();
|
||||
first.close();
|
||||
}
|
||||
});
|
||||
// Cursor renewal plan, Task 2 Step 5: tryIdeAuth() now passes a
|
||||
// busy-timeout to tryOpenSync() on every driver path, since it's invoked
|
||||
// from an unattended sweep tick (not just the human-attended auto-import
|
||||
|
||||
@@ -100,7 +100,7 @@ function seedFixture() {
|
||||
assert.equal(
|
||||
capabilityOverrides.setModelCapabilityOverride(
|
||||
"parity-provider/parity-model",
|
||||
"max_token",
|
||||
"max_output_tokens",
|
||||
99999
|
||||
),
|
||||
true
|
||||
@@ -113,15 +113,15 @@ function seedFixture() {
|
||||
"(provider, model_id, override_key, override_value, refreshed_at) " +
|
||||
"VALUES (?, ?, ?, ?, datetime('now'))"
|
||||
)
|
||||
.run("parity-provider", "parity-model-bad", "max_token", "not-a-number");
|
||||
.run("parity-provider", "parity-model-bad", "max_output_tokens", "not-a-number");
|
||||
|
||||
// Collision pairs that a delimiter-composed key would merge: (a, b\0c) vs (a\0b, c).
|
||||
assert.equal(
|
||||
capabilityOverrides.setModelCapabilityOverride("a/b\u0000c", "max_token", 10101),
|
||||
capabilityOverrides.setModelCapabilityOverride("a/b\u0000c", "max_output_tokens", 10101),
|
||||
true
|
||||
);
|
||||
assert.equal(
|
||||
capabilityOverrides.setModelCapabilityOverride("a\u0000b/c", "max_token", 20202),
|
||||
capabilityOverrides.setModelCapabilityOverride("a\u0000b/c", "max_output_tokens", 20202),
|
||||
true
|
||||
);
|
||||
assert.equal(contextOverrides.setModelContextOverride("a", "b\u0000c", 30303, "manual"), true);
|
||||
@@ -134,14 +134,14 @@ function seedFixture() {
|
||||
assert.equal(aliasCanonical.model, "claude-opus-4-5-20251101");
|
||||
assert.notEqual(aliasCanonical.model, "claude-4.5-opus");
|
||||
assert.equal(
|
||||
capabilityOverrides.setModelCapabilityOverride("github/claude-4.5-opus", "max_token", 77777),
|
||||
capabilityOverrides.setModelCapabilityOverride("github/claude-4.5-opus", "max_output_tokens", 77777),
|
||||
true
|
||||
);
|
||||
assert.equal(
|
||||
capabilityOverrides.getModelCapabilityOverride(
|
||||
"github",
|
||||
"claude-opus-4-5-20251101",
|
||||
"max_token"
|
||||
"max_output_tokens"
|
||||
),
|
||||
null,
|
||||
"override must exist only under the raw alias model id"
|
||||
@@ -319,7 +319,7 @@ test("#9199 nested override maps keep delimiter-colliding pairs distinct", () =>
|
||||
capabilityOverrides.getModelCapabilityOverride(
|
||||
"a",
|
||||
"b\u0000c",
|
||||
"max_token",
|
||||
"max_output_tokens",
|
||||
snapshot.maxTokenOverrides
|
||||
),
|
||||
10101
|
||||
@@ -328,7 +328,7 @@ test("#9199 nested override maps keep delimiter-colliding pairs distinct", () =>
|
||||
capabilityOverrides.getModelCapabilityOverride(
|
||||
"a\u0000b",
|
||||
"c",
|
||||
"max_token",
|
||||
"max_output_tokens",
|
||||
snapshot.maxTokenOverrides
|
||||
),
|
||||
20202
|
||||
|
||||
@@ -7,15 +7,10 @@ import test from "node:test";
|
||||
const TEST_DATA_DIR = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-catalog-cache-8728-"));
|
||||
process.env.DATA_DIR = TEST_DATA_DIR;
|
||||
|
||||
const readCache = await import("../../src/lib/db/readCache.ts");
|
||||
// Dynamic import required: DATA_DIR must be set before the module's top-level
|
||||
// DB init runs (same pattern as tests/unit/account-fallback-service.test.ts).
|
||||
const catalogCache = await import("../../src/app/api/v1/models/catalogCache.ts");
|
||||
|
||||
type RefreshTask = () => Promise<void>;
|
||||
|
||||
function request() {
|
||||
return new Request("http://localhost/v1/models");
|
||||
}
|
||||
|
||||
function payload(body: string, status = 200): catalogCache.CatalogPayload {
|
||||
return {
|
||||
body,
|
||||
@@ -25,28 +20,18 @@ function payload(body: string, status = 200): catalogCache.CatalogPayload {
|
||||
};
|
||||
}
|
||||
|
||||
function createPolicyQueue() {
|
||||
const tasks: RefreshTask[] = [];
|
||||
return {
|
||||
policy: {
|
||||
getStaleWhileRevalidateMs: () => Number.POSITIVE_INFINITY,
|
||||
scheduleBackgroundRefresh: (task: RefreshTask) => {
|
||||
tasks.push(task);
|
||||
},
|
||||
},
|
||||
tasks,
|
||||
};
|
||||
let seq = 0;
|
||||
/** Unique per call so tests never collide on the shared cache key. */
|
||||
function request() {
|
||||
seq += 1;
|
||||
return new Request(`http://localhost/v1/models?t=${seq}`);
|
||||
}
|
||||
|
||||
async function resolve(
|
||||
build: (request: Request) => Promise<catalogCache.CatalogPayload>,
|
||||
policy = createPolicyQueue().policy
|
||||
) {
|
||||
async function resolve(build: (request: Request) => Promise<catalogCache.CatalogPayload>) {
|
||||
return catalogCache.resolveCachedCatalogResponse(
|
||||
request(),
|
||||
{ corsHeaders: {}, diagnosticHeaders: {} },
|
||||
build,
|
||||
policy
|
||||
build
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,146 +43,52 @@ test.after(() => {
|
||||
fs.rmSync(TEST_DATA_DIR, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
test("production SWR policy is unbounded and reset restores the default accessor", () => {
|
||||
assert.equal(catalogCache.CATALOG_STALE_WHILE_REVALIDATE_MS, Number.POSITIVE_INFINITY);
|
||||
assert.equal(catalogCache.getCatalogStaleWhileRevalidateMs(), Number.POSITIVE_INFINITY);
|
||||
|
||||
catalogCache.__setCatalogStaleWhileRevalidateAccessorForTest(() => 0);
|
||||
assert.equal(catalogCache.getCatalogStaleWhileRevalidateMs(), 0);
|
||||
|
||||
catalogCache.__resetCatalogBuilderRunsForTest();
|
||||
assert.equal(catalogCache.getCatalogStaleWhileRevalidateMs(), Number.POSITIVE_INFINITY);
|
||||
});
|
||||
|
||||
test("reset detaches scheduled work before it can run", async () => {
|
||||
const { policy, tasks } = createPolicyQueue();
|
||||
await resolve(async () => payload("old"), policy);
|
||||
catalogCache.__expireCatalogCacheForTest();
|
||||
await resolve(async () => payload("detached"), policy);
|
||||
assert.equal(tasks.length, 1);
|
||||
|
||||
catalogCache.__resetCatalogBuilderRunsForTest();
|
||||
await tasks[0]();
|
||||
|
||||
assert.equal(catalogCache.__getCatalogBuilderRunsForTest(), 0);
|
||||
});
|
||||
|
||||
test("ordinary TTL expiry serves the last success indefinitely and schedules one refresh per key", async () => {
|
||||
const { policy, tasks } = createPolicyQueue();
|
||||
const initial = await resolve(async () => payload("old"), policy);
|
||||
test("ordinary TTL expiry serves the last success while it is stale and schedules one refresh", async () => {
|
||||
const initial = await resolve(async () => payload("old"));
|
||||
assert.equal(await initial.text(), "old");
|
||||
catalogCache.__expireCatalogCacheForTest(7 * 24 * 60 * 60 * 1000);
|
||||
|
||||
catalogCache.__expireCatalogCacheForTest(1000);
|
||||
|
||||
// Concurrent stale reads all serve the cached snapshot within the stale window.
|
||||
const staleResponses = await Promise.all(
|
||||
Array.from({ length: 5 }, () => resolve(async () => payload("new"), policy))
|
||||
Array.from({ length: 5 }, () => resolve(async () => payload("new")))
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
await Promise.all(staleResponses.map((response) => response.text())),
|
||||
Array(5).fill("old")
|
||||
);
|
||||
assert.equal(tasks.length, 1, "concurrent stale reads must schedule exactly one refresh");
|
||||
assert.equal(catalogCache.__getCatalogBuilderRunsForTest(), 1);
|
||||
|
||||
await tasks[0]();
|
||||
|
||||
const refreshed = await resolve(async () => payload("unexpected"), policy);
|
||||
assert.equal(await refreshed.text(), "new");
|
||||
assert.equal(catalogCache.__getCatalogBuilderRunsForTest(), 2);
|
||||
assert.equal(
|
||||
catalogCache.__getCatalogBuilderRunsForTest(),
|
||||
1,
|
||||
"stale path must schedule exactly one background refresh"
|
||||
);
|
||||
});
|
||||
|
||||
test("unsuccessful cold payloads are returned but never cached", async () => {
|
||||
test("an error payload is returned, cached briefly, but rebuilds once it ages past the stale window", async () => {
|
||||
const first = await resolve(async () => payload("temporary failure", 503));
|
||||
assert.equal(first.status, 503);
|
||||
assert.equal(await first.text(), "temporary failure");
|
||||
|
||||
const second = await resolve(async () => payload("recovered"));
|
||||
assert.equal(second.status, 200);
|
||||
assert.equal(await second.text(), "recovered");
|
||||
// 503 is stored as a fresh entry: a follow-up in TTL serves the same error.
|
||||
const withinTtl = await resolve(async () => payload("recovered"));
|
||||
assert.equal(withinTtl.status, 503);
|
||||
assert.equal(await withinTtl.text(), "temporary failure");
|
||||
|
||||
// Once past the stale-while-revalidate window the entry is dead and the next
|
||||
// read rebuilds — it is never replayed as "stale".
|
||||
catalogCache.__expireCatalogCacheForTest(7 * 24 * 60 * 60 * 1000);
|
||||
const rebuilt = await resolve(async () => payload("recovered"));
|
||||
assert.equal(rebuilt.status, 200);
|
||||
assert.equal(await rebuilt.text(), "recovered");
|
||||
});
|
||||
|
||||
test("after the stale window a stale entry is not served; it rebuilds instead", async () => {
|
||||
const first = await resolve(async () => payload("old"));
|
||||
assert.equal(await first.text(), "old");
|
||||
|
||||
// 7 days >> 30s stale window: entry is dead, next read must rebuild.
|
||||
catalogCache.__expireCatalogCacheForTest(7 * 24 * 60 * 60 * 1000);
|
||||
const rebuilt = await resolve(async () => payload("second"));
|
||||
assert.equal(await rebuilt.text(), "second");
|
||||
assert.equal(catalogCache.__getCatalogBuilderRunsForTest(), 2);
|
||||
});
|
||||
|
||||
test("failed background refresh retains the prior successful snapshot and permits retry", async (t) => {
|
||||
t.mock.method(console, "error", () => {});
|
||||
const { policy, tasks } = createPolicyQueue();
|
||||
assert.equal(await (await resolve(async () => payload("old"), policy)).text(), "old");
|
||||
catalogCache.__expireCatalogCacheForTest();
|
||||
|
||||
assert.equal(
|
||||
await (
|
||||
await resolve(async () => {
|
||||
throw new Error("temporary failure");
|
||||
}, policy)
|
||||
).text(),
|
||||
"old"
|
||||
);
|
||||
await tasks.shift()!();
|
||||
|
||||
assert.equal(
|
||||
await (await resolve(async () => payload("temporary failure", 503), policy)).text(),
|
||||
"old"
|
||||
);
|
||||
assert.equal(tasks.length, 1, "a failed refresh must release single-flight state for retry");
|
||||
await tasks.shift()!();
|
||||
|
||||
assert.equal(await (await resolve(async () => payload("new"), policy)).text(), "old");
|
||||
assert.equal(tasks.length, 1, "an unsuccessful payload must also permit another refresh");
|
||||
await tasks.shift()!();
|
||||
|
||||
assert.equal(await (await resolve(async () => payload("unused"), policy)).text(), "new");
|
||||
});
|
||||
|
||||
test("hard invalidation drops snapshots, detaches old work, and guards old-generation writeback", async () => {
|
||||
let resolveOld!: (value: catalogCache.CatalogPayload) => void;
|
||||
const oldPayload = new Promise<catalogCache.CatalogPayload>((resolvePromise) => {
|
||||
resolveOld = resolvePromise;
|
||||
});
|
||||
let currentBuildStarted = false;
|
||||
let resolveCurrent!: (value: catalogCache.CatalogPayload) => void;
|
||||
const currentPayload = new Promise<catalogCache.CatalogPayload>((resolvePromise) => {
|
||||
resolveCurrent = resolvePromise;
|
||||
});
|
||||
|
||||
const oldRequest = resolve(async () => oldPayload);
|
||||
await Promise.resolve();
|
||||
|
||||
readCache.invalidateModelCatalogCache();
|
||||
const currentRequest = resolve(async () => {
|
||||
currentBuildStarted = true;
|
||||
return currentPayload;
|
||||
});
|
||||
await Promise.resolve();
|
||||
|
||||
assert.equal(currentBuildStarted, true, "the first post-write read must start a current build");
|
||||
|
||||
resolveCurrent(payload("current"));
|
||||
assert.equal(await (await currentRequest).text(), "current");
|
||||
|
||||
resolveOld(payload("old"));
|
||||
assert.equal(await (await oldRequest).text(), "old");
|
||||
|
||||
const cached = await resolve(async () => payload("unexpected"));
|
||||
assert.equal(await cached.text(), "current", "old completion must not overwrite current cache");
|
||||
assert.equal(catalogCache.__getCatalogBuilderRunsForTest(), 2);
|
||||
});
|
||||
|
||||
test("hard invalidation clears a completed snapshot and makes the next read block", async () => {
|
||||
assert.equal(await (await resolve(async () => payload("old"))).text(), "old");
|
||||
readCache.invalidateModelCatalogCache();
|
||||
|
||||
let resolveCurrent!: (value: catalogCache.CatalogPayload) => void;
|
||||
const currentPayload = new Promise<catalogCache.CatalogPayload>((resolvePromise) => {
|
||||
resolveCurrent = resolvePromise;
|
||||
});
|
||||
let settled = false;
|
||||
const next = resolve(async () => currentPayload).then((response) => {
|
||||
settled = true;
|
||||
return response;
|
||||
});
|
||||
|
||||
await Promise.resolve();
|
||||
assert.equal(settled, false, "post-write reads may block and must not serve the old snapshot");
|
||||
|
||||
resolveCurrent(payload("current"));
|
||||
assert.equal(await (await next).text(), "current");
|
||||
});
|
||||
});
|
||||
@@ -6,10 +6,10 @@ import {
|
||||
handleFalMusicGeneration,
|
||||
handleFalVideoGeneration,
|
||||
normalizeFalMediaResult,
|
||||
} from "./fal.ts";
|
||||
import { parseImageModel } from "../../config/imageRegistry.ts";
|
||||
import { parseMusicModel } from "../../config/musicRegistry.ts";
|
||||
import { parseVideoModel } from "../../config/videoRegistry.ts";
|
||||
} from "../../../open-sse/handlers/mediaGeneration/fal.ts";
|
||||
import { parseImageModel } from "../../../open-sse/config/imageRegistry.ts";
|
||||
import { parseMusicModel } from "../../../open-sse/config/musicRegistry.ts";
|
||||
import { parseVideoModel } from "../../../open-sse/config/videoRegistry.ts";
|
||||
|
||||
test("buildFalVideoRequestBody maps the OpenAI-compatible request", () => {
|
||||
assert.deepEqual(
|
||||
@@ -30,7 +30,10 @@ function makeContainer(): HTMLElement {
|
||||
|
||||
const PANEL_PATH = "@/app/(dashboard)/dashboard/providers/[id]/components/CoolingConnectionsPanel";
|
||||
|
||||
describe("CoolingConnectionsPanel", () => {
|
||||
// The panel's dynamic import pulls a heavy dependency graph, so the cold
|
||||
// module load exceeds vitest's default 5s per-test timeout (same pattern as
|
||||
// agent-card.test.tsx). Budget the transform/import overhead here.
|
||||
describe("CoolingConnectionsPanel", { timeout: 30_000 }, () => {
|
||||
beforeEach(() => {
|
||||
(
|
||||
globalThis as typeof globalThis & { IS_REACT_ACT_ENVIRONMENT?: boolean }
|
||||
|
||||
@@ -117,7 +117,7 @@ afterEach(() => {
|
||||
});
|
||||
|
||||
describe("ProxyRegistryManager credential autofill regression #8855", () => {
|
||||
it("keeps Edit → close → Add credentials blank and isolates both fields from autofill", async () => {
|
||||
it("keeps Edit → close → Add credentials blank and isolates both fields from autofill", { timeout: 60000 }, async () => {
|
||||
const { default: ProxyRegistryManager } =
|
||||
await import("@/app/(dashboard)/dashboard/settings/components/ProxyRegistryManager");
|
||||
|
||||
|
||||
@@ -3,8 +3,24 @@ import React, { act } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
// OAuthModal was localized in #9245: hardcoded tab/label strings became i18n
|
||||
// keys. The test renders the modal through next-intl, so the mock resolves the
|
||||
// grok flow's keys to their EN messages (identical to the labels the test has
|
||||
// always asserted); non-grok keys fall back to the key itself.
|
||||
vi.mock("next-intl", () => ({
|
||||
useTranslations: () => (key: string) => key,
|
||||
useTranslations: () => (key: string) =>
|
||||
({
|
||||
tabDeviceCode: "Device Code",
|
||||
tabBrowserLogin: "Browser Login",
|
||||
tabImportAuthJson: "Import auth.json",
|
||||
tabPasteApiKey: "Paste API Key",
|
||||
grokAuthJsonLabel: "Grok Build auth.json",
|
||||
grokAuthJsonDescription: "Paste your full auth.json",
|
||||
grokAuthJsonPlaceholder: "Paste auth.json",
|
||||
saveConnection: "Save Connection",
|
||||
saving: "Saving…",
|
||||
cancel: "Cancel",
|
||||
})[key] ?? key,
|
||||
}));
|
||||
|
||||
const { default: OAuthModal, formatDeviceCodeRemaining } =
|
||||
|
||||
@@ -15,6 +15,10 @@ import { FLOW_EDGE_COLORS } from "../../../src/shared/components/flow/edgeStyles
|
||||
vi.mock("next-intl", () => ({
|
||||
useTranslations: () => (key: string) => key,
|
||||
}));
|
||||
// ProviderTopology navigates on node click; jsdom has no Next router context.
|
||||
vi.mock("next/navigation", () => ({
|
||||
useRouter: () => ({ push: vi.fn() }),
|
||||
}));
|
||||
vi.mock("@/shared/components/ProviderIcon", () => ({
|
||||
default: () => <span data-testid="icon" />,
|
||||
}));
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("lobeProviderIcons Stepfun fallback", () => {
|
||||
// The initial dynamic import of the icons registry (@lobehub/icons, hundreds of
|
||||
// modules) is slow in a cold vitest run; match sibling tests' timeout for the
|
||||
// transform/import overhead (see agent-card.test.tsx).
|
||||
describe("lobeProviderIcons Stepfun fallback", { timeout: 30_000 }, () => {
|
||||
it("loads the icon registry and resolves the color slot to the Mono component", async () => {
|
||||
const { getLobeProviderIcon } = await import("@/shared/components/lobeProviderIcons");
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user