Commit Graph

3281 Commits

Author SHA1 Message Date
Peter Steinberger
352a394bcc test: guard plugin cleanup timeout mock call 2026-05-12 04:35:10 +01:00
Peter Steinberger
9433f7984b test: guard plugin uninstall mock call 2026-05-12 04:17:16 +01:00
Peter Steinberger
daeced9f94 test: reuse plugin cli mock call helper 2026-05-12 04:07:24 +01:00
Peter Steinberger
4c8d01e2a7 test: guard wired hook mock call 2026-05-12 03:38:01 +01:00
Sarah Fortune
26b2c47feb feat(onboarding): featured provider tier in interactive picker (#80798)
* temp

* fix pnpm lock conflict

* fix(onboarding): clear oxlint findings in auth-choice-prompt
2026-05-11 17:09:32 -07:00
pashpashpash
3b44dfc367 Make OpenAI auth login use ChatGPT by default (#80790)
* fix(openai): default provider login to ChatGPT auth

* fix(openai): align auth login metadata and fast tests

* fix(openai): prefer setup auth providers for login

* fix(openai): reject unknown explicit auth methods

* fix(line): keep channel entry imports scoped
2026-05-12 08:17:14 +09:00
Shakker
b4cb08c71a test: require actionable compat text 2026-05-11 23:45:19 +01:00
Shakker
a1fe0bd91b test: require single plugin tool load 2026-05-11 23:40:51 +01:00
Shakker
376f93b62b test: match plugin registry inventory 2026-05-11 23:39:34 +01:00
Josh Lehman
4bfd7416f0 fix: stabilize code-mode follow-up tool display and replay (#80663)
* fix: project tool-search bridge event display

* fix: keep codex tool progress out of final replies

* fix: preserve tool result pairs on cleanup

* fix: restore tool search display target helper

* fix: keep tool search controls independent

* fix: render bridged tool calls like native tools

* fix: abort timed out tool search bridge calls

* fix: preserve code-mode tool results across display turns

* fix: repair missing code-mode tool results on disk

* fix: expose tool search controls in embedded runs

* docs: add code-mode followups changelog

* fix: update session repair agent-core import

* fix: harden code-mode follow-up repair

* fix: use stable session repair ids

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-11 15:31:35 -07:00
Shakker
17afb47c4d test: require session slot diagnostics 2026-05-11 23:25:44 +01:00
Shakker
0eafe995bc test: verify voice call command activation 2026-05-11 23:24:33 +01:00
Peter Steinberger
4d68faba62 test: avoid config state module resets 2026-05-11 21:55:27 +01:00
Peter Steinberger
12227ccf0a test: guard metadata wizard null checks 2026-05-11 21:28:48 +01:00
Peter Steinberger
8604774347 test: guard plugin object helpers 2026-05-11 20:56:22 +01:00
Peter Steinberger
93dd5e61ba test: guard multiline helper assertions 2026-05-11 20:49:23 +01:00
Peter Steinberger
ad907871f9 test: guard core truthiness assertions 2026-05-11 20:35:33 +01:00
Peter Steinberger
0e82b77857 test: guard plugin loader diagnostics 2026-05-11 20:08:19 +01:00
Peter Steinberger
3dd2c1a8b8 test: guard plugin diagnostic assertions 2026-05-11 20:07:14 +01:00
Peter Steinberger
866c39daea test: guard plugin helper assertions 2026-05-11 20:05:15 +01:00
Mariano
8c75ed3eaa Mirror Codex native subagents into task registry (#79512)
Merged via squash.

Prepared head SHA: 75bc96ad74
Co-authored-by: mbelinky <mbelinky@users.noreply.github.com>
Co-authored-by: marianobelinky <63976030+marianobelinky@users.noreply.github.com>
Reviewed-by: @pashpashpash
2026-05-11 20:52:41 +02:00
samzong
380a679313 feat(cron): add direct job lookup
Signed-off-by: samzong <samzong.lu@gmail.com>
2026-05-11 18:47:46 +01:00
Peter Steinberger
738f94b290 fix: clarify update warning states 2026-05-11 18:02:05 +01:00
pandadev66
dfa1a11676 fix(gateway): fire typed session_end on shutdown/restart for active sessions (#57790)
`session_end` was only fired when a session was replaced, reset, deleted, or
compacted -- the gateway shutdown/restart paths closed the process without
enumerating active sessions, so downstream `session_end` plugins
(e.g. claude-mem) accumulated ghost rows in `active` state across restarts.
Issue reporter saw 11 orphaned sessions cause 63 timeouts/day from agent
pool exhaustion.

Add an in-memory active-session tracker
(`src/gateway/active-sessions-shutdown-tracker.ts`) populated by
`emitGatewaySessionStartPluginHook` and forgotten unconditionally by
`emitGatewaySessionEndPluginHook` (even when no plugin listens), so any
session that has already been finalized through the normal lifecycle is
never re-fired by the shutdown drain. The close handler then calls a new
`drainActiveSessionsForShutdown({ reason })` in `session-reset-service.ts`
between the `gateway:shutdown`/`gateway:pre-restart` lifecycle hooks and
the subsystem teardown steps; the drain races a bounded 2 s total timeout
so a slow plugin cannot block SIGTERM/SIGINT, surfacing the timeout as a
`session-end-drain` warning on the shutdown result.

Extend `PluginHookSessionEndReason` with `"shutdown"` and `"restart"` so
plugins can distinguish a graceful close from a planned restart; the close
handler picks `restart` when `restartExpectedMs` is set and `shutdown`
otherwise. Update `emitGatewaySessionStartPluginHook` to also accept
`storePath`, `sessionFile`, and `agentId` so the shutdown drain can build
the same `session_end` payload shape the normal lifecycle path emits, and
update the existing call sites in `session-reset-service.ts` and
`server-methods/sessions.ts` to pass those fields through.

Tests:

- `src/gateway/active-sessions-shutdown-tracker.test.ts` (new) -- tracker
  insert/forget/clear semantics, idempotent re-noting, empty-id guard,
  snapshot isolation.
- `src/gateway/drain-active-sessions-for-shutdown.test.ts` (new) -- drain
  fires `session_end` with the right reason for every tracked session,
  skips sessions already finalized via reset/delete/compaction, and still
  forgets sessions even when no `session_end` plugin is registered.
- `src/gateway/server-close.test.ts` -- four new cases covering the
  shutdown/restart drain wiring, the bounded timeout warning, and the
  drain-skipped-when-no-helper case.

Docs:

- `docs/plugins/hooks.md` documents the new `shutdown`/`restart` values
  on `PluginHookSessionEndReason`.
- `docs/automation/hooks.md` documents the post-`gateway:shutdown`
  `session_end` drain step and its bounded execution guarantee.

Fixes #57790.
2026-05-11 17:28:23 +01:00
Shakker
ac478b2c6a test: verify diagnostics and session callbacks 2026-05-11 17:21:03 +01:00
Peter Steinberger
1f43e79a58 test: remove plugin contract timer flushes 2026-05-11 17:19:44 +01:00
Shakker
d4f3d4edad test: verify schema and timing messages 2026-05-11 17:18:19 +01:00
Shakker
8f79e34cbe test: verify install and runtime messages 2026-05-11 17:16:25 +01:00
Chinar Amrutkar
f2c15f94ae fix(channels): narrow bundled channel loader diagnostics
Narrow bundled channel wrong-loader diagnostics, preserve ordinary missing-register debug details, and add focused loader coverage.

Verification:
- pnpm test src/plugins/loader.test.ts src/plugins/loader.cli-metadata.test.ts -- --reporter=verbose
- env -u OPENCLAW_TESTBOX -u OPENCLAW_TESTBOX_REMOTE_RUN pnpm check:changed

CI notes:
- Real behavior proof passed with maintainer proof: override label.
- check-additional-boundaries-d is red from existing extension test imports outside this PR: extensions/telegram/src/bot.create-telegram-bot.test.ts and extensions/whatsapp/src/login.coverage.test.ts.

Co-authored-by: Chinar Amrutkar <chinar.amrutkar@gmail.com>
2026-05-11 16:58:06 +01:00
Peter Steinberger
c9c9c3f7f1 fix: surface plugin beta fallback outcomes 2026-05-11 16:57:27 +01:00
Neerav Makwana
5171c2654a fix(models/auth): preserve primary when login omits --set-default
Provider applyConfig patches merged during models auth login could replace
agents.defaults.model.primary even without --set-default. Snapshot the prior
defaults.model and restore it after the patch unless the user opts in.

Fixes #78162.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 16:16:49 +01:00
Shakker
723ebb2a2c test: check sync hook warning text 2026-05-11 16:10:45 +01:00
Shakker
a150e35928 test: check plugin service failure logs 2026-05-11 16:10:06 +01:00
Shakker
691440f061 test: check inbound claim hook warnings 2026-05-11 16:09:26 +01:00
Shakker
584c9bdeb2 test: check reply dispatch hook warnings 2026-05-11 16:08:38 +01:00
Shakker
c214a5f262 test: pin self-hosted provider setup 2026-05-11 14:17:08 +01:00
samzong
1ecd46f49b fix(channels): cache selected channel registry lookups 2026-05-11 13:58:14 +01:00
Peter Steinberger
29f36e0072 fix: avoid llama.cpp router autoload during discovery (#74057) 2026-05-11 13:16:06 +01:00
brokemac79
f4be39c4f4 fix(providers): read nested llama cpp props context 2026-05-11 13:16:06 +01:00
brokemac79
7c7d19ec84 fix(providers): use llama.cpp runtime context cap 2026-05-11 13:16:06 +01:00
Shakker
40457455e1 test: assert tts contract attempts 2026-05-11 12:17:30 +01:00
Shakker
ccc6109853 test: assert plugin update warnings 2026-05-11 12:13:14 +01:00
Peter Steinberger
b3e2f3b261 fix: repair broken plugin package entries 2026-05-11 10:53:55 +01:00
ChandlerChien
8847d390bc fix(skills): normalize backslashes in compacted skill paths on Windows
Summary:
- Normalize compacted home-relative skill prompt locations to forward slashes only when the matched home prefix is Windows-style.
- Preserve POSIX literal backslashes after home-prefix compaction so prompt locations do not point at a different POSIX path.
- Keep provider-validation test fixtures typed for current test-type expectations and add the changelog entry.

Verification:
- pnpm vitest run src/plugins/provider-validation.test.ts src/agents/skills.compact-skill-paths.test.ts
- pnpm check:test-types
- pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/agents/skills/workspace.ts src/agents/skills.compact-skill-paths.test.ts src/plugins/provider-validation.test.ts
- git diff --check
- Real code-path probe emitted `windowsCompacted=~/.openclaw-test-skills/win-skill/SKILL.md`, `windowsContainsBackslash=false`, and `posixLiteralBackslashPreserved=true`
- GitHub CI passed, including Real behavior proof, auto-response, Critical Quality, Security High, and full repository checks.

Closes #52022

Co-authored-by: ChandlerChien <123870275+chienchandler@users.noreply.github.com>
2026-05-11 01:35:26 -05:00
Peter Steinberger
233699c5b5 test: narrow scheduled turn cron assertion 2026-05-11 07:28:44 +01:00
Shakker
d0e881eed4 test: classify runtime api guardrails exactly 2026-05-11 07:16:19 +01:00
Shakker
23709c5481 test: tighten loader contract allowlist assertions 2026-05-11 07:14:04 +01:00
Shakker
9131545065 test: tighten file install warning assertion 2026-05-11 07:13:01 +01:00
Shakker
b24db963a6 test: tighten npm spec install assertions 2026-05-11 07:10:09 +01:00
Shakker
0f2f0cbbad test: tighten web fetch provider runtime assertions 2026-05-11 07:09:04 +01:00