Repository navigation
docs(huawei-ecs): 大 user_data 走 --cli-jsonInput 文件通道,勿弃 MCP 审批层 (#964) - #965
Merged
coconut1919 merged 1 commit intoOct 20, 2026
Merged
Conversation
coconut1919
force-pushed
the
docs/964-large-userdata-jsoninput
branch
from
October 20, 2026 02:29
aba2d52 to
1dc1052
Compare
This was referenced Oct 20, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #964
背景(活动实测痛点)
2026-10-19 全流程活动报告(66 min / 3200 分)阶段 4 瓶颈 3:cloud-init 脚本 base64 后 ~22KB,超出 MCP 工具参数上限,agent 放弃 MCP 通道直连 shell 调 hcloud——~3 分钟摸索之外,更 silently 绕过了插件三层安全设计中的 plan → approve → run 审批层。
结构性错配:user_data API 上限 32KB(编码前),MCP 参数通道仅几 KB——「API 收得下、通道递不过去」,而仓库里两块知识从未接线(create-instance.md §Bootstrap 只教内联写法;AGENTS.md:159 的
--cli-jsonInput惯例在 huawei-ecs skill 0 命中)。修复(纯文档 + 守卫,单 commit)
create-instance.md §Bootstrap 新增「Large user_data: pass via JSON file, do NOT abandon the MCP channel」小节:
--skeleton生成header/path/bodyJSON 骨架(注明写盘到当前目录而非 stdout)→ 填body.server.user_data→--cli-jsonInput=<file>执行 → 可选--dryrun发送前校验(打印请求报文、不创建资源)--help(仅在hcloud --help)——agent 常规发现路径探测不到,这正是写入 skill 的理由structure.test.mjs新增守卫(964前缀):断言--cli-jsonInput/body.server.user_data/--skeleton/--dryrun/ 反模式警示的存在,防止小节被未来编辑误删。附带事实纠偏
报告瓶颈 1 根因 4 称「CLI 不支持 --dry-run」——不成立:KooCLI 有全局 flag
--dryrun(「执行校验后打印请求报文,跳过实际运行」,hcloud --help实证)。commit message 与 issue #964 均已记录纠偏。自测
node --test test/structure.test.mjs58/58(含新守卫huawei-ecs create-instance documents the large-user_data JSON-file path (#964))--skeleton输出结构经实测验证(ECS_CreateServers_*.json:header/path/body 三段,user_data 位于body.server.user_data)