Skip to content

feat(facetime): add operator-assisted realtime video bridge - #158392

Open
RomneyDa wants to merge 5 commits into
mainfrom
feat/facetime-video-bridge
Open

RomneyDa wants to merge 5 commits into
mainfrom
feat/facetime-video-bridge

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

OpenClaw needs a viable FaceTime carrier for real OpenAI Realtime audio and live visuals. The previous design depended on injecting a Developer-ID-signed dylib into FaceTime/Phone. Those apps are Apple platform binaries, and macOS library validation rejects that mapping even when debugger restrictions are disabled.

Architecture

This PR replaces injected call control with an out-of-process, operator-assisted boundary:

  1. initiate_call opens the exact configured owner handle through FaceTime after one-shot approval. It returns operator-action-required; it never claims the call connected.
  2. After the operator verifies the participant in FaceTime, attach_current_call requires a separate one-shot approval and the exact configured owner handle.
  3. The native capture path proves exactly one Apple-signed FaceTime media owner and the OpenClaw-Mic route before starting OpenAI Realtime audio.
  4. Exact 24 kHz PCM timestamps drive the selected live-visual provider. OBS owns only the per-call browser source, scene, and Virtual Camera lease it creates.
  5. end_call detaches OpenClaw media and reports manualHangupRequired: true. Carrier hangup remains in FaceTime.

The admission model is explicitly authenticated-operator-confirms-configured-owner. OpenClaw does not claim that FaceTime exposes cryptographically verified remote caller identity.

Security and Distribution

  • Removes helper RPC, helper supervision, pending-dial persistence, LLDB/injection scripts, helper endpoints, and carrier-process killing.
  • Setup/preflight no longer asks for Xcode, Developer Tools mode, SIP changes, Recovery, reboot, or dylib injection.
  • Late media writes and health probes remain fenced after provider/session retirement; terminal cleanup remains owner-authorized and idempotent.
  • OBS WebSocket remains loopback-only from the client side and SecretRef-backed.
  • Video is optional and degrades to audio-only; it does not own call health.
  • The coordinated capture-only native package is openclaw-facetime#50.

User/Operator Requirements

Normal users need FaceTime signed in, the paired OpenClaw audio driver, Screen & System Audio Recording permission for capture, and—when video is enabled—OBS Studio with its Camera Extension, authenticated WebSocket, and Virtual Camera selected in FaceTime. No SIP weakening or restart is part of the design.

Evidence

Exact rebased head a8975e0e40:

  • FaceTime suite: 19 files, 113/113 tests passed.
  • pnpm tsgo:extensions: passed.
  • pnpm tsgo:extensions:test: passed.
  • FaceTime oxlint and oxfmt checks: passed.
  • Plugin SDK surface check: 159 public entrypoints, 4601 exports, 2696 callable exports; passed.
  • Generated config baseline check: passed; the intentional optional video schema adds 15 plugin paths.
  • npm pack --dry-run: passed (42 packaged files).
  • Full pnpm build: passed in 14m 7s, including all runtime bundles, declaration graphs, Plugin SDK export verification, and Control UI build.
  • Native companion: 42/42 harness tests, real PCM pipe-loss/generation safety, and capture-only archive build/verification passed.

Live Acceptance Still Required

This code does not claim a completed iPhone call yet. The remaining proof is an isolated OCM run with real OpenAI Realtime audio, explicit operator attach, caller speech, contextual response, exact PCM-driven lobster animation through OBS Virtual Camera, barge-in/recovery, detach, manual FaceTime hangup, and complete OBS/renderer cleanup.

@clawsweeper

clawsweeper Bot commented Sep 25, 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.

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Sep 25, 2026
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: a8975e0e4089b99a54857a8b264a45d0c0e93e13
  • Maintainer: @RomneyDa
  • Repository role: maintain

These dependency graph changes were made:

  • pnpm-lock.yaml
  • extensions/facetime/package.json

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts plugin: facetime FaceTime plugin size: XL labels Sep 25, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

The branch adds a live visual Plugin SDK contract and an OBS Virtual Camera path for FaceTime, and replaces injected call control with operator-assisted dialing and attachment.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The branch has substantial implementation and focused tests, but its authority, privacy, setup, and released-state defects block merge and final behavior proof is incomplete.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 27 items remain

