tokenmaxxing 1.111.0 → 1.112.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/DESIGN.md CHANGED
@@ -66,7 +66,7 @@ The supervisor sees `respawn/<sid>`, SIGTERMs its child at the already-committed
66
66
 
67
67
  ### 3.4 Placement (supervisor, under the pool lock)
68
68
  1. Fold every account's tee into the index.
69
- 2. Rank the usable accounts (§5) with the live session counts from `live/`, or the soonest-recovering account when none is usable; with no pooled account or every account needing re-auth, launch without a store (still supervised, on whatever login the environment names). Print mode, the non-interactive subcommands, the bare resume picker, an invalid `--session-id`, and `--fork-session` with a resume are passed through unmanaged.
69
+ 2. Rank the usable accounts (§5) with the live session counts from `live/`, or the soonest-recovering account when none is usable; with no pooled account or every account needing re-auth, launch without a store (still supervised, on whatever login the environment names). Print mode, every subcommand, the bare resume picker, an invalid `--session-id`, and `--fork-session` with a resume are passed through unmanaged.
70
70
  3. Spawn claude with the store env set, then write `live/<sid>` with the child's pid and start time. The lock covers the pick and the presence write, so concurrent launches see each other.
71
71
 
72
72
  ### 3.5 Multiple concurrent sessions
package/README.md CHANGED
@@ -14,7 +14,7 @@ $ claude
14
14
 
15
15
  ## Why
16
16
 
17
- Every pooled account owns one Claude Code credential store under `~/.config/tokenmaxxing/stores/`. A thin `claude` supervisor on your PATH picks an account for each session and points `CLAUDE_SECURESTORAGE_CONFIG_DIR` at its store, so sessions on different accounts never share a credential, while sessions on the same account share its store and Claude Code's own refresh keeps them in step. A session moves only by respawn: the supervisor stops it at a committed turn boundary (the transcript is already on disk, nothing is lost) and runs `claude --resume <id>` under another store. tokenmaxxing writes a store once at onboarding and never again; it never copies a credential between stores, because a refresh rotation revokes the previous access token and two copies of one grant break each other. Everything else about `claude` is unchanged - all flags, MCP, hooks, and skills pass through. Print mode and the non-interactive subcommands run without a seat, on whatever login the environment names.
17
+ Every pooled account owns one Claude Code credential store under `~/.config/tokenmaxxing/stores/`. A thin `claude` supervisor on your PATH picks an account for each session and points `CLAUDE_SECURESTORAGE_CONFIG_DIR` at its store, so sessions on different accounts never share a credential, while sessions on the same account share its store and Claude Code's own refresh keeps them in step. A session moves only by respawn: the supervisor stops it at a committed turn boundary (the transcript is already on disk, nothing is lost) and runs `claude --resume <id>` under another store. tokenmaxxing writes a store once at onboarding and never again; it never copies a credential between stores, because a refresh rotation revokes the previous access token and two copies of one grant break each other. Everything else about `claude` is unchanged - all flags, MCP, hooks, and skills pass through. Print mode and every `claude` subcommand run without a seat, on whatever login the environment names.
18
18
 
19
19
  ## Install
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokenmaxxing",
3
- "version": "1.111.0",
3
+ "version": "1.112.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",
@@ -21,10 +21,15 @@ import { gatedFamilies, modelFromFlag, scrubCredEnv } from "../lib/usage.ts";
21
21
  import { RespawnMarkerSchema, type Account, type Config, type ModelInfo } from "../lib/types.ts";
22
22
  import { errorMessage, log } from "../lib/log.ts";
23
23
 
24
- const NONINTERACTIVE_SUBCMDS = new Set([
25
- "mcp", "config", "doctor", "update", "install", "migrate-installer",
26
- "setup-token", "plugin", "agents", "completion", "help",
24
+ const SUBCOMMANDS = new Set([
25
+ "agents", "attach", "auth", "auto-mode", "daemon", "design-login", "doctor",
26
+ "drop-worktree-registrations", "edit-chrome-settings", "edit-hook", "edit-memory-settings",
27
+ "edit-permission-rules", "edit-sandbox-settings", "edit-skill-overrides", "gateway", "help",
28
+ "import", "import-conversations", "install", "kill", "logs", "mcp", "plugin", "plugins",
29
+ "project", "rc", "remote-control", "respawn", "rm", "sandbox", "setup-token", "stop",
30
+ "ultrareview", "update", "upgrade",
27
31
  ]);
32
+ const SOLE_UPDATE_FLAGS = new Set(["--update", "--upgrade"]);
28
33
 
29
34
  const VALUE_TAKING_ROOT_FLAGS = new Set([
30
35
  "--agent", "--agents", "--append-system-prompt", "--append-system-prompt-file",
@@ -115,7 +120,7 @@ export function analyzeArgs(argv: string[]): Analysis {
115
120
  }
116
121
  }
117
122
 
118
- const isSubcmd = firstPositional !== null && NONINTERACTIVE_SUBCMDS.has(firstPositional);
123
+ const isSubcmd = (firstPositional !== null && SUBCOMMANDS.has(firstPositional)) || (argv.length === 1 && SOLE_UPDATE_FLAGS.has(argv[0]!));
119
124
  const forkResume = forkSession && (resumeId !== null || continueLatest);
120
125
  const manage = !printMode && !isSubcmd && !invalidSessionArg && !pickerResume && !forkResume && !process.env.TOKENMAXXING_PROBE;
121
126
  return { manage, sessionId, resumeId, continueLatest, streamInput, streamOutput, model };