Repository navigation
feat!: 索引和校验切到插件契约 v0,撤下旧契约条目 - #58
Merged
Merged
Conversation
插件契约在 Core PR #17 把所有格式版本归零。Store 整份切到 v0: - validate-index.mjs:索引 schemaVersion 必须是 0;版本项 pluginAPIVersion 为非负整数, requires 必填、非空、能力版本为非负整数;归档校验拒绝 schemaVersion 或 pluginAPIVersion 不是 0 的包(plugin.schema.unsupported / plugin.api.unsupported)。 - track-releases.mjs:版本项始终写入 requires,按 v0 索引校验。 - fixtures 换成 Core shared/plugins/contract/v1/fixtures/marketplace 的 v0 副本,测试按 v0 重写。 - validate.yml 对照 Core 仓库的 plugin-index.schema.json,不再指向已退役的 lithe-plugin-docs。 - lithe-plugin-index.json 改为 schemaVersion 0,撤下全部旧契约(插件 API 1–4)条目; README 总览随之重新生成。 - 文档改指向 Core shared/plugins,并在 maintainers.md 记录这次切换与旧版 Lithe 的影响。 旧版 macOS Lithe 会拒绝整份索引,插件市场不再能读取 Lithe Store。
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动类型
撤回原因:插件契约在 Core PR Lithe-IDEA/Lithe-core-rust#17 把所有格式版本归零(索引
schemaVersion0、清单schemaVersion0、pluginAPIVersion0、能力版本 0)。现有条目都是旧契约(插件 API 1–4)的包,新版桌面端(desktop-v*)装不了,所以整份索引切到 v0 并撤下全部旧条目。各插件按 v0 重新发布后(从 0.0.1 开始)再逐个收录。改动内容
scripts/validate-index.mjsschemaVersion必须是 0,否则报plugin.index.schemaUnsupported。pluginAPIVersion为非负整数,非 0 表示当前宿主不可用而不是无效,与 Core 的索引规则一致。requires必填且非空,能力 ID 匹配^[a-z][A-Za-z0-9]{0,63}$,版本为非负整数。checkManifest)拒绝schemaVersion或pluginAPIVersion不是 0 的包,错误码为plugin.schema.unsupported/plugin.api.unsupported。自动追踪逐个 Release 资产调用它,所以旧契约的 Release 不会被收录。scripts/track-releases.mjs:版本项始终写入排好序的requires,并按 v0 索引校验。scripts/fixtures/{index,invalid-index-entries}.json:换成 Coreshared/plugins/contract/v1/fixtures/marketplace的 v0 副本。scripts/store.test.mjs按 v0 重写。.github/workflows/validate.yml:schema 改为对照 Core 仓库的plugin-index.schema.json(固定 SHA-256),不再指向已退役的 lithe-plugin-docs。schema 取不到(404)时改为报错退出。lithe-plugin-index.json:改为{"schemaVersion": 0, "plugins": []}。README 的插件总览随之重新生成。README.md、CONTRIBUTING.md、docs/publishing.md、docs/versioning-and-updates.md、docs/maintainers.md改为指向 Coreshared/plugins,写明 v0 规则、requires字段和预发布手工收录流程。docs/maintainers.md还记录了这次切换和它对旧版 Lithe 的影响。影响:旧版 macOS Lithe 会拒绝整份索引,它的插件市场无法再读取 Lithe Store。已装的插件不受影响。
合并顺序:插件仓库的 CI 会克隆 Store
main,并导入checkManifest检查包。所以这个 PR 要先合,Go、LLDB、Maven 的 v0 PR 才能通过 CI。插件
自检
plugin.json的vendor.signatureRequirement为"none",ID 不在dev.lithe.*(索引为空)node scripts/validate-index.mjs --verify-archivesplugin.json中声明,并在仓库 README 中说明(不适用)downloadURL/sha256,没有删除历史版本(撤回除外)本地验证:
node --test scripts/store.test.mjs52/52 通过;node scripts/validate-index.mjs --verify-archives通过。