perf(electron): ship optional ML/browser deps as installable packs (7/8) - #10382
Conversation
4866085 to
b65c605
Compare
b95cdb9 to
aaaecf3
Compare
aaaecf3 to
c250b63
Compare
fd54291 to
77cf3c8
Compare
…#9985) (#10396) `check:dead-code` reports 410 dead symbols against a 409 baseline on the pristine `release/v3.8.50` tip, so every PR on the branch is born red on that gate (#10386, #10393, #10390, #10388, #10382 all fail it). Isolated the +1 by diffing knip 6.32 reports between the rebaseline commit 97aac6a (409) and the tip (410): `resolveOpencodeConfigDir` in `src/shared/services/cliRuntime.ts`. #10246 moved the canonical resolvers into `opencodeConfigPath.ts` and left this wrapper behind; the same commit removed its last consumer. The wrapper was not just unused, it was divergent: it returned `path.dirname()` of the canonical value — `~/.config` rather than `~/.config/opencode` — so any future caller reaching for it by name would have written the OpenCode config one directory too high. Removed the wrapper and its now-unused import. A new test pins the canonical resolver's contract and asserts the divergent re-export stays gone; the guard was mutation-validated (re-adding the wrapper fails it). check:dead-code: 409 = baseline, PASS. cliRuntime/opencode suites: 51 pass, 0 fail. New guard: 3 pass, 0 fail. lint / typecheck:core / file-size / complexity-ratchets / test-discovery: green. Co-authored-by: Xiangzhe <bakryun0718@proton.me>
81d3513 to
439e441
Compare
|
Thanks for this — solid continuation of the #10321 roadmap. The pack model (manifest → checksummed staging → CLI install/verify/remove → NODE_PATH injection) is clean, the fail-open/fail-closed split is exactly right (degrade gracefully on absence, refuse on a checksum mismatch), and the test coverage is thorough — tri-state verify, tamper detection, tarball vs. extracted-dir payloads, duplicate-copy cleanup, and the NODE_PATH-ordering wiring assertion are all exercised. All CI checks are green. Two things before this is ready to merge:
Once #1 is resolved this looks merge-ready to me. |
439e441 to
79e1384
Compare
|
Addressed the requested item in commit 79e1384: removed the unused static-pack import audit and allowlist helpers instead of shipping unconsumed code. The focused optional-pack suite passes 27/27. Please take another look when you have a chance. |
b863278 to
dbcb5ad
Compare
Stage 7 of issue diegosouzapw#10321 moves the optional ML and browser automation dependency closures out of the desktop bundle into checksummed, versioned packs installed on demand through the omniroute packs command. - scripts/build/optionalPackStaging.mjs stages pack members under .build/optional-packs, creates release tarballs, and emits optional-packs.index.json with per-member SHA-256 checksums. - scripts/packs provides manifest, install, remove, and verification helpers plus the packs CLI commands. - Runtime lookup includes installed pack node_modules directories, while LLMLingua and browser executors continue to degrade gracefully when packs are absent. The measured darwin-arm64 staging closure was about 534 MB of the 929 MB standalone node_modules tree (57%).
dbcb5ad to
e92adf6
Compare
|
Validated in local merge-train |
… release drift) Release/v3.8.50 currently fails five gates on its own tree; this PR inherits them. Fix the stale expectations to match live code: - feature-flags-settings: 48 -> 49 flags (Wave 2 adds OMNIROUTE_CHAT_VIRTUAL_LANES) - cli-tools-schema / cli-catalog-counts: 33 -> 34 tools (zcode added; 26 code = 21 visible + 5 none) - optional-transformers-dependency: onnxruntime-node ~1.24.3 -> ~1.27.0 (bump diegosouzapw#10382) - stryker.conf.json: register chatcore-header-drop-warn-dedupe-10315 test - check-public-creds: freeze zcodeProtocol clientId false positive (client identifier, not a credential)
… release drift) Release/v3.8.50 currently fails five gates on its own tree; this PR inherits them. Fix the stale expectations to match live code: - feature-flags-settings: 48 -> 49 flags (Wave 2 adds OMNIROUTE_CHAT_VIRTUAL_LANES) - cli-tools-schema / cli-catalog-counts: 33 -> 34 tools (zcode added; 26 code = 21 visible + 5 none) - optional-transformers-dependency: onnxruntime-node ~1.24.3 -> ~1.27.0 (bump diegosouzapw#10382) - stryker.conf.json: register chatcore-header-drop-warn-dedupe-10315 test - check-public-creds: freeze zcodeProtocol clientId false positive (client identifier, not a credential)
…#9654) (#10039) * feat(admission): per-target lane-aware probes for combo/fusion fan-out (#9654 Wave 2) Combo and fusion fan out N targets without ever consulting the adaptive-admission layer: the parent request holds one lease, but each fan-out target is dispatched unconditionally. With virtual lanes enabled (OMNIROUTE_CHAT_VIRTUAL_LANES=1), a connection whose lane queue is full now SKIPS additional fan-out targets instead of piling more queued work onto an already-congested session. Adds PerTargetAdmissionHook (admission/types.ts) + createPerTargetAdmissionHook factory (chatAdmission.ts): strictly non-blocking (maxWaitMs 0 - skip, never queue), a no-op when virtual lanes are off, keyed to the parent tenantKey, and release-on-admit so the probe is a capacity gate, not a hold. Threaded through every parallel fan-out path: - priority/weighted executeTarget + round-robin skip chains (combo.ts) - fusion panel before fan-out (fusion.ts), judge fallback prefers survivors - chaos parallel panel (autoCombo/chaosEngine.ts) - tryFusionDispatch / tryRuntimeUnitDispatch / buildBaseOptions (dispatchPrelude.ts) - chat.ts primary + safety-net redirect call sites Snapshot exposes virtualLanes so the no-op gate is cheap and honest. Tests: tests/unit/combo-lane-awareness-9654.test.ts (10 tests) - factory semantics, priority/RR skip, fusion panel drop + all-skipped 503, no-hook backward-compat baseline. * feat(flags): activation UX - env-wins adaptive virtual-lanes flag + env docs (#9654 Wave 2) U7: make adaptive virtual admission lanes discoverable + activatable. - New OMNIROUTE_CHAT_VIRTUAL_LANES feature flag (boolean/runtime/requiresRestart) in featureFlagDefinitions + en.json i18n key. - lib/admissionVirtualLanes.ts: env-wins resolver (env > DB > default) + boot warm folding a DB-sourced override into the process-global runtime env via reloadAdaptiveAdmissionRuntime(options.env) - no process.env mutation, no open-sse changes. Env still wins; DB toggle gates at next boot. - GET /api/settings/feature-flags special-cases the flag to report the gate true source (ccDiscoveryAliases precedent); flagPayload helper dedupes the payload shape. - Wire the warm into instrumentation-node registerNodejs (non-fatal, DB-ready). - Document the master switch in .env.example + ENVIRONMENT.md with the system-1/system-2 distinction; zero new env-doc-sync drift. - 11 new tests (resolver precedence + warm); 60/60 across feature-flag suites; typecheck core clean; ESLint + doc gates green. * feat(mcp): surface adaptive admission lane data in omniroute_get_health (#9654 Wave 2) U8: make adaptive virtual-lane admission visible to agents via the MCP health tool. handleGetHealth now surfaces a curated adaptiveAdmission block from the health payload (which already carried the runtime snapshot but was dropping it): virtualLanes/pressure/utilization/laneCount/laneQueuedCount/laneQueuedCost, laneTenants capped at top-10 by queued cost, admitted/rejected/wouldReject counts, shutdown. Block omitted entirely when the health endpoint reports none. isLaneFlagOn mirrors the runtime 1|true convention so a string serialization can never invert a boolean lane report. getHealthOutput schema extended with the matching optional shape; tool description updated. 4 new dispatch tests (full block, top-10 cap/order, omission, defensive coercion of string flags + malformed lane entries) - 22/22 in essentialTools.test.ts. README: Adaptive Admission Lane Data table + Skills & Tool Navigability audit (29/43 schema entries covered, 14 undocumented, tool_search keyword runtime discovery, full catalog in docs/frameworks/MCP-SERVER.md). No new lint errors (4 pre-existing in server.ts), typecheck core clean, doc counts + fabricated-docs gates green. * docs: add changelog entry for #9654 Wave 2 (#10039) * fix(codeql): suppress js/insufficient-password-hash false positive in lane-key fingerprinting (#10039) resolveSessionId sha256-hashes bearer/x-api-key/x-goog-api-key to derive a deterministic, non-reversible per-key lane-bucket ID for virtual admission lanes (#9654). This is not password storage or verification, so the rule is a false positive; suppress it inline (same house style as src/lib/sync/tokens.ts) to clear the codeqlAlerts ratchet (2 > baseline 1) that blocks #10039 and every PR against release/v3.8.50. * docs(mcp): complete MCP server README tool reference (#10039) The MCP server README covered only 29 of the 43 schema entries, listing the remaining tools solely as a gap note with omniroute_tool_search as the runtime fallback. Add tool-reference tables for the agent-skills trio, oneproxy trio, web_fetch/web_search, tool_search, create_combo, set_routing_strategy, pick_fastest_model, sync_pricing, and db_health_check so the README covers the full schemas catalog, and fold the coverage note into the tool_search discovery paragraph. * fix(chat): drop unused correlationId from safety-net combo redirect (#10039) handleComboChat's HandleComboChatOptions has no correlationId member and the combo pipeline never consumes it; the property was copied from the handleSingleModelChat options shape by accident and introduced a new TS2353 under the open-sse workspace typecheck gate. * fix(i18n): translate featureFlagChatVirtualLanesEnabledDescription into 42 locales (#10039) en.json gained the flag description in this PR but the locale catalogs were never mirrored, failing the pt-BR key-parity (#6695) and vi completeness gates. Adds a real translation to every locale, keeping the zh-CN/zh-TW glossary canonical terms (提供者/儀表板) and no ICU drift. * chore(quality): ratchet open-sse-typecheck baseline down (#10039) The Wave 2 admission refactor removed 66 baselined open-sse type errors; re-freeze the baseline so the gate pins the new, tighter state. * docs: resync provider reference to 341 and CLI tools to 34 The release branch gained an 11th no-auth provider (freeaiapikey registry resync, #10233) and a 26th CLI Code tool without regenerating the auto-generated docs, leaving every PR against release/v3.8.50 failing the Docs Gates strict validator (code 341 vs doc 340, CLI 34 vs "33 tools"). Regenerate docs/reference/PROVIDER_REFERENCE.md and sync the provider/tool counts across README.md, AGENTS.md, llm.txt plus 42 i18n mirrors, package.json description, and the four diagram SVGs. * fix(tests): align count expectations with live catalogs (pre-existing release drift) Release/v3.8.50 currently fails five gates on its own tree; this PR inherits them. Fix the stale expectations to match live code: - feature-flags-settings: 48 -> 49 flags (Wave 2 adds OMNIROUTE_CHAT_VIRTUAL_LANES) - cli-tools-schema / cli-catalog-counts: 33 -> 34 tools (zcode added; 26 code = 21 visible + 5 none) - optional-transformers-dependency: onnxruntime-node ~1.24.3 -> ~1.27.0 (bump #10382) - stryker.conf.json: register chatcore-header-drop-warn-dedupe-10315 test - check-public-creds: freeze zcodeProtocol clientId false positive (client identifier, not a credential) * fix(tests): follow release's onnxruntime-node revert to ~1.24.3 release/v3.8.50's #10543 pinned onnxruntime-node back to ~1.24.3 after #10403's ~1.27.0 bump caused npm to nest a second native copy under @huggingface/transformers and broke the Docker SONAME contract. This PR's own drift-alignment commit (57b9c03) predates that revert and still expected ~1.27.0; the 3-way merge did not flag it as a textual conflict since only one side touched this exact line, but the merged tree became internally inconsistent (package.json ~1.24.3 vs test expecting ~1.27.0). Align the test with the now-canonical release value. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * fix(quality): dedupe stryker.conf.json chatcore-header-drop-warn-dedupe entry The 3-way merge applied both sides' insertion of the same test-file entry at different positions, producing a duplicate with broken indentation. Adopted release's clean version of the file. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Brandon Bennett <brandonbennett@macbookair.myfiosgateway.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: Brandon Bennett <branben@users.noreply.github.com>
…diegosouzapw#9654) (diegosouzapw#10039) * feat(admission): per-target lane-aware probes for combo/fusion fan-out (diegosouzapw#9654 Wave 2) Combo and fusion fan out N targets without ever consulting the adaptive-admission layer: the parent request holds one lease, but each fan-out target is dispatched unconditionally. With virtual lanes enabled (OMNIROUTE_CHAT_VIRTUAL_LANES=1), a connection whose lane queue is full now SKIPS additional fan-out targets instead of piling more queued work onto an already-congested session. Adds PerTargetAdmissionHook (admission/types.ts) + createPerTargetAdmissionHook factory (chatAdmission.ts): strictly non-blocking (maxWaitMs 0 - skip, never queue), a no-op when virtual lanes are off, keyed to the parent tenantKey, and release-on-admit so the probe is a capacity gate, not a hold. Threaded through every parallel fan-out path: - priority/weighted executeTarget + round-robin skip chains (combo.ts) - fusion panel before fan-out (fusion.ts), judge fallback prefers survivors - chaos parallel panel (autoCombo/chaosEngine.ts) - tryFusionDispatch / tryRuntimeUnitDispatch / buildBaseOptions (dispatchPrelude.ts) - chat.ts primary + safety-net redirect call sites Snapshot exposes virtualLanes so the no-op gate is cheap and honest. Tests: tests/unit/combo-lane-awareness-9654.test.ts (10 tests) - factory semantics, priority/RR skip, fusion panel drop + all-skipped 503, no-hook backward-compat baseline. * feat(flags): activation UX - env-wins adaptive virtual-lanes flag + env docs (diegosouzapw#9654 Wave 2) U7: make adaptive virtual admission lanes discoverable + activatable. - New OMNIROUTE_CHAT_VIRTUAL_LANES feature flag (boolean/runtime/requiresRestart) in featureFlagDefinitions + en.json i18n key. - lib/admissionVirtualLanes.ts: env-wins resolver (env > DB > default) + boot warm folding a DB-sourced override into the process-global runtime env via reloadAdaptiveAdmissionRuntime(options.env) - no process.env mutation, no open-sse changes. Env still wins; DB toggle gates at next boot. - GET /api/settings/feature-flags special-cases the flag to report the gate true source (ccDiscoveryAliases precedent); flagPayload helper dedupes the payload shape. - Wire the warm into instrumentation-node registerNodejs (non-fatal, DB-ready). - Document the master switch in .env.example + ENVIRONMENT.md with the system-1/system-2 distinction; zero new env-doc-sync drift. - 11 new tests (resolver precedence + warm); 60/60 across feature-flag suites; typecheck core clean; ESLint + doc gates green. * feat(mcp): surface adaptive admission lane data in omniroute_get_health (diegosouzapw#9654 Wave 2) U8: make adaptive virtual-lane admission visible to agents via the MCP health tool. handleGetHealth now surfaces a curated adaptiveAdmission block from the health payload (which already carried the runtime snapshot but was dropping it): virtualLanes/pressure/utilization/laneCount/laneQueuedCount/laneQueuedCost, laneTenants capped at top-10 by queued cost, admitted/rejected/wouldReject counts, shutdown. Block omitted entirely when the health endpoint reports none. isLaneFlagOn mirrors the runtime 1|true convention so a string serialization can never invert a boolean lane report. getHealthOutput schema extended with the matching optional shape; tool description updated. 4 new dispatch tests (full block, top-10 cap/order, omission, defensive coercion of string flags + malformed lane entries) - 22/22 in essentialTools.test.ts. README: Adaptive Admission Lane Data table + Skills & Tool Navigability audit (29/43 schema entries covered, 14 undocumented, tool_search keyword runtime discovery, full catalog in docs/frameworks/MCP-SERVER.md). No new lint errors (4 pre-existing in server.ts), typecheck core clean, doc counts + fabricated-docs gates green. * docs: add changelog entry for diegosouzapw#9654 Wave 2 (diegosouzapw#10039) * fix(codeql): suppress js/insufficient-password-hash false positive in lane-key fingerprinting (diegosouzapw#10039) resolveSessionId sha256-hashes bearer/x-api-key/x-goog-api-key to derive a deterministic, non-reversible per-key lane-bucket ID for virtual admission lanes (diegosouzapw#9654). This is not password storage or verification, so the rule is a false positive; suppress it inline (same house style as src/lib/sync/tokens.ts) to clear the codeqlAlerts ratchet (2 > baseline 1) that blocks diegosouzapw#10039 and every PR against release/v3.8.50. * docs(mcp): complete MCP server README tool reference (diegosouzapw#10039) The MCP server README covered only 29 of the 43 schema entries, listing the remaining tools solely as a gap note with omniroute_tool_search as the runtime fallback. Add tool-reference tables for the agent-skills trio, oneproxy trio, web_fetch/web_search, tool_search, create_combo, set_routing_strategy, pick_fastest_model, sync_pricing, and db_health_check so the README covers the full schemas catalog, and fold the coverage note into the tool_search discovery paragraph. * fix(chat): drop unused correlationId from safety-net combo redirect (diegosouzapw#10039) handleComboChat's HandleComboChatOptions has no correlationId member and the combo pipeline never consumes it; the property was copied from the handleSingleModelChat options shape by accident and introduced a new TS2353 under the open-sse workspace typecheck gate. * fix(i18n): translate featureFlagChatVirtualLanesEnabledDescription into 42 locales (diegosouzapw#10039) en.json gained the flag description in this PR but the locale catalogs were never mirrored, failing the pt-BR key-parity (diegosouzapw#6695) and vi completeness gates. Adds a real translation to every locale, keeping the zh-CN/zh-TW glossary canonical terms (提供者/儀表板) and no ICU drift. * chore(quality): ratchet open-sse-typecheck baseline down (diegosouzapw#10039) The Wave 2 admission refactor removed 66 baselined open-sse type errors; re-freeze the baseline so the gate pins the new, tighter state. * docs: resync provider reference to 341 and CLI tools to 34 The release branch gained an 11th no-auth provider (freeaiapikey registry resync, diegosouzapw#10233) and a 26th CLI Code tool without regenerating the auto-generated docs, leaving every PR against release/v3.8.50 failing the Docs Gates strict validator (code 341 vs doc 340, CLI 34 vs "33 tools"). Regenerate docs/reference/PROVIDER_REFERENCE.md and sync the provider/tool counts across README.md, AGENTS.md, llm.txt plus 42 i18n mirrors, package.json description, and the four diagram SVGs. * fix(tests): align count expectations with live catalogs (pre-existing release drift) Release/v3.8.50 currently fails five gates on its own tree; this PR inherits them. Fix the stale expectations to match live code: - feature-flags-settings: 48 -> 49 flags (Wave 2 adds OMNIROUTE_CHAT_VIRTUAL_LANES) - cli-tools-schema / cli-catalog-counts: 33 -> 34 tools (zcode added; 26 code = 21 visible + 5 none) - optional-transformers-dependency: onnxruntime-node ~1.24.3 -> ~1.27.0 (bump diegosouzapw#10382) - stryker.conf.json: register chatcore-header-drop-warn-dedupe-10315 test - check-public-creds: freeze zcodeProtocol clientId false positive (client identifier, not a credential) * fix(tests): follow release's onnxruntime-node revert to ~1.24.3 release/v3.8.50's diegosouzapw#10543 pinned onnxruntime-node back to ~1.24.3 after diegosouzapw#10403's ~1.27.0 bump caused npm to nest a second native copy under @huggingface/transformers and broke the Docker SONAME contract. This PR's own drift-alignment commit (57b9c03) predates that revert and still expected ~1.27.0; the 3-way merge did not flag it as a textual conflict since only one side touched this exact line, but the merged tree became internally inconsistent (package.json ~1.24.3 vs test expecting ~1.27.0). Align the test with the now-canonical release value. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * fix(quality): dedupe stryker.conf.json chatcore-header-drop-warn-dedupe entry The 3-way merge applied both sides' insertion of the same test-file entry at different positions, producing a duplicate with broken indentation. Adopted release's clean version of the file. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Brandon Bennett <brandonbennett@macbookair.myfiosgateway.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: Brandon Bennett <branben@users.noreply.github.com>
…diegosouzapw#9654) (diegosouzapw#10039) * feat(admission): per-target lane-aware probes for combo/fusion fan-out (diegosouzapw#9654 Wave 2) Combo and fusion fan out N targets without ever consulting the adaptive-admission layer: the parent request holds one lease, but each fan-out target is dispatched unconditionally. With virtual lanes enabled (OMNIROUTE_CHAT_VIRTUAL_LANES=1), a connection whose lane queue is full now SKIPS additional fan-out targets instead of piling more queued work onto an already-congested session. Adds PerTargetAdmissionHook (admission/types.ts) + createPerTargetAdmissionHook factory (chatAdmission.ts): strictly non-blocking (maxWaitMs 0 - skip, never queue), a no-op when virtual lanes are off, keyed to the parent tenantKey, and release-on-admit so the probe is a capacity gate, not a hold. Threaded through every parallel fan-out path: - priority/weighted executeTarget + round-robin skip chains (combo.ts) - fusion panel before fan-out (fusion.ts), judge fallback prefers survivors - chaos parallel panel (autoCombo/chaosEngine.ts) - tryFusionDispatch / tryRuntimeUnitDispatch / buildBaseOptions (dispatchPrelude.ts) - chat.ts primary + safety-net redirect call sites Snapshot exposes virtualLanes so the no-op gate is cheap and honest. Tests: tests/unit/combo-lane-awareness-9654.test.ts (10 tests) - factory semantics, priority/RR skip, fusion panel drop + all-skipped 503, no-hook backward-compat baseline. * feat(flags): activation UX - env-wins adaptive virtual-lanes flag + env docs (diegosouzapw#9654 Wave 2) U7: make adaptive virtual admission lanes discoverable + activatable. - New OMNIROUTE_CHAT_VIRTUAL_LANES feature flag (boolean/runtime/requiresRestart) in featureFlagDefinitions + en.json i18n key. - lib/admissionVirtualLanes.ts: env-wins resolver (env > DB > default) + boot warm folding a DB-sourced override into the process-global runtime env via reloadAdaptiveAdmissionRuntime(options.env) - no process.env mutation, no open-sse changes. Env still wins; DB toggle gates at next boot. - GET /api/settings/feature-flags special-cases the flag to report the gate true source (ccDiscoveryAliases precedent); flagPayload helper dedupes the payload shape. - Wire the warm into instrumentation-node registerNodejs (non-fatal, DB-ready). - Document the master switch in .env.example + ENVIRONMENT.md with the system-1/system-2 distinction; zero new env-doc-sync drift. - 11 new tests (resolver precedence + warm); 60/60 across feature-flag suites; typecheck core clean; ESLint + doc gates green. * feat(mcp): surface adaptive admission lane data in omniroute_get_health (diegosouzapw#9654 Wave 2) U8: make adaptive virtual-lane admission visible to agents via the MCP health tool. handleGetHealth now surfaces a curated adaptiveAdmission block from the health payload (which already carried the runtime snapshot but was dropping it): virtualLanes/pressure/utilization/laneCount/laneQueuedCount/laneQueuedCost, laneTenants capped at top-10 by queued cost, admitted/rejected/wouldReject counts, shutdown. Block omitted entirely when the health endpoint reports none. isLaneFlagOn mirrors the runtime 1|true convention so a string serialization can never invert a boolean lane report. getHealthOutput schema extended with the matching optional shape; tool description updated. 4 new dispatch tests (full block, top-10 cap/order, omission, defensive coercion of string flags + malformed lane entries) - 22/22 in essentialTools.test.ts. README: Adaptive Admission Lane Data table + Skills & Tool Navigability audit (29/43 schema entries covered, 14 undocumented, tool_search keyword runtime discovery, full catalog in docs/frameworks/MCP-SERVER.md). No new lint errors (4 pre-existing in server.ts), typecheck core clean, doc counts + fabricated-docs gates green. * docs: add changelog entry for diegosouzapw#9654 Wave 2 (diegosouzapw#10039) * fix(codeql): suppress js/insufficient-password-hash false positive in lane-key fingerprinting (diegosouzapw#10039) resolveSessionId sha256-hashes bearer/x-api-key/x-goog-api-key to derive a deterministic, non-reversible per-key lane-bucket ID for virtual admission lanes (diegosouzapw#9654). This is not password storage or verification, so the rule is a false positive; suppress it inline (same house style as src/lib/sync/tokens.ts) to clear the codeqlAlerts ratchet (2 > baseline 1) that blocks diegosouzapw#10039 and every PR against release/v3.8.50. * docs(mcp): complete MCP server README tool reference (diegosouzapw#10039) The MCP server README covered only 29 of the 43 schema entries, listing the remaining tools solely as a gap note with omniroute_tool_search as the runtime fallback. Add tool-reference tables for the agent-skills trio, oneproxy trio, web_fetch/web_search, tool_search, create_combo, set_routing_strategy, pick_fastest_model, sync_pricing, and db_health_check so the README covers the full schemas catalog, and fold the coverage note into the tool_search discovery paragraph. * fix(chat): drop unused correlationId from safety-net combo redirect (diegosouzapw#10039) handleComboChat's HandleComboChatOptions has no correlationId member and the combo pipeline never consumes it; the property was copied from the handleSingleModelChat options shape by accident and introduced a new TS2353 under the open-sse workspace typecheck gate. * fix(i18n): translate featureFlagChatVirtualLanesEnabledDescription into 42 locales (diegosouzapw#10039) en.json gained the flag description in this PR but the locale catalogs were never mirrored, failing the pt-BR key-parity (diegosouzapw#6695) and vi completeness gates. Adds a real translation to every locale, keeping the zh-CN/zh-TW glossary canonical terms (提供者/儀表板) and no ICU drift. * chore(quality): ratchet open-sse-typecheck baseline down (diegosouzapw#10039) The Wave 2 admission refactor removed 66 baselined open-sse type errors; re-freeze the baseline so the gate pins the new, tighter state. * docs: resync provider reference to 341 and CLI tools to 34 The release branch gained an 11th no-auth provider (freeaiapikey registry resync, diegosouzapw#10233) and a 26th CLI Code tool without regenerating the auto-generated docs, leaving every PR against release/v3.8.50 failing the Docs Gates strict validator (code 341 vs doc 340, CLI 34 vs "33 tools"). Regenerate docs/reference/PROVIDER_REFERENCE.md and sync the provider/tool counts across README.md, AGENTS.md, llm.txt plus 42 i18n mirrors, package.json description, and the four diagram SVGs. * fix(tests): align count expectations with live catalogs (pre-existing release drift) Release/v3.8.50 currently fails five gates on its own tree; this PR inherits them. Fix the stale expectations to match live code: - feature-flags-settings: 48 -> 49 flags (Wave 2 adds OMNIROUTE_CHAT_VIRTUAL_LANES) - cli-tools-schema / cli-catalog-counts: 33 -> 34 tools (zcode added; 26 code = 21 visible + 5 none) - optional-transformers-dependency: onnxruntime-node ~1.24.3 -> ~1.27.0 (bump diegosouzapw#10382) - stryker.conf.json: register chatcore-header-drop-warn-dedupe-10315 test - check-public-creds: freeze zcodeProtocol clientId false positive (client identifier, not a credential) * fix(tests): follow release's onnxruntime-node revert to ~1.24.3 release/v3.8.50's diegosouzapw#10543 pinned onnxruntime-node back to ~1.24.3 after diegosouzapw#10403's ~1.27.0 bump caused npm to nest a second native copy under @huggingface/transformers and broke the Docker SONAME contract. This PR's own drift-alignment commit (57b9c03) predates that revert and still expected ~1.27.0; the 3-way merge did not flag it as a textual conflict since only one side touched this exact line, but the merged tree became internally inconsistent (package.json ~1.24.3 vs test expecting ~1.27.0). Align the test with the now-canonical release value. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * fix(quality): dedupe stryker.conf.json chatcore-header-drop-warn-dedupe entry The 3-way merge applied both sides' insertion of the same test-file entry at different positions, producing a duplicate with broken indentation. Adopted release's clean version of the file. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: Brandon Bennett <brandonbennett@macbookair.myfiosgateway.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: Brandon Bennett <branben@users.noreply.github.com>
What
Stage 7 of the #10321 desktop efficiency roadmap: the optional ML and browser automation dependency closures stop shipping inside the desktop bundle. Packaging now stages them as checksummed, versioned packs that users install on demand via the new
omniroute packscommand group.Packs
ml-runtime@huggingface/transformers,onnxruntime-node,@atjsh/llmlingua-2,@tensorflow/tfjs,js-tiktokenbrowser-runtimeplaywright,playwright-coreMembership lives in the manifest; exact versions resolve at packaging time into
optional-packs.index.json(per-member streaming sha256), so dependency bumps never need a manifest edit.Changes
scripts/build/optionalPackStaging.mjs— manifest-driven staging pass that relocates pack members out of the Electron standalone tree into.build/optional-packs/(dirs + gzip tarballs) and emitsoptional-packs.index.jsonat the bundle root. Fails open per member so a missing optional dep never breaks packaging. Wired inprepare-electron-standalone.mjsafter the native-module steps.scripts/packs/optionalPackManifest.mjs— pack definitions, streaming directory checksums, index-entry build/verify.scripts/packs/optionalPackInstaller.mjs— atomic install/remove/verify against the shipped index (tarball-first, staging-dir fallback, temp-dir + rename swap).bin/cli/commands/packs.mjs—omniroute packs list | install <name> | verify [name] | remove <name>(+ en locale strings).open-sse/utils/optionalPacks.ts— runtime presence probes (DATA_DIR/optional-packs/<name>/node_modules); the LLMLingua worker gate now also probes installed pack trees before reporting the engine unavailable.electron/main.js— prepends installed packnode_modulesdirs to the spawned server NODE_PATH, so packs resolve at runtime without living in the bundle.Why
node_modules(57%):@tensorflow272 MB,onnxruntime-node210 MB,js-tiktoken21 MB,playwright+playwright-core24 MB,@huggingface7.7 MB.omniroute packs install ml-runtimerestores the exact shipped bits (checksum-verified) without re-downloading the app, and runtime behavior for users who never install packs is unchanged — LLMLingua and web executors already degrade gracefully when their deps are absent.Evidence
ml-runtimemember expressed asnode_modules/@atjsh/llmlingua-2/package.jsonfailed before the fix because the helper already roots lookups at the packnode_modulesdirectory.omniroute packs --helprenders all four subcommands; Prettier andgit diff --checkpass.Windows x64 checkpoint
The original physical Windows run passed member-version/SHA-256 index construction, the CLI list/install/verify/remove lifecycle, packless routing, and focused tests. It exposed the LLMLingua
node_modules/node_moduleslookup fixed by this amended PR. The actual installed-pack Windows worker probe against the amended head remains pending; the first-use UI flow and broader platform/architecture matrix remain follow-up gates.Reviewer notes
node_modulespath segment and leaves already-relative member paths unchanged.