maxpool 1.24.66 → 1.24.67

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/server.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.66",
3
+ "version": "1.24.67",
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/server.js CHANGED
@@ -358,8 +358,11 @@ export function createProxyServer(accountManager, config, hooks = {}) {
358
358
  });
359
359
  // Keep the in-memory config mirror in step so a later TUI saveConfig
360
360
  // can't clobber the fresh tokens with stale ones.
361
+ // A NEW row must enter the mirror too: the disk sync adds any disk row whose
362
+ // uuid the mirror lacks, so a missing entry became a second live row.
361
363
  const mem = (config.accounts || []).find(a => a.accountUuid === acct.accountUuid);
362
364
  if (mem) Object.assign(mem, tokenFields);
365
+ else if (Array.isArray(config.accounts)) config.accounts.push({ name: acct.name || acct.accountUuid.slice(0, 8), type: 'oauth', accountUuid: acct.accountUuid, enabled: true, ...tokenFields });
363
366
  } catch (err) {
364
367
  // A single-use credential write is only "ok" when it is DURABLE: the browser
365
368
  // login may have invalidated the previous refresh token, so memory-only means