Commit Graph

59 Commits

Author SHA1 Message Date
Vincent Koc
09e7eb6687 fix(plugins): preserve optional tool metadata 2026-05-03 21:06:46 -07:00
Vincent Koc
e3cba91ef0 fix(plugins): respect manifest optional tool siblings 2026-05-03 20:44:18 -07:00
Vincent Koc
571d75aab3 fix(plugins): honor plugin tool denylists 2026-05-03 19:33:00 -07:00
Vincent Koc
443f7035a2 fix(plugins): filter unavailable optional tools 2026-05-03 17:10:41 -07:00
Peter Steinberger
baadd74b6b fix(plugins): narrow optional tool cold loads 2026-05-04 00:41:01 +01:00
Peter Steinberger
e5ec14a06a fix(plugins): discover alsoAllow plugin tools
Summary:
- Discover optional plugin tools named in tools.alsoAllow without treating additive alsoAllow as a restrictive plugin-tool allowlist.
- Preserve explicit alsoAllow wildcards and keep default non-optional plugin tools visible.
- Document llm-task and lobster enablement and add changelog coverage.

Verification:
- pnpm test src/agents/tool-policy.test.ts src/gateway/tools-invoke-http.test.ts src/agents/pi-tools.create-openclaw-coding-tools.test.ts src/plugins/tools.optional.test.ts
- pnpm exec oxfmt --check --threads=1 src/agents/sandbox-tool-policy.ts src/agents/tool-policy.ts src/agents/tool-policy.test.ts src/agents/pi-tools.create-openclaw-coding-tools.test.ts src/gateway/tools-invoke-http.test.ts src/plugins/tools.ts src/plugins/tools.optional.test.ts
- git diff --check
- Blacksmith Testbox tbx_01kqr05924hz9kw50myxrqmsf9: pnpm check:changed

