@caddis/cli 0.4.112 → 0.4.113
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.
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +2 -2
- package/bundles/antigravity-plugin/scripts/oss_review.py +10 -5
- package/bundles/manifest.json +2 -2
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc
CHANGED
|
Binary file
|
|
@@ -775,15 +775,17 @@ def _kill_tree(proc) -> None:
|
|
|
775
775
|
proc.kill()
|
|
776
776
|
|
|
777
777
|
|
|
778
|
-
def _run_capped(argv: list[str], timeout: float, stdin_text: str | None = None
|
|
779
|
-
|
|
778
|
+
def _run_capped(argv: list[str], timeout: float, stdin_text: str | None = None,
|
|
779
|
+
cwd: str | None = None) -> tuple[int, str, str]:
|
|
780
|
+
"""Run `argv` in `cwd` (None: this process's cwd); (exit, stdout, stderr). stdin carries `stdin_text`, then
|
|
781
|
+
closes (closed at once when None).
|
|
780
782
|
On timeout kill the whole tree and raise TimeoutError: a killed caddis_spend must not leave agy running on."""
|
|
781
783
|
group = ({"creationflags": subprocess.CREATE_NEW_PROCESS_GROUP} if os.name == "nt"
|
|
782
784
|
else {"start_new_session": True})
|
|
783
785
|
env = {**os.environ, "CADDIS_HEADLESS": "1"}
|
|
784
786
|
stdin = subprocess.DEVNULL if stdin_text is None else subprocess.PIPE
|
|
785
787
|
proc = subprocess.Popen(argv, stdin=stdin, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
|
786
|
-
text=True, encoding="utf-8", errors="replace", env=env, **group)
|
|
788
|
+
text=True, encoding="utf-8", errors="replace", env=env, cwd=cwd, **group)
|
|
787
789
|
try:
|
|
788
790
|
stdout, stderr = proc.communicate(input=stdin_text, timeout=timeout)
|
|
789
791
|
except subprocess.TimeoutExpired:
|
|
@@ -824,15 +826,18 @@ def agy_stdin(prompt: str) -> str:
|
|
|
824
826
|
return json.dumps({"event": "user", "message": {"content": prompt}}) + "\n"
|
|
825
827
|
|
|
826
828
|
|
|
827
|
-
def call_agy(launcher: list[str], prompt: str, timeout: float = AGY_TIMEOUT_S, model: str = AGY_MODEL
|
|
829
|
+
def call_agy(launcher: list[str], prompt: str, timeout: float = AGY_TIMEOUT_S, model: str = AGY_MODEL,
|
|
830
|
+
cwd: str | None = None) -> str:
|
|
828
831
|
"""One review by agy Carbon (`model`) through `caddis_spend.py run` -> the reply text.
|
|
829
832
|
|
|
833
|
+
`cwd` roots the agy run there (None: this process's cwd).
|
|
834
|
+
|
|
830
835
|
The prompt goes on stdin (agy_stdin), never on the command line.
|
|
831
836
|
ProviderSkipped: caddis_spend refused (exit 75) or agy is missing.
|
|
832
837
|
ProviderFailure: a non-zero exit, a status other than SUCCESS (ERROR, RESOURCE_EXHAUSTED), no result
|
|
833
838
|
event, or an empty reply."""
|
|
834
839
|
argv = [*launcher, "--model", model, "--mode", "plan", *AGY_STREAM_FLAGS, "--print="]
|
|
835
|
-
code, stdout, stderr = _run_capped(argv, timeout, stdin_text=agy_stdin(prompt))
|
|
840
|
+
code, stdout, stderr = _run_capped(argv, timeout, stdin_text=agy_stdin(prompt), cwd=cwd)
|
|
836
841
|
if code in SPEND_REFUSED:
|
|
837
842
|
raise ProviderSkipped(f"caddis_spend refused the agy call (exit {code}): "
|
|
838
843
|
f"{stderr.strip()[-300:]}")
|
package/bundles/manifest.json
CHANGED
package/package.json
CHANGED