Commit Graph

3307 Commits

Author SHA1 Message Date
Peter Steinberger
04a868b98d fix: skip metadata for build-excluded bundled plugins
Fix bundled plugin metadata copying to follow the build-entry set, so build-excluded plugins like QQ Bot do not leave stale dist metadata advertising missing runtime files.

Verification:
- pnpm test src/plugins/copy-bundled-plugin-metadata.test.ts test/scripts/bundled-plugin-build-entries.test.ts
- git diff --check
- pnpm openclaw gateway status --deep
- CI run 25718250461
- CodeQL run 25718250402
- CodeQL Critical Quality run 25718250418
- Real behavior proof run 25718290985
2026-05-12 07:51:11 +01:00
Alex Naidis
a290cd633f fix(doctor): repair managed plugin peer links
Repair managed npm plugin OpenClaw peer links across doctor, install, and update flows.

- relink `peerDependencies.openclaw` packages under managed npm roots during doctor repair
- make read-only doctor preview broken peer links with a `doctor --fix` hint
- reject target plugin installs when their own peer link cannot be repaired, without blocking unrelated installs for stale sibling packages
- preserve update warning behavior for unrepairable package-local `node_modules`

Verification:
- `pnpm test src/plugins/plugin-peer-link.test.ts src/plugins/install.test.ts src/plugins/install.npm-spec.test.ts src/plugins/update.test.ts src/commands/doctor-plugin-registry.test.ts src/commands/doctor/repair-sequencing.test.ts -- --reporter=verbose`
- `pnpm exec oxfmt --check --threads=1 ...`
- `git diff --check`
- Crabbox/Testbox `tbx_01krde1jx199rnpm2rv1rdcj76`: focused tests + `pnpm check:changed`, exit 0
- Real CLI proof in PR body: read-only `openclaw doctor` warning plus `openclaw doctor --fix` symlink repair

Thanks @TheCrazyLex.
2026-05-12 07:49:08 +01:00
Peter Steinberger
7411396dbc test: guard tts contract mock calls 2026-05-12 07:14:25 +01:00
Peter Steinberger
f71aa4504a test: guard scheduled turn mock calls 2026-05-12 07:11:58 +01:00
Peter Steinberger
525e0267b1 test: guard session attachment mock calls 2026-05-12 07:09:31 +01:00
Kaspre
5375281974 fix(plugins): load untracked TS source plugins 2026-05-12 07:08:38 +01:00
Peter Steinberger
f285e53d5b test: guard runtime index mock calls 2026-05-12 07:06:58 +01:00
Peter Steinberger
6bdfb39937 test: guard runtime llm mock calls 2026-05-12 07:05:44 +01:00
Peter Steinberger
cccbfbf85c test: guard metadata registry mock calls 2026-05-12 07:04:36 +01:00
Peter Steinberger
e00f7dc0bf test: guard marketplace mock calls 2026-05-12 07:03:32 +01:00
Peter Steinberger
5b1d1eac12 test: guard wired hook mock calls 2026-05-12 07:02:19 +01:00
Peter Steinberger
469da5b111 test: guard install path mock calls 2026-05-12 07:01:15 +01:00
Peter Steinberger
18ead60fc1 test: guard web fetch provider mock calls 2026-05-12 07:00:06 +01:00
Peter Steinberger
433634066c test: guard plugin install mock calls 2026-05-12 06:57:58 +01:00
Peter Steinberger
0c2068fddb test: guard provider runtime mock calls 2026-05-12 06:56:44 +01:00
Peter Steinberger
0eb50f9f8d test: guard module loader cache mock calls 2026-05-12 06:52:40 +01:00
Peter Steinberger
7b71987627 test: guard git install mock calls 2026-05-12 06:51:09 +01:00
Peter Steinberger
0543448df8 test: guard channel catalog mock calls 2026-05-12 06:49:41 +01:00
Peter Steinberger
0eceaefda9 test: guard setup registry mock calls 2026-05-12 06:47:54 +01:00
Peter Steinberger
5aede953ad test: guard channel send and stat overloads 2026-05-12 06:37:52 +01:00
Peter Steinberger
29d478f866 test: guard plugin hooks mock call 2026-05-12 05:44:37 +01:00
Peter Steinberger
92a4bb6c33 test: guard plugin lifecycle mock calls 2026-05-12 05:43:04 +01:00
Peter Steinberger
ed6db3cd23 test: guard plugin services mock call 2026-05-12 05:41:21 +01:00
Peter Steinberger
10d590a666 test: guard optional tool mock calls 2026-05-12 05:26:27 +01:00
Peter Steinberger
a786d8dfcb test: guard inbound claim logger mock calls 2026-05-12 05:20:50 +01:00
Peter Steinberger
35174ea046 test: guard plugin doctor jiti mock call 2026-05-12 05:10:19 +01:00
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