claude-org 0.2.2 → 0.4.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/lib/status.js CHANGED
@@ -21,7 +21,8 @@ function authStatus(envExtra = {}) {
21
21
  });
22
22
  }
23
23
 
24
- async function statusAll() {
24
+ // model: passed to probe (undefined -> CLAUDE_ORG_PROBE_MODEL or Haiku).
25
+ async function statusAll(model) {
25
26
  for (const name of listOrgs()) {
26
27
  const tok = readToken(name);
27
28
  if (tok === null) continue;
@@ -29,7 +30,7 @@ async function statusAll() {
29
30
  const out = await authStatus({ CLAUDE_CODE_OAUTH_TOKEN: tok });
30
31
  const lines = out.split('\n').filter(l => KEYS_RE.test(l));
31
32
  console.log(lines.length ? lines.join('\n') : ' (auth status failed)');
32
- const r = await probe(name);
33
+ const r = await probe(name, model);
33
34
  if (r.line) console.log(` ${r.line}`);
34
35
  }
35
36
  console.log('== default (no env) ==');
package/lib/usage.js CHANGED
@@ -24,11 +24,15 @@ token org alphabetically):
24
24
  claude-org auto [claude args...] launch on <prefer> if usable, else default
25
25
  (decided once at launch)
26
26
  claude-org <name> [claude args...] e.g. claude-org work --resume
27
- claude-org probe [<name>] print the org's 5h window state on one line
28
- (exit 0 when allowed)
27
+ claude-org probe [<name>] [--model <id>]
28
+ print the org's 5h window state on one line
29
+ (exit 0 when allowed); with --model, probe with
30
+ that model and add model_status= (exit 1 when
31
+ the org refused it)
29
32
  claude-org watch wait until <prefer> recovers, then notify
30
33
  (terminal + optional CLAUDE_ORG_NOTIFY_CMD)
31
- claude-org status show \`claude auth status\` for each org token
34
+ claude-org status [--model <id>] show \`claude auth status\` and probe for each
35
+ org token
32
36
  claude-org list list saved org names
33
37
 
34
38
  auto / <name> only read env at launch, so they cannot switch mid-session. To keep
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-org",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
4
4
  "description": "Switch Claude Code between multiple Anthropic organizations, with automatic failover on the 5-hour rate limit",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",