refactorai-cli 0.7.14__tar.gz → 0.7.16__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 (54) hide show
  1. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/PKG-INFO +1 -1
  2. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/pyproject.toml +1 -1
  3. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/__init__.py +1 -1
  4. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/run_cmds.py +18 -5
  5. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/runtime_proxy_cmds.py +49 -10
  6. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli.egg-info/PKG-INFO +1 -1
  7. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/README.md +0 -0
  8. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/auth.py +0 -0
  9. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/client.py +0 -0
  10. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/cloud_rr.py +0 -0
  11. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/__init__.py +0 -0
  12. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/account_cmds.py +0 -0
  13. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/auth_cmds.py +0 -0
  14. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/branch_cmds.py +0 -0
  15. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/cloud_cmds.py +0 -0
  16. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/engine_cmds.py +0 -0
  17. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/hook_cmds.py +0 -0
  18. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/model_cmds.py +0 -0
  19. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/policy_cmds.py +0 -0
  20. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/pre_push_cmds.py +0 -0
  21. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/request_cmds.py +0 -0
  22. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/rules_cmds.py +0 -0
  23. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/runtime_cmds.py +0 -0
  24. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/setup_cmds.py +0 -0
  25. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/toolchains_cmds.py +0 -0
  26. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/watch_cmds.py +0 -0
  27. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commands/workspace_cmds.py +0 -0
  28. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commit_queue.py +0 -0
  29. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/commit_telemetry.py +0 -0
  30. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/control_plane.py +0 -0
  31. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/credentials.py +0 -0
  32. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/dotenv_loader.py +0 -0
  33. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/git_scope.py +0 -0
  34. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/local_constitution.py +0 -0
  35. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/local_engine_runtime.py +0 -0
  36. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/local_paths.py +0 -0
  37. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/main.py +0 -0
  38. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/mode_sync.py +0 -0
  39. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/model_policy.py +0 -0
  40. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/pre_push_gate.py +0 -0
  41. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/refactor_branch_store.py +0 -0
  42. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/review_runner.py +0 -0
  43. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/runtime_manager.py +0 -0
  44. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/settings.py +0 -0
  45. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/setup_flow.py +0 -0
  46. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/watch_ledger.py +0 -0
  47. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/watch_state.py +0 -0
  48. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli/watch_supervisor.py +0 -0
  49. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli.egg-info/SOURCES.txt +0 -0
  50. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli.egg-info/dependency_links.txt +0 -0
  51. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli.egg-info/entry_points.txt +0 -0
  52. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli.egg-info/requires.txt +0 -0
  53. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/refactorai_cli.egg-info/top_level.txt +0 -0
  54. {refactorai_cli-0.7.14 → refactorai_cli-0.7.16}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: refactorai-cli
3
- Version: 0.7.14
3
+ Version: 0.7.16
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.7.14"
3
+ version = "0.7.16"
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.7.14"
8
+ __version__ = "0.7.16"
@@ -119,7 +119,6 @@ from refactor_core.execution_variant import (
119
119
  is_cloud_execution,
120
120
  platform_inference_mode,
121
121
  resolve_execution_variant,
122
- uses_platform_inference,
123
122
  verification_location,
124
123
  )
125
124
 
@@ -5116,8 +5115,11 @@ def _cloud_doctor(
5116
5115
  resolving/pinging a local provider.
5117
5116
  """
5118
5117
  console.print(f"[bold]project[/bold]: {project_root}")
5119
- console.print(f"[bold]mode[/bold]: {execution_mode}")
5118
+ # Clarify the two axes to avoid confusion for local_byok/local_managed:
5119
+ # - execution variant: user-facing mode contract
5120
+ # - platform inference mode: wire mode used for server inference endpoint
5120
5121
  console.print(f"[bold]execution variant[/bold]: {execution_variant}")
5122
+ console.print(f"[bold]platform inference mode[/bold]: {execution_mode}")
5121
5123
  _report_verification_environment(project_root, execution_variant, project_config)
5122
5124
  _report_store_binding(project_root)
5123
5125
 
@@ -5136,13 +5138,14 @@ def _cloud_doctor(
5136
5138
  credential_ref = ""
5137
5139
  provider_key = ""
5138
5140
  provider_name = ""
5141
+ mode_label = "local_byok" if execution_variant == "local_byok" else execution_mode
5139
5142
  if execution_mode == "cloud_byok":
5140
5143
  provider_name = str(constitution.get_setting("provider", "") or "").strip()
5141
5144
  provider_key = str(constitution.get_setting("provider_key", "") or "").strip()
5142
5145
  credential_ref = str(constitution.get_setting("credential_ref", "") or "").strip()
5143
5146
  if not provider_name or provider_name.lower() == "cloud":
5144
5147
  console.print(
5145
- "[red]cloud_byok[/red]: set an explicit `provider` "
5148
+ f"[red]{mode_label}[/red]: set an explicit `provider` "
5146
5149
  "(for example `provider: openai`)."
5147
5150
  )
5148
5151
  raise typer.Exit(code=1)
@@ -5156,7 +5159,7 @@ def _cloud_doctor(
5156
5159
  console.print(f"[green]credential_ref[/green]: {credential_ref}")
5157
5160
  else:
5158
5161
  console.print(
5159
- "[red]cloud_byok[/red]: set either `provider_key` (preferred) "
5162
+ f"[red]{mode_label}[/red]: set either `provider_key` (preferred) "
5160
5163
  "or `credential_ref` in refactor.config."
5161
5164
  )
5162
5165
  if dotenv is not None and not dotenv.found:
@@ -5341,7 +5344,17 @@ def doctor(
5341
5344
  _report_dotenv(dotenv, project_root)
5342
5345
 
5343
5346
  execution_variant = _execution_variant(constitution)
5344
- if uses_platform_inference(execution_variant):
5347
+ # Route by ENGINE LOCATION (docs/46), matching review/code dispatch. Every
5348
+ # server-engine variant (local_byok / local_managed / cloud_byok /
5349
+ # cloud_managed) runs its engine on the Refactor server, so it is diagnosed
5350
+ # via the platform path and must NEVER import engine-only modules -- those
5351
+ # ship in the private engine wheel and are absent from a public pip/pipx
5352
+ # install. Only the host-engine variants (local_heuristic / local_model)
5353
+ # fall through to the engine-backed local doctor below. Previously this
5354
+ # branched on ``uses_platform_inference`` (False for local_byok), which sent
5355
+ # local_byok down the local path and blew up importing
5356
+ # ``refactor_core.execution`` on a client-only install.
5357
+ if engine_is_remote(execution_variant):
5345
5358
  _cloud_doctor(
5346
5359
  project_root=project_root,
5347
5360
  constitution=constitution,
@@ -122,12 +122,50 @@ def _active_runtime_artifact() -> Path:
122
122
  return artifact
123
123
 
124
124
 
125
+ # Subpackages that ship ONLY in the private engine wheel (R21 core split) and are
126
+ # intentionally absent from a public pip/pipx install of ``refactorai-core``.
127
+ _ENGINE_ONLY_PREFIXES = (
128
+ "refactor_core.execution",
129
+ "refactor_core.providers",
130
+ "refactor_core.enginecore",
131
+ "refactor_core.codeintel",
132
+ )
133
+
134
+
135
+ def _is_engine_only_module(exc: ModuleNotFoundError) -> bool:
136
+ """True when the missing module is an engine-only subpackage (not version skew)."""
137
+ name = exc.name or ""
138
+ return any(name == p or name.startswith(p + ".") for p in _ENGINE_ONLY_PREFIXES)
139
+
140
+
125
141
  def _is_core_too_old(exc: ModuleNotFoundError) -> bool:
126
- """True when a missing module points at an outdated installed ``refactor_core``."""
127
- return (exc.name or "").startswith("refactor_core")
142
+ """True when a missing module points at an outdated installed ``refactor_core``.
143
+
144
+ Engine-only subpackages are excluded: their absence in a public install is by
145
+ design, not a version mismatch (see :func:`_print_missing_module`).
146
+ """
147
+ return (exc.name or "").startswith("refactor_core") and not _is_engine_only_module(exc)
128
148
 
129
149
 
130
- def _print_core_too_old(exc: ModuleNotFoundError) -> None:
150
+ def _print_missing_module(exc: ModuleNotFoundError) -> None:
151
+ """Print an actionable message for a missing ``refactor_core`` module.
152
+
153
+ Distinguishes two very different causes:
154
+ - engine-only module absent from a public install (a routing/mode issue), vs
155
+ - a genuinely outdated core (version skew -> upgrade).
156
+ """
157
+ if _is_engine_only_module(exc):
158
+ console.print(
159
+ "[red]This command needs the local engine, which is not part of the "
160
+ "public install.[/red]\n"
161
+ f"Missing engine module: [bold]{exc.name}[/bold]\n"
162
+ "Only local_heuristic / local_model run the engine on this machine "
163
+ "(via the runtime artifact). Server-engine modes (local_byok / "
164
+ "local_managed / cloud_byok / cloud_managed) should not reach this "
165
+ "path — check the project's execution mode in refactor.config or the "
166
+ "web UI, then rerun. If the mode is correct, this is a routing bug."
167
+ )
168
+ return
131
169
  console.print(
132
170
  "[red]Installed refactor core is too old for this CLI.[/red]\n"
133
171
  f"Missing module: [bold]{exc.name}[/bold]\n"
@@ -151,8 +189,8 @@ def _delegate_to_run_cmds(command_name: str, passthrough_args: list[str]) -> Non
151
189
  try:
152
190
  from refactorai_cli.commands import run_cmds
153
191
  except ModuleNotFoundError as exc:
154
- if _is_core_too_old(exc):
155
- _print_core_too_old(exc)
192
+ if (exc.name or "").startswith("refactor_core"):
193
+ _print_missing_module(exc)
156
194
  raise typer.Exit(code=1) from exc
157
195
  raise
158
196
 
@@ -181,11 +219,12 @@ def _delegate_to_run_cmds(command_name: str, passthrough_args: list[str]) -> Non
181
219
  if code:
182
220
  raise typer.Exit(code=code) from exc
183
221
  except ModuleNotFoundError as exc:
184
- # A refactor_core submodule missing at call time (e.g. commit-scoped
185
- # review importing refactor_core.intent) means the installed core predates
186
- # this CLI. Surface an actionable upgrade hint instead of exiting silently.
187
- if _is_core_too_old(exc):
188
- _print_core_too_old(exc)
222
+ # A refactor_core submodule missing at call time can mean two things:
223
+ # version skew (installed core predates this CLI) or an engine-only module
224
+ # reached on a client-only install (a routing/mode issue). Surface the
225
+ # right actionable hint instead of exiting silently.
226
+ if (exc.name or "").startswith("refactor_core"):
227
+ _print_missing_module(exc)
189
228
  else:
190
229
  console.print(f"[red]{command_name} failed:[/red] {exc}")
191
230
  raise typer.Exit(code=1) from exc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: refactorai-cli
3
- Version: 0.7.14
3
+ Version: 0.7.16
4
4
  Summary: Local-first CLI for the refactor platform
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown