Repository navigation
Open
Labels
area: pluginsPlugin platform, MCP, and plugin APIsdocumentationImprovements or additions to documentationhelp wantedExtra attention is needed
Description
招募:用 AI 对 PI-Desktop 插件文档做 review 与补齐(PR 必须关联本 issue)
PI-Desktop 的插件体系文档分为三层:docs/spec/07-plugins/(17 篇规格)、docs/plugin-development.md(开发指南)、以及 docs/adr/ 下数十篇插件相关 ADR。代码演进很快,文档已经开始滞后,而中文版系统性落后于英文版。
我们想借助 AI 做一轮系统性、可验证的文档 review 与补齐。欢迎提交 PR,PR 必须关联本 issue(见「PR 要求」)。
一、已核实的具体问题(可直接作为切入点)
以下都是实测得到的差异,不是猜测。
1. 中文文档系统性落后英文
| 文件 | 英文行数 | 中文行数 | 差距 |
|---|---|---|---|
07-plugins/03-plugin-api.md |
1558 | 906 | 652 |
07-plugins/04-plugin-security.md |
576 | 223 | 353 |
07-plugins/07-plugin-marketplace.md |
735 | 396 | 339 |
07-plugins/16-trusted-extensions.md |
552 | 225 | 327 |
07-plugins/02-plugin-manifest-schema.md |
747 | 526 | 221 |
07-plugins/01-plugin-system.md |
672 | 454 | 218 |
07-plugins/15-plugin-center.md |
451 | 272 | 179 |
plugin-development.md |
1099 | 706 | 393 |
差的不只是字数,而是整节缺失。例如 04-plugin-security.md 英文有这些小节,中文没有:
Host-rendered scenic Settings destinations3.2 Session collaboration boundaryProvider OAuth credential boundary6.4 Dropped-file grants8.2 Desktop control and device access中的部分内容
2. 中文标题编号损坏
docs/zh-CN/spec/07-plugins/ 下 6 个文件共 17 处标题编号被写坏,例如:
### 3. 1 贡献主题CSS(应为### 3.1 贡献主题 CSS)## 5. 1 插件间消息总线(应为## 5.1 插件间消息总线)## 7. 1 到达代理的技能和 MCP 工具
分布:01(7)、02(2)、04(4)、05(1)、06(2)、12(1)。
这类问题会让目录锚点和交叉引用失效,属于纯机械修复,适合作为入门 PR。
3. 需要交叉核对的点
这些地方文档最容易与代码脱节,建议重点比对:
13-plugin-permissions-matrix.md列的权限项(矩阵 85 行中含继承/降级说明,去重后约 50 项),与packages/plugin-sdk/src/index.ts及宿主assertPermission调用点是否一致02-plugin-manifest-schema.md的字段表,与packages/plugin-sdk/src/index.ts的PluginManifest类型、validateManifest()的实际校验是否一致03-plugin-api.md声明的 API,与PluginApi类型是否一致(该文档 1558 行,最可能积压偏差)12-plugin-ipc-and-host-services.md与apps/desktop/electron/main/plugin-runtime.ts的实际实现
二、任务方向
可以只做其中一项,不必求全。请在 issue 下认领,避免重复。
P0:机械修复(适合入门)
- 修正上述 17 处中文标题编号
- 补齐中文缺失的完整小节(对照英文逐节翻译,不要摘要)
P1:准确性审计(价值最高)
用 AI 逐项核对「文档声称」与「代码实际」:
- API 文档:文档列出的每个方法/事件/字段,是否在 SDK 类型中存在;反过来,SDK 导出的公开 API 是否都在文档里
- 权限矩阵:每项权限的风险等级、默认策略、可调用 API 是否与代码一致
- manifest schema:字段名、类型、必填性、校验规则是否与
validateManifest()一致 - 安全文档:威胁模型与实际隔离实现(sandbox、partition、egress 白名单)是否一致
P2:补充缺失内容
- 插件的错误码全集与含义(分散在
plugin-runtime.ts、plugin-sdk各处) - 插件开发常见陷阱(例如修改
manifest.permissions后热重载不生效的原因) - 中英文术语对照表(当前中文版术语不统一,如 "代理" / "Agent" 混用)
三、方法建议
- 先读代码再读文档。文档是待验证对象,不是事实来源。
- 以审计为目标,不是润色。只报事实性偏差与缺失,不改语气和排版。
- 每条结论必须指到具体文件与行号。不接受"可能需要更新"这类不可验证的说法。
- 中英对照时,以英文为基准补中文,而不是反过来删英文。
参考提示词:
阅读 <doc file> 与其描述的 <code files>。列出三类问题:
1. 文档描述了代码没有的行为
2. 代码有行为但文档未提
3. 名称/数值/路径/类型与代码不一致
每条给出:文档行号、代码位置、差异、建议改法。不要修改措辞或格式。
四、PR 要求
硬性要求:PR 必须关联本 issue。 在 PR 描述中包含 Related to #<本 issue 编号> 或 Closes #<本 issue 编号>。未关联的 PR 会被要求补充后再审。
其它要求:
- 一个 PR 只做一件事。不要把「修标题编号」和「补整节翻译」放在一起。
- 不要顺手改代码。发现代码 bug 请单独开 issue。
- 不要重排现有文档结构,除非该 PR 的目的就是重排。
- 中英文改动尽量成对提交:只改英文会导致差距扩大,只改中文请说明英文是否也需同步。
- PR 描述写清:核对了哪些文档、对照了哪些代码文件、发现了什么。
五、验证约定
- 仓库规则见根目录
AGENTS.md;文档改动不需要跑完整测试 - 提交前至少执行
git diff --check(空白字符) - 若改动涉及代码路径/命令示例,请实际验证命令可执行
- 中文文档改动后请确认 Markdown 锚点仍可跳转(标题编号修复尤其注意)
六、评测标准
好的 PR:
- 每条结论都能指到代码位置
- 没有"可能""大概""建议确认"这类不可验证表述
- 新增内容能让没读过代码的人正确使用该 API
- 中英文内容对应,不制造新的不对称
需要返工的 PR:
- 只改排版措辞,没碰事实
- 声称修正行为描述但未对照代码
- 把多个不相关改动塞进一个 PR
- 未关联本 issue
- 只改英文、进一步拉大中英差距
七、如何认领
在本 issue 下回复你要做的方向,例如:
- 「P0:修 01/02/04/05/06/12 的标题编号」
- 「P1:核对 03-plugin-api.md 与 PluginApi 类型」
- 「P0:补 04-plugin-security.md 的中文缺失小节」
有任何不确定的地方直接提问。宁可先问,也不要按猜测写文档——本轮的目标正是消除文档中的猜测性描述。
Metadata
Metadata
Assignees
Labels
area: pluginsPlugin platform, MCP, and plugin APIsdocumentationImprovements or additions to documentationhelp wantedExtra attention is needed
Activity
Goldloli commentedon Oct 30, 2026
认领 P0:修 01/02/04/05/12 的中文标题编号。实测当前 main 上是 5 个文件共 15 处坏编号(01 有 7 处,其中 12.1 重复了一次;06 实测没有坏编号),修完会提 docs PR 并关联本 issue。做法只动编号与重复行,不重排结构、不改内容。
Goldloli commentedon Oct 30, 2026
补充:开工后发现 #2002(更早 11 分钟)已覆盖完全相同的标题编号修复(同 5 文件、同 15 处),我已关闭自己的重复 PR #2003;两处验证结果和 3 条 out-of-scope 发现(04 缺 3.2/6.4 等整节、01 的 6.1 疑似截断、plugin-development.md 的既有失效锚点)已贴到 #2002 评论,供其 review/后续使用。P0 的「补 04 中文缺失小节」方向仍无人认领。
zszz3 commentedon Oct 31, 2026
认领 P1:准确性审计(文档声称 vs 代码实际)。计划按下面顺序做,每项单独一个 PR,都关联本 issue,并且中英文成对修改:
02-plugin-manifest-schema.md对照packages/plugin-sdk/src/index.ts里的PluginManifest/validateManifest()(字段名、类型、必填性、校验规则)03-plugin-api.md对照PluginApi类型,双向核对:文档有但代码没有,代码导出了但文档没写13-plugin-permissions-matrix.md对照 SDK 的权限定义和宿主侧assertPermission调用点04-plugin-security.md)里的 sandbox / partition / egress 白名单,对照实际的隔离实现每条结论都会写明文档行号、代码位置、差异和改法,只改事实,不动措辞和排版。审计中发现的代码 bug 会单独开 issue。哪一项还没开工,别人想接都可以直接接,我会在这里更新进度。
zszz3 commentedon Oct 31, 2026
P1 进度(已全部提交):
02-plugin-manifest-schema.md对照PluginManifest/validateManifest()→ docs(plugins): align manifest schema doc with validators #2019。代码问题另开 plugin-devkit: check rejects package-relative theme assets that the installer accepts (ADR 0288) #2020。03-plugin-api.md对照PluginHostApi→ docs(plugins): align plugin API doc with host runtime #2021。SDK 类型问题另开 plugin-sdk: workspace.get type omits projectId and roots the host returns #2022。13-plugin-permissions-matrix.md对照权限定义与assertPermission→ docs(plugins): align permissions matrix with host behavior #2024。审核界面问题另开 plugins: permission review lacks copy for 7 permissions and does not show fs scope #2023。04-plugin-security.mdsandbox / partition / egress → docs(plugins): align plugin security doc with egress and grant code #2025。docs(plugins): align manifest schema doc with validators
docs(plugins): align plugin API doc with host runtime
docs(plugins): align permissions matrix with host behavior
docs(plugins): align plugin security doc with egress and grant code
Seraph-x commentedon Oct 31, 2026
认领 P0:补齐
docs/zh-CN/spec/07-plugins/03-plugin-api.md中尚缺的四项英文内容:Theme variables、pi.projects.list()签名/类型/行为说明、Provider entries in Add Service、Scenic Settings contribution。已核对本 issue 发布以来的全部 19 个 PR 的实际差异,包含未合并 PR;这些内容未被覆盖。#2021 也明确将 Theme variables 和
projects.list()的中文补齐留在其范围之外。本次只做该文件的完整中文补译,对照 SDK 和宿主实现核实事实;英文源内容已存在,无需修改英文。保留现有章节锚点,验证完成后提交关联本 issue 的独立 PR。
Seraph-x commentedon Oct 31, 2026
认领 P0:补译
docs/zh-CN/spec/07-plugins/02-plugin-manifest-schema.md缺失的完整Appearance extensions小节,包括强类型主题变量和contributes.scenicThemes的声明、卡片与权限要求。已核对本 issue 发布以来的 PR 及最新认领评论,此小节尚未被其他 PR 补齐。本次单独提交,仅补中文,对照英文与 SDK/宿主实现核实内容;英文源已包含该节,无需同步修改英文。此任务与 #2029 的 API 文档补译分开。
Seraph-x commentedon Oct 31, 2026
I am claiming the accuracy audit of
12-plugin-ipc-and-host-services.mdunder #2000, covering both the English specification and its Simplified Chinese counterpart.I will compare the documented IPC channels, events, permission checks, broker call direction, lifecycle cleanup, failure behavior, and agent-tool dispatch against the shared IPC contracts, Electron handlers/preloads, plugin runtime/process, and host-core implementation. Each factual finding will include documentation and code locations in the PR.
This will be one documentation-only PR, with English and Chinese changes together. Chinese corrections will use professional, idiomatic technical terminology while preserving protocol names and identifiers. Any implementation bugs discovered will be reported separately. This scope is distinct from #2029 and #2031.
docs(zh-CN): translate manifest appearance extensions
15 remaining items
docs(zh-CN): complete plugin development guide translations
docs(zh-CN): complete plugin API section translations
docs(zh-CN): complete marketplace section translations
docs(zh-CN): complete manifest section translations
docs(zh-CN): complete plugin system section translations
docs(zh-CN): complete plugin security section translations
docs(zh-CN): complete plugin center semantic translation audit
Seraph-x commentedon Nov 2, 2026
I am claiming P2: the plugin error-code reference in §4 of
03-plugin-api.md, with matching English and Simplified Chinese updates.I have checked the latest issue claims, all PR file lists since this issue was opened (including unmerged and closed work), and current main. The completed translation/audit PRs do not supply this reference. I will document the runtime and SDK error codes and their actual trigger conditions, distinguish callable errors from audit-only diagnostics, and reference the shared service registries rather than imply a closed enum. Each finding will have documentation and implementation line references in the English PR description. This will be one documentation-only PR, with no implementation changes or document reordering.
Seraph-x commentedon Nov 2, 2026
I am claiming P2: the English–Simplified Chinese plugin terminology glossary, item 6 in the maintainer's remaining-work summary.
I have rechecked current main, the issue's claims and the recent PR file lists; no existing glossary or competing claim/PR covers this task. I will add a paired terminology reference with concise, implementation-verified definitions and contract references, plus links from the two plugin indexes. The scope is plugin authoring terminology, especially Agent versus network proxy, permission versus grant, plugin versus trusted agent extension, and sandbox versus process isolation. Identifiers remain unchanged; this will not rename APIs, rewrite existing documents, or include runtime changes. The English PR draft will include source locations. I will complete local verification and user review before publication.
docs(plugins): document three remaining host error codes
docs(plugins): add English-Chinese terminology glossary
docs(plugins): document three remaining host error codes
docs(plugins): add English-Chinese terminology glossary
Goldloli commentedon Nov 13, 2026
认领剩余的失效引用修复(汇总帖第 3 项前半):
plugin-development.md:495与02-plugin-manifest-schema.md:464指向03-plugin-api.md#projects-workspace-fs,但英文页标题是### projects / workspace / fs(无显式锚点,GitHub 锚为#projects--workspace--fs),链接落空;中文侧两处链接用#工作区-fs,而### 工作区/fs的自动锚是工作区fs,同样落空。计划按仓库既有{#...}锚点惯例,给两侧标题加显式{#projects-workspace-fs},并同步四处链接,中英文成对、单一 PR。docs(plugins): give the projects/workspace/fs section a stable anchor