gateway: improve conflict handling and logging

This commit is contained in:
Peter Steinberger
2025-12-09 20:07:24 +00:00
parent 0de944be28
commit 5e5845547e
4 changed files with 124 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ pnpm clawdis gateway --force
```
- Binds WebSocket control plane to `127.0.0.1:<port>` (default 18789).
- Logs to stdout; use launchd/systemd to keep it alive and rotate logs.
- Pass `--verbose` to mirror debug logging from the log file into stdio when troubleshooting.
- Pass `--verbose` to mirror debug logging (handshakes, req/res, events) from the log file into stdio when troubleshooting.
- `--force` uses `lsof` to find listeners on the chosen port, sends SIGTERM, logs what it killed, then starts the gateway (fails fast if `lsof` is missing).
- Optional shared secret: pass `--token <value>` or set `CLAWDIS_GATEWAY_TOKEN` to require clients to send `hello.auth.token`.