Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(plugins): 同步发布提示断言并澄清失败处理
liugaoweid1db18fea9e7
diff --git a/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-packaging.md b/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-packaging.mdindex fec14ce6bf..ae54e088e6 100644--- a/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-packaging.md+++ b/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-packaging.md@@ -127,7 +127,7 @@ plugin_id、release_id、sha256 和 revision;取消保留版本与记录,当提交返回本次进度标识,用 `ghost_contribution_status({ local_id })` 查询到本次动作结束。202 / processing 仅表示提交仍在处理,不等于待审核;结束后用 `ghost_my_plugins` 查看审核结果。-没有上传记录列表或 resume 参数。不要自行重复提交;网络结果尚未确认时,Host 在下一次正常提交中先核对同一服务端请求,避免重复提审。+没有上传记录列表或 resume 参数。提交失败后先用 `ghost_my_plugins` 核对该版本是否已有提审记录;已受理则查看真实审核结果,不绕过版本或待审限制再次提交。仅预检仍允许提审时,Host 才沿既有防重复处理核对尚未确认的同包请求。只有服务端回执、实际审核及市场可用事实才能说明已提审、已通过或已上架。`ghost_my_plugins` 的 plugin_id 读详情,submission_id 读精确留存包内容,cursor 为分页。diff --git a/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginPage.navigation.test.tsx b/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginPage.navigation.test.tsxindex bed1292df0..6ace0d4a90 100644--- a/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginPage.navigation.test.tsx+++ b/apps/desktop/src/renderer/features/plugin/__tests__/GhostPluginPage.navigation.test.tsx@@ -1063,7 +1063,8 @@ describe('plugin use details and independent author management', () => {expect(await screen.findByRole('button', { name: `${prefix}.submitVersion` })).toHaveProperty('disabled', false);expect(within(picker).getByText('Checked update notes')).toBeTruthy();} else {- expect(await screen.findByText('Missing release notes')).toBeTruthy();+ expect(await within(picker).findByText(`${prefix}.errors.RELEASE_NOTES_REQUIRED`)).toBeTruthy();+ expect(within(picker).queryByText('Missing release notes')).toBeNull();expect(screen.queryByRole('button', { name: `${prefix}.submitUpdate` })).toBeNull();expect(screen.queryByRole('button', { name: `${prefix}.submitVersion` })).toBeNull();}diff --git a/docs/plugin-community-contribution.md b/docs/plugin-community-contribution.mdindex 5d33232597..9923213fd6 100644--- a/docs/plugin-community-contribution.md+++ b/docs/plugin-community-contribution.md@@ -57,7 +57,7 @@ Host 固定并再核对当前安装内容,不弹保存或选文件框,不另- 包快照沿 `exportGhostPackage.ts` 和既有 inspect 校验,固定实际安装字节;系统导出保持原行为。临时包只属于当前预览或本次提交,不建立持久包历史。- `api.ts` 沿 Main 当前账号的 Auth Access Token 与可信 issuer 核验,token 的 sub/ctx 必须匹配当前登录身份;服务端验签并判定 public 权限,不借用其他账号或 Platform 身份。- Main 统一执行准备上传票据、上传和提交;页面及 Agent 只跟随本次进度。prepare 与 PUT 不会创建待审版本,失败后释放临时包,不保存可恢复上传任务。-- 发送 commit 前仅记录尚未确认请求的服务端 operationId、目标/包摘要及安装绑定;响应丢失时,下一次正常提交先查询原请求,必要时提交同一 operation,不重复上传。确定终态后清除该记录,不保留完整回执、本地 phase/stage 或终态历史。+- 发送 commit 前仅记录尚未确认请求的服务端 operationId、目标/包摘要及安装绑定;响应丢失后先在发布管理核对该版本是否已有提审记录。已受理的版本沿本人列表/详情查看真实审核结果,不绕过版本或待审限制再次提交;仅预检仍允许提审时,主机才先查询原请求,必要时提交同一 operation,不重复上传。确定终态后清除该记录,不保留完整回执、本地 phase/stage 或终态历史。- 未确认记录按账号隔离,不保存 Bearer、PUT 票据或临时包路径,不读取持久文件里的路径执行清理。共用 userData 的 passive 实例不能写入;页面、登录和应用重启不自动提交。普通对话结束后当前已授权提交可继续,账号、任务权限或安装变化仍阻止后续写入。202 只是处理中。只有服务器成功操作附带完整回执,才解释 `submitted_for_review`、`metadata_updated`diff --git a/packages/cindy-tools/src/ghost/mcpServer.ts b/packages/cindy-tools/src/ghost/mcpServer.tsindex 784d15afe4..864cc2d109 100644--- a/packages/cindy-tools/src/ghost/mcpServer.ts+++ b/packages/cindy-tools/src/ghost/mcpServer.ts@@ -1548,7 +1548,7 @@ export function createCindyGhostsMcpServer(inputSchema: z.object({ ghost_id: contributionId, namespace: ghostNamespaceInput }).strict() },async ({ ghost_id, namespace }) => contribute({ action: 'prepare', ghostId: ghost_id, namespace }));server.registerTool('ghost_contribution_submit', {- description: '把 ghost_contribution_prepare 刚准备的确切插件提交审核。用户已明确委托公开发布时沿当前任务的 Full Access / Auto / Ask 权限执行,不额外要求用户重新授权或最后手动点击;只有安装委托不等于发布委托。不接受文件路径、独立文案、账号或票据。返回本次提交的进度标识,接 ghost_contribution_status 查询到结束;202/处理中不等于已提交审核。不要自行重复发起提交;Host 内部核对尚未确认的同包请求。权限拒绝时说明原因并停止,不改权限模式重试。官方 public 插件须通过 GitHub 仓库提交修改,以保证源码完整、便于维护;客户端与 Agent 工具均不得提审。',+ description: '把 ghost_contribution_prepare 刚准备的确切插件提交审核。用户已明确委托公开发布时沿当前任务的 Full Access / Auto / Ask 权限执行,不额外要求用户重新授权或最后手动点击;只有安装委托不等于发布委托。不接受文件路径、独立文案、账号或票据。返回本次提交的进度标识,接 ghost_contribution_status 查询到结束;202/处理中不等于已提交审核。提交失败后先用 ghost_my_plugins 核对该版本是否已有提审记录,已受理则查看真实审核结果,不绕过版本或待审限制再次提交;仅预检仍允许提审时 Host 才核对尚未确认的同包请求。权限拒绝时说明原因并停止,不改权限模式重试。官方 public 插件须通过 GitHub 仓库提交修改,以保证源码完整、便于维护;客户端与 Agent 工具均不得提审。',inputSchema: z.object({ prepared_id: contributionId }).strict() },async ({ prepared_id }) => contribute({ action: 'submit', id: prepared_id }));server.registerTool('ghost_contribution_status', {