@sayknow-cli/stats 0.4.7 → 0.5.1
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 +7 -1
- package/dist/client/index.js +39 -39
- package/dist/types/client/api.d.ts +7 -1
- package/dist/types/compiled-client-assets.d.ts +3 -0
- package/dist/types/server.d.ts +12 -1
- package/package.json +4 -3
- package/src/client/api.ts +9 -3
- package/src/compiled-client-assets.ts +96 -0
- package/src/server.ts +97 -90
package/README.md
CHANGED
|
@@ -60,7 +60,13 @@ console.log(stats.byModel[0].avgTokensPerSecond);
|
|
|
60
60
|
| `GET /api/stats/models` | Per-model statistics |
|
|
61
61
|
| `GET /api/stats/folders` | Per-folder/project statistics |
|
|
62
62
|
| `GET /api/stats/timeseries` | Hourly time series data |
|
|
63
|
-
| `
|
|
63
|
+
| `POST /api/sync` | Trigger sync and return counts |
|
|
64
|
+
|
|
65
|
+
## Local server security
|
|
66
|
+
|
|
67
|
+
The dashboard binds only to `127.0.0.1`; the CLI opens its default browser URL through `localhost`. API requests must use HTTP, the server's actual port, and exactly `localhost` or `127.0.0.1`. Browser requests must remain same-origin, and session sync requires a same-origin `POST` request. The server does not enable cross-origin access or trust forwarded host headers.
|
|
68
|
+
|
|
69
|
+
Reverse-proxy and non-loopback deployments are unsupported. They require a separate authenticated deployment boundary rather than relaxing these local-only checks.
|
|
64
70
|
|
|
65
71
|
## Data Storage
|
|
66
72
|
|