docs(plan): mark bonjour discovery gap completed

This commit is contained in:
William Valentin
2026-02-16 01:49:05 -08:00
parent 323bef0526
commit 113751ef1b
2 changed files with 64 additions and 2 deletions
@@ -0,0 +1,40 @@
# Bonjour/mDNS Discovery Checklist
Date: 2026-02-16
Status: completed
## Scope
- Add optional LAN service advertisement/discovery for the Flynn gateway.
- Keep discovery disabled by default and safe for production deployments.
## Completed
- Added `server.discovery` config schema in `src/config/schema.ts`:
- `enabled` (default `false`)
- `service_name` (default `flynn-gateway`)
- `service_type` (default `_flynn._tcp`)
- `txt` (default `{}`)
- Added gateway discovery runtime in `src/gateway/discovery.ts`:
- starts mDNS advertisement via `avahi-publish-service` (Linux) with fallback to `dns-sd` (macOS)
- supports graceful shutdown (`SIGTERM` with fallback `SIGKILL`)
- Wired discovery into gateway lifecycle in `src/gateway/server.ts`:
- starts advertisement after gateway listen
- stops advertisement during shutdown
- injects non-secret TXT metadata (`instance`, `version`) plus optional config `txt`
- skips advertisement when bound to loopback (`server.localhost: true`)
- Wired config into gateway construction in `src/daemon/services.ts`.
- Updated docs:
- `README.md` with Bonjour/mDNS configuration and behavior notes
- `config/default.yaml` with discovery defaults and LAN safety comment
- Added tests:
- `src/config/schema.test.ts` (discovery defaults + custom config)
- `src/gateway/discovery.test.ts` (spawn path, fallback path, hard failure path)
- `src/gateway/server.discovery.test.ts` (gateway lifecycle start/stop + loopback skip)
## Tests
## Verification
- `pnpm test:run src/config/schema.test.ts src/gateway/discovery.test.ts src/gateway/server.discovery.test.ts`
- `pnpm typecheck`
+24 -2
View File
@@ -385,6 +385,28 @@
],
"test_status": "pnpm test:run src/config/schema.test.ts src/memory/qmd-search.test.ts + pnpm typecheck passing"
},
"bonjour-mdns-discovery": {
"file": "2026-02-16-bonjour-mdns-discovery-checklist.md",
"status": "completed",
"date": "2026-02-16",
"updated": "2026-02-16",
"summary": "Implemented optional LAN Bonjour/mDNS discovery for gateway advertisement via host tools (`avahi-publish-service` with `dns-sd` fallback), including safe default-off config (`server.discovery.*`), lifecycle start/stop wiring, loopback guardrails, docs, and tests.",
"files_created": [
"docs/plans/2026-02-16-bonjour-mdns-discovery-checklist.md",
"src/gateway/discovery.ts",
"src/gateway/discovery.test.ts",
"src/gateway/server.discovery.test.ts"
],
"files_modified": [
"src/config/schema.ts",
"src/config/schema.test.ts",
"src/daemon/services.ts",
"src/gateway/server.ts",
"config/default.yaml",
"README.md"
],
"test_status": "pnpm test:run src/config/schema.test.ts src/gateway/discovery.test.ts src/gateway/server.discovery.test.ts + pnpm typecheck passing"
},
"skill-safety-scanner": {
"file": "2026-02-15-skill-safety-scanner-checklist.md",
"status": "completed",
@@ -2775,12 +2797,12 @@
"tier2_completion": "4/4 (100%) — inbound webhooks, vector memory search, Dockerfile, heartbeat monitor",
"tier3_completion": "5/5 (100%) — lane queue, credential redaction, web UI token dashboard, xAI (Grok) provider, Voyage AI embeddings",
"tier4_completion": "4/4 (100%) — gateway lock, shell completion, Tailscale Serve/Funnel, DM pairing codes",
"feature_gap_scorecard": "108/128 match (84%), 0 partial (0%), 20 missing (16%)",
"feature_gap_scorecard": "109/128 match (85%), 0 partial (0%), 19 missing (15%)",
"operator_dx_milestone": "Phase 3 (Live Ops Dashboard): 2/2 plans complete — milestone done",
"gmail_auth_cli": "flynn gmail-auth command implemented with OAuth2 flow, doctor check, config routed to Telegram",
"native_audio_support": "completed — smart routing for native audio (Gemini/OpenAI/GitHub) vs Whisper transcription fallback",
"remaining_phases_completion": "Phase 1: 3/3 (100%) — context levels, command registry, memory structure. Phase 2: 3/3 (100%) — component registry, confidence routing, history index. Phase 3: 2/2 (100%) — adaptive memory/compaction, truthfulness/autonomy hardening",
"next_up": "Select next OpenClaw gap item from roadmap and open the next scoped implementation checklist"
"next_up": "OpenClaw gap: Signal channel adapter (open next scoped implementation checklist)"
},
"soul_md_and_cron_create": {
"date": "2026-02-11",