maxpool 1.24.5 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +27 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.5",
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.