Add World ID AgentKit HITL approvals#78583
Conversation
|
Codex review: found issues before merge. Summary Reproducibility: not applicable. This PR adds a new opt-in integration rather than reporting a current-main bug. The blocking concern is source-reproducible by reading the PR-head SDK export, admin helper, and AgentKit call sites. Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Keep the AgentKit approval direction, but expose only narrow proof-backed approval resolution and controlled session-message helpers instead of a generic public operator.admin SDK client. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds a new opt-in integration rather than reporting a current-main bug. The blocking concern is source-reproducible by reading the PR-head SDK export, admin helper, and AgentKit call sites. Is this the best way to solve the issue? No as written: the proof-backed approval approach is coherent, but the public SDK authority boundary is broader than the feature needs. A narrower SDK/gateway capability for verified approval resolution and controlled approval-message injection would be safer. Full review comments:
Overall correctness: patch is incorrect Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 8859e89e075e. |
|
Addressed the ClawSweeper blockers in
Latest Validation run locally:
@clawsweeper re-review |
f442728 to
7f054a9
Compare
a5ade9f to
e76ebe6
Compare
e76ebe6 to
b8e798b
Compare
|
Addressed the ClawSweeper grant-scoping blocker in
Validation run locally:
Current CI on the new head has @clawsweeper re-review |
8bb2912 to
6d06b4f
Compare
6d06b4f to
2a120d0
Compare
2a120d0 to
416a82b
Compare
416a82b to
42b7a80
Compare
42b7a80 to
3719d9d
Compare
3719d9d to
82fc558
Compare
82fc558 to
3905b07
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Dependency Changes DetectedThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
This comment was marked as low quality.
This comment was marked as low quality.
|
Please publish this on ClawHub. If there's hooks/API you miss, let's open a separate issue. We're working hard to get plugins out of core and the repo, not gonna add even more. |
Summary
agentkitplugin, World ID human approval mode, hosted/custom World approval configuration, AgentKit CLI/status/request helpers, proof-backed plugin approval resolution, TUI/chat/channel approval actions, docs, changelog, and focused tests.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
agent-kit-x-openclaw-hitl-compressed.mp4
worldcoin/wld-android, approved the resultingexecrequest with World App, then repeated multiple pendingexecrequests to exerciseallow-once, remaining-pending reminders, andallow-alwayssession trust.Copied live TUI output (redacted):
Copied live gateway output (redacted):
allow-oncedid not persist a reusable grant,allow-alwayspersisted the configured grant and resolved matching pending approvals, and retry prompts stayed actionable after failed/reused World sessions.Root Cause (if applicable)
allowedDecisions, command-only approval actions, proof-backed plugin resolution, retryable chat/TUI approval payloads, matching pending approval cleanup after persistent trust, or hosted human-approval readiness without an explicit broker.Regression Test Plan (if applicable)
extensions/agentkit/src/*.{test.ts},src/gateway/server-methods/plugin-approval.test.ts,src/gateway/method-scopes.test.ts,src/plugin-sdk/approval-renderers.test.ts, channel approval renderer tests, and the isolated hosted human HITL harness.plugin.approval.resolveVerifiedfor allow decisions, renders command actions across TUI/chat/channel surfaces, keeps failed approvals retryable, requires explicit hosted broker configuration, and handles multiple pending matching tool calls reliably.User-visible / Behavior Changes
agentkitplugin with World AgentKit registration/status/request/verifier CLI helpers.Verify with Worldplus decision actions such asDeny.hitl.humanApproval.brokerUrl; OpenClaw does not ship a default remote broker URL.Diagram (if applicable)
Security Impact (required)
Yes/No) Yes.Yes/No) Yes.Yes/No) Yes.Yes/No) Yes.Yes/No) No.Yes, explain risk + mitigation: AgentKit HITL is opt-in and only blocks explicitly configured protected tools. Generic approval clients can deny AgentKit requests but cannot allow proof-required requests unless the AgentKit plugin verifies World proof and calls the admin-scopedplugin.approval.resolveVerifiedmethod for its own plugin id. Hosted broker URLs are explicitly configured; OpenClaw no longer defaults to an OpenClaw-operated remote broker. Hosted mode sends only the derived World action, operator-facing description, TTL, and environment to the configured broker. Custom signing keys are config/env driven; no signing key or app secret is committed. IDKit file-fetch compatibility is scoped to IDKit's own WASM file and restores global fetch after use.Repro + Verification
Environment
hitl.mode: "human-approval", protected toolexec, explicit hosted broker URL, World app/RP ids, signing key file outside the repo, isolated OpenClaw home/state.Steps
agentkitin an isolated OpenClaw config withhitl.enabled: true,hitl.mode: "human-approval", a protected tool such asexec, and an explicithitl.humanApproval.brokerUrl.allow-once,allow-always, and deny paths.Expected
hitl.humanApproval.brokerUrlis configured.allow-onceresolves only the current request and does not create a future grant.allow-alwaysstores a scoped grant and resolves matching pending approvals.Actual
Evidence
Attach at least one:
Validation run on the rebased branch:
pnpm docs:listpassed.pnpm installcompleted after dependency updates.pnpm exec oxfmt --check --threads=1 $(git diff --name-only origin/main...HEAD | awk '{print $1}')passed on 108 files before the follow-up; after the follow-up,pnpm exec oxfmt --check --threads=1 extensions/agentkit/src/config.ts extensions/agentkit/src/status.test.ts extensions/agentkit/openclaw.plugin.json && git diff --checkpassed.pnpm config:docs:checkpassed after regeneratingdocs/.generated/config-baseline.sha256.pnpm deps:root-ownership:checkpassed.pnpm test extensions/agentkit/src/cli.test.ts extensions/agentkit/src/command.test.ts extensions/agentkit/src/hitl.test.ts extensions/agentkit/src/hitl-approvals.test.ts extensions/agentkit/src/human-approval.test.ts extensions/agentkit/src/human-approval-background.test.ts extensions/agentkit/src/protected-request.test.ts extensions/agentkit/src/status.test.ts extensions/agentkit/src/world-id.runtime.test.ts extensions/telegram/src/approval-handler.runtime.test.ts extensions/qqbot/src/bridge/approval/handler-runtime.test.ts extensions/matrix/src/approval-handler.runtime.test.ts src/gateway/server-methods/plugin-approval.test.ts src/gateway/method-scopes.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/plugin-sdk/approval-renderers.test.ts src/media/qr-terminal.test.ts -- --reporter=verbosepassed 7 Vitest shards / 219 tests.pnpm buildpassed.dist/extensions/agentkit/index.jsimports, shared SDK QR renderer works,@worldcoin/idkit-coreresolves, IDKit WASM exists, and request-signing exports are present.OPENCLAW_LOCAL_CHECK=1 OPENCLAW_LOCAL_CHECK_MODE=throttled pnpm check:changedcurrently fails on an upstream-main Google Chat type error:extensions/googlechat/src/channel.ts(39,8): error TS2724: "./channel.deps.runtime.js" has no exported member named 'ChannelMessageActionName'.Proof this PR does not touch the failing files:git diff --exit-code origin/main -- extensions/googlechat/src/channel.ts extensions/googlechat/src/channel.deps.runtime.tsexits cleanly.Human Verification (required)
What you personally verified (not just CI), and how:
allow-onceno persistent grant,allow-alwaysscoped grant and sibling pending approval resolution.Review Conversations
Compatibility / Migration
Yes/No) Yes.Yes/No) Yes, new optionalplugins.entries.agentkit.configfields.Yes/No) No.Risks and Mitigations
denyto generic decisions; allow decisions require AgentKit-ownedresolveVerifiedafter World proof.