Skip to content

fix(skills): monit 卡片里四个工具名不存在#91

Merged
ysyneu merged 1 commit into
feat/api-review-auto-fixfrom
fix/monit-skill-cards
Jul 20, 2026
Merged

fix(skills): monit 卡片里四个工具名不存在#91
ysyneu merged 1 commit into
feat/api-review-auto-fixfrom
fix/monit-skill-cards

Conversation

@ysyneu

@ysyneu ysyneu commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

skills/flashduty/reference/ 下两张手写卡片调用了四个根本不存在的工具。

文件 写的 真实情况
monit-agent.md:23 host.top + host.disk 都不存在
monit-agent.md:63 host.top (params.limit) + host.disk 都不存在,且 limit 不是任何工具的参数
monit.md:68 host.cpu + host.mem 都不存在

权威工具集(monit-agent v0.0.7 的 tool/ 包,即 monit-webapi toolregistry 加载的那份):

  • host:os.overviewos.top_processesnet.tcp_pinghttp.getshell.exec
  • mysql:mysql.overviewmysql.lock_contentionmysql.query

agent 照抄这些命令必然拿到 unknown_tool;limit 那处即使工具名对了也会 invalid_args——agent 用 additionalProperties: false 的编译期 jsonschema 校验,参数名错是硬失败不是静默忽略(os.top_processes 的真实参数是 top_n / sort_by)。

本仓库生成的帮助文本(zz_generated_*.go)是对的,只有这两张手写卡片漂了——因为没有任何东西会拿卡片里的 JSON body 去对照注册表校验。

替换后的命令已打真实 dev 验证通过。

刻意不跟 SDK 升级那条分支放一起,那条要等 go-flashduty 合并;这条是线上硬失败,应该能单独先合。

`monit-agent.md` ran `host.top` / `host.disk` and `monit.md` ran `host.cpu` /
`host.mem`. None of the four exist. monit-agent v0.0.7 registers exactly:
host → os.overview, os.top_processes, net.tcp_ping, http.get, shell.exec;
mysql → mysql.overview, mysql.lock_contention, mysql.query.

An agent copying these gets `unknown_tool`, and the `host.top` example also
passed `limit`, which is not a parameter of anything (`os.top_processes` takes
`top_n` / `sort_by`, and the agent validates with `additionalProperties:false`,
so a wrong key is a hard `invalid_args`, not a silent no-op).

The generated help in this repo (zz_generated_diagnostics.go,
zz_generated_response_help.go) was already correct — only these hand-written
cards drifted, because nothing checks their JSON bodies against the registry.

Replacements verified live against a real dev target. Deliberately kept
separate from the SDK-bump branch so it can land without waiting on that.
@ysyneu
ysyneu merged commit 5268648 into feat/api-review-auto-fix Jul 20, 2026
12 checks passed
@ysyneu
ysyneu deleted the fix/monit-skill-cards branch July 20, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant