refactorai-cli 0.2.21__tar.gz → 0.2.22__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 (32) hide show
  1. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/PKG-INFO +2 -2
  2. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/README.md +1 -1
  3. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/pyproject.toml +1 -1
  4. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/__init__.py +1 -1
  5. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/commands/run_cmds.py +20 -3
  6. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli.egg-info/PKG-INFO +2 -2
  7. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/auth.py +0 -0
  8. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/client.py +0 -0
  9. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/commands/__init__.py +0 -0
  10. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/commands/auth_cmds.py +0 -0
  11. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/commands/engine_cmds.py +0 -0
  12. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/commands/model_cmds.py +0 -0
  13. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/commands/rules_cmds.py +0 -0
  14. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/commands/runtime_cmds.py +0 -0
  15. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/commands/runtime_proxy_cmds.py +0 -0
  16. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/commands/setup_cmds.py +0 -0
  17. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/control_plane.py +0 -0
  18. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/credentials.py +0 -0
  19. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/local_constitution.py +0 -0
  20. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/local_engine_runtime.py +0 -0
  21. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/local_paths.py +0 -0
  22. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/main.py +0 -0
  23. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/model_policy.py +0 -0
  24. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/runtime_manager.py +0 -0
  25. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/settings.py +0 -0
  26. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli/setup_flow.py +0 -0
  27. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli.egg-info/SOURCES.txt +0 -0
  28. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli.egg-info/dependency_links.txt +0 -0
  29. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli.egg-info/entry_points.txt +0 -0
  30. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli.egg-info/requires.txt +0 -0
  31. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/refactorai_cli.egg-info/top_level.txt +0 -0
  32. {refactorai_cli-0.2.21 → refactorai_cli-0.2.22}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: refactorai-cli
3
- Version: 0.2.21
3
+ Version: 0.2.22
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.21-py3-none-any.whl
56
+ python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.22-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.21-py3-none-any.whl
45
+ python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.22-py3-none-any.whl
46
46
  refactor --version
47
47
  ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "refactorai-cli"
3
- version = "0.2.21"
3
+ version = "0.2.22"
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.2.21"
8
+ __version__ = "0.2.22"
@@ -73,6 +73,7 @@ from refactor_core.pipeline import build_refactor_prompt, build_review_prompt
73
73
  from refactor_core.providers import get_provider, resolve_provider_name, supported_providers
74
74
  from refactor_core.rules import annotate_documents_with_rules, filter_documents_by_rules
75
75
  from refactor_core.security import merge_refactor_findings, suppress_findings_for_rr
76
+ from refactor_core.security.semgrep_runner import EMBEDDED_SEMGREP_SENTINEL
76
77
  from refactor_core.security.suppression import SecuritySuppression
77
78
  from refactor_core.sandbox_runtime import (
78
79
  DEFAULT_IMAGE as SANDBOX_DEFAULT_IMAGE,
@@ -716,13 +717,29 @@ def _resolve_runtime_semgrep_binary() -> str:
716
717
  return ""
717
718
 
718
719
 
720
+ def _active_runtime_version() -> str:
721
+ try:
722
+ status = runtime_status()
723
+ except Exception:
724
+ return ""
725
+ return str(status.get("active_version") or "").strip()
726
+
727
+
719
728
  def _inject_runtime_scanner_settings(constitution) -> None:
720
729
  settings = dict(getattr(constitution, "settings", {}) or {})
721
730
  if not bool(settings.get("security_scanner_enabled", False)):
722
731
  constitution.settings = settings
723
732
  return
733
+ active_version = _active_runtime_version()
734
+ scanner_path = _resolve_runtime_semgrep_binary()
724
735
  settings["security_scan_require_runtime_binary"] = True
725
- settings["security_scan_binary"] = _resolve_runtime_semgrep_binary()
736
+ if scanner_path:
737
+ settings["security_scan_binary"] = scanner_path
738
+ elif active_version:
739
+ # Runtime artifact can include semgrep as an embedded python module.
740
+ settings["security_scan_binary"] = EMBEDDED_SEMGREP_SENTINEL
741
+ else:
742
+ settings["security_scan_binary"] = ""
726
743
  constitution.settings = settings
727
744
 
728
745
 
@@ -742,8 +759,8 @@ def _report_runtime_scanner_status() -> None:
742
759
  return
743
760
  if active:
744
761
  console.print(
745
- "[yellow]security scanner[/yellow]: runtime active but scanner binary missing "
746
- f"[dim](runtime={active})[/dim]"
762
+ "[green]security scanner[/green]: ready "
763
+ f"[dim](runtime={active}, embedded in runtime artifact)[/dim]"
747
764
  )
748
765
  return
749
766
  console.print(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: refactorai-cli
3
- Version: 0.2.21
3
+ Version: 0.2.22
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.21-py3-none-any.whl
56
+ python -m pip install ./refactorai-cli/dist/refactorai_cli-0.2.22-py3-none-any.whl
57
57
  refactor --version
58
58
  ```