Keep this PR open: current main lacks the visual bridge, and the branch contains distinct work. Released FaceTime behavior would change, while caller authority, private video output, and upgrade safety remain unresolved.

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

Decision needed

  • Question: May general operator.write authority and an operator-asserted handle grant owner-level agent tools to the active FaceTime participant when the remote identity cannot be verified?
  • Recommendation: Constrain manual calls: Require owner-bound attachment authority and restrict consult tools unless the participant has a verified owner binding.
  • Why: The branch deliberately replaces event-based caller admission with human assertion; code review and mocked tests cannot select the acceptable trust policy for existing users.

Before merge

  • Add real behavior proof - Authority-chain proof required: Current-head tests and native fault checks do not show an allowed caller's final audio, tools, and video effects, rejection of a restricted operator or wrong participant before consult I/O, or that an OBS stream viewer cannot receive private frames. A prior-head local preview does not cover this rewritten path. The released pending-dial store also lacks existing-state compatibility proof. Add a redacted diagnostic recording or terminal/log trace of these boundaries, removing IP addresses, keys, phone numbers, and private endpoints; update the PR body for a fresh review, or ask a maintainer to comment @clawsweeper re-review if it does not refresh.
  • Keep private visuals off shared OBS Program (P1) - Selecting the authenticated browser scene as global Program makes private call pixels available to an existing OBS stream or recording. Use an isolated camera output or obtain an explicit, evidenced security decision for that shared output.
  • Require owner authority for direct FaceTime attachment (P1) - The new Gateway method accepts general operator.write clients without the one-shot tool approval, then starts a call whose consults carry senderIsOwner. A role without owner identity or access to the configured agent can thereby grant owner tools; check current owner authority before attachment and the consult effect.
  • Constrain owner tools to an admitted remote caller (P1) - An allowlisted handle supplied at attach is not correlated with the active remote participant. Native capture verifies the local process and audio route only, so a different participant can receive owner-level consult behavior; reject that case before tool effects or restrict manual calls.
  • Provide an upgrade path for released call control (P1) - The released plugin automatically admits configured callers and supports carrier hangup; the replacement requires manual attachment and end_call only detaches media. Existing users can lose those workflows on update without an explicit migration decision and fresh-install and upgrade proof.
  • Reconcile stored pending dials during the cutover (P1) - The released runtime persists and reloads accepted or ambiguous outbound dials. Removing that read leaves an upgrade during a pending dial without its cancellation or reconciliation owner and permits a new dial; settle or migrate the stored record first.
  • Restore the Xcode prerequisite for first driver setup (P1) - The new README says normal installation needs no Xcode, but a missing or outdated paired driver still runs an installer that requires /Applications/Xcode.app and xcodebuild. Fresh setup will stop there; supply a supported prebuilt driver or retain the prerequisite and an actionable setup check.
  • Start video only for a video attachment (P2) - The talk driver creates and starts video whenever the plugin setting is enabled, without receiving the admitted call mode. An audio-only attachment can therefore change OBS Program and start Virtual Camera.
  • Recheck camera ownership before stopping it (P2) - The started flag records an earlier StartVirtualCam call, but stop does not check whether the operator has since repurposed Program and Virtual Camera. Ending this call can interrupt the operator's newer camera use.
  • Join in-flight OBS startup during teardown (P2) - If stop runs before startup publishes active, it aborts and returns immediately. The pending OBS call can still change Program before its later cleanup, after FaceTime teardown has reported completion.
  • Reflect lost OBS output in video status (P2) - Status reports provider health and cached bridge state but observes no OBS connection or delivered browser output. OBS can become unavailable while the call still reports active video; reflect output loss as degraded.
  • Expose video health in the agent's call status (P2) - Runtime status includes each call's video health, but facetime_call drops it when summarizing status. The agent cannot see startup failure or degradation when deciding the next action.
  • Update the published FaceTime setup and recovery guides (P3) - The changed README describes operator attachment and OBS, while the public guides still instruct users to prepare injection, automatic answering, and old hangup behavior. Update those guides for the approved cutover before release.
  • Resolve security concern: General operator write can grant owner consult authority - The direct attachment RPC needs only operator.write, then supplies senderIsOwner to the configured agent without an owner-bound approval or final-effect authority check.
  • Resolve security concern: Remote identity is asserted rather than observed - A configured handle is converted into owner authority even though the native capture checks the local media process and route, not who is on the remote call.
  • Resolve security concern: Private visual output enters shared OBS Program - Any existing OBS stream or recording using Program can receive the authenticated browser scene intended for the FaceTime participant.
  • Resolve merge risk - General operator.write access can invoke direct attachment and promote an asserted owner handle to owner-level agent consult authority; neither a wrong remote participant nor a restricted operator role is rejected at the final consult effect.
  • Resolve merge risk - The authenticated visual scene enters shared OBS Program, so an existing stream or recording may receive private frames without participating in the FaceTime call.
  • Resolve merge risk - The released automatic-answer, carrier-hangup, and persistent pending-dial contracts are replaced without a demonstrated upgrade transition or existing-state reconciliation.
  • Resolve merge risk - The new public live-visual Plugin SDK contract needs an explicit maintainer review of its provider and consumer boundary before third-party plugins depend on it.
  • Resolve merge risk - The coordinated capture-only native change remains unmerged, and the candidate has no published-native-package versus candidate-plugin upgrade proof.
  • Complete next step - Resolve the security and SDK ownership decisions, repair the call, OBS, setup, and upgrade findings, and provide current-head final-effect and published-native upgrade proof before merge.
  • Improve patch quality - Establish the allowed owner and nearest unauthorized operator or caller at the final consult effect, including revocation or reassignment before I/O.
  • Improve patch quality - Isolate private OBS output and show the intended FaceTime viewer and an existing stream or recording viewer during a real call.
  • Improve patch quality - Show fresh setup and a v2026.9.6 upgrade with pending-dial handling against the published native package.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P1] Keep private visuals off shared OBS Program — extensions/facetime/src/obs-video-controller.ts:86-88
  • [P1] Require owner authority for direct FaceTime attachment — extensions/facetime/index.ts:214-218
  • [P1] Constrain owner tools to an admitted remote caller — extensions/facetime/src/runtime.ts:142-155
  • [high] General operator write can grant owner consult authority — extensions/facetime/index.ts:214
  • [high] Remote identity is asserted rather than observed — extensions/facetime/src/runtime.ts:147
  • [high] Private visual output enters shared OBS Program — extensions/facetime/src/obs-video-controller.ts:86
