Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

docs(plugins): complete device sync authoring contract

zqchris859ca09d177d
diff --git a/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-manifest.md b/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-manifest.md
index 5aa5009657..8ef8716408 100644
--- a/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-manifest.md
+++ b/apps/desktop/resources/system-skills/cindy-plugin-creator/references/plugin-manifest.md
@@ -155,7 +155,8 @@ node secretBindings key、setup kv key——都不能使用 `__proto__`、`const
v3 直接用顶层字段声明插件贡献项与自主 Host 能力,不再有 `slots`。带详单的字段是 `tools`、`cindy`、
`agent`、`panel`、`mainView`、`card`、`subscribe`、`network`、`node`、`preview`、
`skill`;布尔能力写成字面量 `true`:`notify`、`badge`、`confirm`、`fs`、
-`library`、`sessionContext`、`pick`、`workspace`。不用的字段直接省略,
+`library`、`deviceSync`、`sessionContext`、`pick`、`workspace`。不用的字段直接省略。
+`deviceSync` 的声明与调用约定见 [§4.10.2 同账号电脑间的插件资料同步](plugin-files-and-library.md#4102-同账号电脑间的插件资料同步)。
邮件插件声明 `mail: true`,调用 Cindy 内置 `cindyMail.register(adapter)`
(version 1),不生成卡片 HTML、不打包公共流程;纯邮件插件不需要 `card`。
阅读邮件可声明 `mailReader:{tool,hosts}`,工具接收 `{url}` 并返回 MailMessage,默认只读。
diff --git a/apps/desktop/src/main/cindy-brain/__tests__/forge.test.ts b/apps/desktop/src/main/cindy-brain/__tests__/forge.test.ts
index ab99e1341a..01d0e2787b 100644
--- a/apps/desktop/src/main/cindy-brain/__tests__/forge.test.ts
+++ b/apps/desktop/src/main/cindy-brain/__tests__/forge.test.ts
@@ -2002,6 +2002,12 @@ describe('FORGE_GUIDE', () => {
it('手册覆盖关键章节(身份卡/工具面/管子/聊天卡片/订阅拦截/网络代发/系统提示/沙箱红线/打包)', () => {
for (const marker of [
'ghost.json',
+ // 2026-10-20 同账号插件资料同步:manifest 声明、API 与结果不明语义同步交付。
+ '`library`、`deviceSync`、`sessionContext`',
+ '4.10.2 同账号电脑间的插件资料同步',
+ '"deviceSync": true',
+ 'cindy.deviceSync',
+ 'SYNC_RESULT_UNKNOWN',
'两段式',
'call_tool',
'tool-result',