继续完善代码

This commit is contained in:
2026-06-07 11:51:23 +08:00
parent 1bbcc65cf3
commit 45cf1741e1
12 changed files with 415 additions and 19 deletions

View File

@@ -6,9 +6,24 @@
```bash
python {baseDir}/scripts/main.py health
python {baseDir}/scripts/main.py config-path
python {baseDir}/scripts/main.py version
```
## config-path配置路径
输出 JSON便于排查用户 `.env` 落盘位置:
```json
{
"skill": "your-skill-slug",
"env_path": "{DATA_ROOT}/{USER_ID}/your-skill-slug/.env",
"example_path": "{skill_root}/.env.example"
}
```
启动任意 CLI 命令前会自动执行 `bootstrap_skill_config()`(首次 copy `.env.example`,升级后合并缺失 key
## health 标准输出runtime diagnostics
`health` 委托 `jiangchang_skill_core.collect_runtime_diagnostics`,输出统一 runtime 诊断。典型字段:
@@ -20,6 +35,7 @@ python {baseDir}/scripts/main.py version
- `ffmpeg_path` / `ffmpeg_available` — ffmpeg 探测结果
- `background_music_mp3_count` — 可用背景音乐数量
- `runtime_issue[warning|error]` — 非致命/致命问题列表
- `env_path` / `env_exists` / `example_path` — 用户 `.env` 与仓库模板路径(不输出敏感值)
`health` **只读诊断**,不下载、不修复 media-assets不执行业务 DB / 邮箱 / 订单等检查。