multica/server/pkg
Jiang Bohan 8a8d3ea20e feat(usage): add per-task token usage tracking
Extract token usage from Claude Code's stream-json output in real-time
during task execution, replacing the inaccurate global JSONL log scanner.

- New `task_usage` table: tracks (task_id, provider, model) level usage
- Agent SDK: parse `message.usage` from assistant messages, accumulate
  per-model and return in Result
- Daemon: convert agent usage to entries, send with CompleteTask
- Server: store usage on task completion, expose workspace-level
  aggregation APIs (GET /api/usage/daily, GET /api/usage/summary)
2026-04-08 13:08:15 +08:00
..
agent feat(usage): add per-task token usage tracking 2026-04-08 13:08:15 +08:00
db feat(usage): add per-task token usage tracking 2026-04-08 13:08:15 +08:00
protocol feat(agent): replace hard delete with archive/restore (#346) 2026-04-02 17:33:52 +08:00
redact feat(security): redact sensitive information in agent live output 2026-03-30 23:38:49 +08:00