fix(cli): 统一生产环境确认协议与预览行为
- 新增 src/cli/production.ts:--allow-prod 为唯一生产覆盖参数, --allow-production / --force 仅作兼容别名;JSON 阻断统一为 PROD_OVERRIDE_REQUIRED,并携带 nextAction 与 details.operation - workflow test 与 workflow nodes grant 统一提示文案、错误结构与 nextAction 生成;workflow test 的 JSON 阻断不再返回空 stdout - 预览 --dry-run 始终放行,实际执行才要求覆盖参数;nodes grant 参数校验前置,缺少节点类型时不再先报生产阻断 - 两个命令的成功结果统一携带 productionOverride / productionWarning - corps tag 将企业从 prod 降级为 test/demo 时输出显著警告 - 同步 CLI 帮助、CLI/workflow README 与 Skill;补充对应单测 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
038aca10fb
commit
5be2bd5432
16 files changed
+575
-127
No files matched your search
@@ -88,15 +88,15 @@ export async function handleNodeCommand(
|
||||
"",
|
||||
"子命令 (企业灰度节点级别):",
|
||||
" nodes [list] [--all] 列出当前企业已开通的节点字典 (别名: probe, catalog)",
|
||||
" nodes grant <type...> [--is-test] [--allow-prod] 为当前企业开通灰度节点(生产环境需显式 --allow-prod)",
|
||||
" nodes grant <type...> [--is-test] [--allow-prod] 为当前企业开通灰度节点(生产企业执行需显式 --allow-prod)",
|
||||
"",
|
||||
"示例:",
|
||||
" hose-use workflow nodes",
|
||||
" hose-use workflow nodes --all",
|
||||
" hose-use workflow nodes grant code-js2",
|
||||
" hose-use workflow nodes grant code-js2 --is-test # 仅用于工作流位于测试 Piper 的企业",
|
||||
" hose-use workflow nodes grant code-js2 --allow-prod --dry-run # 生产企业:先预览",
|
||||
" hose-use workflow nodes grant code-js2 --allow-prod --yes # 生产企业:确认执行",
|
||||
" hose-use workflow nodes grant code-js2 --dry-run # 生产企业:预览(无需覆盖参数)",
|
||||
" hose-use workflow nodes grant code-js2 --allow-prod --yes # 生产企业:确认执行(--force 兼容)",
|
||||
" hose-use workflow node list 896398895352487950",
|
||||
].join("\n") + "\n",
|
||||
exitCode: 1,
|
||||
|
||||
Reference in new issue
Block a user