@sayknow-cli/stats 0.7.11 → 0.7.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -54,13 +54,22 @@ console.log(stats.byModel[0].avgTokensPerSecond);
54
54
 
55
55
  ## API Endpoints
56
56
 
57
+ Endpoints marked *range* accept `?range=1h|24h|7d|30d|90d|all` (default `24h`; an unknown value falls back to `24h`). Time series use hourly buckets for `1h` and `24h` and daily buckets for longer ranges.
58
+
57
59
  | Endpoint | Description |
58
60
  |----------|-------------|
59
- | `GET /api/stats` | Overall stats with all breakdowns |
60
- | `GET /api/stats/models` | Per-model statistics |
61
- | `GET /api/stats/folders` | Per-folder/project statistics |
62
- | `GET /api/stats/timeseries` | Hourly time series data |
63
- | `POST /api/sync` | Trigger sync and return counts |
61
+ | `GET /api/stats` | The full `DashboardStats` object: overall, failures, per-model/folder/agent breakdowns, the time, model, model-performance, and cost series, and the cache-miss attribution (*range*) |
62
+ | `GET /api/stats/overview` | `overall` and `timeSeries` only (*range*) |
63
+ | `GET /api/stats/models` | Per-model statistics, ordered by request count (*range*) |
64
+ | `GET /api/stats/model-dashboard` | `byModel`, `modelSeries`, and `modelPerformanceSeries` (*range*) |
65
+ | `GET /api/stats/folders` | Per-folder/project statistics (*range*) |
66
+ | `GET /api/stats/timeseries` | Requests, errors, tokens, and cost per time bucket (*range*) |
67
+ | `GET /api/stats/costs` | Daily cost per model and provider, split into input/output/cache (*range*) |
68
+ | `GET /api/stats/behavior` | User-message behavior signals (yelling, profanity, repetition, and others): overall, per model, and over time (*range*) |
69
+ | `GET /api/stats/recent` | Most recent requests, newest first (`?limit=`, default 100) |
70
+ | `GET /api/stats/errors` | Most recent requests that stopped with an error (`?limit=`, default 100) |
71
+ | `GET /api/request/:id` | One request with its stored messages and output; `404` if unknown |
72
+ | `POST /api/sync` | Sync session files and return `{ processed, files, totalMessages }`; `409` while a sync is already running |
64
73
 
65
74
  ## Local server security
66
75