Commit Graph

5189 Commits

Author SHA1 Message Date
Peter Steinberger dbaf4df493 test: drop pre-Gemini 3 from live model matrix 2026-04-08 02:19:23 +01:00
Peter Steinberger e80ae14771 test: speed up effective tools inventory test 2026-04-08 01:44:13 +01:00
Peter Steinberger ce07a38f0c test: trim config migration smoke coverage 2026-04-08 01:29:43 +01:00
Peter Steinberger 381d229699 Tests: type sessions send gateway mock 2026-04-08 01:18:01 +01:00
Josh Lehman 8359e5f584 fix: pass threadId through sessions_send announce delivery (#62758) 2026-04-07 17:11:33 -07:00
Peter Steinberger 51633fc13a fix: respect disabled heartbeat guidance 2026-04-08 00:51:13 +01:00
Peter Steinberger 4d3c72a521 fix: surface Claude CLI API errors 2026-04-08 00:44:50 +01:00
Peter Steinberger 259e9abbc5 Tests: align provider synthetic auth fixture 2026-04-08 00:43:55 +01:00
Peter Steinberger 7f508755a1 Tests: use timeout-classed compaction failure 2026-04-08 00:39:22 +01:00
Peter Steinberger f9dcd1e155 test: speed up agent runtime helper tests 2026-04-08 00:30:22 +01:00
Peter Steinberger c01666f7ab test: speed up agent auth config tests 2026-04-08 00:30:22 +01:00
Josh Lehman 6bd480ea1f fix: honor explicit auth profile selection (#62744)
* Auth: fix native model profile selection

Fix native `/model ...@profile` targeting so profile selections persist onto the intended session, and preserve explicit session auth-profile overrides even when stored auth order prefers another profile. Update the reply/session regressions to use placeholder example.test profile ids.

Regeneration-Prompt: |
  Native `/model ...@profile` commands in chat were acknowledging the requested auth profile but later runs still used another account. Fix the target-session handling so native slash commands mutate the real chat session rather than a slash-session surrogate, and keep explicit session auth-profile overrides from being cleared just because stored provider order prefers another profile. Update the tests to cover the target-session path and the override-preservation behavior, and use placeholder profile ids instead of real email addresses in test fixtures.

* Auth: honor explicit user-locked profiles in runner

Allow an explicit user-selected auth profile to run even when per-agent auth-state order excludes it. Keep auth-state order for automatic selection and failover, and add an embedded runner regression that seeds stored order with one profile while verifying a different user-locked profile still executes.

Regeneration-Prompt: |
  The remaining bug after fixing native `/model ...@profile` persistence was in the embedded runner itself. A user could explicitly select a valid auth profile for a provider, but the run still failed if per-agent auth-state order did not include that profile. Preserve the intended semantics by validating user-locked profiles directly for provider match and credential eligibility, then using them without requiring membership in resolved auto-order. Add a regression in the embedded auth-profile rotation suite where stored order only includes one OpenAI profile but a different user-locked profile is chosen and must still be used.

* Changelog: note explicit auth profile selection fix

Add the required Unreleased changelog line for the explicit auth-profile selection and runner honor fix in this PR.

Regeneration-Prompt: |
  The PR needed a mandatory CHANGELOG.md entry under Unreleased/Fixes. Add a concise user-facing line describing that native `/model ...@profile` selections now persist on the target session and explicit user-locked OpenAI Codex auth profiles are honored even when per-agent auth order excludes them, and include the PR number plus thanks attribution for the PR author.
2026-04-07 16:12:25 -07:00
Peter Steinberger 5e2736089d fix: resolve ci type regressions 2026-04-08 00:09:42 +01:00
Peter Steinberger ee0425a705 refactor: dedupe agent trimmed readers 2026-04-08 00:09:42 +01:00
Peter Steinberger 65ea8c60f3 refactor: dedupe agent trimmed readers 2026-04-08 00:09:41 +01:00
Peter Steinberger 8fae182531 test: speed up model config provider tests 2026-04-08 00:09:07 +01:00
Peter Steinberger f738297bda test: speed up stream and bash tool tests 2026-04-08 00:09:07 +01:00
Peter Steinberger 6f159a9a28 fix(test): align exec approvals expectations 2026-04-07 23:57:46 +01:00
Peter Steinberger 6affd09dbe Tests: repair latest main type drift 2026-04-07 23:52:55 +01:00
Peter Steinberger a80453f2e1 Tests: align exec approval policy expectations 2026-04-07 23:52:55 +01:00
Peter Steinberger 7e2fc57858 Tests: update compaction fallback retry mock 2026-04-07 23:52:54 +01:00
Peter Steinberger 11185f6397 fix(test): align boundary and approval suites 2026-04-07 23:26:34 +01:00
Peter Steinberger d471bbc94d test: speed up auth profile store tests 2026-04-07 23:17:39 +01:00
Peter Steinberger b2169c4295 test: speed up subagent registry persistence resume test 2026-04-07 23:17:28 +01:00
Peter Steinberger fdf60c06b0 refactor: dedupe gateway agent trimmed readers 2026-04-07 22:57:52 +01:00
Peter Steinberger 7897fb9c84 refactor: dedupe locale lowercase helpers 2026-04-07 22:57:52 +01:00
Peter Steinberger 88ac6f1194 refactor: dedupe remaining lowercase helpers 2026-04-07 22:57:52 +01:00
Peter Steinberger b6970865b6 refactor: dedupe path lowercase helpers 2026-04-07 22:57:52 +01:00
Peter Steinberger 5a020cf9a1 refactor: dedupe canvas lowercase helpers 2026-04-07 22:57:52 +01:00
Peter Steinberger 81a613f687 test: speed up agent config auth tests 2026-04-07 22:26:23 +01:00
Peter Steinberger 1a72ed7e13 test: speed up subagent registry tests 2026-04-07 22:26:23 +01:00
Agustin Rivera a31cb15561 Guard missed base64 decode paths (#62007)
* fix(media): guard missed base64 decode paths

Co-authored-by: zsxsoft <git@zsxsoft.com>

* fix(media): wire maxBytes into image-generate-tool and consolidate base64 guard helpers

* docs(changelog): add base64 decode guard entry

* fix(image-generate): validate configured media cap

---------

Co-authored-by: zsxsoft <git@zsxsoft.com>
Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-07 15:25:19 -06:00
Peter Steinberger 5fb6aeaf86 fix: preserve fallback error details 2026-04-07 22:07:12 +01:00
Agustin Rivera b9e972e174 Protect gateway exec approval config paths (#62001)
* fix(gateway): protect exec approval config paths

* fix(gateway): compare protected config paths by value

* docs(changelog): add gateway exec config entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
Co-authored-by: Devin Robison <drobison00@users.noreply.github.com>
2026-04-07 14:56:14 -06:00
Peter Steinberger a00b01f5ed fix: harden complex qa suite scenarios 2026-04-07 20:35:39 +01:00
BitToby 9edf9804b1 feat: add cover image support to Discord event create (#60883)
* feat: add image param to Discord event create for cover art

* fix: pass trusted media roots to event cover image loader

* fix: solve lint error

* fix: add changelog entry for Discord event cover image support (#60883) (thanks @bittoby)

---------

Co-authored-by: Shadow <hi@shadowing.dev>
2026-04-07 13:40:39 -05:00
Gustavo Madeira Santana d78512b09d Refactor: centralize native approval lifecycle assembly (#62135)
Merged via squash.

Prepared head SHA: b7c20a7398e91fcba5a1cf6dc5dc0811547107b4
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-07 14:40:26 -04:00
pgondhi987 4108901932 fix(fetch-guard): drop request body on cross-origin unsafe-method redirects [AI-assisted] (#62357)
* fix: address issue

* fix: address review feedback

* docs(changelog): add fetch guard redirect body entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-07 12:11:00 -06:00
DhruvBhatia0 12331f0463 feat: add pluggable compaction provider registry (#56224)
Merged via squash.

Prepared head SHA: 0cc9cf3f30972ad86914ec9d439b3e68591e7130
Co-authored-by: DhruvBhatia0 <69252327+DhruvBhatia0@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-07 10:55:34 -07:00
i-dentifier adb7b0d5d6 fix: compaction after tool use abortion cause agent infinite loop calls (#62600)
Merged via squash.

Prepared head SHA: 304ba072076ce761a5de1ae9178b908fae0e6f92
Co-authored-by: i-dentifier <44976464+i-dentifier@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-07 10:28:00 -07:00
Peter Steinberger d40dc8f025 refactor: dedupe agent lowercase helpers 2026-04-07 17:50:37 +01:00
Peter Steinberger d56fe040b4 refactor: dedupe agent lowercase helpers 2026-04-07 17:50:37 +01:00
Peter Steinberger 9e61209780 refactor: dedupe agent lowercase helpers 2026-04-07 17:50:37 +01:00
pgondhi987 f0c9978030 fix(feishu): enforce workspace-only localRoots in docx upload actions [AI-assisted] (#62369)
* fix: address issue

* docs(changelog): add feishu workspace-only docx entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-07 10:35:03 -06:00
Josh Lehman e46e32b98c feat: expose prompt-cache runtime context to context engines (#62179)
* Context engine: plumb prompt cache runtime context

Add a typed prompt-cache payload to the context-engine runtime context and populate it from the embedded runner's resolved retention, last-call usage, cache-break observation, and cache-touch metadata. Also pass the same payload through the retry compaction runtime context when a run attempt already has it.

Regeneration-Prompt: |
  Expose OpenClaw prompt-cache telemetry to context engines in a narrow,
  additive way without changing compaction policy. Keep the public change on
  the OpenClaw side only: add a typed promptCache payload to the context-engine
  runtime context, thread it into afterTurn, and also into compact where the
  existing run loop already has the data cheaply available.

  Use OpenClaw's resolved cache retention, not raw config. Use last-call usage
  for the new payload, not accumulated retry or tool-loop totals. Reuse the
  existing prompt-cache observability result and tracked change causes instead
  of inventing a new heuristic. If cache-touch metadata is already available
  from the cache-TTL bookkeeping, include it; do not invent expiry timestamps
  for providers where OpenClaw cannot know them confidently.

  Keep the interface backward-compatible for engines that ignore the new field.
  Add focused tests around the existing attempt/context-engine helpers and the
  compaction runtime-context propagation path rather than broad new integration
  coverage.

* Agents: fix prompt-cache afterTurn usage

Regeneration-Prompt: |
  Fix PR #62179 so context-engine prompt-cache metadata uses only the current attempt's usage. The review comment pointed out that early exits could reuse a prior turn's assistant usage when no new assistant message was produced. Restrict the prompt-cache lastCallUsage lookup to assistant messages added after prePromptMessageCount, and fall back to current-attempt usage totals instead of stale snapshot history. Also repair the PR's new context-engine test typings and add a regression test for the stale prior-turn case. Two import-only fixes in doctor-state-integrity and config/talk were already broken on origin/main, but they blocked build/check and the gateway-watch regression harness, so include the minimum unblocking imports as well.

* Agents: document prompt-cache context

* Agents: address prompt-cache review feedback

* Doctor: drop unused isRecord import
2026-04-07 09:29:57 -07:00
Peter Steinberger 8cee6f96e6 fix(test): isolate provider auth env marker mocks 2026-04-07 16:44:41 +01:00
Peter Steinberger 9d4b0d551d fix: support inferrs string-only completions 2026-04-07 15:55:20 +01:00
Peter Steinberger c3074bd513 refactor: dedupe path lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger 17a8c896a4 Tests: relax serialized models write ordering 2026-04-07 15:29:29 +01:00
Peter Steinberger d3b359a1c2 fix: stabilize agent and config isolation 2026-04-07 15:28:46 +01:00