claude-multiacc 2.0.66 → 2.0.68

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 (112) hide show
  1. package/docs/INSTALLATION.md +4 -3
  2. package/docs/RELEASING.md +75 -0
  3. package/package.json +1 -1
  4. package/tests/autoresume_cross_tmux_environment.py +4 -1
  5. package/tests/run-tests.sh +3 -1
  6. package/tests/test_release_validation.py +894 -0
  7. package/lib/__pycache__/audit.cpython-314.pyc +0 -0
  8. package/lib/__pycache__/autoresume.cpython-314.pyc +0 -0
  9. package/lib/__pycache__/autoresume_cross.cpython-314.pyc +0 -0
  10. package/lib/__pycache__/autoresume_cross_dispatch.cpython-314.pyc +0 -0
  11. package/lib/__pycache__/autoresume_cross_receipt.cpython-314.pyc +0 -0
  12. package/lib/__pycache__/autoresume_handoff.cpython-314.pyc +0 -0
  13. package/lib/__pycache__/autoresume_probe.cpython-314.pyc +0 -0
  14. package/lib/__pycache__/autoresume_receipt.cpython-314.pyc +0 -0
  15. package/lib/__pycache__/claude_client_error.cpython-314.pyc +0 -0
  16. package/lib/__pycache__/claude_reset.cpython-314.pyc +0 -0
  17. package/lib/__pycache__/claude_token_identity.cpython-314.pyc +0 -0
  18. package/lib/__pycache__/codex_autoresume_mode.cpython-314.pyc +0 -0
  19. package/lib/__pycache__/codex_config_edit.cpython-314.pyc +0 -0
  20. package/lib/__pycache__/codex_credit_controls.cpython-314.pyc +0 -0
  21. package/lib/__pycache__/codex_credit_local_scope.cpython-314.pyc +0 -0
  22. package/lib/__pycache__/codex_credit_selection.cpython-314.pyc +0 -0
  23. package/lib/__pycache__/codex_credits.cpython-314.pyc +0 -0
  24. package/lib/__pycache__/codex_limits_lock.cpython-314.pyc +0 -0
  25. package/lib/__pycache__/codex_mcp_oauth.cpython-314.pyc +0 -0
  26. package/lib/__pycache__/codex_python.cpython-314.pyc +0 -0
  27. package/lib/__pycache__/codex_resume_cwd.cpython-314.pyc +0 -0
  28. package/lib/__pycache__/codex_speed.cpython-314.pyc +0 -0
  29. package/lib/__pycache__/codex_trust.cpython-314.pyc +0 -0
  30. package/lib/__pycache__/codex_usage_fetch.cpython-314.pyc +0 -0
  31. package/lib/__pycache__/keychain.cpython-314.pyc +0 -0
  32. package/lib/__pycache__/mcp_mirror.cpython-314.pyc +0 -0
  33. package/lib/__pycache__/mcp_oauth.cpython-314.pyc +0 -0
  34. package/lib/__pycache__/mcp_registry.cpython-314.pyc +0 -0
  35. package/lib/__pycache__/model_catalog.cpython-314.pyc +0 -0
  36. package/lib/__pycache__/model_match.cpython-314.pyc +0 -0
  37. package/lib/__pycache__/report.cpython-314.pyc +0 -0
  38. package/lib/__pycache__/selector_credit_scope.cpython-314.pyc +0 -0
  39. package/lib/__pycache__/selector_credits.cpython-314.pyc +0 -0
  40. package/lib/__pycache__/selector_funding.cpython-314.pyc +0 -0
  41. package/lib/__pycache__/selector_policy.cpython-314.pyc +0 -0
  42. package/lib/__pycache__/selector_primitives.cpython-314.pyc +0 -0
  43. package/lib/__pycache__/session_settings.cpython-314.pyc +0 -0
  44. package/lib/__pycache__/shim_path.cpython-314.pyc +0 -0
  45. package/tests/__pycache__/autoresume_cross_receipt_support.cpython-314.pyc +0 -0
  46. package/tests/__pycache__/autoresume_cross_tmux_environment.cpython-314.pyc +0 -0
  47. package/tests/__pycache__/autoresume_cross_tmux_support.cpython-314.pyc +0 -0
  48. package/tests/__pycache__/autoresume_cross_unit_support.cpython-314.pyc +0 -0
  49. package/tests/__pycache__/autoresume_tmux_support.cpython-314.pyc +0 -0
  50. package/tests/__pycache__/packaged_command_support.cpython-314.pyc +0 -0
  51. package/tests/__pycache__/test_autoresume.cpython-314.pyc +0 -0
  52. package/tests/__pycache__/test_autoresume_catalog.cpython-314.pyc +0 -0
  53. package/tests/__pycache__/test_autoresume_catalog_cli.cpython-314.pyc +0 -0
  54. package/tests/__pycache__/test_autoresume_codex_records.cpython-314.pyc +0 -0
  55. package/tests/__pycache__/test_autoresume_codex_trust.cpython-314.pyc +0 -0
  56. package/tests/__pycache__/test_autoresume_cross_claude_holders.cpython-314.pyc +0 -0
  57. package/tests/__pycache__/test_autoresume_cross_guards.cpython-314.pyc +0 -0
  58. package/tests/__pycache__/test_autoresume_cross_holders.cpython-314.pyc +0 -0
  59. package/tests/__pycache__/test_autoresume_cross_origin.cpython-314.pyc +0 -0
  60. package/tests/__pycache__/test_autoresume_cross_policy.cpython-314.pyc +0 -0
  61. package/tests/__pycache__/test_autoresume_cross_receipt.cpython-314.pyc +0 -0
  62. package/tests/__pycache__/test_autoresume_cross_tmux.cpython-314.pyc +0 -0
  63. package/tests/__pycache__/test_autoresume_cross_tmux_races.cpython-314.pyc +0 -0
  64. package/tests/__pycache__/test_autoresume_cross_tokens.cpython-314.pyc +0 -0
  65. package/tests/__pycache__/test_autoresume_cursor.cpython-314.pyc +0 -0
  66. package/tests/__pycache__/test_autoresume_cwd.cpython-314.pyc +0 -0
  67. package/tests/__pycache__/test_autoresume_cwd_handoff.cpython-314.pyc +0 -0
  68. package/tests/__pycache__/test_autoresume_cwd_reader.cpython-314.pyc +0 -0
  69. package/tests/__pycache__/test_autoresume_cwd_tmux.cpython-314.pyc +0 -0
  70. package/tests/__pycache__/test_autoresume_fallback.cpython-314.pyc +0 -0
  71. package/tests/__pycache__/test_autoresume_handoff_argv.cpython-314.pyc +0 -0
  72. package/tests/__pycache__/test_autoresume_handoff_history.cpython-314.pyc +0 -0
  73. package/tests/__pycache__/test_autoresume_handoff_origins.cpython-314.pyc +0 -0
  74. package/tests/__pycache__/test_autoresume_memory.cpython-314.pyc +0 -0
  75. package/tests/__pycache__/test_autoresume_memory_tmux.cpython-314.pyc +0 -0
  76. package/tests/__pycache__/test_autoresume_mode.cpython-314.pyc +0 -0
  77. package/tests/__pycache__/test_autoresume_probe.cpython-314.pyc +0 -0
  78. package/tests/__pycache__/test_autoresume_receipt.cpython-314.pyc +0 -0
  79. package/tests/__pycache__/test_autoresume_relaunch_settings.cpython-314.pyc +0 -0
  80. package/tests/__pycache__/test_autoresume_settings.cpython-314.pyc +0 -0
  81. package/tests/__pycache__/test_autoresume_sidechain.cpython-314.pyc +0 -0
  82. package/tests/__pycache__/test_autoresume_sidechain_tmux.cpython-314.pyc +0 -0
  83. package/tests/__pycache__/test_autoresume_tmux.cpython-314.pyc +0 -0
  84. package/tests/__pycache__/test_autoresume_tmux_modes.cpython-314.pyc +0 -0
  85. package/tests/__pycache__/test_autoresume_trust_tmux.cpython-314.pyc +0 -0
  86. package/tests/__pycache__/test_claude_oauth_lock.cpython-314.pyc +0 -0
  87. package/tests/__pycache__/test_claude_reset.cpython-314.pyc +0 -0
  88. package/tests/__pycache__/test_claude_token_identity.cpython-314.pyc +0 -0
  89. package/tests/__pycache__/test_codex_exec_stdin.cpython-314.pyc +0 -0
  90. package/tests/__pycache__/test_codex_mcp_oauth.cpython-314.pyc +0 -0
  91. package/tests/__pycache__/test_codex_reset.cpython-314.pyc +0 -0
  92. package/tests/__pycache__/test_codex_reset_credits.cpython-314.pyc +0 -0
  93. package/tests/__pycache__/test_codex_reset_credits_polling.cpython-314.pyc +0 -0
  94. package/tests/__pycache__/test_codex_reset_credits_report.cpython-314.pyc +0 -0
  95. package/tests/__pycache__/test_codex_reset_fetch.cpython-314.pyc +0 -0
  96. package/tests/__pycache__/test_codex_reset_polling.cpython-314.pyc +0 -0
  97. package/tests/__pycache__/test_codex_reset_reporting.cpython-314.pyc +0 -0
  98. package/tests/__pycache__/test_codex_reset_windows.cpython-314.pyc +0 -0
  99. package/tests/__pycache__/test_mcp_mirror.cpython-314.pyc +0 -0
  100. package/tests/__pycache__/test_mcp_mirror_args.cpython-314.pyc +0 -0
  101. package/tests/__pycache__/test_mcp_oauth.cpython-314.pyc +0 -0
  102. package/tests/__pycache__/test_mcp_registry.cpython-314.pyc +0 -0
  103. package/tests/__pycache__/test_selector.cpython-314.pyc +0 -0
  104. package/tests/__pycache__/test_selector_cached_credits.cpython-314.pyc +0 -0
  105. package/tests/__pycache__/test_selector_credit_scope.cpython-314.pyc +0 -0
  106. package/tests/__pycache__/test_selector_credit_shim.cpython-314.pyc +0 -0
  107. package/tests/__pycache__/test_selector_credits.cpython-314.pyc +0 -0
  108. package/tests/__pycache__/test_selector_spread.cpython-314.pyc +0 -0
  109. package/tests/__pycache__/test_token_identity_ceremony.cpython-314.pyc +0 -0
  110. package/tests/__pycache__/test_token_identity_integration.cpython-314.pyc +0 -0
  111. package/tests/__pycache__/test_token_identity_retry.cpython-314.pyc +0 -0
  112. package/tests/__pycache__/test_token_identity_sync.cpython-314.pyc +0 -0
@@ -56,9 +56,10 @@ version is on npm.
56
56
  (Note: newer npm versions gate install scripts; if postinstall is blocked, just run
57
57
  `claude-multiacc install` once.)
58
58
 
59
- New versions publish to npm automatically from `main` via GitHub Actions
60
- (`.github/workflows/publish.yml`, OIDC Trusted Publishing — no long-lived token after the
61
- first bootstrap publish; `scripts/auto-version.mjs` bumps the patch above the last release).
59
+ New versions publish to npm automatically from `main` via GitHub Actions using OIDC
60
+ Trusted Publishing. Prepare the version with `scripts/auto-version.mjs` before
61
+ committing, then complete the [local release validation](RELEASING.md). The workflow
62
+ verifies that evidence and publishes the exact validated version and package bytes.
62
63
 
63
64
  ### From a git checkout
64
65
 
@@ -0,0 +1,75 @@
1
+ # Releasing within two minutes of GitHub Actions starting
2
+
3
+ Every release runs the full validation locally before GitHub Actions. The workflow
4
+ then verifies authenticated evidence, repacks and compares the exact package, runs
5
+ short hosted compatibility checks, publishes through npm OIDC, confirms registry
6
+ integrity, and tags the same source. Measure the complete successful Actions run
7
+ from its creation through completion, including setup and publication: the budget
8
+ is 120 seconds. A timeout alone does not establish compliance.
9
+
10
+ The full local checks still take minutes. They have not been removed, weakened or
11
+ replaced by a smoke test. `scripts/release_validation.py` defines their canonical
12
+ roster: the complete shell suite, selector, piped Codex retries, Keychain, shell PATH
13
+ probe, Claude OAuth refresh coordination, autoresume, account seeding/settings/MCP,
14
+ packed commands, and release policy tests. Seeding runs in a private Linux PID namespace; tmux and zsh must be present.
15
+
16
+ ## Prepare and validate an immutable candidate
17
+
18
+ 1. Resolve the next npm version before the final candidate commit:
19
+ `node scripts/auto-version.mjs .`. Commit all source, tests, release scripts and
20
+ documentation. Validation requires a clean checkout, including untracked files.
21
+ 2. Run `scripts/validate-release.sh --receipt /absolute/path/outside/repo/receipt.json`.
22
+ The helper prepares a Linux environment, runs with a private process namespace
23
+ and HOME, disables networking during tests, and mounts the candidate read-only.
24
+ npm 12.2.1 is used locally and in Actions so the packed bytes match.
25
+ 3. Keep the receipt, complete command logs and packed artifact together outside the
26
+ checkout. Any failing command or source change prevents successful attestation.
27
+ 4. Push that exact candidate and authenticate the result:
28
+
29
+ ```bash
30
+ python3 scripts/release_validation.py publish --repository gowalk-public/claude-multiacc --receipt /absolute/path/outside/repo/receipt.json
31
+ ```
32
+
33
+ 5. Mark the draft PR ready after publishing the statuses, or rerun its workflow if
34
+ it was already ready. Same-repository ready PRs verify the exact head and run the
35
+ short hosted checks; they cannot publish a package. Draft and fork PRs skip this job.
36
+ 6. Merge only when the branch tree is exactly the tested tree. If main changed such
37
+ that the merge would change it, update the branch and repeat validation. A squash
38
+ merge may change the commit ID; its tree must still equal the validated PR head.
39
+
40
+ The repository variable `LOCAL_RELEASE_VALIDATION_ACTOR` names the trusted GitHub
41
+ account allowed to attest local execution. GitHub authenticates that actor, not the
42
+ local machine; this does not claim hardware or machine attestation. A checked-in
43
+ JSON file alone never admits a release. Raw local receipts remain available for
44
+ review and bind each command's exact arguments, return code and log digest.
45
+
46
+ The latest `local-release-validation` status binds the Git tree and complete suite
47
+ policy. The latest `local-release-artifact` status binds version and tarball SHA-256.
48
+ Both must be successful, created by the trusted actor, and less than 24 hours old.
49
+ A newer failed, pending or unauthorized status blocks an older success. Changes to
50
+ source bytes, modes, symlink targets, policy, version or package bytes require fresh
51
+ evidence. No CI version bump is permitted after validation.
52
+
53
+ ## Publication and confirmation
54
+
55
+ The workflow retains real hosted PATH-probe and atomic-lock checks because hosted
56
+ shell integration and core utilities can differ from a local Linux image. It runs
57
+ the release-policy rejection tests as well. These short checks supplement the full
58
+ local proof.
59
+
60
+ After publishing, require both a green workflow and matching npm integrity/version
61
+ and Git tag. Record the measured run duration. Queue or registry outages can prevent
62
+ a release; they must never cause stale proof to be accepted or required checks to
63
+ be skipped. The workflow refuses to start publication when it has already consumed
64
+ the time reserved for publication and tagging.
65
+
66
+ npm can accept a package and keep it unavailable while processing it. That is
67
+ reported as pending registry confirmation, never as a completed deployment. A rerun
68
+ checks the exact existing version's integrity, skips republishing matching bytes,
69
+ and completes the matching tag. Conflicting bytes or an existing tag for another
70
+ commit stop before any new publication. Registry confirmation uses the remaining
71
+ run budget while reserving time for tagging and Actions cleanup; it never extends
72
+ the 120-second budget. Recovery uses the new attempt's start time;
73
+ reports retain the original run creation time so waiting does not disappear from
74
+ the end-to-end record. Registry processing time is external to Actions and must be
75
+ reported separately if it prevents the requested complete deployment budget.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-multiacc",
3
- "version": "2.0.66",
3
+ "version": "2.0.68",
4
4
  "description": "Unified Claude Code and OpenAI Codex subscription pooling with quota-aware selection.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -53,7 +53,10 @@ def test_environment(home, pools, overrides):
53
53
  "USAGE_URL": "file:///nonexistent", "TOKEN_URL": "file:///nonexistent",
54
54
  "AR_POLL": "0.05", "AR_GRACE": "0.4", "AR_HOLD_REPROBE": "0.3",
55
55
  "AR_TERM_GRACE": "0.3", "AR_PANE_WAIT": "4", "AR_RELAUNCH_WAIT": "5",
56
- "AR_PROMPT_WAIT": "2", "AR_TRANSIENT_LADDER": "0.4"}.items():
56
+ # A real target process can take over two seconds to persist
57
+ # its first prompt. Match the relaunch allowance; production
58
+ # allows 30s, and missing/stale receipts are still rejected.
59
+ "AR_PROMPT_WAIT": "5", "AR_TRANSIENT_LADDER": "0.4"}.items():
57
60
  env[prefix + "MULTIACC_" + name] = value
58
61
  env.update(overrides)
59
62
  return env
@@ -1867,7 +1867,9 @@ claude >/dev/null 2>&1
1867
1867
  [ ! -f "$ACC/acct-01/.limited" ] \
1868
1868
  && t_ok "an old transcript cannot recreate a telemetry-disproved marker" \
1869
1869
  || t_fail "client recovery watermark" "old rejection recreated the marker"
1870
- rm -f "$ACC/acct-01/.limited"
1870
+ # Later fixtures create independent rejections, possibly in this same second. The
1871
+ # preceding recovery watermark must not suppress their expiry/opt-out/index checks.
1872
+ rm -f "$ACC/acct-01/.limited" "$ACC/acct-01/.client-limit-cleared"
1871
1873
 
1872
1874
  # an ALREADY-ELAPSED rejection is history, not an exclusion
1873
1875
  mkclientlimit "$ACC/acct-01" "$SID1" "$(( $(date +%s) - 60 ))"