maxpool 1.24.82 → 1.24.84

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.82",
3
+ "version": "1.24.84",
4
4
  "description": "Multi-account Claude Code proxy with adaptive, rate-aware load balancing across Claude accounts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -238,8 +238,11 @@ export async function claimResetGrant(accessToken, grantId, { signal, requestId,
238
238
  signal,
239
239
  });
240
240
  const data = await res.json().catch(() => null);
241
- // Success shapes observed: {success:true} or result:"already_used" (idempotent).
242
- const okFlag = data?.success === true || data?.result === 'already_used';
241
+ // Success shapes observed: {success:true}, result:"already_used" (idempotent),
242
+ // or result:"reset" with reset:true (measured live 2026-11-10: the claim POST
243
+ // returns the consumed grant — resets_left:0, cleared:[...], cooldown_until).
244
+ const okFlag = data?.success === true || data?.result === 'already_used'
245
+ || (data?.result === 'reset' && data?.reset === true);
243
246
  if (okFlag) return { ok: true, grantId, alreadyUsed: data?.result === 'already_used' };
244
247
  // 403/404 on the org path: the cached org no longer belongs to this login —
245
248
  // drop it so the next claim re-reads the profile.
package/src/tui.js CHANGED
@@ -2503,13 +2503,17 @@ export class TUI {
2503
2503
  if (!g || g.usableNow === false || g.paused || g.expired) continue;
2504
2504
  if (g.endsAt != null && g.endsAt <= now) continue; // live expiry
2505
2505
  // The ONE shared scope answer (A1) — display reads the same
2506
- // classification as claim and lift.
2506
+ // classification as claim and lift. DISPLAY nuance (owner 2026-11-10
2507
+ // "distinguish model-specific vs general"): a grant that refills a
2508
+ // MODEL limit (scoped) shows under its model tag even when it ALSO
2509
+ // gives back to the weekly — the give-back is a side effect, not the
2510
+ // grant's identity. Only an unscoped general refiller counts general.
2507
2511
  const scopes = appliesTo(g);
2508
- const hasGeneral = scopes.includes('general');
2509
2512
  const hasScoped = scopes.some(x => x !== 'general' && x !== 'session');
2513
+ const hasGeneral = scopes.includes('general');
2510
2514
  const left = Math.max(0, Math.floor(g.resetsLeft ?? 1));
2511
- if (hasGeneral) general += left;
2512
- else if (hasScoped) scoped += left;
2515
+ if (hasScoped) scoped += left;
2516
+ else if (hasGeneral) general += left;
2513
2517
  else unknown += left;
2514
2518
  if (g.endsAt != null && g.endsAt < soonest) soonest = g.endsAt;
2515
2519
  }