refactorai-cli 0.4.2__tar.gz → 0.4.3__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.
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/PKG-INFO +2 -2
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/pyproject.toml +2 -2
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/__init__.py +1 -1
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/runtime_proxy_cmds.py +33 -6
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli.egg-info/PKG-INFO +2 -2
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli.egg-info/requires.txt +1 -1
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/README.md +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/auth.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/client.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/cloud_rr.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/__init__.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/account_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/auth_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/cloud_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/engine_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/hook_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/model_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/rules_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/run_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/runtime_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/setup_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/toolchains_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commands/watch_cmds.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/commit_queue.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/control_plane.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/credentials.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/dotenv_loader.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/git_scope.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/local_constitution.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/local_engine_runtime.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/local_paths.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/main.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/model_policy.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/review_runner.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/runtime_manager.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/settings.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/setup_flow.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli/watch_state.py +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli.egg-info/SOURCES.txt +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli.egg-info/dependency_links.txt +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli.egg-info/entry_points.txt +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/refactorai_cli.egg-info/top_level.txt +0 -0
- {refactorai_cli-0.4.2 → refactorai_cli-0.4.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: refactorai-cli
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Local-first CLI for the refactor platform
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -8,7 +8,7 @@ Requires-Dist: typer>=0.12.0
|
|
|
8
8
|
Requires-Dist: httpx>=0.27.0
|
|
9
9
|
Requires-Dist: rich>=13.7.0
|
|
10
10
|
Requires-Dist: PyYAML>=6.0.1
|
|
11
|
-
Requires-Dist: refactorai-core>=3.2.
|
|
11
|
+
Requires-Dist: refactorai-core>=3.2.2
|
|
12
12
|
|
|
13
13
|
# refactorai-cli
|
|
14
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "refactorai-cli"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.3"
|
|
4
4
|
description = "Local-first CLI for the refactor platform"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -12,7 +12,7 @@ dependencies = [
|
|
|
12
12
|
"httpx>=0.27.0",
|
|
13
13
|
"rich>=13.7.0",
|
|
14
14
|
"PyYAML>=6.0.1",
|
|
15
|
-
"refactorai-core>=3.2.
|
|
15
|
+
"refactorai-core>=3.2.2",
|
|
16
16
|
]
|
|
17
17
|
|
|
18
18
|
[project.scripts]
|
|
@@ -68,22 +68,37 @@ def _active_runtime_artifact() -> Path:
|
|
|
68
68
|
return artifact
|
|
69
69
|
|
|
70
70
|
|
|
71
|
+
def _is_core_too_old(exc: ModuleNotFoundError) -> bool:
|
|
72
|
+
"""True when a missing module points at an outdated installed ``refactor_core``."""
|
|
73
|
+
return (exc.name or "").startswith("refactor_core")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def _print_core_too_old(exc: ModuleNotFoundError) -> None:
|
|
77
|
+
console.print(
|
|
78
|
+
"[red]Installed refactor core is too old for this CLI.[/red]\n"
|
|
79
|
+
f"Missing module: [bold]{exc.name}[/bold]\n"
|
|
80
|
+
"Please upgrade both packages:\n"
|
|
81
|
+
" pip install --upgrade refactorai-core refactorai-cli\n"
|
|
82
|
+
" (pipx: pipx upgrade refactorai-cli, or reinstall with the matching core)"
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
|
|
71
86
|
def _delegate_to_run_cmds(command_name: str, passthrough_args: list[str]) -> None:
|
|
72
87
|
"""Invoke the local ``run_cmds`` implementation for a cloud-mode command.
|
|
73
88
|
|
|
74
89
|
Builds a one-off Typer app around the target ``run_cmds`` function so the
|
|
75
90
|
real command signature (options, arguments, help) is honored without manual
|
|
76
91
|
argument parsing. Exit codes propagate to the caller.
|
|
92
|
+
|
|
93
|
+
Failures are always surfaced: a missing ``refactor_core.*`` module is a
|
|
94
|
+
version-skew signal (upgrade hint), and any other exception is printed rather
|
|
95
|
+
than collapsed into a silent non-zero exit.
|
|
77
96
|
"""
|
|
78
97
|
try:
|
|
79
98
|
from refactorai_cli.commands import run_cmds
|
|
80
99
|
except ModuleNotFoundError as exc:
|
|
81
|
-
if exc
|
|
82
|
-
|
|
83
|
-
"[red]Installed refactor core is too old for this CLI.[/red]\n"
|
|
84
|
-
"Please upgrade both packages:\n"
|
|
85
|
-
" pip install --upgrade refactorai-core refactorai-cli"
|
|
86
|
-
)
|
|
100
|
+
if _is_core_too_old(exc):
|
|
101
|
+
_print_core_too_old(exc)
|
|
87
102
|
raise typer.Exit(code=1) from exc
|
|
88
103
|
raise
|
|
89
104
|
|
|
@@ -111,7 +126,19 @@ def _delegate_to_run_cmds(command_name: str, passthrough_args: list[str]) -> Non
|
|
|
111
126
|
code = exc.code if isinstance(exc.code, int) else 0
|
|
112
127
|
if code:
|
|
113
128
|
raise typer.Exit(code=code) from exc
|
|
129
|
+
except ModuleNotFoundError as exc:
|
|
130
|
+
# A refactor_core submodule missing at call time (e.g. commit-scoped
|
|
131
|
+
# review importing refactor_core.intent) means the installed core predates
|
|
132
|
+
# this CLI. Surface an actionable upgrade hint instead of exiting silently.
|
|
133
|
+
if _is_core_too_old(exc):
|
|
134
|
+
_print_core_too_old(exc)
|
|
135
|
+
else:
|
|
136
|
+
console.print(f"[red]{command_name} failed:[/red] {exc}")
|
|
137
|
+
raise typer.Exit(code=1) from exc
|
|
114
138
|
except Exception as exc:
|
|
139
|
+
# Never fail silently: the underlying message is the only breadcrumb a
|
|
140
|
+
# developer (or the Refactor Terminal, which parses this output) gets.
|
|
141
|
+
console.print(f"[red]{command_name} failed:[/red] {exc}")
|
|
115
142
|
code = getattr(exc, "exit_code", 1) or 1
|
|
116
143
|
raise typer.Exit(code=code) from exc
|
|
117
144
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: refactorai-cli
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Local-first CLI for the refactor platform
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -8,7 +8,7 @@ Requires-Dist: typer>=0.12.0
|
|
|
8
8
|
Requires-Dist: httpx>=0.27.0
|
|
9
9
|
Requires-Dist: rich>=13.7.0
|
|
10
10
|
Requires-Dist: PyYAML>=6.0.1
|
|
11
|
-
Requires-Dist: refactorai-core>=3.2.
|
|
11
|
+
Requires-Dist: refactorai-core>=3.2.2
|
|
12
12
|
|
|
13
13
|
# refactorai-cli
|
|
14
14
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|