@kmlckj/licos-ai-cli 0.0.54 → 0.0.55

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.
@@ -4,7 +4,7 @@ version = "0.1.0"
4
4
  description = "LICOS LangGraph agent project"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
7
- "licos-agent-runtime>=0.2.15",
7
+ "licos-agent-runtime>=0.2.15",
8
8
  "licos-dev-sdk>=0.2.2",
9
9
  ]
10
10
 
@@ -26,4 +26,9 @@ cd "$PROJECT_DIR"
26
26
  export LICOS_PROJECT_PATH="$PROJECT_DIR"
27
27
  export AGENT_PROJECT_TYPE="${AGENT_PROJECT_TYPE:-AGENT}"
28
28
 
29
- exec python -m licos_agent_runtime --mode http --host "$HOST" --port "$PORT"
29
+ PYTHON_BIN="${PYTHON_BIN:-python}"
30
+ if [ -x "$PROJECT_DIR/.venv/bin/python" ]; then
31
+ PYTHON_BIN="$PROJECT_DIR/.venv/bin/python"
32
+ fi
33
+
34
+ exec "$PYTHON_BIN" -m licos_agent_runtime --mode http --host "$HOST" --port "$PORT"
@@ -24,10 +24,44 @@ if [ -n "${PIP_TARGET:-}" ]; then
24
24
  PIP_ARGS+=(--target "$PIP_TARGET")
25
25
  fi
26
26
 
27
+ install_pyproject_dependencies_with_pip() {
28
+ local deps_file
29
+ deps_file="$(mktemp)"
30
+ python - "$deps_file" <<'PY'
31
+ import sys
32
+ import tomllib
33
+ from pathlib import Path
34
+
35
+ deps_path = Path(sys.argv[1])
36
+ data = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))
37
+ dependencies = data.get("project", {}).get("dependencies", [])
38
+ lines = []
39
+ if isinstance(dependencies, list):
40
+ lines = [
41
+ item.strip()
42
+ for item in dependencies
43
+ if isinstance(item, str) and item.strip()
44
+ ]
45
+ deps_path.write_text("\n".join(lines) + ("\n" if lines else ""), encoding="utf-8")
46
+ PY
47
+
48
+ if [ -s "$deps_file" ]; then
49
+ echo "[setup] Pip mode: installing dependencies from pyproject.toml"
50
+ local status=0
51
+ python -m pip install "${PIP_ARGS[@]}" -r "$deps_file" || status=$?
52
+ rm -f "$deps_file"
53
+ return "$status"
54
+ else
55
+ echo "[setup] pyproject.toml has no project.dependencies, skipping install"
56
+ fi
57
+ rm -f "$deps_file"
58
+ }
59
+
27
60
  if command -v uv >/dev/null 2>&1 && [ -f "pyproject.toml" ]; then
28
61
  if [ -n "${PIP_TARGET:-}" ]; then
29
62
  echo "[setup] Deploy mode (uv): installing to PIP_TARGET=$PIP_TARGET"
30
- uv export --frozen --no-hashes --no-dev | uv pip install --no-cache --target "$PIP_TARGET" -r -
63
+ uv export --frozen --no-hashes --no-dev | uv pip install --no-cache --target "$PIP_TARGET" -r - \
64
+ || install_pyproject_dependencies_with_pip
31
65
  else
32
66
  echo "[setup] Dev mode (uv): syncing .venv"
33
67
  if [ -f "uv.lock" ]; then
@@ -36,6 +70,8 @@ if command -v uv >/dev/null 2>&1 && [ -f "pyproject.toml" ]; then
36
70
  uv sync
37
71
  fi
38
72
  fi
73
+ elif [ -f "pyproject.toml" ]; then
74
+ install_pyproject_dependencies_with_pip
39
75
  elif [ -f "requirements.txt" ]; then
40
76
  echo "[setup] Fallback mode (pip): installing from requirements.txt"
41
77
  python -m pip install "${PIP_ARGS[@]}" -r requirements.txt
@@ -4,7 +4,7 @@ version = "0.1.0"
4
4
  description = "LICOS LangGraph workflow project"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
7
- "licos-agent-runtime>=0.2.15",
7
+ "licos-agent-runtime>=0.2.15",
8
8
  "licos-dev-sdk>=0.2.2",
9
9
  ]
10
10
 
