Commit Graph

31330 Commits

Author SHA1 Message Date
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
0a9616caa8 fix(matrix): align extension-api source aliases 2026-04-14 18:03:26 +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
0a87707092 fix(matrix): normalize trusted wrapper bin hints 2026-04-14 17:58:58 +01:00
Vincent Koc
3745d5b135 fix(matrix): require trusted wrapper package roots 2026-04-14 17:55:07 +01:00
Vincent Koc
665a8496d7 fix(plugin-sdk): sort hashed root alias dist chunks 2026-04-14 17:53:10 +01:00
Vincent Koc
30073feb6f fix(matrix): sort safe wrapper sdk subpaths 2026-04-14 17:51:06 +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
OfflynAI
3a371a32e2 fix: filter telegram binary caption text (#66663) (thanks @joelnishanth)
* Telegram: filter binary content from msg.caption to prevent token explosion (#66647)

When a user sends a binary document (e.g. .mobi, .epub) via Telegram, raw
binary bytes can leak into msg.caption. getTelegramTextParts() passes this
through to the LLM prompt, causing catastrophic token explosion (~460K tokens).

Add isBinaryContent() that detects non-printable control characters (0x00-0x08,
0x0E-0x1F) and use it to sanitize the text in getTelegramTextParts() before it
reaches the prompt pipeline. When binary content is detected, the text and
entities are both replaced with empty values so the message is still processed
(media placeholder still works) but the binary junk is dropped.

Made-with: Cursor

* fix: distill telegram binary caption filtering

* fix: filter telegram binary caption text (#66663) (thanks @joelnishanth)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-14 22:14:50 +05:30
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
074efc94dc fix(matrix): align wrapper scoped sdk aliases 2026-04-14 17:41:32 +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
Ayaan Zaidi
daabbce9a0 refactor(openai): import base URL helpers directly 2026-04-14 21:52:16 +05:30
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
Onur Solmaz
27b14124d0 Release: move npm dist-tag ops private (#66660) 2026-04-14 18:18:27 +02:00
Vincent Koc
41d649c31a fix(plugins): share runtime boundary jiti cache helper 2026-04-14 17:17:58 +01:00
Ayaan Zaidi
8b404eccff test(openai): cover base URL helpers 2026-04-14 21:45:34 +05:30
Ayaan Zaidi
3624dda67d refactor(openai): isolate base URL helpers 2026-04-14 21:45:34 +05:30
Vincent Koc
b2b3bf35cd fix(openai): reuse canonical responses stream hooks 2026-04-14 17:14:53 +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
Vincent Koc
f366c38df8 fix(plugins): share loader jiti cache overrides 2026-04-14 17:07:41 +01:00
Jordan Brant Baker
b4e4f96fd5 fix: restore embedded-run param forwarding (#62675) (thanks @hexsprite)
* fix: forward optional params dropped at the runEmbeddedAttempt call site

runEmbeddedPiAgent in pi-embedded-runner/run.ts hand-enumerates ~85 fields
when calling runEmbeddedAttempt({...}). Several optional fields on
RunEmbeddedPiAgentParams were added to the type and to attempt.ts (the
consumer) but were never wired at this specific call site. Because every
field is declared as ?: optional on EmbeddedRunAttemptParams, TypeScript
does not flag the missing fields and the attempt silently receives
undefined for each.

Four fields were affected:

- toolsAllow (#58504, #62569): cron's --tools allow-list. Persisted in
  jobs.json by the CLI, forwarded by cron/isolated-agent/run-executor.ts
  to runEmbeddedPiAgent, but dropped here. Result: provider request
  ships the full tool catalog on every cron run regardless of toolsAllow,
  defeating the ~95% input-token reduction documented in #58504 and the
  --tools restriction documented in docs/automation/cron-jobs.md:85.

- disableMessageTool: cron/isolated-agent/run-executor.ts:164 sets it
  from toolPolicy.disableMessageTool, derived at run.ts:110 as
  `params.deliveryContract === "cron-owned" ? true : params.deliveryRequested`.
  Every cron-owned delivery (the default per docs) is supposed to disable
  the message tool so the runner owns the final delivery path. Without
  forwarding, the agent can call messaging tools mid-cron and cause
  duplicate or wrong-channel sends.

- requireExplicitMessageTarget: cron/isolated-agent/run-executor.ts:163
  sets it from toolPolicy.requireExplicitMessageTarget. Has a fallback at
  attempt.ts:568-569 to `?? isSubagentSessionKey(params.sessionKey)`, so
  non-subagent crons silently get false instead of the intended value.

- internalEvents: agents/command/attempt-execution.ts:478 passes it via
  params.opts.internalEvents. Different caller path from cron, but the
  same drop point. Internal events array silently dropped before reaching
  the consumer at attempt.ts:1480.

The fix is four lines in the runEmbeddedAttempt({...}) call, immediately
after the bootstrapContextMode/bootstrapContextRunKind lines added by
PR #62264 (which fixed two more fields with the identical pattern at the
same call site).

A regression test (run.attempt-param-forwarding.test.ts) covers all six
optional fields shown to have been bitten by this class of bug at this
seam. The next ?: optional field added to RunEmbeddedPiAgentParams without
wiring at the runEmbeddedAttempt call site will fail a test instead of
silently shipping broken — addressing the missing-guardrail concern PR
#60776's writeup explicitly noted.

Verified locally: 6/6 forwarding tests pass, 258 pi-embedded-runner/run*
tests pass, 176 cron/isolated-agent tests pass, oxlint and tsgo deltas
versus origin/main are zero.

Fixes #62569

* test: distill param forwarding guardrails

* fix: restore embedded-run param forwarding (#62675) (thanks @hexsprite)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-14 21:36:14 +05:30
Vincent Koc
3bb9e5f580 fix(plugin-sdk): share facade loader jiti cache plumbing 2026-04-14 17:03:44 +01:00
Vincent Koc
0d2a4b4fec fix(plugin-sdk): reuse cached plugin jiti loader helper 2026-04-14 17:01:52 +01:00
Vincent Koc
a7436c8b4a perf(plugins): split provider hook runtime seam 2026-04-14 17:01:05 +01:00
Vincent Koc
905b18530f fix(plugins): share cached plugin jiti loader config 2026-04-14 17:00:24 +01:00