tokenmaxxing 1.84.0 → 1.85.0
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": "tokenmaxxing",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.85.0",
|
|
4
4
|
"description": "Automatic Claude Code account switching: pool multiple accounts, start each session on its own account, and resume a session on a fresher account when quota fills.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -419,7 +419,8 @@ export async function runSupervisor(argv: string[]): Promise<number> {
|
|
|
419
419
|
if (existsSync(marker)) rmSync(marker, { force: true });
|
|
420
420
|
|
|
421
421
|
const gate: MarkerGate = { launchedAt: Date.now(), overriddenUntil };
|
|
422
|
-
const
|
|
422
|
+
const launched = await withLock(claudePool.lockFile, async () => {
|
|
423
|
+
if (terminating) return null;
|
|
423
424
|
const picked = (wanted == null ? null : (loadAccounts(claudePool).accounts.find((a) => a.id === wanted) ?? null)) ?? pickSeat(gate.launchedAt, model);
|
|
424
425
|
log("supervisor.launch", { sid, respawns, seat: picked?.id.slice(0, 8) ?? null, args: launchArgs.join(" "), injected: firstLine !== null });
|
|
425
426
|
const spawned = Bun.spawn([real, ...launchArgs], {
|
|
@@ -435,6 +436,7 @@ export async function runSupervisor(argv: string[]): Promise<number> {
|
|
|
435
436
|
...(picked ? { CLAUDE_SECURESTORAGE_CONFIG_DIR: storeDirFor(picked.id) } : {}),
|
|
436
437
|
},
|
|
437
438
|
});
|
|
439
|
+
child = spawned;
|
|
438
440
|
if (relay !== null) relay.attach(spawned.stdin!, firstLine);
|
|
439
441
|
firstLine = null;
|
|
440
442
|
if (picked) {
|
|
@@ -450,8 +452,12 @@ export async function runSupervisor(argv: string[]): Promise<number> {
|
|
|
450
452
|
}
|
|
451
453
|
return { child: spawned, seat: picked };
|
|
452
454
|
});
|
|
455
|
+
if (launched == null) {
|
|
456
|
+
await releaseClaim();
|
|
457
|
+
return 143;
|
|
458
|
+
}
|
|
453
459
|
|
|
454
|
-
child =
|
|
460
|
+
const { child: proc, seat } = launched;
|
|
455
461
|
let seatCheckAt = 0;
|
|
456
462
|
await raceMarkerOrExit({
|
|
457
463
|
child: proc,
|