Repository navigation
feat(store): 一个仓库发布多个插件时按标签前缀校验和追踪 - #115
Merged
Merged
Conversation
- validate-index:每个条目的 Release 标签必须是同一个前缀加上列出它的版本号, 同一个仓库(不区分大小写)的条目前缀互不相同 - track-releases:只认领带自己前缀的 Release,兄弟插件的 Release 直接忽略、不下载; 标签拆不出版本号或前缀不同时跳过并说明原因;每页读 100 个 Release - 文档:发布指南补标签约定和“一个仓库发布多个插件”,维护者审查清单补对应策略
xiaoyumuxi
marked this pull request as ready for review
November 29, 2026 09:13
This was referenced Nov 29, 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.
改动类型
插件
背景
Lithe-IDEA/lithe-ai-plugins一个仓库发布 Codex 和 Claude Code 两个插件(标签codex-v*、claude-code-v*)。现在的追踪脚本有两个问题:repository读整个仓库的 Release,会把兄弟插件的发布下载下来,再因为包内plugin.json的 ID 不符而拒绝,每 6 小时在日志里报一遍。宿主侧(更新日志、“已安装”标记)的同类问题由 Core Lithe-IDEA/Lithe-core-rust#227 解决:Core 从下载地址里的标签派生
releaseTagPrefix,listReleases按前缀过滤。本 PR 让 Store 使用同一套标签约定。设计
标签约定:Release 标签是
<前缀>MAJOR.MINOR.PATCH。主版本号取版本号前面所有连续数字,前缀不能以数字或.结尾,所以每个标签最多只有一种拆法;规则与 Core 的split_release_tag一致。validate-index.mjs(Store 策略,比 Core 更严):%编码时直接判为不符合。Core 遇到这些情况只把releaseTagPrefix设为null,Store 则把它当作策略错误。track-releases.mjs:plugin.json的版本与标签不符时,由validateIndex拒绝。文档:
docs/publishing.md补了标签约定,新增“一个仓库发布多个插件”一节:docs/maintainers.md的审查清单补了对应的策略。兼容性
v前缀,各自在不同仓库,发布中的索引仍然有效。org.example.zig-tools、io.example.another)改用不同前缀,以符合新策略。验证
node --test scripts/store.test.mjs scripts/plugin-deltas.test.mjsnode scripts/validate-index.mjs lithe-plugin-index.jsonnode scripts/validate-recommendations.mjs lithe-plugin-recommendations.json lithe-plugin-index.jsonGITHUB_TOKEN=… node scripts/track-releases.mjs lithe-plugin-index.json --dry-rungit diff --check自检
plugin.json的vendor.signatureRequirement为"none",ID 不在dev.lithe.*(不涉及)node scripts/validate-index.mjs --verify-archives(索引内容未改,只跑了不下载归档的校验)plugin.json中声明,并在仓库 README 中说明(不涉及)downloadURL/sha256,没有删除历史版本(撤回除外)