Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions hithink-finance-cli/scripts/generate-contracts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const domainConfigs = {
],
[
'更新 CLI',
'`hithink-finance update --check --format json` 或 `hithink-finance update --repair --format json`',
'`hithink-finance update --check --format json` 确认目标版本后,用 `hithink-finance update --repair --target-version <version> --format json` 升级',
],
['预览卸载', '`hithink-finance uninstall --plan --format json`'],
],
Expand Down Expand Up @@ -486,12 +486,14 @@ hithink-finance version --format json
hithink-finance doctor --format json
hithink-finance update --check --format json
hithink-finance update --repair --format json
hithink-finance update --repair --target-version <version> --format json
hithink-finance uninstall --plan --format json
\`\`\`

## 参数选择策略

- 先 \`update --check\`,只有用户确认修复/升级时再 \`update --repair\`。
- 先 \`update --check\` 确认当前版本与目标版本;\`update --repair\` 只修复当前安装,不会改变已安装的版本。
- 跨版本升级或安装指定版本必须显式加 \`--target-version <version>\`,例如 \`hithink-finance update --repair --target-version 0.1.8 --format json\`;回滚同样传入目标旧版本。
- 卸载先 \`uninstall --plan\`,真实清理按计划和用户确认执行。
- Skills、更新和卸载的前台子进程响应 SIGINT/SIGTERM 并具有执行时限;Windows 使用 taskkill,POSIX 使用独立进程组,都会终止前台进程树;超时返回 \`CLI_CHILD_TIMEOUT\`,CLI 保留 130/143 信号退出码。
- 普通命令的 detached 更新检查由跨进程租约保护,同一状态目录最多一个刷新任务。
Expand All @@ -501,7 +503,9 @@ hithink-finance uninstall --plan --format json
## 常见错误

- 普通命令可能在完成后向 stderr 输出更新提示;不要把它混入业务数据。
- 不要因为更新提示中断取数、翻页或导出流程;需要升级时先运行 \`update --check\`,获得用户确认后再 \`update --repair\`。
- 不要因为更新提示中断取数、翻页或导出流程;需要升级时先运行 \`update --check\` 确认目标版本,获得用户确认后再运行 \`update --repair --target-version <version>\`。
- 只说「升级」而不传 \`--target-version\` 时,\`update --repair\` 会返回成功但版本号不变;不要据此认为升级已完成,应先比对 \`update --check\` 的 \`current_version\` 与 \`latest_version\`。
- \`--target-version\` 只接受合法 SemVer 版本号;执行后仍须用 \`hithink-finance version --format json\` 复核实际生效版本。
`,
'skills-management.md': `# Skills 管理

Expand Down
2 changes: 1 addition & 1 deletion hithink-finance-cli/skills/hithink-finance-shared/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: '用于 Agent 通过 hithink-finance CLI 做安装后自检、API K
| 查看非敏感配置 | `hithink-finance config show --format json` |
| 诊断运行环境 | `hithink-finance doctor --format json` |
| 同步/修复配套 Skills | `hithink-finance skills status --format json` 或 `hithink-finance skills sync --format json` |
| 更新 CLI | `hithink-finance update --check --format json` 或 `hithink-finance update --repair --format json` |
| 更新 CLI | `hithink-finance update --check --format json` 确认目标版本后,用 `hithink-finance update --repair --target-version <version> --format json` 升级 |
| 预览卸载 | `hithink-finance uninstall --plan --format json` |

## References
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ hithink-finance version --format json
hithink-finance doctor --format json
hithink-finance update --check --format json
hithink-finance update --repair --format json
hithink-finance update --repair --target-version <version> --format json
hithink-finance uninstall --plan --format json
```

## 参数选择策略

- 先 `update --check`,只有用户确认修复/升级时再 `update --repair`。
- 先 `update --check` 确认当前版本与目标版本;`update --repair` 只修复当前安装,不会改变已安装的版本。
- 跨版本升级或安装指定版本必须显式加 `--target-version <version>`,例如 `hithink-finance update --repair --target-version 0.1.8 --format json`;回滚同样传入目标旧版本。
- 卸载先 `uninstall --plan`,真实清理按计划和用户确认执行。
- Skills、更新和卸载的前台子进程响应 SIGINT/SIGTERM 并具有执行时限;Windows 使用 taskkill,POSIX 使用独立进程组,都会终止前台进程树;超时返回 `CLI_CHILD_TIMEOUT`,CLI 保留 130/143 信号退出码。
- 普通命令的 detached 更新检查由跨进程租约保护,同一状态目录最多一个刷新任务。
Expand All @@ -22,4 +24,6 @@ hithink-finance uninstall --plan --format json
## 常见错误

- 普通命令可能在完成后向 stderr 输出更新提示;不要把它混入业务数据。
- 不要因为更新提示中断取数、翻页或导出流程;需要升级时先运行 `update --check`,获得用户确认后再 `update --repair`。
- 不要因为更新提示中断取数、翻页或导出流程;需要升级时先运行 `update --check` 确认目标版本,获得用户确认后再运行 `update --repair --target-version <version>`。
- 只说「升级」而不传 `--target-version` 时,`update --repair` 会返回成功但版本号不变;不要据此认为升级已完成,应先比对 `update --check` 的 `current_version` 与 `latest_version`。
- `--target-version` 只接受合法 SemVer 版本号;执行后仍须用 `hithink-finance version --format json` 复核实际生效版本。
4 changes: 2 additions & 2 deletions hithink-finance-cli/skills/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@
"hithink-finance-options/references/options-varieties.md": "18dd73168876e74e7741eb5710191f16815f8e40c20d5fc874fc3d435013de54",
"hithink-finance-research/SKILL.md": "7f4ded9d172a2bb2578ac81266ef869521c7d753f2a021c7aa79fc6d0f92541c",
"hithink-finance-research/references/research-workflow.md": "3f73f179339b21403e7f8f6bfd7fcb2649f06ffc6b6bccb428b18cb19929dad5",
"hithink-finance-shared/SKILL.md": "8b02e5c2a07d79d818fb5e2b41f6d83afcc39cfc671aba0d4ac87068710c36ab",
"hithink-finance-shared/SKILL.md": "ae3f214e0113ef30abe044c551f0133c8eb39d49b3902afd7db8d7a950beeac6",
"hithink-finance-shared/references/auth-and-config.md": "200c37bae0ab696580055a29be6e39c6d9d003e418a425baafd3a07872bb4e11",
"hithink-finance-shared/references/global-rules.md": "8beab5ddcb83c22165268989685c9e44c7489c934a380a388e77542a02dcedc7",
"hithink-finance-shared/references/lifecycle.md": "747049d179dcfb49fc9e9460f3bd794bfcf0b7fc5958e689b3a31fafde256c57",
"hithink-finance-shared/references/lifecycle.md": "f0e1fb154bb9eda7e59002d48810d3beaa2f9f041f370278d2f429aed5871019",
"hithink-finance-shared/references/skills-management.md": "1872d129dd113922990e7b43c42e520bf1ff889d2b3cd06872935bd8e05f15c0",
"hithink-finance-special-data/SKILL.md": "e949daf45eded1be23a0e4a2f6db9e10bc5a8ca6e8e188e89953140ca3d1e375",
"hithink-finance-special-data/references/special-anomaly-list.md": "98f7bac44eb040ff80fd06185bd9ac811fdd7d46fa6c7695a32e808eda3bd2fd",
Expand Down