managarten/services/mana-ai
Till JS 3edf680ea0 feat(mana-ai): telemetry for reminder producers (mana_ai_reminders_emitted_total)
Producers now return structured {producer, severity, text} objects
instead of raw strings. buildReminderChannel collects them, increments
mana_ai_reminders_emitted_total{producer, severity} per emission, and
maps back to strings for the shared-ai loop input.

Why structured: the Prometheus label "severity" lets dashboards split
75-99% token-budget warnings (severity=warn) from 100%+ escalations
(severity=escalate) without NLP on the reminder text. Adding a new
producer that emits only info-level state (e.g. stale-sync warning)
falls out for free.

Active producer labels today:
  - token-budget (warn, escalate)
  - retry-loop (warn)

With this plus the scrape job (d087b4744), we can finally answer:
"does the budget warning actually change LLM behaviour?" — correlate
reminders_emitted_total{producer='token-budget'} with
tick_duration_seconds or planner_rounds_histogram.

3 tests updated to assert the new {producer, severity, text} shape
(16 reminder tests total, all green).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 15:10:27 +02:00
..
src feat(mana-ai): telemetry for reminder producers (mana_ai_reminders_emitted_total) 2026-04-23 15:10:27 +02:00
CLAUDE.md feat(agent-loop): activate retryLoopReminder via LoopState.recentCalls 2026-04-23 15:02:40 +02:00
Dockerfile fix(infra): include shared-logger in mana-ai + mana-auth Dockerfile installers 2026-04-15 14:34:08 +02:00
package.json feat(agent-loop): M1 — policy gate + reminder channel + parallel reads 2026-04-23 13:56:40 +02:00
tsconfig.json feat(agent-loop): M1 — policy gate + reminder channel + parallel reads 2026-04-23 13:56:40 +02:00