Skip to content

feat: add experimental plugin UI customization - #134943

Merged
steipete merged 34 commits into
mainfrom
codex/feature-plugin-ui
Sep 4, 2026
Merged

steipete merged 34 commits into
mainfrom
codex/feature-plugin-ui

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Deeper Control UI features previously required core changes. This adds a typed feature-plugin SDK for native UI and moves Workboard onto public plugin boundaries. Authors and agents can scaffold, build, validate, and pack a feature, then propose its exact archive for operator-reviewed installation.

User-installed native UI is off by default. Enable Settings → Labs → Custom plugin UI, restart the Gateway, and reload browser tabs (gateway.controlUi.experimental.customPlugins: true). Artifact approval does not enable Labs. Bundled UI remains available through the loader's recorded origin; installed plugins cannot claim that exemption through their name or manifest.

Why This Change Was Made

One typed contract serves backend handlers, browser clients, and optional agent-tool/command adapters. Plugins contribute pages, navigation, panels, actions, accessories, and widgets, or replace workspace, session-list, composer, transcript, and tool-result views. Replacements can compose built-in views; Built-in restores them.

Core owns session/agent identity, drafts, send admission, independent queries, and disposal. Retiring a view or connection revokes its handles. Catalog discovery, grants, and asset serving share one Gateway policy, including retained revisions. Blocked UI explains enablement and preserves saved state.

Enabled native modules are trusted same-origin code with the signed-in operator's Gateway authority, including administrator methods for administrators. Capability declarations are not a per-plugin sandbox. Maintainer decision: accept the experimental SDK, default-off setting, shared operator authority, and verified fs-safe 0.7.2 update. Land the SDK, Workboard migration, installation lifecycle, and supporting refactors together.

User Impact

Start with openclaw plugins init <id> --type feature; see feature-plugin authoring. Backend plugins, tools, services, iframe tabs, sandboxed widgets, and MCP Apps remain independent of this opt-in. Disabling custom UI preserves installation and saved UI state.

All plugin APIs are experimental, including existing SDK, registration/runtime, provider, channel, hook, and native UI contracts. Authors should pin and test supported host versions. Existing compatibility adapters, deprecation windows, and supported-upgrade migrations remain in force.

Three entrypoints (feature-contract, feature-plugin, control-ui) expose four runtime helpers, 45 types, and 27 direct host methods. Two existing normalization helpers are reexported. Four RPCs—plugins.controlUi.list, .reload, .report, .status—and one event manage revisions. One default-off setting is added; no SQLite schema or Gateway protocol-version bump occurs.

Assets, grants, and routing honor the Control UI URL prefix. Authenticated native UI requires HTTPS or a browser-trusted loopback URL; plain-HTTP pages show recovery guidance before loading code. Related repairs cover template reapplication, stale widget reads, repeated Windows builds, session search, and UI test isolation.

fs-safe #194 is merged; 0.7.2 is released and on npm. Both dependencies use it with no local patch. The awaited-guard race failed on 0.7.1 and passed on 0.7.2; eight tarballs, signatures, and provenance were verified with native release CI.

Follow-up: managed npm compensation. Snapshot restoration and npm-pack rollback must use the original lifecycle guard and retain recovery artifacts after closure. This pre-existing gap is separate from sealed-artifact installation; an already-dispatched syscall cannot be cancelled.

Evidence

Candidate f1186148d9302ff7054dd2258982e730ceaf2b33, based on 8d94ab0d1e258fd0f148263fc3f75e17b4628adf. All 34 feature commits are retained through the rebase.

  • pnpm build passed in 257.673 seconds; 796 finalized UI assets verified. Startup JavaScript is 349,523 gzip bytes against a 350,141-byte limit.
  • 225 fresh integration cases passed: 177 backend/tooling cases, one selected browser-routing case, and 47 UI owner cases. All 13 scoped static checks passed, including seven owning type programs. Canonical protocol:check passed with the upstream Canvas method and native plugin methods preserved.
  • All 15 browser integration cases passed across three files in 42.216 seconds, including the real Gateway Canvas sandbox. Source and build hashes remained unchanged.
  • The fresh integration review found no actionable P0–P2 issues. Earlier feature reviews and proof remain recorded, including 885 integration cases, all 49 runner cases with GitHub reporting, and targeted Knip/SDK/config checks. Overlapping runs are not added together as unique coverage.

All three real Chromium/Gateway replays passed with isolated state, unchanged source/build hashes, no browser errors, and all processes joined:

Scenario Current-candidate proof
Labs off/on/off — 60.858s Custom JS/CSS blocked by default; persisted enablement and restart load the page/workspace once. Backend mutation and independent readback work; signed read-only mutation is denied. Disabling and restarting restores bundled UI and saved cards.
Non-local HTTP — 18.627s Authenticated pairing succeeds on a non-local HTTP origin. Visible HTTPS/localhost guidance appears before any native asset request or module execution.
URL-prefix proxy — 19.610s Real HTTP/WebSocket proxy, scoped cookies, authenticated asset hashes, and persisted card readback. Anonymous assets return 401; unmounted root paths return 404.

Primary CI, iOS Periphery, and shared OpenClawKit Periphery passed on f1186148, including the shared intersection check. The dead-code scans passed on attempt 2 through their existing macOS runner recovery after the initial jobs remained unassigned; no workflow, timeout, or check was weakened.

Move-adjusted LOC: production +9,281/−3,677 (net +5,604); tests/support +12,405/−4,160 (net +8,245). Separate net totals: docs +524, localization +4,791, generated metadata +178, tooling/config +125. Counts discount 16,894 unchanged lines each direction across 42 moves and exclude lockfiles/bundles. This growth provides the typed SDK, native host and lifecycle/admission boundaries, with Workboard consuming those public interfaces.

Review dispositions: HTTP and prefix defects are repaired without weakening secure cookies. The earlier missing-grant claim was an aliased-set false positive; deletion now names that set directly. The stored-model heuristic flagged Knip configuration and a test fixture, not runtime schema changes. The trust and compatibility decisions are explicit above.

Earlier CI follow-ups: Chromium selected-tab creation/relay lifetime and macOS exit-observer/grace timing passed unchanged focused reruns. Watch first-send fixture synchronization remains a named follow-up from an earlier failure; the iOS test lane passed on the current f1186148 candidate. No timeout increases or bypasses were added.

Live UI proof

Synthetic data from the final candidate, recorded against the real Gateway. The complete recording preserves the Labs enable/disable and restart transitions.

Default-off gate, enabled UI, recovery, and deployment checks

Custom plugin UI is disabled by default

Custom plugin UI enabled in Labs

Custom plugin page and workspace after restart

Bundled Workboard restored after disabling custom UI

Native UI explains HTTPS or localhost requirement

Native Workboard behind a prefixed proxy after reload

labs-off-on-off-f1186148.mp4

@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts agents Agent runtime and tooling plugin: workboard size: XL maintainer Maintainer-authored PR labels Sep 1, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 12:47 PM ET / 16:47 UTC.

ClawSweeper review

What this changes

Adds experimental typed feature-plugin and Control UI APIs, migrates Workboard to them, and gates installed native UI behind a default-off Labs setting.

Merge readiness

⛔ Blocked before merge - 7 items remain

Keep open pending recorded SDK and security-owner acceptance of the intentional full-authority native-plugin model and exact-head validation; no concrete functional defect was found in the reviewed central paths.

