feat: add standard init-db CLI for host install schema ensure
All checks were successful
技能自动化发布 / release (push) Successful in 4s

This commit is contained in:
2026-07-14 17:26:24 +08:00
parent af7a43a702
commit 6b64aad138
11 changed files with 76 additions and 12 deletions

View File

@@ -8,6 +8,7 @@
python {baseDir}/scripts/main.py health
python {baseDir}/scripts/main.py config-path
python {baseDir}/scripts/main.py version
python {baseDir}/scripts/main.py init-db
```
## 标准行为
@@ -16,6 +17,7 @@ python {baseDir}/scripts/main.py version
- **`health`**:只读 runtime 诊断,**不下载、不修复 media-assets不执行业务动作**;不输出敏感值。
- **`config-path`**:输出 JSON包含 `skill``env_path``example_path`
- **`version`**:输出 JSON`version``skill`)。
- **`init-db`**:幂等创建/迁移本地 SQLite`_jiangchang_*` 展示元数据)。成功输出一行 JSON`ok` / `skill` / `db_path`),退出码 `0`。宿主可在技能安装或更新成功后静默调用;不要并入 `health`
- **`run`**:长时间无 stdout **不代表卡死**RPA / 外部调用期间应通过 Activity 或 Run Journal 看进度。
- **排查顺序**(由快到慢):
1. `python {baseDir}/scripts/main.py logs`