@@ -26,4 +26,9 @@ cd "$PROJECT_DIR"
26
26
  export LICOS_PROJECT_PATH="$PROJECT_DIR"
27
27
  export AGENT_PROJECT_TYPE="${AGENT_PROJECT_TYPE:-WORKFLOW}"
28
28
 
29
- exec python -m licos_agent_runtime --mode http --host "$HOST" --port "$PORT"
29
+ PYTHON_BIN="${PYTHON_BIN:-python}"
30
+ if [ -x "$PROJECT_DIR/.venv/bin/python" ]; then
31
+ PYTHON_BIN="$PROJECT_DIR/.venv/bin/python"
32
+ fi
33
+
34
+ exec "$PYTHON_BIN" -m licos_agent_runtime --mode http --host "$HOST" --port "$PORT"
@@ -24,10 +24,44 @@ if [ -n "${PIP_TARGET:-}" ]; then
24
24
  PIP_ARGS+=(--target "$PIP_TARGET")
25
25
  fi
26
26
 
27
+ install_pyproject_dependencies_with_pip() {
28
+ local deps_file
29
+ deps_file="$(mktemp)"
30
+ python - "$deps_file" <<'PY'
31
+ import sys
32
+ import tomllib
33
+ from pathlib import Path
34
+
35
+ deps_path = Path(sys.argv[1])
36
+ data = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))
37
+ dependencies = data.get("project", {}).get("dependencies", [])
38
+ lines = []
39
+ if isinstance(dependencies, list):
40
+ lines = [
41
+ item.strip()
42
+ for item in dependencies
43
+ if isinstance(item, str) and item.strip()
44
+ ]
45
+ deps_path.write_text("\n".join(lines) + ("\n" if lines else ""), encoding="utf-8")
46
+ PY
47
+
48
+ if [ -s "$deps_file" ]; then
49
+ echo "[setup] Pip mode: installing dependencies from pyproject.toml"
50
+ local status=0
51
+ python -m pip install "${PIP_ARGS[@]}" -r "$deps_file" || status=$?
52
+ rm -f "$deps_file"
53
+ return "$status"
54
+ else
55
+ echo "[setup] pyproject.toml has no project.dependencies, skipping install"
56
+ fi
57
+ rm -f "$deps_file"
58
+ }
59
+
27
60
  if command -v uv >/dev/null 2>&1 && [ -f "pyproject.toml" ]; then
28
61
  if [ -n "${PIP_TARGET:-}" ]; then
29
62
  echo "[setup] Deploy mode (uv): installing to PIP_TARGET=$PIP_TARGET"
30
- uv export --frozen --no-hashes --no-dev | uv pip install --no-cache --target "$PIP_TARGET" -r -
63
+ uv export --frozen --no-hashes --no-dev | uv pip install --no-cache --target "$PIP_TARGET" -r - \
64
+ || install_pyproject_dependencies_with_pip
31
65
  else
32
66
  echo "[setup] Dev mode (uv): syncing .venv"
33
67
  if [ -f "uv.lock" ]; then
@@ -36,6 +70,8 @@ if command -v uv >/dev/null 2>&1 && [ -f "pyproject.toml" ]; then
36
70
  uv sync
37
71
  fi
38
72
  fi
73
+ elif [ -f "pyproject.toml" ]; then
74
+ install_pyproject_dependencies_with_pip
39
75
  elif [ -f "requirements.txt" ]; then
40
76
  echo "[setup] Fallback mode (pip): installing from requirements.txt"
41
77
  python -m pip install "${PIP_ARGS[@]}" -r requirements.txt
package/lib/cli.js CHANGED
@@ -2109,7 +2109,7 @@ const EventBuilder = {
2109
2109
  };
2110
2110
 
2111
2111
  var name = "@kmlckj/licos-ai-cli";
2112
- var version = "0.0.52";
2112
+ var version = "0.0.55";
2113
2113
  var description = "LICOS AI coding workspace CLI - project template engine and dev tools";
2114
2114
  var license = "MIT";
2115
2115
  var author = "kmlckj";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmlckj/licos-ai-cli",
3
- "version": "0.0.54",
3
+ "version": "0.0.55",
4
4
  "description": "LICOS AI coding workspace CLI - project template engine and dev tools",
5
5
  "license": "MIT",
6
6
  "author": "kmlckj",