Skip to content

feat(plugins): one consent screen for plugin capabilities, bound to the reviewed artifact - #130168

Merged
steipete merged 16 commits into
mainfrom
steipete/musing-pascal-efafdf
Aug 27, 2026
Merged

steipete merged 16 commits into
mainfrom
steipete/musing-pascal-efafdf

Conversation

@steipete

@steipete steipete commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Installing or enabling a plugin in OpenClaw gives it real authority — it can register tools, own providers and channels, contribute MCP servers, and request hooks that read conversation content or mutate prompts. Today an operator sees none of that at the moment they decide. The enforcement exists and is strong (manifest declarations validated fail-closed at registration, per-plugin capability grants, integrity-pinned install records, ClawHub trust verdicts), but it is spread across config, install records and registration diagnostics, and none of it surfaces in the Control UI plugin flow. The operator clicks Enable and something happens.

This adds one legible consent moment, on every surface where a plugin gains authority.

Why This Change Was Made

A source-audited comparison found this is the one plugin-security area where a competing agent is ahead, and that the gap is presentation rather than enforcement. That comparison also pointed at the right mechanism: show the declared set once, pin it, and re-prompt when it widens.

The design difference here is what the acceptance is anchored to. Re-consent that trusts a plugin to honestly re-declare its own surface can be defeated by a plugin that lies. This implementation hashes the surface read from the artifact on disk and verifies it again at the moment of acceptance, so the operator approves declared capabilities derived from the actual artifact rather than catalog metadata. The review token hashes that declared surface, not executable-file bytes; installer-provided artifact integrity is recorded separately.

User Impact

Installing a managed external plugin, or enabling one without current acceptance, now shows a single screen: identity and version, install source with pinned artifact integrity, the manifest-declared capability surface in human terms, the operator-granted capability flags with their effective values, and the ClawHub trust verdict when one exists. Confirmation is explicit. Re-enabling an unchanged, already accepted plugin does not prompt again.

Updates only re-prompt when the declared surface widens, and the prompt shows exactly what was added. Unchanged or narrowed surfaces refresh the stored acceptance silently.

Non-interactive contexts (automation, CI) fail closed with a typed error naming --accept-capabilities, mirroring the existing install-policy acknowledgment pattern. Bundled plugins are exempt — they ship with the release rather than arriving as separately installed artifacts — and get the same capability visibility in the plugin detail overlay without a blocking gate.

Before / after

Plugin detail overlay — before it showed only Category and Plugin ID:

before detail

After, with a Capabilities section fed by the new plugins.inspect:

after detail

Enabling an external plugin — before, the Enable button acted immediately:

before list

After, one consent screen. Note the Contracts row surfacing gatewayMethodDispatch and trustedToolPolicies, and the explicit disclosure that code plugins register hooks at runtime rather than an empty "no hooks" row:

after consent dialog

Evidence

