@kmlckj/licos-ai-cli 0.0.52 → 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.
- package/lib/__templates__/agent/README.md +110 -110
- package/lib/__templates__/agent/pyproject.toml +2 -2
- package/lib/__templates__/agent/requirements.txt +1 -1
- package/lib/__templates__/agent/scripts/http_run.sh +6 -1
- package/lib/__templates__/agent/scripts/setup.sh +37 -1
- package/lib/__templates__/expo/pnpm-lock.yaml +4 -4
- package/lib/__templates__/expo/server/package.json +1 -1
- package/lib/__templates__/nextjs/package.json +1 -1
- package/lib/__templates__/nextjs/pnpm-lock.yaml +4 -4
- package/lib/__templates__/nuxt-vue/package.json +1 -1
- package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +4 -4
- package/lib/__templates__/taro/pnpm-lock.yaml +4 -4
- package/lib/__templates__/taro/server/package.json +1 -1
- package/lib/__templates__/vite/package.json +1 -1
- package/lib/__templates__/vite/pnpm-lock.yaml +4 -4
- package/lib/__templates__/workflow/pyproject.toml +2 -2
- package/lib/__templates__/workflow/requirements.txt +1 -1
- package/lib/__templates__/workflow/scripts/http_run.sh +6 -1
- package/lib/__templates__/workflow/scripts/setup.sh +37 -1
- package/lib/cli.js +1 -1
- package/package.json +1 -1
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
# <%= appName %>
|
|
2
|
-
|
|
3
|
-
LICOS 智能体项目模板,基于 Python、LangGraph、LangChain 和 `licos-agent-runtime`。
|
|
4
|
-
|
|
5
|
-
## 目录
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
.
|
|
9
|
-
├── .licos
|
|
10
|
-
├── config/
|
|
11
|
-
│ └── agent_llm_config.json
|
|
12
|
-
├── AGENTS.md
|
|
13
|
-
├── pyproject.toml
|
|
14
|
-
├── scripts/
|
|
15
|
-
└── src/
|
|
16
|
-
├── main.py
|
|
17
|
-
├── agents/
|
|
18
|
-
│ └── agent.py
|
|
19
|
-
└── tools/
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 本地运行
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
bash scripts/setup.sh
|
|
26
|
-
bash scripts/http_run.sh -p <%= port %>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## HTTP 接口
|
|
30
|
-
|
|
31
|
-
- `GET /health`
|
|
32
|
-
- `POST /run`
|
|
33
|
-
- `POST /stream_run`
|
|
34
|
-
- `GET /agent/config`
|
|
35
|
-
- `POST /v1/chat/completions`
|
|
36
|
-
|
|
37
|
-
`POST /run` 的 Body 是智能体状态输入,常用:
|
|
38
|
-
|
|
39
|
-
```json
|
|
40
|
-
{
|
|
41
|
-
"input": "请分析这个需求"
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
也可以传 OpenAI-style `messages`:
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"messages": [
|
|
50
|
-
{
|
|
51
|
-
"role": "user",
|
|
52
|
-
"content": "请分析这个需求"
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Body 可以同时带 `attachments`、`files`、`references` 等业务字段;运行时会作为图状态传入,具体解释由智能体项目代码决定。
|
|
59
|
-
|
|
60
|
-
`POST /stream_run` 支持 `input` / `messages`,也兼容平台 `content.query.prompt` 包装;文本和附件会归一成智能体图输入,`references` 等业务字段会保留并传给智能体图。`content.query.prompt` 内的 `upload_file` 会从已上传文件 URL 下载到项目附件目录,默认是 `/workspace/projects/assets`,并写入 `attachments` 和 `files`。
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"content": {
|
|
65
|
-
"query": {
|
|
66
|
-
"prompt": [
|
|
67
|
-
{
|
|
68
|
-
"type": "text",
|
|
69
|
-
"content": {
|
|
70
|
-
"text": "请结合附件分析需求"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "upload_file",
|
|
75
|
-
"content": {
|
|
76
|
-
"upload_file": {
|
|
77
|
-
"file_name": "spec.md",
|
|
78
|
-
"url": "https://files.example.com/spec.md?sign=xxx",
|
|
79
|
-
"mime_type": "text/markdown"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"references": [
|
|
87
|
-
{
|
|
88
|
-
"type": "file",
|
|
89
|
-
"path": "docs/spec.md"
|
|
90
|
-
}
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## 智能体配置
|
|
96
|
-
|
|
97
|
-
`config/agent_llm_config.json` 是平台预览读取智能体配置和工具列表的来源:
|
|
98
|
-
|
|
99
|
-
- `config`:模型、温度、超时、thinking 等运行参数;`model: "auto"` 表示使用平台默认模型
|
|
100
|
-
- `sp`:系统提示词
|
|
101
|
-
- `up`:用户提示补充
|
|
102
|
-
- `tools`:已配置工具名称列表,新增或删除工具时需要同步维护
|
|
103
|
-
|
|
104
|
-
## 项目上下文
|
|
105
|
-
|
|
106
|
-
项目内的 `AGENTS.md` 用于记录可由用户维护的项目上下文,例如业务目标、已实现工具和测试样例。新增工具时通常需要同步:
|
|
107
|
-
|
|
108
|
-
- `src/tools/*_tool.py`:工具实现
|
|
109
|
-
- `src/agents/agent.py`:导入并注册工具
|
|
110
|
-
- `config/agent_llm_config.json`:更新 `tools`,必要时更新 `sp` / `up`
|
|
1
|
+
# <%= appName %>
|
|
2
|
+
|
|
3
|
+
LICOS 智能体项目模板,基于 Python、LangGraph、LangChain 和 `licos-agent-runtime`。
|
|
4
|
+
|
|
5
|
+
## 目录
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
.
|
|
9
|
+
├── .licos
|
|
10
|
+
├── config/
|
|
11
|
+
│ └── agent_llm_config.json
|
|
12
|
+
├── AGENTS.md
|
|
13
|
+
├── pyproject.toml
|
|
14
|
+
├── scripts/
|
|
15
|
+
└── src/
|
|
16
|
+
├── main.py
|
|
17
|
+
├── agents/
|
|
18
|
+
│ └── agent.py
|
|
19
|
+
└── tools/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 本地运行
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
bash scripts/setup.sh
|
|
26
|
+
bash scripts/http_run.sh -p <%= port %>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## HTTP 接口
|
|
30
|
+
|
|
31
|
+
- `GET /health`
|
|
32
|
+
- `POST /run`
|
|
33
|
+
- `POST /stream_run`
|
|
34
|
+
- `GET /agent/config`
|
|
35
|
+
- `POST /v1/chat/completions`
|
|
36
|
+
|
|
37
|
+
`POST /run` 的 Body 是智能体状态输入,常用:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"input": "请分析这个需求"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
也可以传 OpenAI-style `messages`:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"messages": [
|
|
50
|
+
{
|
|
51
|
+
"role": "user",
|
|
52
|
+
"content": "请分析这个需求"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Body 可以同时带 `attachments`、`files`、`references` 等业务字段;运行时会作为图状态传入,具体解释由智能体项目代码决定。
|
|
59
|
+
|
|
60
|
+
`POST /stream_run` 支持 `input` / `messages`,也兼容平台 `content.query.prompt` 包装;文本和附件会归一成智能体图输入,`references` 等业务字段会保留并传给智能体图。`content.query.prompt` 内的 `upload_file` 会从已上传文件 URL 下载到项目附件目录,默认是 `/workspace/projects/assets`,并写入 `attachments` 和 `files`。
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"content": {
|
|
65
|
+
"query": {
|
|
66
|
+
"prompt": [
|
|
67
|
+
{
|
|
68
|
+
"type": "text",
|
|
69
|
+
"content": {
|
|
70
|
+
"text": "请结合附件分析需求"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "upload_file",
|
|
75
|
+
"content": {
|
|
76
|
+
"upload_file": {
|
|
77
|
+
"file_name": "spec.md",
|
|
78
|
+
"url": "https://files.example.com/spec.md?sign=xxx",
|
|
79
|
+
"mime_type": "text/markdown"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"references": [
|
|
87
|
+
{
|
|
88
|
+
"type": "file",
|
|
89
|
+
"path": "docs/spec.md"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 智能体配置
|
|
96
|
+
|
|
97
|
+
`config/agent_llm_config.json` 是平台预览读取智能体配置和工具列表的来源:
|
|
98
|
+
|
|
99
|
+
- `config`:模型、温度、超时、thinking 等运行参数;`model: "auto"` 表示使用平台默认模型
|
|
100
|
+
- `sp`:系统提示词
|
|
101
|
+
- `up`:用户提示补充
|
|
102
|
+
- `tools`:已配置工具名称列表,新增或删除工具时需要同步维护
|
|
103
|
+
|
|
104
|
+
## 项目上下文
|
|
105
|
+
|
|
106
|
+
项目内的 `AGENTS.md` 用于记录可由用户维护的项目上下文,例如业务目标、已实现工具和测试样例。新增工具时通常需要同步:
|
|
107
|
+
|
|
108
|
+
- `src/tools/*_tool.py`:工具实现
|
|
109
|
+
- `src/agents/agent.py`:导入并注册工具
|
|
110
|
+
- `config/agent_llm_config.json`:更新 `tools`,必要时更新 `sp` / `up`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
licos-agent-runtime>=0.2.
|
|
1
|
+
licos-agent-runtime>=0.2.15
|
|
@@ -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
|
-
|
|
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
|
|
@@ -263,8 +263,8 @@ importers:
|
|
|
263
263
|
server:
|
|
264
264
|
dependencies:
|
|
265
265
|
'@kmlckj/licos-dev-sdk':
|
|
266
|
-
specifier: 0.2.
|
|
267
|
-
version: 0.2.
|
|
266
|
+
specifier: 0.2.2
|
|
267
|
+
version: 0.2.2
|
|
268
268
|
'@kmlckj/licos-platform-sdk':
|
|
269
269
|
specifier: 0.6.5
|
|
270
270
|
version: 0.6.5
|
|
@@ -1324,7 +1324,7 @@ packages:
|
|
|
1324
1324
|
'@jridgewell/trace-mapping@0.3.31':
|
|
1325
1325
|
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
|
|
1326
1326
|
|
|
1327
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
1327
|
+
'@kmlckj/licos-dev-sdk@0.2.2':
|
|
1328
1328
|
resolution: {integrity: sha512-nH3jmE6yyoYfDMv7kspB0Kmie2s37lBv/Ihik074v4WLD1o1j0guc4ju+77FiXDjkllwZGRWYksoCIqhxz2cdA==}
|
|
1329
1329
|
|
|
1330
1330
|
'@kmlckj/licos-platform-sdk@0.6.5':
|
|
@@ -7568,7 +7568,7 @@ snapshots:
|
|
|
7568
7568
|
'@jridgewell/resolve-uri': 3.1.2
|
|
7569
7569
|
'@jridgewell/sourcemap-codec': 1.5.5
|
|
7570
7570
|
|
|
7571
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
7571
|
+
'@kmlckj/licos-dev-sdk@0.2.2': {}
|
|
7572
7572
|
|
|
7573
7573
|
'@kmlckj/licos-platform-sdk@0.6.5': {}
|
|
7574
7574
|
|
|
@@ -18,8 +18,8 @@ importers:
|
|
|
18
18
|
specifier: ^5.2.2
|
|
19
19
|
version: 5.2.2(react-hook-form@7.71.1(react@19.2.3))
|
|
20
20
|
'@kmlckj/licos-dev-sdk':
|
|
21
|
-
specifier: 0.2.
|
|
22
|
-
version: 0.2.
|
|
21
|
+
specifier: 0.2.2
|
|
22
|
+
version: 0.2.2
|
|
23
23
|
'@kmlckj/licos-platform-sdk':
|
|
24
24
|
specifier: 0.6.5
|
|
25
25
|
version: 0.6.5
|
|
@@ -1334,7 +1334,7 @@ packages:
|
|
|
1334
1334
|
'@jridgewell/trace-mapping@0.3.31':
|
|
1335
1335
|
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
|
|
1336
1336
|
|
|
1337
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
1337
|
+
'@kmlckj/licos-dev-sdk@0.2.2':
|
|
1338
1338
|
resolution: {integrity: sha512-nH3jmE6yyoYfDMv7kspB0Kmie2s37lBv/Ihik074v4WLD1o1j0guc4ju+77FiXDjkllwZGRWYksoCIqhxz2cdA==}
|
|
1339
1339
|
|
|
1340
1340
|
'@kmlckj/licos-platform-sdk@0.6.5':
|
|
@@ -7132,7 +7132,7 @@ snapshots:
|
|
|
7132
7132
|
'@jridgewell/resolve-uri': 3.1.2
|
|
7133
7133
|
'@jridgewell/sourcemap-codec': 1.5.5
|
|
7134
7134
|
|
|
7135
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
7135
|
+
'@kmlckj/licos-dev-sdk@0.2.2': {}
|
|
7136
7136
|
|
|
7137
7137
|
'@kmlckj/licos-platform-sdk@0.6.5': {}
|
|
7138
7138
|
|
|
@@ -13,8 +13,8 @@ importers:
|
|
|
13
13
|
.:
|
|
14
14
|
dependencies:
|
|
15
15
|
'@kmlckj/licos-dev-sdk':
|
|
16
|
-
specifier: 0.2.
|
|
17
|
-
version: 0.2.
|
|
16
|
+
specifier: 0.2.2
|
|
17
|
+
version: 0.2.2
|
|
18
18
|
'@kmlckj/licos-platform-sdk':
|
|
19
19
|
specifier: 0.6.5
|
|
20
20
|
version: 0.6.5
|
|
@@ -570,7 +570,7 @@ packages:
|
|
|
570
570
|
'@jridgewell/trace-mapping@0.3.31':
|
|
571
571
|
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
|
|
572
572
|
|
|
573
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
573
|
+
'@kmlckj/licos-dev-sdk@0.2.2':
|
|
574
574
|
resolution: {integrity: sha512-nH3jmE6yyoYfDMv7kspB0Kmie2s37lBv/Ihik074v4WLD1o1j0guc4ju+77FiXDjkllwZGRWYksoCIqhxz2cdA==}
|
|
575
575
|
|
|
576
576
|
'@kmlckj/licos-platform-sdk@0.6.5':
|
|
@@ -4475,7 +4475,7 @@ snapshots:
|
|
|
4475
4475
|
'@jridgewell/resolve-uri': 3.1.2
|
|
4476
4476
|
'@jridgewell/sourcemap-codec': 1.5.5
|
|
4477
4477
|
|
|
4478
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
4478
|
+
'@kmlckj/licos-dev-sdk@0.2.2': {}
|
|
4479
4479
|
|
|
4480
4480
|
'@kmlckj/licos-platform-sdk@0.6.5': {}
|
|
4481
4481
|
|
|
@@ -180,8 +180,8 @@ importers:
|
|
|
180
180
|
server:
|
|
181
181
|
dependencies:
|
|
182
182
|
'@kmlckj/licos-dev-sdk':
|
|
183
|
-
specifier: 0.2.
|
|
184
|
-
version: 0.2.
|
|
183
|
+
specifier: 0.2.2
|
|
184
|
+
version: 0.2.2
|
|
185
185
|
'@kmlckj/licos-platform-sdk':
|
|
186
186
|
specifier: 0.6.5
|
|
187
187
|
version: 0.6.5
|
|
@@ -2729,7 +2729,7 @@ packages:
|
|
|
2729
2729
|
'@keyv/serialize@1.1.1':
|
|
2730
2730
|
resolution: {integrity: sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==}
|
|
2731
2731
|
|
|
2732
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
2732
|
+
'@kmlckj/licos-dev-sdk@0.2.2':
|
|
2733
2733
|
resolution: {integrity: sha512-nH3jmE6yyoYfDMv7kspB0Kmie2s37lBv/Ihik074v4WLD1o1j0guc4ju+77FiXDjkllwZGRWYksoCIqhxz2cdA==}
|
|
2734
2734
|
|
|
2735
2735
|
'@kmlckj/licos-platform-sdk@0.6.5':
|
|
@@ -12690,7 +12690,7 @@ snapshots:
|
|
|
12690
12690
|
|
|
12691
12691
|
'@keyv/serialize@1.1.1': {}
|
|
12692
12692
|
|
|
12693
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
12693
|
+
'@kmlckj/licos-dev-sdk@0.2.2': {}
|
|
12694
12694
|
|
|
12695
12695
|
'@kmlckj/licos-platform-sdk@0.6.5': {}
|
|
12696
12696
|
|
|
@@ -13,8 +13,8 @@ importers:
|
|
|
13
13
|
.:
|
|
14
14
|
dependencies:
|
|
15
15
|
'@kmlckj/licos-dev-sdk':
|
|
16
|
-
specifier: 0.2.
|
|
17
|
-
version: 0.2.
|
|
16
|
+
specifier: 0.2.2
|
|
17
|
+
version: 0.2.2
|
|
18
18
|
'@kmlckj/licos-platform-sdk':
|
|
19
19
|
specifier: 0.6.5
|
|
20
20
|
version: 0.6.5
|
|
@@ -291,7 +291,7 @@ packages:
|
|
|
291
291
|
'@jridgewell/trace-mapping@0.3.31':
|
|
292
292
|
resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
|
|
293
293
|
|
|
294
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
294
|
+
'@kmlckj/licos-dev-sdk@0.2.2':
|
|
295
295
|
resolution: {integrity: sha512-nH3jmE6yyoYfDMv7kspB0Kmie2s37lBv/Ihik074v4WLD1o1j0guc4ju+77FiXDjkllwZGRWYksoCIqhxz2cdA==}
|
|
296
296
|
|
|
297
297
|
'@kmlckj/licos-platform-sdk@0.6.5':
|
|
@@ -1710,7 +1710,7 @@ snapshots:
|
|
|
1710
1710
|
'@jridgewell/resolve-uri': 3.1.2
|
|
1711
1711
|
'@jridgewell/sourcemap-codec': 1.5.5
|
|
1712
1712
|
|
|
1713
|
-
'@kmlckj/licos-dev-sdk@0.2.
|
|
1713
|
+
'@kmlckj/licos-dev-sdk@0.2.2': {}
|
|
1714
1714
|
|
|
1715
1715
|
'@kmlckj/licos-platform-sdk@0.6.5': {}
|
|
1716
1716
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
licos-agent-runtime>=0.2.
|
|
1
|
+
licos-agent-runtime>=0.2.15
|
|
@@ -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
|
-
|
|
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.
|
|
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";
|