feat: improve gateway services and auto-reply commands

This commit is contained in:
Peter Steinberger
2026-01-11 02:17:10 +01:00
parent df55d45b6f
commit e0bf86f06c
52 changed files with 888 additions and 213 deletions

View File

@@ -164,7 +164,7 @@ Control UI details: [Control UI](/web/control-ui)
On Linux, Clawdbot uses a systemd **user** service. After `--install-daemon`, verify:
```bash
systemctl --user status clawdbot-gateway.service
systemctl --user status clawdbot-gateway[-<profile>].service
```
If the service dies after logout, enable lingering:

View File

@@ -42,5 +42,5 @@ Use one of these (all supported):
- Repair/migrate: `clawdbot doctor` (offers to install or fix the service)
The service target depends on OS:
- macOS: LaunchAgent (`com.clawdbot.gateway`)
- Linux/WSL2: systemd user service
- macOS: LaunchAgent (`com.clawdbot.gateway` or `com.clawdbot.<profile>`)
- Linux/WSL2: systemd user service (`clawdbot-gateway[-<profile>].service`)

View File

@@ -64,11 +64,11 @@ live in the [Gateway runbook](/gateway).
Minimal setup:
Create `~/.config/systemd/user/clawdbot-gateway.service`:
Create `~/.config/systemd/user/clawdbot-gateway[-<profile>].service`:
```
[Unit]
Description=Clawdbot Gateway
Description=Clawdbot Gateway (profile: <profile>, v<version>)
After=network-online.target
Wants=network-online.target
@@ -84,5 +84,5 @@ WantedBy=default.target
Enable it:
```
systemctl --user enable --now clawdbot-gateway.service
systemctl --user enable --now clawdbot-gateway[-<profile>].service
```

View File

@@ -63,10 +63,10 @@ Version injection:
## Launchd (Gateway as LaunchAgent)
Label:
- `com.clawdbot.gateway`
- `com.clawdbot.gateway` (or `com.clawdbot.<profile>`)
Plist location (per-user):
- `~/Library/LaunchAgents/com.clawdbot.gateway.plist`
- `~/Library/LaunchAgents/com.clawdbot.gateway.plist` (or `.../com.clawdbot.<profile>.plist`)
Manager:
- The macOS app owns LaunchAgent install/update for the bundled gateway.

View File

@@ -14,7 +14,8 @@ manually in a terminal.
## Default behavior (launchd)
- The app installs a peruser LaunchAgent labeled `com.clawdbot.gateway`.
- The app installs a peruser LaunchAgent labeled `com.clawdbot.gateway`
(or `com.clawdbot.<profile>` when using `--profile`/`CLAWDBOT_PROFILE`).
- When Local mode is enabled, the app ensures the LaunchAgent is loaded and
starts the Gateway if needed.
- Logs are written to the launchd gateway log path (visible in Debug Settings).
@@ -26,6 +27,8 @@ launchctl kickstart -k gui/$UID/com.clawdbot.gateway
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

View File

@@ -31,13 +31,16 @@ node.
## Launchd control
The app manages a peruser LaunchAgent labeled `com.clawdbot.gateway`.
The app manages a peruser LaunchAgent labeled `com.clawdbot.gateway`
(or `com.clawdbot.<profile>` when using `--profile`/`CLAWDBOT_PROFILE`).
```bash
launchctl kickstart -k gui/$UID/com.clawdbot.gateway
launchctl bootout gui/$UID/com.clawdbot.gateway
```
Replace the label with `com.clawdbot.<profile>` when running a named profile.
If the LaunchAgent isnt installed, enable it from the app or run
`clawdbot daemon install`.