"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/
Python
Address review feedback: fix hardcoded paths, PATH logic, SQLite mode
yuhao56552ea522aa
diff --git a/chromadb/agent-harness/cli_anything/chromadb/tests/TEST.md b/chromadb/agent-harness/cli_anything/chromadb/tests/TEST.mdindex cee86908b..7eb502663 100644--- a/chromadb/agent-harness/cli_anything/chromadb/tests/TEST.md+++ b/chromadb/agent-harness/cli_anything/chromadb/tests/TEST.md@@ -63,11 +63,7 @@ Skipped:## Running Tests```bash-# Activate the CLI-Anything venv-source /Users/whitenoise-oc/projects/CLI-Anything/.venv/bin/activate--# Install the package in dev mode-cd /Users/whitenoise-oc/projects/cli-anything-chromadb/agent-harness+cd agent-harnesspip install -e .# Run all testsdiff --git a/pm2/agent-harness/cli_anything/pm2/tests/TEST.md b/pm2/agent-harness/cli_anything/pm2/tests/TEST.mdindex d48801f8f..d15a49d95 100644--- a/pm2/agent-harness/cli_anything/pm2/tests/TEST.md+++ b/pm2/agent-harness/cli_anything/pm2/tests/TEST.md@@ -12,9 +12,8 @@ Test suites for the PM2 CLI-Anything harness.## Running Tests```bash-# Activate the CLI-Anything venv-source /Users/whitenoise-oc/projects/CLI-Anything/.venv/bin/activate-cd /Users/whitenoise-oc/projects/cli-anything-pm2/agent-harness+cd agent-harness+pip install -e .# All testspython -m pytest cli_anything/pm2/tests/ -vdiff --git a/pm2/agent-harness/cli_anything/pm2/utils/pm2_backend.py b/pm2/agent-harness/cli_anything/pm2/utils/pm2_backend.pyindex 0529b8a5b..2e0e8df03 100644--- a/pm2/agent-harness/cli_anything/pm2/utils/pm2_backend.py+++ b/pm2/agent-harness/cli_anything/pm2/utils/pm2_backend.py@@ -10,6 +10,18 @@ import shutilimport subprocessfrom typing import Any+# Common directories where pm2 may be installed (Homebrew, global npm, system).+_EXTRA_PATH_DIRS = ["/opt/homebrew/bin", "/usr/local/bin", "/usr/bin"]+++def _augmented_path(base_path: str | None = None) -> str:+ """Return PATH string with _EXTRA_PATH_DIRS prepended if missing."""+ path = base_path if base_path is not None else os.environ.get("PATH", "")+ for p in _EXTRA_PATH_DIRS:+ if p not in path:+ path = f"{p}:{path}"+ return path+def _find_pm2() -> str:"""Locate the pm2 binary on the system.@@ -22,13 +34,7 @@ def _find_pm2() -> str:Raises:RuntimeError: If pm2 is not found."""- extra_paths = ["/opt/homebrew/bin", "/usr/local/bin", "/usr/bin"]- env_path = os.environ.get("PATH", "")- for p in extra_paths:- if p not in env_path:- env_path = f"{p}:{env_path}"-- pm2_path = shutil.which("pm2", path=env_path)+ pm2_path = shutil.which("pm2", path=_augmented_path())if pm2_path is None:raise RuntimeError("pm2 not found on this system. "@@ -52,9 +58,7 @@ def _get_pm2() -> str:def _build_env() -> dict[str, str]:"""Build environment dict with proper PATH for subprocess."""env = os.environ.copy()- extra = "/opt/homebrew/bin:/usr/local/bin"- if extra not in env.get("PATH", ""):- env["PATH"] = f"{extra}:{env.get('PATH', '')}"+ env["PATH"] = _augmented_path(env.get("PATH", ""))return envdiff --git a/registry.json b/registry.jsonindex 68c40d207..9634d193d 100644--- a/registry.json+++ b/registry.json@@ -538,4 +538,4 @@"contributor_url": "https://github.com/omerarslan0"}]-}\ No newline at end of file+}diff --git a/seaclip/agent-harness/SEACLIP.md b/seaclip/agent-harness/SEACLIP.mdindex 5b84e0664..4e6ddf552 100644--- a/seaclip/agent-harness/SEACLIP.md+++ b/seaclip/agent-harness/SEACLIP.md@@ -30,7 +30,7 @@ or undo/redo stack.## Backend- **FastAPI** at `http://127.0.0.1:5200`-- **SQLite** at `/Users/whitenoise-oc/shrirama/seaclip-lite/seaclip.db`+- **SQLite** at the path specified by the `SEACLIP_DB` environment variable## Install@@ -120,7 +120,7 @@ cli-anything-seaclip```bashcd agent-harness-source /Users/whitenoise-oc/projects/CLI-Anything/.venv/bin/activate+pip install -e .python -m pytest cli_anything/seaclip/tests/ -v```diff --git a/seaclip/agent-harness/cli_anything/seaclip/tests/TEST.md b/seaclip/agent-harness/cli_anything/seaclip/tests/TEST.mdindex 3ae958e1b..21e87ad96 100644--- a/seaclip/agent-harness/cli_anything/seaclip/tests/TEST.md+++ b/seaclip/agent-harness/cli_anything/seaclip/tests/TEST.md@@ -69,7 +69,6 @@ Tests requiring the live backend are skipped gracefully if localhost:5200 is unr```============================= test session starts ==============================platform darwin -- Python 3.14.3, pytest-9.0.2, pluggy-1.6.0-rootdir: /Users/whitenoise-oc/projects/cli-anything-seaclip/agent-harnesstest_core.py 25 passedtest_full_e2e.py 10 passeddiff --git a/seaclip/agent-harness/cli_anything/seaclip/utils/seaclip_backend.py b/seaclip/agent-harness/cli_anything/seaclip/utils/seaclip_backend.pyindex f31d050dd..a7bf82de4 100644--- a/seaclip/agent-harness/cli_anything/seaclip/utils/seaclip_backend.py+++ b/seaclip/agent-harness/cli_anything/seaclip/utils/seaclip_backend.py@@ -96,7 +96,7 @@ class SeaClipBackend:"SEACLIP_DB environment variable is required for direct database queries. ""Set it to the path of your SeaClip-Lite seaclip.db file.")- conn = sqlite3.connect(self.db_path)+ conn = sqlite3.connect(f"file:{self.db_path}?mode=ro", uri=True)conn.row_factory = sqlite3.Rowtry:rows = conn.execute(sql, params).fetchall()