Commit Graph

4621 Commits

Author SHA1 Message Date
Diego Rodrigues de Sa e Souza
5cb3cf8843 fix(providers): Vercel AI Gateway import lists the live /v1/models catalog (#4249) (#4254) 2026-06-19 02:32:49 -03:00
Diego Rodrigues de Sa e Souza
1079fc36f0 feat(cloud-agent): Cursor Cloud Agent via official REST API key (#4227) (#4250)
Integrated into release/v3.8.29 — Cursor Cloud Agent (cursor-cloud) via official api.cursor.com REST API key, 4th cloud agent mirroring Devin/Jules.

Pre-merge work done on the PR branch (fix-in-place):
- Wired cursor-cloud into the dashboard UI (CLOUD_AGENTS dropdown), health PROVIDER_NAMES, and lobeProviderIcons — it was API-usable but not selectable in the UI and rendered with the Jules fallback.
- Fixed cloud-agent-health-api.test.ts which asserted exactly 3 agents (the PR added a 4th) -> updated count/order + added cursor-cloud coverage.
- file-size baseline: page.tsx 913->922.

FOLLOW-UP (Rule #18): the REST endpoint paths/field names follow Cursor's documented Cloud Agents v0 API but still need a live validation run against a real Cursor API key. The integration is additive/opt-in and baseUrl is overridable per-credential, so any path/version correction needs no code change. Thanks @MRDGH2821 for the issue (#4227).
2026-06-19 02:21:59 -03:00
Diego Rodrigues de Sa e Souza
3bc1a0f6de refactor(compression): remove vestigial SLM seam + dead deprecated alias (#4253)
Integrated into release/v3.8.29 — remove vestigial SLM seam (createSLMStub/SLMInterface) + dead estimateTokensForStats alias. Validated: ultra.test.ts 39/39 green, zero code callers of the removed symbols.
2026-06-19 02:21:36 -03:00
Diego Rodrigues de Sa e Souza
f06e63f818 feat(api): cost-telemetry parity — X-OmniRoute-* headers em todos os endpoints + motor de custo não-token (#4247)
Integrated into release/v3.8.29 (baseline reconciled: chatCore 5111, combo 2605)
2026-06-19 01:46:15 -03:00
Diego Rodrigues de Sa e Souza
cb3119ce43 fix(providers): GPT-5 Codex/OpenAI param gaps — conditional sampling strip + verbosity passthrough (#4245)
Integrated into release/v3.8.29 (baseline reconciled)
2026-06-19 01:40:20 -03:00
Diego Rodrigues de Sa e Souza
32c2ee8a16 feat(compression): add a transcript loader to the replay harness (#4246)
Integrated into release/v3.8.29
2026-06-19 01:37:26 -03:00
Diego Rodrigues de Sa e Souza
e5cf67c0c2 feat(compression): honor the registry enabled flag in the stacked loop (#4244)
Integrated into release/v3.8.29
2026-06-19 01:37:22 -03:00
Diego Rodrigues de Sa e Souza
03141b19e0 feat(compression): wire RTK comment-stripping config + honor preserveDocstrings (#4242)
Integrated into release/v3.8.29
2026-06-19 01:37:18 -03:00
Diego Rodrigues de Sa e Souza
ebd341edf3 feat(routing): OpenRouter-style auto/<category>:<tier> combos (#4235) (#4248) 2026-06-19 01:22:56 -03:00
Diego Rodrigues de Sa e Souza
92eac63f1f feat(compression): expose the WaterfallInspector via a Canvas/Waterfall toggle (#4238)
Integrated into release/v3.8.29
2026-06-19 01:20:31 -03:00
Diego Rodrigues de Sa e Souza
60c32f9a07 feat(compression): make mcpAccessibility config reachable via settings sub-route (#4237)
Integrated into release/v3.8.29
2026-06-19 01:20:27 -03:00
Diego Rodrigues de Sa e Souza
86c9c46c85 feat(routing): advertise auto/cheap, auto/offline, auto/smart combos (#4235) (#4243) 2026-06-19 00:45:50 -03:00
Diego Rodrigues de Sa e Souza
35166dcfe3 feat(quality): Onda 2 mutation-gate tooling — radiography classifier (T1) + mutationScore ratchet (T3) (#4234)
Integrated into release/v3.8.29
2026-06-19 00:01:48 -03:00
Diego Rodrigues de Sa e Souza
5847610cc7 feat(ci): wire the F2.4 compression budget-gate ratchet (#4232)
Integrated into release/v3.8.29
2026-06-19 00:01:25 -03:00
Diego Rodrigues de Sa e Souza
910a202e79 chore(build): build + ship the TPROXY native addon in the standalone (prebuilds 4e) (#4236)
Integrated into release/v3.8.29
2026-06-19 00:01:21 -03:00
Diego Rodrigues de Sa e Souza
291103513e fix(dashboard): data tables paint an opaque surface so the grid doesn't bleed through (#4233)
Integrated into release/v3.8.29
2026-06-19 00:01:17 -03:00
Diego Rodrigues de Sa e Souza
48773face6 fix(combo): opt proactive-fallback compression into TV1 bail-out (no silent target drop) (#4228)
Integrated into release/v3.8.29 (opt proactive-fallback compression into TV1 bail-out; baseline combo.ts 2597->2601).
2026-06-18 23:48:56 -03:00
Diego Rodrigues de Sa e Souza
89824fb0d3 feat(compression): honor the per-filter RTK deduplicate flag (#4231)
Integrated into release/v3.8.29 (honor per-filter RTK deduplicate flag).
2026-06-18 23:48:10 -03:00
Diego Rodrigues de Sa e Souza
7f4d5f1969 fix(mitm): forward anti-loop — put the bypass-marked socket on the Agent (decrypt 4d) (#4229)
Integrated into release/v3.8.29 (MITM TPROXY decrypt 4d — forward anti-loop: bypass-marked socket on the Agent; VPS-validated).
2026-06-18 23:32:37 -03:00
Diego Rodrigues de Sa e Souza
a044246f9b fix(sse): adapt the Claude flow to Opus 4.7+ adaptive-thinking + fixed-sampling contract (#4230)
* feat(sse): adapt the Claude flow to Opus 4.7+ adaptive-thinking + fixed-sampling contract

Claude Opus 4.7 and later (Opus 4.7/4.8, Fable 5) changed the Messages API contract:
manual extended thinking was removed (`thinking.type:"enabled"` or ANY `budget_tokens`
returns 400 — adaptive-only, steered by `output_config.effort`) and non-default
`temperature`/`top_p`/`top_k` now return 400 (sampling is fixed). OmniRoute still emitted
both shapes, so OpenAI-format `reasoning_effort` low/medium/high and any client-supplied
sampling param could hard-400 on the most-used provider.

- modelSpecs: new `adaptiveThinkingOnly` flag + `isAdaptiveThinkingOnly()` on opus-4-7/4-8/fable-5
- translator: `reasoning_effort` (every level) -> adaptive + `output_config.effort` for those models
- chatCore: `normalizeClaudeAdaptiveThinking` catch-all collapses residual manual thinking
  (passthrough legacy shape / per-model defaults) to `{type:"adaptive"}`, keyed on the model
- registry: strip `temperature`/`top_p`/`top_k` for opus-4-7/4-8/fable-5 (claude + anthropic ids)

Pre-4.7 models (Opus 4.6/4.5, Sonnet, Haiku) keep manual budgets and sampling params.
TDD: +27 cases (adaptive-thinking-normalize, sampling-params, translator). typecheck/lint/file-size green.

* docs(changelog): note Claude Opus 4.7+ adaptive-thinking + fixed-sampling fixes (#4230)
2026-06-18 23:28:34 -03:00
Diego Rodrigues de Sa e Souza
8b73b37d09 chore(compression): remove vestigial reconstructCcr/SessionDedup round-trip helpers (#4226)
Integrated into release/v3.8.29 (remove vestigial reconstructCcr/reconstructSessionDedup round-trip helpers).
2026-06-18 23:10:12 -03:00
Diego Rodrigues de Sa e Souza
90c4224c9c test(chatcore): semanticCache HIT-path fixture + wire into stryker mutate (15/15 leaves) (#4225)
Integrated into release/v3.8.29 (semanticCache HIT-path fixture + stryker 15/15 chatCore leaves).
2026-06-18 23:10:09 -03:00
Diego Rodrigues de Sa e Souza
0e95c45a5e feat(sse): adapt the Xiaomi MiMo call flow to its native thinking/vision contract (#4224)
Integrated into release/v3.8.29 (Xiaomi MiMo native thinking/vision contract; baseline chatCore.ts 5086->5095).
2026-06-18 22:36:19 -03:00
Diego Rodrigues de Sa e Souza
afc1a163d3 chore(compression): remove dead exports + fix stale llmlingua docs (#4223)
Integrated into release/v3.8.29 (remove dead compression exports + fix stale llmlingua docs).
2026-06-18 22:36:17 -03:00
Diego Rodrigues de Sa e Souza
90507a8a82 test(chatcore): tests for telemetry/memory-skills/semantic-cache + wire 2 into stryker (QG v2 Fase 9 T5 Fase 3) (#4222)
Integrated into release/v3.8.29 (QG v2 Fase 9 T5 Fase 3 — last 3 chatCore leaf tests + stryker batch i).
2026-06-18 22:36:14 -03:00
Diego Rodrigues de Sa e Souza
eef9d203fb feat(compression): wire MCP tool-cardinality reduction (F4.3, opt-in) (#4221)
Integrated into release/v3.8.29 (F4.3 opt-in MCP tool-cardinality reduction; baseline rebaselined server.ts 1458->1468).
2026-06-18 22:03:08 -03:00
Diego Rodrigues de Sa e Souza
2089e5cce9 feat(compression): runnable A/B benchmark CLI (F2.4) (#4220)
Integrated into release/v3.8.29 (F2.4 runnable compression A/B benchmark CLI).
2026-06-18 21:55:52 -03:00
Diego Rodrigues de Sa e Souza
f19d4b585b fix(sse): map reasoning_effort to DeepSeek V4's native {high, max} vocabulary (#4219)
Integrated into release/v3.8.29 (DeepSeek V4 native reasoning_effort {high,max} mapping).
2026-06-18 21:25:04 -03:00
Diego Rodrigues de Sa e Souza
7d89c189f2 test(chatcore): dedicated unit tests for 6 leaves + wire into stryker mutate (QG v2 Fase 9 T5 Fase 3) (#4218)
Integrated into release/v3.8.29 (QG v2 Fase 9 T5 Fase 3 — dedicated leaf unit tests + stryker batch h).
2026-06-18 21:25:01 -03:00
Diego Rodrigues de Sa e Souza
9a358c8ffc feat(compression): live per-engine streaming via compression.step (F3.3) (#4217)
Integrated into release/v3.8.29 (F3.3 live per-engine compression streaming; baseline rebaselined chatCore.ts 5063->5086).
2026-06-18 21:17:12 -03:00
Diego Rodrigues de Sa e Souza
5f93ae7dd4 feat(dashboard): TPROXY decrypt capture toggle in Traffic Inspector (4c/N) (#4216)
Integrated into release/v3.8.29 (round 8)
2026-06-18 20:50:17 -03:00
Diego Rodrigues de Sa e Souza
d055b5b8fc fix(dashboard): make provider card hover visible (was ~invisible 1% opacity) (#4214)
Integrated into release/v3.8.29 (round 8)
2026-06-18 20:50:14 -03:00
Diego Rodrigues de Sa e Souza
fe548212a4 docs(api): document /api/v1/ws chat WebSocket endpoint in openapi.yaml (#4215)
Integrated into release/v3.8.29 (round 8)
2026-06-18 20:50:12 -03:00
Diego Rodrigues de Sa e Souza
1cdbf73925 feat(compression): show an engine node for single-engine runs in the studio (#4210)
Integrated into release/v3.8.29 (round 7). Studio shows a real engine node for single-engine compression runs via ensureEngineBreakdown (new pure leaf engineBreakdown.ts). Reconciled the file-size baseline (chatCore.ts 5060->5063) + union-merged with the #4202 zenmux rebaseline key after release drift. Validated locally: file-size gate OK + 3/3 tests + typecheck:core clean.
2026-06-18 20:23:01 -03:00
Diego Rodrigues de Sa e Souza
6a64bad16b fix(providers): ZenMux model discovery serves the live catalog incl. free models (#4202) (#4213) 2026-06-18 20:20:45 -03:00
Diego Rodrigues de Sa e Souza
cfc2bc707b feat(dashboard): derive media serviceKinds from registries (surface MiniMax + media catalog) (#4212)
Integrated into release/v3.8.29 (round 7). Media serviceKinds derived from backend registries (single source of truth) unioned with declared kinds; listing + detail pages use the same resolver (no 'listed but 404'). Surfaces MiniMax (tts/video/music) + ~48 previously-invisible media providers. Validated locally: 6/6 tests + typecheck:core clean.
2026-06-18 20:19:00 -03:00
Diego Rodrigues de Sa e Souza
12124aaad8 feat(mitm): local-only route + trust-store installer for TPROXY decrypt (4b/N) (#4211)
Integrated into release/v3.8.29 (round 7). TPROXY decrypt 4b/N: local-only route (/api/tools/agent-bridge/tproxy, LOCAL_ONLY per routeGuard) + dedicated trust-store CA installer (execFileWithPassword, no shell). Validated locally: 12/12 tests + typecheck:core clean (test-unit does not run on release PRs).
2026-06-18 20:18:01 -03:00
Diego Rodrigues de Sa e Souza
8a0863c5a8 chore(ci): add quota + 6 covered chatCore leaves to stryker mutate (QG v2 Fase 9 T5 Fase 3 follow-up) (#4209)
Integrated into release/v3.8.29 (round 7). CI-only: stryker mutate += quotaScoring/quotaStrategies (batch f) + 6 covered chatCore leaves (batch g); nightly matrix 5->7 batches. Follow-up to #4205/#4204.
2026-06-18 20:16:47 -03:00
Diego Rodrigues de Sa e Souza
4c6cb45a6a feat(mitm): TPROXY capture-mode manager (decrypt 4a/N) (#4208)
Singleton lifecycle around the decrypt-capable transparent listener (#4200):
builds the dynamic CA (#4173), gates on native-addon availability, holds the
single running handle, counts interceptions, and exposes start / stop / status
for a local-only route (4b) to drive.

The OS trust-store mechanism is deliberately not baked in: installCa / uninstallCa
are injected by the caller (the route / VPS e2e provides the real installer, which
needs its own trust-store slot so it does not clobber the static MITM cert). The
manager therefore never mutates the trust store itself and stays unit-testable
without root or the native addon.

- startCaptureMode: rejects when unavailable or already running; builds the CA;
  wires the injected installCa/uninstallCa through to the decrypt listener.
- stopCaptureMode: stops the handle (close + uninstall CA + revert), idempotent.
- getCaptureStatus: running / available / startedAt / interceptCount / onPort.

Route + real trust-store installer + Traffic Inspector UI tab + VPS
e2e-with-decrypt + addon prebuilds follow (4b+).
2026-06-18 19:21:16 -03:00
Diego Rodrigues de Sa e Souza
4fecb34ac6 fix(compression): bound mcpAccessibility maxTextChars on the live read path (#4206)
* fix(compression): bound mcpAccessibility maxTextChars on the live read path

smartFilterText reserves 300 chars for the truncation tail, so a maxTextChars at/below that
makes headSize <= 0 and the whole tool result is replaced by the notice (total data loss). Two
gaps let a bad value reach the engine: the DB normalizer floored maxTextChars only at > 0, and
the live MCP-server read path (readMcpAccessibilityConfig) did a raw {...DEFAULT, ...parsed}
spread with no bounding at all.

Centralize the floors in a shared clampMcpAccessibilityConfig (engine layer) used by both the DB
normalizer and the server read path; values in (0, 600) fall back to the default. Export the
tail-reserve constant (300) and use it in smartFilterText so the engine and the bounds stay in
sync. The F5.3 headSize >= 0 clamp stays as a second layer.

Defense-in-depth today (the config isn't writable via the settings API yet — making it
configurable is a tracked follow-up in the compression-completeness work); this closes the
data-loss path for when it lands.

Part of the compression "100% functional" program (audit follow-up).

* chore(quality): bump server.ts file-size baseline 1457->1458 (#4206 +1 import)
2026-06-18 19:14:13 -03:00
Diego Rodrigues de Sa e Souza
aed2a5024c feat(compression): persist RTK grouping config (unlock R5 enableGrouping) (#4207)
The RTK R5 grouping strategy (collapse near-equivalent consecutive lines) is read by the
engine (config.enableGrouping / groupingThreshold) but was unreachable in production: the
rtkConfigSchema (.strict()) rejected the two fields on write and normalizeRtkConfig dropped
them on read, so they could never be anything but undefined.

Add enableGrouping (bool) + groupingThreshold (int, 2..100, default 3) to DEFAULT_RTK_CONFIG,
normalizeRtkConfig, and rtkConfigSchema so the feature is actually settable and survives the
DB round-trip. Default stays OFF — no behavior change for existing configs.

Part of the compression "100% functional" program (audit follow-up).
2026-06-18 19:12:27 -03:00
Diego Rodrigues de Sa e Souza
8e921cab4b chore(ci): re-add 8 combo split leaves to stryker mutate + expand nightly batch-matrix 3->5 (QG v2 Fase 9 T5 Fase 3) (#4205) 2026-06-18 19:12:22 -03:00
Diego Rodrigues de Sa e Souza
b05bc7469e fix(compression): harden RTK raw-output redaction + ReDoS guard for custom filters (F5.3) (#4203)
* fix(compression): broaden RTK raw-output secret redaction (Basic/Proxy auth + keys)

F5.3 follow-up. SECRET_PATTERNS missed Authorization / Proxy-Authorization with
Basic (curl -v emits "Basic <base64>") and credential field names that don't
contain token/secret/password as a substring (private_key, access_key, credential).
Add a (Proxy-)Authorization Bearer|Basic pattern and broaden the key-name
alternation. All patterns are flat (no nested quantifiers → no ReDoS).

* fix(compression): drop ReDoS-prone patterns from custom RTK filters

F5.3 follow-up. Custom filters (DATA_DIR/rtk/filters.json) carry user-supplied
regex strings compiled and run against untrusted tool output; a nested unbounded
quantifier ((a+)+, (a*)*, ([a-z]+)+ …) can cause catastrophic backtracking.
validateRtkFilter now drops such patterns via a conservative, dependency-free
heuristic (isReDoSProne) applied to every regex-bearing array in the canonical and
legacy filter shapes. safe-regex would be ideal but is not installable in this
symlinked worktree; the heuristic catches the common single-group nested-quantifier
shapes and is itself linear.

Surfaced (not fixed here): a canonical pack filter omitting `preserve` crashes
validateRtkFilter because rtkFilterPreserveSchema.default({}) leaves the inner arrays
undefined — tracked as a pre-existing fragility.
2026-06-18 19:12:17 -03:00
Diego Rodrigues de Sa e Souza
565eb281a7 refactor(combo): extract reset-aware quota block to combo/quotaStrategies.ts (QG v2 Fase 9 T5 D7b) (#4204) 2026-06-18 19:12:07 -03:00
Diego Rodrigues de Sa e Souza
3135be8e7b feat(mitm): wire TLS decrypt engine into TPROXY capture mode (decrypt 3/N) (#4200)
Integrated into release/v3.8.29 — wire TLS decrypt engine into TPROXY capture (opt-in decrypt mode, symmetric CA install/uninstall). 9/9 tests.
2026-06-18 17:08:14 -03:00
Diego Rodrigues de Sa e Souza
9229ac757d feat(api): expand zai provider catalog with GLM-5.2 / GLM-4.7 (#4201)
Integrated into release/v3.8.29 — zai catalog GLM-5.2/4.7 base models (effort aliases stay on glm). 4/4 tests.
2026-06-18 17:08:10 -03:00
Diego Rodrigues de Sa e Souza
f06a90d37f refactor(combo): extract round-robin sticky state to combo/rrState.ts (QG v2 Fase 9 T5 D7a) (#4196)
Integrated into release/v3.8.29 — D7a round-robin sticky state extracted byte-identically to combo/rrState.ts; reconciled with #4194 (baseline combo.ts -> 3398, resolving the over-cap left by #4194).
2026-06-18 17:03:47 -03:00
Diego Rodrigues de Sa e Souza
7e534d6a86 fix(compression): harden engines against I/O failures and misconfig (F5.3) (#4198)
Integrated into release/v3.8.29 — F5.3 compression engine hardening (registry re-register, headSize clamp, RTK readdir/write guards). 9/9 tests.
2026-06-18 17:02:50 -03:00
Svetznaniy33
02146ab4e9 fix(combo): keep passthrough quota fallback scoped (#4194)
Integrated into release/v3.8.29 — reconciled onto post-split combo.ts (#4186); RED->GREEN validated. Thanks @Svetznaniy33.
2026-06-18 16:54:09 -03:00
Diego Rodrigues de Sa e Souza
487621046f refactor(chatcore): extract combo/proxy context cache + semaphore helpers (QG v2 Fase 9 T5 C6-C7) (#4193)
Integrated into release/v3.8.29 — reconciled with #4188 (chatCore split part A): both byte-identical extractions stacked; baseline chatCore.ts -> 5060.
2026-06-18 16:45:28 -03:00