managarten/services/mana-ai
Till JS 0d613e1846 feat(ai): thread TokenUsage through runPlannerLoop → mana-ai budget
Carries per-round token counts from the mana-llm response body
(prompt_tokens + completion_tokens) back through LlmCompletionResponse
→ PlannerLoopResult. The loop sums across rounds and exposes a single
aggregate on result.usage.

Lets mana-ai's tick re-activate per-agent daily-token budget tracking
— tokensUsed was stubbed to 0 in the migration commit (6) because the
loop didn't surface usage yet. Now recordTokenUsage + agentTokenUsage24h
get real numbers again, and the mana_ai_tokens_used_total Prometheus
counter is accurate.

Additive only: consumers without usage needs ignore the new field,
and providers that don't return usage produce zeros (not undefined —
the loop still exposes the object so downstream branches stay trivial).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 18:21:34 +02:00
..
src feat(ai): thread TokenUsage through runPlannerLoop → mana-ai budget 2026-04-20 18:21:34 +02:00
CLAUDE.md fix(goals): start GoalTracker on boot + surface AI proposals inline 2026-04-20 14:24:39 +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(mana-ai): OpenTelemetry tracing + Grafana Tempo backend 2026-04-16 15:21:23 +02:00
tsconfig.json feat(mana-ai): scaffold server-side Mission Runner (v0.1) 2026-04-14 23:48:30 +02:00