release-skill 0.6.2 → 0.7.0

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.
Files changed (112) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codebuddy-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/CHANGELOG.md +48 -0
  7. package/CONTRIBUTING.md +1 -1
  8. package/INSTALL.md +47 -2
  9. package/INSTALL.zh-CN.md +29 -2
  10. package/README.md +137 -12
  11. package/README.zh-CN.md +110 -9
  12. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  13. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  14. package/adapters/claude/bin/error-codes.json +1 -1
  15. package/adapters/claude/bin/kernel-protocol.json +1 -1
  16. package/adapters/claude/bin/license-texts/Apache-2.0.txt +201 -0
  17. package/adapters/claude/bin/license-texts/MIT.txt +21 -0
  18. package/adapters/claude/bin/registry.json +64 -1
  19. package/adapters/claude/bin/release-skill.bundle.mjs +50570 -42208
  20. package/adapters/claude/bin/rules.json +1 -1
  21. package/adapters/claude/schemas/.render-manifest.json +10 -6
  22. package/adapters/claude/schemas/postpublish-approval-record.schema.json +47 -0
  23. package/adapters/claude/schemas/release-plan.schema.json +200 -4
  24. package/adapters/claude/schemas/release-project.schema.json +86 -5
  25. package/adapters/claude/schemas/release-run.schema.json +11 -6
  26. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  27. package/adapters/codex/bin/error-codes.json +1 -1
  28. package/adapters/codex/bin/kernel-protocol.json +1 -1
  29. package/adapters/codex/bin/license-texts/Apache-2.0.txt +201 -0
  30. package/adapters/codex/bin/license-texts/MIT.txt +21 -0
  31. package/adapters/codex/bin/registry.json +64 -1
  32. package/adapters/codex/bin/release-skill.bundle.mjs +50570 -42208
  33. package/adapters/codex/bin/rules.json +1 -1
  34. package/adapters/codex/schemas/.render-manifest.json +10 -6
  35. package/adapters/codex/schemas/postpublish-approval-record.schema.json +47 -0
  36. package/adapters/codex/schemas/release-plan.schema.json +200 -4
  37. package/adapters/codex/schemas/release-project.schema.json +86 -5
  38. package/adapters/codex/schemas/release-run.schema.json +11 -6
  39. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  40. package/adapters/kimi/bin/error-codes.json +1 -1
  41. package/adapters/kimi/bin/kernel-protocol.json +1 -1
  42. package/adapters/kimi/bin/license-texts/Apache-2.0.txt +201 -0
  43. package/adapters/kimi/bin/license-texts/MIT.txt +21 -0
  44. package/adapters/kimi/bin/registry.json +64 -1
  45. package/adapters/kimi/bin/release-skill.bundle.mjs +50570 -42208
  46. package/adapters/kimi/bin/rules.json +1 -1
  47. package/adapters/kimi/schemas/.render-manifest.json +10 -6
  48. package/adapters/kimi/schemas/postpublish-approval-record.schema.json +47 -0
  49. package/adapters/kimi/schemas/release-plan.schema.json +200 -4
  50. package/adapters/kimi/schemas/release-project.schema.json +86 -5
  51. package/adapters/kimi/schemas/release-run.schema.json +11 -6
  52. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  53. package/adapters/workbuddy/bin/error-codes.json +1 -1
  54. package/adapters/workbuddy/bin/kernel-protocol.json +1 -1
  55. package/adapters/workbuddy/bin/license-texts/Apache-2.0.txt +201 -0
  56. package/adapters/workbuddy/bin/license-texts/MIT.txt +21 -0
  57. package/adapters/workbuddy/bin/registry.json +64 -1
  58. package/adapters/workbuddy/bin/release-skill.bundle.mjs +50570 -42208
  59. package/adapters/workbuddy/bin/rules.json +1 -1
  60. package/adapters/workbuddy/schemas/.render-manifest.json +10 -6
  61. package/adapters/workbuddy/schemas/postpublish-approval-record.schema.json +47 -0
  62. package/adapters/workbuddy/schemas/release-plan.schema.json +200 -4
  63. package/adapters/workbuddy/schemas/release-project.schema.json +86 -5
  64. package/adapters/workbuddy/schemas/release-run.schema.json +11 -6
  65. package/bin/error-codes.json +1 -1
  66. package/bin/kernel-protocol.json +1 -1
  67. package/bin/license-texts/Apache-2.0.txt +201 -0
  68. package/bin/license-texts/MIT.txt +21 -0
  69. package/bin/registry.json +64 -1
  70. package/bin/release-skill-cli.mjs +187 -9
  71. package/bin/release-skill.bundle.mjs +50570 -42208
  72. package/bin/rules.json +1 -1
  73. package/package.json +6 -4
  74. package/platform-manifest.json +4 -4
  75. package/references/.render-manifest.json +5 -5
  76. package/references/01-state-machine.md +22 -2
  77. package/references/02-project-config.md +1 -1
  78. package/references/06-adapter-contract.md +6 -3
  79. package/schemas/.render-manifest.json +10 -6
  80. package/schemas/postpublish-approval-record.schema.json +47 -0
  81. package/schemas/release-plan.schema.json +200 -4
  82. package/schemas/release-project.schema.json +86 -5
  83. package/schemas/release-run.schema.json +11 -6
  84. package/src/adapters/distribute-git.mjs +17 -11
  85. package/src/commands/approve.mjs +163 -1
  86. package/src/commands/distribute.mjs +649 -89
  87. package/src/commands/postverify.mjs +808 -0
  88. package/src/commands/prepare.mjs +456 -45
  89. package/src/commands/setup.mjs +715 -0
  90. package/src/commands/ship.mjs +152 -5
  91. package/src/commands/verify.mjs +92 -15
  92. package/src/core/approval.mjs +93 -68
  93. package/src/core/bounded-output.mjs +46 -0
  94. package/src/core/derived-artifact-gates.mjs +258 -0
  95. package/src/core/docs-refresh-preset.mjs +171 -0
  96. package/src/core/errors.mjs +4 -0
  97. package/src/core/evidence.mjs +8 -1
  98. package/src/core/git-url-policy.mjs +214 -0
  99. package/src/core/hooks.mjs +28 -0
  100. package/src/core/marketplace-registry-entry.mjs +175 -0
  101. package/src/core/notify-handoff.mjs +76 -0
  102. package/src/core/postpublish-approval.mjs +241 -0
  103. package/src/core/postpublish-bundle.mjs +342 -0
  104. package/src/core/postpublish-projection.mjs +210 -0
  105. package/src/core/postpublish.mjs +449 -25
  106. package/src/core/preset-executor.mjs +175 -0
  107. package/src/core/preset-gitwrite.mjs +484 -0
  108. package/src/core/presets.mjs +754 -0
  109. package/src/core/proposal-inbox.mjs +646 -0
  110. package/src/core/redact.mjs +16 -3
  111. package/src/core/run.mjs +91 -6
  112. package/src/producers/build-adapters.mjs +28 -14
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "kind": "skill-family.contracts.rules",
4
- "contractsVersion": "1.5.0",
4
+ "contractsVersion": "1.7.0",
5
5
  "budget": {
6
6
  "firstVersionMax": 20,
7
7
  "absoluteMax": 30,
@@ -21,17 +21,21 @@
21
21
  "digest": "b7e14522a5aba818cab191545f23d2323be0e4c80566e9d3e4da576103a00490",
22
22
  "bytes": 2390
23
23
  },
24
+ "postpublish-approval-record.schema.json": {
25
+ "digest": "e365c9e9f5aa189ca6788e68dbedfa718aa120f2c197534417c21e019b9a29a4",
26
+ "bytes": 1744
27
+ },
24
28
  "release-plan.schema.json": {
25
- "digest": "5e988a5301b89b3d3260154ffae12669af0e4d6ec7f9db8c44df21037ea0eaf6",
26
- "bytes": 46948
29
+ "digest": "48b7755dfbeee88ccf78c3200000ab2f5dd06db42bc7b423aed0f81a91cc0418",
30
+ "bytes": 54672
27
31
  },
28
32
  "release-project.schema.json": {
29
- "digest": "546e05845cd83a3b1db0a54036f9555081420337e9df961d783d2d2630800ef7",
30
- "bytes": 41898
33
+ "digest": "cc2061799c3a0dd6daea940148e3497b7a4ae8cafb987bf51de7c34c1fed921d",
34
+ "bytes": 46932
31
35
  },
32
36
  "release-run.schema.json": {
33
- "digest": "6dd239c59f7045df11d13d6ba2027610d3c55c27a6af5bc87676b0eaad9600fd",
34
- "bytes": 17663
37
+ "digest": "9755a8caa58dd02509ac8e6f869aec5e74d8ae3f7339a3f944977bfad7b729ad",
38
+ "bytes": 17897
35
39
  }
36
40
  }
37
41
  }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://release-skill.dev/schemas/postpublish-approval-record/v1",
4
+ "title": "PostPublish Hook Approval Record",
5
+ "description": "Schema for checkpoint-level approval of a requiresApproval postPublish hook (v0.6.3 R1, design §2.7 ruling 2). Binds the approval to (planDigest, hookId); the plan-level approval-record schema is untouched. runId is audit-only and never participates in binding or validation semantics.",
6
+ "type": "object",
7
+ "required": [
8
+ "planDigest",
9
+ "hookId",
10
+ "actor",
11
+ "approvedAt",
12
+ "expiresAt"
13
+ ],
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "planDigest": {
17
+ "type": "string",
18
+ "pattern": "^[a-f0-9]{64}$",
19
+ "description": "SHA-256 digest of the frozen release plan whose postPublish hooks block this approval binds to"
20
+ },
21
+ "hookId": {
22
+ "type": "string",
23
+ "pattern": "^[a-z0-9][a-z0-9._-]*$",
24
+ "description": "id of the requiresApproval postPublish hook being approved (must be declared in the frozen plan)"
25
+ },
26
+ "actor": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "description": "Identity of the approver"
30
+ },
31
+ "approvedAt": {
32
+ "type": "string",
33
+ "format": "date-time",
34
+ "description": "ISO 8601 timestamp when approval was granted"
35
+ },
36
+ "expiresAt": {
37
+ "type": "string",
38
+ "format": "date-time",
39
+ "description": "ISO 8601 timestamp when approval expires (max 24h after approvedAt; 5-minute clock skew tolerated at validation)"
40
+ },
41
+ "runId": {
42
+ "type": "string",
43
+ "minLength": 1,
44
+ "description": "Audit-only identifier of the distribute run present when approval was granted; never a binding"
45
+ }
46
+ }
47
+ }
@@ -1304,10 +1304,8 @@
1304
1304
  },
1305
1305
  "planPostPublish": {
1306
1306
  "type": "object",
1307
- "description": "冻结的发布后分发块:声明本身 + tag/tagCommit/unitId/payloadSource 绑定。整体参与 plan digest(planVersion 2 记录层剥离不包含该块),任何配置变更都会改变 planDigest。tagCommit 仅在 prepare 能冻结 create-tag 预期 commit 时存在(production 资产);缺省时 distribute fail-closed。",
1307
+ "description": "冻结的发布后分发块:声明本身 + tag/tagCommit/unitId/payloadSource 绑定。整体参与 plan digest(planVersion 2 记录层剥离不包含该块),任何配置变更都会改变 planDigest。tagCommit 仅在 prepare 能冻结 create-tag 预期 commit 时存在(production 资产);缺省时 distribute fail-closed。materialize 钩子自 T6 起可选:载荷物化要么由消费者 materialize 钩子完成,要么由冻结 executionBundle.publicFiles 经 Foundation Engineering Kit 托管投影完成(两者至少其一,见 anyOf)。",
1308
1308
  "required": [
1309
- "materialize",
1310
- "targets",
1311
1309
  "commitIdentity",
1312
1310
  "tag",
1313
1311
  "unitId",
@@ -1325,6 +1323,13 @@
1325
1323
  "$ref": "#/definitions/planPostPublishTarget"
1326
1324
  }
1327
1325
  },
1326
+ "hooks": {
1327
+ "type": "array",
1328
+ "description": "冻结的发布后钩子声明(v0.6.3 R1);随整块参与 plan digest",
1329
+ "items": {
1330
+ "$ref": "#/definitions/planPostPublishHook"
1331
+ }
1332
+ },
1328
1333
  "commitIdentity": {
1329
1334
  "type": "object",
1330
1335
  "required": [
@@ -1370,6 +1375,197 @@
1370
1375
  "payloadSource": {
1371
1376
  "const": "tag-worktree",
1372
1377
  "description": "时序契约:载荷只能来自 tagCommit 处的 detached worktree,绝不读取工作区状态"
1378
+ },
1379
+ "executionBundle": {
1380
+ "type": "object",
1381
+ "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 严格复验并重算闭包,任何不一致即失败。",
1382
+ "required": [
1383
+ "foundationMechanism",
1384
+ "closure",
1385
+ "publicFiles"
1386
+ ],
1387
+ "additionalProperties": false,
1388
+ "properties": {
1389
+ "foundationMechanism": {
1390
+ "const": "foundation.harness.resource-closure"
1391
+ },
1392
+ "closure": {
1393
+ "type": "object",
1394
+ "description": "Foundation skill-family.resource-closure(schemaVersion 1)原样冻结",
1395
+ "required": [
1396
+ "schemaVersion",
1397
+ "kind",
1398
+ "digestAlgorithm",
1399
+ "digest",
1400
+ "resources"
1401
+ ],
1402
+ "additionalProperties": false,
1403
+ "properties": {
1404
+ "schemaVersion": {
1405
+ "const": 1
1406
+ },
1407
+ "kind": {
1408
+ "const": "skill-family.resource-closure"
1409
+ },
1410
+ "digestAlgorithm": {
1411
+ "const": "sha256"
1412
+ },
1413
+ "digest": {
1414
+ "type": "string",
1415
+ "pattern": "^[a-f0-9]{64}$"
1416
+ },
1417
+ "resources": {
1418
+ "type": "array",
1419
+ "items": {
1420
+ "type": "object",
1421
+ "required": [
1422
+ "path",
1423
+ "role",
1424
+ "exists",
1425
+ "sha256"
1426
+ ],
1427
+ "additionalProperties": false,
1428
+ "properties": {
1429
+ "path": {
1430
+ "type": "string",
1431
+ "minLength": 1,
1432
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
1433
+ },
1434
+ "role": {
1435
+ "const": "input",
1436
+ "description": "私有执行输入只有 input 资源;output 角色不属于执行包"
1437
+ },
1438
+ "exists": {
1439
+ "const": true
1440
+ },
1441
+ "sha256": {
1442
+ "type": "string",
1443
+ "pattern": "^[a-f0-9]{64}$"
1444
+ }
1445
+ }
1446
+ }
1447
+ }
1448
+ }
1449
+ },
1450
+ "publicFiles": {
1451
+ "type": "array",
1452
+ "description": "从已通过 schema 与运行时校验的发布单元投影进冻结计划的公开映射(T6 托管投影输入)",
1453
+ "items": {
1454
+ "type": "object",
1455
+ "required": [
1456
+ "from",
1457
+ "to",
1458
+ "mode"
1459
+ ],
1460
+ "additionalProperties": false,
1461
+ "properties": {
1462
+ "sourceScope": {
1463
+ "type": "string",
1464
+ "enum": [
1465
+ "unit",
1466
+ "workspace"
1467
+ ]
1468
+ },
1469
+ "from": {
1470
+ "type": "string",
1471
+ "minLength": 1,
1472
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
1473
+ },
1474
+ "to": {
1475
+ "type": "string",
1476
+ "minLength": 1,
1477
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
1478
+ },
1479
+ "mode": {
1480
+ "type": "string",
1481
+ "enum": [
1482
+ "preserve"
1483
+ ]
1484
+ }
1485
+ }
1486
+ }
1487
+ }
1488
+ }
1489
+ }
1490
+ },
1491
+ "anyOf": [
1492
+ {
1493
+ "required": [
1494
+ "materialize"
1495
+ ]
1496
+ },
1497
+ {
1498
+ "description": "无 materialize 钩子时,冻结的 executionBundle.publicFiles 必须非空:载荷由 Foundation 托管投影物化(F-06/T6)",
1499
+ "required": [
1500
+ "executionBundle"
1501
+ ],
1502
+ "properties": {
1503
+ "executionBundle": {
1504
+ "properties": {
1505
+ "publicFiles": {
1506
+ "minItems": 1
1507
+ }
1508
+ }
1509
+ }
1510
+ }
1511
+ }
1512
+ ]
1513
+ },
1514
+ "planPostPublishHook": {
1515
+ "type": "object",
1516
+ "description": "冻结的发布后钩子声明项(v0.6.3 R1):preset 与 command 运行时互斥;phase 缺省 distribute;blocksVerified 缺省 true 且仅 preset 可声明 false",
1517
+ "required": [
1518
+ "id"
1519
+ ],
1520
+ "additionalProperties": false,
1521
+ "properties": {
1522
+ "id": {
1523
+ "type": "string",
1524
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1525
+ },
1526
+ "preset": {
1527
+ "type": "string",
1528
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1529
+ },
1530
+ "command": {
1531
+ "type": "array",
1532
+ "minItems": 1,
1533
+ "items": {
1534
+ "type": "string"
1535
+ }
1536
+ },
1537
+ "phase": {
1538
+ "type": "string",
1539
+ "enum": [
1540
+ "distribute",
1541
+ "postVerify"
1542
+ ]
1543
+ },
1544
+ "config": {
1545
+ "type": "object"
1546
+ },
1547
+ "cwd": {
1548
+ "type": "string",
1549
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
1550
+ },
1551
+ "timeoutMs": {
1552
+ "type": "integer",
1553
+ "minimum": 1000,
1554
+ "maximum": 7200000
1555
+ },
1556
+ "envAllowlist": {
1557
+ "type": "array",
1558
+ "items": {
1559
+ "type": "string",
1560
+ "pattern": "^(?!.*(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|API_KEY|CREDENTIAL))[A-Z_][A-Z0-9_]*$"
1561
+ },
1562
+ "uniqueItems": true
1563
+ },
1564
+ "requiresApproval": {
1565
+ "type": "boolean"
1566
+ },
1567
+ "blocksVerified": {
1568
+ "type": "boolean"
1373
1569
  }
1374
1570
  }
1375
1571
  },
@@ -1488,7 +1684,7 @@
1488
1684
  },
1489
1685
  "remoteUrl": {
1490
1686
  "type": "string",
1491
- "pattern": "^(?:https?|file)://.+\\.git$"
1687
+ "pattern": "^(?:https?|file)://[^@]+\\.git$"
1492
1688
  },
1493
1689
  "visibility": {
1494
1690
  "type": "string",
@@ -886,10 +886,8 @@
886
886
  },
887
887
  "postPublish": {
888
888
  "type": "object",
889
- "description": "发布后分发声明:materialize 钩子从冻结 tag 工作树物化载荷,targets 将载荷镜像或渲染市场索引推送到独立 git 远端。分发在 publish 之后由 distribute 命令执行,时序契约禁止读取工作区状态。",
889
+ "description": "发布后分发声明:载荷要么由 materialize 钩子从冻结 tag 工作树物化,要么(省略 materialize 时)由冻结的 publicFiles 映射经 Foundation Engineering Kit 托管投影物化(F-06/T6);targets 将载荷镜像或渲染市场索引推送到独立 git 远端。分发在 publish 之后由 distribute 命令执行,时序契约禁止读取工作区状态。",
890
890
  "required": [
891
- "materialize",
892
- "targets",
893
891
  "commitIdentity"
894
892
  ],
895
893
  "additionalProperties": false,
@@ -904,6 +902,13 @@
904
902
  "$ref": "#/definitions/postPublishTarget"
905
903
  }
906
904
  },
905
+ "hooks": {
906
+ "type": "array",
907
+ "description": "发布后钩子声明(v0.6.3 R1):每项为命名 preset(+config)或自定义 command 钩子(executable+参数数组,禁止 shell 字符串)。schema 层只校验形状;preset 与 command 互斥、preset 注册表归属等语义在运行时 fail-closed 校验(POSTPUBLISH_HOOK_INVALID)",
908
+ "items": {
909
+ "$ref": "#/definitions/postPublishHook"
910
+ }
911
+ },
907
912
  "commitIdentity": {
908
913
  "type": "object",
909
914
  "description": "分发仓库提交者身份(bot 身份),通过 git -c user.name/-c user.email 注入,绝不读取或修改全局 git 配置",
@@ -933,6 +938,82 @@
933
938
  "assertMainVersionAhead": {
934
939
  "type": "boolean",
935
940
  "description": "分发前校验主干版本源仍领先于目标版本,防止在已推进的主干上分发旧版本"
941
+ },
942
+ "executionFiles": {
943
+ "type": "array",
944
+ "description": "私有执行输入闭世界清单(F-01):仅列出发布后命令需要、但冻结 tag 中不存在的父工作区领域文件;辅助文件(helper)必须显式列入,执行时不做任何临时发现。每个路径经 Foundation 路径分类与受收容读取;列表排序去重后随计划冻结为 executionBundle.closure,字节发布到计划权威 .release-skill 下的摘要寻址目录。tag 中已有的文件继续由 tagCommit 绑定,不得在此声明(执行包不得覆盖 tag 文件)。路径语法只由 schema 做第一层形状检查,最终以运行时 Foundation 分类为准。",
945
+ "items": {
946
+ "type": "string",
947
+ "minLength": 1,
948
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
949
+ },
950
+ "uniqueItems": true
951
+ }
952
+ }
953
+ },
954
+ "postPublishHook": {
955
+ "type": "object",
956
+ "description": "发布后钩子声明项:preset(命名预设 + config)与 command(自定义命令)在运行时互斥校验;phase 缺省为 distribute(VERIFIED 之前执行),postVerify 在 verify 通过后作为独立 run 执行(R3);blocksVerified 缺省 true,仅 preset 可声明 false",
957
+ "required": [
958
+ "id"
959
+ ],
960
+ "additionalProperties": false,
961
+ "properties": {
962
+ "id": {
963
+ "type": "string",
964
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
965
+ },
966
+ "preset": {
967
+ "type": "string",
968
+ "pattern": "^[a-z0-9][a-z0-9._-]*$",
969
+ "description": "预设注册表中的预设名(R2 起);R1 无注册表,任何 preset 引用在运行时 fail-closed"
970
+ },
971
+ "command": {
972
+ "type": "array",
973
+ "minItems": 1,
974
+ "items": {
975
+ "type": "string"
976
+ },
977
+ "description": "executable+参数数组(禁止 shell 字符串);在冻结 tag 工作树中执行"
978
+ },
979
+ "phase": {
980
+ "type": "string",
981
+ "enum": [
982
+ "distribute",
983
+ "postVerify"
984
+ ],
985
+ "description": "执行阶段;缺省 distribute"
986
+ },
987
+ "config": {
988
+ "type": "object",
989
+ "description": "preset 钩子的配置对象;语义由预设注册表校验(R2 起)"
990
+ },
991
+ "cwd": {
992
+ "type": "string",
993
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$",
994
+ "description": "command 钩子执行目录(相对冻结 tag 工作树);preset 钩子禁止声明(运行时 fail-closed)"
995
+ },
996
+ "timeoutMs": {
997
+ "type": "integer",
998
+ "minimum": 1000,
999
+ "maximum": 7200000
1000
+ },
1001
+ "envAllowlist": {
1002
+ "type": "array",
1003
+ "items": {
1004
+ "type": "string",
1005
+ "pattern": "^(?!.*(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|API_KEY|CREDENTIAL))[A-Z_][A-Z0-9_]*$"
1006
+ },
1007
+ "uniqueItems": true,
1008
+ "description": "允许透传给钩子进程的环境变量白名单;TOKEN/SECRET 等敏感子串在 schema 层即被拒绝"
1009
+ },
1010
+ "requiresApproval": {
1011
+ "type": "boolean",
1012
+ "description": "执行前需要 checkpoint 级批准(绑定 planDigest + hookId);public-write preset 缺省 true"
1013
+ },
1014
+ "blocksVerified": {
1015
+ "type": "boolean",
1016
+ "description": "失败时是否阻断 VERIFIED;缺省 true;仅 preset 可声明 false(运行时 fail-closed 校验)"
936
1017
  }
937
1018
  }
938
1019
  },
@@ -1057,8 +1138,8 @@
1057
1138
  },
1058
1139
  "remoteUrl": {
1059
1140
  "type": "string",
1060
- "pattern": "^(?:https?|file)://.+\\.git$",
1061
- "description": "仅允许 http(s) 或 file(测试传输)且以 .git 结尾的远端 URL"
1141
+ "pattern": "^(?:https?|file)://[^@]+\\.git$",
1142
+ "description": "仅允许 http(s) 或 file(测试传输)且以 .git 结尾的远端 URL;禁止任何 userinfo(user:password@)形态——凭证只属于宿主 git credential helper。schema 只是第一道门,运行时 Git URL 策略(new URL 解析)是最终权威"
1062
1143
  },
1063
1144
  "visibility": {
1064
1145
  "type": "string",
@@ -43,7 +43,8 @@
43
43
  "PARTIAL",
44
44
  "BLOCKED",
45
45
  "DISTRIBUTING",
46
- "DISTRIBUTED"
46
+ "DISTRIBUTED",
47
+ "NEEDS_INPUT"
47
48
  ],
48
49
  "description": "Current status of the run"
49
50
  },
@@ -55,7 +56,8 @@
55
56
  "publish",
56
57
  "reconcile",
57
58
  "verify",
58
- "distribute"
59
+ "distribute",
60
+ "postverify"
59
61
  ],
60
62
  "description": "The command that initiated this run"
61
63
  },
@@ -133,7 +135,8 @@
133
135
  "codebuddy-marketplace-install",
134
136
  "set-default-branch",
135
137
  "distribute-probe",
136
- "distribute-mirror"
138
+ "distribute-mirror",
139
+ "postpublish-hook"
137
140
  ],
138
141
  "description": "Type of external action"
139
142
  },
@@ -149,9 +152,10 @@
149
152
  "PASSED_AUTOMATIC",
150
153
  "PASSED_MANUAL",
151
154
  "NOT_REQUIRED_UNCHANGED",
152
- "NO_CHANGE"
155
+ "NO_CHANGE",
156
+ "AWAITING_APPROVAL"
153
157
  ],
154
- "description": "Result status of this checkpoint (uncertain = started, result unknown; deferred = marketplace action postponed to verify phase; PASSED_AUTOMATIC/PASSED_MANUAL/NOT_REQUIRED_UNCHANGED 为验证阶段专用状态; NO_CHANGE = distribute 目标暂存差异为空,未产生 commit/tag/push)"
158
+ "description": "Result status of this checkpoint (uncertain = started, result unknown; deferred = marketplace action postponed to verify phase; PASSED_AUTOMATIC/PASSED_MANUAL/NOT_REQUIRED_UNCHANGED 为验证阶段专用状态; NO_CHANGE = distribute 目标暂存差异为空,未产生 commit/tag/push; AWAITING_APPROVAL = requiresApproval postPublish hook 尚无 checkpoint 批准,v0.6.3 R1)"
155
159
  },
156
160
  "preObserve": {
157
161
  "type": "string",
@@ -621,7 +625,8 @@
621
625
  "enum": [
622
626
  "reconcile",
623
627
  "verify",
624
- "distribute"
628
+ "distribute",
629
+ "postverify"
625
630
  ]
626
631
  }
627
632
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "kind": "skill-family.contracts.error-codes",
4
- "contractsVersion": "1.5.0",
4
+ "contractsVersion": "1.7.0",
5
5
  "policy": {
6
6
  "format": "^SFC[0-9]{4}$",
7
7
  "ranges": [
@@ -4,7 +4,7 @@
4
4
  "name": "skill-family.kernel.operation",
5
5
  "version": 1,
6
6
  "status": "stable",
7
- "contractsVersion": "1.5.0",
7
+ "contractsVersion": "1.7.0",
8
8
  "description": "Frozen v1 kernel protocol: request/result envelope, operation lifecycle states, and the operation vocabulary. Extensible only by a new protocol version; v1 content is frozen.",
9
9
  "states": ["accepted", "running", "succeeded", "failed", "rejected"],
10
10
  "initialStates": ["accepted", "rejected"],