740b8b4c84e11fb6e0e59ea1533930248e988077
37 planned tasks plus 3 follow-up fixes from final code review. Architecture: - Cargo workspace: xy-protocol, xy-supervisor, xy-ipc, xy (single binary) - Unix socket + newline-delimited JSON-RPC 2.0 - Per-server KDL configs at XDG paths (XDG on macOS via etcetera) - One supervisor task per managed server, owning all state - Per-server log capture: rotating disk + ring buffer + broadcast stream Features: - Daemon auto-launches all configured servers on boot - start/stop/restart (single or --all), reload (diff added/removed/changed), list/status, logs (--tail / --follow) - Per-server restart policy (always/on-failure/never) with exponential backoff, sliding 60s retry window, and Failed state on cap - Graceful shutdown via SIGTERM/SIGINT, SIGKILL escalation after grace - 51 tests: unit (state machine via MockChild, KDL parser, framing) + integration (real daemon + helper bins exercising lifecycle/reload/ restart-cap/logs) Bugs found and fixed during execution: - Connection deadlock from single shared read/write mutex (split into separate reader/writer halves) - LOGS response vs notification ordering race (oneshot gate) - StartAck::Started returned even on spawn failure (added SpawnFailed) - Backoff sleep blocked the supervisor's command channel (interruptible select) - list/status returned zeroed fields (now publish full Status via watch)
xy — HTTP MCP server supervisor
Daemon + CLI that launches and supervises HTTP-based MCP servers.
Build
cargo build --release
Run
target/release/xy daemon # foreground
Drop a server definition into $XDG_CONFIG_HOME/xy/servers/<name>.kdl
(see examples/insikt.kdl) and xy reload.
Commands:
xy list
xy status <name>
xy start <name|--all>
xy stop <name|--all>
xy restart <name|--all>
xy reload
xy logs <name> [--tail N] [--follow]
Exit codes: 0 success, 1 operational error, 2 daemon unreachable, 3 config invalid.
Description
Languages
Rust
100%