release-skill 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codebuddy-plugin/plugin.json +4 -2
- package/.codex-plugin/plugin.json +2 -2
- package/.kimi-plugin/plugin.json +1 -1
- package/CHANGELOG.md +40 -0
- package/INSTALL.md +183 -21
- package/INSTALL.zh-CN.md +160 -16
- package/README.md +112 -13
- package/README.zh-CN.md +72 -11
- package/adapters/claude/.claude-plugin/marketplace.json +1 -1
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +2240 -587
- package/adapters/claude/schemas/release-plan.schema.json +44 -2
- package/adapters/claude/schemas/release-project.schema.json +46 -4
- package/adapters/claude/schemas/release-run.schema.json +1 -0
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/release-skill.bundle.mjs +2240 -587
- package/adapters/codex/schemas/release-plan.schema.json +44 -2
- package/adapters/codex/schemas/release-project.schema.json +46 -4
- package/adapters/codex/schemas/release-run.schema.json +1 -0
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +2240 -587
- package/adapters/kimi/schemas/release-plan.schema.json +44 -2
- package/adapters/kimi/schemas/release-project.schema.json +46 -4
- package/adapters/kimi/schemas/release-run.schema.json +1 -0
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +4 -2
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +2240 -587
- package/adapters/workbuddy/schemas/release-plan.schema.json +44 -2
- package/adapters/workbuddy/schemas/release-project.schema.json +46 -4
- package/adapters/workbuddy/schemas/release-run.schema.json +1 -0
- package/bin/release-skill-cli.mjs +46 -4
- package/bin/release-skill.bundle.mjs +2240 -587
- package/package.json +1 -1
- package/references/02-project-config.md +7 -0
- package/references/06-adapter-contract.md +21 -2
- package/schemas/release-plan.schema.json +44 -2
- package/schemas/release-project.schema.json +46 -4
- package/schemas/release-run.schema.json +1 -0
- package/scripts/sync-public-files.mjs +8 -4
- package/src/adapters/contract.mjs +1 -0
- package/src/adapters/plugin-marketplace.mjs +796 -41
- package/src/commands/assess.mjs +50 -1
- package/src/commands/prepare.mjs +342 -9
- package/src/commands/publish.mjs +1 -0
- package/src/commands/reconcile.mjs +1 -0
- package/src/commands/setup.mjs +7 -3
- package/src/commands/verify.mjs +13 -5
- package/src/core/baseline.mjs +13 -0
- package/src/core/checkpoints.mjs +7 -2
- package/src/core/plan.mjs +275 -4
- package/src/core/verification-gates.mjs +1 -1
- package/src/platforms/codebuddy.mjs +658 -0
- package/src/platforms/registry.mjs +258 -5
- package/src/producers/build-adapters.mjs +30 -15
package/package.json
CHANGED
|
@@ -40,6 +40,13 @@ releaseUnits: # 发布单元数组,至少 1 个
|
|
|
40
40
|
distributions: # 分发渠道数组
|
|
41
41
|
- type: <string> # "npm" | "claude-plugin" | "codex-plugin"
|
|
42
42
|
package: <string> # npm 包名(type 为 npm 时必填)
|
|
43
|
+
# 插件渠道(claude-plugin/codex-plugin/kimi-plugin/codebuddy-plugin)
|
|
44
|
+
# 另含 plugin/marketplace/entrySkill 与可选 timeoutMs。
|
|
45
|
+
marketplaceRepo: <string> # 可选;外部独立市场仓库 owner/name。仅
|
|
46
|
+
# claude-plugin/codex-plugin 可声明,出现即启用外部市场形态:marketplace
|
|
47
|
+
# 索引集中于该外部仓库,插件冻结快照只含 plugin 清单;prepare 在线冻结
|
|
48
|
+
# 市场 HEAD(codex sha 冻 / claude 名冻)。kimi/codebuddy 声明会被 plan
|
|
49
|
+
# 完整性与 prepare 失败关闭。详见 standards/06 §2.3/§2.4。
|
|
43
50
|
publicFiles: # 公开源码镜像的显式闭世界映射
|
|
44
51
|
- from: <string> # 项目根相对路径
|
|
45
52
|
to: <string> # 公开仓库中的发布单元相对路径
|
|
@@ -108,9 +108,23 @@
|
|
|
108
108
|
| 查询插件状态 | observe | 检查插件是否可被发现 |
|
|
109
109
|
| 验证安装性 | verify | 在全新环境中安装并验证插件可调用 |
|
|
110
110
|
|
|
111
|
-
支持目标:Claude Code plugin marketplace、Codex plugin manifest/marketplace、Kimi Code(人工 attestation 闭环)、CodeBuddy/WorkBuddy
|
|
111
|
+
支持目标:Claude Code plugin marketplace、Codex plugin manifest/marketplace、Kimi Code(人工 attestation 闭环)、CodeBuddy/WorkBuddy(人工 attestation 闭环)。
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
**CodeBuddy/WorkBuddy 接入形态(人工 attestation 闭环)**:目录名 `workbuddy` 与平台名 `codebuddy` 指同一目标——build adapter 目录保持 `adapters/workbuddy/`(由 build-adapters 生成的自包含分发适配器,清单 `.codebuddy-plugin/plugin.json`,组件位于插件根,技能以 `${CODEBUDDY_PLUGIN_ROOT}` 渲染),而 platform id / distributionType / actionType 分别为 `codebuddy` / `codebuddy-plugin` / `codebuddy-marketplace-install`。codebuddy CLI 的 `plugin marketplace add` 与 `plugin install` 均无 ref 选项、安装跟踪市场默认分支,**无法钉死冻结 ref**,自动化安装检查点无法保证冻结产物同一性,因此**不采用自动化安装检查点**,改与 Kimi Code 同级的人工 attestation 闭环:
|
|
114
|
+
|
|
115
|
+
- `execute` 不 exec 任何 codebuddy 命令,写出绑定冻结计划摘要与身份的手动安装 requirement(声明桌面端/CLI 双安装通道与统一市场 `ifoohoo/artifact-skill-set`),检查点失败关闭、run 置 `PARTIAL`(其余自动化外写先完成)。
|
|
116
|
+
- 操作者经 **WorkBuddy 桌面端统一市场**(`ifoohoo/artifact-skill-set`,落点 `~/.workbuddy/plugins/marketplaces/artifact-skill-set/plugins/<plugin>/`)或 **codebuddy CLI**(隔离 `HOME` 下 `plugin marketplace add https://github.com/ifoohoo/artifact-skill-set` 再 `plugin install <plugin>@artifact-skill-set`)安装;因无法钉死 ref,出具 attestation 前必须核实已安装清单版本等于冻结版本。
|
|
117
|
+
- `observe`/`verify` 仅消费结构化人工 attestation 并只读核验安装点 manifest:校验 `planDigest`/`payloadDigest` 绑定、`consumer==='codebuddy'`、`installChannel`(`desktop`/`cli`)与 `marketplace`、按通道校验 `installPath` 布局,以及时间窗(`attestedAt` 不在未来、`expiresAt` 在 `attestedAt` 后 24 小时内且未过期),任一不符即 fail-closed;缺失或失配证明时 CodeBuddy 单元绝不进入 `VERIFIED`,与 Kimi 同阶(发布后验证不可豁免)。
|
|
118
|
+
|
|
119
|
+
**外部独立市场形态(claude/codex)**:distribution 声明可选字段 `marketplaceRepo`(`owner/name`)即启用外部形态,marketplace 索引与插件仓库解耦:
|
|
120
|
+
|
|
121
|
+
- **权威分布**:marketplace 索引(`marketplace.json`)集中于外部独立市场仓库(如 `ifoohoo/artifact-skill-set`),插件仓库的冻结快照**只含 plugin 清单**(claude=`.claude-plugin/plugin.json`、codex=`.codex-plugin/plugin.json`),**不含自市场 marketplace.json**。marketplaceAdd 目标即外部市场仓库(action `repo=marketplaceRepo`),`marketplace` 字段为外部市场名(不必等于 unit.id)。
|
|
122
|
+
- **ref 冻结的不对称**(CLI 实测结论):prepare 仅在 `--online` 生产路径经 `git ls-remote --symref` 解析外部市场仓库当前 HEAD,并经 GitHub contents API 校验该 sha 处的索引条目(`name` 匹配、`plugins[]` 中目标插件恰一条、claude 形态 `entry.version` 等于目标版本)后冻结。**codex 能钉裸 commit sha**(`--ref <sha>`,强冻)→ action `ref` 取 HEAD sha;**claude 只能钉分支/tag 名**(`@<sha>` 失败、`@<name>` 成功,且本地不存解析 sha,弱冻)→ action `ref` 取默认分支名。二者**始终**把解析出的 HEAD sha 冻结为 `marketplaceCommitSha`(审计/期望字段;claude 弱冻下它是 prepare 时刻的快照状态)。非在线而声明 `marketplaceRepo` → 失败关闭。外部仓库全程**只读**(`git ls-remote`/`gh api` 读,绝不写)。
|
|
123
|
+
- **载荷权威不变**:安装侧载荷权威仍是**本单元冻结快照整树**(`snapshotPath`/`manifestDigest` 指本单元快照),marketplace 索引只在远端、不进快照权威。校验契约见 §2.4 `external-marketplace-v1`。
|
|
124
|
+
- **时序约束(先市场后插件)**:外部市场索引必须先于插件发布定版——即先在外部市场仓库(artifact-skill-set-workspace 的 `plugins.mjs`)定版并 publish 市场,使索引 `entry.version` 等于目标发布版本(claude 形态强校验该条),prepare 才能冻结到**含该条目**的市场 sha。若市场索引尚未定版到目标版本,prepare 在线索引校验即失败关闭。
|
|
125
|
+
- **范围与边界**:kimi/codebuddy 无 marketplace add 能力,distribution 出现 `marketplaceRepo` 在 plan 完整性与 prepare 均失败关闭;本形态不写外部仓库(市场索引更新属另立项的 Phase B)。
|
|
126
|
+
|
|
127
|
+
### 2.4 安装载荷校验契约(declared-manifest-v1 / external-marketplace-v1)
|
|
114
128
|
|
|
115
129
|
marketplace install action 的安装侧载荷校验以 action 参数 `payloadContract` 选择语义:
|
|
116
130
|
|
|
@@ -120,6 +134,11 @@ marketplace install action 的安装侧载荷校验以 action 参数 `payloadCon
|
|
|
120
134
|
- 判定:**权威方每一条 entry 必须在安装侧存在**,且 `type/size/contentDigest/mode(忽略写位 `& ~0o222`)` 全部一致。缺失、内容篡改、非写位 mode 变化(如可执行位丢失)→ 失败关闭(CONFLICTING),错误信息列出具体冲突路径(前 10 条,超出记总数)。
|
|
121
135
|
- 安装侧多出的文件(宿主 CLI 副产物,如 claude `.in_use`、codex `.git` 检出与 `.codex-plugin/migrated-command-skills/`、以及任何未来新增物)**不视为失败**,收集为相对路径 `extraInstalledPaths`(上限 200 条,超出记录 `extraInstalledPathsTotal` 总数)写入 evidence/observation,供审计与宿主演进观察。
|
|
122
136
|
- 安全性质不降:供应链校验的对象是我方声明拥有的文件;宿主副产物不是我方责任,纳入全等比较只会把宿主行为风险转嫁为发布阻断。
|
|
137
|
+
- **`payloadContract: 'external-marketplace-v1'`**(外部独立市场形态由 prepare 写入,见 §2.3):
|
|
138
|
+
- 权威方 = 冻结快照**整树**(子树解析短路为 `'.'`,**不读任何 marketplace 清单**——外部形态快照本就可无市场清单,索引在远端外部仓库)。
|
|
139
|
+
- 安装侧 = 安装目录的完整文件遍历,**不做任何豁免**。
|
|
140
|
+
- 判定:与 `declared-manifest-v1` **完全相同的包含语义**——权威方每一条 entry 必须在安装侧存在且 `type/size/contentDigest/mode(忽略写位)` 一致,缺失/篡改/非写位 mode 变化失败关闭;安装侧多出文件记 `extraInstalledPaths` 不视为失败。两契约仅权威子树来源不同(declared 经清单声明 source 裁子树,external 整树)。
|
|
141
|
+
- **冻结强度权衡**:`marketplaceCommitSha`(codex sha 冻 / claude 名冻)只冻结**市场索引位置**,其强度**低于摘要密封**——它不密封插件载荷字节。载荷同一性仍由本单元冻结快照摘要(`manifestDigest`)独立保证;索引位置冻结与载荷摘要密封是两条互不替代的链。弱冻 claude 若默认分支漂移致安装版本不符,由**安装侧条目观察比对**补偿(claude `plugin list` version 绑定、codex `crossValidateListEntry` 绑 name/marketplace/version),版本不符即 fail-closed。verify/observe **离线绝不回查远端**,全靠冻结快照 + 本地消费者 CLI list 输出。
|
|
123
142
|
- **缺失 `payloadContract` 字段**(存量已冻结计划):走 legacy 全等语义——安装侧整树(按 `consumerTransportExclusions` 豁免宿主传输元数据后)与权威方逐字节全等,任何差异失败关闭。行为逐字节保持,用于保护旧计划的恢复路径(reconcile/verify)。
|
|
124
143
|
- 未识别的 `payloadContract` 取值 → 失败关闭。
|
|
125
144
|
- `consumerTransportExclusions` 自本契约起 **deprecated**:仅 legacy 分支使用,待平台注册表任务(T2.2)迁入注册表后删除。
|
|
@@ -353,7 +353,8 @@
|
|
|
353
353
|
"npm",
|
|
354
354
|
"claude-plugin",
|
|
355
355
|
"codex-plugin",
|
|
356
|
-
"kimi-plugin"
|
|
356
|
+
"kimi-plugin",
|
|
357
|
+
"codebuddy-plugin"
|
|
357
358
|
]
|
|
358
359
|
},
|
|
359
360
|
"package": {
|
|
@@ -397,6 +398,11 @@
|
|
|
397
398
|
"minLength": 1,
|
|
398
399
|
"pattern": "^[a-z0-9][a-z0-9._-]*$"
|
|
399
400
|
},
|
|
401
|
+
"marketplaceRepo": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
|
|
404
|
+
"description": "外部独立市场仓库 owner/name;存在即启用外部市场形态"
|
|
405
|
+
},
|
|
400
406
|
"entrySkill": {
|
|
401
407
|
"type": "string",
|
|
402
408
|
"minLength": 1,
|
|
@@ -467,6 +473,40 @@
|
|
|
467
473
|
]
|
|
468
474
|
}
|
|
469
475
|
},
|
|
476
|
+
{
|
|
477
|
+
"if": {
|
|
478
|
+
"properties": {
|
|
479
|
+
"type": {
|
|
480
|
+
"const": "codebuddy-plugin"
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"then": {
|
|
485
|
+
"required": [
|
|
486
|
+
"plugin",
|
|
487
|
+
"entrySkill"
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"if": {
|
|
493
|
+
"properties": {
|
|
494
|
+
"type": {
|
|
495
|
+
"enum": [
|
|
496
|
+
"kimi-plugin",
|
|
497
|
+
"codebuddy-plugin"
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"then": {
|
|
503
|
+
"not": {
|
|
504
|
+
"required": [
|
|
505
|
+
"marketplaceRepo"
|
|
506
|
+
]
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
},
|
|
470
510
|
{
|
|
471
511
|
"if": {
|
|
472
512
|
"required": [
|
|
@@ -671,6 +711,7 @@
|
|
|
671
711
|
"claude-marketplace-install",
|
|
672
712
|
"codex-marketplace-install",
|
|
673
713
|
"kimi-marketplace-install",
|
|
714
|
+
"codebuddy-marketplace-install",
|
|
674
715
|
"set-default-branch"
|
|
675
716
|
]
|
|
676
717
|
},
|
|
@@ -797,7 +838,8 @@
|
|
|
797
838
|
"npm",
|
|
798
839
|
"claude-plugin",
|
|
799
840
|
"codex-plugin",
|
|
800
|
-
"kimi-plugin"
|
|
841
|
+
"kimi-plugin",
|
|
842
|
+
"codebuddy-plugin"
|
|
801
843
|
]
|
|
802
844
|
}
|
|
803
845
|
}
|
|
@@ -139,7 +139,8 @@
|
|
|
139
139
|
"npm",
|
|
140
140
|
"claude-plugin",
|
|
141
141
|
"codex-plugin",
|
|
142
|
-
"kimi-plugin"
|
|
142
|
+
"kimi-plugin",
|
|
143
|
+
"codebuddy-plugin"
|
|
143
144
|
]
|
|
144
145
|
},
|
|
145
146
|
"package": {
|
|
@@ -184,6 +185,11 @@
|
|
|
184
185
|
"minLength": 1,
|
|
185
186
|
"pattern": "^[a-z0-9][a-z0-9._-]*$"
|
|
186
187
|
},
|
|
188
|
+
"marketplaceRepo": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
|
|
191
|
+
"description": "外部独立市场仓库 owner/name;存在即启用外部市场形态"
|
|
192
|
+
},
|
|
187
193
|
"entrySkill": {
|
|
188
194
|
"type": "string",
|
|
189
195
|
"minLength": 1,
|
|
@@ -206,7 +212,7 @@
|
|
|
206
212
|
"type": "integer",
|
|
207
213
|
"minimum": 30000,
|
|
208
214
|
"maximum": 900000,
|
|
209
|
-
"description": "Timeout in milliseconds for plugin marketplace install commands (claude-plugin, codex-plugin). Kimi Code has no scriptable install command, so for kimi-plugin this bounds the read-only observation/verification only, not an install command. Only valid for claude-plugin, codex-plugin, and
|
|
215
|
+
"description": "Timeout in milliseconds for plugin marketplace install commands (claude-plugin, codex-plugin). Kimi Code has no scriptable install command, so for kimi-plugin this bounds the read-only observation/verification only, not an install command. CodeBuddy/WorkBuddy has no scriptable install command that can pin a frozen ref, so for codebuddy-plugin this likewise bounds the read-only observation/verification only. Only valid for claude-plugin, codex-plugin, kimi-plugin, and codebuddy-plugin distributions."
|
|
210
216
|
}
|
|
211
217
|
},
|
|
212
218
|
"allOf": [
|
|
@@ -238,7 +244,8 @@
|
|
|
238
244
|
"enum": [
|
|
239
245
|
"claude-plugin",
|
|
240
246
|
"codex-plugin",
|
|
241
|
-
"kimi-plugin"
|
|
247
|
+
"kimi-plugin",
|
|
248
|
+
"codebuddy-plugin"
|
|
242
249
|
]
|
|
243
250
|
}
|
|
244
251
|
}
|
|
@@ -278,6 +285,40 @@
|
|
|
278
285
|
]
|
|
279
286
|
}
|
|
280
287
|
},
|
|
288
|
+
{
|
|
289
|
+
"if": {
|
|
290
|
+
"properties": {
|
|
291
|
+
"type": {
|
|
292
|
+
"const": "codebuddy-plugin"
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"then": {
|
|
297
|
+
"required": [
|
|
298
|
+
"plugin",
|
|
299
|
+
"entrySkill"
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"if": {
|
|
305
|
+
"properties": {
|
|
306
|
+
"type": {
|
|
307
|
+
"enum": [
|
|
308
|
+
"kimi-plugin",
|
|
309
|
+
"codebuddy-plugin"
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"then": {
|
|
315
|
+
"not": {
|
|
316
|
+
"required": [
|
|
317
|
+
"marketplaceRepo"
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
281
322
|
{
|
|
282
323
|
"if": {
|
|
283
324
|
"required": [
|
|
@@ -824,7 +865,8 @@
|
|
|
824
865
|
"npm",
|
|
825
866
|
"claude-plugin",
|
|
826
867
|
"codex-plugin",
|
|
827
|
-
"kimi-plugin"
|
|
868
|
+
"kimi-plugin",
|
|
869
|
+
"codebuddy-plugin"
|
|
828
870
|
]
|
|
829
871
|
}
|
|
830
872
|
}
|
|
@@ -261,8 +261,10 @@ async function collectEntries() {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
// Adapter directory files
|
|
265
|
-
|
|
264
|
+
// Adapter directory files. The adapter directory follows the build adapter
|
|
265
|
+
// NAME, which may differ from the pipeline platform id: codebuddy (id)
|
|
266
|
+
// builds adapters/workbuddy/ (buildAdapter.name = 'workbuddy').
|
|
267
|
+
const adapterDir = `adapters/${platform.buildAdapter?.name ?? platform.id}`;
|
|
266
268
|
const adapterDirPrefix = `${adapterDir}/`;
|
|
267
269
|
for (const f of allFiles) {
|
|
268
270
|
if (f.startsWith(adapterDirPrefix)) {
|
|
@@ -271,9 +273,11 @@ async function collectEntries() {
|
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
275
|
|
|
274
|
-
// Build-only distribution adapters (
|
|
276
|
+
// Build-only distribution adapters (BUILD_ONLY_ADAPTERS): not publish-pipeline
|
|
275
277
|
// platforms, but their generated adapter trees and root manifests ship
|
|
276
|
-
// publicly just like the pipeline platforms'.
|
|
278
|
+
// publicly just like the pipeline platforms'. Currently empty — workbuddy
|
|
279
|
+
// moved into the registry as the `codebuddy` platform (handled above via its
|
|
280
|
+
// buildAdapter.name); this loop is retained for future build-only hosts.
|
|
277
281
|
for (const adapter of BUILD_ONLY_ADAPTERS) {
|
|
278
282
|
const rootManifest = `${adapter.pluginDirName}/${adapter.templateFileName}`;
|
|
279
283
|
if (allSet.has(rootManifest)) {
|
|
@@ -60,6 +60,7 @@ export const ActionType = Object.freeze({
|
|
|
60
60
|
CLAUDE_MARKETPLACE_INSTALL: 'claude-marketplace-install',
|
|
61
61
|
CODEX_MARKETPLACE_INSTALL: 'codex-marketplace-install',
|
|
62
62
|
KIMI_MARKETPLACE_INSTALL: 'kimi-marketplace-install',
|
|
63
|
+
CODEBUDDY_MARKETPLACE_INSTALL: 'codebuddy-marketplace-install',
|
|
63
64
|
|
|
64
65
|
// default branch management
|
|
65
66
|
SET_DEFAULT_BRANCH: 'set-default-branch',
|