Repository navigation
workflow-console 1.2.0: ship a Skill so the plugin can be imported from Git - #64
Merged
MyPrototypeWhat merged 2 commits intoOct 23, 2026
Conversation
…om Git
The Host's "Import from a Git repository" only accepts a package that
declares at least one Skill, MCP server, or hook:
canImport: plugin.skills.length + plugin.mcpServers.length
+ (plugin.hooks?.length ?? 0) > 0
A Mini App on its own does not count, so `workflow-console` — which ships
one Mini App and nothing else — was refused with "No valid skill or MCP
capability was found." and the Import button stayed disabled. The plugin
was fine; the import path was the problem.
Ship one real Skill, `skills/workflow-console/SKILL.md`, and declare it.
It is what an Agent needs to drive the console anyway: choose a project
directory before the engine may start, keep runs in pending_review until
they are approved, what approve/pause/cancel/resume mean, that reusing a
template creates a draft rather than running anything, that the demo
executor calls no model, and that neither the working directory nor the
approval may be decided on the user's behalf.
Verified with the Host's own reader (plugin-system package reader) against
this directory: 1 accepted Skill, canImport true. The same reader on the
previous manifest reports canImport false, which is the reported failure.
The English README never pointed at README.zh-CN.md, so a Chinese reader had no way to find the translation, and the page's own wording was quoted without a translation. Add the language switcher the other plugins in this repository use, a short Chinese summary at the top, and a term list that pairs each Chinese label the page shows with its English meaning: 工作目录, 待审核, 开始执行, 内置引擎, 还没有选择项目目录, 审核版本已更新,请刷新后再开始执行. The English body is unchanged, so the contract's required headings and the rest of the document stay exactly as they were.
Contributor
Author
|
补一个提交 之前英文 README 里没有指向 改动:
英文正文一字未改,契约要求的 |
MyPrototypeWhat
approved these changes
Oct 23, 2026
MyPrototypeWhat
left a comment
Collaborator
There was a problem hiding this comment.
我核对过的内容(head bd0d99e,在上一版 ed1e1db 基础上增量核对)
- 增量范围:
ed1e1db..bd0d99e只改了plugins/stevenjj33/workflow-console/README.md一个文件(+20 / −9);README.zh-CN.md、代码、Skill、测试和根目录文件都没有变化。 - 增量内容:
- 顶部加了
[简体中文](README.zh-CN.md) | English切换行和一段「中文速览」,内容和 README.zh-CN.md 的开头一致。 - 原来的 “The user interface is in Chinese.” 扩写成一段话,列出页面上的中文术语及英文含义。这部分是行内列表,不是表格。
- 「工作目录」一节和 Skill 一节的原有英文句子里,加了对应的中文标签(如 Working directory(「工作目录」)、
pending_review(「待审核」)),并做了换行重排。英文原意没有变化,-9 行都是这类重排。
- 顶部加了
- 标签与界面字符串:「工作目录」「待审核」「开始执行」「内置引擎」「还没有选择项目目录」都和
miniapp/client/app.js里的字符串一致;「审核版本已更新,请刷新后再开始执行」是miniapp/node/server.mjs:1323返回 409 时的错误文案,页面会直接显示,和 SKILL.md 的写法也一致。 - 上一版的其他核对结论不受影响:版本 1.2.0、Skill 路径和 frontmatter、SKILL.md 与代码逐条对应,没有涉及额外网络、其他插件数据或包目录外的文件。
- 运行结果(Node 22.23.4):
npm run check通过,本插件 0 error(2 条 warning 来自 vendor 内dynamic-workflows的 stdout,与本 PR 无关),根测试 69/69 通过;插件自带测试node --test tests/*.test.mjs16/16 通过。
必须修改
无。
可选建议
- README 两个语言版本的 Skill 一节里,关于 Git 导入接受条件的那句话描述的是本包以外的规则,规则一变 README 就会过时。建议删掉,或改成中性写法,例如「本包附带 Skill,供 Agent 了解如何操作控制台」。
- 「数据与边界」里的「运行记录还在引擎数据库里」,可以顺带说明指的是本插件
context.dataDir/engine/下的数据,避免被理解成别的数据库。 - 插件
package.json没有test脚本,在插件目录执行npm test会报Missing script。可以加上"test": "node --test tests/*.test.mjs",方便统一运行。
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.
问题
在 MiniMax Code 里用「从 Git 仓库导入」安装
workflow-console,预览能正确解析出插件名、版本、作者和描述,但计数显示「0 个技能 0 个 MCP Server」,并红字提示「未找到有效的 Skill 或 MCP 能力。」,导入按钮置灰,无法安装。根因(宿主侧规则,不是这个插件的问题)
宿主「从 Git 仓库导入」在
GithubPluginImporter.readPreview()里这样判定:importGithubPlugin()在canImport为假时直接抛PLUGIN_NO_SUPPORTED_CAPABILITY:"Plugin contains no valid Skill, MCP, or Hook capability"。
Mini App(
apps/miniapp.json)不计入这个判定。 所以一个只带 Mini App、一个 Skill/MCP/Hook 都没有的插件,走 Git 导入必然被判失败——哪怕它本身完全合法,npm run check也是 0 errors。workflow-console恰好就是这种形状:它自带一个 Mini App,此外没有任何能力声明。修法
不是绕过校验,而是补上一个本来就该有的能力:一个真正的 Skill。
skills/workflow-console/SKILL.md告诉 Agent 怎么用这个控制台:pending_review要等审核,审核前要核对拓扑与读写范围;demo执行器不调模型,mcodeAvailable: true不代表已登录或有额度;plugin.json的skills相应声明该文件,版本号提到 1.2.0,两份 README 补了 Skill 章节与文件访问说明。验证
用宿主自己的
GithubPluginImporter.preview()(@mavis/local-runtime-v2的 plugin-system import 模块)跑真实 GitHub URL——这就是 UI「预览」按钮调用的同一个后端流程:下载仓库归档 → 解包 → 读清单 → 判定canImport。MiniMax-AI/.../tree/main/...(修复前)stevenjj33/.../tree/fix/workflow-console-git-import/...同一份 reader 直接读本地目录的结果一致:修复后
canImport: true,把skills清空则回到false(反向对照)。Skill 的格式约束按宿主
readPluginSkill()核对:frontmatter 必须有name与description,且name必须等于目录名,路径须为可移植 ASCII。目录名与name不一致时宿主报SKILL_SCHEMA_INVALID(已做反向对照验证)。另外:
npm run check(仓库根):69/69,0 errors;node --test "tests/*.test.mjs":16/16;miniapp仍能正常识别并拉起运行时(runtime.ready,无 error 日志)。给维护者的两点提示
一、这条
canImport规则对本仓库里其他只带 Mini App 的插件同样成立——它们的skills与mcpServers也是空数组(例如plugins/1602winxp/pomodoro-sit-timer、plugins/amszuidas/mcode-token-usage-board、plugins/avatasia/mmc-trajectory等)。它们走 Git 导入会遇到同样的提示。这是宿主行为,本 PR 只修了自己这一个插件;如果希望所有 Mini App 插件都能直接导入,需要宿主把apps/miniapp也算进判定。二、宿主给整仓归档下载的预算是 60 秒(
DOWNLOAD_TIMEOUT_MS = 60_000),而归档体积是整个仓库的体积——本仓库的 zip 约 106 MB,实测下载 38–58 秒。也就是说即使能力判定通过了,网络稍慢仍可能以GITHUB_ARCHIVE_UNAVAILABLE("GitHub archive download failed")失败,这与插件本身无关。想彻底稳,得让宿主按子目录下载,或放宽这个超时。