maxpool 1.24.65 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.65",
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/index.js CHANGED
@@ -1821,6 +1821,26 @@ async function poolCommand() {
1821
1821
  console.log(` export ANTHROPIC_BASE_URL=http://${host}`);
1822
1822
  console.log(` export ANTHROPIC_API_KEY=${key}`);
1823
1823
  console.log('rc-gate users: also set RC_GATE_MAXPOOL_HOST/PORT/KEY in the LaunchAgent and restart it.');
1824
+ } else if (sub === 'team') {
1825
+ // The onboarding command the team DMs should name (2026-11-02: `pool shared`
1826
+ // was mistakenly sent to teammates — it redirects the WHOLE machine at an
1827
+ // address that is only reachable through the tunnel, and adds no cloud rows).
1828
+ // This adds a pools[] link: the remote pool's accounts appear as extra rows
1829
+ // beside the local ones; duplicates auto-bench. With no args it operates on
1830
+ // the standard wireproxy tunnel (127.0.0.1:13456 → 10.7.0.1:3456).
1831
+ const url = args[2] || 'http://127.0.0.1:13456';
1832
+ const key = args[3];
1833
+ if (key && key.startsWith('-')) {
1834
+ console.error('Usage: maxpool pool team [url] <your-pool-key>');
1835
+ process.exit(1);
1836
+ }
1837
+ await atomicConfigUpdate(c => {
1838
+ c.pools = (c.pools || []).filter(p => p.name !== 'team');
1839
+ c.pools.push(key ? { name: 'team', url, key } : { name: 'team', url });
1840
+ });
1841
+ console.log(`Team pool linked: cloud accounts will appear as extra rows marked Cloud.`);
1842
+ console.log('Restart your local pool (maxpool restart, or quit and start again) to load them.');
1843
+ console.log('If a local account also exists in the cloud, the local copy pauses itself automatically.');
1824
1844
  } else if (sub === 'local') {
1825
1845
  await atomicConfigUpdate(c => {
1826
1846
  c.client = { ...(c.client || {}), mode: 'local' };
@@ -1837,7 +1857,7 @@ async function poolCommand() {
1837
1857
  console.log(`mode: local → http://${config.proxy.host || '127.0.0.1'}:${config.proxy.port}`);
1838
1858
  }
1839
1859
  } else {
1840
- console.error('Usage: maxpool pool <shared <host:port> <key> | local | status>');
1860
+ console.error('Usage: maxpool pool <team [url] <key> | shared <host:port> <key> | local | status>');
1841
1861
  process.exit(1);
1842
1862
  }
1843
1863
  }
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