refactorai-cli 0.2.13__tar.gz → 0.2.14__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.13 → refactorai_cli-0.2.14}/PKG-INFO +1 -1
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/pyproject.toml +1 -1
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/__init__.py +1 -1
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/commands/run_cmds.py +38 -7
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli.egg-info/PKG-INFO +1 -1
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/README.md +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/auth.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/client.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/commands/__init__.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/commands/auth_cmds.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/commands/engine_cmds.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/commands/model_cmds.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/commands/rules_cmds.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/commands/runtime_cmds.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/commands/runtime_proxy_cmds.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/commands/setup_cmds.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/control_plane.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/credentials.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/local_constitution.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/local_engine_runtime.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/local_paths.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/main.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/model_policy.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/runtime_manager.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/settings.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli/setup_flow.py +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli.egg-info/SOURCES.txt +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli.egg-info/dependency_links.txt +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli.egg-info/entry_points.txt +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli.egg-info/requires.txt +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli.egg-info/top_level.txt +0 -0
- {refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/setup.cfg +0 -0
|
@@ -68,7 +68,9 @@ from refactor_core.sandbox_runtime import (
|
|
|
68
68
|
detect_installer_in_sandbox,
|
|
69
69
|
ensure_sandbox,
|
|
70
70
|
exec_in_container,
|
|
71
|
+
exec_in_container_stream,
|
|
71
72
|
exec_in_sandbox,
|
|
73
|
+
exec_in_sandbox_stream,
|
|
72
74
|
remove_sandbox_container,
|
|
73
75
|
sandbox_name,
|
|
74
76
|
resolve_runtime,
|
|
@@ -318,9 +320,14 @@ def _agent_progress_logger(
|
|
|
318
320
|
elif kind == "step_limit_reached":
|
|
319
321
|
_set_status(
|
|
320
322
|
f"[yellow]{stage}[/yellow] step limit reached "
|
|
321
|
-
f"({event.get('steps_used', 0)}/{event.get('max_steps', 0)})"
|
|
323
|
+
f"({event.get('steps_used', 0)}/{event.get('max_steps', 0)}); "
|
|
324
|
+
"awaiting your input [y/N]"
|
|
322
325
|
)
|
|
323
326
|
elif kind == "step_limit_extended":
|
|
327
|
+
_set_status(
|
|
328
|
+
f"[green]{stage}[/green] continuing with extended budget "
|
|
329
|
+
f"({event.get('old_max_steps', 0)} -> {event.get('new_max_steps', 0)})"
|
|
330
|
+
)
|
|
324
331
|
console.print(
|
|
325
332
|
f"[green]{stage}: continuing[/green] "
|
|
326
333
|
f"step budget {event.get('old_max_steps', 0)} -> {event.get('new_max_steps', 0)}"
|
|
@@ -500,7 +507,11 @@ def _step_limit_prompt(stage: str) -> Callable[[dict], bool]:
|
|
|
500
507
|
f"[yellow]{stage}: reached step limit ({steps_used}/{max_steps}).[/yellow] "
|
|
501
508
|
f"Increase by {extension} steps and continue?"
|
|
502
509
|
)
|
|
503
|
-
|
|
510
|
+
console.print(
|
|
511
|
+
"[dim]Input required: type 'y' then Enter to continue, "
|
|
512
|
+
"or press Enter (or type 'n') to stop.[/dim]"
|
|
513
|
+
)
|
|
514
|
+
raw = typer.prompt("Extend agent step budget and continue? [y/N]", default="N")
|
|
504
515
|
return raw.strip().lower() in {"y", "yes"}
|
|
505
516
|
|
|
506
517
|
return _ask
|
|
@@ -940,14 +951,31 @@ def _sandbox_preflight(
|
|
|
940
951
|
)
|
|
941
952
|
return command_exists_in_sandbox(project_root=project_root, binary=binary)
|
|
942
953
|
|
|
943
|
-
def _exec(command: str) -> tuple[bool, str]:
|
|
954
|
+
def _exec(command: str, *, stream_output: bool = False) -> tuple[bool, str]:
|
|
955
|
+
def _on_output(line: str) -> None:
|
|
956
|
+
console.print(f"[dim] {line}[/dim]")
|
|
957
|
+
|
|
944
958
|
if has_container_ctx:
|
|
959
|
+
if stream_output:
|
|
960
|
+
return exec_in_container_stream(
|
|
961
|
+
runtime=str(runtime),
|
|
962
|
+
container_name=str(container_name),
|
|
963
|
+
command=command,
|
|
964
|
+
workdir=resolved_workdir,
|
|
965
|
+
on_output=_on_output,
|
|
966
|
+
)
|
|
945
967
|
return exec_in_container(
|
|
946
968
|
runtime=str(runtime),
|
|
947
969
|
container_name=str(container_name),
|
|
948
970
|
command=command,
|
|
949
971
|
workdir=resolved_workdir,
|
|
950
972
|
)
|
|
973
|
+
if stream_output:
|
|
974
|
+
return exec_in_sandbox_stream(
|
|
975
|
+
project_root=project_root,
|
|
976
|
+
command=command,
|
|
977
|
+
on_output=_on_output,
|
|
978
|
+
)
|
|
951
979
|
return exec_in_sandbox(project_root=project_root, command=command)
|
|
952
980
|
|
|
953
981
|
def _detect_installer() -> str | None:
|
|
@@ -1107,8 +1135,10 @@ def _sandbox_preflight(
|
|
|
1107
1135
|
"plan": plan,
|
|
1108
1136
|
"results": [],
|
|
1109
1137
|
}
|
|
1110
|
-
|
|
1111
|
-
|
|
1138
|
+
total_steps = len(plan)
|
|
1139
|
+
for index, cmd in enumerate(plan, start=1):
|
|
1140
|
+
console.print(f"[cyan]Installing step {index}/{total_steps}[/cyan]: [dim]{cmd}[/dim]")
|
|
1141
|
+
ok, output = _exec(cmd, stream_output=True)
|
|
1112
1142
|
entry["results"].append({"command": cmd, "ok": ok, "output": (output or "")[:500]})
|
|
1113
1143
|
if not ok:
|
|
1114
1144
|
detail = output[:400] if output else "unknown error"
|
|
@@ -1126,6 +1156,7 @@ def _sandbox_preflight(
|
|
|
1126
1156
|
},
|
|
1127
1157
|
)
|
|
1128
1158
|
return False, f"Install command failed: `{cmd}` -> {detail}"
|
|
1159
|
+
console.print(f"[green]Install step {index}/{total_steps} completed.[/green]")
|
|
1129
1160
|
append_sandbox_install_history(project_root, entry)
|
|
1130
1161
|
|
|
1131
1162
|
if missing_binary and not _binary_exists(missing_binary):
|
|
@@ -1191,8 +1222,8 @@ def _sandbox_enabled(project_config) -> bool:
|
|
|
1191
1222
|
|
|
1192
1223
|
|
|
1193
1224
|
def _sandbox_lifecycle(project_config) -> str:
|
|
1194
|
-
lifecycle = str(_sandbox_settings(project_config).get("lifecycle", "
|
|
1195
|
-
return lifecycle if lifecycle in {"per_project", "per_run"} else "
|
|
1225
|
+
lifecycle = str(_sandbox_settings(project_config).get("lifecycle", "per_project") or "per_project").strip().lower()
|
|
1226
|
+
return lifecycle if lifecycle in {"per_project", "per_run"} else "per_project"
|
|
1196
1227
|
|
|
1197
1228
|
|
|
1198
1229
|
def _ensure_sandbox_ready(
|
|
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.13 → refactorai_cli-0.2.14}/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
|
|
File without changes
|
{refactorai_cli-0.2.13 → refactorai_cli-0.2.14}/refactorai_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|