cli: switch to clap, add notify-timeout, improve status display

Replace manual arg parsing with clap derive for the full command set.
Single source of truth for command names, args, and help text.

Add notify_timeout (default 2min) — controls how long after last
response before notifications inject via tmux instead of waiting
for the hook. Separate from idle_timeout (5min) which controls
autonomous prompts.

Improve `poc-daemon status` to show both timers with elapsed/configured
and block reason, replacing the terse one-liner.

Add new Status fields over capnp: idleTimeout, notifyTimeout,
sinceActivity, sinceUser, blockReason.

ExecStart in poc-daemon.service now uses `daemon` subcommand.

Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-03-05 21:32:27 -05:00
parent eab656aa64
commit d0080698f3
7 changed files with 416 additions and 170 deletions

View file

@ -679,7 +679,7 @@ After=default.target
[Service]
Type=simple
ExecStart={exe}
ExecStart={exe} daemon
Restart=on-failure
RestartSec=10
Environment=HOME={home}