refactor: remove mac attach-only setting
This commit is contained in:
@@ -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
|
||||
auto‑start at login and restart on crashes.
|
||||
|
||||
Child‑process mode (Gateway spawned directly by the app) is **not in use** today.
|
||||
If you need tighter coupling to the UI, use **Attach‑only** 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.
|
||||
|
||||
## Attach‑only (developer mode)
|
||||
|
||||
Attach‑only tells the app to **connect to an existing Gateway** without spawning
|
||||
one. This is ideal for local dev (hot‑reload, 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 don’t 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
|
||||
|
||||
@@ -12,7 +12,7 @@ Last updated: 2026-01-01
|
||||
## TL;DR
|
||||
- **Tailoring lives outside the repo:** `~/clawd` (workspace) + `~/.clawdbot/clawdbot.json` (config).
|
||||
- **Stable workflow:** install the macOS app; let it run the bundled Gateway.
|
||||
- **Bleeding edge workflow:** run the Gateway yourself via `pnpm gateway:watch`, then point the macOS app at it using **Debug Settings → Gateway → Attach only**.
|
||||
- **Bleeding edge workflow:** run the Gateway yourself via `pnpm gateway:watch`, then let the macOS app attach in Local mode.
|
||||
|
||||
## Prereqs (from source)
|
||||
- Node `>=22`
|
||||
@@ -84,9 +84,7 @@ pnpm gateway:watch
|
||||
In **Clawdbot.app**:
|
||||
|
||||
- Connection Mode: **Local**
|
||||
- Settings → **Debug Settings** → **Gateway** → enable **Attach only**
|
||||
|
||||
This makes the app **only connect to an already-running gateway** and **never spawn** its own.
|
||||
The app will attach to the running gateway on the configured port.
|
||||
|
||||
### 3) Verify
|
||||
|
||||
@@ -98,7 +96,6 @@ pnpm clawdbot health
|
||||
```
|
||||
|
||||
### Common footguns
|
||||
- **Attach only enabled, but nothing is running:** app shows “Attach-only enabled; no gateway to attach”.
|
||||
- **Wrong port:** Gateway WS defaults to `ws://127.0.0.1:18789`; keep app + CLI on the same port.
|
||||
- **Where state lives:**
|
||||
- Credentials: `~/.clawdbot/credentials/`
|
||||
@@ -129,4 +126,4 @@ user service (no lingering needed). See [Gateway runbook](/gateway) for the syst
|
||||
- [Gateway configuration](/gateway/configuration) (config schema + examples)
|
||||
- [Discord](/providers/discord) and [Telegram](/providers/telegram) (reply tags + replyToMode settings)
|
||||
- [Clawdbot assistant setup](/start/clawd)
|
||||
- [macOS app](/platforms/macos) (gateway lifecycle + “Attach only”)
|
||||
- [macOS app](/platforms/macos) (gateway lifecycle)
|
||||
|
||||
Reference in New Issue
Block a user