refactorai-cli 0.3.9__tar.gz → 0.3.10__tar.gz

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 (36) hide show
  1. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/PKG-INFO +1 -1
  2. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/pyproject.toml +1 -1
  3. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/__init__.py +1 -1
  4. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/cloud_rr.py +27 -3
  5. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli.egg-info/PKG-INFO +1 -1
  6. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/README.md +0 -0
  7. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/auth.py +0 -0
  8. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/client.py +0 -0
  9. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/__init__.py +0 -0
  10. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/account_cmds.py +0 -0
  11. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/auth_cmds.py +0 -0
  12. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/cloud_cmds.py +0 -0
  13. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/engine_cmds.py +0 -0
  14. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/model_cmds.py +0 -0
  15. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/rules_cmds.py +0 -0
  16. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/run_cmds.py +0 -0
  17. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/runtime_cmds.py +0 -0
  18. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/runtime_proxy_cmds.py +0 -0
  19. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/setup_cmds.py +0 -0
  20. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/commands/toolchains_cmds.py +0 -0
  21. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/control_plane.py +0 -0
  22. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/credentials.py +0 -0
  23. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/local_constitution.py +0 -0
  24. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/local_engine_runtime.py +0 -0
  25. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/local_paths.py +0 -0
  26. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/main.py +0 -0
  27. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/model_policy.py +0 -0
  28. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/runtime_manager.py +0 -0
  29. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/settings.py +0 -0
  30. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli/setup_flow.py +0 -0
  31. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli.egg-info/SOURCES.txt +0 -0
  32. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli.egg-info/dependency_links.txt +0 -0
  33. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli.egg-info/entry_points.txt +0 -0
  34. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli.egg-info/requires.txt +0 -0
  35. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/refactorai_cli.egg-info/top_level.txt +0 -0
  36. {refactorai_cli-0.3.9 → refactorai_cli-0.3.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: refactorai-cli
3
- Version: 0.3.9
3
+ Version: 0.3.10
4
4
  Summary: Local-first CLI for the refactor platform
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "refactorai-cli"
3
- version = "0.3.9"
3
+ version = "0.3.10"
4
4
  description = "Local-first CLI for the refactor platform"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -5,4 +5,4 @@ the shared `refactor_core` pipeline from a project folder while staying
5
5
  authenticated to the hosted platform via a developer key.
6
6
  """
7
7
 
8
- __version__ = "0.3.9"
8
+ __version__ = "0.3.10"
@@ -193,6 +193,21 @@ def _managed_toolchain_enabled(config: dict) -> bool:
193
193
  return True
194
194
 
195
195
 
196
+ def _detected_is_provisionable(command: str | None) -> bool:
197
+ """True when ``command``'s leading binary maps to a managed runtime.
198
+
199
+ Lets the resolver keep a detected command (e.g. ``npm test``) whose runtime
200
+ is missing from the host PATH but which the managed toolchain can download,
201
+ instead of discarding it and deferring the run.
202
+ """
203
+ from refactor_core.host_toolchain import binary_to_runtime
204
+
205
+ binary = _leading_binary(command)
206
+ if not binary:
207
+ return False
208
+ return binary_to_runtime(binary) is not None
209
+
210
+
196
211
  def _provision_toolchain(
197
212
  project_root: Path,
198
213
  test_command: str | None,
@@ -396,13 +411,22 @@ def _resolve_cloud_test_command(
396
411
  "toolchain or update verification.tests.command."
397
412
  )
398
413
 
399
- # 2) Root-marker / monorepo detection: only usable if runnable on the host.
414
+ # 2) Root-marker / monorepo detection. Usable if runnable on the host OR if
415
+ # its runtime can be provisioned by the managed toolchain (the caller then
416
+ # downloads it before the baseline). Only when neither holds do we fall
417
+ # through to server discovery, so we never lock onto a command that is
418
+ # truly un-runnable (e.g. a Tier-3 binary with no managed runtime).
400
419
  detected = resolve_test_command(project_root, config) or discover_test_command(project_root)
401
420
  if detected:
402
421
  if _client_preflight_command(project_root, detected):
403
422
  return detected, f"auto-detected test command: {detected}"
404
- # Detected but not runnable on the host -> fall through to server
405
- # discovery rather than committing to an un-runnable command.
423
+ if _managed_toolchain_enabled(config) and _detected_is_provisionable(detected):
424
+ return detected, (
425
+ f"auto-detected test command: {detected} "
426
+ "(runtime not on host PATH; will provision a managed toolchain)"
427
+ )
428
+ # Detected but neither runnable nor provisionable -> fall through to
429
+ # server discovery rather than committing to an un-runnable command.
406
430
  detected_note = (
407
431
  f"auto-detected test command '{detected}' but its toolchain was not "
408
432
  "found on the host PATH; trying server discovery."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: refactorai-cli
3
- Version: 0.3.9
3
+ Version: 0.3.10
4
4
  Summary: Local-first CLI for the refactor platform
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown