Skip to content

docs(plugins): clarify hook runtime activation - #77629

Merged
vincentkoc merged 6 commits into
openclaw:mainfrom
Beandon13:docs/openclaw-77435-hook-routing-20260504220208
Jul 29, 2026
Merged

vincentkoc merged 6 commits into
openclaw:mainfrom
Beandon13:docs/openclaw-77435-hook-routing-20260504220208

Conversation

@Beandon13

@Beandon13 Beandon13 commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Hook-only plugins can be installed and enabled yet remain absent from the live Gateway when their manifest and config do not signal startup intent. The canonical plugin docs did not explain that selection path or how to diagnose it, which led authors to rely on channel metadata that does not activate a hook-only runtime.

Maintainer Rewrite

The earlier draft duplicated activation guidance in older plugin pages. This exact head moves the verified explanation to the consolidated public docs only:

  • docs/tools/plugin.md
  • docs/cli/plugins.md

It documents manifest activation.onCapabilities: ["hook"], explicit hook-policy startup intent, and the precedence of global disable, deny, allowlists, and per-plugin enablement. No runtime behavior changes.

Closes #77435

Evidence

Exact head: 9b4b6965a33104c5048b4f49a5f200dfe240193e

  • reviewed against src/plugins/gateway-startup-plugin-activation.ts
  • reviewed against plugins.entries.<id>.hooks.allowConversationAccess
  • docs inventory passed through the direct Node wrapper
  • MDX validation passed
  • 6,306 documentation links passed
  • changed-file formatting and git diff --check passed
  • fresh exact-patch autoreview: no actionable findings, confidence 0.96

The docs were not deployed from this branch.

Public docs:

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels May 5, 2026
@byungskers

This comment was marked as low quality.

@clawsweeper

clawsweeper Bot commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 12:13 PM ET / 16:13 UTC.

ClawSweeper review

What this changes

This PR adds canonical plugin and CLI troubleshooting guidance explaining how hook-only plugins signal Gateway startup intent and how to verify their live registration.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for normal maintainer review. The current main documentation still explains general plugin enablement and runtime inspection but not the hook-only Gateway startup-selection rule this PR adds; the latest head is a small docs-only clarification with no supported patch defect. Likely related people: vincentkoc (high confidence) carried the current-head documentation rewrite and is assigned to this PR.

Priority: P3
Reviewed head: 9b4b6965a33104c5048b4f49a5f200dfe240193e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused docs-only patch with an evidence-backed runtime explanation and no actionable correctness finding; it needs only a current-main review refresh.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 4 items Current documentation gap: Current main explains plugin enablement, allow/deny precedence, Gateway restart, and runtime inspection, but its plugin-hooks section does not document that a hook-only plugin needs either hook capability activation metadata or an explicit hook policy to be selected at Gateway startup.
CLI troubleshooting gap: Current main's runtime-hook debugging guidance lists plugins inspect --runtime and Gateway status, but does not tell an operator to check hook startup intent when a hook-only plugin is absent from runtime inspection; this PR adds that focused diagnostic step.
Current-head provenance: The provided PR commit history shows the final documentation rewrite at 9b4b696, after prior review cycles requested removal of an unsupported example and relocation to the consolidated current documentation pages. The latest review cycle reported no remaining actionable finding.
Findings None None.
Security None None.

How this fits together

Gateway startup plans which configured plugins to load from manifest metadata and plugin policy. A hook-only plugin that is enabled but not selected never registers in the running Gateway, so the docs direct operators to declare startup intent, restart the Gateway, and inspect the live runtime.

flowchart LR
  A[Plugin manifest and config] --> B[Gateway startup planning]
  B --> C{Hook startup intent present?}
  C -->|Yes| D[Plugin loads in Gateway]
  C -->|No| E[Plugin absent from runtime]
  D --> F[Runtime hook registration]
  F --> G[Runtime inspection output]
  E --> H[Plugin troubleshooting guidance]
Loading

Before merge

  • Resolve merge risk (P1) - The branch is behind current main, so the final maintainer pass should rebase or refresh the two documentation hunks against the current plugin terminology before merge.
  • Complete next step (P2) - No mechanical repair is indicated; the remaining action is the assigned maintainer's normal current-main documentation review.
Agent review details

Security

None.

PR surface

Docs +14. Total +14 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 2 14 0 +14
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 14 0 +14

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #77435
Summary: This PR is a documentation candidate for the canonical hook-runtime activation report; the separate extension-loader regression has overlapping symptoms but a broader and potentially distinct runtime cause.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Rebase the docs-only patch onto current main, keep the two concise startup-intent diagnostics in the canonical plugin guides, and land it if the assigned reviewer confirms the wording still matches the activation planner.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Rebase the docs-only patch onto current main, keep the two concise startup-intent diagnostics in the canonical plugin guides, and land it if the assigned reviewer confirms the wording still matches the activation planner.

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

Not applicable: this PR changes documentation only. The underlying operator path is concretely described through Gateway restart and openclaw plugins inspect <id> --runtime --json, but no runtime behavior changes are proposed here.

Is this the best way to solve the issue?

Yes. Adding the explanation to the consolidated plugin guide and CLI troubleshooting page is narrower and more maintainable than duplicating guidance in older hook-specific pages; a final wording refresh against current main is still needed.

AGENTS.md: unclear because the file could not be read completely.

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

Labels

Label justifications:

  • P3: This is a narrow documentation clarification for plugin authors and operators; it changes no runtime behavior, configuration, or packaged surface.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Evidence

What I checked:

  • Current documentation gap: Current main explains plugin enablement, allow/deny precedence, Gateway restart, and runtime inspection, but its plugin-hooks section does not document that a hook-only plugin needs either hook capability activation metadata or an explicit hook policy to be selected at Gateway startup. Public docs: docs/tools/plugin.md. (docs/tools/plugin.md:370, b4d14d784806)
  • CLI troubleshooting gap: Current main's runtime-hook debugging guidance lists plugins inspect --runtime and Gateway status, but does not tell an operator to check hook startup intent when a hook-only plugin is absent from runtime inspection; this PR adds that focused diagnostic step. Public docs: docs/cli/plugins.md. (docs/cli/plugins.md:401, b4d14d784806)
  • Current-head provenance: The provided PR commit history shows the final documentation rewrite at 9b4b696, after prior review cycles requested removal of an unsupported example and relocation to the consolidated current documentation pages. The latest review cycle reported no remaining actionable finding. Public docs: docs/tools/plugin.md. (docs/tools/plugin.md:258, 9b4b6965a331)
  • Related work boundary: The linked feature report remains open and explicitly tracks the broader choice between documentation, fail-fast behavior, and runtime behavior. This docs-only PR is a candidate documentation response, not evidence that the broader runtime question is already resolved.

Likely related people:

  • vincentkoc: Authored the current-head rewrite and two earlier branch-alignment commits, and is assigned to the PR; those commits specifically moved the guidance onto the canonical plugin documentation pages. (role: recent documentation and activation-path contributor; confidence: high; commits: 09cf10e4c85e, 4afe580252ca, 9b4b6965a331; files: docs/tools/plugin.md, docs/cli/plugins.md)

Rank-up moves

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

  • Rebase or otherwise refresh the two documentation hunks against current main, then have the assigned reviewer confirm the terminology still matches the activation planner.

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 (3 earlier review cycles)
  • reviewed 2026-07-03T21:06:28.290Z sha 060f3c1 :: needs changes before merge. :: [P2] Remove the unsupported root capabilities key
  • reviewed 2026-07-29T15:45:47.081Z sha b2faeed :: needs changes before merge. :: [P1] Move the guidance to the current plugin documentation
  • reviewed 2026-07-29T16:05:08.718Z sha 9b4b696 :: needs maintainer review before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 5, 2026
@Beandon13
Beandon13 force-pushed the docs/openclaw-77435-hook-routing-20260504220208 branch from 5c224eb to 060f3c1 Compare May 5, 2026 14:23
@Beandon13

Copy link
Copy Markdown
Contributor Author

Thanks @byungskers! The current revision already adds a concrete manifest snippet right below that note in docs/plugins/hooks.md (lines 136–144 in the diff): an activation.onCapabilities: ["hook"] example with matching capabilities so the runtime contract is visible side-by-side. Happy to expand it to a fuller manifest (entry, version, registered hook ids) if that would help plugin authors more — let me know your preference.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 14, 2026
@openclaw-barnacle openclaw-barnacle Bot added the proof: supplied External PR includes structured after-fix real behavior proof. label May 14, 2026
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 15, 2026
@RomneyDa

Copy link
Copy Markdown
Member

Heads up: this PR needs to be updated against current main before the new required Dependency Guard check can pass.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jun 14, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jun 21, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jul 27, 2026
vincentkoc and others added 4 commits July 29, 2026 17:39
Preserve the contributor branch while replacing the stale example with the reviewed current-runtime documentation.
Preserve contributor branch ancestry while moving the guidance to canonical plugin docs.
@vincentkoc vincentkoc self-assigned this Jul 29, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 29, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 29, 2026
@vincentkoc
vincentkoc merged commit bfc99c9 into openclaw:main Jul 29, 2026
67 of 81 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
* docs(plugins): clarify hook runtime activation

* docs(plugins): correct hook startup activation guidance

* docs(plugins): clarify hook runtime activation

* docs(plugins): clarify hook runtime startup

Co-authored-by: Brandon Zarnitz <[email protected]>

---------

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

Labels

docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS stale Marked as stale due to inactivity status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Plugin SDK — fail-fast or document hook routing for non-capability plugins

4 participants