Skip to content
This repository was archived by the owner on Aug 11, 2026. It is now read-only.

feat(plugin): add progressive manual manifest contract - #48

Merged
fmfsaisai merged 3 commits into
mainfrom
feat/plugin-manual-contract
Aug 9, 2026
Merged

feat(plugin): add progressive manual manifest contract#48
fmfsaisai merged 3 commits into
mainfrom
feat/plugin-manual-contract

Conversation

@fmfsaisai

Copy link
Copy Markdown
Collaborator

动机 / Motivation

为插件提供独立于能力 slot 的渐进披露手册索引,让 Cindy Host 后续可以通过 ghost_manual 按需读取包内 Markdown 工作流,同时保持旧客户端安全降级。

变更类型 / Change type

  • 协议变更(类型/字段/信封/路由语义/常量) / Protocol change (types/fields/envelope/routing/constants)
  • 文档 / Docs
  • 测试 / Tests
  • 其他 / Other

兼容性影响 / Compatibility impact

append-only:在 schema v2 增加可选顶层 manual.items[{dir,name,description}],不进入 slots,不构成权限。旧消费方会忽略未知顶层字段,插件其它能力继续可用;无 manual 的存量插件行为不变,因此不需要提升 manifest schema 版本。首个依赖手册才能正确工作的插件 Release 仍需声明对应 minCindyVersion

约束:items 1–8;name 沿用 skill 的小写连字符规则且最长 64 字符;description 1–300 字符;每单元固定 MANUAL.md 入口,单 Markdown 文件 64 KiB 上限。文件存在性、严格 UTF-8、普通文件与二进制拒收由制品打包/安装侧校验。

「三件套」自查(协议变更必须全部勾选) / The "trio" (required for protocol changes)

  • 类型定义 / Type definitions
  • parse 运行时校验(错误信息带字段路径) / Runtime parse validation (errors carry the field path)
  • 测试(至少 round-trip + 坏帧拒收) / Tests (at least round-trip + bad-frame rejection)
  • 文档(docs/ 对应章节) / Docs (the relevant docs/ section)

检查项 / Checklist

  • 遵循 CONTRIBUTING 的协议演进纪律
  • commit message 符合规范
  • 一个 PR 只做一个逻辑变更
  • 测试 fixture 使用中性占位值
  • pnpm testpnpm typecheck 通过

额外验证:pnpm lintpnpm format:check

Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown

Greptile Summary

本 PR 为 schema v2 增加可选的渐进披露手册索引,并保持旧客户端兼容。

  • 新增 manual.items[{dir,name,description}] 类型、常量及运行时校验。
  • 拒绝 Manual 目录与清单声明文件或 locale 文件发生路径冲突。
  • 补充协议文档以及有效清单、边界条件和坏帧拒收测试。

Confidence Score: 5/5

当前变更看起来可以安全合并。

未发现仍然存在的阻塞性故障,先前指出的 locales 路径约束也已完整写入文档。

Important Files Changed

Filename Overview
packages/plugin-protocol/src/manifest.ts 新增 Manual 清单契约、字段约束、去重和跨字段路径冲突校验,未发现需要继续处理的问题。
packages/plugin-protocol/src/tests/manifest.test.ts 覆盖 Manual 常量、合法清单、字段边界、重复项及双向路径冲突。
docs/plugin-protocol.md 已记录 Manual 契约、制品校验职责及与声明文件和 locales 的双向路径隔离约束。

Reviews (3): Last reviewed commit: "fix(plugin): guard manual declared file ..." | Re-trigger Greptile

Comment thread docs/plugin-protocol.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae2ca8a6d7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/plugin-protocol/src/manifest.ts Outdated
Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f147a7608

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/plugin-protocol/src/manifest.ts Outdated
Comment thread packages/plugin-protocol/src/manifest.ts
Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
@fmfsaisai
fmfsaisai merged commit e891cac into main Aug 9, 2026
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant