limitcast 0.11.1 → 0.11.3

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
@@ -46,7 +46,7 @@ limitcast doctor
46
46
 
47
47
  In Claude Code you can also add the plugin, for `/limitcast:status`, `/limitcast:results` and `/limitcast:trim`: `/plugin marketplace add SamStull9007/limitcast`, then `/plugin install limitcast@limitcast`. The status-line recorder still comes from `limitcast install`.
48
48
 
49
- `install` backs up `~/.claude/settings.json` and wraps your existing status line (it looks exactly the same). `--guard` adds the subagent guard (without Pro it only records what it would block). Restart Claude Code to load it. `limitcast uninstall` puts everything back.
49
+ `install` backs up `~/.claude/settings.json` and wraps your existing status line: it looks exactly the same, and the limitcast line (for example `limitcast: 5h 14% · 7d 18% · today 9% left`) goes on the line under it. `--guard` adds the subagent guard (without Pro it only records what it would block). Restart Claude Code to load it. `limitcast uninstall` puts everything back.
50
50
 
51
51
  **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.
52
52
 
package/bin/limitcast.mjs CHANGED
@@ -146,9 +146,17 @@ if (cmd === 'status') {
146
146
  const sep = args.indexOf('--');
147
147
  const wrapped = sep >= 0 ? args.slice(sep + 1) : [];
148
148
  if (wrapped.length) {
149
- const r = spawnSync(wrapped[0], wrapped.slice(1), { input, stdio: ['pipe', 'inherit', 'inherit'] });
150
- // Your status line stays as it was; limitcast adds a second line only when there is something to act on.
151
- if (hints.length) console.log(`limitcast: ${hints.join(' · ')}`);
149
+ const r = spawnSync(wrapped[0], wrapped.slice(1), { input, stdio: ['pipe', 'pipe', 'inherit'] });
150
+ // Your status line stays as it was; limitcast adds its own line under it (status scripts often printf without a newline).
151
+ const yours = r.stdout?.toString() ?? '';
152
+ process.stdout.write(yours && !yours.endsWith('\n') ? `${yours}\n` : yours);
153
+ let line = 'waiting for data';
154
+ try {
155
+ line = oneLine(forecastAll(oneClaudeAccount(load(now - KEEP_MS), sid), now)).replace(/^limitcast: /, '');
156
+ } catch {
157
+ /* never break the status line */
158
+ }
159
+ console.log(`limitcast: ${[line, ...hints].join(' · ')}`);
152
160
  process.exit(r.status ?? 1);
153
161
  }
154
162
  console.log([oneLine(forecastAll(oneClaudeAccount(load(now - KEEP_MS), sid), now)), ...hints].join(' · '));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "limitcast",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
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/polar.mjs CHANGED
@@ -36,7 +36,11 @@ function savePolar(l) {
36
36
  * @returns {{ok:true, claims:{e:string, p:string, i:number, x:number}} | {ok:false, reason:string}}
37
37
  */
38
38
  export function polarStatus(l, now) {
39
- if (l.status !== 'granted') return { ok: false, reason: `license ${l.status} at Polar` };
39
+ if (l.status !== 'granted')
40
+ return {
41
+ ok: false,
42
+ reason: `this key is no longer active at Polar (${l.status}): the subscription ended or the key was revoked. Resubscribe at https://limitcast.dev/#pricing`,
43
+ };
40
44
  const exp = l.expiresAt ? Date.parse(l.expiresAt) : 0;
41
45
  if (exp && exp < now) return { ok: false, reason: `expired ${new Date(exp).toISOString().slice(0, 10)}` };
42
46
  if (now - l.checkedAt > GRACE_MS)