fix(plugins): 修复已安装 pi npm 包的技能导入 - #288
Merged
Merged
Conversation
Contributor
|
👍 这条 PR 和我们昨天提的 #277 修的是同一个 为了不留下两个重叠的 PR,我们打算把 #277 关掉。#277 里有一点可能对这条 PR 有用的补充,如果需要的话我们随时提供补丁(分支
如果这些都已在你的实现里覆盖,那就最好,关掉 #277 即可;如果有缺的,我们可以开一个指向你分支的 PR 把补丁送过来,或者你 cherry-pick 也行。怎么方便怎么来~ |
This was referenced Sep 13, 2026
Contributor
|
跟进:为方便整合,把 #277 的依赖安装部分 rebase 到了你的分支之上,开了一个叠加 PR:Blue-Berrys#1(只含依赖安装 + 文档 + 测试,过滤修复保留你的实现)。合并顺序 = 先 #288 再这个,#242 就能一条线闭环。冲突解决说明和验证结果都写在叠加 PR 描述里,需要调整随时说~ |
vastsa
approved these changes
Sep 13, 2026
vastsa
left a comment
Owner
There was a problem hiding this comment.
已审查 0d966258 与当前主线 76cd2dbd 的集成结果,未发现阻断问题。导入目录边界、符号链接拒绝、技能数量限制、纯技能包权限及禁用/卸载路径均保留了现有约束。
独立验证的集成 tree:bb2a239273ce99eb5320d93101cc0c7c172a4d35。
pnpm build:js通过。- 三个 importer/runtime 回归测试文件:20/20 通过。
pnpm test:e2e:18 项通过;2 项真实模型/流式场景因未配置测试密钥跳过,不计为通过。- 原 PR 的 JS、Rust、文档 CI 均通过。Vercel 的 fork 部署授权状态不属于产品测试失败。
验证使用独立 worktree 和临时 profile,保留原作者提交。批准合并。
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.
修复 #236 中已安装 npm 包手动导入后仍不显示技能的问题。选择
~/.pi/agent/npm/node_modules/planning-with-files包目录时,原复制过滤器会因为祖先路径包含node_modules而丢弃整个包;此外导入器只映射pi.extensions,遗漏了pi.skills。此改动按包内相对路径排除依赖,保留技能的脚本、模板与资源,将显式声明的技能文件/目录映射为插件技能,并为同名
SKILL.md生成独立稳定 ID。仅包含技能的包只声明agent.prompt.inject,不会把辅助index.js当作可执行扩展。补齐路径校验、权限撤销/卸载回归、中英文规范及导入确认文案。验证(macOS ARM64,Node 25.5.0):
pnpm build:js、desktop typecheck、pnpm lint、77 对规格本地化检查通过。pnpm test:e2e:18/18 通过;两项真实模型测试缺少PI_DESKTOP_TEST_API_KEY跳过。pnpm test:e2e:boot通过。planning-with-files@3.17.1经同一导入器及真实 PluginRuntime 子进程加载:44 个文件完整保留,pi-planning-with-files进入目录,34,316-byte 正文与原文解析结果一致;权限撤销、恢复及卸载通过。未执行第三方 extension、技能脚本或模型调用。范围:这是显式本地包导入,不自动扫描
~/.pi,不实现完整 pi CLI 包管理。npm 依赖安装仍由 #277 处理。原生选择器完整 UI 操作和真实模型调用未验证;不声称完成所有 npm 扩展兼容或整个 #242。Refs #236