Skip to content

fix(manifest): migrate to reasonix.io/plugin/v2 so Reasonix v1.22+ can install/update - #2

Open
taominjigithub002 wants to merge 1 commit into
irmia2026:masterfrom
taominjigithub002:fix/manifest-v2-api-version
Open

taominjigithub002 wants to merge 1 commit into
irmia2026:masterfrom
taominjigithub002:fix/manifest-v2-api-version

Conversation

@taominjigithub002

Copy link
Copy Markdown

问题

Reasonix v1.22.0 强制要求原生插件 manifest 声明 apiVersion: reasonix.io/plugin/v2,缺失/v1 一律拒绝。当前 reasonix-plugin.json 无 apiVersion(v1 风格,skills/mcpServers 裸放根级),导致 reasonix plugin install https://github.com/irmia2026/irmia_devkit_mcp 报 missing apiVersion,插件无法安装/更新。

修改

  • 新增 "apiVersion": "reasonix.io/plugin/v2"
  • skills/mcpServers 移入 contributes 块
  • skills 由字符串 "skills" 改为数组 ["skills"]

验证

  • reasonix plugin install <本地副本> --dry-run → compatibility: full,skills/mcp 全部映射
  • 实际安装成功:ok:true status:done compatibility:full
  • MCP initialize 握手成功:serverInfo: irmia-devkit 2.7.2

无运行时行为变更,纯 manifest 格式修正。

…x.io/plugin/v2) so Reasonix v1.22+ can install/update
@irmia2026

Copy link
Copy Markdown
Owner

感谢修复,manifest 迁移的方向完全正确,v2 的形状也对得上。

我对照了宿主侧的解析器(internal/pluginpkg/manifest_v2.go、docs/PLUGIN_PACKAGES.md:259-323)确认过:只有 apiVersion 是必填项,取值必须精确匹配 reasonix.io/plugin/v2(没有 v2.0/v2.1 别名),而 contributes.skills 用数组、contributes.mcpServers 用映射,正是文档规定的 v2 写法。serverInfo: irmia-devkit 2.7.2 也与代码一致(server.py:76-81)。改动本身没问题。

但合并前需要修一处会让 CI 变红的问题。

同仓库的 tests/test_packaging.py 还在读旧的根级路径:

  • tests/test_packaging.py:34 → ROOT / plugin["skills"]
  • tests/test_packaging.py:36 → plugin["mcpServers"]["irmia-devkit"]["command"]

这两处在 v1 结构下成立,而本 PR 已把它们移进 contributes,于是会抛 KeyError: 'skills'。pyproject.toml 的 addopts 只忽略了 test_devkit_web.py 和 test_group_default_config.py,没有忽略这个文件;.github/workflows/ci.yml:29 又在 ubuntu/macos/windows 三平台跑 pytest -q,所以合并会直接把 master 打红。

这个 PR 上 gh pr checks 显示 "no checks reported"(跨仓库 PR 未触发检查),所以 MERGEABLE/CLEAN 并不代表测试通过 —— 这也是为什么它在 PR 页面上看不出来。建议改成:

    skill_root = ROOT / plugin["contributes"]["skills"][0]
    ...
    command = plugin["contributes"]["mcpServers"]["irmia-devkit"]["command"]

顺带加一条 apiVersion 断言,把这个不变量锁住。

另外建议把版本号一并提上去。 目前仍是 2.7.2(package.json / pyproject.toml / manifest 三处同步)。市场作者指南要求「For an update, increase the package version」,否则已安装的用户不会收到更新;既然提交审核时要 pin 一个 commit,让这个 commit 同时带上版本号更干净。

合并顺序: 建议先合 #3(它把版本提到 2.7.3、并顺带改了这个 manifest),再在本 PR 上补测试修复并 rebase —— 我用 git merge-tree 验证过两者可以自动合并,不冲突。注意 #3 不会修 test_packaging.py,也不带 apiVersion,所以两者都需要。

改完我会在 Studio 里以 Plugins 类型、commit-pinned 源重新提交上架(对应 issue #4)。感谢!

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.

2 participants