Commit Graph

21429 Commits

Author SHA1 Message Date
Peter Steinberger
d42b0e043c fix: stage packaged bundled runtime deps externally 2026-04-25 01:58:44 +01:00
Vincent Koc
2d2402cee8 test(plugins): assert legacy channel schema exports 2026-04-24 17:58:04 -07:00
Vincent Koc
3a14a95085 fix(plugins): harden manifest channel metadata 2026-04-24 17:58:04 -07:00
Matt Van Horn
b33eb93aac fix(cron): default missing sessionTarget on load and guard assertSupportedJobSpec (#70367)
* fix(cron): default missing sessionTarget on load and guard assertSupportedJobSpec

* fix(cron): use Object.hasOwn for payload.kind check and log the backfill

Address review feedback on #70367:
- Switch the new payload.kind lookup from `in` to `Object.hasOwn` so
  prototype pollution cannot drive the defaulter (Aisle Low finding).
- Log a warning when a job is auto-defaulted at load time, matching the
  adjacent legacyJobIdIssue pattern so operators can run `openclaw
  doctor --fix` to persist the canonical shape (Greptile P2).

* fix(cron): dedupe sessionTarget backfill warn per jobId and sharpen crash site reference

Address deep-review feedback on #70367:

- The code comment referenced assertSupportedJobSpec as the tick-time
  crash site, but that function is only called from create/patch
  (jobs.ts:607, 686) and manual-run preflight (ops.ts:516). The actual
  on-tick TypeError surfaces in runIsolatedAgentJob (server-cron.ts).
  Update the comment to say so.

- ensureLoaded runs with forceReload:true on every onTimer tick (~60s).
  Before this change, a persistent legacy job missing sessionTarget
  produced one warn line per tick, forever. Add a per-jobId dedupe set
  on CronServiceState (mirroring the existing warnedDisabled flag) so
  the warn fires once per job per process.

- Drop the 'run openclaw doctor --fix' remediation from the warn
  message. Doctor's cron-store migration has no trackIssue entry for
  missing sessionTarget (doctor-cron-store-migration.ts CronStoreIssueKey),
  so doctor --fix on a store whose only defect is missing sessionTarget
  silently returns without writing anything. Point operators at
  jobs.json directly until that gap is closed.

* docs(changelog): note cron session target repair

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-24 17:57:39 -07:00
Peter Steinberger
5086069c94 fix(cli-runtime): merge user mcp servers 2026-04-25 01:56:22 +01:00
Kei Shingu
b86a04262d fix(cli-runtime): replace overlapping user mcp servers 2026-04-25 01:56:22 +01:00
kei shingu
d8ae63e7a2 test(cli-runtime): add coverage for user mcp.servers merge in prepareCliBundleMcpConfig 2026-04-25 01:56:22 +01:00
kei shingu
61250e2bea fix(cli-runtime): merge user mcp.servers into claude-cli bundle config
prepareCliBundleMcpConfig was not including cfg.mcp.servers when building
the temporary mcp.json that gets passed to claude-cli via --mcp-config.
This meant user-defined MCP servers (e.g. mcp.servers.omi in openclaw.json)
were silently dropped, even though --strict-mcp-config prevents any other
path for those servers to reach the CLI session.

The Pi runtime path (loadEmbeddedPiMcpConfig) already merges cfg.mcp.servers
after the bundle layer. This commit applies the same merge to the CLI runtime
path, with identical precedence: bundle defaults < user mcp.servers <
additionalConfig (loopback). The loopback entry remains last so it cannot be
overridden by user config.

Fixes: user-configured MCP servers not appearing as mcp__<name>__* tools in
claude-cli sessions started by OpenClaw.
2026-04-25 01:56:22 +01:00
Vincent Koc
718dffd2f2 fix(diagnostics): harden capture redaction and discord metadata fetch (#71303) 2026-04-24 17:51:12 -07:00
Gforce10-design
5a202f6f90 fix(auth): bootstrap codex cli credential without clobbering local (#71310)
* fix(auth): bootstrap codex cli credential without clobbering local

readCodexCliCredentialsCached was imported but never registered in
EXTERNAL_CLI_SYNC_PROVIDERS, so overlayExternalAuthProfiles could not
seed openai-codex:default on fresh agents and runtime surfaced
"No API key found for provider openai-codex" even after a successful
codex login.

Register the provider with a new bootstrapOnly flag. Providers flagged
bootstrapOnly are adopted only to fill an empty slot: the overlay skips
them when a local OAuth credential already exists for the profile, and
readExternalCliBootstrapCredential returns null so the refresh path
never replaces the locally stored canonical refresh token with stale
CLI state. Minimax keeps its existing replace-on-expiry behavior.

* test(auth): cover codex cli bootstrap

---------

Co-authored-by: sudol <sudol@A8Max.localdomain>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-25 01:50:01 +01:00
Peter Steinberger
d610e2cc6c feat(browser): support per-profile headless
Co-authored-by: nakamotoliu <nakamotoliu2026@gmail.com>
Co-authored-by: Nakamoto <nakamoto@claude.ai>
2026-04-25 01:49:22 +01:00
Peter Steinberger
867b4c2a32 fix(plugins): log runtime deps staging progress 2026-04-25 01:42:54 +01:00
Peter Steinberger
f9207e5d39 test(agents): cover defaults fallback timeout 2026-04-25 01:42:38 +01:00
Peter Steinberger
8a0cb03300 fix(agents): skip empty embedded prompts 2026-04-25 01:39:28 +01:00
Peter Steinberger
ae57a7998e fix(telegram): persist accepted update offsets 2026-04-25 01:35:05 +01:00
Peter Steinberger
d12987d725 fix(agents): fail fast on terminal provider 429s 2026-04-25 01:31:01 +01:00
Peter Steinberger
554f93a999 fix(providers): keep minimax chat models text-only 2026-04-25 01:27:34 +01:00
Peter Steinberger
377e254f6a fix(config): avoid env-ref reload restarts 2026-04-25 01:23:15 +01:00
Vincent Koc
b7c8c53af2 docs(plugins): define config ownership contract
* fix(plugins): flag channel config metadata gaps

* docs(plugins): clarify config ownership
2026-04-24 17:17:10 -07:00
Peter Steinberger
30aa1f890a feat(browser): expose doctor diagnostics to agents
Co-authored-by: Sean Coley <github@seancoley.me>
2026-04-25 01:15:31 +01:00
Vincent Koc
e3cba98f39 refactor(pdf): move document extraction to plugin
* refactor(pdf): move document extraction to plugin

* fix(deps): sync document extract lockfile

* fix(pdf): harden document extraction plugin
2026-04-24 17:15:05 -07:00
Peter Steinberger
915931aa38 fix(agents): use captured cli lifecycle hook runner 2026-04-25 01:14:16 +01:00
Peter Steinberger
61ee67aecc fix(agents): fail empty explicit tool allowlists 2026-04-25 01:11:36 +01:00
Peter Steinberger
5f81147c4d fix: persist embedded runtime context budget 2026-04-25 01:09:45 +01:00
Peter Steinberger
db958463f6 fix(codex): emit app-server final chat events (#71293)
Fix live webchat finalization for Codex app-server runs by emitting standard assistant and lifecycle completion events on the global agent event bus, instead of relying on a message-less chat.final fallback.

Replaces #70815. Closes #71183.

Co-authored-by: Lēsa <260982214+lesaai@users.noreply.github.com>
2026-04-25 01:09:11 +01:00
Vincent Koc
e625651de8 feat(plugins): derive setup auth choices
* feat(plugins): derive setup auth choices

* fix(plugins): sanitize derived provider auth choices

* fix(plugins): clean up extension gate regressions
2026-04-24 16:57:39 -07:00
Peter Steinberger
45730f6117 fix(gateway): resolve inbound assistant media refs 2026-04-25 00:57:07 +01:00
Peter Steinberger
14e0a8c2bc fix(agents): accept inbound media refs across tools 2026-04-25 00:57:07 +01:00
Peter Steinberger
4e9c83d4d8 fix(media): centralize inbound media reference resolution 2026-04-25 00:57:07 +01:00
Vincent Koc
aa27e27f36 fix(models): normalize provider runtime selection (#71259)
* fix(models): normalize provider runtime selection

* fix(models): reverse codex-only runtime migration

* fix(models): default runtime selection to pi

* fix(status): label model runtime clearly

* fix(status): align pi runtime label

* fix(plugins): align tool result middleware runtime naming

* fix(models): validate runtime overrides
2026-04-24 16:56:49 -07:00
Vincent Koc
d4d4a8c14e feat(diagnostics-otel): add content capture controls
Add opt-in diagnostics OTEL content capture controls, keep raw content export default-off, and guard the content-capture tests against magic truncation bounds.
2026-04-24 16:41:28 -07:00
Peter Steinberger
fbf8b216c6 fix: keep explicit image generation model exact 2026-04-25 00:39:07 +01:00
Peter Steinberger
e40d7abda9 fix(slack): preserve real thread anchors 2026-04-25 00:38:19 +01:00
Peter Steinberger
acb10cd21c fix(skills): honor default-enabled plugin skills 2026-04-25 00:35:26 +01:00
Peter Steinberger
b3db7c6987 fix: expose dynamic thinking options to UI 2026-04-25 00:33:42 +01:00
Peter Steinberger
5dab0dae56 test(cli): mock runtime plugin registry resolver 2026-04-25 00:32:02 +01:00
Peter Steinberger
0376987691 fix(plugins): preserve gateway hook runner
Co-authored-by: lanzhi-lee <36190508+lanzhi-lee@users.noreply.github.com>
2026-04-25 00:28:51 +01:00
Peter Steinberger
0270428645 fix(plugins): reuse gateway boot registry for runtime ensures
Co-authored-by: Mark Ramos <6416874+markthebest12@users.noreply.github.com>
2026-04-25 00:14:31 +01:00
Peter Steinberger
beefcda68f fix: keep copilot on boundary-aware stream path 2026-04-25 00:06:40 +01:00
Peter Steinberger
0c46e8000e fix(plugins): cache discovery registration snapshots
Co-authored-by: junpei.o <14040213+livingghost@users.noreply.github.com>
Co-authored-by: Yoshiaki Okuyama <okuyam2y@gmail.com>
Co-authored-by: Shion Eria <shioneria@foxmail.com>
Co-authored-by: Billy Shih <1472300+bbshih@users.noreply.github.com>
2026-04-24 23:55:29 +01:00
Peter Steinberger
9eeceaca43 fix: send copilot headers during compaction 2026-04-24 23:54:58 +01:00
Devin Robison
a35c166348 fix(gateway): restart channels after secret reload (#70720)
* fix(gateway): restart channels after secret reload

* fix(gateway): serialize secrets.reload and isolate channel restart errors

Address review feedback from Greptile (P1), Codex (P2), and Aisle (Medium,
CWE-362) on #70720:

- Serialize the entire secrets.reload path through a promise tail lock so
  concurrent callers cannot overlap the stop/start loop or diff against a
  stale pre-activation snapshot.
- Wrap each channel's stop/start pair in a try/catch so one channel failing
  to restart does not leave other changed channels unrestarted.
- Register slack/zalo/discord channel plugins with reload.configPrefixes in
  the test setup so channels.<id>.* diff paths actually match a restart rule
  (without this, the diff falls through to restart-gateway and the handler
  never enters the per-channel restart branch).
- Add tests covering concurrent-reload serialization and per-channel
  restart-failure isolation.

* fix(gateway): surface channel restart failures from secrets.reload

Address review feedback on the previous commit:

- Codex P1: `secrets.reload` swallowed per-channel restart failures and
  still returned `{ ok: true }`, so a rotation that left a channel on the
  old secret looked successful to the caller. The handler now collects
  restart failures during the loop and throws an aggregate error after
  attempting every channel, so the client-side RPC response surfaces the
  partial failure while unaffected channels still restart (preserving the
  original Greptile P1 non-cascading semantic).
- Greptile P2: test mock-call assertions sorted the captured channel
  arguments so they no longer depend on `Set`/object-key iteration order,
  which is not a stable contract of the handler.

* fix(gateway): harden secrets reload followups

* docs(changelog): note secret-backed channel restart on secrets.reload

* test(gateway): align secrets reload snapshot activation

* test(gateway): reset plugin runtime state in aux handlers

* fix(gateway): refresh reload rules and roll back channels

* fix(gateway): harden secrets.reload rollback tests

* test(gateway): inject aux handler reload plan

* test(gateway): avoid resettable reload-plan mocks

* test(gateway): isolate aux handler tests from skip env-var leakage

test-helpers.mocks.ts and test-helpers.server.ts set
OPENCLAW_SKIP_CHANNELS=1 / OPENCLAW_SKIP_PROVIDERS=1 at module load. When
a shared vitest worker imports those helpers before this file's tests
run, the leaked env vars route the secrets.reload skip-mode branch and
the channel restart loop never fires. Add a beforeEach that clears both
env vars so the suite is independent of worker import order.

* fix(gateway): restore required generation on secrets.reload rollback

setCurrentSharedGatewaySessionGeneration can clear `required` as a side
effect of activating a new generation. The previous rollback path
restored only `current`, leaving `required` cleared and weakening
shared-gateway auth-generation enforcement after a failed reload (Aisle
CWE-287). Capture both fields before activation and restore both in the
catch block. Add a focused regression test that locks in the contract.

* fix(gateway): track restart channels for rollback before stopChannel awaits

Pushing to stoppedChannels only after `await stopChannel` succeeded meant
that if stopChannel rejected mid-call (for example, a plugin stopAccount
hook throws after the runtime already closed the socket), the rollback
loop skipped that channel entirely. A failed secrets.reload could then
leave the channel down. Track the channel before awaiting so rollback
always attempts to bring it back, and add a regression test.
2026-04-24 16:54:16 -06:00
Vincent Koc
2d53ad5cb6 fix(channels): harden manifest read-only metadata 2026-04-24 15:50:46 -07:00
Peter Steinberger
719d6df156 fix: align github copilot request headers 2026-04-24 23:47:43 +01:00
Peter Steinberger
304126ad79 refactor(realtime-voice): centralize consult policy helpers 2026-04-24 23:45:49 +01:00
Patrick Erichsen
137f5c3a8b fix(agents): repair stale bootstrap completion (#71230)
* fix(agents): repair stale bootstrap completion

* fix: reconcile stale workspace bootstrap explicitly

* fix: keep bootstrap reconciliation in workspace lifecycle
2026-04-24 15:41:11 -07:00
Altay
9d3c56d236 fix: don't classify 400/422 with no body as format error (#67024)
* fix: keep no-body 400/422 failover errors out of format

* fix: keep failover changelog entry in unreleased fixes
2026-04-25 01:37:28 +03:00
Vincent Koc
5394efe71f feat(channels): use manifest configs for read-only discovery 2026-04-24 15:18:45 -07:00
Vincent Koc
4de80807b9 fix(plugins): bound tool result middleware details 2026-04-24 15:11:51 -07:00
Peter Steinberger
e2f13959d4 feat(voice-call): share realtime agent consult tool
Centralize the shared realtime agent consult tool for browser Talk, Google Meet, and Voice Call.
2026-04-24 23:11:18 +01:00