去掉依赖

This commit is contained in:
2026-06-07 14:50:44 +08:00
parent 4c5bc31b0e
commit 5b555e4313
10 changed files with 43 additions and 23 deletions

View File

@@ -57,13 +57,15 @@ python scripts/main.py version
## Python 依赖requirements.txt
- 模板默认声明 `jiangchang-platform-kit>=1.0.11` 作为公共 SDK 依赖`jiangchang_skill_core` 来自共享 runtime**不在技能仓库内复制**。
- `jiangchang-platform-kit``playwright`、config、runtime diagnostics、RPA 公共能力等由**宿主共享 runtime** 提供`jiangchang_skill_core` **不在技能仓库内复制**
- 新技能**不得 vendored** `scripts/jiangchang_skill_core/`;复制模板后若发现该目录,应删除并改为依赖共享 venv。
- 在技能**根目录**维护 `requirements.txt`,声明技能特有 Python 三方包(在 platform-kit 之外按需追加)
- 匠厂宿主在**安装或更新**技能后,会将该文件中的依赖安装到共享 Python runtime
- 在技能**根目录**维护 `requirements.txt`**只声明技能特有** Python 三方包**不要**重复声明 `jiangchang-platform-kit``playwright`
- `SKILL.md``metadata.openclaw.platform_kit_min_version`(如 `1.0.11`)是运行契约/兼容性声明,供宿主安装与启用时校验,**不是** pip 依赖声明。
- 匠厂宿主在**安装或更新**技能后,会将技能 `requirements.txt` 中的依赖安装到共享 Python runtime
`{JIANGCHANG_DATA_ROOT}/python-runtime/.venv`Windows 示例:`D:\jiangchang-data\python-runtime\.venv`)。
- **Skill 业务代码不得自动 `pip install`**;缺依赖时应在 `health` / preflight 中给出清晰错误。
- **系统级组件**(如 Microsoft Visual C++ Redistributable**不要**写进 `requirements.txt`;仅在 `health` / preflight 中提示用户自行安装。
- 独立本地开发环境若缺少公共包,可手动安装;**生产/宿主运行**由共享 runtime 负责,无需在技能内 `pip install playwright`
## 公共能力边界