fix(mac): add tailnet discovery fallback and debug CLI

This commit is contained in:
Peter Steinberger
2026-01-10 23:39:14 +01:00
parent c731a87d07
commit 621f710d60
19 changed files with 759 additions and 50 deletions

View File

@@ -90,6 +90,25 @@ Safety:
- Package app + CLI: `scripts/package-mac-app.sh`
- Switch bundled gateway runtime with `BUNDLED_RUNTIME=node|bun` (default: node).
## Debug gateway discovery (macOS CLI)
Use the debug CLI to exercise the same Bonjour + widearea discovery code that the
macOS app uses, without launching the app.
```bash
cd apps/macos
swift run clawdbot-mac-discovery --timeout 3000 --json
```
Options:
- `--include-local`: include gateways that would be filtered as “local”
- `--timeout <ms>`: overall discovery window (default `2000`)
- `--json`: structured output for diffing
Tip: compare against `pnpm clawdbot gateway discover --json` to see whether the
macOS apps discovery pipeline (NWBrowser + tailnet DNSSD fallback) differs from
the Node CLIs `dns-sd` based discovery.
## Related docs
- [Gateway runbook](/gateway)