Original feature verification: live-tested against a real gateway (isolated OPENCLAW_STATE_DIR, own port, never the operator's) with a real plugin artifact installed from disk:

  • Non-interactive install without consent fails closed naming --accept-capabilities.
  • --accept-capabilities installs and persists acceptance into the install record: exact surface, SHA-256 hash, timestamp — read back directly from SQLite.
  • Disable then re-enable is silent while acceptance is current.
  • Widening control pair: adding gatewayMethodDispatch and trustedToolPolicies while leaving tools unchanged is blocked. Before this change those two families were not part of the hashed surface at all, so that update produced an identical hash and no prompt.
  • Carrying an earlier acceptance forward requires the install record to pin artifact integrity. Local-path installs record none, so they re-prompt on every install rather than inheriting acceptance — a deliberate consequence of closing the cross-artifact replay hole, and documented in docs/plugins/manage-plugins.md.
  • Control UI: plugins.inspect on dialog open, then plugins.setEnabled carrying acknowledgeCapabilities: { reviewToken: "8a84c182…" } on confirm, captured from the WebSocket frames; acceptance rewritten server-side afterwards.

Automated: 7 Vitest shards green (10,379 UI tests plus the plugin/gateway/protocol/CLI suites). pnpm build green including the Control UI performance gate with zero violations (startup JS gzip 340819 B against a 340900 B limit, no baseline raised). tsgo clean across src/, ui/, packages/. pnpm ui:i18n:verify green. Swift protocol generation check green.

A note on the bundle budget

An earlier revision imported the typebox validator registry from a module the Control UI loads, pulling every protocol schema into the browser startup bundle (+149 KiB gzip, blowing the budget by 45%). Fixed by following the existing install-policy-warning-error-details convention — a registry-free structural reader, with types still single-sourced from the schema via type-only imports — plus moving consent-only code off the boot-path barrel and registering the consent copy as a lazily loaded catalog like en-activity. No performance baseline was raised.

Review response

An independent review of the first revision found the acknowledgment was not bound to what the operator reviewed, and that only 1 of 22 manifest contract families reached the consent surface. Both are fixed here, and the fix for the first collapsed the error payload (the registry-free reader went 395 → 91 lines) because it was duplicating plugins.inspect field-for-field.

Maintainer review follow-through

The previously listed activation and inspection gaps are closed. Onboarding and required runtime installation, provider/inference activation, channel/search setup, doctor repair/adoption, managed linked installs, updates, and chat enablement now use the shared artifact-consent owner. Noninteractive setup cannot silently approve capabilities. Bare unmanaged configured load paths remain outside managed-install consent and are documented explicitly; already-enabled legacy plugins do not receive a retroactive prompt.

Artifact inspection now uses canonical discovery and manifest precedence, so installation, the review screen, and enablement agree on the package-owned surface. It preserves explicit entry overrides and lexical symlink behavior, deduplicates physical package sources, and refuses missing sibling metadata. Setup holds the existing lifecycle lease through runtime resolution and revalidates staged activation at config publication, so a widened replacement installed during asynchronous login cannot inherit an older review. Update refusal leaves the old enabled plugin intact.

Control UI installs now use one canonical flow for catalog and search results: the server stages the requested package, the UI inspects that artifact after consent is required, and the operator confirms exactly once with its review token. There is no preliminary capability-less confirmation. Trust-policy acknowledgements survive the token retry. Three regression cases failed before this fix; the repair removed 61 net production lines. Consent and detail state are also invalidated on reconnect, and late responses cannot overwrite a reopened detail panel.

The final rebase preserves main's deferred install transactions from #122984. Artifact consent composes with the existing stage hook, while the transaction owner controls rollback before persistence and retention after commit. The five-source transaction matrix now uses actual staged payloads and retains explicit capability acceptance. Three tests of the superseded inferred-cleanup path were removed.

Verification: the integrated branch passed 599 focused tests across 14 files (129 plugin, 252 CLI, 73 UI, 145 inference), core production/test types, and scoped lint. Earlier owner/sibling runs passed 1,401 tests across 50 files; these counts overlap. Fresh isolated Codex reviews of the repairs, complete feature, UI flow, and final integration reported no accepted actionable findings.

At commit 1472351, the full build passed every compiler, runtime, SDK and UI performance stage. Startup JS was 341054 bytes gzip against the 343506-byte enforcement limit; no baseline was raised. Fresh real CLI/Gateway smoke tests used the rebuilt runtime and disposable state: declined linked/package installs published no install record or artifact; accepted installs recorded the canonical package surface; inspection matched acceptance; widening the installed manifest invalidated the old token; rejection left config and acceptance unchanged; fresh consent enabled the plugin. Both owned Gateways were stopped afterward.

The final CI repairs consolidate duplicate inference execution-plan construction (six fewer production lines) and make a cloud-worker settings fixture wait for its previous applied-config refresh before deferring the next read (five test lines, no product change). The 145 inference tests and all 7 cloud-worker browser tests passed afterward, along with types, lint and fresh independent review. All 6 plugin-page browser E2E tests also passed on the pushed head, including staged capability review. Hosted CI for the preceding head passed all 145 selected jobs (11 skipped). The subsequent review repairs passed fresh exact-head CI on 3945231: all 145 selected jobs passed, with 11 skipped. CodeQL, dependency checks, and separate mobile code-analysis workflows also passed.

The latest ClawSweeper findings are repaired at their owners in 394523172ab. Inspection and shared consent-review construction now use the existing URL redactor for display-facing provenance; the operational Git source remains unchanged for update/install use. The Control UI no longer predicts consent from external origin: it attempts enablement and opens review only on the server's typed consent-required response. This removes the redundant prompt for accepted external plugins and deletes the duplicate controller wrapper (ten fewer net production lines across both repairs).

Three backend and four UI assertions failed before these repairs. The repaired paths passed 121 focused tests across seven files, plus all seven browser E2E tests across the plugin page and config-mutation files. Core, UI and test types, scoped type-aware lint, formatting, the max-lines ratchet, and independent Codex review passed; one missing test-fixture field caught by the type gate was corrected and its seven inspection tests rerun.

A fresh real Gateway before/after probe seeded synthetic credentials into the existing disposable plugin's Git provenance through the canonical install-record writer. The previous built Gateway reproduced the raw response. The patched source-entry Gateway returned only the redacted URL, preserved the operational record and review token, and accepted disable/re-enable without a new acknowledgement. The probe restored the original disposable record and stopped both owned Gateways. This proves the real RPC projection, not an authenticated Git clone or a fresh local packaged build. Rendered-dialog and browser tests separately cover safe provenance display and accepted external enablement.

Classified net LOC versus the integration base: runtime/UI production +3,592; authored localization +72; tests and test support +5,263; generated protocol +280; tooling/config +22; docs +85. Pure module moves cancel in these net counts. The feature growth provides the shared declaration/token contract, protocol and consent UI, and missing activation boundaries; the last UI and inference simplifications remove 67 net production lines, and the final review repairs remove another ten.

The original sanitized before/after screenshots above remain applicable. A fresh real-profile browser recording was unavailable because the Chrome relay could not connect; no new recording is claimed. Hosted browser E2E and component checks provide supporting UI evidence. The earlier local full macOS installer fixture run was stopped after prolonged execution and is not counted as a pass.

Acceptance records are explicit consent facts: if a later enable-config write fails, the plugin remains disabled but the prior explicit acceptance may remain recorded. Staged install/config publication has compensation and regression coverage. This PR does not introduce a SQLite schema-version change; main's independently landed storage migration is preserved.

Maintainer decision on the latest exact-head review: retain explicit capability acknowledgement for noninteractive managed activation as the intended public contract. This follows the maintainer-author's explicit landing request for this feature. Existing current acceptance is reused; already-enabled legacy plugins are not retroactively blocked; the flag and upgrade behavior are documented. The latest ClawSweeper review reports no actionable code or security finding and accepts the real Gateway proof. Its incomplete-checkout limitation was resolved independently: the lead inspected the complete merge base, PR head, and current main at 1c80cf8. A conflict-free three-way merge preserves main's unrelated Cron fields and cloud-worker changes alongside this PR's consent and fixture repairs. Exact-head hosted CI is now green; native prepare and merge will revalidate the head and required gate.

Release-note context: add artifact-bound declared capability review to managed plugin installation and activation across CLI, chat, Control UI, setup, and repair, with re-consent for widened updates. Root CHANGELOG.md is release-owned and is not edited in this PR.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts labels Aug 26, 2026
@steipete
steipete marked this pull request as ready for review August 26, 2026 14:26
@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 5:42 AM ET / 09:42 UTC.

ClawSweeper review

What this changes

Adds artifact-derived capability consent for managed plugin install, update, and enable flows across the Gateway, CLI, setup flows, and Control UI.

Merge readiness

⚠️ Needs maintainer review before merge - 4 items remain

Keep open for maintainer review: this MEMBER-authored, protected-label PR introduces a security-sensitive activation contract and still needs explicit compatibility sponsorship plus exact-head CI before merge. The latest redaction and accepted-reenable repairs are present in the reviewed PR head, and no discrete patch defect was established.

Priority: P1
Reviewed head: 394523172abb857e93742cfe356c33e1829d47dd
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The PR presents strong reported runtime proof and focused regression coverage, but independent full-diff/current-main verification is blocked by the incomplete local Git object graph.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body and latest author comment provide after-fix isolated Gateway evidence for the redacted inspection response, stale-token rejection, and accepted re-enable flow; the evidence is terminal/runtime proof rather than a claim of a new browser recording.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body and latest author comment provide after-fix isolated Gateway evidence for the redacted inspection response, stale-token rejection, and accepted re-enable flow; the evidence is terminal/runtime proof rather than a claim of a new browser recording.
Evidence reviewed 7 items Artifact-bound consent owner: The PR head computes a deterministic declared-surface hash, re-reads the installed artifact after an interactive acknowledgement, and rejects a mismatched review token before persisting acceptance.
Final activation boundary: The Gateway-facing enable path invokes the consent owner before configuration is written, while the write method remains operator-admin scoped.
Read-scope provenance projection: Inspection redacts the persisted resolved spec before returning it through the read-scope RPC; the focused test covers both spec fields and verifies the record remains operationally unchanged.
Findings None None.
Security None None.

How this fits together

Managed plugin lifecycle actions enter through the CLI, setup flows, or Control UI and inspect the installed or staged plugin manifest before changing configuration. The consent owner records a reviewed declared surface and the Gateway permits later activation only when that surface remains current.

flowchart LR
  A[CLI, setup, or Control UI] --> B[Managed plugin action]
  B --> C[Read staged or installed artifact]
  C --> D[Build declared capability surface]
  D --> E{Current operator acceptance?}
  E -- no --> F[Show review and require token]
  E -- yes --> G[Persist activation or update]
  F --> G
  G --> H[Gateway reload and plugin runtime]
Loading

Decision needed

Question Recommendation
Should OpenClaw make explicit capability acceptance mandatory for existing noninteractive managed plugin install, update, and enable flows? Sponsor the consent contract: Keep explicit acceptance as the public default, document the upgrade behavior, and merge after exact-head CI is green.

Why: This is an intentional security-versus-automation compatibility decision, not a mechanical correction: the new CLI flags and fail-closed behavior can interrupt established unattended workflows.

Before merge

  • Resolve merge risk (P1) - Existing noninteractive managed install, update, and enable automation can now stop until it supplies the new explicit capability acknowledgement; this intentional compatibility change needs maintainer sponsorship.
  • Resolve merge risk (P1) - Exact-head hosted CI is still incomplete, and the local checkout could not materialize a full base-to-head comparison for an independent merge review.
  • Complete next step (P2) - A maintainer must decide the intentional security and upgrade behavior; no narrow mechanical repair was identified.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Reported scope 145 files, +11,285/-1,971 reported The consent feature spans plugin lifecycle, Gateway protocol, CLI, setup, native bindings, and Control UI, so exact-head integration evidence matters.
Production versus test LOC Not independently classifiable locally The review checkout lacks a materialized PR merge base, preventing a reliable source-versus-test delta beyond GitHub's reported aggregate.

Stored data model

Persistent data-model change detected: serialized state: scripts/lib/control-ui-i18n-catalog.ts, unknown-data-model-change: packages/gateway-protocol/src/schema/plugins.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Confirm the upgrade contract before merge (recommended)
    Require explicit maintainer approval for the new fail-closed noninteractive behavior and exact-head green CI before landing.
  2. Defer the behavior change
    Pause this PR if maintainers want existing unattended plugin automation to remain compatible by default.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Require explicit confirmation of the noninteractive capability-consent compatibility contract and exact-head required checks.

Technical review

Best possible solution:

Confirm the fail-closed consent contract for existing automation, retain the server-side artifact/token revalidation design, and merge only after the exact head completes its required checks.

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

Not applicable as a bug report: this PR introduces a new consent capability. Its PR body and latest comment describe isolated Gateway before/after checks, but this read-only review did not execute them.

Is this the best way to solve the issue?

Unclear until a maintainer confirms the intended upgrade policy. The inspected owner design appropriately keeps acceptance server-side and revalidates the artifact after the acknowledgement yields.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: This changes the security gate and compatibility behavior for managed plugin activation workflows.
  • merge-risk: 🚨 compatibility: Existing unattended managed plugin operations can now require a new explicit acknowledgement flag.
  • merge-risk: 🚨 security-boundary: The PR creates and consumes durable consent that authorizes plugin activation, including a read-scope inspection projection.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body and latest author comment provide after-fix isolated Gateway evidence for the redacted inspection response, stale-token rejection, and accepted re-enable flow; the evidence is terminal/runtime proof rather than a claim of a new browser recording.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body and latest author comment provide after-fix isolated Gateway evidence for the redacted inspection response, stale-token rejection, and accepted re-enable flow; the evidence is terminal/runtime proof rather than a claim of a new browser recording.

Evidence

What I checked:

  • Artifact-bound consent owner: The PR head computes a deterministic declared-surface hash, re-reads the installed artifact after an interactive acknowledgement, and rejects a mismatched review token before persisting acceptance. (src/plugins/capability-consent.ts:443, 394523172abb)
  • Final activation boundary: The Gateway-facing enable path invokes the consent owner before configuration is written, while the write method remains operator-admin scoped. (src/plugins/management-service.ts:1865, 394523172abb)
  • Read-scope provenance projection: Inspection redacts the persisted resolved spec before returning it through the read-scope RPC; the focused test covers both spec fields and verifies the record remains operationally unchanged. (src/plugins/management-service.ts:1063, 394523172abb)
  • UI token handoff: The consent controller obtains an inspection token and sends it only as the acknowledgement for the follow-up install or enable request. (ui/src/pages/plugins/plugins-consent-controller.ts:191, 394523172abb)
  • Prior findings addressed: The latest author comment reports the prior provenance and redundant accepted-enable findings repaired at this head, with focused backend/UI assertions and an isolated Gateway before/after probe. (394523172abb)
  • Area history: Current history identifies Peter Steinberger as the dominant recent contributor to the plugin-management surface; the deferred-install transaction used here was merged from the related PR by felirami. (src/plugins/management-service.ts:1, 0c313d712839)

Likely related people:

  • steipete: Current history shows extensive work on the plugin management and lifecycle surface, including the reviewed head. (role: recent plugin-management contributor and PR author; confidence: high; commits: 394523172abb, 063f8ccb1018, ba4ff7a1e9d4; files: src/plugins/management-service.ts, src/plugins/capability-consent.ts)
  • felirami: The merged deferred-install transaction PR is explicitly preserved by this branch and is relevant to its staged artifact lifecycle. (role: related transaction owner; confidence: medium; commits: 0c313d712839; files: src/plugins/management-service.ts)

Rank-up moves

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

  • Materialize a complete base/current-main checkout and repeat the three-way source review.
  • Obtain exact-head required CI before merge.

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 (7 earlier review cycles)
  • reviewed 2026-08-26T14:33:54.858Z sha 0ca0ce9 :: needs real behavior proof before merge. :: [P1] Restore provider display names for Android image uploads | [P1] Route all managed activation paths through capability consent | [P2] Inspect the package-wide surface before the first consent screen
  • reviewed 2026-08-26T17:18:44.183Z sha 1dcc9ec :: needs real behavior proof before merge. :: [P1] Route every non-bundled activation through artifact consent | [P2] Do not confirm a ClawHub install before capabilities are available
  • reviewed 2026-08-26T18:59:40.414Z sha 2b56ab8 :: found issues before merge. :: [P1] Route onboarding activation through artifact consent | [P2] Show the package-wide surface before acceptance
  • reviewed 2026-08-27T07:45:32.685Z sha c849c41fee35effb27a97d09088c7eb425112a81 :: needs changes before merge. :: [P2] Skip the capability-less dialog for search-only installs
  • reviewed 2026-08-27T08:15:37.504Z sha ec20bd88e0dd925ab27a1853c9b3eff19e04c994 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T08:41:05.451Z sha 1472351 :: found issues before merge. :: [P1] Redact Git provenance before returning plugin inspection | [P2] Let accepted external plugins re-enable without another dialog
  • reviewed 2026-08-27T09:14:26.013Z sha 85a3d09 :: found issues before merge. :: [P1] Redact Git provenance before returning plugin inspection

@openclaw-barnacle openclaw-barnacle Bot added the app: android App: android label Aug 26, 2026
@steipete
steipete force-pushed the steipete/musing-pascal-efafdf branch from 2b093f2 to 9ec8081 Compare August 26, 2026 15:26
@steipete steipete closed this Aug 26, 2026
@steipete steipete reopened this Aug 26, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 26, 2026
@steipete steipete self-assigned this Aug 27, 2026
@steipete
steipete force-pushed the steipete/musing-pascal-efafdf branch from 2b56ab8 to d312e4a Compare August 27, 2026 07:31
@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Aug 27, 2026
@steipete
steipete force-pushed the steipete/musing-pascal-efafdf branch from d312e4a to c849c41 Compare August 27, 2026 07:34
@steipete

Copy link
Copy Markdown
Contributor Author

The activation and package-inspection findings are addressed in this branch. Setup/onboarding, required runtimes, doctor repair/adoption, managed links, updates, provider/inference activation, and chat enablement now use the shared artifact-consent owner. Inspection and acceptance use canonical package discovery, including configured entry precedence and physical-source deduplication. Staged config publication also rechecks the accepted artifact after asynchronous setup work.

The focused verification before rebase passed 1,401 tests across 50 files plus a runtime rebuild and real isolated CLI/Gateway tests. Those live tests exercised linked-install refusal/acceptance, package-wide inspect/enable token agreement, and refusal of a stale token after widening the artifact without changing config or acceptance. After integrating current main, another 341 focused tests passed, including both consent outcomes with beta-release selection; core types and scoped lint passed. Fresh Codex review of the full feature and final integration changes reported no blocking findings.

All requested activation-coverage, consistent noninteractive behavior, package-surface, and final-effect test moves from the latest review are implemented. The existing before/after UI media remain in the PR. New browser recording is unavailable because the Chrome relay cannot connect; reconnect and stale-response behavior have component regression coverage. Final CI and the smoke rerun against main's updated plugin-index storage are in progress and are not yet claimed as passed.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 27, 2026
@steipete
steipete merged commit 0dbd5c8 into main Aug 27, 2026
226 checks passed
@steipete
steipete deleted the steipete/musing-pascal-efafdf branch August 27, 2026 09:58
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
…he reviewed artifact (openclaw#130168)

* feat(plugins): surface plugin capability consent in Control UI and CLI

Adds plugins.inspect (declared manifest surface, operator grants, install
provenance/integrity, ClawHub trust), a Control UI consent dialog on install
and external-plugin enable, a server-side acceptance gate persisted on the
install record, artifact-anchored widen diffing, and --accept-capabilities
for non-interactive CLI use.

NOT READY TO LAND: autoreview found critical gaps (see PR notes) — the
declared surface omits 20 of 21 contract families, native plugins always
report zero hooks, several install/enable paths bypass the gate, and the
acknowledgment is not bound to the reviewed surface.

* refactor(plugins): bind capability consent to the reviewed surface

Collapses the consent error payload to the fields the client cannot fetch
(reviewToken, widened, acceptedAt) and pulls identity/declared/grants/source/
trust from plugins.inspect, shrinking the registry-free protocol reader from
395 to 91 lines and removing its divergence from the closed schema.

Acknowledgment now carries the SHA-256 reviewToken of the surface the operator
saw; the server recomputes the final staged artifact's surface and rejects any
mismatch before persisting acceptance. That closes review-then-swap, laundering
of forged acceptance through an unchanged update, and cross-artifact replay.

All 22 manifest contract families are now declared, hashed and diffed, so a
privileged family such as gatewayMethodDispatch can no longer be added without
re-consent. Consent reads the manifest runtime discovery will execute, ambiguous
install ownership fails closed, integrity resolution has one owner and no longer
labels npm SHA-1 shasums as SHA-256, and code plugins disclose that hooks
register at runtime instead of rendering an empty "no hooks" row.

* fix(gateway): register plugins.inspect in method inventories and regenerate protocol

Adds plugins.inspect to the advertised-method inventories (widening the
fixed-size slice windows so older indices stay stable), regenerates the Kotlin
protocol bindings, drops an unused exported type, and replaces two nested
conditional spreads with a plain conditional.

* refactor(plugins): split oversized consent modules and clear lint findings

Extracts the MCP controller out of the plugins page, unchanged-install
reconciliation out of update-installed, and the install lifecycle suite out of
the management-service tests, bringing all three back under the max-lines limit
without suppressions. Also renames a shadowed binding, drops an unnecessary
generic, removes a spread-to-modify in a map, and types catch callbacks as
unknown.

* chore(protocol): regenerate Kotlin bindings after rebase

* feat(plugins): let chat /plugins install review and accept capabilities

The consent gate applies to chat installs too, but the command had no way to
give consent, so external installs dead-ended on a CLI-only flag. Chat now
replies with the plugin's declared capability surface and the exact command to
rerun, and accepts a trailing --accept-capabilities mirroring the existing
--force acknowledgement. ClawHub trust acknowledgement stays CLI-only.

Staged-artifact verification is unchanged: the reviewToken is still checked
against the final artifact before acceptance is recorded.

* refactor(plugins): single-source the declared-surface groups and manifest precedence

The ordered capability group list was defined independently in the consent
engine, the protocol error reader, the CLI formatter and the Control UI, so a
new contract family had to be added in four places with nothing enforcing it.
All four now derive from one canonical list in the protocol schema with a
compile-time exhaustiveness guard.

Native-versus-bundle manifest precedence is centralized in one helper that both
discovery and staged consent call, so the two cannot drift again — that
divergence was a real bug where consent read one manifest and the runtime
executed another.

Also documents that carrying acceptance forward requires pinned artifact
integrity, so integrity-less sources such as local paths ask on every install.

* fix(plugins): enforce reviewed consent across activation flows

Route setup, repair, linked installs, updates, and chat activation through artifact-bound capability consent. Reuse canonical package discovery and recheck staged activation before config publication. Invalidate stale Control UI review requests on reconnect.

Verified focused owner and sibling tests, runtime rebuild, and real isolated CLI/Gateway install, inspect, enable, widening, and stale-token rejection flows.

* test(plugins): cover beta installs through capability consent

* test(plugins): align consent fixtures with staged artifacts

* fix(ui): review staged plugin capabilities once

* test(ui): inline the remaining plugin consent confirmation

* test(plugins): verify consent with deferred install transactions

* refactor(setup): share inference execution plan construction

* test(ui): settle applied config before deferring refresh

* fix(plugins): protect consent provenance and reuse acceptance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: web-ui App: web-ui cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL 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.

1 participant