refactorai-cli 0.2.11__tar.gz → 0.2.13__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.2.11 → refactorai_cli-0.2.13}/PKG-INFO +2 -2
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/README.md +1 -1
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/pyproject.toml +1 -1
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/__init__.py +1 -1
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/run_cmds.py +27 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/runtime_manager.py +16 -2
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli.egg-info/PKG-INFO +2 -2
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/auth.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/client.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/__init__.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/auth_cmds.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/engine_cmds.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/model_cmds.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/rules_cmds.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/runtime_cmds.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/runtime_proxy_cmds.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/setup_cmds.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/control_plane.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/credentials.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/local_constitution.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/local_engine_runtime.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/local_paths.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/main.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/model_policy.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/settings.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/setup_flow.py +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli.egg-info/SOURCES.txt +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli.egg-info/dependency_links.txt +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli.egg-info/entry_points.txt +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli.egg-info/requires.txt +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli.egg-info/top_level.txt +0 -0
- {refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: refactorai-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: Local-first CLI for the refactor platform
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -53,6 +53,6 @@ python -m twine upload ./refactorai-cli/dist/*
|
|
|
53
53
|
## Install test (local)
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.
|
|
56
|
+
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.12-py3-none-any.whl
|
|
57
57
|
refactor --version
|
|
58
58
|
```
|
|
@@ -42,6 +42,6 @@ python -m twine upload ./refactorai-cli/dist/*
|
|
|
42
42
|
## Install test (local)
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.
|
|
45
|
+
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.12-py3-none-any.whl
|
|
46
46
|
refactor --version
|
|
47
47
|
```
|
|
@@ -1202,6 +1202,7 @@ def _ensure_sandbox_ready(
|
|
|
1202
1202
|
stage: str,
|
|
1203
1203
|
auto_approve_install: bool = False,
|
|
1204
1204
|
no_install: bool = False,
|
|
1205
|
+
continue_on_preflight_failure: bool = False,
|
|
1205
1206
|
) -> dict | None:
|
|
1206
1207
|
"""Ensure sandbox lifecycle + preflight for stage execution."""
|
|
1207
1208
|
sandbox_cfg = _sandbox_settings(project_config)
|
|
@@ -1244,6 +1245,18 @@ def _ensure_sandbox_ready(
|
|
|
1244
1245
|
workdir=str(state.get("workdir") or workdir),
|
|
1245
1246
|
)
|
|
1246
1247
|
if not preflight_ok:
|
|
1248
|
+
if continue_on_preflight_failure:
|
|
1249
|
+
console.print(
|
|
1250
|
+
f"[yellow]{stage}: preflight issue recorded (continuing review):[/yellow] {preflight_msg}"
|
|
1251
|
+
)
|
|
1252
|
+
return {
|
|
1253
|
+
"ephemeral": ephemeral,
|
|
1254
|
+
"runtime": resolved_runtime,
|
|
1255
|
+
"container_name": state.get("container_name", ""),
|
|
1256
|
+
"workdir": str(state.get("workdir") or workdir),
|
|
1257
|
+
"stage": stage,
|
|
1258
|
+
"preflight_warning": preflight_msg,
|
|
1259
|
+
}
|
|
1247
1260
|
console.print(f"[red]{stage}: {preflight_msg}[/red]")
|
|
1248
1261
|
raise typer.Exit(code=1)
|
|
1249
1262
|
console.print(f"[green]{stage}: {preflight_msg}[/green]")
|
|
@@ -1438,6 +1451,7 @@ def review(
|
|
|
1438
1451
|
stage="review",
|
|
1439
1452
|
auto_approve_install=False,
|
|
1440
1453
|
no_install=False,
|
|
1454
|
+
continue_on_preflight_failure=True,
|
|
1441
1455
|
)
|
|
1442
1456
|
if cloud:
|
|
1443
1457
|
artifact = _cloud_inference(
|
|
@@ -1466,6 +1480,19 @@ def review(
|
|
|
1466
1480
|
progress_cb=progress_cb,
|
|
1467
1481
|
step_limit_cb=_step_limit_prompt("review"),
|
|
1468
1482
|
)
|
|
1483
|
+
preflight_warning = ""
|
|
1484
|
+
if isinstance(sandbox_ctx, dict):
|
|
1485
|
+
preflight_warning = str(sandbox_ctx.get("preflight_warning") or "").strip()
|
|
1486
|
+
if preflight_warning:
|
|
1487
|
+
artifact.notes.append(
|
|
1488
|
+
"Sandbox preflight issue: "
|
|
1489
|
+
+ preflight_warning
|
|
1490
|
+
+ " Review proceeded, but toolchain setup should be fixed for reliable verification/code runs."
|
|
1491
|
+
)
|
|
1492
|
+
console.print(
|
|
1493
|
+
"[yellow]review note:[/yellow] sandbox preflight issue detected. "
|
|
1494
|
+
"Review continued; address sandbox install/toolchain incompatibilities for best results."
|
|
1495
|
+
)
|
|
1469
1496
|
except Exception as exc: # provider/transport errors should not crash the CLI
|
|
1470
1497
|
console.print(f"[red]Review failed:[/red] {exc}")
|
|
1471
1498
|
raise typer.Exit(code=1) from exc
|
|
@@ -14,6 +14,7 @@ import platform
|
|
|
14
14
|
from dataclasses import dataclass
|
|
15
15
|
from datetime import datetime, timezone
|
|
16
16
|
from pathlib import Path
|
|
17
|
+
from urllib.parse import urlparse
|
|
17
18
|
|
|
18
19
|
import httpx
|
|
19
20
|
|
|
@@ -153,9 +154,11 @@ def resolve_runtime_manifest(*, channel: str = "stable", timeout: float = 20.0)
|
|
|
153
154
|
|
|
154
155
|
|
|
155
156
|
def download_artifact(url: str, *, timeout: float = 60.0) -> bytes:
|
|
156
|
-
|
|
157
|
+
headers: dict[str, str] = {}
|
|
158
|
+
if _should_send_runtime_auth(url):
|
|
159
|
+
headers["Authorization"] = _runtime_auth_header()
|
|
157
160
|
try:
|
|
158
|
-
response = httpx.get(url, headers=
|
|
161
|
+
response = httpx.get(url, headers=headers, timeout=max(float(timeout), 300.0))
|
|
159
162
|
except httpx.HTTPError as exc:
|
|
160
163
|
raise RuntimeError(f"Could not download runtime artifact: {exc}") from exc
|
|
161
164
|
if response.status_code >= 400:
|
|
@@ -163,6 +166,17 @@ def download_artifact(url: str, *, timeout: float = 60.0) -> bytes:
|
|
|
163
166
|
return response.content
|
|
164
167
|
|
|
165
168
|
|
|
169
|
+
def _should_send_runtime_auth(url: str) -> bool:
|
|
170
|
+
try:
|
|
171
|
+
artifact_host = str(urlparse(url).netloc or "").strip().lower()
|
|
172
|
+
platform_host = str(urlparse(platform_url()).netloc or "").strip().lower()
|
|
173
|
+
except Exception:
|
|
174
|
+
return True
|
|
175
|
+
if not artifact_host or not platform_host:
|
|
176
|
+
return True
|
|
177
|
+
return artifact_host == platform_host
|
|
178
|
+
|
|
179
|
+
|
|
166
180
|
def _runtime_auth_header() -> str:
|
|
167
181
|
try:
|
|
168
182
|
lease = ensure_lease()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: refactorai-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: Local-first CLI for the refactor platform
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -53,6 +53,6 @@ python -m twine upload ./refactorai-cli/dist/*
|
|
|
53
53
|
## Install test (local)
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.
|
|
56
|
+
python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.12-py3-none-any.whl
|
|
57
57
|
refactor --version
|
|
58
58
|
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli/commands/runtime_proxy_cmds.py
RENAMED
|
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
|
{refactorai_cli-0.2.11 → refactorai_cli-0.2.13}/refactorai_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|