Commit Graph

12831 Commits

Author SHA1 Message Date
Josh Lehman
e2ece61cdd fix(gateway): preserve trusted subagent cleanup 2026-03-17 07:10:58 -07:00
Josh Lehman
f69cc431af Security: validate and sanitize agent overrides 2026-03-17 07:10:58 -07:00
Josh Lehman
cf7f401228 Security: gate gateway model overrides separately 2026-03-17 07:10:58 -07:00
Josh Lehman
c675c80fce Security: add trusted plugin override policy 2026-03-17 07:10:58 -07:00
Josh Lehman
d1aa55b13c fix(agent): preserve auth profiles on one-off overrides
Regeneration-Prompt: |
  Address the live PR review comment on plugin-subagent provider/model override forwarding.
  A one-off per-run provider/model override in agentCommand must stay non-persistent: it should
  not clear a stored session authProfileOverride, and it also should not pass that stored auth
  profile into the temporary cross-provider run. Keep the existing persisted override cleanup
  behavior for real session/default provider mismatches. Add a regression test in
  src/commands/agent.test.ts that seeds a session with an Anthropic auth profile, runs a single
  OpenAI override, verifies the run uses the override without an auth profile, and confirms the
  stored auth profile fields remain intact.
2026-03-17 07:10:58 -07:00
Josh Lehman
cfd9191d4a fix(gateway): sync plugin override protocol artifacts
Regeneration-Prompt: |
  Rebase PR #48277 onto current origin/main without changing its intent: gateway-owned plugin subagent runs should be able to forward per-run provider and model overrides through the internal agent RPC, while admin-only gating stays in the gateway agent handler.

  After rebasing, keep the PR scoped to prep fallout instead of broad unrelated cleanup. Commit the generated Swift protocol models required by adding provider/model to AgentParams, add the required Unreleased changelog entry, and update the new commands/agent test fixture so the explicit openai/gpt-4.1-mini override is allowed under the current model allowlist rules. Do not fold in unrelated existing main-branch test failures.
2026-03-17 07:10:58 -07:00
Josh Lehman
305a8119a7 fix(gateway): gate agent model overrides by admin scope
Keep plugin subagent provider/model overrides working for synthetic admin dispatch, but stop forwarding those overrides for plain operator.write gateway callers. Add regressions for both the admin-allowed and write-scoped paths.

Regeneration-Prompt: |
  After the first fix for PR #48277, Codex flagged that gateway agent requests were now forwarding provider/model overrides for every operator.write caller. Verify that claim against the current gateway trust model and method scopes.

  Preserve the plugin subagent use case, which dispatches with the synthetic admin gateway client, but restore least-privilege behavior for normal write-scoped agent RPC callers. The boundary should be enforced at the gateway handler so the core agent command path can still support trusted callers. Add focused tests proving admin callers keep override forwarding while write-scoped callers do not.
2026-03-17 07:10:58 -07:00
Josh Lehman
c75f8c607c fix(gateway): support plugin subagent model overrides
Allow plugin subagent runs to pass provider/model overrides through the typed runtime, gateway validation, and ingress agent path. Apply explicit per-run overrides without persisting them to session state, and cover the gateway + agent behavior with regressions.

Regeneration-Prompt: |
  PR #48277 already forwarded provider and model from plugin subagent runtime calls, but review found two contract gaps: the typed plugin runtime did not declare those fields, and the gateway agent RPC rejected them because the schema and handler path did not accept or propagate them. Make the override path end-to-end valid without broad refactors.

  Keep the change additive. Extend the plugin runtime and gateway agent request types just enough to carry provider/model overrides. Ensure gateway ingress passes those fields into the existing agent command path, and let agent runs honor explicit per-call overrides without persisting them as session overrides. Add focused regression coverage for the gateway forwarding path and for non-persistent per-run overrides.
2026-03-17 07:10:57 -07:00
Josh Lehman
76e36720ba fix(plugins): forward plugin subagent overrides 2026-03-17 07:10:57 -07:00
Harold Hunt
1561c6a71c tests(contracts): fix provider catalog runtime wiring (#49040) 2026-03-17 10:05:41 -04:00
Sally O'Malley
59cd98068f fix ssh sandbox key cp (#48924)
Signed-off-by: sallyom <somalley@redhat.com>
2026-03-17 07:22:33 -04:00
Chris Kimpton
f404ff32d5 tests: add missing useNoBundledPlugins() to bundle MCP loader test
The "treats bundle MCP as a supported bundle surface" test was missing
the useNoBundledPlugins() call present in all surrounding bundle plugin
tests. Without it, loadOpenClawPlugins() scanned and loaded the full
real bundled plugins directory on every call (with cache:false), causing
excessive memory pressure and an OOM crash on Linux CI, which manifested
as the test timing out at 120s.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 15:49:08 +05:30
Peter Steinberger
6bf07b5075 fix(ci): restore local check suite 2026-03-17 08:14:03 +00:00
Peter Steinberger
990d0d7261 docs(image-generation): remove nano banana stock docs 2026-03-17 01:09:58 -07:00
Peter Steinberger
0ff82497e9 test(image-generation): add live variant coverage 2026-03-17 01:09:58 -07:00
Peter Steinberger
3a456678ee feat(image-generation): add image_generate tool 2026-03-17 01:09:58 -07:00
Peter Steinberger
f9588da3e0 refactor: split plugin testing seam from bundled extension helpers 2026-03-17 01:05:09 -07:00
Peter Steinberger
85e610e4e7 refactor(extension-tests): share safeguard runtime assertions 2026-03-17 08:02:44 +00:00
Peter Steinberger
774b351982 refactor(failover-tests): share observation base 2026-03-17 08:02:44 +00:00
Peter Steinberger
4db3fed299 refactor(history-tests): share pruned image assertions 2026-03-17 08:02:44 +00:00
Peter Steinberger
2971c52343 refactor(payload-tests): table-drive sessions send suppressions 2026-03-17 08:02:44 +00:00
Peter Steinberger
bc36ed8e1e refactor(payload-tests): table-drive recoverable tool suppressions 2026-03-17 08:02:44 +00:00
Peter Steinberger
d46f3bd739 refactor(payload-tests): share single payload summary assertion 2026-03-17 08:02:44 +00:00
Peter Steinberger
e510132f3c refactor(skills-tests): share bundled diffs setup 2026-03-17 08:02:44 +00:00
Peter Steinberger
8c8b0ab224 refactor(runs-tests): share run handle factory 2026-03-17 08:02:44 +00:00
Peter Steinberger
b531af82d5 refactor(history-tests): share array content assertion 2026-03-17 08:02:44 +00:00
Peter Steinberger
2847ad1f8f refactor(image-tests): share ref count assertions 2026-03-17 08:02:44 +00:00
Peter Steinberger
1373821470 refactor(image-tests): share single-ref detection helper 2026-03-17 08:02:44 +00:00
Peter Steinberger
93d829b7f6 refactor(image-tests): share empty ref assertions 2026-03-17 08:02:44 +00:00
Peter Steinberger
535475e4cb refactor(payload-tests): reuse empty payload helper 2026-03-17 08:02:44 +00:00
Peter Steinberger
ec1b80809d refactor: remove remaining extension core imports 2026-03-17 00:59:46 -07:00
Peter Steinberger
9648e7fecb refactor: consolidate lazy runtime surfaces 2026-03-17 00:59:20 -07:00
Peter Steinberger
449127b474 fix: restore full gate 2026-03-17 07:47:28 +00:00
Peter Steinberger
c0e4721712 refactor(image-tests): share empty prompt image assertions 2026-03-17 07:42:45 +00:00
Peter Steinberger
7d90dff8fa refactor(model-tests): share template model mock helper 2026-03-17 07:42:45 +00:00
Peter Steinberger
9c1e9c5263 refactor(payload-tests): share empty payload helper 2026-03-17 07:42:45 +00:00
Peter Steinberger
be6716c7aa refactor(kilocode-tests): share eligibility assertions 2026-03-17 07:42:45 +00:00
Peter Steinberger
0956de7316 refactor(thinking-tests): share assistant drop helper 2026-03-17 07:42:45 +00:00
Peter Steinberger
68f3e537d3 refactor(openrouter-tests): share state dir helper 2026-03-17 07:42:45 +00:00
Peter Steinberger
bb13dd0c01 refactor(extension-tests): share safeguard factory setup 2026-03-17 07:42:45 +00:00
Peter Steinberger
58f6362921 refactor(google-tests): share schema tool fixture 2026-03-17 07:42:45 +00:00
Peter Steinberger
ef0812beff refactor(lanes-tests): share table-driven assertions 2026-03-17 07:42:45 +00:00
Peter Steinberger
38616c7c95 refactor(system-prompt-tests): share session setup helper 2026-03-17 07:42:45 +00:00
Peter Steinberger
528edce5b9 refactor(truncation-tests): share first tool result text helper 2026-03-17 07:42:45 +00:00
Peter Steinberger
e4287e0938 refactor(compaction-tests): share snapshot assertions 2026-03-17 07:42:45 +00:00
Peter Steinberger
168fa9d433 refactor(compaction-tests): share aggregate timeout params 2026-03-17 07:42:45 +00:00
Peter Steinberger
9053f551cb refactor(payload-tests): share empty payload assertion 2026-03-17 07:25:12 +00:00
Peter Steinberger
1843248c69 refactor(attempt-tests): share wrapped stream helper 2026-03-17 07:23:44 +00:00
Peter Steinberger
9c047c5423 refactor(kilocode-tests): share cache retention wrapper 2026-03-17 07:23:44 +00:00
Peter Steinberger
7bb36efd7b refactor(kilocode-tests): share extra-params harness 2026-03-17 07:23:44 +00:00