maxpool 1.24.4 → 1.24.6

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.4",
3
+ "version": "1.24.6",
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",
package/src/index.js CHANGED
@@ -748,6 +748,33 @@ async function serverWorkerCommand() {
748
748
  // background probe has gone stale (> 3× interval since last success).
749
749
  accountManager.quotaProbeIntervalMs = probeSeconds * 1000;
750
750
 
751
+ // SECRET RE-RESOLVE LOOP (2026-10-05). Provider keys resolve ONCE at startup; a
752
+ // transient gcloud/ADC failure at that moment benched all four z.ai providers as
753
+ // "secret-unresolved" permanently (measured 2026-10-05 20:18 startup: cache had
754
+ // been rewritten without the RESTRICTED_* entries, the gcloud path failed, and
755
+ // nothing retried — every GLM request 429'd "no_eligible_route" until restart).
756
+ // Re-attempt unresolved providers every 5 min until they resolve; a resolved
757
+ // provider is never touched again.
758
+ const unresolvedProviders = () =>
759
+ accountManager.accounts.filter(a => a.configSourced && a.type === 'provider' && a.secretName && !a.authToken);
760
+ if (unresolvedProviders().length) {
761
+ const secretTimer = setInterval(async () => {
762
+ const pending = unresolvedProviders();
763
+ if (!pending.length) { clearInterval(secretTimer); return; }
764
+ try {
765
+ const { resolveSecrets } = await import('./secret-resolver.js');
766
+ const resolved = await resolveSecrets(pending.map(a => a.secretName));
767
+ let fixed = 0;
768
+ for (const a of pending) {
769
+ const tok = resolved[a.secretName];
770
+ if (tok) { a.authToken = tok; a.status = 'unknown'; a.lastError = null; fixed++; }
771
+ }
772
+ if (fixed) console.log(`[Maxpool] Secret re-resolve: ${fixed} provider(s) recovered`);
773
+ } catch { /* next tick */ }
774
+ }, 5 * 60_000);
775
+ secretTimer.unref?.();
776
+ }
777
+
751
778
  // Seed the running version immediately so the TUI header always shows it, even
752
779
  // before (or without) the npm update check. The cold worker's update check below
753
780
  // fills in latest/hasUpdate.
package/src/tui.js CHANGED
@@ -32,8 +32,8 @@ const vw = s => strip(s).length;
32
32
  const NAME_W = 20; // a.name.slice(0, NAME_W).padEnd(NAME_W) — fits a full email like 2solarmax@gmail.com (19)
33
33
  const PROVIDER_W = 9; // providerLabel(a).padEnd(PROVIDER_W) — fits "Anthropic"
34
34
  const STATUS_W = 13; // rpad(status, STATUS_W) — fits "throttled 59s"
35
- const RESETS_W = 3; // 'Rst' column — banked limit resets (cards/grants) the
36
- // pool can auto-redeem; '0' when none, count when some.
35
+ const RESETS_W = 6; // 'Rst' column — FIXED width (fits '2~21d'); a variable
36
+ // width ('0' vs '1~21d') shifted every quota bar per row.
37
37
  const ROW_PREFIX = ' '; // ' ' + sel(1) + cur(1) + ' ' — 4 cols before the name
38
38
 
39
39
  // Human provider name for the accounts-table "Provider" column. account.provider
@@ -2174,7 +2174,7 @@ export class TUI {
2174
2174
  : '~' + Math.max(1, Math.round(days)) + 'd';
2175
2175
  }
2176
2176
  }
2177
- resetsCell = rpad(n > 0 ? green(String(n) + suffix) : gray('0'), RESETS_W + (suffix ? 2 : 0));
2177
+ resetsCell = rpad(n > 0 ? green(String(n) + suffix) : gray('0'), RESETS_W);
2178
2178
  }
2179
2179
 
2180
2180
  if (a.type === 'provider') {