修复(skill):改用兼容 PowerShell 的 mcporter 参数语法 - #562
Closed
realMisakaMikoto wants to merge 1 commit into
Closed
Conversation
realMisakaMikoto
marked this pull request as ready for review
August 3, 2026 16:01
Owner
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.
概要
mcporter示例替换为跨 Shell 更稳定的命名参数写法site:reddit.com查询根因
在 Windows 上,npm 生成的 PowerShell shim 无法可靠保留下列函数调用式写法中的嵌套字符串字面量:
因此,
mcporter收到的是标识符而非字符串,并报出Unsupported argument expression: Identifier;查询中包含空格时,还可能把部分表达式误识别为临时 MCP 服务名。本 PR 统一改用
mcporter官方支持的key=value参数形式:该写法已在 PowerShell 中实际验证,同时兼容 Bash。
用户影响
Windows 用户的 Agent 按照内置技能调用 Exa 时,不再在发出 MCP 请求前就因参数解析失败。其他 MCP 后端的当前技能示例与配置指南也统一采用相同的可移植写法。
验证
python -m pytest tests/test_skill_command.py -v:6 项通过,15 个子测试通过python -m ruff check tests/test_skill_command.py:通过git diff --check:通过mcporter call exa.web_search_exa query="Agent Reach GitHub repository" numResults=1:成功返回真实搜索结果/bin/sh、符号链接与 HOME 隔离agent_reach/cli.py:1747相关工作
PR #537 处理的是另一个问题:Exa 工具契约中包含已弃用工具。本 PR 只处理 PowerShell 下的参数传递兼容性;两者在搜索参考文档中有少量行级重叠,合并顺序不同可能需要一次简单 rebase。