Commit Graph

15555 Commits

Author SHA1 Message Date
Tars
5f3737f229 fix: auto-enable minimax plugin for API key auth route (#57127)
Merged via squash.

Prepared head SHA: 5782b26738
Co-authored-by: tars90percent <252094836+tars90percent@users.noreply.github.com>
Co-authored-by: odysseus0 <8635094+odysseus0@users.noreply.github.com>
Reviewed-by: @odysseus0
2026-03-31 22:52:19 -07:00
Neerav Makwana
26a891aaeb fix: preserve rewritten stream snapshots in webchat (#58641) (thanks @neeravmakwana) 2026-04-01 11:09:19 +05:30
Marcus Castro
ac6db066d3 feat(whatsapp): add reaction guidance levels (#58622)
* WhatsApp: add reaction guidance policy

* WhatsApp: expose reaction guidance to agents
2026-04-01 01:42:10 -03:00
Ayaan Zaidi
2c5796c924 fix(tasks): recheck current state during maintenance sweep 2026-04-01 09:25:38 +05:30
joshavant
ccb67bd4bf config: regenerate base config schema baseline 2026-03-31 22:54:36 -05:00
joshavant
ed83d79a05 fix: tighten reply payload typing and safe text coercion 2026-03-31 22:54:36 -05:00
Ayaan Zaidi
2dbfd4ebe2 refactor(tasks): distill task registry sweep scheduling 2026-04-01 09:12:57 +05:30
openperf
97fd6c27a1 fix(tasks): prevent synchronous task registry sweep from blocking event loop 2026-04-01 09:12:57 +05:30
Peter Steinberger
098125e998 test: merge channel reply pipeline typing cases 2026-04-01 03:26:24 +01:00
Peter Steinberger
7ae093cf0f test: merge command auth cases 2026-04-01 03:25:39 +01:00
Peter Steinberger
ba808573ef test: merge allowlist config helper cases 2026-04-01 03:24:41 +01:00
Peter Steinberger
a217e97fe5 test: merge approval renderer cases 2026-04-01 03:23:41 +01:00
Peter Steinberger
cf3d7c8d57 test: merge account status helper cases 2026-04-01 03:22:33 +01:00
Peter Steinberger
d11df8e13e test: merge approval auth helper cases 2026-04-01 03:21:32 +01:00
Peter Steinberger
d65c290748 test: merge temp download path cases 2026-04-01 03:20:28 +01:00
Peter Steinberger
fbca5bcc12 test: merge status helper default/explicit cases 2026-04-01 03:19:35 +01:00
Peter Steinberger
cb131a7938 test: merge dm allowlist pairing policy cases 2026-04-01 03:18:35 +01:00
Peter Steinberger
655d52815d test: merge channel send result stamping coverage 2026-04-01 03:16:06 +01:00
Peter Steinberger
042a9ab48a test: fix plugin-sdk subpaths contract imports 2026-04-01 03:02:34 +01:00
Peter Steinberger
49ac85b56d test: merge secret input schema coverage 2026-04-01 02:53:40 +01:00
Peter Steinberger
5816294b4c test: merge request-url coverage into fetch auth 2026-04-01 02:52:44 +01:00
Peter Steinberger
08bbb51bf7 test: merge allowlist resolution coverage 2026-04-01 02:51:26 +01:00
Peter Steinberger
f5a23b710c test: move plugin-sdk index and root alias guardrails 2026-04-01 02:50:22 +01:00
Peter Steinberger
016f065d7e test: move remaining plugin-sdk guardrails to contracts 2026-04-01 02:46:50 +01:00
Peter Steinberger
7e02005ca9 test: move plugin-sdk guardrails to contracts suite 2026-04-01 02:41:02 +01:00
Peter Steinberger
3c69e1ea4e test: drop low-signal plugin runtime type contract 2026-04-01 02:29:18 +01:00
Morrow
be5a035d97 fix: harden embedded text normalization (#58555)
Co-authored-by: Morrow <271612559+agent-morrow@users.noreply.github.com>
2026-03-31 21:10:49 -04:00
Owen Wang
50cc28c559 fix: differentiate overloaded vs rate-limit user-facing error messages (#58562) 2026-03-31 21:10:38 -04:00
dudu1111685
ed8e6b0a74 plugins: suppress provenance warning for allowlisted local plugins (#58604)
Co-authored-by: me <shlomo@vmi1916417.contaboserver.net>
2026-03-31 21:10:30 -04:00
Andy Tien
6c3eea3ce9 fix(session): prevent heartbeat/cron/exec events from triggering session reset (#58605)
Fixes #58409 - Heartbeat system causes silent session reset leading to user data loss.

The issue occurred when automated system events (heartbeat, cron-event, exec-event)
triggered the session initialization logic, which evaluated session freshness based on
idle/daily reset policies. Stale sessions were reset, causing complete context loss.

Changes:
- Detect system event providers (heartbeat, cron-event, exec-event) in initSessionState
- Force freshEntry=true for system events to skip reset policy evaluation
- Add comprehensive test coverage for heartbeat no-reset behavior

This ensures automated check-ins preserve session continuity and never cause
accidental data loss.
2026-03-31 21:10:24 -04:00
OfflynAI
b554516f21 routing: support wildcard peer bindings (peer.id="*") for multi-agent routing (#58609)
* routing: support wildcard peer bindings (peer.id="*") for multi-agent routing

Bindings with `peer: { kind: "direct", id: "*" }` were treated as a literal
peer ID "*" instead of a wildcard. This caused the binding to be indexed
exclusively in the byPeer map under key "direct:*", which never matches
actual incoming peer IDs like "direct:12345678". The binding silently fell
through to the default agent ("main"), breaking multi-agent setups that use
wildcard peer constraints to route all DMs on a named account to a specific
agent.

Add a "wildcard-kind" peer constraint state that restricts on chat type
(direct/group/channel) without requiring an exact peer ID match. Wildcard
peer bindings now fall through to the byAccount/byChannel index tiers and
correctly match via matchesBindingScope with kind-only filtering.

Resolves #58546

Made-with: Cursor

* routing: add dedicated binding.peer.wildcard tier for clarity

Address Greptile feedback: wildcard-peer bindings now report
matchedBy: "binding.peer.wildcard" instead of "binding.account",
making logs/debugging clearer for operators.

- Add byPeerWildcard index bucket
- Add binding.peer.wildcard tier between peer.parent and guild+roles
- Update tests to expect the new matchedBy value

Made-with: Cursor
2026-03-31 21:10:18 -04:00
Reed
b86f5d5ea4 fix(sandbox): resolve pinned fs helper python without PATH (#58573) 2026-03-31 21:10:17 -04:00
狼哥
40b24dfa6b fix(session-status): infer custom runtime providers from config (#58474)
* fix(session-status): infer custom runtime providers from config

* test(session-status): satisfy custom provider type checks
2026-03-31 21:09:42 -04:00
Han Yang
547154865b Fix: live session model switch no longer blocks failover (Resolves #58466) (#58589)
* fix: prevent infinite retry loop when live session model switch blocks failover (#58466)

* fix: remove unused resolveOllamaBaseUrlForRun import after rebase
2026-03-31 21:09:41 -04:00
Kenny Xie
2650ce31fc fix(media): resolve relative MEDIA paths against agent workspace (#58624)
* fix(media): resolve relative MEDIA: paths against agent workspace dir

* fix(agents): remove stale ollama compat import

* fix(media): preserve workspace dir in outbound access
2026-03-31 21:09:28 -04:00
ryanngit
0b3d31c0ce feat(auth): WHAM-aware Codex cooldown for multi-profile setups (#58625)
Instead of exponential backoff guesses on Codex 429, probe the WHAM
usage API to determine real availability and write accurate cooldowns.

- Burst/concurrency contention: 15s circuit-break
- Genuine rate limit: proportional to real reset time (capped 2-4h)
- Expired token: 12h cooldown
- Dead account: 24h cooldown
- Probe failure: 30s fail-open

This prevents cascade lockouts when multiple agents share a pool of
Codex profiles, and avoids wasted retries on genuinely exhausted
profiles.

Closes #26329, relates to #1815, #1522, #23996, #54060

Co-authored-by: ryanngit <ryanngit@users.noreply.github.com>
2026-03-31 21:09:25 -04:00
Jalen
915e15c13d fix(gateway): skip restart when config.patch has no actual changes (#58502)
config.patch unconditionally writes the config file and sends SIGUSR1
even when diffConfigPaths detects zero changed paths. This causes a
full gateway restart (~10s downtime, all SSE/WebSocket connections
dropped) on every control-plane config.patch call, even when the
config is identical — e.g. a model hot-apply that doesn't change any
gateway.* paths.

Fix: when changedPaths is empty, return early with `noop: true`
without writing the file or scheduling SIGUSR1. The validated config
is still returned so the caller knows the current state.

This lets control-plane clients safely call config.patch for
idempotent updates without triggering unnecessary restarts.
2026-03-31 21:09:23 -04:00
Rico0919x
ee42e44d88 fix(auth): add qwen-dashscope and anthropic-openai to known API key env vars (#58503) 2026-03-31 21:09:20 -04:00
Andy
4d8c07b97c feat(cron): add --tools flag for per-job tool allow-list (#58504)
Add toolsAllow field to cron agent-turn payloads, enabling users to
restrict which tool schemas are sent to the model for a given cron job.

When --tools is set:
- Only listed tools are included in the provider request
- promptMode is forced to 'minimal' (strips skills catalog, reply tags,
  heartbeat, messaging, docs, memory, model aliases, silent replies)
- Dramatically reduces input tokens for small local models (~16K to ~800)

CLI surface:
- openclaw cron add --tools exec,read,write
- openclaw cron edit <id> --tools exec
- openclaw cron edit <id> --clear-tools (remove allow-list)

Closes #58435

Co-authored-by: andyk-ms <andyk-ms@users.noreply.github.com>
2026-03-31 21:09:17 -04:00
Lee Pender
8b6b4b18a8 feat: add agents.defaults.params for global default provider params (#58548)
Allow setting provider params (e.g. cacheRetention) once at the
agents.defaults level instead of repeating them per-model. The merge
order is now: defaults.params -> defaults.models[key].params ->
list[agentId].params.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 21:09:07 -04:00
hcl
b8fea43bf2 fix(gateway): return default scopes when trusted HTTP request has no scope header (#58603)
resolveTrustedHttpOperatorScopes() returns [] when the x-openclaw-scopes
header is absent, even for trusted requests (--auth none). This causes
403 "missing scope: operator.write" on /v1/chat/completions.

Root cause: src/gateway/http-utils.ts:138-140. PR #57783 (f0af18672)
replaced the old resolveGatewayRequestedOperatorScopes which had an
explicit fallback to CLI_DEFAULT_OPERATOR_SCOPES when no header was
present. The new function treats absent header the same as empty header
— both return [].

Fix: distinguish absent header (undefined → return defaults) from empty
header ("" → return []). Trusted clients without an explicit scope
header get the default operator scopes, matching pre-#57783 behavior.

Closes #58357

Signed-off-by: HCL <chenglunhu@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 21:09:05 -04:00
Peter Steinberger
5b8f0cf1d5 test: centralize inbound contract suites 2026-04-01 02:04:53 +01:00
Peter Steinberger
b59adf9d2a test: fix outbound payload contract import 2026-04-01 02:02:07 +01:00
Peter Steinberger
051e31fb55 test: centralize outbound payload contracts 2026-04-01 02:01:48 +01:00
Peter Steinberger
aea016d02c test: fix registry-backed contract import 2026-04-01 01:54:03 +01:00
Peter Steinberger
1f97f907b2 test: centralize registry-backed channel contracts 2026-04-01 01:53:23 +01:00
Peter Steinberger
7614c45980 test: fix channel catalog contract import 2026-04-01 01:52:01 +01:00
Peter Steinberger
ba5b373ad4 test: centralize channel catalog contracts 2026-04-01 01:51:26 +01:00
Peter Steinberger
4af52a7428 test: centralize provider runtime, discovery, and auth contracts 2026-04-01 01:49:11 +01:00
Peter Steinberger
78be556299 test: consolidate plugin registration contracts 2026-04-01 01:46:56 +01:00