Prefactor: evie daemon subcommand #56

Closed
opened 2026-07-08 02:11:18 +08:00 by weiwen · 0 comments
Owner

Parent

#55

What to build

Prefactor only — no new user-facing behavior. Introduce a top-level clap subcommand layer so the binary can be either the long-running Daemon (evie daemon) or, later, a short-lived CLI issuing a single Verb. Today's entire startup path (config load, Telegram dispatcher, HTTP API, Session manager, signal handling) moves under the daemon subcommand and must behave exactly as it does now.

Update the NixOS/systemd module so the service's ExecStart invokes evie daemon (it currently runs bare evie) — otherwise the split breaks the running service. Decide and document the behavior of a bare evie invocation (either alias to daemon or print help); no other subcommands exist yet.

This is the "make the change easy" step: it creates the seam the Control Plane hangs off, and nothing else.

Acceptance criteria

  • evie daemon starts the process with identical behavior to the pre-split binary (Telegram + HTTP + sessions + idle cleanup, honoring --config).
  • evie --help lists the daemon subcommand.
  • The NixOS module runs evie daemon and the service starts cleanly.
  • Existing tests pass unchanged; no scheduling or delivery behavior is altered.
  • Respects ADR 0006 (Daemon vs CLI vocabulary from CONTEXT.md).

Blocked by

  • None - can start immediately
## Parent #55 ## What to build Prefactor only — no new user-facing behavior. Introduce a top-level `clap` subcommand layer so the binary can be either the long-running **Daemon** (`evie daemon`) or, later, a short-lived **CLI** issuing a single **Verb**. Today's entire startup path (config load, Telegram dispatcher, HTTP API, Session manager, signal handling) moves under the `daemon` subcommand and must behave exactly as it does now. Update the NixOS/systemd module so the service's `ExecStart` invokes `evie daemon` (it currently runs bare `evie`) — otherwise the split breaks the running service. Decide and document the behavior of a bare `evie` invocation (either alias to `daemon` or print help); no other subcommands exist yet. This is the "make the change easy" step: it creates the seam the Control Plane hangs off, and nothing else. ## Acceptance criteria - [ ] `evie daemon` starts the process with identical behavior to the pre-split binary (Telegram + HTTP + sessions + idle cleanup, honoring `--config`). - [ ] `evie --help` lists the `daemon` subcommand. - [ ] The NixOS module runs `evie daemon` and the service starts cleanly. - [ ] Existing tests pass unchanged; no scheduling or delivery behavior is altered. - [ ] Respects ADR 0006 (Daemon vs CLI vocabulary from CONTEXT.md). ## Blocked by - None - can start immediately
weiwen 2026-07-08 02:30:44 +08:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
weiwen/evie#56
No description provided.