multica/server/internal
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
..
auth merge: resolve conflicts with main 2026-03-31 16:25:20 +08:00
cli fix(comments): address code review feedback on pagination 2026-04-04 01:01:48 +08:00
daemon feat(usage): add per-task token usage tracking 2026-04-08 13:08:15 +08:00
events feat(realtime): WS invalidation + refetch pattern, inbox bugfixes, UI polish 2026-03-29 13:49:40 +08:00
handler feat(usage): add per-task token usage tracking 2026-04-08 13:08:15 +08:00
logger feat(logging): add structured logging across server and SDK 2026-03-26 10:57:11 +08:00
mention feat(mentions): support @mentioning issues + server-side auto-expansion (#242) 2026-04-02 13:48:53 +08:00
middleware fix(auth): extend JWT and CloudFront cookie expiration from 72h to 30 days 2026-04-06 21:48:31 +08:00
realtime feat(realtime): route personal events to target user only 2026-03-29 17:42:50 +08:00
service feat(agent): replace hard delete with archive/restore (#346) 2026-04-02 17:33:52 +08:00
storage fix(upload): clean up S3 objects when attachments are deleted 2026-03-31 16:34:47 +08:00
util feat(mentions): support @mentioning issues + server-side auto-expansion (#242) 2026-04-02 13:48:53 +08:00