Commit Graph

16583 Commits

Author SHA1 Message Date
Gustavo Madeira Santana e627f53d24
core: dedupe approval not-found handling (#60932)
Merged via squash.

Prepared head SHA: 108221fdfe
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-04 13:23:58 -04:00
Ayaan Zaidi ef7c84ae92
style: trim live model switch comment noise 2026-04-04 22:42:30 +05:30
Ayaan Zaidi e4bd4b8b49
style(agents): trim exec routing comments 2026-04-04 22:41:22 +05:30
Ayaan Zaidi 0817bf446f
fix: keep NO_REPLY detection case-insensitive 2026-04-04 22:38:59 +05:30
Ayaan Zaidi cde1e2d3a1
fix: preserve compaction split after trailing tool results 2026-04-04 22:34:05 +05:30
Ayaan Zaidi 3f7bd3bd7b
fix: split before unfinished compaction tool turns 2026-04-04 22:30:27 +05:30
wangchunyue f463256660
fix: suppress NO_REPLY direct cron leaks (#45737) (thanks @openperf)
* fix(cron): suppress NO_REPLY sentinel in direct delivery path

* fix: set deliveryAttempted on filtered NO_REPLY to prevent timer fallback

* fix: mark silent NO_REPLY direct deliveries as delivered

* fix(cron): unify silent direct delivery handling

* fix: suppress NO_REPLY direct cron leaks (#45737) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 22:16:20 +05:30
wangchunyue 08992e1dbc
fix: keep tool calls paired during compaction (#58849) (thanks @openperf)
* fix(compaction): keep tool_use and toolResult together when splitting messages

* fix: keep displaced tool results in compaction chunks

* fix: keep tool calls paired during compaction (#58849) (thanks @openperf)

* fix: avoid stalled compaction splits on aborted tool calls (#58849) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 22:12:43 +05:30
openperf d98eaba4c3 fix(agents): resolve exec host=node routing regression and elevated gateway override 2026-04-04 21:59:57 +05:30
wangchunyue 17f086c021
fix: handle subagent live model switches (#58178) (thanks @openperf)
* fix(agents): handle LiveSessionModelSwitchError in subagent execution

Add retry loop for cross-provider model switches in the subagent
command path, mirroring the existing logic in agent-runner-execution.ts.

- Wrap runWithModelFallback in a while(true) loop inside agentCommandInternal
- Catch LiveSessionModelSwitchError and update provider, model,
  fallbackProvider, fallbackModel, providerForAuthProfileValidation,
  sessionEntry.authProfileOverride, and storedModelOverride before retrying
- Guard storedModelOverride update: only set when the model genuinely
  changed (compared before mutation) or a session override already existed
- Reset lifecycleEnded flag so the retried iteration can emit lifecycle events
- Add comprehensive tests covering retry success, error propagation,
  lifecycle reset, auth-profile forwarding, and fallback override state

Fixes #57998

* fix(agents): include provider change in storedModelOverride guard

* fix(agents): validate allowlist and clear stale compaction count on live model switch

* fix(agents): remove broken allowlist guard on live model switch

* fix(agents): address security review — bound retry loop, validate allowlist, redact error in lifecycle events

* fix(agents): restore error observability in lifecycle events using err.message

* fix(agents): sanitize log inputs and shallow-copy sessionEntry on live model switch

* fix(agents): enforce allowlist on empty set and sanitize error message

* fix: handle subagent live model switches (#58178) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 21:56:11 +05:30
Altay ae460eff84
fix(failover): scope openrouter-specific matchers (#60909) 2026-04-04 18:24:03 +03:00
Aaron Zhu 983909f826
fix(agents): classify generic provider errors for failover (#59325)
* fix(agents): classify generic provider errors for failover

Anthropic returns bare 'An unknown error occurred' during API instability
and OpenRouter wraps upstream failures as 'Provider returned error'. Neither
message was recognized by the failover classifier, so the error surfaced
directly to users instead of triggering the configured fallback chain.

Add both patterns to the serverError classifier so they are classified as
transient server errors (timeout) and trigger model failover.

Closes #49706
Closes #45834

* fix(agents): scope unknown-error failover by provider

* docs(changelog): note provider-scoped unknown-error failover

---------

Co-authored-by: Aaron Zhu <aaron@Aarons-MacBook-Air.local>
Co-authored-by: Altay <altay@uinaf.dev>
2026-04-04 18:11:46 +03:00
Altay 5012b52780
fix(cli): route skills list output to stdout when --json is active (#60914)
* fix(cli): route skills list output to stdout when --json is active

runSkillsAction used defaultRuntime.log() which goes through console.log.
The --json preAction hook calls routeLogsToStderr(), redirecting console.log
to stderr. Switch to defaultRuntime.writeStdout() which writes directly to
process.stdout, consistent with how other --json commands (e.g. skills search)
already emit their output.

Fixes #57599

* test(cli): add skills JSON stdout regression coverage

* test(cli): refine skills CLI stream coverage

* fix(cli): add changelog entry for skills JSON stdout fix

---------

Co-authored-by: Aftabbs <aftabbs.wwe@gmail.com>
2026-04-04 18:09:44 +03:00
Peter Steinberger 4dbc66b1ed
fix: remove bundled channel startup reentry 2026-04-04 15:39:12 +01:00
Peter Steinberger b9201e8333
refactor: share announce test runtime seams 2026-04-04 23:38:36 +09:00
Peter Steinberger f5cc6a101b
style: reflow system prompt tool summary 2026-04-04 23:36:46 +09:00
Peter Steinberger a4fc1200de
style: normalize provider formatting 2026-04-04 23:36:46 +09:00
Vincent Koc 1f2e068e6b test(providers): require plugin-boundary family coverage 2026-04-04 23:30:28 +09:00
Peter Steinberger fb8e20ddb6 fix: harden paired-device management authz (#50627) (thanks @coygeek) 2026-04-04 23:27:05 +09:00
Joe LaPenna bb82fe8f19
fix: constrain device bootstrap scope checks by role prefix (#57258) (thanks @jlapenna) (#57258)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-04 23:21:01 +09:00
Vincent Koc fa34f3a9d5 fix(ci): restore provider runtime seams 2026-04-04 23:19:23 +09:00
Peter Steinberger c09e128587 fix(gateway): include talk secrets in CLI pairing defaults (#56481) (thanks @maxpetrusenko) 2026-04-04 23:18:54 +09:00
Max P 8262078ee5 fix(agents): inherit completion announce delivery target (#56481) 2026-04-04 23:18:54 +09:00
Vincent Koc 4fe21de3ce test(providers): cover xai tool compat seam 2026-04-04 23:18:31 +09:00
Vincent Koc 1e7f9e8746 test(providers): cover transport family matrix 2026-04-04 23:14:02 +09:00
Peter Steinberger e509c5c3ea
fix(ci): avoid readonly embedded session mutation 2026-04-04 15:09:50 +01:00
Peter Steinberger 0a69b3558a
fix(build): stabilize lazy runtime entrypoints 2026-04-04 15:09:50 +01:00
Peter Steinberger 470b4452ce
fix(ci): drop stale browser runtime imports 2026-04-04 15:09:49 +01:00
Peter Steinberger fb59b5c461
fix(ci): sync openrouter stream hook seams 2026-04-04 15:09:49 +01:00
Peter Steinberger a1b794a12c
fix(ci): repair node test regressions 2026-04-04 15:09:49 +01:00
Peter Steinberger dd771f1dc6
fix(ci): repair plugin boundary and bootstrap regressions 2026-04-04 15:09:48 +01:00
Peter Steinberger 2a0d5f9094
fix(ci): remove duplicated heartbeat prompt setup 2026-04-04 15:09:48 +01:00
Peter Steinberger c5c5c77ebb
fix(ci): restore contract-safe core imports 2026-04-04 15:09:48 +01:00
Chinar Amrutkar 8cf20a0c59
fix(heartbeat): address review comments 3035416659, 3035425446, 3035425447
- sessionId: derive valid ID from sessionKey (replace : with _)
- Move prompt null check before isolated session setup to avoid churn
- Improve tasks block stripping regex to handle blank lines

Fixes: #3035416659, #3035425446, #3035425447
2026-04-04 15:09:48 +01:00
Peter Steinberger 5c32dddb1c
fix(ci): restore heartbeat task batching checks 2026-04-04 15:09:48 +01:00
Chinar Amrutkar e0634aab66
fix(heartbeat): update task timestamps on alerts-disabled exit
Fixes: #3034825973
2026-04-04 15:09:48 +01:00
Chinar Amrutkar dbfb0b5618
fix(heartbeat): prevent outer loop from exiting on task field lines
The YAML parser's outer loop was exiting the tasks block when it
encountered 'interval:' or 'prompt:' lines, causing only the first
task to be parsed. Added isTaskField check to skip those lines.

Fixes: #3034790131
2026-04-04 15:09:48 +01:00
Chinar Amrutkar 05c948e4de
fix(heartbeat): preserve HEARTBEAT.md directives in task-mode prompt
Pass heartbeatFileContent to resolveHeartbeatRunPrompt and append
non-task directives from HEARTBEAT.md to the task-mode prompt.

Fixes: #3033850983
2026-04-04 15:09:48 +01:00
Chinar Amrutkar cebea1bf95
fix(heartbeat): remove dead helpers, persist timestamps on all exits
- Remove unused getTaskLastRunMs/updateTaskLastRunMs functions
- Add timestamp updates to all successful exit paths

Fixes: #3030557564, #3034645588
2026-04-04 15:09:48 +01:00
Chinar Amrutkar 5fffdc478e
fix(heartbeat): add startedAt param, null prompt handling, timestamp updates
- Fix: Pass startedAt into resolveHeartbeatRunPrompt
- Fix: Return proper object instead of null for no-tasks-due
- Fix: Add early return when prompt is null
- Fix: Persist timestamps on successful exits
2026-04-04 15:09:48 +01:00
Chinar Amrutkar ba09426707
fix(heartbeat): address review comments - parsing, timing, state, skips
- Fix YAML parsing to capture interval:/prompt: before breaking
- Record task timestamps AFTER successful execution (not before)
- Initialize task state on first run (handle undefined session)
- Skip API call when no tasks due (return null)
- Use startedAt consistently for due-task filtering

Fixes: #3030568439, #3033833124, #3030570872, #3030568408, #3030570872, #3035434022, #3035434368
2026-04-04 15:09:48 +01:00
Chinar Amrutkar 728d14e918
fix: add heartbeatTaskState to SessionEntry type
The heartbeat task batching feature uses heartbeatTaskState to track
last run times for periodic tasks, but this property was missing
from the SessionEntry type, causing TypeScript compilation errors.
2026-04-04 15:09:47 +01:00
Chinar Amrutkar 103bebd651
feat(heartbeat): add task batching support via HEARTBEAT.md
- Add parseHeartbeatTasks() to parse YAML-like task definitions
- Add isTaskDue() to check if task interval has elapsed
- Add heartbeatTaskState to session store for tracking last run times
- Modify resolveHeartbeatRunPrompt to build batched prompts for due tasks
- Update task last run times after successful heartbeat execution

Implements openclaw#29570
2026-04-04 15:09:47 +01:00
Rockcent b2f972e364
fix(failover): OpenRouter 403 Key limit exceeded triggers billing fallback (#59892)
Merged via squash.

Prepared head SHA: 7f8265231c
Co-authored-by: rockcent <128210877+rockcent@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-04 17:03:21 +03:00
Vincent Koc 9cc300be78 fix(ci): restore main follow-up checks 2026-04-04 22:51:31 +09:00
Peter Steinberger bbb73d3171
refactor: split isolated cron runner phases 2026-04-04 14:42:35 +01:00
Peter Steinberger 9698ba7215
test: split isolated cron harness resets 2026-04-04 14:42:35 +01:00
Peter Steinberger 91d20781ed
refactor: extract isolated cron execution seams 2026-04-04 14:42:35 +01:00
Peter Steinberger 083b882052
style(plugin-sdk): format provider stream helpers 2026-04-04 22:40:08 +09:00
Peter Steinberger f9717f2eae
fix(agents): align runtime with updated deps 2026-04-04 22:40:08 +09:00