Repo-wide audit (per request) came back lean — no dead exports, no
reinvented stdlib. Two real cuts:
- delete the Windows control.Server.Publish no-op: Publish was removed
from the real server when /events was trimmed, so nothing calls it.
- move the control.Daemon interface into shared control.go (was duplicated
across server.go + server_windows.go build-tag split → drift risk).
Kept (disagreed with cutting): blobstore.Store interface is the documented
M9 S3 seam (6 lines, clean contract); c.Bearer() is a tiny test accessor.
Add internal/control: an HTTP/1.1 control plane the daemon hosts on a
0600 Unix socket (control.sock) in the config dir — GET /state, GET
/events (SSE), POST /pause|/resume — plus a stdlib net/http client
(DialState/Pause/Resume) that returns a typed ErrNotRunning when the
daemon is down so callers can fall back.
Wire into the daemon: paused atomic.Bool gates runMount's trigger loop
(drains while paused, no-ops the initial nudge), a per-mount nudge
registry lets Resume catch every mount up, and StateSnapshot feeds
/state. The control server starts in Run and is non-fatal — sync never
depends on it. Windows gets a build-tagged stub (named-pipe upgrade
path noted).
CLI: devbox pause/resume call the client (friendly 'daemon not running'
when absent); status prefers the live socket but ONLY on a TTY, so piped
output stays byte-identical to v1 for scripts.