Commit Graph

74 Commits

Author SHA1 Message Date
Jason (Json) 77a682c5de fix(agents): retry empty post-tool final turns (#93073)
Recover assistant turns that complete tool work without producing a visible final answer, while preserving intentional silent replies.

Use concrete tool-instance replay safety across embedded, Codex, and Copilot runtimes so unknown, mutating, async-started, and durable recall operations fail closed. Preserve genuine empty Codex final items without promoting commentary or tool-progress echoes.

Supersedes #90872. Thanks @fuller-stack-dev.

Co-authored-by: fuller-stack-dev <263060202+fuller-stack-dev@users.noreply.github.com>
2026-06-15 00:08:57 -07:00
Peter Steinberger ee282c6de5 docs: document plugin auth helpers 2026-06-04 04:19:03 -04:00
Vincent Koc 570e2db252 fix(plugins): isolate cached tool runtime siblings 2026-05-31 21:05:23 -04:00
Peter Steinberger d99c824ac1 fix(plugins): delegate wrapped tool properties 2026-05-31 15:02:44 +01:00
Peter Steinberger f62a22ce56 fix(plugins): preserve wrapped tool descriptors 2026-05-31 15:02:44 +01:00
Peter Steinberger 643633c1e5 fix(plugins): scope tool callbacks during materialization 2026-05-31 15:02:44 +01:00
Peter Steinberger 9dc4c9ec2e fix: expose Feishu tools for named accounts 2026-05-31 11:36:48 +01:00
Peter Steinberger e761eb8f3e fix: derive plugin media trust from metadata (#86410) 2026-05-25 14:18:36 +01:00
Peter Steinberger 9feca3e11e fix: stabilize release validation gates 2026-05-17 11:24:01 +01:00
Peter Steinberger 661aa45eeb test: dedupe optional plugin tool mock reads 2026-05-13 03:05:15 +01:00
Peter Steinberger 10d590a666 test: guard optional tool mock calls 2026-05-12 05:26:27 +01:00
Shakker a1fe0bd91b test: require single plugin tool load 2026-05-11 23:40:51 +01:00
Peter Steinberger 9fced64058 test: tighten optional plugin tool assertions 2026-05-11 01:50:58 +01:00
Shakker a88ab55389 test: tighten optional plugin tool assertions 2026-05-09 05:28:15 +01:00
zucchini 3adbbe7c34 fix(plugins): dispatch cached tools by runtime name (#78716)
Fix cached descriptor-backed plugin tool dispatch for unnamed factories sharing manifest contracts.

Thanks @zanni098!
2026-05-08 12:44:01 +05:30
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