Priority: P2
Reviewed head: f1186148d9302ff7054dd2258982e730ceaf2b33
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Central owner, asset, lifecycle, documentation, and test paths are coherent, but the public full-authority model still needs owner acceptance and exact-head validation.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The member-authored PR body reports real Gateway and Chromium evidence, but linked media could not be independently retrieved in this environment; contributor proof action is not required for this internal reliability gate.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The member-authored PR body reports real Gateway and Chromium evidence, but linked media could not be independently retrieved in this environment; contributor proof action is not required for this internal reliability gate.
Evidence reviewed 9 items Operator-authority API: The public Control UI host documents request access using the signed-in operator's Gateway scopes, without a per-plugin RPC allowlist.
Host and lifecycle enforcement: The host uses the existing Gateway client while activation ownership and retained contribution handles are retired on connection changes.
Asset authorization boundary: Gateway asset serving validates plugin revision and path, then requires a matching scoped grant or read authorization.
Findings None None.
Security Needs attention Record acceptance for full operator authority: The public host lets enabled installed native UI issue Gateway requests under the operator's scopes; this is documented and default-off, but the intentional trust-boundary expansion requires SDK and security-owner approval before merge.

How this fits together

Plugin manifests contribute UI assets and declarations through the Gateway, which authenticates and advertises them to Control UI. The Control UI runtime loads each admitted plugin with a lifecycle-bound host that can issue Gateway requests under the signed-in operator’s authority.

flowchart LR
  A[Installed plugin manifest] --> B[Gateway asset catalog]
  B --> C[Scoped asset authentication]
  C --> D[Control UI runtime]
  D --> E[Lifecycle-bound plugin host]
  E --> F[Plugin pages and actions]
  F --> G[Gateway requests with operator scopes]
Loading

Decision needed

Question Recommendation
Do SDK and security owners accept the default-off experimental design in which an enabled installed native Control UI plugin receives the signed-in operator's full Gateway authority? Accept the documented trusted-native model: Record SDK and security-owner acceptance, then retain the Labs gate and complete exact-head validation.

Why: This is a new public SDK and authority boundary; code-level guards and documentation cannot determine whether the product's intended trust model is acceptable.

Before merge

  • Resolve security concern: Record acceptance for full operator authority - The public host lets enabled installed native UI issue Gateway requests under the operator's scopes; this is documented and default-off, but the intentional trust-boundary expansion requires SDK and security-owner approval before merge.
  • Resolve merge risk (P1) - When enabled, installed native plugin code receives the signed-in operator's full Gateway authority, including administrative scopes; this deliberate trust expansion needs recorded SDK and security-owner acceptance.
  • Resolve merge risk (P1) - The new default-off configuration and public SDK surface are upgrade-sensitive, while the supplied check list is truncated and does not independently establish exact-head completion.
  • Complete next step (P2) - Obtain recorded SDK and security-owner acceptance of the native installed-plugin authority model, then verify required checks on the exact head before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [medium] Record acceptance for full operator authority — src/plugin-sdk/control-ui.ts:207
Agent review details

Security

Needs attention: The implementation deliberately expands installed native plugin authority to the signed-in operator's Gateway scopes, so it needs recorded security-owner acceptance rather than a presumed approval.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Configuration surface 1 added The default-off custom-plugin Labs setting changes operator enablement and trust behavior.
Plugin API surface 3 public SDK entrypoints added These exports create a long-lived compatibility and security-maintenance boundary.
Production versus test LOC PR-body reported production +9,281/-3,677; tests/support +12,405/-4,160 The stated growth supports a new typed SDK, authenticated asset path, lifecycle host, and Workboard migration; figures were not independently move-normalized locally.

Stored data model

Persistent data-model change detected: serialized state: config/knip.config.ts, serialized state: ui/src/test-helpers/control-ui-plugin-fixture.ts, unknown-data-model-change: ui/src/test-helpers/control-ui-plugin-fixture.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Record acceptance and validate exact head (recommended)
    Obtain SDK and security-owner acceptance of the full-authority model, then confirm all required checks on the exact PR head.
  2. Pause if authority sharing is unacceptable
    Do not merge the public native-plugin API if owners require installed UI to be capability-scoped.

Technical review

Best possible solution:

Land only after SDK and security owners explicitly accept the documented default-off full-authority model and exact-head validation is confirmed, while retaining lifecycle-bound hosts, scoped asset authorization, and sandboxed alternatives.

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

Not applicable: this PR adds a new experimental capability rather than repairing a reported existing-behavior bug; its supplied browser and Gateway proof concerns feature behavior.

Is this the best way to solve the issue?

Unclear pending owner acceptance: the default-off, documented trusted-native model is coherent for full Control UI replacements, while sandboxed widgets and MCP Apps remain the safer path for isolated content.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This is a substantial experimental product capability with bounded default-off exposure, not an active outage or demonstrated regression.
  • merge-risk: 🚨 compatibility: A new public Plugin SDK export and operator-facing configuration gate create upgrade and long-term contract obligations.
  • merge-risk: 🚨 security-boundary: Enabled installed native code can act with the signed-in operator's Gateway scopes, so acceptance of that trust boundary is required.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The member-authored PR body reports real Gateway and Chromium evidence, but linked media could not be independently retrieved in this environment; contributor proof action is not required for this internal reliability gate.

Evidence

Security concerns:

  • [medium] Record acceptance for full operator authority — src/plugin-sdk/control-ui.ts:207
    The public host lets enabled installed native UI issue Gateway requests under the operator's scopes; this is documented and default-off, but the intentional trust-boundary expansion requires SDK and security-owner approval before merge.
    Confidence: 0.94

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Record SDK and security-owner acceptance of the native installed-plugin authority model.
  • Verify required checks on f118614 before merging.

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 (31 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-04T11:16:28.290Z sha 66387d42ae5dbfdf4d3d3bada158caa5a3bd2ea8 :: needs real behavior proof before merge. :: [P2] Skip activation after an asset grant is denied
  • reviewed 2026-09-04T12:03:33.967Z sha 79948eec1498e692a584a71c5bdd83c2bf27ca0d :: needs real behavior proof before merge. :: [P2] Skip activation after an asset grant is denied
  • reviewed 2026-09-04T12:37:14.786Z sha 59a6c8f32b9670c15f972803ef589ffc99c5b4f2 :: needs real behavior proof before merge. :: [P2] Exclude denied asset grants from activation
  • reviewed 2026-09-04T12:56:22.434Z sha f633e42a33b265c457132ef7ad3f6e4a1ee34fd5 :: needs real behavior proof before merge. :: [P2] Exclude ungranted descriptors from activation | [P2] Honor the configured Control UI base path | [P2] Handle authenticated native UI on documented HTTP deployments
  • reviewed 2026-09-04T13:13:07.655Z sha c430f78 :: needs real behavior proof before merge. :: [P2] Gate native plugin UI on insecure HTTP
  • reviewed 2026-09-04T14:47:29.007Z sha 4f9088a :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-04T15:01:31.995Z sha 4f9088a :: blocked before merge. :: none
  • reviewed 2026-09-04T15:37:28.099Z sha f118614 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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. labels Sep 1, 2026
@steipete
steipete force-pushed the codex/feature-plugin-ui branch from 717c97a to 0467d40 Compare September 2, 2026 01:35
@openclaw-barnacle openclaw-barnacle Bot added the extensions: onepassword 1Password plugin label Sep 2, 2026
@steipete
steipete marked this pull request as ready for review September 2, 2026 01:35
@steipete
steipete requested a review from a team as a code owner September 2, 2026 01:35
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/onepassword/package.json
  • extensions/workboard/package.json
  • package.json
  • pnpm-lock.yaml
  • pnpm-workspace.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfiles or workspace dependency policy changes are present.
  • Treat pnpm-lock.yaml and package-lock.json diffs as dependency security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph changes noted

This PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin, a member of @openclaw/openclaw-secops, or an OpenClaw organization member with Maintain or Admin repository access.

  • Current SHA: f1186148d9302ff7054dd2258982e730ceaf2b33
  • Trusted actor: @steipete
  • Trusted role: pull request author; openclaw-secops

Security review is still recommended before merge when the dependency graph change is intentional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: web-ui App: web-ui cli CLI command changes dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation extensions: onepassword 1Password plugin 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. P2 Normal backlog priority with limited blast radius. plugin: workboard rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants