Repository navigation
Add a secure bidirectional FaceTime Realtime voice bridge - #4
Conversation
- FaceTimeHelper: call setIsSendingAudio:YES on unmute so the local participant actually transmits; surface is_sending_audio_set in result - inject-helper: copy the dylib to a unique timestamped path per run to avoid reusing a stale/locked injected dylib - audio-pump: drop `gain -n` normalization on output gain (was rescaling to peak); apply the configured gain directly - preflight: lower synth test-tone volume (0.9 -> 0.2) and use `gain 1` instead of `gain -n 3` to avoid normalized clipping in the probes Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Live Highlights:
The test Mac remains on |
ClawSweeper review follow-upOffline ClawSweeper review was run against the evolving PR head, including exact committed heads Findings addressed
Findings reviewed and consciously not changed
Proof completed
Current CI noteGitHub Actions run 30221886765 passed typecheck, then timed out at 5 seconds in |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Merged via squash at Final source head: Final landing proof:
The last change gave the native Objective-C authentication harness a test-local timeout for cold macOS toolchain startup. It does not weaken or skip any authentication assertions. |
Summary
Paired core change: openclaw/openclaw#114163
This PR turns the FaceTime plugin into a working bidirectional voice carrier for OpenClaw on a dedicated, signed-in Mac.
The complete route is:
The Mac remains the call endpoint, but OpenClaw hears the caller and the caller hears OpenClaw. The call app's own output is suppressed at the process tap, so the unattended Mac does not speak the conversation through its physical speakers.
This branch also adds authenticated owner identity, same-agent workspace and tool delegation, a bundled agent tool and skill, secure inbound and outbound call control, persistent helper supervision, an idempotent driver installer, guided readiness diagnostics, and live acceptance tooling. The default Realtime model is
gpt-realtime-2.1, now validated both directly and through live FaceTime Audio calls. Current scope: 71 changed files, 9,872 additions, and 3,790 deletions.Why
The original bridge could capture some call audio, but the return path and unattended lifecycle were not reliable:
This change makes those states explicit and gives the gateway one lifecycle owner for the whole bridge.
What changed
Paired realtime audio path
OpenClaw-FeedandOpenClaw-MicCore Audio driver.Inbound and outbound calls
Authenticated owner identity and same-agent delegation
whitelistHandlesentry as an authenticated owner identity, not as a lower-privilege guest. The README calls out this security contract explicitly.senderIdand carriessenderIsOwner: truefrom inbound admission or approved outbound dialing through active call state and the delegated agent turn.REALTIME_VOICE_AGENT_CONSULT_SENDER_AUTH_VERSION === 1) before answering. Older hosts fail closed instead of silently dropping the owner fields.IDENTITY.md,USER.md, andSOUL.mdinto the Realtime bootstrap context, then delegates substantive work into that same agent's normal workspace, memory, tools, and approval policy.webchatprovider keeps approval follow-ups attached to a registered OpenClaw session.openclaw_agent_consultand presents confirmed results as its own work, without inventing a separate assistant or supervisor.owner,safe-read-only, andnoneconsult tool policies.owneris the default for allowlisted private calls.Authenticated helper control
Driver installation
facetime.installDriverandfacetime.driverStatus.driverInstall.phasethroughfacetime.status.The GPL-licensed BlackHole source and binary are not distributed in this package. The installer fetches and builds the pinned source locally, preserving the licensing boundary.
Guided setup
Adds:
The report combines:
Each check is classified as
ready,repairing,action-required,verify-on-call, orrecommended. Safe runtime repairs remain automatic. Authentication, TCC consent, administrator authorization, Recovery changes, and System Settings changes remain explicit operator actions.Runtime status is refreshed after the concurrent preflight so a helper that authenticates during setup is not incorrectly reported as still repairing.
Config, packaging, and diagnostics
gpt-realtime-2.1with themarinvoice.WORKLOG.mduntracked and excluded from the public repository.Agent tool and bundled skill
facetime_callagent tool withget_status,check_readiness,initiate_call, andend_callactions.facetimeskill that teaches the configured agent to use the typed tool, check readiness, default to audio, avoid duplicate calls, distinguish pending from active calls, and report failures accurately.allow-onceanddenyare available. Persistent approval is intentionally unavailable, and the model cannot approve its own call.audioReady,realtimeActive, input verification, output suppression, routing errors, and carrier hang-up state.Realtime model and voice path
gpt-realtime-2.1with themarinvoice.Security model and macOS requirements
The helper accepts calls and call-control commands only for configured owner handles. Helper connections are authenticated, outbound calls are correlated to the exact request, and fail-safe audio suppression remains active until a call is known to be closed.
The current call-control architecture injects a helper into Apple's protected FaceTime and Phone apps with LLDB. Apple SIP runtime protections block that attachment, even for root. This therefore requires disabling only SIP debugging restrictions from macOS Recovery:
csrutil enable --without debugThe plugin detects this prerequisite but never changes SIP itself. Other SIP protections remain enabled, but allowing debugger attachment still weakens the machine's security. The README recommends a dedicated, patched, physically controlled OpenClaw Mac. Replacing LLDB injection with a supported helper-free call-control path is a tracked follow-up.
Validation
d938063succeeded; installed recipe reportedcurrentgpt-realtime-2.1direct provider probesession.updated, 124,800 PCM16 output bytes, exact transcript, andresponse.donegpt-realtime-2.1guided setupopenai:gpt-realtime-2.1; paired loopback RMS 0.115210gpt-realtime-2.1gpt-realtime-2.1model proofThe exact model ID and Realtime/tool-use capabilities were confirmed against the official OpenAI model documentation.
A credential-safe direct probe used the same plugin-scoped OpenAI Platform credential resolution and PCM16 WebSocket provider as the FaceTime bridge. The model completed
session.createdandsession.updated, returned the exact requested transcript, emitted 124,800 bytes of assistant audio, and completed withresponse.done.The MacBook Air was then switched from
gpt-realtime-2togpt-realtime-2.1, the gateway was restarted, andfacetime.setuppassed every required check. Both FaceTime and Phone helpers authenticated, the installed paired driver reported current, the process tap passed, and the paired-driver loopback measured RMS 0.115210.Final live acceptance used outbound FaceTime Audio call
9FD8360B-7B00-41A3-8965-3DE0BF5D4703:audioReady: true;realtimeActive: true;processInputVerified: true;processOutputSuppressed: true;response.done;The production test Mac remains configured for
gpt-realtime-2.1.Owner identity and tool-access proof
Final owner-auth acceptance on 2026-07-26 used a fresh outbound FaceTime Audio call with the paired OpenClaw core change and
openai:gpt-realtime-2.1:senderIsOwner: true;audioReady: true,realtimeActive: true,processInputVerified: true, andprocessOutputSuppressed: true;The remote caller confirmed both the personalized identity behavior and successful Calendar access. This exercises the same owner-aware agent/tool boundary covered by paired core PR openclaw/openclaw#114163.
Inbound-call environment finding
The inbound failure encountered during testing was traced outside the plugin: macOS DND filtering rejected the invitation before either helper could observe it while the display was remotely shared. Enabling notifications while mirroring or sharing allowed the next inbound call to ring and auto-answer. Setup now detects and explains that condition.
Known limitations and follow-ups
verify-on-call.gpt-realtime-2.1is the tested default. Automatic fallback togpt-realtime-2is not implemented in this PR; users can still configure that older model explicitly.Reviewer notes
This is a deliberately broad draft because the audio transport, helper lifecycle, call control, setup contract, packaging, and security requirements must agree as one system. The commits are separated by concern, but the branch should be reviewed as a complete carrier implementation.