Commit Graph

73 Commits

Author SHA1 Message Date
Vincent Koc
89a15fddaf fix(plugins): ignore invalid managed runtime shadows 2026-05-04 03:17:57 -07:00
Peter Steinberger
2949171fcc perf: reduce gateway startup readiness latency 2026-05-04 05:20:39 +01:00
Peter Steinberger
f74e901794 fix: clarify blocked plugin validation 2026-05-03 19:39:30 +01:00
Peter Steinberger
4a3ad3963b feat(plugins): report dependency install state 2026-05-02 19:58:19 +01:00
Peter Steinberger
5551d9fad4 fix: discover source-only plugins in checkouts 2026-05-02 17:33:15 +01:00
pashpashpash
563dca82f4 Add Codex happy path prompt snapshots (#75807)
* Add Codex prompt snapshots

* Fix prompt snapshot scenario catalogs

* Harden prompt snapshot drift check

* Fix CLI compat build export

* fix: keep codex snapshots out of core plugin surface

* fix: harden prompt snapshot ci checks

* fix: accept readonly web search onboarding scopes

* fix: repair plugin sdk package boundary types

* fix: clear prompt snapshot ci regressions

* fix: clear latest main ci checks

* fix: resolve latest main discord helper overlap

* fix: refresh codex dynamic tool snapshots

* fix: align prompt snapshot branch with latest ci

* fix: isolate plugin auto enable tests

* test: refresh prompt dynamic tool snapshots

* fix: stabilize bundled channel auto enable

* fix: clean stale prompt snapshots
2026-05-03 00:59:55 +09:00
Peter Steinberger
04f1fd4d1f fix: harden source checkout plugin dependency handling 2026-05-02 02:43:15 +01:00
Peter Steinberger
ed8f50f240 refactor: simplify plugin dependency handling
Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths.

Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
2026-05-01 21:32:22 +01:00
Peter Steinberger
e27fe55aa8 refactor: simplify plugin cache boundaries 2026-04-29 04:33:15 +01:00
Peter Steinberger
7a5b419843 refactor(plugins): simplify plugin cache boundaries 2026-04-29 03:52:22 +01:00
Shakker
a48ffda7f7 chore: trace plugin lifecycle phases 2026-04-28 18:03:01 +01:00
Peter Steinberger
28f264034b fix: discover symlinked plugin directories 2026-04-27 14:17:32 +01:00
Peter Steinberger
6a0dc3a9bc fix: cache plugin discovery realpaths 2026-04-27 14:09:15 +01:00
Peter Steinberger
74a4ff1adc fix: prefer mounted bundled plugin sources 2026-04-26 11:28:41 +01:00
Peter Steinberger
f337c9019c refactor: share plugin package entry resolution 2026-04-26 11:11:58 +01:00
Peter Steinberger
f33a812c07 fix: validate plugin package extension entries 2026-04-26 11:01:10 +01:00
Peter Steinberger
540c70d166 fix(plugins): ignore bundled load path aliases 2026-04-26 04:46:05 +01:00
Gustavo Madeira Santana
819d15481d fix: validate plugin source entries before runtime inference (#69868)
Merged via squash.

Prepared head SHA: b67644cdda
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-21 20:12:19 -04:00
Gustavo Madeira Santana
66add9fcd9 perf(cli): lazy-load doctor plugin paths (#69840)
Merged via squash.

Prepared head SHA: ebf93ad913
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-21 18:17:19 -04:00
Ayaan Zaidi
353950894a test(plugins): address discovery review feedback 2026-04-17 08:54:58 +05:30
Ayaan Zaidi
9da4d5f5df fix(plugins): reuse shared discovery cache 2026-04-17 08:54:58 +05:30
Vincent Koc
74e7b8d47b fix(cycles): bulk extract leaf type surfaces 2026-04-11 13:26:50 +01:00
Peter Steinberger
ea9efc0e81 refactor: dedupe plugin lowercase helpers 2026-04-07 15:53:50 +01:00
Peter Steinberger
eba04199f8 refactor: dedupe core lowercase helpers 2026-04-07 15:12:32 +01:00
Peter Steinberger
972fe9286d refactor: dedupe plugin and media readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
0eb6cec32b refactor: dedupe plugin discovery boundary opens 2026-04-06 17:56:41 +01:00
Peter Steinberger
06b154a6df fix: unblock comfy live plugin loading 2026-04-06 03:01:43 +01:00
Vignesh Natarajan
a5f66b5c48 fix(plugins): constrain workspace discovery to .openclaw/extensions 2026-04-03 21:57:58 -07:00
Vincent Koc
b7ec90258b fix(plugins): preserve bundled origin when workspace matches bundled root 2026-04-04 12:38:43 +09:00
Peter Steinberger
406f06dcc5 fix: preserve linked install unsafe flag and baseline regressions 2026-04-04 12:34:55 +09:00
Peter Steinberger
5bea93fd63 fix: restore gateway watch boot path 2026-04-04 01:10:49 +01:00
Peter Steinberger
8e0ab35b0e refactor(plugins): decouple bundled plugin runtime loading 2026-03-29 09:10:38 +01:00
Peter Steinberger
d73dbb6753 fix: restore provider auth and build checks 2026-03-27 20:20:31 +00:00
Peter Steinberger
100d9a7a23 refactor: share boundary open and gateway test helpers 2026-03-23 00:37:05 +00:00
HCL
4f11982ae6 fix: emit warn diagnostic for I/O errors, keep silent only for ENOENT
Address Codex P1 + Greptile P2: the previous commit collapsed both
"path" (ENOENT) and "io" (EACCES/EMFILE) into silent null returns.

Now:
- reason="path" (missing file): return null silently — not a security issue
- reason="io" (permission/disk): push warn diagnostic — surface anomaly
  without aborting gateway
- reason="validation" (path escape): push error diagnostic — security violation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: HCL <chenglunhu@gmail.com>
2026-03-22 16:13:54 -07:00
HCL
8701a224f8 fix(plugins): distinguish missing entry file from security violation
resolvePackageEntrySource() treats all openBoundaryFileSync failures
as path-escape security violations. When an extension entry file is
simply missing (ENOENT, reason="path"), the gateway emits "extension
entry escapes package directory" and aborts — crashing in a loop.

Root cause: src/plugins/discovery.ts:478 checks !opened.ok but never
inspects opened.reason. SafeOpenSyncResult already distinguishes
"path" (ENOENT) from "validation" (actual path escape).

Fix: only push the security diagnostic when opened.reason is
"validation". For "path" or "io" failures, return null to skip the
entry silently — a missing file is not a security violation.

Closes #52445

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: HCL <chenglunhu@gmail.com>
2026-03-22 16:13:54 -07:00
Peter Steinberger
ae6f42484f fix: restore cron and bundled plugin test metadata 2026-03-22 14:49:40 -07:00
Peter Steinberger
171b24c5c5 perf: generate bundled plugin metadata for cold startup 2026-03-22 21:28:16 +00:00
clay-datacurve
7b61ca1b06 Session management improvements and dashboard API (#50101)
* fix: make cleanup "keep" persist subagent sessions indefinitely

* feat: expose subagent session metadata in sessions list

* fix: include status and timing in sessions_list tool

* fix: hide injected timestamp prefixes in chat ui

* feat: push session list updates over websocket

* feat: expose child subagent sessions in subagents list

* feat: add admin http endpoint to kill sessions

* Emit session.message websocket events for transcript updates

* Estimate session costs in sessions list

* Add direct session history HTTP and SSE endpoints

* Harden dashboard session events and history APIs

* Add session lifecycle gateway methods

* Add dashboard session API improvements

* Add dashboard session model and parent linkage support

* fix: tighten dashboard session API metadata

* Fix dashboard session cost metadata

* Persist accumulated session cost

* fix: stop followup queue drain cfg crash

* Fix dashboard session create and model metadata

* fix: stop guessing session model costs

* Gateway: cache OpenRouter pricing for configured models

* Gateway: add timeout session status

* Fix subagent spawn test config loading

* Gateway: preserve operator scopes without device identity

* Emit user message transcript events and deduplicate plugin warnings

* feat: emit sessions.changed lifecycle event on subagent spawn

Adds a session-lifecycle-events module (similar to transcript-events)
that emits create events when subagents are spawned. The gateway
server.impl.ts listens for these events and broadcasts sessions.changed
with reason=create to SSE subscribers, so dashboards can pick up new
subagent sessions without polling.

* Gateway: allow persistent dashboard orchestrator sessions

* fix: preserve operator scopes for token-authenticated backend clients

Backend clients (like agent-dashboard) that authenticate with a valid gateway
token but don't present a device identity were getting their scopes stripped.
The scope-clearing logic ran before checking the device identity decision,
so even when evaluateMissingDeviceIdentity returned 'allow' (because
roleCanSkipDeviceIdentity passed for token-authed operators), scopes were
already cleared.

Fix: also check decision.kind before clearing scopes, so token-authenticated
operators keep their requested scopes.

* Gateway: allow operator-token session kills

* Fix stale active subagent status after follow-up runs

* Fix dashboard image attachments in sessions send

* Fix completed session follow-up status updates

* feat: stream session tool events to operator UIs

* Add sessions.steer gateway coverage

* Persist subagent timing in session store

* Fix subagent session transcript event keys

* Fix active subagent session status in gateway

* bump session label max to 512

* Fix gateway send session reactivation

* fix: publish terminal session lifecycle state

* feat: change default session reset to effectively never

- Change DEFAULT_RESET_MODE from "daily" to "idle"
- Change DEFAULT_IDLE_MINUTES from 60 to 0 (0 = disabled/never)
- Allow idleMinutes=0 through normalization (don't clamp to 1)
- Treat idleMinutes=0 as "no idle expiry" in evaluateSessionFreshness
- Default behavior: mode "idle" + idleMinutes 0 = sessions never auto-reset
- Update test assertion for new default mode

* fix: prep session management followups (#50101) (thanks @clay-datacurve)

---------

Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
2026-03-19 12:12:30 +09:00
Nimrod Gutman
2280fa0022 fix(plugins): normalize speech plugin package ids (#48777) 2026-03-17 08:21:43 +02:00
Peter Steinberger
fb991e6f31 perf(plugins): lazy-load setup surfaces 2026-03-15 18:46:54 -07:00
Peter Steinberger
dd40741e18 feat(plugins): add compatible bundle support 2026-03-15 16:08:50 -07:00
Peter Steinberger
6472949f25 fix(plugins): normalize bundled provider ids 2026-03-13 04:10:06 +00:00
Gustavo Madeira Santana
e6897c800b Plugins: fix env-aware root resolution and caching (#44046)
Merged via squash.

Prepared head SHA: 6e8852a188
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-03-12 15:31:31 +00:00
Peter Steinberger
43a10677ed fix: isolate plugin discovery env from global state 2026-03-12 02:46:29 +00:00
Peter Steinberger
e11be576fb fix: repair bundled plugin dirs after npm install 2026-03-11 23:53:50 +00:00
Gustavo Madeira Santana
802b9f6b19 Plugins: add root-alias shim and cache/docs updates 2026-03-04 01:20:48 -05:00
markfietje
49687d313c fix(plugins): allow hardlinks for bundled plugins (fixes #28175, #28404) (openclaw#32119) thanks @markfietje
Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: markfietje <4325889+markfietje@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-02 16:10:31 -06:00
Peter Steinberger
c424836fbe refactor: harden outbound, matrix bootstrap, and plugin entry resolution 2026-03-02 19:55:09 +00:00
Peter Steinberger
577becf1ad fix(plugins): prioritize bundled duplicates in auto-discovery
Landed from contributor PR #29710 by @Sid-Qin.

Co-authored-by: SidQin-cyber <sidqin0410@gmail.com>
2026-03-01 23:48:30 +00:00