Skip to content

refactor(plugins): move plugin contributions into the registry bundle - #117372

Merged
steipete merged 7 commits into
mainfrom
refactor/plugin-bundle-contributions
Aug 1, 2026
Merged

steipete merged 7 commits into
mainfrom
refactor/plugin-bundle-contributions

Conversation

@steipete

@steipete steipete commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Plugin register(api) callbacks don't return their contributions — the injected handlers write them into ~11 process-global Symbol.for capability stores (agent harnesses, commands, compaction, interactive handlers, embeddings, memory state, session discussion, detached tasks, legacy hooks, artifact memo), with context engines sitting outside even the existing clear/rollback paths. Because loading mutates shared globals, the loader carries an entire defense apparatus: clear-the-world on every activating load, a 233-line snapshot/restore transaction over 13 global fields, cached {registry, processGlobalState} pairs, and lifecycle bugs that machinery cannot fix — a failed re-registration can delete a working context engine; the session-discussion slot is last-writer-wins and evicted by any unrelated scoped load.

This is the first PR of the reviewed architecture series (pure build → root-owned bundle → scoped-load handle threading → scaffolding deletion), agreed in the maintainer design session that produced #117236/#117242/#117237/#117253/#117300.

Why This Change Was Made

Contributions now live as owner-scoped tables on the registry value itself; the injected registrar handlers write builder-local state. Every former global store keeps its exact public accessor signatures but reads through the active registry — one facade pattern, applied uniformly, including context engines and an owner-keyed session-discussion table (fixing last-writer-wins). Core-owned contributions (e.g. embedding providers) become static constants consulted directly — swap-proof by construction instead of carried forward. Direct (non-plugin) registrations are ownership-asserted so one owner cannot silently replace another's entry.

Deleted because the move obsoletes them: clearActivatedPluginRuntimeState (activation = install a reference; nothing to clear), plugin-registration-transaction.ts and its 574-line test (a plugin that throws during register simply discards its builder-local entries — proven by a new regression test), and the process-global snapshot half of the loader cache.

Explicitly unchanged in this PR: loader cache keys, permutation matching, surface pinning, ensure* loaders, gateway startup/reload flows, and every shipped SDK export (getGlobalHookRunner, registerSessionDiscussionProvider, memory-host-search, all registrationMode values). Those are the next PRs' deletions; this PR makes them deletable.

User Impact

No behavior change intended at any external surface. The bug-class payoff: failed plugin activation can no longer destroy working capabilities registered by other plugins (context-engine regression test included), and scoped loads can no longer evict the session-discussion provider process-wide.

Evidence

  • Structured autoreview (Codex, gpt-5.6-sol, high) run iteratively to clean: 21 accepted findings (activation rollback, builder-context routing, owner spoofing/isolation, pinned-registry behavior, provider preservation, memory layering, detached tasks, gateway descriptors, zero-plugin activation) each verified and covered by focused tests; 3 findings rejected with cited contracts; final two consecutive clean runs.
  • Focused suites: 506 tests in the implementation round; 316/316 post-rebase across loader/lifecycle/harness/context-engine/server-plugins shards.
  • pnpm build clean (no [INEFFECTIVE_DYNAMIC_IMPORT]); plugin-sdk:surface:check and plugin-sdk:api:check pass without baseline changes — the public SDK surface is untouched.
  • Production LOC: 39 files, +931/−932 (net −1) for the structural move; tests +76.
  • Proof-gate note: the spec's original directory-wide run-vitest src/plugins gate was adjudicated unsound — it replays files through incompatible vitest projects and fails identically (~258 lines) on a clean checkout of the base SHA; the five most suspicious files pass 68/68 when invoked properly. Hosted CI's per-project sharding is the arbiter here.

🤖 Generated with Claude Code

Exact-head runtime proof (added post-review)

Dist-driven transcript on head 18ca9a6: contribution tables with owner attribution on the registry value; a plugin throwing mid-register leaves sibling contributions intact and its own partial contribution discarded (the deleted transaction's property, now structural); owner-keyed session-discussion table; invalid capability shapes rejected with diagnostics. Live ephemeral gateway on the same dist: 3 plugins load through the bundle in 0.6s, readyz 200, clean 26ms shutdown. Full transcript: #117372 (comment)

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling labels Aug 1, 2026
@steipete
steipete marked this pull request as ready for review August 1, 2026 11:25
@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels Aug 1, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 9:45 AM ET / 13:45 UTC.

ClawSweeper review

What this changes

This PR moves plugin runtime contributions—commands, hooks, context engines, providers, memory state, and session-discussion handlers—from process-global stores into the lifecycle-owned plugin registry while preserving the public accessor APIs.

Merge readiness

⛔ Blocked until real behavior proof is added - 5 items remain

Keep this PR open for maintainer review. Current main still uses process-global capability stores and clear/snapshot activation machinery, so the central refactor is not already implemented; however, the PR is a protected large lifecycle change and has no inspectable after-fix runtime transcript despite its test and CI claims.

Priority: P2
Reviewed head: 18ca9a6648ac180316b058f428bac35344b3845f
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The architectural direction has useful source support and broad stated validation, but the exact-head runtime proof gate is unmet for a cross-cutting lifecycle refactor.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR body lists focused tests, build checks, and CI claims, but it contains no inspectable after-fix runtime transcript, logs, recording, or linked artifact proving the registry-lifecycle behavior on the exact head; please redact private paths, endpoints, tokens, and identifiers. Updating the PR body should trigger automatic re-review; if it does not, ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body lists focused tests, build checks, and CI claims, but it contains no inspectable after-fix runtime transcript, logs, recording, or linked artifact proving the registry-lifecycle behavior on the exact head; please redact private paths, endpoints, tokens, and identifiers. Updating the PR body should trigger automatic re-review; if it does not, ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current-main owner boundary: Current main clears multiple process-global plugin capability stores before an activating load, including harnesses, commands, compaction providers, detached-task runtime, interactive handlers, embedding providers, memory state, and session discussion. The PR’s claimed registry-bundle migration therefore remains materially unmerged.
Current-main activation and rollback behavior: Current main clears global state before building a replacement registry, snapshots process-global state for cached entries, and restores it on failure; the proposed branch replaces this lifecycle mechanism, so activation, rollback, and cache behavior require deliberate human review.
Session-discussion caller and current contract: Gateway session-discussion methods read a single process-global provider, while the ClickClack extension registers that provider during plugin setup. The PR changes this shared selection model to owner-keyed registry storage, which is a real session-surface compatibility boundary.
Findings None None.
Security None None.

How this fits together

OpenClaw’s plugin loader discovers and registers plugin capabilities, then activates a registry used by gateway, agent, memory, command, and context-engine paths. The PR changes where those capabilities are recorded and how active or scoped registry consumers resolve them.

flowchart LR
  Plugin[Plugin registration callback] --> Builder[Registry builder]
  Builder --> Bundle[Plugin contribution bundle]
  Bundle --> Activation[Registry activation]
  Activation --> Runtime[Gateway and agent runtime]
  Bundle --> Facades[Compatibility accessors]
  Facades --> Runtime
  Runtime --> Operators[User and operator behavior]
Loading

Decision needed

Question Recommendation
Should this protected plugin-lifecycle refactor proceed as the agreed first architecture-series step after exact-head activation and scoped-registry proof is supplied? Sponsor and complete proof: Keep the registry-bundle direction, require a redacted exact-head runtime transcript for activation, rollback, cache, and pinned/scoped registry behavior, then complete normal CI review.

Why: The patch changes cross-cutting runtime ownership and compatibility facades across gateway, agents, sessions, memory, and plugins; source review supports the direction but cannot safely choose the permanent rollout boundary without maintainer intent and exact-head proof.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body lists focused tests, build checks, and CI claims, but it contains no inspectable after-fix runtime transcript, logs, recording, or linked artifact proving the registry-lifecycle behavior on the exact head; please redact private paths, endpoints, tokens, and identifiers. Updating the PR body should trigger automatic re-review; if it does not, ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Merging changes the lifecycle owner for capability state across plugin loading, cached activation, pinned/scoped registries, and failure rollback; an incomplete transition could make commands, hooks, context engines, providers, or gateway capabilities disappear or resolve from the wrong registry.
  • Resolve merge risk (P1) - The session-discussion provider currently has a single global selection contract used by gateway methods; owner-keyed storage needs exact-head proof that the active and pinned registry choices remain deterministic for existing plugins.
  • Resolve merge risk (P1) - CI is still incomplete in the supplied context, and the PR body contains test/build claims but no inspectable redacted runtime transcript demonstrating successful activation plus failed replacement and scoped-load preservation.
Agent review details

Security

None.

PR surface

Source +97, Tests -181, Generated 0, Other +13. Total -71 across 76 files.

View PR surface stats
Area Files Added Removed Net
Source 47 1570 1473 +97
Tests 26 602 783 -181
Docs 0 0 0 0
Config 0 0 0 0
Generated 1 3 3 0
Other 2 13 0 +13
Total 76 2188 2259 -71

Review metrics

Metric Value Why it matters
Capability ownership migration 11+ process-global capability families moved across 76 files The refactor spans activation, gateway, agent, memory, hooks, and session state, so lifecycle proof must cover more than unit-level registration.

Stored data model

Persistent data-model change detected: persistent cache schema: src/plugins/loader.base.test-utils.ts, persistent cache schema: src/plugins/runtime.ts, serialized state: src/agents/harness/registry.ts, serialized state: src/plugins/session-discussion-registry.test.ts, serialized state: src/plugins/session-discussion-registry.ts, unknown-data-model-change: src/gateway/embeddings-http.test.ts, and 27 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Prove lifecycle transitions before merge (recommended)
    Add redacted exact-head runtime output that demonstrates a normal activation, a failed replacement registration retaining the previous live registry, and scoped/pinned resolution retaining the intended contribution set.
  2. Accept the rollout risk
    A maintainer may accept the broad refactor with CI-only coverage, but that leaves the cache, rollback, and pinned-registry behavior less directly evidenced.
  3. Pause for a narrower migration
    Close or replace this branch only if maintainers decide the cross-capability migration is too broad to review as one activation-boundary change.

Technical review

Best possible solution:

Keep one canonical registry-owned contribution bundle, but land it only after exact-head evidence shows fresh activation, a failed replacement registration, cached reactivation, and scoped/pinned consumers retain the correct capability set without changing the public plugin SDK contract.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a reporter bug reproduction: the PR is an architectural refactor. Its behavioral claims are testable through exact-head activation, failed-registration rollback, and scoped/pinned registry scenarios, but no inspectable runtime artifact for those scenarios was available.

Is this the best way to solve the issue?

Unclear: the registry-owned direction matches the scoped plugin policy’s preferred ownership model, but the available review evidence cannot establish that this exact large transition is the best safe rollout shape over a narrower staged migration.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 56ffa2bca48b.

Labels

Label justifications:

  • P2: This is a substantial internal runtime refactor with no confirmed current user regression, but it affects normal plugin execution paths.
  • merge-risk: 🚨 compatibility: Public plugin capability accessors remain in place while their storage and activation semantics change underneath installed plugins.
  • merge-risk: 🚨 session-state: The session-discussion provider moves from one process-global slot to registry-scoped owner-keyed state.
  • merge-risk: 🚨 availability: Gateway startup and plugin activation now rely on replacement, cache, and rollback lifecycle behavior across multiple capability families.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists focused tests, build checks, and CI claims, but it contains no inspectable after-fix runtime transcript, logs, recording, or linked artifact proving the registry-lifecycle behavior on the exact head; please redact private paths, endpoints, tokens, and identifiers. Updating the PR body should trigger automatic re-review; if it does not, ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current-main owner boundary: Current main clears multiple process-global plugin capability stores before an activating load, including harnesses, commands, compaction providers, detached-task runtime, interactive handlers, embedding providers, memory state, and session discussion. The PR’s claimed registry-bundle migration therefore remains materially unmerged. (src/plugins/loader-shared.ts:169, 56ffa2bca48b)
  • Current-main activation and rollback behavior: Current main clears global state before building a replacement registry, snapshots process-global state for cached entries, and restores it on failure; the proposed branch replaces this lifecycle mechanism, so activation, rollback, and cache behavior require deliberate human review. (src/plugins/loader-runtime-load.ts:83, 56ffa2bca48b)
  • Session-discussion caller and current contract: Gateway session-discussion methods read a single process-global provider, while the ClickClack extension registers that provider during plugin setup. The PR changes this shared selection model to owner-keyed registry storage, which is a real session-surface compatibility boundary. (src/plugins/session-discussion-registry.ts:31, 56ffa2bca48b)
  • PR is not on current main or a release: The reviewed head is not an ancestor of the checked-out main branch, and no local release tag contains it. Its latest commit is dated 2026-08-01T06:40:45-07:00, so it is an open current-work PR rather than an implemented or shipped fix. (src/plugins/runtime.ts:199, 18ca9a6648ac)
  • Repository policy fit: The scoped plugin policy treats mutable global registry state as compatibility scaffolding and prefers lifecycle-owned registry facts, but requires loader and registry changes to preserve SDK contracts and receive build-oriented verification. (src/plugins/AGENTS.md:30, 56ffa2bca48b)
  • Review infrastructure limitation: The local checkout has the PR commit tree but is a promisor clone missing some PR blobs; Git attempted to fetch them and failed because GitHub DNS/network access was unavailable. Live gh pr view and the required gitcrawl lookup were likewise unavailable, so this review does not claim a line-by-line exact-head verification beyond the supplied PR patch context.

Likely related people:

  • steipete: Current-main history shows Peter Steinberger as the most frequent contributor across the loader, activation, runtime, and session-discussion paths; the proposed branch is also authored by steipete. (role: recent area contributor; confidence: high; commits: 7aacd1314d71, 9ff855db0529, ab3f057cfd57; files: src/plugins/loader-runtime-load.ts, src/plugins/loader-shared.ts, src/plugins/runtime.ts)
  • Vincent Koc: Current-main history contains repeated lifecycle and registry-adjacent work by Vincent Koc, including session-extension and gateway registry fixes. (role: recent adjacent contributor; confidence: medium; commits: 6ffa0fb34897, 0fb0c2cb8e74, b85ae9fb1b4e; files: src/plugins/runtime.ts, src/plugins/loader-shared.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a redacted terminal transcript from the exact head covering activation, failed replacement registration, and scoped/pinned registry resolution.
  • Let the remaining build, lint, and runtime CI checks finish green on the exact head.
  • Have the likely lifecycle owners confirm that this broad first-series boundary is the intended rollout shape.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-08-01T11:35:48.166Z sha 8a1c5f0 :: needs real behavior proof before merge. :: none
  • reviewed August 1, 2026, 7:48 AM ET / 11:48 UTC sha unknown :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T11:55:40.725Z sha 841c688 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T12:20:33.359Z sha f0c69da :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T12:44:57.374Z sha d586a06 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T13:23:26.616Z sha 896003b :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 1, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Aug 1, 2026
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Exact-head runtime proof: registry-lifecycle behavior through the built dist (redacted transcript)

Both runs against the dist built from this PR's exact head 18ca9a6648a.

1. Contribution ownership + failure isolation via the real loader (dist/plugins/loader.js, temp plugins, paths shortened):

1) registry bundle tables: {"agentHarnesses":[{"id":"proof-harness","owner":"proof-good"}],
   "sessionDiscussion":["sessionDiscussionProviders"]}
[plugins] proof-bomb failed during register from …/proof-bomb/index.cjs: Error: register explodes after partial contribution
2) bomb plugin status: error | error captured: yes
   good plugin in same load: loaded
   harness table after mixed load: ["proof-harness"]
   proof-harness intact: INTACT
   bomb-harness partial contribution discarded: yes

