Add configurable cache-TTL idle reminders

Merged
TE
4d ago
+385-4

Next-issue: #15685

Fixes #15685

Adds configurable cache-TTL idle reminders to the NEXT ACP chat watcher. notifications.agentIdleTimers accepts per-agent-family reminder arrays with an id and delay. A cancellable queue starts from the session's idle epoch and removes timers when the session works, waits for input, has pending background work, is muted, or is purged. Reminder subtitles carry the category and normalized agent family for integrations.

The queue uses explicit timestamps and has focused parser, cancellation, and one-shot tests.

Validation: cargo fmt --all; focused cmux-ci test run on this PR head.

Agent session: agent session


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes #15685 by adding configurable cache-TTL idle reminders to the NEXT ACP chat watcher. Users can set notifications.agentIdleTimers per agent family to get one-shot reminders after an agent has been idle for a configurable delay. Timers cancel when the session works, waits for input, has pending background work, is muted, or ends. Changing the setting re-reads effective settings and re-arms timers for active sessions without re-firing reminders already sent.

Reminders:

  • Confirmed with afterSeconds and id; timers are opt-in and start when the agent enters ACP idle, counting from the idle epoch and deducting time already spent idle.
  • Reminder subtitles include cache-ttl:<id> and agent:<family> so integrations can identify the reason.
  • Delays must be between 1 second and 7 days; duplicate ids within a family are ignored.