Skip to content

[macos][openworlds] Add native supervisor bridge to the OpenWorlds shell #132

Description

@100yenadmin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttier-1Tier 1: Claude Code plugin

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions