claude-dev-env 8.46.23 → 8.46.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "8.46.23",
3
+ "version": "8.46.24",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -333,7 +333,8 @@ def _parser() -> argparse.ArgumentParser:
333
333
  commands = parser.add_subparsers(dest="action", required=True)
334
334
  for each_action in ("choose", "check", "accounts", "limits", "run"):
335
335
  command = commands.add_parser(each_action)
336
- command.add_argument("--product", choices=[each_product.value for each_product in Product], required=True)
336
+ all_product_choices = [Product.CODEX.value] if each_action == "limits" else [each_product.value for each_product in Product]
337
+ command.add_argument("--product", choices=all_product_choices, required=True)
337
338
  if each_action == "choose":
338
339
  command.add_argument("--spent", action="append", default=[])
339
340
  if each_action == "limits":
@@ -373,9 +374,7 @@ def _accounts_cli(product: Product) -> int:
373
374
  return 0
374
375
 
375
376
 
376
- def _limits_cli(product: Product, parsed: argparse.Namespace) -> int:
377
- if product is not Product.CODEX:
378
- raise BrokerConfigurationError("limits reads Codex accounts only")
377
+ def _limits_cli(parsed: argparse.Namespace) -> int:
379
378
  try:
380
379
  rate_limit_records = codex_account_meters.read_rate_limit_records(
381
380
  codex_account_meters.resolve_codex_path(parsed.codex), parsed.home
@@ -430,7 +429,7 @@ def main(all_arguments: Sequence[str]) -> int:
430
429
  if parsed.action == "accounts":
431
430
  return _accounts_cli(product)
432
431
  if parsed.action == "limits":
433
- return _limits_cli(product, parsed)
432
+ return _limits_cli(parsed)
434
433
  if parsed.action == "run":
435
434
  return _run_cli(product, parsed, parser)
436
435
  return _choose_cli(product, parsed)
@@ -805,5 +805,7 @@ def test_should_exit_two_when_the_limits_read_fails(
805
805
 
806
806
 
807
807
  def test_should_refuse_limits_for_claude(tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None:
808
- assert account_broker.main(("limits", "--product", "claude", "--home", str(tmp_path))) == 2
809
- assert "Codex accounts only" in capsys.readouterr().err
808
+ with pytest.raises(SystemExit) as exit_info:
809
+ account_broker.main(("limits", "--product", "claude", "--home", str(tmp_path)))
810
+ assert exit_info.value.code == 2
811
+ assert "invalid choice: 'claude'" in capsys.readouterr().err
@@ -164,7 +164,6 @@ class TestReadCodexMeters:
164
164
  read_codex_meters(Path("codex"), Path("/h"), broken_exchange)
165
165
 
166
166
 
167
-
168
167
  class TestReadRateLimitRecords:
169
168
  def should_return_every_limit_record_the_reply_carries(self) -> None:
170
169
  rate_limit_records = {
@@ -196,6 +195,7 @@ class TestReadRateLimitRecords:
196
195
  with pytest.raises(CodexMeterUnreadError, match="no rate-limit reply"):
197
196
  read_rate_limit_records(Path("codex"), Path("/h"), lambda *_: [])
198
197
 
198
+
199
199
  FAKE_APP_SERVER = """#!/usr/bin/env python3
200
200
  import json, os, sys
201
201
  for line in sys.stdin: