claude-multiacc 2.0.40 → 2.0.42

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 (30) hide show
  1. package/README.md +49 -2
  2. package/bin/claude +394 -2
  3. package/bin/codex +406 -4
  4. package/docs/ACCOUNT_OPERATIONS.md +2 -1
  5. package/docs/AUTORESUME.md +321 -0
  6. package/docs/CODEX.md +12 -1
  7. package/docs/VERIFICATION.md +9 -1
  8. package/lib/__pycache__/audit.cpython-312.pyc +0 -0
  9. package/lib/__pycache__/autoresume.cpython-312.pyc +0 -0
  10. package/lib/__pycache__/claude_reset.cpython-312.pyc +0 -0
  11. package/lib/__pycache__/codex_config_edit.cpython-312.pyc +0 -0
  12. package/lib/__pycache__/codex_python.cpython-312.pyc +0 -0
  13. package/lib/__pycache__/keychain.cpython-312.pyc +0 -0
  14. package/lib/__pycache__/mcp_registry.cpython-312.pyc +0 -0
  15. package/lib/__pycache__/selector_policy.cpython-312.pyc +0 -0
  16. package/lib/__pycache__/selector_primitives.cpython-312.pyc +0 -0
  17. package/lib/__pycache__/shim_path.cpython-312.pyc +0 -0
  18. package/lib/autoresume.py +2271 -0
  19. package/lib/report.py +16 -1
  20. package/package.json +1 -1
  21. package/tests/__pycache__/packaged_command_support.cpython-312.pyc +0 -0
  22. package/tests/__pycache__/test_autoresume.cpython-312.pyc +0 -0
  23. package/tests/__pycache__/test_claude_reset.cpython-312.pyc +0 -0
  24. package/tests/__pycache__/test_codex_reset.cpython-312.pyc +0 -0
  25. package/tests/__pycache__/test_codex_reset_polling.cpython-312.pyc +0 -0
  26. package/tests/__pycache__/test_codex_reset_reporting.cpython-312.pyc +0 -0
  27. package/tests/__pycache__/test_codex_reset_windows.cpython-312.pyc +0 -0
  28. package/tests/run-tests.sh +935 -3
  29. package/tests/test_autoresume.py +2565 -0
  30. package/tests/test_claude_reset.py +30 -0
package/lib/report.py CHANGED
@@ -46,7 +46,7 @@ import time
46
46
 
47
47
  sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
48
48
  import keychain # noqa: E402
49
- from audit import token_verified # noqa: E402
49
+ from audit import creds_doc_state, token_verified # noqa: E402
50
50
  from claude_reset import marker_superseded, record_from # noqa: E402
51
51
 
52
52
  SCHEMA = 'claude-multiacc/pool.v1'
@@ -194,6 +194,21 @@ def _claude_credentials(d):
194
194
  if isinstance(o, dict):
195
195
  detail['oauth_expires_at'] = _iso_ms(o.get('expiresAt'))
196
196
  detail['oauth_refresh_expires_at'] = _iso_ms(o.get('refreshTokenExpiresAt'))
197
+ # `oauth` says a sign-in EXISTS here; `oauth_alive` says whether it can still work —
198
+ # the limits writer's own rule (audit.creds_doc_state). A dead one (refresh token
199
+ # expired) keeps inference running on the portable token but can never read usage
200
+ # or limit resets again, so the panel must ask for a sign-in (2026-09-22: acct-02 and
201
+ # acct-07 sat dark for days behind `oauth: true`). None = could not be read here (a
202
+ # Keychain this session cannot open) or no sign-in at all.
203
+ detail['oauth_alive'] = None
204
+ if has_oauth and isinstance(o, dict):
205
+ try:
206
+ state, reason = creds_doc_state({'claudeAiOauth': o}, time.time())
207
+ detail['oauth_alive'] = state == 'ok'
208
+ if state != 'ok':
209
+ detail['oauth_problem'] = reason
210
+ except Exception:
211
+ pass
197
212
  if has_token:
198
213
  mt = _mtime(tpath)
199
214
  detail['token_minted_at'] = _iso(mt)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-multiacc",
3
- "version": "2.0.40",
3
+ "version": "2.0.42",
4
4
  "description": "Unified Claude Code and OpenAI Codex subscription pooling with quota-aware selection.",
5
5
  "type": "module",
6
6
  "bin": {