synwire-daemon
Singleton background daemon for Synwire. Manages the embedding model, file watchers, indexing pipelines, and multi-repo/worktree state for a single product. MCP servers connect via a Unix domain socket as thin stdio-to-UDS proxies.
What this crate provides
RepoManager-- central coordinator that tracks active worktrees, registers projects byWorktreeId, and evicts idle entries via LRUWorktreeHandle/WorktreeStatus-- per-worktree runtime state (Idle, Indexing, Ready)- Lifecycle management -- PID file, Unix domain socket listener, signal handling, 5-minute grace period after last client disconnects
- IPC protocol -- framed messaging over Unix domain sockets for MCP server communication
- Indexing orchestration -- triggers and coordinates walk/chunk/embed/store pipelines per worktree
- Auto-launch -- spawned as a detached process by the first MCP server; no systemd or launchctl required
- Zero unsafe code --
#![forbid(unsafe_code)]
Quick start
[]
= "0.1"
The daemon binary reads SYNWIRE_PRODUCT (defaults to "synwire") and stores state under StorageLayout::data_home():
use ;
async