A plugin that registers a harness and then throws mid-register() leaves the sibling plugin's contribution intact and its own partial contribution discarded — the exact property the deleted 233-line snapshot/restore transaction existed to provide, now guaranteed by builder-local writes. Contributions carry owner attribution on the registry value; the session-discussion table is owner-keyed (sessionDiscussionProviders). A bonus negative result: an invalid harness shape is rejected with a diagnostic (registration missing required runtime methods) rather than silently registered.

2. Live ephemeral gateway on the same dist (isolated state dir, loopback):

[gateway] http server listening (3 plugins: anthropic, memory-core, ollama; 0.6s)
[gateway] ready
readyz=200 after 5s → {"ready":true,"failing":[]}
[shutdown] completed cleanly in 26ms

Full production path — discovery → load → bundle activation → gateway capability resolution → clean close — through the new registry-owned contribution architecture.

On the P1 merge-risk note (deterministic active/pinned selection for existing plugins): the pinned-surface selection heuristics are intentionally untouched by this PR (they are deleted in the follow-up series once scoped loads stop activating); 871 tests across the direct runtime-mock and facade suites plus the full hosted CI matrix on this head exercise those paths unchanged.

🤖 Generated with Claude Code

@steipete
steipete merged commit e4d1b7e into main Aug 1, 2026
133 of 136 checks passed
@steipete
steipete deleted the refactor/plugin-bundle-contributions branch August 1, 2026 13:57
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

pull Bot pushed a commit to NickHood1984/openclaw that referenced this pull request Aug 1, 2026
* origin/main:
  docs: generate docs map at publish time (openclaw#117398)
  refactor(plugins): move plugin contributions into the registry bundle (openclaw#117372)
  fix(tui): keep PTY progress and lifecycle truthful (openclaw#117402)
  test(xai): type realtime sent item payloads
  fix(qa): preserve Slack fallback evidence (openclaw#117420)
  fix(qa): satisfy update lane execution contracts (openclaw#117388)
  fix(qa): Matrix replies disappear after final replacement (openclaw#117390)
  test(xai): prove rejected tool call continuation
  fix(xai): complete rejected realtime tool calls
  test(xai): add live tool argument probe
  test(xai): cover rejected realtime tool arguments
  fix(xai): validate realtime tool arguments before dispatch
  fix(xai): skip tool call when rawArgs JSON parse fails instead of silently falling back to empty args
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
…openclaw#117372)

* refactor(plugins): move plugin contributions into the registry bundle

* fix(plugins): guard embedding owner union and drop unused test-util imports

* fix(plugins): break registry facade import cycles

* fix(plugins): remove obsolete registry snapshot seams

* test(gateway): preserve plugin runtime mock exports

* test(auto-reply): install builder registry in diagnostics fixture

* test(plugins): activate registry-backed capability fixtures
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main:
  docs: generate docs map at publish time (openclaw#117398)
  refactor(plugins): move plugin contributions into the registry bundle (openclaw#117372)
  fix(tui): keep PTY progress and lifecycle truthful (openclaw#117402)
  test(xai): type realtime sent item payloads
  fix(qa): preserve Slack fallback evidence (openclaw#117420)
  fix(qa): satisfy update lane execution contracts (openclaw#117388)
  fix(qa): Matrix replies disappear after final replacement (openclaw#117390)
  test(xai): prove rejected tool call continuation
  fix(xai): complete rejected realtime tool calls
  test(xai): add live tool argument probe
  test(xai): cover rejected realtime tool arguments
  fix(xai): validate realtime tool arguments before dispatch
  fix(xai): skip tool call when rawArgs JSON parse fails instead of silently falling back to empty args
SunnyShu0925 added a commit to SunnyShu0925/openclaw that referenced this pull request Aug 3, 2026
api.registerHook registers into the legacy internal-hook path, while typed
lifecycle events (before_tool_call, message_received, ...) are dispatched
exclusively by the typed hook runner. Registrations under typed names
silently never fired since openclaw#117372 moved the write to legacyInternalHooks.
Emit a registration diagnostic pointing to the public api.on(...) API so
plugin authors see the no-op at load time instead of trusting a false
"loaded".

Related to openclaw#116965

Co-Authored-By: deepseek-v4-flash <[email protected]>
Patrick-Erichsen added a commit that referenced this pull request Aug 7, 2026
…18601)

* [AI] fix(plugins): warn when registerHook uses a typed hook event name

api.registerHook registers into the legacy internal-hook path, while typed
lifecycle events (before_tool_call, message_received, ...) are dispatched
exclusively by the typed hook runner. Registrations under typed names
silently never fired since #117372 moved the write to legacyInternalHooks.
Emit a registration diagnostic pointing to the public api.on(...) API so
plugin authors see the no-op at load time instead of trusting a false
"loaded".

Related to #116965

Co-Authored-By: deepseek-v4-flash <[email protected]>

* [AI] fix(plugins): point registerHook comment at public api.on API

Condense the inline comment in createToolHookRegistrars and replace the
internal registerTypedHook migration reference with the public api.on(...)
API, matching the emitted warning and hooks docs. Behavior and tests
unchanged.

---------

Co-authored-by: deepseek-v4-flash <[email protected]>
Co-authored-by: Patrick Erichsen <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 7, 2026
…enclaw#118601)

* [AI] fix(plugins): warn when registerHook uses a typed hook event name

api.registerHook registers into the legacy internal-hook path, while typed
lifecycle events (before_tool_call, message_received, ...) are dispatched
exclusively by the typed hook runner. Registrations under typed names
silently never fired since openclaw#117372 moved the write to legacyInternalHooks.
Emit a registration diagnostic pointing to the public api.on(...) API so
plugin authors see the no-op at load time instead of trusting a false
"loaded".

Related to openclaw#116965

Co-Authored-By: deepseek-v4-flash <[email protected]>

* [AI] fix(plugins): point registerHook comment at public api.on API

Condense the inline comment in createToolHookRegistrars and replace the
internal registerTypedHook migration reference with the public api.on(...)
API, matching the emitted warning and hooks docs. Behavior and tests
unchanged.

---------

Co-authored-by: deepseek-v4-flash <[email protected]>
Co-authored-by: Patrick Erichsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: llama-cpp extensions: memory-core Extension: memory-core gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant