@usagefleet/cli 1.2.178 → 1.2.179

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.
@@ -198,7 +198,16 @@ export function oauthLimitsReport(body) {
198
198
  if (account.fiveHourPct == null && account.sevenDayPct == null) {
199
199
  return null;
200
200
  }
201
- return { ...account, modelLimits: parseOauthUsage(body), source: 'sub' };
201
+ const report = { ...account, modelLimits: parseOauthUsage(body), source: 'sub' };
202
+ return account.fiveHourPct == null && listsNoSessionLimit(body) ? { ...report, noFiveHourWindow: true } : report;
203
+ }
204
+ // Ultra plans have no 5h window. Max lists a `kind: "session"` entry in limits[];
205
+ // a payload without limits[] says nothing either way.
206
+ function listsNoSessionLimit(body) {
207
+ const limits = body?.limits;
208
+ return (Array.isArray(limits) &&
209
+ limits.length > 0 &&
210
+ !limits.some(l => typeof l === 'object' && l !== null && l.kind === 'session'));
202
211
  }
203
212
  /**
204
213
  * Read the account's real rate-limit utilization.
package/dist/index.js CHANGED
@@ -33,7 +33,9 @@ function flag(name) {
33
33
  * Bars are plain characters, so they survive a service log as well as a TTY. */
34
34
  function limitsSummary(limits) {
35
35
  const models = limits.modelLimits.map(m => ` · ${m.model}(${m.window}) ${bar(m.pct, 6)} ${pct(m.pct)}`).join('');
36
- return `5h ${bar(limits.fiveHourPct)} ${pct(limits.fiveHourPct)} · weekly ${bar(limits.sevenDayPct)} ${pct(limits.sevenDayPct)}${models}`;
36
+ // Ultra plans have no 5h window, so oauth/usage reports none.
37
+ const five = limits.fiveHourPct === null ? '' : `5h ${bar(limits.fiveHourPct)} ${pct(limits.fiveHourPct)} · `;
38
+ return `${five}weekly ${bar(limits.sevenDayPct)} ${pct(limits.sevenDayPct)}${models}`;
37
39
  }
38
40
  /** Every message the collector, notifier and self-update emit, as a stream
39
41
  * line. The level picks the glyph so a problem never reads like a result. */
@@ -188,7 +190,7 @@ async function cmdStatus() {
188
190
  ? stateLine('ok', 'claude', `${creds.source}${dim(creds.subscriptionType ? ` · ${creds.subscriptionType}` : '')}`)
189
191
  : stateLine('warn', 'claude', `no login ${dim('· sign in with `claude` or set ANTHROPIC_API_KEY')}`));
190
192
  console.log(limits
191
- ? stateLine(limitHealth(limits.fiveHourPct, limits.sevenDayPct), 'limits', `5h ${bar(limits.fiveHourPct)} ${pct(limits.fiveHourPct)} · weekly ${bar(limits.sevenDayPct)} ${pct(limits.sevenDayPct)} ${dim(ago(limits.at))}`)
193
+ ? stateLine(limitHealth(limits.fiveHourPct, limits.sevenDayPct), 'limits', `${limitsSummary({ ...limits, modelLimits: [] })} ${dim(ago(limits.at))}`)
192
194
  : stateLine('warn', 'limits', `no reading yet ${dim('· run `usagefleet limits`')}`));
193
195
  console.log('');
194
196
  console.log(row('endpoint', host(ENDPOINT)));
package/dist/release.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by .github/workflows/release.yml.
2
- export const RELEASE_VERSION = "1.2.178";
2
+ export const RELEASE_VERSION = "1.2.179";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usagefleet/cli",
3
- "version": "1.2.178",
3
+ "version": "1.2.179",
4
4
  "description": "Tails Claude Code, Claude Desktop, and pi agent JSONL logs and reports token usage to a UsageFleet server.",
5
5
  "keywords": [
6
6
  "claude",