v0.4.0 - core plus plugins
serverwatch v0.4.0 -- the core-plus-plugin stable release, promoted from the v0.4.0-beta.x line (validated live).
The core-plus-plugin release. serverwatch is reshaped from a single monolithic
daemon into a lean, stdlib-only serverwatch core with plugin binaries layered
around it over a local control socket. The core stays small while the web UI
and management tooling move out of process.
Added
- Control socket and
core.API. The core exposes one internalcore.API
contract over a unix socket in the runtime directory, newline-delimited JSON,
one request or response per line. Each daemon launch mints a fresh token that
a client must present in a handshake before the socket answers, keeping the
channel local and gated to processes that can read the token. serverwatch-webout of process. The passkey web UI now runs as its own
binary with no build tag, talking to the core over the socket. The core
verifies, spawns, restarts (capped backoff), and stops it as a child process
whenweb.enabledis set. The defaultserverwatchbinary is stdlib-only,
enforced by a dependency-graph test.serverwatch-ctl, the primary management client. A separate interactive
binary that dials the socket, with a styled live-status home dashboard
(colour-coded CPU/MEM/SWAP meters, a live CPU sparkline, an alerts panel, a
disks panel, a 24h availability strip, and a network/inventory line), guided
screens for schedule, quiet hours, healthchecks, monitor thresholds, and
channels, an all-settings screen over every remaining config key, a guided
web-setup wizard functional in every serving mode, first-run Telegram
onboarding, a?help overlay, and breadcrumbs.- Scriptable
serverwatch-ctlsubcommands.status,doctor, and
alertsgain--jsonoutput;config get <key>/config set <key> <value>reach every flat config key through the same validated setter the
TUI uses (applied live);channels test <name>sends a live test
notification. - Live event streaming over the control socket.
core.API.Subscriberuns
end to end: an in-process event bus that the sampler loop and every dispatched
alert publish onto, a dedicated socket connection streaming those events, and
serverwatch-websubscribing to push live dashboard updates. - Front-door install and safe-exec.
serverwatch installrecords each
plugin's checksum in a root-only manifest; theserverwatch cliand
serverwatch webfront-doors verify a plugin (owner, permissions, checksum)
against that manifest before exec'ing it. - Mobile web UI. The dashboard is fully responsive: a bottom tab bar with a
"More" sheet, card-list tables, and layouts gated to narrow viewports. - Enrollment PIN over the socket (#90).
serverwatch telegram set-token
prints the/start <pin>instruction directly to the terminal after saving
the token;serverwatch-ctl's onboarding surfaces the same PIN. - Optimized production release channel.
make release-prodbuilds stripped,
trimmed binaries (-s -w -trimpath) for the stable line, alongside the
unstrippedmake releaseused for beta/dev builds.
Changed
- The web UI no longer builds with
-tags webinside the daemon; it is a
separate supervised process. Guided setup (web UI, Telegram onboarding) is
owned byserverwatch-ctl; the core CLI keeps only thin, scriptable verbs. serverwatch installnow restarts an already-running service on an in-place
upgrade (enable + restart) instead ofenable --now, which only started a
stopped service.- Documentation is ctl-first throughout, with download-first install
instructions and dedicated plugin pages.
Fixed
serverwatch-ctlnow treatsSERVERWATCH_CONTROL_TOKENas the token value
(as the front-doors and web supervisor set it), not a file path, fixing an
"unexpected server hello" handshake failure forserverwatch cli/web.- Telegram command authorization is enforced against the enrolled owner chat
(security hardening). - Mobile web UI: the header no longer forces horizontal page scroll (dropped
the fixed-width heartbeat, title flexes/truncates); the active-alerts card no
longer widens the page on long unbreakable alert keys; the monitoring tab
strip scrolls within itself instead of overflowing.
Security
- Per-launch control-socket token with a constant-time compare,
0600socket
in a0700runtime directory, and checksum-manifest verification before any
plugin is exec'd. A security review was run over the web UI and control paths,
with findings triaged and tracked.
See CHANGELOG.md for the full entry. Download the three binaries for your arch into one directory and run sudo ./serverwatch install; verify against checksums.txt.