Agent review details

How this fits together

The FaceTime plugin takes operator requests and configured owner handles, captures call audio, and connects it to a realtime voice provider. The proposed visual path sends timed media to a renderer and passes its browser output through OBS to FaceTime.

flowchart LR
  A[Operator and owner handle] --> B[Attachment decision]
  B --> C[FaceTime call]
  C --> D[Audio capture]
  D --> E[Realtime voice]
  E --> F[Live visual provider]
  F --> G[OBS Virtual Camera]
  G --> H[Call participant]
Loading

Technical review

Best possible solution:

Coordinate the signed native cutover with a guided FaceTime upgrade that reconciles pending calls, limits manual attachment authority, isolates private video output, and reports the real audio and video outcome.

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

Not applicable as a feature request. Current main and v2026.9.6 lack the visual bridge; no real call on the proposed head is documented.

Is this the best way to solve the issue?

No. Capture-only native media is a plausible direction, but the proposed cutover needs a bounded authority model, isolated video output, a compatible upgrade, and accurate setup guidance.

Full review comments:

  • [P1] Keep private visuals off shared OBS Program — extensions/facetime/src/obs-video-controller.ts:86-88
    Selecting the authenticated browser scene as global Program makes private call pixels available to an existing OBS stream or recording. Use an isolated camera output or obtain an explicit, evidenced security decision for that shared output.
    Confidence: 0.96
  • [P1] Require owner authority for direct FaceTime attachment — extensions/facetime/index.ts:214-218
    The new Gateway method accepts general operator.write clients without the one-shot tool approval, then starts a call whose consults carry senderIsOwner. A role without owner identity or access to the configured agent can thereby grant owner tools; check current owner authority before attachment and the consult effect.
    Confidence: 0.92
  • [P1] Constrain owner tools to an admitted remote caller — extensions/facetime/src/runtime.ts:142-155
    An allowlisted handle supplied at attach is not correlated with the active remote participant. Native capture verifies the local process and audio route only, so a different participant can receive owner-level consult behavior; reject that case before tool effects or restrict manual calls.
    Confidence: 0.9
  • [P1] Provide an upgrade path for released call control — extensions/facetime/src/runtime.ts:132-155
    The released plugin automatically admits configured callers and supports carrier hangup; the replacement requires manual attachment and end_call only detaches media. Existing users can lose those workflows on update without an explicit migration decision and fresh-install and upgrade proof.
    Confidence: 0.94
  • [P1] Reconcile stored pending dials during the cutover — extensions/facetime/src/runtime.ts:73-79
    The released runtime persists and reloads accepted or ambiguous outbound dials. Removing that read leaves an upgrade during a pending dial without its cancellation or reconciliation owner and permits a new dial; settle or migrate the stored record first.
    Confidence: 0.91
  • [P1] Restore the Xcode prerequisite for first driver setup — extensions/facetime/README.md:5-8
    The new README says normal installation needs no Xcode, but a missing or outdated paired driver still runs an installer that requires /Applications/Xcode.app and xcodebuild. Fresh setup will stop there; supply a supported prebuilt driver or retain the prerequisite and an actionable setup check.
    Confidence: 0.96
  • [P2] Start video only for a video attachment — extensions/facetime/src/talk-driver.ts:104-110
    The talk driver creates and starts video whenever the plugin setting is enabled, without receiving the admitted call mode. An audio-only attachment can therefore change OBS Program and start Virtual Camera.
    Confidence: 0.95
  • [P2] Recheck camera ownership before stopping it — extensions/facetime/src/obs-video-controller.ts:118-120
    The started flag records an earlier StartVirtualCam call, but stop does not check whether the operator has since repurposed Program and Virtual Camera. Ending this call can interrupt the operator's newer camera use.
    Confidence: 0.88
  • [P2] Join in-flight OBS startup during teardown — extensions/facetime/src/talk-driver-video.ts:114-125
    If stop runs before startup publishes active, it aborts and returns immediately. The pending OBS call can still change Program before its later cleanup, after FaceTime teardown has reported completion.
    Confidence: 0.94
  • [P2] Reflect lost OBS output in video status — extensions/facetime/src/video-bridge.ts:213-220
    Status reports provider health and cached bridge state but observes no OBS connection or delivered browser output. OBS can become unavailable while the call still reports active video; reflect output loss as degraded.
    Confidence: 0.84
  • [P2] Expose video health in the agent's call status — extensions/facetime/src/tool.ts:73-86
    Runtime status includes each call's video health, but facetime_call drops it when summarizing status. The agent cannot see startup failure or degradation when deciding the next action.
    Confidence: 0.97
  • [P3] Update the published FaceTime setup and recovery guides — extensions/facetime/README.md:52-57
    The changed README describes operator attachment and OBS, while the public guides still instruct users to prepare injection, automatic answering, and old hangup behavior. Update those guides for the approved cutover before release.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.92

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Repair the boundaries before merge (recommended)
    Bind direct attachment to current owner authority, constrain unverified callers, isolate OBS output, and provide a released-state upgrade path.
  2. Accept a documented trust tradeoff
    Security and product owners could accept manual caller assertion and shared OBS output only with explicit user guidance and final-effect evidence.
  3. Pause the coordinated cutover
    Keep this branch open while the native capture release and the migration from shipped call control are resolved together.

