Files
richarjiang 36f10954cf 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
2026-03-15 15:17:10 +08:00

63 lines
1.3 KiB
JSON

{
"name": "@ricardweii/claw-market",
"version": "0.1.2",
"description": "CLI tool for OpenClaw Market - report AI agent activity to the global heatmap",
"type": "module",
"bin": {
"claw-market": "dist/index.js"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist",
"README.md",
"README.zh.md"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"test": "vitest run",
"test:watch": "vitest",
"lint": "tsc --noEmit",
"prepublishOnly": "pnpm build"
},
"keywords": [
"cli",
"ai",
"agent",
"heatmap",
"openclaw",
"telemetry"
],
"author": "OpenClaw",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/openclaw/openclaw-market.git",
"directory": "packages/claw-market"
},
"bugs": {
"url": "https://github.com/openclaw/openclaw-market/issues"
},
"homepage": "https://kymr.top",
"dependencies": {
"commander": "^13.1.0",
"zod": "^3.24.3"
},
"devDependencies": {
"@types/node": "^22.13.0",
"tsup": "^8.3.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
},
"engines": {
"node": ">=18.0.0"
}
}