multica/server/pkg/db/generated
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
..
activity.sql.go fix(activity): address code review feedback and improve timeline UX 2026-03-29 00:21:46 +08:00
agent.sql.go feat(agent): replace hard delete with archive/restore (#346) 2026-04-02 17:33:52 +08:00
attachment.sql.go fix(attachment): use UUIDv7 as S3 key and link attachments on issue/comment creation 2026-04-05 07:55:17 +08:00
comment.sql.go feat(comments): add pagination support to comment list API and CLI 2026-04-03 23:53:00 +08:00
daemon_token.sql.go feat(daemon): add authentication for daemon API routes 2026-03-31 16:19:02 +08:00
db.go feat(server): implement full REST API with JWT auth and real-time WebSocket 2026-03-22 11:50:03 +08:00
inbox.sql.go fix(inbox): archive all items for the same issue instead of just one 2026-04-04 00:18:14 +08:00
issue.sql.go feat(issues): load all open issues without limit, paginate closed (#459) 2026-04-07 00:59:03 -07:00
issue_reaction.sql.go feat(reactions): add emoji reactions for comments and issue descriptions 2026-03-30 22:37:59 +08:00
member.sql.go feat(server): implement full REST API with JWT auth and real-time WebSocket 2026-03-22 11:50:03 +08:00
models.go feat(usage): add per-task token usage tracking 2026-04-08 13:08:15 +08:00
personal_access_token.sql.go feat(auth): email verification login and personal access tokens 2026-03-26 14:32:30 +08:00
reaction.sql.go feat(reactions): add emoji reactions for comments and issue descriptions 2026-03-30 22:37:59 +08:00
runtime.sql.go feat(tasks): add coalescing queue and task lifecycle guards 2026-03-29 17:52:35 +08:00
runtime_usage.sql.go feat(runtimes): add usage charts, activity heatmap, and hourly distribution 2026-03-29 15:44:10 +08:00
skill.sql.go feat(api): strict workspace isolation + agent parity fixes 2026-03-30 16:49:13 +08:00
subscriber.sql.go feat(notifications): replace hardcoded inbox notifications with subscriber-driven model 2026-03-28 19:33:20 +08:00
task_message.sql.go feat(agent): stream live agent output to issue detail page 2026-03-30 22:53:28 +08:00
task_usage.sql.go feat(usage): add per-task token usage tracking 2026-04-08 13:08:15 +08:00
user.sql.go feat(server): implement full REST API with JWT auth and real-time WebSocket 2026-03-22 11:50:03 +08:00
verification_code.sql.go feat(auth): email verification login and personal access tokens 2026-03-26 14:32:30 +08:00
workspace.sql.go feat(issues): add human-readable issue identifiers (e.g. JIA-1) 2026-03-29 16:49:55 +08:00