Skip to content

fix: require explicit host tool inputs - #4

Merged
Huo-yang merged 1 commit into
mainfrom
fix/explicit-host-guidance
Oct 16, 2026
Merged

Huo-yang merged 1 commit into
mainfrom
fix/explicit-host-guidance

Conversation

@Huo-yang

Copy link
Copy Markdown
Owner

问题与结果

模型偶发调用需要远端目标的 ssh_* 工具时漏传必填 host,DSH/MCP 随后正确返回 schema 校验错误,导致一次无意义重试。

本 PR 同步权威 ssh-operator-mcp v0.18.2:

  • 公共 host schema 说明以 REQUIRED 开头,要求每次显式传具体 OpenSSH alias,不能依赖对话上下文推断。
  • 内嵌 Skill 增加硬规则与正反示例:ssh_exec({ host: "wsl-ubuntu", command: "pwd" })。
  • 精确保留例外:本地模式 ssh_doctor 可省略 host;只接受 processId 或无需参数的进程、日志、恢复工具不得添加虚构 host。
  • 新增 schema 单测并准备 DSH 插件 0.2.2。

不修改 DSH 的校验或重试行为。

验证

  • 权威运行时:73 个单元测试、TypeScript 检查、30 工具 MCP 握手
  • DSH 插件:pnpm peers check、73 个核心测试、4 个 Bundle/Skill/locale 测试、30 工具 MCP 握手
  • pnpm run release:prepare -- v0.2.2
  • npm pack --dry-run --json --ignore-scripts
  • git diff --check

@Huo-yang
Huo-yang merged commit 07b8c4e into main Oct 16, 2026
4 checks passed
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