Skip to content

feat(plugin): register iOS simulator host slot - #45

Open
horizon554 wants to merge 1 commit into
makecindy:mainfrom
horizon554:feat/ios-simulator-slot
Open

feat(plugin): register iOS simulator host slot#45
horizon554 wants to merge 1 commit into
makecindy:mainfrom
horizon554:feat/ios-simulator-slot

Conversation

@horizon554

Copy link
Copy Markdown
Contributor

动机 / Motivation

为 Cindy Host 托管的内嵌 iOS Simulator 正式登记共享 manifest capability slot,使 Plugin Server、Desktop 与插件作者使用同一白名单和运行时校验,不再依赖消费方私有扩展。

Register a shared manifest capability slot for the Cindy Host-owned embedded iOS Simulator, so Plugin Server, Desktop, and plugin authors use the same allowlist and runtime validation instead of consumer-local extensions.

变更类型 / Change type

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

兼容性影响 / Compatibility impact

这是 schema v2 的严格、append-only slot 扩展,不提升 manifest schema 版本。既有插件不受影响。旧 Plugin Server/Desktop 会对未知 slot fail closed,因此声明 ios-simulator 时强制要求 minCindyVersion;服务端可据 X-Cindy-Version 避免向旧客户端交付不兼容 Release。发布顺序应为:先合并本协议并升级、部署 Plugin Server 与 Cindy Host,再发布使用该 slot 的插件。

This is a strict, append-only schema-v2 slot extension with no manifest schema bump. Existing plugins are unaffected. Older Plugin Server/Desktop builds fail closed on unknown slots, so ios-simulator requires minCindyVersion; the server can use X-Cindy-Version to withhold incompatible releases. The protocol and its server/Host consumers must be deployed before publishing a plugin that declares this slot.

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

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

检查项 / Checklist

  • 遵循 CONTRIBUTING 的协议演进纪律 / Follows CONTRIBUTING's protocol-evolution discipline
  • commit message 符合规范 / Commit messages follow the convention
  • 一个 PR 只做一个逻辑变更 / One logical change per PR
  • 测试 fixture 使用中性占位值(无真实邮箱/组织名/内部标识) / Test fixtures use neutral placeholders
  • pnpm testpnpm typecheck 通过 / pnpm test and pnpm typecheck pass

验证 / Validation

  • pnpm test
  • pnpm typecheck
  • pnpm lint
  • pnpm format:check

Signed-off-by: JiangJiahao <jiangjiahao@xd.com>
@horizon554
horizon554 marked this pull request as ready for review August 7, 2026 09:54
@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown

Greptile Summary

该 PR 为 schema v2 追加 Host 托管的 ios-simulator manifest capability slot,并要求声明该 slot 的插件提供有效的 minCindyVersion

  • 扩展共享 slot 常量与运行时 manifest 校验
  • 增加 manifest round-trip、坏值拒绝及详情响应解析测试
  • 补充能力边界、版本门槛和部署顺序文档

Confidence Score: 5/5

未发现阻塞或非阻塞问题,该 PR 看起来可以安全合并。

新 slot 已同步到类型、严格运行时校验、测试和文档,缺失或非法的版本门槛都会被拒绝,且未发现本仓库内遗漏的相关协议契约。

Important Files Changed

Filename Overview
packages/plugin-protocol/src/manifest.ts 新增 ios-simulator slot,并在既有严格 SemVer 校验基础上强制要求显式版本门槛;未发现可达缺陷。
packages/plugin-protocol/src/tests/manifest.test.ts 覆盖新 slot 的成功往返、缺少版本门槛及未知近似 slot 的拒绝路径。
packages/plugin-protocol/src/tests/delivery.test.ts 验证插件详情解析会完整保留新 slot 与版本门槛字段。
docs/plugin-protocol.md 说明插件权限边界、版本筛选要求、协议包职责边界及消费方部署顺序。

Reviews (1): Last reviewed commit: "feat(plugin): register iOS simulator hos..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant