Skip to content

feat(plugins): add live visual provider seam - #149097

Closed
RomneyDa wants to merge 3 commits into
openclaw:mainfrom
RomneyDa:feat/live-visual-provider-seam
Closed

RomneyDa wants to merge 3 commits into
openclaw:mainfrom
RomneyDa:feat/live-visual-provider-seam

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

External video integrations cannot discover a renderer without importing another plugin directly.

User Impact

Video integrations can resolve an enabled live-visual provider, open a timed media stream, and consume its browser-source URL without coupling plugins together. Integrations retain ownership of conversations, media clocks, and delivery; renderer plugins own only their visual surface, bounded input handling, health, and cleanup.

Why This Change Was Made

Adds a focused openclaw/plugin-sdk/live-visual contract and normal capability-provider registration/resolution.

Resolved providers are bound to the exact selected plugin instance:

  • a retained provider cannot start a renderer after its owner retires;
  • session media and health calls reject after retirement before reaching plugin code;
  • terminal session close retains owner-authorized cleanup and blocks disposal until it settles;
  • a session whose open() finishes across owner retirement is closed inside that owner and is never published to the caller.

The companion avatar provider and FaceTime consumer are merged. Real-provider verification found and fixed a packaged renderer asset-path bug in avatar PR #3. FaceTime PR #3 corrects its compatibility docs: released OpenClaw 2026.9.4 does not contain this SDK subpath.

Evidence

  • pnpm test src/plugin-sdk/live-visual.test.ts: 3/3 pass, covering registration/resolution, retained provider rejection, media/health rejection, owner-scoped terminal close, disposal ordering, and retirement during open().
  • Real packed-provider proof through normal plugin admission: authenticated browser surface opened, timed PCM reached the renderer at the expected sample-derived timestamp, stale provider and media calls were rejected after retirement, retirement overlapping a real renderer open rejected publication and released that renderer, terminal cleanup completed, and both authenticated URLs became unreachable.
  • The lifecycle regression failed on the previous head because the retained raw provider still opened a second session after owner disposal.
  • Configuration compatibility is additive: existing configs and defaults are unchanged; providers opt into the declared liveVisualProviders capability and consumers resolve one by ID.
  • pnpm check:changed: pass on exact head e77e60f289; includes all TypeScript graphs, SDK export/surface budgets, plugin boundaries, dead-export scans, lint, and 0 runtime import cycles.

Base CI prerequisite

The rebased branch carries Peter Steinberger's attribution-preserving fix(ci): restore chat renderer lint checks commit from #149735. The old base exceeded the UI max-lines budget independently of this SDK change, while #149735 is blocked by unrelated matrix flakes. This commit can be dropped if #149735 lands first.

@clawsweeper

clawsweeper Bot commented Sep 15, 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 scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 15, 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. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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 Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 24, 2026, 6:13 AM ET / 10:13 UTC (Revision 7).

ClawSweeper review

What this changes

Adds a public Plugin SDK contract for visual renderer plugins, allowing video integrations to send timed media and receive a browser-source URL, with registration, tests, docs, and a chat-renderer lint cleanup.

Merge readiness

⛔ Blocked before merge - 6 items remain

Keep this PR open. Current main lacks the live-visual SDK capability, and the packed-provider trace gives strong evidence for owner-retirement behavior. Two source-proven session and provider-selection defects remain.

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

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong real-provider evidence supports the main lifecycle claim, but two source-proven defects prevent the patch from being quality-ready.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The new SDK resolver and owner-bound session were exercised through normal plugin admission with a packed avatar renderer in an isolated loopback setup. The redacted terminal trace shows timed PCM delivery, stale-call rejection, overlapping-open cleanup, and browser-URL invalidation; it does not cover the two identified defects. No stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The new SDK resolver and owner-bound session were exercised through normal plugin admission with a packed avatar renderer in an isolated loopback setup. The redacted terminal trace shows timed PCM delivery, stale-call rejection, overlapping-open cleanup, and browser-URL invalidation; it does not cover the two identified defects. No stored-data contract changes.
Evidence reviewed 10 items Introduced public contract: The introduced patch adds the live-visual resolver, session wrapper, provider registration, manifest key, and package export.
Calls remain admitted after session close: The wrapper routes write and health through the plugin owner, while close closes a separate retained consumer.
Consumer closure semantics: Closing a consumer deactivates its token immediately, but owner.run admits a fresh call while the owner remains active.
Findings 2 actionable findings [P2] Fence media and health calls after session close
[P2] Resolve the selected provider without invoking retired siblings
Security None None.

How this fits together

Plugins declare capabilities in manifests and register runtime providers. A video integration resolves an enabled provider, opens a media session, and uses the returned browser-source URL.

flowchart LR
A[Provider plugin manifest] --> B[Capability registry]
C[Video integration] --> D[Provider selection]
B --> D
D --> E[Owned media session]
C --> E
E --> F[Renderer browser source]
Loading

Decision needed

Question Recommendation
May the public live-visual SDK land before companion plugins can name a released, verified minimum OpenClaw version? Stage the releases: Land the repaired core SDK first and keep companion visual support explicitly unavailable until its first tested host release.

Why: The current stable release lacks the subpath, and the companion compatibility correction is deliberately waiting for a supporting release; release sequencing requires maintainer intent.

Before merge

  • Fence media and health calls after session close (P2) - Closing the retained consumer deactivates its token, but write and health use owner.run, which admits fresh calls while the plugin remains active. Media can therefore reach provider code after terminal close begins. I missed this on the prior review of this same head; guard both methods at close admission.
  • Resolve the selected provider without invoking retired siblings (P2) - The shared resolver projects every active-registry entry before matching the requested ID. If provider A was revoked while sibling B remains active, binding A's descriptor through owner.run throws and prevents B from resolving. I missed this on the prior review of this same head; limit binding to the selected live provider.
  • Resolve merge risk (P1) - The companion FaceTime plugin still documents a visual-support host version that lacks this SDK subpath. Its correction is open, so maintainers need to confirm the staged first-supported-release contract before presenting the integrations as compatible.
  • Complete next step (P2) - Repair post-close admission and retired-sibling lookup, then confirm the staged host-version contract for companion plugins 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.

Findings

  • [P2] Fence media and health calls after session close — src/plugin-sdk/live-visual.ts:33-36
  • [P2] Resolve the selected provider without invoking retired siblings — src/plugin-sdk/live-visual.ts:46
Agent review details

Security

None.

PR surface

Source +208, Tests +179, Docs +4, Config +4, Other +4. Total +399 across 35 files.

View PR surface stats
Area Files Added Removed Net
Source 21 213 5 +208
Tests 6 179 0 +179
Docs 5 5 1 +4
Config 1 4 0 +4
Generated 0 0 0 0
Other 2 7 3 +4
Total 35 408 9 +399

Review metrics

Metric Value Why it matters
Code growth production +225/-8, tests +178/-0 The production growth has a stated purpose: a generic provider contract and owner-bound session lifecycle.
Public contract additions 1 SDK subpath, 1 manifest capability key, 1 registration method Plugin authors and consumers must pin a host release that provides all three surfaces.

Merge-risk options

Maintainer options:

  1. Approve a staged host contract (recommended)
    Accept core landing after the code repairs while withholding companion visual-support claims until a tested OpenClaw release includes the subpath.
  2. Pause for a coordinated release
    Hold the public SDK until the companion plugins can publish accurate host requirements and packaged-renderer proof.

Technical review

Best possible solution:

Keep one generic provider path with admission ending at session close, provider selection isolated from retired siblings, and an explicit tested host-version requirement for companion plugins.

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

Not applicable to the requested new capability. Both patch defects have clear source-level paths, but this read-only review did not execute them.

Is this the best way to solve the issue?

No, not yet. The shared provider registry is the appropriate extension point, but session-close admission and selection around retired sibling providers need repair.

Full review comments:

  • [P2] Fence media and health calls after session close — src/plugin-sdk/live-visual.ts:33-36
    Closing the retained consumer deactivates its token, but write and health use owner.run, which admits fresh calls while the plugin remains active. Media can therefore reach provider code after terminal close begins. I missed this on the prior review of this same head; guard both methods at close admission.
    Confidence: 0.94
    Late finding: first raised on code an earlier review cycle already covered.
  • [P2] Resolve the selected provider without invoking retired siblings — src/plugin-sdk/live-visual.ts:46
    The shared resolver projects every active-registry entry before matching the requested ID. If provider A was revoked while sibling B remains active, binding A's descriptor through owner.run throws and prevents B from resolving. I missed this on the prior review of this same head; limit binding to the selected live provider.
    Confidence: 0.88
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The new SDK resolver and owner-bound session were exercised through normal plugin admission with a packed avatar renderer in an isolated loopback setup. The redacted terminal trace shows timed PCM delivery, stale-call rejection, overlapping-open cleanup, and browser-URL invalidation; it does not cover the two identified defects. No stored-data contract changes.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is a bounded plugin API improvement with two normal-priority correctness defects and limited current-user impact.
  • merge-risk: 🚨 compatibility: The new public SDK subpath is absent from the current stable release while companion compatibility documentation remains unresolved.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The new SDK resolver and owner-bound session were exercised through normal plugin admission with a packed avatar renderer in an isolated loopback setup. The redacted terminal trace shows timed PCM delivery, stale-call rejection, overlapping-open cleanup, and browser-URL invalidation; it does not cover the two identified defects. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The new SDK resolver and owner-bound session were exercised through normal plugin admission with a packed avatar renderer in an isolated loopback setup. The redacted terminal trace shows timed PCM delivery, stale-call rejection, overlapping-open cleanup, and browser-URL invalidation; it does not cover the two identified defects. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RomneyDa: 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.

  • Add a regression that closes a session and proves later write and health calls never reach provider code.
  • Add a two-provider case proving a live sibling still resolves after another provider is revoked.
  • Confirm the first tested OpenClaw release required by the companion visual plugins.

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 (6 earlier review cycles)
  • reviewed 2026-09-15T12:57:33.461Z sha 937b6f63f2e2c460aad7e7775158669bf3ee973f :: needs real behavior proof before merge. :: [P1] Bind resolved providers to their selected plugin instance
  • reviewed 2026-09-16T05:21:34.001Z sha b1244767e7a3b51001198266970a14596f7da5ce :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-16T05:57:50.838Z sha b1244767e7a3b51001198266970a14596f7da5ce :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-16T06:23:27.214Z sha e77e60f :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-16T07:02:48.918Z sha e77e60f :: blocked before merge. :: none
  • reviewed 2026-09-17T06:03:17.415Z sha e77e60f :: blocked before merge. :: none

@RomneyDa
RomneyDa force-pushed the feat/live-visual-provider-seam branch from 937b6f6 to b124476 Compare September 16, 2026 05:12
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 16, 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:

@RomneyDa

Copy link
Copy Markdown
Member Author

Real-provider evidence is now complete. Using the merged lobster plugin through normal plugin admission, I verified: authenticated browser-source startup; sample-clock PCM delivery; stale provider/media rejection after owner retirement; cleanup when retirement overlaps a real renderer open; and invalidation of both authenticated browser URLs. The proof exposed a packaged asset-path bug, fixed with clean-install coverage in RomneyDa/openclaw-avatar-plugin#3. The premature 2026.9.4 compatibility claim is corrected in RomneyDa/openclaw-facetime-plugin#3. @clawsweeper re-review

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 16, 2026
@RomneyDa
RomneyDa force-pushed the feat/live-visual-provider-seam branch from b124476 to e77e60f Compare September 16, 2026 06:06
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 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:

@RomneyDa

Copy link
Copy Markdown
Member Author

Redacted real-provider runtime trace from exact core head e77e60f289 plus avatar follow-up head 7ec19442c7:

$ OPENCLAW_STATE_DIR=<temporary-empty-dir> OPENCLAW_CONFIG_PATH=<nonexistent-temp-config> node --import ./scripts/tsx.mjs .artifacts/live-visual-retirement-proof.mts
{"event":"allowed-renderer-execution","authenticatedBrowserSurface":true,"pcmPts":480,"receivedPtsMs":20}
{"event":"retirement-fence","staleProviderRejectedBeforeOpen":true,"providerOpenCalls":2,"staleMediaRejectedBeforeTransport":true,"transportMessageCount":3}
{"event":"overlapping-open-cleanup","sessionPublished":false,"authenticatedBrowserSurfacesReleased":2}
{"pluginLoaded":true,"authenticatedBrowserSurface":true,"timedPcmDelivered":true,"staleProviderRejected":true,"staleMediaRejected":true,"overlappingOpenRejected":true,"overlappingRendererReleased":true,"terminalCleanupCompleted":true,"browserSurfaceReleased":true}

The proof harness loads the packed lobster plugin through normal OpenClaw plugin admission. It opens a real authenticated loopback renderer, connects its WebSocket transport, and confirms PCM PTS 480 becomes 20 ms on the 24 kHz media clock. It then gates publication around a second real renderer open, starts owner retirement, and asserts:

  • a retained provider rejects before its raw open counter advances;
  • a stale media write rejects before the renderer transport message count advances;
  • the overlapping open is never published;
  • retirement waits for terminal cleanup; and
  • both authenticated browser surfaces become unreachable.

No tokens, URLs, IP addresses, private endpoints, or user data are emitted. The packed asset fix and clean-install regression coverage are in RomneyDa/openclaw-avatar-plugin#3. The released-version compatibility correction is in RomneyDa/openclaw-facetime-plugin#3.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 16, 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 proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 16, 2026
@RomneyDa
RomneyDa marked this pull request as draft September 17, 2026 05:55
@clawsweeper clawsweeper Bot added 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. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 24, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

Superseded by #158392, which now carries the live-visual provider seam, lifecycle fencing, operator-assisted FaceTime carrier, and current-main rebase as one validated stack. Closing this draft to avoid parallel conflicting review.

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

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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: M 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