maxpool 1.24.83 → 1.24.85

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.83",
3
+ "version": "1.24.85",
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",
@@ -5659,6 +5659,13 @@ export class AccountManager {
5659
5659
  // when a leak's cards are most at risk — remediation rotates keys and
5660
5660
  // restarts the pool, and the in-memory flag would vanish mid-remediation.
5661
5661
  if (a.outsideUsage?.outside) out.outsideUsage = { ...a.outsideUsage };
5662
+ // RESETS survive restart (2026-11-10, live during the 1.24.84 rollout:
5663
+ // every local row blanked ~5-10 min after each seamless reload because the
5664
+ // serialized grants sweep takes minutes to re-list all accounts). Persist a
5665
+ // grants/cards SNAPSHOT so the post-reload screen shows the last known
5666
+ // count instead of nothing; restoreQuotaState marks it stale.
5667
+ if (a.resetGrants) out.resetGrants = { ...a.resetGrants, grants: (a.resetGrants.grants || []).map(g => ({ ...g })) };
5668
+ if (a.resetCards) out.resetCards = { ...a.resetCards, fiveHour: (a.resetCards.fiveHour || []).map(c => ({ ...c })), weekly: (a.resetCards.weekly || []).map(c => ({ ...c })) };
5662
5669
  return out;
5663
5670
  });
5664
5671
  }
@@ -5693,6 +5700,18 @@ export class AccountManager {
5693
5700
  }
5694
5701
  // We already know this account's weekly window, so it isn't "probing".
5695
5702
  if (account.quota.unified7dReset != null) account.probing = false;
5703
+ // RESTORED RESETS (2026-11-10): a pre-reload snapshot is a proof, not a
5704
+ // live listing — restore it marked STALE so the screen shows the count
5705
+ // with the not-fresh marker (never blank) and the first live listing
5706
+ // (≤ GRANTS_EVERY_MS) overwrites it. Never claim off a restored listing:
5707
+ // usability is re-derived by the next live check (C5 gates on usableNow
5708
+ // from the LIVE response; a restored entry may be hours old).
5709
+ if (match.resetGrants && !account.resetGrants) {
5710
+ account.resetGrants = { ...match.resetGrants, stale: true };
5711
+ }
5712
+ if (match.resetCards && !account.resetCards) {
5713
+ account.resetCards = { ...match.resetCards, stale: true };
5714
+ }
5696
5715
  // OUTSIDE-USAGE restored: keep holding R7 and force the next sweep to
5697
5716
  // re-verify immediately (fresh poolHourly can only re-prove the leak).
5698
5717
  if (match.outsideUsage?.outside) {
package/src/tui.js CHANGED
@@ -40,7 +40,7 @@ const NAME_W = 20; // a.name.slice(0, NAME_W).padEnd(NAME_W) — fits a
40
40
  const WHERE_W = 5; // 'Local' / 'Cloud' — where the account is provisioned
41
41
  const PROVIDER_W = 9; // providerLabel(a).padEnd(PROVIDER_W) — fits "Anthropic"
42
42
  const STATUS_W = 13; // rpad(status, STATUS_W) — fits "throttled 59s"
43
- const RESETS_W = 6; // 'Rst' column — FIXED width (fits '2~21d'); a variable
43
+ const RESETS_W = 8; // 'Rst' column — FIXED width (fits '2Fable' / '1~119d'); a variable
44
44
  // width ('0' vs '1~21d') shifted every quota bar per row.
45
45
  const ROW_PREFIX = ' '; // ' ' + sel(1) + cur(1) + ' ' — 4 cols before the name
46
46
 
@@ -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
  }
@@ -2541,8 +2545,15 @@ export class TUI {
2541
2545
  }
2542
2546
 
2543
2547
  // Fit to EXACTLY RESETS_W: full form, then drop the suffix, then total+'*'.
2544
- let text = core + suffix;
2545
- if (text.length > RESETS_W) text = core;
2548
+ // OWNER READABILITY (2026-11-10: "What does the letter F mean? I have no
2549
+ // idea"): a bare F is undecodable shorthand — the 2026-08-27 no-glossary
2550
+ // rule says the cell says what it means in words. Model-scoped resets spell
2551
+ // the model: '2Fable' / '1Opus'. RESETS_W grows to fit '99Fable' (8) so the
2552
+ // word is never truncated into a mystery tag again; plain counts keep the
2553
+ // compact n~Xd form.
2554
+ const coreFable = core.replace(/F\b/, 'Fable');
2555
+ let text = coreFable + suffix;
2556
+ if (text.length > RESETS_W) text = coreFable;
2546
2557
  if (text.length > RESETS_W) text = `${total}*`.slice(0, RESETS_W);
2547
2558
  if (notFresh) text = (text + '?').length <= RESETS_W ? text + '?' : `${total}?`.slice(0, RESETS_W);
2548
2559
  resetsCell = rpad(total > 0 && !notFresh ? green(text) : gray(text), RESETS_W);