Summary
Add a native supervisor bridge so OpenWorlds can become the visible app shell
without reintroducing the old SwiftUI launcher as the product UI.
Architecture
Expose a small WKWebView bridge:
window.ClawDnDNative.request(type, payload)
Supported request types:
appStatus
dependencyStatus
providerStatuses
startViewer
stopViewer
startProviderSession
stopProvider
diagnostics
copyDiagnostics
openFallbackDashboard
Native replies:
{ "ok": true, "requestId": "uuid", "type": "appStatus", "payload": {} }
Errors:
{ "ok": false, "requestId": "uuid", "type": "startProviderSession", "error": "message" }
Boundaries
- The bridge controls processes and app prefs only.
- It must not write campaign state directly.
- Provider launches still use existing adapter contracts and player-facade move
paths.
- If opened in Safari, OpenWorlds must detect the missing bridge and mark native
controls unavailable.
Acceptance Criteria
- OpenWorlds can read native app status.
- OpenWorlds can read provider status.
- OpenWorlds can start/stop viewer/provider sessions through Swift.
- OpenWorlds can copy diagnostics.
- Missing bridge shows
Unavailable, not fake controls.
Validation
swift build --package-path macos/ClawDnDApp
./script/build_and_run.sh --verify
python3 -m unittest viewer.tests.test_openworlds_static -q
git diff --check
Original-Agent Handoff
Inspect first:
macos/ClawDnDApp/Sources/ClawDnDApp/Views/WebView.swift
macos/ClawDnDApp/Sources/ClawDnDApp/Services/AppProcessService.swift
macos/ClawDnDApp/Sources/ClawDnDApp/Services/ProviderAdapters.swift
viewer/openworlds/app.jsx
viewer/openworlds/screen-settings.jsx
Summary
Add a native supervisor bridge so OpenWorlds can become the visible app shell
without reintroducing the old SwiftUI launcher as the product UI.
Architecture
Expose a small WKWebView bridge:
Supported request types:
appStatusdependencyStatusproviderStatusesstartViewerstopViewerstartProviderSessionstopProviderdiagnosticscopyDiagnosticsopenFallbackDashboardNative replies:
{ "ok": true, "requestId": "uuid", "type": "appStatus", "payload": {} }Errors:
{ "ok": false, "requestId": "uuid", "type": "startProviderSession", "error": "message" }Boundaries
paths.
controls unavailable.
Acceptance Criteria
Unavailable, not fake controls.Validation
Original-Agent Handoff
Inspect first:
macos/ClawDnDApp/Sources/ClawDnDApp/Views/WebView.swiftmacos/ClawDnDApp/Sources/ClawDnDApp/Services/AppProcessService.swiftmacos/ClawDnDApp/Sources/ClawDnDApp/Services/ProviderAdapters.swiftviewer/openworlds/app.jsxviewer/openworlds/screen-settings.jsx