limitcast 0.17.0 → 0.17.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 +1 -1
- package/bin/limitcast.mjs +1 -1
- package/package.json +1 -1
- package/src/grok.mjs +4 -4
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ In Claude Code you can also add the plugin, for `/limitcast:status`, `/limitcast
|
|
|
55
55
|
|
|
56
56
|
**Codex:** forecasts and reports need no setup (`~/.codex/sessions`, or `$CODEX_HOME/sessions`). With `--guard`, `install` also appends the guard to `~/.codex/hooks.json`, after your existing hooks so the ones you've already trusted keep their trust. Codex runs a new hook only once you approve it: start Codex and accept it. `limitcast doctor` shows whether it's trusted.
|
|
57
57
|
|
|
58
|
-
**Grok:** `report` reads each session's `~/.grok/sessions/*/*/usage.json` and prices Grok models at xAI list prices (the same API-equivalent column as Claude). `install` wraps `[ui.status_line]` in `~/.grok/config.toml` (session model, context % and cost on one line; the limitcast forecast under it). `--guard` writes `~/.grok/hooks/limitcast.json` matching `spawn_subagent`. Grok stores spend, not a % used, so by default the status line shows `grok 5h $X · 7d $Y` until you set a dollar cap (`limitcast budget grok <usd>`); then `status` forecasts that window and the guard blocks new spawns when it is on pace to run out. For the real weekly %, run `limitcast grok-usage on`: about every 5 minutes limitcast reads the login Grok keeps in `~/.grok/auth.json` and asks grok.com for your billing cycle
|
|
58
|
+
**Grok:** `report` reads each session's `~/.grok/sessions/*/*/usage.json` and prices Grok models at xAI list prices (the same API-equivalent column as Claude). `install` wraps `[ui.status_line]` in `~/.grok/config.toml` (session model, context % and cost on one line; the limitcast forecast under it). `--guard` writes `~/.grok/hooks/limitcast.json` matching `spawn_subagent`. Grok stores spend, not a % used, so by default the status line shows `grok 5h $X · 7d $Y` until you set a dollar cap (`limitcast budget grok <usd>`); then `status` forecasts that window and the guard blocks new spawns when it is on pace to run out. For the real weekly %, run `limitcast grok-usage on`: about every 5 minutes limitcast reads the login Grok keeps in `~/.grok/auth.json` and asks grok.com for your billing cycle. The login goes only to grok.com (redirects are refused) and is never stored or logged; the readings are kept locally, so `status`, the Grok status line and the guard forecast the weekly window like the Claude and Codex ones, and a weekly dollar cap steps aside for it. `limitcast grok-usage off` stops it, and `doctor` shows the last reading or why there is none (an expired login: run `grok login`). It tracks weekly plans only; a monthly credit plan is reported but not forecast. `limitcast subagent-model explore grok-4.3` writes `[subagents.models]` (restart Grok). Restart Grok to load the status line and hook.
|
|
59
59
|
|
|
60
60
|
## Commands
|
|
61
61
|
|
package/bin/limitcast.mjs
CHANGED
|
@@ -552,7 +552,7 @@ if (cmd === 'status') {
|
|
|
552
552
|
if (arg) setGrokQuota(arg === 'on');
|
|
553
553
|
if (arg === 'on')
|
|
554
554
|
console.log(
|
|
555
|
-
'Grok weekly usage is on. About every 5 minutes limitcast reads the login Grok keeps in ~/.grok/auth.json and asks grok.com for your usage
|
|
555
|
+
'Grok weekly usage is on. About every 5 minutes limitcast reads the login Grok keeps in ~/.grok/auth.json and asks grok.com for your usage. The login goes only to grok.com and is never stored or logged. Turn it off: limitcast grok-usage off',
|
|
556
556
|
);
|
|
557
557
|
if (arg === 'off') console.log('Grok weekly usage is off. limitcast no longer reads your Grok login or contacts grok.com.');
|
|
558
558
|
else if (grokQuotaEnabled()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "limitcast",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "Stretch your Claude Code plan: measure what every session loads before you type, cut what you never use, and stop runaway subagents before they burn your window.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/grok.mjs
CHANGED
|
@@ -202,9 +202,9 @@ export function grokSpend(now, root = grokRoot()) {
|
|
|
202
202
|
return out;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
// Grok weekly %, opt-in (`limitcast grok-usage on`). Grok keeps no % on disk, so limitcast asks grok.com the
|
|
206
|
-
//
|
|
207
|
-
// grok.com, and never stored or logged.
|
|
205
|
+
// Grok weekly %, opt-in (`limitcast grok-usage on`). Grok keeps no % on disk, so limitcast asks grok.com for the billing
|
|
206
|
+
// cycle with the login Grok already holds in auth.json (the call TokScale makes; checked 2026-10-27, not documented by xAI).
|
|
207
|
+
// That login is read in this process, sent only to grok.com, and never stored or logged.
|
|
208
208
|
const QUOTA_URL = 'https://grok.com/grok_api_v2.GrokBuildBilling/GetGrokCreditsConfig';
|
|
209
209
|
const QUOTA_EVERY_MS = 5 * 60_000;
|
|
210
210
|
const quotaFile = () => join(stateDir(), 'grok-quota.json');
|
|
@@ -369,7 +369,7 @@ async function askGrok(token, fetchFn) {
|
|
|
369
369
|
'x-xai-token-auth': 'xai-grok-cli',
|
|
370
370
|
accept: 'application/grpc-web+proto',
|
|
371
371
|
'content-type': 'application/grpc-web+proto',
|
|
372
|
-
'user-agent': 'Grok
|
|
372
|
+
'user-agent': 'limitcast', // says who is asking; grok.com gave the same answer as with a Grok client's User-Agent (checked 2026-10-27)
|
|
373
373
|
},
|
|
374
374
|
body: new Uint8Array([0, 0, 0, 0, 0]),
|
|
375
375
|
});
|