Fixes #76616
2026-05-03 23:46:14 +01:00
Vincent Koc
9d5fedb9b5 fix(plugins): normalize tool name conflicts 2026-05-03 11:27:24 -07:00
Edionwheels
66ffb29679 fix(plugins): cold-load partial tool registries
Fix plugin tool discovery when a selected wildcard plugin set is resolved against a partial active registry.\n\nRequire scoped registries to cover every requested plugin owner, force cold-load incomplete tool discovery registries without replacing active plugin runtime state, and add regression coverage for the partial-registry path.\n\nFixes #76780.\nThanks @lilesjtu.
2026-05-03 19:09:34 +01:00
Peter Steinberger
d00bcf555b test(plugins): cover config-origin tool cold load diagnostics 2026-05-03 13:22:47 +01:00
HCL
a3b94f3910 fix(plugins): restore cold-registry load for path-based plugin tools (#76598)
`resolvePluginTools` returned an empty tool list when no pre-warmed
channel/active registry was found after startup — the on-demand fallback
removed by PR #76004 was only added back for memory and capability-provider
surfaces, leaving path-based (origin "config") plugin tool factories silent.

Fix: when `resolvePluginToolRegistry` returns null, trigger a standalone
registry load via `ensureStandaloneRuntimePluginRegistryLoaded`, then retry.
Adds regression test asserting tools are resolved without pre-warming.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 13:22:47 +01:00
Peter Steinberger
5e9135f2e2 fix: keep active memory tools available 2026-05-03 12:24:03 +01:00
Alex Knight
1e4098134a fix: enable browser tools with full profile (#76557)
Summary:
- The PR makes `tools.profile: "full"` resolve to a wildcard allowlist, teaches plugin optional-tool allowlist checks to honor `*`, and updates regression tests, docs, and the changelog for browser tool availability.
- Reproducibility: yes. source-level reproduction is high confidence: current main makes `full` resolve to no  ...  plugin allowlist helpers do not accept `*`. I did not run a live browser session in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: docs: update full profile description and add changelog for #76507

Validation:
- ClawSweeper review passed for head b5329de33c.
- Required merge gates passed before the squash merge.

Prepared head SHA: b5329de33c
Review: https://github.com/openclaw/openclaw/pull/76557#issuecomment-4365736091

Co-authored-by: Alex Knight <aknight@atlassian.com>
2026-05-03 11:12:30 +00:00
Val Alexander
05c9492bff fix: reduce WebUI session latency churn (#76277) thanks @BunsDev
Reduce WebUI/Gateway latency churn by avoiding redundant session reloads, carrying session keys through transcript update events, and deferring explicit media provider discovery. Includes changelog attribution and closes the referenced runtime latency issues.
2026-05-02 18:39:06 -05:00
Peter Steinberger
1466878c36 refactor: cache plugin tool descriptors (#76079)
Co-authored-by: Shakker <shakkernerd@users.noreply.github.com>
2026-05-02 14:52:21 +01:00
DmitryPogodaev
8283c5d6cc perf(plugins): reuse startup runtime registry
Reuse the startup runtime plugin registry across provider/tool helper paths while preserving standalone CLI/MCP fallback loading.

Includes follow-up fixes for migration/provider/tool registry bootstrap and regression coverage for compatible registry reuse.

Co-authored-by: DmitryPogodaev <pogodaev.dm@gmail.com>
2026-05-02 13:44:49 +01:00
Peter Steinberger
40f2bf3950 fix: cache plugin tool factories by context 2026-05-02 12:19:29 +01:00
Peter Steinberger
eaf1f53d60 fix: stabilize plugin metadata release checks 2026-05-02 07:27:27 +01:00
Shakker
3cf1dd982b fix: gate plugin tools from manifest availability 2026-05-02 06:21:08 +01:00
Shakker
7641783d6b fix: enforce plugin tool manifest contracts 2026-05-02 06:21:08 +01:00
Shakker
e6825fceaa perf: scope plugin tool discovery to manifest tool owners 2026-05-02 06:21:08 +01:00
Shakker
fac06a2320 perf: scope reply runtime plugin startup 2026-05-02 06:21:07 +01:00
Shakker
80835f5416 perf: reuse active plugin registry for tool discovery 2026-05-02 06:21:07 +01:00
Peter Steinberger
0df90d9b8d fix: trace plugin tool factory timings (#75823)
* fix: trace plugin tool factory timings

* docs: document plugin tool timing traces

* fix: keep plugin tools mcp stdout clean

* test: type plugin tools mcp mock

* test: complete plugin tools mcp mock

* test: preserve console helpers in mcp test

* chore: refresh generated protocol models
2026-05-01 23:14:18 +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
866be0baae fix(plugins): scope tool registry reuse to plugin plan 2026-05-01 21:13:50 +01:00
Peter Steinberger
29ed5266bf fix: keep runtime deps repair out of hot paths 2026-05-01 09:26:45 +01:00
EVA
1adaa28dc8 [plugin sdk] Add generic plugin host-hook contracts (#72287)
Merged via squash.

Prepared head SHA: 68e5f2ce19
Co-authored-by: 100yenadmin <239388517+100yenadmin@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-27 17:07:02 -07:00
Peter Steinberger
0a076bc0fc fix: isolate malformed plugin tools 2026-04-27 13:22:28 +01:00
Peter Steinberger
d9333ac095 test: speed up plugin status tests 2026-04-07 15:25:21 +01:00
Peter Steinberger
fdacaf0853 test: sync messaging runtime and talk expectations 2026-04-07 05:46:13 +01:00
Peter Steinberger
e3674bcc04 test: streamline runtime wrapper test reloads 2026-04-03 04:41:38 +01:00
Peter Steinberger
f4d60478c9 test: reset plugin runtime state in optional tools tests 2026-03-29 08:52:12 +01:00
Ayaan Zaidi
e3faa99c6a fix(plugins): preserve gateway-bindable registry reuse
# Conflicts:
#	src/agents/runtime-plugins.test.ts
#	src/agents/runtime-plugins.ts
#	src/plugins/loader.ts
#	src/plugins/tools.ts
2026-03-29 09:59:06 +05:30
Dewaldt Huysamen
27188fa39f fix: scope subagent registry reuse to tool loading (#56240) (thanks @GodsBoy)
* fix(plugins): reuse active registry for sub-agent tool resolution

* test(plugins): harden resolveRuntimePluginRegistry with per-field, caller-shape, and cold-start tests

Add 11 regression tests covering:
- R1: Per-field isolation (coreGatewayHandlers, includeSetupOnlyChannelPlugins,
  preferSetupRuntimeForChannelPlugins each independently prevent fallback;
  empty onlyPluginIds[] treated as non-gateway-scoped)
- R2: Caller-shape regression (tools.ts, memory-runtime.ts,
  channel-resolution.ts shapes fall back; web-search-providers.runtime.ts
  with onlyPluginIds does not)
- R3: Cold-start path (null active registry falls through to loadOpenClawPlugins)

Add debug logging to resolveRuntimePluginRegistry recording which exit path
was taken (no-options, cache-key-match, non-gateway-scoped fallback, fresh load).

* refactor: simplify plugin registry resolution tests and trim happy-path debug logs

* fix(plugins): address review comments on registry fallback

- Fix cold-start test assertion: loadOpenClawPlugins always activates
  the registry (shouldActivate defaults to true), so getActivePluginRegistry()
  is not null after the call. Updated assertion to match actual behavior.

- Add safety comment documenting why the non-gateway-scoped fallback is
  safe despite cache-key mismatch: single-gateway-per-process model means
  sub-agents share workspaceDir, config, and env with the gateway.

* test(plugins): restructure per-field isolation tests to avoid load timeouts

Test isGatewayScopedLoad directly instead of going through the full
resolveRuntimePluginRegistry path which triggers expensive plugin
discovery. This fixes the includeSetupOnlyChannelPlugins test timing
out in CI while providing more precise coverage of the predicate.

* fix(plugins): expand safety comment to address startup-scoped registry concern

* fix(plugins): scope subagent registry reuse to tool loading

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-29 09:36:09 +05:30
Peter Steinberger
48b2291b1e test: dedupe plugin provider runtime suites 2026-03-28 06:04:51 +00:00
Peter Steinberger
12318d25ae test: dedupe plugin provider runtime status suites 2026-03-28 04:40:08 +00:00
Gustavo Madeira Santana
ee7f5825c8 Plugins: share runtime registry resolution 2026-03-28 00:19:33 -04:00
Gustavo Madeira Santana
a00127bf5b Plugins: reuse compatible registries for runtime providers 2026-03-28 00:09:37 -04:00
Tak Hoffman
36ac9224cc fix(regression): reload stale auto-enabled plugin tool registries 2026-03-27 22:40:24 -05:00
Tak Hoffman
cfd1e94e61 fix(regression): auto-enable plugin tool loads 2026-03-27 22:36:41 -05:00
Peter Steinberger
b4c38c78f3 test: dedupe plugin provider runtime suites 2026-03-28 03:30:25 +00:00
Peter Steinberger
39f6fe9ab1 test: dedupe plugin runtime and provider suites 2026-03-28 03:00:51 +00:00
Peter Steinberger
a9be5421d0 test: dedupe plugin provider runtime suites 2026-03-28 02:34:39 +00:00
Tak Hoffman
ab37d8810d test: introduce planner-backed test runner, stabilize local builds (#54650)
* test: stabilize ci and local vitest workers

* test: introduce planner-backed test runner

* test: address planner review follow-ups

* test: derive planner budgets from host capabilities

* test: restore planner filter helper import

* test: align planner explain output with execution

* test: keep low profile as serial alias

* test: restrict explicit planner file targets

* test: clean planner exits and pnpm launch

* test: tighten wrapper flag validation

* ci: gate heavy fanout on check

* test: key shard assignments by unit identity

* ci(bun): shard vitest lanes further

* test: restore ci overlap and stabilize planner tests

* test: relax planner output worker assertions

* test: reset plugin runtime state in optional tools suite

* ci: split macos node and swift jobs

* test: honor no-isolate top-level concurrency budgets

* ci: fix macos swift format lint

* test: cap max-profile top-level concurrency

* ci: shard macos node checks

* ci: use four macos node shards

* test: normalize explain targets before classification
2026-03-25 18:11:58 -05:00
Peter Steinberger
5fb7a1363f fix: stabilize full gate 2026-03-17 07:06:25 +00:00
Josh Lehman
eeb140b4f0 fix(plugins): late-binding subagent runtime for non-gateway load paths (#46648)
Merged via squash.

Prepared head SHA: 44742652c9
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-03-16 14:27:54 -07: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
34daed1d1e refactor(core): dedupe infra, media, pairing, and plugin helpers 2026-03-02 21:32:11 +00:00
Peter Steinberger
75423a00d6 refactor: deduplicate shared helpers and test setup 2026-02-23 20:40:44 +00:00
Tak Hoffman
35fbf26d24 Gateway: suppress tools.catalog plugin conflict diagnostics 2026-02-23 00:05:57 -06:00