Security

Needs attention: Attachment can promote asserted identity to owner consult authority, and shared OBS Program can expose private frames; the declared OBS dependency matches the feature purpose.

Evidence

Security concerns:

  • [high] General operator write can grant owner consult authority — extensions/facetime/index.ts:214
    The direct attachment RPC needs only operator.write, then supplies senderIsOwner to the configured agent without an owner-bound approval or final-effect authority check.
    Confidence: 0.92
  • [high] Remote identity is asserted rather than observed — extensions/facetime/src/runtime.ts:147
    A configured handle is converted into owner authority even though the native capture checks the local media process and route, not who is on the remote call.
    Confidence: 0.9
  • [high] Private visual output enters shared OBS Program — extensions/facetime/src/obs-video-controller.ts:86
    Any existing OBS stream or recording using Program can receive the authenticated browser scene intended for the FaceTime participant.
    Confidence: 0.96

What I checked:

  • Current-main feature gap: The recorded current main has neither the live-visual SDK files nor the FaceTime video bridge; this PR remains a distinct feature candidate. (c6d3e400531d)
  • Released pending-dial contract: v2026.9.6 opens the persistent pending-dial store and loads its active record during runtime creation; the proposed runtime removes that read without an existing-state transition. (extensions/facetime/src/runtime.ts:80, eb377ac59e6c)
  • Previous owner admission: Current main uses native call events and configured owner handles before activating an inbound call. (extensions/facetime/src/runtime-call-events.ts:340, c6d3e400531d)
  • New attachment authority: Attachment accepts an asserted allowlisted handle, creates a call identity, and starts media; the call state sets the sender's owner bit without observing the remote participant. (extensions/facetime/src/runtime.ts:142, a8975e0e4089)
  • Direct attachment route: The newly introduced facetime.attach Gateway method requires operator.write and calls runtime attachment without the facetime_call tool's one-shot approval hook. (extensions/facetime/index.ts:214, a8975e0e4089)
  • Scope and consult boundary: Operator.write is a general mutating scope distinct from admin and approval scopes. Realtime consult forwards senderIsOwner into the agent tool authority overlay. (src/talk/agent-consult-runtime.ts:222, a8975e0e4089)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Plugin configuration surface 15 paths added The optional video settings expand what existing configuration and setup flows must validate.
