quiet-hours: configurable time-window schedule

Adds QuietHours config section (start/end as HH:MM local time). The loop's
gatherer checks the window each tick: if now falls within [start, end), the
State.QuietHours flag is set to true regardless of the config fact (which
the voice toggle writes independently). Both sources activate quiet —
schedule AND toggle.

Handles midnight-crossing windows (23:00-08:00). The gate already reads
State.QuietHours for care nudge suppression — no gate change needed.
This commit is contained in:
kami
2026-07-03 13:21:08 +02:00
parent f94758966f
commit 36233058dd
3 changed files with 67 additions and 2 deletions
+3
View File
@@ -78,6 +78,9 @@ func run(args []string) error {
rules := loop.DefaultRules()
gatherer := loop.NewGatherer(st, rules)
if cfg.QuietHours != nil {
gatherer.SetQuietHours(cfg.QuietHours.Start, cfg.QuietHours.End)
}
// ----- phraser (LLM-backed when configured, Stub floor otherwise) -----
var phr phraser.Phraser = phraser.NewStub()