Files
cindy/docs/dev-rules/protocol-compatibility/plugin-provided-models.md
Dash e405db1be9 docs(dev-rules): 协议兼容拆成必读规则页与每项能力一份记录
protocol-compatibility.md 已长到 555 KB、194 节:文档抬头落在第 1290 行,
§1 的规则被挤到无关小节下面,Review 清单在第 3967 行。每个协议改动都要求
先读它,但没有 Agent 能读完;新记录又都往同一处插,近 30 天 453 次提交改这
一个文件,彼此反复冲突。

- 原页只留对所有跨端改动都成立的规则(事实来源、§1–§3、自建中转同步维护、
  Review 清单),10 KB;新增一节说明检索与新增记录的做法。
- 205 项能力记录各占 protocol-compatibility/ 下一个文件,正文逐行保留,只
  提升标题层级并修正相对链接;11 个挂在无关章节下的小节独立成篇。
- 7 处「上一节/见下文」改为指向具体文件;其他文档里 29 处按章节名或锚点
  的引用改指新文件。
- dev-docs 契约新增一条:规则页不超过 16 KB、记录一文件一标题,防止再次堆回。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-11 00:33:32 +13:00

17 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 插件提供的模型(2026-11-01)
> 通用规则与 Review 清单见[跨端协议兼容](../protocol-compatibility.md);本文件只记录这一项能力的协议约定。
清单新增可选 `models: { types }`,只声明能力;旧 Host 把它当未知字段保留,不授权也不阻止安装。列表由插件经
`PUT /models` 运行时发布,Host 校验后存到 `ghost-published-models`,选择器只读这份记录,不调用插件。不认识的
`target.type` 跳过该项,其余照常显示,所以新版插件在旧一点的 Host 上仍可用支持的模型。
插件 `event-verdict` 新增 `action: 'route'` 与 `route: { agentKind, model, providerId, effort?, agentDeviceId? }`,只在控制节点
`will-start-task` 生效;询问数据带 `modelId`(用户选的已发布模型)。旧 Host 丢弃不认识的 action,插件按超时处理
(沿用原模型)。新增本机专用 IPC `ghosts:models:list` 与 `ghosts:start-task:route`,不进 device-link allowlist。
新任务草稿(本机 `localStorage`)新增 `pluginModel: { pluginId, modelId } | null`,只在本机草稿使用,不同步、
不上传;远程电脑、SSH 主机、多 Agent 协同草稿不提供。`route` 模型不进执行目录:定时任务、伙伴、协同 worker 和
Mobile 看到的仍只有真实模型。首条消息后写一条空正文 assistant 消息,
`agentMeta.pluginModelRoute = { pluginName, outcome: 'routed' | 'kept', modelName, effort?, reason?, why? }`,
Desktop 与 Mobile 渲染为系统说明行;旧端没有对应渲染,按普通的空 assistant 消息处理;历史投影不计入正文。