Expose plugin approval action metadata#82431
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 27, 2026, 1:37 AM ET / 05:37 UTC. Summary PR surface: Source +834, Tests +857, Docs +100, Generated 0, Other +8. Total +1799 across 43 files. Reproducibility: not applicable. this is a feature/API PR rather than a reported current-main bug. The review is based on the diff, current-main source comparison, PR discussion, and supplied validation logs. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance: Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land only after maintainers accept the plugin approval API/security boundary, the PR documents the concrete AgentKit use cases, and real proof shows command actions and decision actions behaving correctly in at least the Control UI or a live/native approval channel. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a feature/API PR rather than a reported current-main bug. The review is based on the diff, current-main source comparison, PR discussion, and supplied validation logs. Is this the best way to solve the issue? Unclear. The split is narrower than bundling AgentKit into core and matches the plugin-boundary direction, but the API/security boundary and use-case documentation still need maintainer acceptance before this is clearly the best permanent solution. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 95c8fc967876. Label changesLabel justifications:
Evidence reviewedPR surface: Source +834, Tests +857, Docs +100, Generated 0, Other +8. Total +1799 across 43 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
5bf5b5a to
084316e
Compare
084316e to
b41a29c
Compare
9aa6d85 to
b1e22ba
Compare
5477cff to
478115b
Compare
478115b to
2c35aad
Compare
cd3909a to
de97b65
Compare
e42afcb to
4f315fc
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review I pushed Local proof after the patch: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
e2b15b4 to
1d71293
Compare
1d71293 to
67ca0a8
Compare
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
@clawsweeper hatch |
|
🦞👀 I queued a comment sync for this PR. If the egg is hatchable, ClawSweeper will generate the image once and update the existing review comment. |
|
@clawsweeper re-review I pushed Proof: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
this is a big change to our approval/plugin surface area. do you have some docs to go over the specific usecases in agentkit that you'd want to enable with this? |
|
Thank you so much for the review @kevinslin, and for landing the PR! 😊 Yep, I added the use-case context + diagrams to the PR descriptions, but they may be buried under the verification details. Short version: this is for the external AgentKit ClawHub plugin, not bundled core code:
Flow: protected tool -> OpenClaw plugin approval -> AgentKit renders World verification -> proof succeeds -> plugin resolves only its own pending approval -> agent continues. The remaining PRs are the generic host seams for that:
Happy to pull the PR-body diagrams into a shorter standalone doc if that would make review easier. |
Review context
Concrete plugin: Guardiola31337/openclaw-agentkit. The intent is to keep World ID / AgentKit out of OpenClaw core while letting external HITL plugins use the existing approval flow end-to-end.
This PR's role: approval action metadata and no-route pending surface; it does not resolve verified approvals by itself.
Bundle:
Trust boundary to review: should a plugin that already owns a pending approval be allowed to complete that specific approval after external verification, through a typed SDK/Gateway path with admin scope and ownership checks?
Summary:
Verification:
pnpm protocol:checkpnpm plugin-sdk:api:checkpnpm tsgo:extensionspnpm build:plugin-sdk:strict-smokenode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions/discord/src/approval-handler.runtime.ts extensions/matrix/src/approval-handler.runtime.ts extensions/qqbot/src/bridge/approval/handler-runtime.ts extensions/telegram/src/approval-handler.runtime.tsnode scripts/run-vitest.mjs src/gateway/server-methods/plugin-approval.test.ts src/infra/approval-view-model.test.ts src/infra/exec-approval-reply.test.ts src/plugin-sdk/approval-renderers.test.ts extensions/discord/src/approval-handler.runtime.test.ts extensions/matrix/src/approval-handler.runtime.test.ts extensions/qqbot/src/bridge/approval/handler-runtime.test.ts extensions/qqbot/src/engine/approval/index.test.ts src/agents/pi-tools.before-tool-call.e2e.test.ts src/plugins/hooks.before-tool-call.test.tsnode scripts/run-vitest.mjs src/plugins/contracts/host-hooks.contract.test.tsgit diff --check origin/main...HEADReal behavior proof
Behavior addressed: external plugins can attach approval-specific command actions to plugin approval requests and keep those requests pending while their own HITL command flow is responsible for resolution.
Real environment tested: local OpenClaw checkout on macOS, rebased onto current
origin/mainon May 16, 2026.Exact steps or command run after this patch: ran the protocol generator/check, plugin SDK API baseline check, extension typecheck, plugin SDK strict declaration smoke, targeted extension oxlint, focused approval/gateway/plugin Vitest coverage, the host hook contract test, and whitespace diff check.
Evidence after fix:
Observed result after fix: the protocol and SDK baselines reflect the new additive action metadata, representative adapters preserve command actions, approval view/reply rendering carries those commands, and the before_tool_call host hook contract remains compatible.
What was not tested: full release suite, live World ID callback flow, and the follow-up verified plugin-owned resolution API that is split into #82434.
Refs #82336
External plugin integration proof
Behavior addressed: the external ClawHub AgentKit plugin can consume the combined temporary OpenClaw host API branch that includes this PR's approval actions and no-route pending behavior.
Real environment tested: GitHub Actions in
Guardiola31337/openclaw-agentkiton May 16, 2026, checking outGuardiola31337/openclaw@agentkit/external-plugin-host-apisand linking it into the external plugin package.Exact steps or command run after this patch: the remote workflow checked out the temporary OpenClaw host branch, installed with frozen lockfiles, ran
pnpm build gatewayWatch, ranpnpm build:plugin-sdk:strict-smoke, linked the host checkout into the AgentKit plugin, then ranpnpm test:hitlandpnpm pack:check.Evidence after fix:
Observed result after fix: the external plugin builds against the split OpenClaw host APIs, the plugin SDK declarations expose the needed approval/action surface, the AgentKit HITL proof passes, and the package dry-run includes the expected ClawHub plugin artifact.
What was not tested: production World ID credential verification. This remote proof exercises the integrated temporary host branch because the external plugin requires this PR together with #82434 and #82471 for the full HITL path.