You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`internal/telegram/bot.go` - Telegram message formatting utilities and token sanitization
109
109
-`internal/telegram/commands.go` - Telegram admin commands (/policy, /cred, /status, /audit, /help) backed by SQLite store
110
-
-`internal/container/types.go` - ContainerManager interface shared by Docker and Apple Containerbackends, Runtime enum (Docker=0, Apple=1, None=2), ContainerStatus struct
110
+
-`internal/container/types.go` - ContainerManager interface shared by Docker, Apple Container, and macOS VM (tart) backends, Runtime enum (Docker=0, Apple=1, None=2, MacOS=3), ContainerStatus struct
111
111
-`internal/container/apple.go` - Apple Container backend: AppleCLI wrapping `container` CLI via os/exec, AppleManager implementing ContainerManager, CA cert injection
112
112
-`internal/container/apple_test.go` - Tests for AppleCLI, AppleManager, and CA cert injection with mock CommandRunner
113
113
-`internal/container/tart.go` - macOS VM backend: TartCLI wrapping `tart` CLI for Virtualization.framework VMs with Bin() accessor and StartVM() for non-blocking background launch, TartManager implementing ContainerManager with VirtioFS volume sharing, tart-specific CA cert guest path (TartCACertGuestPath = /Volumes/ca/sluice-ca.crt), Keychain-based CA cert injection, and background VM process management via startVM function field
@@ -123,6 +123,7 @@ CI runs e2e tests via `.github/workflows/e2e-linux.yml` and `.github/workflows/e
123
123
-`compose.e2e.yml` - Three-container e2e setup (sluice + tun2proxy + test-runner) for Linux integration tests
124
124
-`scripts/docker-entrypoint.sh` - Container entrypoint with CA cert generation and copy to shared volume
125
125
-`scripts/apple-container-setup.sh` - macOS setup script for Apple Container: pf rules, tun2proxy, IP forwarding
126
+
-`scripts/macos-vm-setup.sh` - macOS setup script for tart VM backend: tun2proxy, pf rules, IP forwarding, tart dependency check
126
127
-`scripts/setup-vault.sh` - Interactive credential and CA setup script
127
128
-`scripts/gen-phantom-env.sh` - Phantom token env file generator for openclaw container
128
129
-`examples/config.toml` - Example TOML seed file for initial DB population via `sluice policy import`
@@ -746,31 +747,33 @@ See `compose.yml` in the repo root. Key features:
746
747
747
748
## Apple Container Support
748
749
749
-
Apple Container (macOS Virtualization.framework micro-VMs) is supported as an alternative to Docker. It gives native macOS isolation with access to Apple frameworks (EventKit, Messages, CallKit) that are unavailable in Linux containers.
750
+
Apple Container (macOS Virtualization.framework micro-VMs) is supported as an alternative to Docker. It runs Linux guests with lightweight hypervisor isolation. Apple Container does NOT provide access to Apple frameworks (iMessage, EventKit, Keychain, Shortcuts). For Apple framework access, use the macOS VM backend (`--runtime macos`).
750
751
751
752
### Runtime selection
752
753
753
754
The `--runtime` flag selects the container backend:
754
755
755
756
| Flag value | Description |
756
757
|-----------|-------------|
757
-
|`auto` (default) | Auto-detect: checks for `container` CLI (Apple) and Docker socket. Prefers Apple on macOS if both are available. |
758
+
|`auto` (default) | Auto-detect: checks for `container` CLI (Apple) and Docker socket. Prefers Apple on macOS if both are available. Never auto-selects `macos`. |
758
759
|`docker`| Use Docker backend. Requires Docker socket. |
759
-
|`apple`| Use Apple Container backend. Requires macOS and `container` CLI. |
760
+
|`apple`| Use Apple Container backend. Requires macOS and `container` CLI. Runs Linux guests. |
761
+
|`macos`| Use macOS VM backend via `tart`. Requires macOS with Apple Silicon and `tart` CLI (`brew install cirruslabs/cli/tart`). Runs macOS guests with full Apple framework access. Explicit-only (not auto-detected) because macOS VMs are heavyweight (2-4s boot, 1.5GB+ RAM). Use `--vm-image` to specify the OCI image (must include tart agent). Use `--cert-dir` for CA cert shared volume path. |
760
762
|`none`| Standalone mode. No container management. User configures `ALL_PROXY=socks5://localhost:1080` manually. |
761
763
762
764
### ContainerManager interface
763
765
764
-
Both Docker and Apple Containerbackends implement `container.ContainerManager` (defined in `internal/container/types.go`). Telegram commands, MCP injection, and credential management code works with any backend through this interface.
766
+
Docker, Apple Container, and macOS VM (tart) backends all implement `container.ContainerManager` (defined in `internal/container/types.go`). Telegram commands, MCP injection, and credential management code works with any backend through this interface.
765
767
766
768
### Apple Container architecture
767
769
768
770
```
769
771
Apple Container:
770
-
OpenClaw micro-VM (bridge100) -> pf route-to -> tun2proxy on host -> SOCKS5 -> sluice on host -> internet
772
+
OpenClaw Linux micro-VM (bridge100) -> pf route-to -> tun2proxy on host -> SOCKS5 -> sluice on host -> internet
771
773
```
772
774
773
775
Key differences from Docker:
776
+
- Runs Linux guests (not macOS). No Apple framework access.
774
777
-`/dev/net/tun` is not supported inside Apple Container guests. tun2proxy runs on the host.
775
778
- macOS pf rules redirect VM bridge traffic through the host TUN device.
776
779
- VM management via `container` CLI (run, exec, stop, rm, inspect, ls) wrapped by `internal/container/apple.go`.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,8 +49,9 @@ When writing new e2e tests, use the helpers in `e2e/helpers_test.go` (startSluic
49
49
50
50
### macOS-specific tests
51
51
52
-
- Apple Container integration tests (`internal/container/`) use mock `CommandRunner` by default and run on all platforms
52
+
- Apple Container and macOS VM (tart) integration tests (`internal/container/`) use mock `CommandRunner` by default and run on all platforms
53
53
- Full integration tests requiring a real Apple Container runtime are in `e2e/apple_test.go` (see `docs/apple-container-quickstart.md`)
54
+
- macOS VM tests require `tart` CLI (`brew install cirruslabs/cli/tart`) and Apple Silicon. Unit tests use mocked `CommandRunner` and run everywhere. E2e tests with a real macOS VM require `tart` installed and a compatible OCI image.
54
55
55
56
## Commit Messages
56
57
@@ -108,7 +109,7 @@ Do not edit `internal/api/api.gen.go` manually. It is regenerated from the spec.
0 commit comments