feat
minor
daemon
feat/phase-2g-bundle
feat(daemon): Session 5 — daemon lifecycle (Daemon Spec Phase B)
Add lib/daemon.mjs with full process lifecycle: startDaemon (foreground loop, SIGTERM/SIGINT graceful shutdown, cancellable sleep, stale PID crash recovery, run_on_start), stopDaemon (SIGTERM → SIGKILL with configurable timeout), getDaemonStatus (PID check, log-derived last-pass and next-pass). Pure helper exports (getPidPath, getLogPath, writePidFile, readPidFile, removePidFile, isProcessAlive, detectStalePid, appendDaemonLog, readDaemonLog, isIdle, validateLlmConnectivity) are fully injectable for testing — no real LLM calls in the test suite.
CLI: daemon start [--background] | stop | status | log [--tail <n>]. MCP: daemon_status tool returns running state, PID, last/next pass times.
74 new tests (729 total, 0 failures, 0 regressions).
sha256:9570cba382d24f9a79a433603234ad223c744590cce490f3c5ef776de1e42afb
sha
sha256:05a067bce3a25b27d59d3779ca41fe21138d8c479005bebb2df5df86f9b51ac1
snapshot
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:9570cba382d24f9a79a433603234ad223c744590cce490f3c5ef776de1e42afb --body "your comment"
No comments yet. Be the first to start the discussion.