Commit Graph

19516 Commits

Author SHA1 Message Date
Rohan Santhosh Kumar
bb14412e87 fix(reply): classify billing cooldown summaries (#66363)
Merged via squash.

Prepared head SHA: 8cfc42a7ac
Co-authored-by: Rohan5commit <181558744+Rohan5commit@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-14 23:35:04 +03:00
Agustin Rivera
62430d9f3a Harden MCP loopback request validation (#66665)
* fix(mcp): harden loopback request guards

* fix(commit): block staged user log

* Revert pre-commit USER.md guard from this PR

Out of scope for the MCP loopback hardening — keep this PR
focused on the loopback request gate and the bearer-comparison
fix. The pre-commit worklog guard can land separately if
maintainers want it.

* changelog: note MCP loopback constant-time + Origin guard (#66665)

* fix(mcp): allow loopback flows that browsers flag as cross-site

The previous Sec-Fetch-Site early-return rejected legit local
browser callers like a UI hosted on http://localhost:<ui-port>
talking to MCP on http://127.0.0.1:<mcp-port> — browsers report
that host mismatch as cross-site even though both ends are
loopback. checkBrowserOrigin already authorizes those via its
local-loopback matcher (loopback peer + loopback Origin host),
so route every Origin-bearing request through that helper and
let it decide. Native MCP clients (no Origin header) continue to
short-circuit through to the bearer check unchanged.

Adds a regression test asserting that
  origin: http://localhost:43123, sec-fetch-site: cross-site
from a loopback peer is accepted with a valid bearer.

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-14 14:32:05 -06:00
Gustavo Madeira Santana
82a2db71e8 refactor(qa): split Matrix QA into optional plugin (#66723)
Merged via squash.

Prepared head SHA: 27241bd089
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-14 16:28:57 -04:00
Agustin Rivera
472bcbbccc fix(agents): tighten workspace file opens (#66636)
* fix(agents): tighten workspace file opens

* fix(agents): clarify symlink rejection tests

* fix(agents): surface unsafe identity reads

* fix(agents): use non-blocking opens for identity reads and write-mode probes

* fix(fssafe): restore symlink read identity check

* fix(worklog): append comment resolution status

* fix(fssafe): close afterOpen handle leaks

* fix(worklog): append comment resolution follow-up

* fix(worklog): drop internal user file

* fix(agents): rethrow unexpected errors in agents.files.get

* changelog: note agents.files fs-safe routing + fd-first realpath (#66636)

* fix(agents): rethrow unexpected errors in agents.files.set too

Match the narrow-SafeOpenError catch pattern that agents.files.get
(commit 633b8f92) and writeWorkspaceFileOrRespond already use, so a
real OS error (ENOSPC, EACCES, EBUSY, ...) surfaces through normal
gateway error handling instead of being masked as
'unsafe workspace file'.

* test(agents): match fsStat/fsLstat mock signatures

The mock functions are declared as
  vi.fn(async (..._args: unknown[]) => Stats | null)
so mockImplementation callbacks must accept ...unknown[], not a
narrowed (filePath: string) argument. The narrower signature
works at runtime but trips tsgo's strict type check; switch to
args[0] unpacking so the callbacks match the hoisted mock shape.

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-14 14:06:15 -06:00
Vincent Koc
bd288e7683 test(agents): mock provider hook runtime in replay suites 2026-04-14 20:29:58 +01:00
Vincent Koc
34f9211e5c fix(plugin-sdk): fall back from dist facade overrides to source surfaces 2026-04-14 20:06:26 +01:00
Vincent Koc
c2a192a48a test(contracts): fix readonly sentinel matcher types 2026-04-14 19:45:11 +01:00
Vincent Koc
c7f08d19ea test(contracts): refresh plugin boundary expectations 2026-04-14 19:39:33 +01:00
Vincent Koc
95cdaf957b test(resilience): cover broken plugin startup and onboarding 2026-04-14 19:19:55 +01:00
darkamenosa
58a9905976 fix(onboard): normalize channel setup metadata (#66706)
thanks @darkamenosa
2026-04-14 19:11:52 +01:00
Vincent Koc
09d7f276cb test(agentic): align OpenAI replay id expectations 2026-04-14 18:58:23 +01:00
Vincent Koc
2aaa17dc6f fix(ci): restore main typecheck 2026-04-14 18:53:14 +01:00
chaoliang yan
e0d1810632 fix(failover): classify finish_reason: network_error as timeout (#61281) (#61784)
Merged via squash.

Prepared head SHA: f4ab2f9e0b
Co-authored-by: lawrence3699 <247479654+lawrence3699@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-14 20:42:16 +03:00
xiwuqi
7fbd31818b fix: classify invalid-model fallback errors (#50028)
Merged via squash.

Prepared head SHA: 04b13e09e1
Co-authored-by: xiwuqi <64734786+xiwuqi@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-14 20:32:29 +03:00
Vincent Koc
66e06b50ba perf(doctor): fast-path bundled channel compat migrations 2026-04-14 18:26:48 +01:00
Vincent Koc
088b41b04b perf(test): split doctor preflight mock modes 2026-04-14 18:18:46 +01:00
OpenCodeEngineer
17c4f62312 fix(agents): classify unknown-no-details Responses failures as unknown for failover (#65254)
Merged via squash.

Prepared head SHA: 92ed4381b6
Co-authored-by: OpenCodeEngineer <261470075+OpenCodeEngineer@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-14 20:13:55 +03:00
Vincent Koc
1898b2093f fix(plugin-sdk): widen root alias source candidates 2026-04-14 18:09:36 +01:00
Chunyue Wang
4bc46ccfed fix(gateway): cap compaction reserve floor to context window for small models (#65671)
Fixes #65465. Caps the compaction reserveTokensFloor so that at least min(8 000, 50%) of the context window remains available for
  prompt content, preventing the default 20 000-token floor from exceeding the entire context window on small-context local models (e.g. Ollama
  16K). The cap is only applied when contextTokenBudget is provided, preserving backward compatibility.
2026-04-15 01:08:11 +08:00
Vincent Koc
1169dd7039 perf(doctor): skip blocker scans without plugin disablement 2026-04-14 18:07:59 +01:00
Vincent Koc
2cab81d9a7 fix(plugins): widen plugin-sdk source alias candidates 2026-04-14 18:07:40 +01:00
Vincent Koc
6821b8bfaa fix(plugins): widen extension-api source alias candidates 2026-04-14 18:05:05 +01:00
Vincent Koc
3362cccc20 perf(doctor): skip redundant plugin legacy rescans 2026-04-14 18:02:30 +01:00
Vincent Koc
6b2d418973 fix(channels): resolve bundled plugin mts candidates 2026-04-14 18:01:44 +01:00
Michael Appel
acd4e0a32f fix(gateway): re-resolve HTTP auth per-request to honor credential rotation [AI] (#66651)
* fix: address issue

* fix: address review feedback

* changelog: note HTTP auth per-request rotation honor (#66651)

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-14 11:00:28 -06:00
Vincent Koc
665a8496d7 fix(plugin-sdk): sort hashed root alias dist chunks 2026-04-14 17:53:10 +01:00
Vincent Koc
16851e2d55 fix(plugin-sdk): sort safe root alias subpaths 2026-04-14 17:49:41 +01:00
Vincent Koc
e31dfa9897 perf(cli): avoid runtime config loads in gateway discover 2026-04-14 17:47:38 +01:00
Vincent Koc
4d6eeebda2 fix(plugin-sdk): share facade runtime jiti cache helper 2026-04-14 17:46:30 +01:00
Vincent Koc
5a9ee98419 fix(plugins): avoid redundant public surface jiti config reads 2026-04-14 17:43:24 +01:00
Vincent Koc
4c090accd3 perf(cli): avoid eager gateway call config loads 2026-04-14 17:42:16 +01:00
Vincent Koc
a80ecb9937 fix(plugin-sdk): align root alias scoped sdk map 2026-04-14 17:39:36 +01:00
Vincent Koc
604a5e07d0 perf(cli): lazy-resolve daemon stop fallback port 2026-04-14 17:39:21 +01:00
Gustavo Madeira Santana
f190bf0a07 Fix Matrix media alias normalization 2026-04-14 12:36:13 -04:00
Vincent Koc
7b05b4b68e fix(channels): share plugin module jiti cache helper 2026-04-14 17:35:44 +01:00
Vincent Koc
f8610da4c5 perf(cli): narrow daemon and gateway cold paths 2026-04-14 17:35:26 +01:00
Vincent Koc
9843a4f1fc fix(plugins): share source public surface resolver 2026-04-14 17:33:15 +01:00
Vincent Koc
f12d6bf3bb fix(plugins): share public surface source extensions 2026-04-14 17:29:44 +01:00
Ayaan Zaidi
1b73ce9193 test(wizard): use typed provider stubs 2026-04-14 21:57:13 +05:30
Vincent Koc
8d3bd4859e perf(whatsapp): add doctor contract fast path 2026-04-14 17:27:07 +01:00
Vincent Koc
87eac5377c fix(plugins): share runtime boundary alias builder 2026-04-14 17:26:45 +01:00
Vincent Koc
2f29a58b4e fix(plugin-sdk): share facade activation check candidate loader 2026-04-14 17:24:33 +01:00
slepybear
450c3a8ed2 fix(security): include Matrix avatar params in sandbox media normalization + preserve mxc:// URLs + log gmail watcher stop failures [AI-assisted] (#64701)
Merged via squash.

Prepared head SHA: 54de3f019b
Co-authored-by: slepybear <108438815+slepybear@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-14 12:22:29 -04:00
Vincent Koc
8fa63ac380 fix(plugins): share bundled public surface jiti cache scope 2026-04-14 17:20:59 +01:00
Vincent Koc
5c28cfbf09 perf(channels): add lightweight doctor contract APIs 2026-04-14 17:20:46 +01:00
Vincent Koc
41d649c31a fix(plugins): share runtime boundary jiti cache helper 2026-04-14 17:17:58 +01:00
Vincent Koc
eea7ba5345 fix(plugin-sdk): share canonical stream hook families 2026-04-14 17:13:31 +01:00
Tianworld
0bf3b84669 fix: avoid setup crash on missing provider ids (#66649) (thanks @Tianworld)
* fix(wizard): avoid trim crash on missing provider ids

Guard provider id comparisons in setup-mode model selection policy so setup does not crash when plugin provider metadata is missing an id.

Fixes #66641
Fixes #66619

Made-with: Cursor

* test: fix wizard provider-id regression coverage

* fix: avoid setup crash on missing provider ids (#66649) (thanks @Tianworld)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-14 21:41:47 +05:30
Vincent Koc
60ea8e9a1c fix(plugins): share bundled capability jiti cache path 2026-04-14 17:09:45 +01:00
Vincent Koc
34afe10b00 perf(config): skip duplicate channel legacy rule loads 2026-04-14 17:08:22 +01:00