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
@@ -660,6 +660,36 @@ class ClaudeResetFleetRecordTest(ClaudePoolSandbox, unittest.TestCase):
660
660
  self.assertIn("written before a confirmed limit reset", self.log())
661
661
 
662
662
 
663
+ class ClaudeDeadSignInReportTest(ClaudePoolSandbox, unittest.TestCase):
664
+ """A sign-in that EXISTS but can no longer work must say so (2026-09-22: acct-02 and
665
+ acct-07 read `oauth: true` with a refresh token expired days before, so the panel
666
+ never offered the sign-in that restores their telemetry and limit resets)."""
667
+
668
+ def listed(self) -> dict:
669
+ result = subprocess.run([REPO / "bin/claude-accounts", "list", "--json"],
670
+ capture_output=True, text=True, env=self.env(), timeout=60,
671
+ check=False)
672
+ self.assertEqual(result.returncode, 0, result.stderr)
673
+ return json.loads(result.stdout)["accounts"][0]["credentials"]
674
+
675
+ def test_a_live_sign_in_is_alive(self) -> None:
676
+ creds = self.listed()
677
+ self.assertTrue(creds["oauth"])
678
+ self.assertTrue(creds["oauth_alive"])
679
+ self.assertNotIn("oauth_problem", creds)
680
+
681
+ def test_an_expired_refresh_token_is_a_dead_sign_in(self) -> None:
682
+ (self.account / "server.token").write_text("sk-ant-oat01-portable\n", encoding="utf-8")
683
+ dead = {"claudeAiOauth": {"accessToken": "old", "refreshToken": "r",
684
+ "expiresAt": int(time.time() - 7 * 86400) * 1000,
685
+ "refreshTokenExpiresAt": int(time.time() - 3 * 86400) * 1000}}
686
+ (self.account / ".credentials.json").write_text(json.dumps(dead), encoding="utf-8")
687
+ creds = self.listed()
688
+ self.assertTrue(creds["oauth"]) # it exists...
689
+ self.assertFalse(creds["oauth_alive"]) # ...but cannot work
690
+ self.assertIn("refresh token expired", creds["oauth_problem"])
691
+
692
+
663
693
  class ClaudeResetReportingTest(ClaudePoolSandbox, unittest.TestCase):
664
694
  def report(self, **overrides) -> dict:
665
695
  result = self.run_limits("--json", **overrides)