Public plugin contract 1 SDK subpath added Third-party renderers may depend on this new provider contract once released.

Root-cause cluster

Relationship: canonical
Canonical: #158392
Summary: This branch incorporates the live-visual SDK seam from the earlier standalone PR, which closed without merging.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a useful optional FaceTime feature with bounded users and substantial merge work, not a current core-runtime emergency.
  • merge-risk: 🚨 compatibility: The patch replaces released FaceTime call control, leaves persisted pending dials unread, and adds a public plugin contract.
  • merge-risk: 🚨 security-boundary: Attachment promotes asserted identity to owner tools and private visuals pass through shared OBS Program.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-25T22:28:48.869Z sha 4a1e37eb4b22c29a28b8b52c71942e4c7f3f5cde :: needs real behavior proof before merge. :: [P1] Keep private visuals off a shared OBS Program output | [P2] Start the OBS bridge only for a video call | [P2] Revalidate virtual-camera ownership before stopping it | [P2] Report an OBS disconnect as degraded video | [P2] Include video health in the agent's call status | [P3] Add video setup to the public FaceTime guide
  • reviewed 2026-09-25T22:39:55.722Z sha 89f6817 :: needs real behavior proof before merge. :: [P1] Keep private visuals off OBS Program | [P2] Start the OBS bridge only for an admitted video call | [P2] Revalidate camera ownership before stopping it | [P2] Settle in-flight OBS startup during call teardown | [P2] Report OBS disconnection as degraded video | [P2] Include video health in the agent's call status
  • reviewed 2026-09-29T04:58:13.517Z sha 628d491777dd246b2c34685a1471e2f217f5e795 :: needs real behavior proof before merge. :: [P1] Keep private visuals off shared OBS Program | [P1] Verify the current caller before granting owner tools | [P1] Preserve the shipped call-control contract on upgrade | [P1] Reconcile persisted pending dials during the cutover | [P2] Start video only for an admitted video call | [P2] Revalidate camera ownership before stopping it

Reviewed September 29, 2026, 1:24 AM ET / 05:24 UTC (Revision 4).

@RomneyDa
RomneyDa force-pushed the feat/facetime-video-bridge branch from 4a1e37e to 89f6817 Compare September 25, 2026 22:31
@openclaw-barnacle openclaw-barnacle Bot removed the app: web-ui App: web-ui label Sep 25, 2026

This branch has not been deployed

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

Labels

dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation 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: facetime FaceTime plugin rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant