release-skill 0.9.13 → 0.9.14
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/plugin.json +1 -1
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/.kimi-plugin/plugin.json +1 -1
- package/CHANGELOG.md +24 -0
- package/INSTALL.md +2 -2
- package/INSTALL.zh-CN.md +2 -2
- package/README.md +33 -11
- package/README.zh-CN.md +27 -11
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +1141 -694
- package/adapters/claude/schemas/release-plan.schema.json +41 -1
- package/adapters/claude/schemas/release-project.schema.json +40 -0
- package/adapters/claude/skills/release-finish/SKILL.md +1 -1
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/release-skill.bundle.mjs +1141 -694
- package/adapters/codex/schemas/release-plan.schema.json +41 -1
- package/adapters/codex/schemas/release-project.schema.json +40 -0
- package/adapters/codex/skills/release-finish/SKILL.md +1 -1
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +1141 -694
- package/adapters/kimi/schemas/release-plan.schema.json +41 -1
- package/adapters/kimi/schemas/release-project.schema.json +40 -0
- package/adapters/kimi/skills/release-finish/SKILL.md +1 -1
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +1141 -694
- package/adapters/workbuddy/schemas/release-plan.schema.json +41 -1
- package/adapters/workbuddy/schemas/release-project.schema.json +40 -0
- package/adapters/workbuddy/skills/release-finish/SKILL.md +1 -1
- package/bin/release-skill-cli.mjs +26 -10
- package/bin/release-skill.bundle.mjs +1141 -694
- package/package.json +1 -1
- package/platform-manifest.json +4 -4
- package/references/02-project-config.md +10 -0
- package/references/05-evidence-and-errors.md +2 -1
- package/schemas/release-plan.schema.json +41 -1
- package/schemas/release-project.schema.json +40 -0
- package/skills/release-finish/SKILL.md +1 -1
- package/skills-src/release-finish/SKILL.md +1 -1
- package/src/commands/post-release-local.mjs +73 -3
- package/src/commands/prepare.mjs +56 -0
- package/src/core/postpublish.mjs +51 -0
- package/src/core/run-retention.mjs +227 -0
- package/src/core/run.mjs +10 -1
|
@@ -1465,6 +1465,9 @@
|
|
|
1465
1465
|
"const": "tag-worktree",
|
|
1466
1466
|
"description": "时序契约:载荷只能来自 tagCommit 处的 detached worktree,绝不读取工作区状态"
|
|
1467
1467
|
},
|
|
1468
|
+
"localHostUpdate": {
|
|
1469
|
+
"$ref": "#/definitions/planLocalHostUpdate"
|
|
1470
|
+
},
|
|
1468
1471
|
"executionBundle": {
|
|
1469
1472
|
"type": "object",
|
|
1470
1473
|
"description": "冻结的私有执行包(F-01/T1):closure 直接采用 Foundation computeResourceClosure() 的返回(排序、去重、受收容读取与摘要均由 Foundation 完成),publicFiles 是从发布单元投影的公开映射。计划是该执行包的唯一事实源:随整个 plan digest 绑定,不维护平行 manifest,也不另造 bundle digest。字节写入计划权威 .release-skill 的 postpublish-bundles/<closure.digest>/<resource.path>;distribute/postVerify 在任何 hook/外部写之前经 Foundation 严格复验并重算闭包,任何不一致即失败。",
|
|
@@ -1598,7 +1601,44 @@
|
|
|
1598
1601
|
}
|
|
1599
1602
|
}
|
|
1600
1603
|
}
|
|
1601
|
-
]
|
|
1604
|
+
],
|
|
1605
|
+
"allOf": [{
|
|
1606
|
+
"if": { "required": ["localHostUpdate"] },
|
|
1607
|
+
"then": {
|
|
1608
|
+
"required": ["hooks"],
|
|
1609
|
+
"properties": {
|
|
1610
|
+
"hooks": {
|
|
1611
|
+
"contains": { "type": "object", "required": ["phase"], "properties": { "phase": { "const": "postVerify" } } }
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}]
|
|
1616
|
+
},
|
|
1617
|
+
"planLocalHostUpdate": {
|
|
1618
|
+
"type": "object",
|
|
1619
|
+
"additionalProperties": false,
|
|
1620
|
+
"required": ["plugin", "hosts", "hub"],
|
|
1621
|
+
"properties": {
|
|
1622
|
+
"plugin": { "type": "string", "minLength": 1, "pattern": ".*\\S.*" },
|
|
1623
|
+
"hosts": {
|
|
1624
|
+
"type": "array",
|
|
1625
|
+
"minItems": 1,
|
|
1626
|
+
"uniqueItems": true,
|
|
1627
|
+
"items": { "type": "string", "enum": ["claude", "codex", "kimi", "codebuddy", "workbuddy"] }
|
|
1628
|
+
},
|
|
1629
|
+
"hub": { "$ref": "#/definitions/planLocalHostHub" }
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
"planLocalHostHub": {
|
|
1633
|
+
"type": "object",
|
|
1634
|
+
"additionalProperties": false,
|
|
1635
|
+
"required": ["name", "repo", "ref"],
|
|
1636
|
+
"properties": {
|
|
1637
|
+
"name": { "type": "string", "minLength": 1, "pattern": ".*\\S.*" },
|
|
1638
|
+
"githubHost": { "type": "string", "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?$" },
|
|
1639
|
+
"repo": { "type": "string", "pattern": "^[A-Za-z0-9._-]+\\/[A-Za-z0-9._-]+$" },
|
|
1640
|
+
"ref": { "type": "string", "pattern": "^refs\\/heads\\/[A-Za-z0-9][A-Za-z0-9._-]*(?:\\/[A-Za-z0-9][A-Za-z0-9._-]*)*$" }
|
|
1641
|
+
}
|
|
1602
1642
|
},
|
|
1603
1643
|
"planPostPublishHook": {
|
|
1604
1644
|
"type": "object",
|
|
@@ -1008,7 +1008,47 @@
|
|
|
1008
1008
|
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
|
|
1009
1009
|
},
|
|
1010
1010
|
"uniqueItems": true
|
|
1011
|
+
},
|
|
1012
|
+
"localHostUpdate": {
|
|
1013
|
+
"$ref": "#/definitions/localHostUpdate"
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
"allOf": [{
|
|
1017
|
+
"if": { "required": ["localHostUpdate"] },
|
|
1018
|
+
"then": {
|
|
1019
|
+
"required": ["hooks"],
|
|
1020
|
+
"properties": {
|
|
1021
|
+
"hooks": {
|
|
1022
|
+
"contains": { "type": "object", "required": ["phase"], "properties": { "phase": { "const": "postVerify" } } }
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1011
1025
|
}
|
|
1026
|
+
}]
|
|
1027
|
+
},
|
|
1028
|
+
"localHostUpdate": {
|
|
1029
|
+
"type": "object",
|
|
1030
|
+
"additionalProperties": false,
|
|
1031
|
+
"required": ["plugin", "hosts", "hub"],
|
|
1032
|
+
"properties": {
|
|
1033
|
+
"plugin": { "type": "string", "minLength": 1, "pattern": ".*\\S.*" },
|
|
1034
|
+
"hosts": {
|
|
1035
|
+
"type": "array",
|
|
1036
|
+
"minItems": 1,
|
|
1037
|
+
"uniqueItems": true,
|
|
1038
|
+
"items": { "type": "string", "enum": ["claude", "codex", "kimi", "codebuddy", "workbuddy"] }
|
|
1039
|
+
},
|
|
1040
|
+
"hub": { "$ref": "#/definitions/localHostHub" }
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
"localHostHub": {
|
|
1044
|
+
"type": "object",
|
|
1045
|
+
"additionalProperties": false,
|
|
1046
|
+
"required": ["name", "repo", "ref"],
|
|
1047
|
+
"properties": {
|
|
1048
|
+
"name": { "type": "string", "minLength": 1, "pattern": ".*\\S.*" },
|
|
1049
|
+
"githubHost": { "type": "string", "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?$" },
|
|
1050
|
+
"repo": { "type": "string", "pattern": "^[A-Za-z0-9._-]+\\/[A-Za-z0-9._-]+$" },
|
|
1051
|
+
"ref": { "type": "string", "pattern": "^refs\\/heads\\/[A-Za-z0-9][A-Za-z0-9._-]*(?:\\/[A-Za-z0-9][A-Za-z0-9._-]*)*$" }
|
|
1012
1052
|
}
|
|
1013
1053
|
},
|
|
1014
1054
|
"postPublishHook": {
|
|
@@ -35,7 +35,7 @@ node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
|
35
35
|
|
|
36
36
|
1. `merge.promptRequired=false` 时,发布工作流已经推进或初始化目标分支,不再询问合并。
|
|
37
37
|
2. `merge.promptRequired=true` 时,向用户说明尚未覆盖的发布分支,并询问是否需要合并。用户同意后,先只读核对源分支、目标分支、工作区状态和项目既有合并方式,再用明确的分支名执行;本脚本不猜分支,也不自动推送。
|
|
38
|
-
3. `localHostUpdate.promptRequired=true`
|
|
38
|
+
3. `localHostUpdate.promptRequired=true` 时,列出计划覆盖的宿主,询问是否更新本机插件。Hub-backed 目标必须显示其声明的 Hub、插件和宿主,并明确这是人工安装/升级入口,不运行本机命令;Claude/Codex 使用现有 marketplace 管理入口,Kimi 使用冻结 GitHub Release 和现有人工确认路径,CodeBuddy/WorkBuddy 明确人工处理且不能固定 Hub ref。后续“用户同意更新”段仅适用于 `available=true` 的 executable externalActions 目标;Hub-backed 始终人工入口。两个问题可以一次问完。
|
|
39
39
|
|
|
40
40
|
## postVerify 提案送达边界
|
|
41
41
|
|
|
@@ -39,6 +39,14 @@ const execFile = promisify(execFileCb);
|
|
|
39
39
|
|
|
40
40
|
const COMMANDS = new Set(['help', 'setup', 'assess', 'prepare', 'approve', 'publish', 'reconcile', 'verify', 'postverify', 'ship', 'post-release', 'attest', 'hooks', 'artifacts', 'docs', 'distribute', 'route', 'lineage']);
|
|
41
41
|
|
|
42
|
+
function printHubManualTargets(targets = []) {
|
|
43
|
+
for (const target of targets) {
|
|
44
|
+
if (target.targetKind === 'hub-backed') {
|
|
45
|
+
console.log(`Manual host update: ${target.plugin} via Hub ${target.hub.name} (${target.host}). ${target.message}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
/**
|
|
43
51
|
* Wait until writes already queued on a process output stream have reached
|
|
44
52
|
* the underlying destination. Stream failures do not replace the command's
|
|
@@ -943,10 +951,13 @@ if (command === 'ship') {
|
|
|
943
951
|
console.log('Post-release: branch advancement was already included; skip the merge question.');
|
|
944
952
|
}
|
|
945
953
|
const localHostUpdate = result.postRelease.localHostUpdate;
|
|
946
|
-
if (localHostUpdate?.
|
|
954
|
+
if (localHostUpdate?.promptRequired === true) {
|
|
947
955
|
console.log(`Post-release: ask whether to update local host plugins (${result.postRelease.localHostUpdate.hosts.join(', ')}).`);
|
|
948
|
-
|
|
949
|
-
|
|
956
|
+
if (localHostUpdate.available === true && typeof localHostUpdate.runPath === 'string') {
|
|
957
|
+
console.log(`Post-release command: release-skill post-release --plan ${result.planPath} --run ${localHostUpdate.runPath}`);
|
|
958
|
+
console.log('Choose --hosts before adding --update-local-hosts to perform a local update.');
|
|
959
|
+
}
|
|
960
|
+
printHubManualTargets(localHostUpdate.targets);
|
|
950
961
|
} else {
|
|
951
962
|
for (const step of localHostUpdate?.nextSteps ?? []) {
|
|
952
963
|
console.log(`Next [${step.code}] ${step.message} (${step.argv.join(' ')})`);
|
|
@@ -1404,10 +1415,13 @@ if (command === 'post-release') {
|
|
|
1404
1415
|
console.log(`Post-release status: ${result.status}`);
|
|
1405
1416
|
if (result.merge.promptRequired) console.log('Ask whether the user wants to merge the remaining branch.');
|
|
1406
1417
|
else console.log('Branch advancement was already included in the release workflow; skip the merge question.');
|
|
1407
|
-
if (result.localHostUpdate.
|
|
1418
|
+
if (result.localHostUpdate.promptRequired === true) {
|
|
1408
1419
|
console.log(`Ask whether to update local host plugins: ${result.localHostUpdate.hosts.join(', ')}`);
|
|
1409
|
-
|
|
1410
|
-
|
|
1420
|
+
if (result.localHostUpdate.available === true && typeof result.localHostUpdate.runPath === 'string') {
|
|
1421
|
+
console.log(`Post-release command: release-skill post-release --plan ${planPath} --run ${result.localHostUpdate.runPath}`);
|
|
1422
|
+
console.log('Choose --hosts before adding --update-local-hosts to perform a local update.');
|
|
1423
|
+
}
|
|
1424
|
+
printHubManualTargets(result.localHostUpdate.targets);
|
|
1411
1425
|
} else {
|
|
1412
1426
|
for (const step of result.localHostUpdate.nextSteps ?? []) {
|
|
1413
1427
|
console.log(`Next [${step.code}] ${step.message} (${step.argv.join(' ')})`);
|
|
@@ -1516,11 +1530,13 @@ if (command === 'verify') {
|
|
|
1516
1530
|
} else if (result.postRelease?.merge.promptRequired) {
|
|
1517
1531
|
console.log('Post-release: ask whether to merge the remaining branch.');
|
|
1518
1532
|
}
|
|
1519
|
-
if (result.postRelease?.localHostUpdate?.
|
|
1520
|
-
&& typeof result.postRelease.localHostUpdate.runPath === 'string') {
|
|
1533
|
+
if (result.postRelease?.localHostUpdate?.promptRequired === true) {
|
|
1521
1534
|
console.log(`Post-release: ask whether to update local host plugins (${result.postRelease.localHostUpdate.hosts.join(', ')}).`);
|
|
1522
|
-
|
|
1523
|
-
|
|
1535
|
+
if (result.postRelease.localHostUpdate.available === true && typeof result.postRelease.localHostUpdate.runPath === 'string') {
|
|
1536
|
+
console.log(`Post-release command: release-skill post-release --plan ${planPath} --run ${result.postRelease.localHostUpdate.runPath}`);
|
|
1537
|
+
console.log('Choose --hosts before adding --update-local-hosts to perform a local update.');
|
|
1538
|
+
}
|
|
1539
|
+
printHubManualTargets(result.postRelease.localHostUpdate.targets);
|
|
1524
1540
|
} else {
|
|
1525
1541
|
for (const step of result.postRelease?.localHostUpdate?.nextSteps ?? []) {
|
|
1526
1542
|
console.log(`Next [${step.code}] ${step.message} (${step.argv.join(' ')})`);
|