@usagefleet/cli 1.2.126 → 1.2.128

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
@@ -7,7 +7,7 @@ dependencies, Node ≥ 20.
7
7
 
8
8
  ## Install
9
9
 
10
- Get a device **token** from the [Devices](https://usagefleet.com/devices) page,
10
+ Get a device **token** from the [Fleet](https://usagefleet.com/fleet) page,
11
11
  then, on that machine:
12
12
 
13
13
  ```bash
@@ -89,8 +89,9 @@ WinRT toast via `powershell.exe`.
89
89
 
90
90
  A group can be set to **refuse new prompts** once it has burned its budget slice
91
91
  (1/N of the account limit) for a window — a switch per window on the Groups
92
- page, both off by default. Each device also has its own blocking toggle on the
93
- Devices page: switched off, that machine is never refused, whatever its group
92
+ page, both off by default. Per-model limits (e.g. a model's weekly cap) follow
93
+ the switch of their window. Each device also has its own blocking toggle on the
94
+ Fleet page: switched off, that machine is never refused, whatever its group
94
95
  says. `usagefleet login` registers a Claude Code `UserPromptSubmit` hook in
95
96
  `~/.claude/settings.json` (removed by `uninstall`, refreshed rather than stacked
96
97
  on re-install, and skipped entirely with `USAGEFLEET_HOOK=0`):
package/dist/collector.js CHANGED
@@ -153,6 +153,7 @@ export async function runOnce(cfg, log = () => {
153
153
  const MAX_DROPPED_PER_CHUNK = 2;
154
154
  async function sendChunk(records, cfg, result, log, dropCeiling = result.dropped + MAX_DROPPED_PER_CHUNK) {
155
155
  const res = await uploadBatch({
156
+ accountExtId: detectClaudeAccount()?.extId,
156
157
  collectorVersion: RELEASE_VERSION,
157
158
  hostname: hostname(),
158
159
  os: detectOs(),
@@ -210,7 +211,7 @@ function pruneMissingFiles(state, scanned) {
210
211
  /** The one thing that unblocks a device parked outside the account's device limit.
211
212
  * Shared by both upload legs so the wording cannot drift between them. */
212
213
  function planWall() {
213
- return `device outside your plan's device limit · free a slot or upgrade at ${ENDPOINT}/devices · nothing is lost, uploads resume once it fits`;
214
+ return `device outside your plan's device limit · free a slot or upgrade at ${ENDPOINT}/fleet · nothing is lost, uploads resume once it fits`;
214
215
  }
215
216
  /**
216
217
  * Auto-detect the local Claude login, read the real 5h/weekly utilization
package/dist/guard.js CHANGED
@@ -12,15 +12,15 @@ export function blockMessage(view) {
12
12
  if (view.blocked !== true) {
13
13
  return null;
14
14
  }
15
- const weekly = view.blockedWindow === 'weekly';
16
- const pct = (weekly ? view.weeklyPct : view.sessionPct) ?? 100;
15
+ const window = view.blockedWindow === 'weekly' ? 'weekly' : '5h';
16
+ const limit = view.blockedModel ? `${view.blockedModel} ${window}` : window;
17
+ const pct = view.blockedPct ?? 100;
17
18
  const group = view.group ? `"${view.group}"` : 'this group';
18
19
  const until = view.blockedUntil ? new Date(view.blockedUntil) : null;
19
20
  const resets = until && !Number.isNaN(until.getTime())
20
21
  ? ` Resets ${until.toLocaleString([], { dateStyle: 'short', timeStyle: 'short' })}.`
21
22
  : '';
22
- return (`usagefleet: ${group} has used ${pct}% of its ${weekly ? 'weekly' : '5h'} budget, ` +
23
- `so new prompts are blocked.${resets}`);
23
+ return `usagefleet: ${group} has used ${pct}% of its ${limit} budget, so new prompts are blocked.${resets}`;
24
24
  }
25
25
  /**
26
26
  * Exit code for `usagefleet guard`, the Claude Code `UserPromptSubmit` hook:
package/dist/release.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by .github/workflows/release.yml.
2
- export const RELEASE_VERSION = "1.2.126";
2
+ export const RELEASE_VERSION = "1.2.128";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usagefleet/cli",
3
- "version": "1.2.126",
3
+ "version": "1.2.128",
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",