refactor: remove mac attach-only setting

This commit is contained in:
Peter Steinberger
2026-01-12 04:38:42 +00:00
parent 8e1cdf3a1f
commit 51d5f16770
15 changed files with 18 additions and 126 deletions

View File

@@ -1,5 +1,5 @@
---
summary: "Gateway lifecycle on macOS (launchd + attach-only)"
summary: "Gateway lifecycle on macOS (launchd)"
read_when:
- Integrating the mac app with the gateway lifecycle
---
@@ -10,8 +10,7 @@ uses the external `clawdbot` CLI (no embedded runtime). This gives you reliable
autostart at login and restart on crashes.
Childprocess mode (Gateway spawned directly by the app) is **not in use** today.
If you need tighter coupling to the UI, use **Attachonly** and run the Gateway
manually in a terminal.
If you need tighter coupling to the UI, run the Gateway manually in a terminal.
## Default behavior (launchd)
@@ -30,35 +29,18 @@ launchctl bootout gui/$UID/com.clawdbot.gateway
Replace the label with `com.clawdbot.<profile>` when running a named profile.
## Attachonly (developer mode)
Attachonly tells the app to **connect to an existing Gateway** without spawning
one. This is ideal for local dev (hotreload, custom flags).
Steps:
1) Start the Gateway yourself:
```bash
pnpm gateway:watch
```
2) In the macOS app: Debug Settings → Gateway → **Attach only**.
The UI should show “Using existing gateway …” once connected.
## Unsigned dev builds
`scripts/restart-mac.sh --no-sign` is for fast local builds when you dont have
signing keys. To prevent launchd from pointing at an unsigned relay binary, it:
- Writes `~/.clawdbot/disable-launchagent`.
- Sets `clawdbot.gateway.attachExistingOnly=true` in the macOS app defaults.
Signed runs of `scripts/restart-mac.sh` clear these overrides if the marker is
Signed runs of `scripts/restart-mac.sh` clear this override if the marker is
present. To reset manually:
```bash
rm ~/.clawdbot/disable-launchagent
defaults write com.clawdbot.mac clawdbot.gateway.attachExistingOnly -bool NO
```
## Remote mode