Repository navigation
Conversation
Record typed hooks the registry refuses under host hook policy on the live plugin record, expose them as plugins.list runtime.blockedHooks, and show an Access blocked notice with a Review permissions link that focuses the blocking setting. Refs openclaw#155227
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR exposes policy-blocked plugin hooks in the Control UI and links each warning to the existing permission control. Example: Lossless Claw registers before_prompt_build without allowConversationAccess=true.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this PR addresses a current plugin-diagnostics gap and contains useful focused work, but two UI defects and an unresolved scope decision prevent acceptance. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherPlugin registration checks host hook policy, the live registry records refusals, plugins.list projects them, and the Control UI renders warnings alongside existing permission controls. flowchart LR
A[Plugin hook registration] --> B[Host hook policy]
B --> C[Live plugin record]
C --> D[Gateway plugin inventory]
D --> E[Control UI warning]
E --> F[Existing permission editor]
Technical reviewBest possible solution: Expose one lifecycle-scoped refusal contract through existing plugin views and permission controls, using ref-owned focus that reveals a filtered target. Do we have a high-confidence way to reproduce the issue? Current-main source confirms that denied typed hooks produce warnings without structured Control UI linkage; this read-only review performed no live reproduction. Is this the best way to solve the issue? Recording refusals at the existing policy owner and reusing permission controls is a sound direction, but focus must survive filtering and the overlapping implementations need one agreed contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 83c72975d9e4. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +202, Tests +333, Docs +7. Total +542 across 21 files. Added test files: 1. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 24, 2026, 1:53 AM ET / 05:53 UTC. |
|
This pull request has been automatically marked as stale after 7 days without qualifying human activity. |
|
Closing due to inactivity. |
feat(plugins): show blocked hook permissions in the Control UI
Related: #155227 (first milestone: host-observed diagnostics). Overlaps #136474, which records the same refusals for the CLI and
/statusand is still open; this branch uses the same reason vocabulary so the two can converge.What Problem This Solves
When host hook policy blocks a typed hook, the registry logs a warning and drops the registration. A common case is a non-bundled plugin without
plugins.entries.<id>.hooks.allowConversationAccess=true. The Control UI showed the plugin as enabled and active, with no sign that some of its hooks were not running. The operator in #155227 found the cause only in Gateway logs, and then had to hunt for the right control under plugin settings → Permissions.Why This Change Was Made
One owner, from refusal to rendering:
registerTypedHook(src/plugins/registry-registrars-tools-hooks.ts) now records{ hookName, reason, configPath }on the livePluginRecord.blockedHooksat the point where it refuses. Warning messages are unchanged.conversation-access-missing(non-bundled default deny),conversation-access-denied(explicitfalse), andprompt-injection-denied. These match fix(plugins): surface blocked hook registrations in health views #136474.PluginRuntimeStatusSchemagains optionalblockedHooks(closed object,maxItems: 64). This is an additive field, not a protocol version bump. Swift and Kotlin generation checks pass.plugins.listincludesruntime.blockedHooksonly for records with statusloaded. A record that is no longer loaded doesn't describe live hook behavior.?view=settings&setting=hooks.<grant>. The settings editor scrolls to that permission row, focuses its control, and marks it.plugins.listreports the reloaded runtime without the blocker. A cleared notice confirms registration, not that the hook has run.docs/tools/plugin.mddescribes the notice and what clearing it means.Production LOC: +219/-17. That includes the schema, i18n strings, CSS, the docs paragraph, and comments. Tests: +198/-2, plus a new 137-line E2E file.
User Impact
Not In This PR
The issue leaves these product decisions open:
Accepted edge case: if a schema refresh with a cached schema re-renders the permission rows after the editor has looked for the target, the one-time scroll/focus can be missed. The notice and link still work. A review found this window narrow and the result recoverable, so I didn't add retry machinery for it.
Evidence
ui/src/pages/plugins/plugin-blocked-hooks.e2e.test.tscaptured before/after screenshots from the same fixture. I inspected them; they are local only and not yet embedded here.main): the row shows no warning, and the settings page shows "Read conversation context" unchecked and unmarked.?view=settings&setting=hooks.allowConversationAccesswith that row marked and its checkbox focused. The detail notice namesbefore_prompt_build. After the toggle is saved, the notice remains. Afterplugins.listreports the applied runtime, the notice is gone.pnpm test src/plugins/loader.test.ts --maxWorkers=1 -t "prompt injection is disabled|conversation typed hooks": 4 passed. These cover the real loader recording each reason, the config path, and the absence of blockers when allowed.pnpm test src/gateway/server-methods/plugins.runtime-owner.test.ts --maxWorkers=1: 4 passed, about 42s wall, most of it suite setup. Covers the loaded record projectingblockedHooksand a disabled record omitting them.pnpm test ui/src/pages/plugins --maxWorkers=4: 16 + 1 files, 128 + 188 tests passed. New tests:settingparam is dropped on tab switches.pnpm test:ui:e2e ui/src/pages/plugins/plugin-blocked-hooks.e2e.test.ts: 1 passed, about 34s wall.pnpm protocol:check: passed (registry, generated schema, Swift/Kotlin determinism, since guard).pnpm tsgo:core,pnpm tsgo:ui,pnpm tsgo:core:test: clean.oxlintandoxfmt --checkon the touched files,pnpm lint:ui:styles,pnpm ui:i18n:verify,pnpm format:docs:check,git diff --check: clean.settingparam no longer sticks across tab links, and review links keep other search params.🤖 Generated with Claude Code