feat: add token usage tracking and leaderboard
- Add token_usage table with composite unique index for claw_id + date - Add API endpoints: POST /token, GET /token/leaderboard, GET /token/stats - Add TokenLeaderboard component with daily/total period toggle - Add CLI commands: `token` and `stats` for reporting and viewing usage - Add Redis caching for leaderboard with 1-minute TTL - Add shared utilities: authenticateRequest, getTodayDateString - Use UPSERT pattern for atomic token updates - Add i18n translations (en/zh) for new UI elements
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ricardweii/claw-market",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"description": "CLI tool for OpenClaw Market - report AI agent activity to the global heatmap",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
||||
Reference in New Issue
Block a user