@kungfu-tech/buildchain 4.0.1-alpha.5 → 4.0.1-alpha.55

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 (159) hide show
  1. package/README.md +9 -6
  2. package/actions/release-tail/README.md +8 -0
  3. package/actions/v4-release-candidate-promote/README.md +3 -0
  4. package/architecture/agent-change-map.md +1015 -0
  5. package/architecture/ci-lane-change-budget.json +256 -0
  6. package/architecture/decisions/0004-v4-declarative-release-tail.md +47 -0
  7. package/architecture/internal-capabilities.json +220 -15
  8. package/architecture/maintainability-debt.json +3229 -0
  9. package/architecture/maintainability-policy.json +489 -132
  10. package/architecture/release-tail-contract-inventory.json +5 -2
  11. package/architecture/v3-core-mechanism-inventory.json +4 -3
  12. package/architecture/v3-v4-capability-closure.md +59 -0
  13. package/architecture/v3-v4-live-capability-inventory.json +102404 -0
  14. package/architecture/v4-adopter-delivery-parity.json +32 -5
  15. package/architecture/v4-cross-platform-adopter-qualification.json +52 -0
  16. package/architecture/v4-delivery-warrant-shadow-fixtures.json +3 -3
  17. package/architecture/v4-floating-consumer-policy.json +6 -0
  18. package/architecture/v4-publication-rehearsal-parity.json +84 -0
  19. package/architecture/v4-runtime-semantic-closure.json +710 -0
  20. package/bin/buildchain.mjs +7 -1
  21. package/bin/internal/adopter-delivery-cli.mjs +70 -0
  22. package/bin/internal/command-registry.mjs +1 -0
  23. package/bin/internal/trust-release-release-handlers.mjs +5 -0
  24. package/contracts/fixtures/v4-adopter-delivery-v1/archive-template.json +19 -0
  25. package/contracts/fixtures/v4-adopter-delivery-v1/bootstrap-positive.json +93 -0
  26. package/contracts/fixtures/v4-adopter-delivery-v1/gate-positive.json +29 -0
  27. package/contracts/fixtures/v4-adopter-delivery-v1/gate-unknown-selector.json +26 -0
  28. package/contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json +50 -0
  29. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/artifacts/product.bin +1 -0
  30. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/config/buildchain.toml +5 -0
  31. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/release-activation.json +1 -0
  32. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/signed-channel.json +1 -0
  33. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/evidence/qualification.json +1 -0
  34. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/candidate.json +5 -0
  35. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/release-passport.json +1 -0
  36. package/contracts/fixtures/v4-publication-rehearsal-v1/capsule.json +707 -0
  37. package/contracts/fixtures/v4-publication-rehearsal-v1/offline-vectors.json +27 -0
  38. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  39. package/contracts/v4-adopter-delivery-v1.schema.json +81 -0
  40. package/contracts/v4-floating-consumer-policy-receipt-v1.schema.json +4 -2
  41. package/contracts/v4-publication-qualification-v1.schema.json +51 -0
  42. package/contracts/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  43. package/dist/site/agent-index.json +4 -0
  44. package/dist/site/artifact-schemas.json +8 -0
  45. package/dist/site/buildchain-contract.json +125 -34
  46. package/dist/site/buildchain-site.json +308 -33
  47. package/dist/site/capability-registry.json +13 -12
  48. package/dist/site/cli-registry.json +57 -2
  49. package/dist/site/controller-registry.json +41 -5
  50. package/dist/site/kfd-claims.json +438 -24
  51. package/dist/site/kfd-upstream-aggregate.json +1 -1
  52. package/dist/site/manual-registry.json +22 -7
  53. package/dist/site/node-api-registry.json +12843 -9314
  54. package/dist/site/page-registry.json +288 -21
  55. package/dist/site/public-surface-audit.json +281 -21
  56. package/dist/site/publication-authority-registry.json +66 -8
  57. package/dist/site/publication-registry.json +4 -4
  58. package/dist/site/release-provenance.json +20 -0
  59. package/dist/site/schemas/release-tail-capabilities-v1.schema.json +199 -0
  60. package/dist/site/schemas/v4-adopter-delivery-v1.schema.json +81 -0
  61. package/dist/site/schemas/v4-publication-qualification-v1.schema.json +51 -0
  62. package/dist/site/schemas/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  63. package/dist/site/site-manifest.json +19 -11
  64. package/dist/site/workflow-registry.json +195 -17
  65. package/docs/MAP.md +4 -2
  66. package/docs/cli-reference.md +70 -2
  67. package/docs/cli.md +8 -0
  68. package/docs/dev-delivery-warrant.md +34 -10
  69. package/docs/node-api-reference.md +524 -279
  70. package/docs/publish-transaction.md +11 -4
  71. package/docs/release-candidate.md +7 -0
  72. package/docs/release-tail-provider-plane.md +30 -0
  73. package/docs/v4-adopter-delivery.md +152 -0
  74. package/docs/v4-declarative-release-tail-migration.md +43 -0
  75. package/docs/v4-publication-rehearsal.md +130 -0
  76. package/package.json +24 -4
  77. package/packages/core/adopter-delivery-passport.js +295 -0
  78. package/packages/core/adopter-delivery-vectors.js +158 -0
  79. package/packages/core/adopter-delivery-vectors.json +77 -0
  80. package/packages/core/buildchain-agent-manuals.js +1 -0
  81. package/packages/core/buildchain-config.js +84 -0
  82. package/packages/core/buildchain-contract.js +31 -1
  83. package/packages/core/buildchain-delivery-bootstrap.js +240 -0
  84. package/packages/core/buildchain-delivery-infrastructure.js +164 -0
  85. package/packages/core/buildchain-delivery-self-dogfood.js +395 -0
  86. package/packages/core/buildchain-publication-authority.js +2 -0
  87. package/packages/core/ci-lane-change-budget.js +247 -0
  88. package/packages/core/dev-delivery-native-proof.js +43 -27
  89. package/packages/core/dev-delivery-warrant-settlement.js +239 -3
  90. package/packages/core/dev-delivery-warrant-state.js +46 -10
  91. package/packages/core/dev-delivery-warrant.js +29 -7
  92. package/packages/core/github-governance-authority.js +5 -4
  93. package/packages/core/index.js +6 -0
  94. package/packages/core/legacy-kfd-adopter-driver.js +167 -0
  95. package/packages/core/paper-scaffold-content.js +401 -0
  96. package/packages/core/paper.js +12 -378
  97. package/packages/core/publication-control-plane-audit.js +135 -111
  98. package/packages/core/publication-rehearsal-projection.js +104 -0
  99. package/packages/core/publication-rehearsal-runtime.js +190 -0
  100. package/packages/core/published-delivery-authority.js +266 -0
  101. package/packages/core/release-candidate-recovery.js +71 -15
  102. package/packages/core/release-candidate.js +2 -2
  103. package/packages/core/release-passport.js +95 -170
  104. package/packages/core/v4-adopter-delivery-parity.js +3 -3
  105. package/packages/core/v4-adopter-delivery.js +359 -0
  106. package/packages/core/v4-cross-platform-adopter-qualification.js +343 -0
  107. package/packages/core/v4-delivery-warrant-read-candidate.js +10 -3
  108. package/packages/core/v4-floating-consumer-evidence.js +18 -4
  109. package/packages/core/v4-floating-consumer-policy.js +139 -35
  110. package/packages/core/v4-floating-consumer-release-passport.js +154 -8
  111. package/packages/core/v4-publication-qualification.js +222 -0
  112. package/packages/core/v4-publication-rehearsal-capsule.js +468 -0
  113. package/packages/core/v4-publication-rehearsal-provider-bindings.js +212 -0
  114. package/packages/core/v4-publication-rehearsal.js +481 -0
  115. package/packages/core/workflow-yaml-contract.js +24 -2
  116. package/scripts/artifact-signing-controller-core.mjs +1 -1
  117. package/scripts/audit-publication-control-plane.mjs +17 -17
  118. package/scripts/buildchain-cli-help.mjs +13 -0
  119. package/scripts/check-ci-lane-change-budget.mjs +100 -0
  120. package/scripts/check-internal-architecture.mjs +23 -3
  121. package/scripts/check-inventory.mjs +24 -6
  122. package/scripts/check-maintainability.mjs +145 -4
  123. package/scripts/check-project-cut-merge-queue-admission.mjs +87 -0
  124. package/scripts/check-v3-v4-capability-inventory.mjs +574 -0
  125. package/scripts/check-v4-floating-consumer-policy-contract.mjs +30 -4
  126. package/scripts/check-v4-runtime-semantic-closure.mjs +266 -0
  127. package/scripts/dev-delivery-source-proof-replay.mjs +153 -0
  128. package/scripts/dev-delivery-source-proof-reuse.mjs +13 -97
  129. package/scripts/dev-delivery-warrant-options.mjs +27 -11
  130. package/scripts/dev-delivery-warrant-store.mjs +10 -6
  131. package/scripts/dev-delivery-warrant.mjs +50 -6
  132. package/scripts/dev-pr-auto-merge.mjs +25 -11
  133. package/scripts/dev-pr-delivery-warrant.mjs +45 -0
  134. package/scripts/dev-pr-prequeue-guard.mjs +0 -18
  135. package/scripts/dev-qualification-patrol.mjs +9 -9
  136. package/scripts/dispatch-artifact-signing-authority.mjs +1 -1
  137. package/scripts/generate-agent-change-map.mjs +118 -0
  138. package/scripts/generate-channel-promotion-workflow.mjs +2 -2
  139. package/scripts/generate-release-candidate-passport.mjs +177 -0
  140. package/scripts/generate-site-bundle.mjs +36 -0
  141. package/scripts/maintainability-domain-metrics.mjs +237 -0
  142. package/scripts/maintainability-governance.mjs +473 -0
  143. package/scripts/maintainability-metrics.mjs +28 -6
  144. package/scripts/project-cut-merge-queue-admission.mjs +394 -0
  145. package/scripts/promotion-channel-router.mjs +4 -4
  146. package/scripts/promotion-routing-evidence.mjs +35 -6
  147. package/scripts/release-candidate-anchor-provenance.mjs +99 -0
  148. package/scripts/release-candidate-resolver.mjs +44 -0
  149. package/scripts/release-line-policy.mjs +25 -15
  150. package/scripts/release-tail.mjs +68 -3
  151. package/scripts/resume-from-candidate-run.mjs +595 -65
  152. package/scripts/run-lifecycle-core.mjs +341 -376
  153. package/scripts/site-capability-metadata.mjs +21 -0
  154. package/scripts/stable-candidate-qualification.mjs +9 -10
  155. package/scripts/v3-v4-capability-catalog.mjs +439 -0
  156. package/scripts/v4-consumer-policy.mjs +4 -0
  157. package/scripts/v4-cross-platform-adopter-qualification.mjs +228 -0
  158. package/scripts/v4-declarative-promotion-admission.mjs +42 -0
  159. package/scripts/v4-publication-rehearsal-fixture.mjs +144 -0
@@ -336,6 +336,19 @@
336
336
  "runnerPolicy": "unqualified",
337
337
  "notes": ""
338
338
  },
339
+ {
340
+ "workflowPath": ".github/workflows/buildchain-ref-promotion-recovery.yml",
341
+ "authorityClass": "governance-write",
342
+ "publicationCapable": false,
343
+ "capabilityIds": [],
344
+ "credentialMode": "none",
345
+ "publisherWorkflowMode": "fixed",
346
+ "publisherWorkflowPath": ".github/workflows/buildchain-ref-promotion-recovery.yml",
347
+ "environment": "",
348
+ "environmentMode": "fixed",
349
+ "runnerPolicy": "unqualified",
350
+ "notes": ""
351
+ },
339
352
  {
340
353
  "workflowPath": ".github/workflows/buildchain-ref-promotion.yml",
341
354
  "authorityClass": "governance-write",
@@ -718,6 +731,24 @@
718
731
  "environmentMode": "fixed",
719
732
  "runnerPolicy": "unqualified",
720
733
  "notes": ""
734
+ },
735
+ {
736
+ "workflowPath": ".github/workflows/v4-declarative-release-tail-dogfood.yml",
737
+ "authorityClass": "product-publication",
738
+ "publicationCapable": true,
739
+ "capabilityIds": [
740
+ "artifact.publish",
741
+ "release.activate",
742
+ "released-evidence.synthesize",
743
+ "signed-channel.commit"
744
+ ],
745
+ "credentialMode": "caller-secrets",
746
+ "publisherWorkflowMode": "fixed",
747
+ "publisherWorkflowPath": ".github/workflows/v4-declarative-release-tail-dogfood.yml",
748
+ "environment": "none",
749
+ "environmentMode": "fixed",
750
+ "runnerPolicy": "qualified-measured",
751
+ "notes": ""
721
752
  }
722
753
  ],
723
754
  "workflowFacts": [
@@ -882,10 +913,7 @@
882
913
  },
883
914
  {
884
915
  "path": ".github/workflows/build-surface-fixture.yml",
885
- "signals": [
886
- "write-permission",
887
- "oidc"
888
- ],
916
+ "signals": [],
889
917
  "classified": true
890
918
  },
891
919
  {
@@ -944,6 +972,14 @@
944
972
  ],
945
973
  "classified": true
946
974
  },
975
+ {
976
+ "path": ".github/workflows/buildchain-ref-promotion-recovery.yml",
977
+ "signals": [
978
+ "write-permission",
979
+ "oidc"
980
+ ],
981
+ "classified": true
982
+ },
947
983
  {
948
984
  "path": ".github/workflows/buildchain-ref-promotion.yml",
949
985
  "signals": [
@@ -1152,9 +1188,7 @@
1152
1188
  },
1153
1189
  {
1154
1190
  "path": ".github/workflows/release-tail.yml",
1155
- "signals": [
1156
- "write-permission"
1157
- ],
1191
+ "signals": [],
1158
1192
  "classified": true
1159
1193
  },
1160
1194
  {
@@ -1181,11 +1215,35 @@
1181
1215
  ],
1182
1216
  "classified": true
1183
1217
  },
1218
+ {
1219
+ "path": ".github/workflows/v4-adopter-delivery-dogfood.yml",
1220
+ "signals": [],
1221
+ "classified": false
1222
+ },
1223
+ {
1224
+ "path": ".github/workflows/v4-adopter-delivery.yml",
1225
+ "signals": [],
1226
+ "classified": false
1227
+ },
1228
+ {
1229
+ "path": ".github/workflows/v4-declarative-release-tail-dogfood.yml",
1230
+ "signals": [
1231
+ "write-permission",
1232
+ "oidc",
1233
+ "npm-publish"
1234
+ ],
1235
+ "classified": true
1236
+ },
1184
1237
  {
1185
1238
  "path": ".github/workflows/v4-public-consumer-dogfood.yml",
1186
1239
  "signals": [],
1187
1240
  "classified": false
1188
1241
  },
1242
+ {
1243
+ "path": ".github/workflows/v4-publication-rehearsal-dogfood.yml",
1244
+ "signals": [],
1245
+ "classified": false
1246
+ },
1189
1247
  {
1190
1248
  "path": ".github/workflows/v4-stage-capsule-canary.yml",
1191
1249
  "signals": [],
@@ -1202,5 +1260,5 @@
1202
1260
  "classified": false
1203
1261
  }
1204
1262
  ],
1205
- "registryDigest": "95e7d88ca3d3492b7852d715c24d3f4f2cec59f3c3fbb8665aa781d15afd6b63"
1263
+ "registryDigest": "4f60d125496eb73e47dc21ceafa340e5cd7c5fd840eabfa17044dbacedd97f5a"
1206
1264
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-publication-release-registry",
4
- "generatedAt": "2026-08-16T06:14:57.817Z",
5
- "publishedAt": "2026-08-16T06:14:57.817Z",
4
+ "generatedAt": "2026-08-28T12:56:28.683Z",
5
+ "publishedAt": "2026-08-28T12:56:28.683Z",
6
6
  "reproducible": true,
7
7
  "timestampPolicy": "ci-injected",
8
8
  "deterministicInputs": [
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "358df2d1ab42465111896a42cde85dcca08549d5",
22
+ "sourceRevision": "101f506b0d70a3e7a09c9d47b8d4a562987a7c8f",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "package": {
34
34
  "name": "@kungfu-tech/buildchain",
35
- "version": "4.0.1-alpha.5",
35
+ "version": "4.0.1-alpha.55",
36
36
  "versionSource": "package.json#version"
37
37
  },
38
38
  "sourceKind": "package-site-bundle",
@@ -22,6 +22,7 @@
22
22
  "./buildchain-contract": "./packages/core/buildchain-contract.js",
23
23
  "./compatibility-fact-authority": "./packages/core/buildchain-compatibility-proof.js",
24
24
  "./candidate-timeline": "./packages/core/candidate-timeline.js",
25
+ "./ci-lane-change-budget": "./packages/core/ci-lane-change-budget.js",
25
26
  "./channel-candidate": "./packages/core/channel-candidate.js",
26
27
  "./cache-evidence": "./packages/core/cache-evidence.js",
27
28
  "./controller-evidence": "./packages/core/controller-evidence.js",
@@ -43,6 +44,21 @@
43
44
  "./v4-runtime-ref-resume-authority": "./packages/core/v4-runtime-ref-resume-authority.js",
44
45
  "./v4-tail-reseal": "./packages/core/v4-tail-reseal.js",
45
46
  "./v4-tail-reseal-receipt": "./packages/core/v4-tail-reseal-receipt.js",
47
+ "./v4-publication-rehearsal": "./packages/core/v4-publication-rehearsal.js",
48
+ "./publication-rehearsal-runtime": "./packages/core/publication-rehearsal-runtime.js",
49
+ "./publication-rehearsal-projection": "./packages/core/publication-rehearsal-projection.js",
50
+ "./v4-publication-qualification": "./packages/core/v4-publication-qualification.js",
51
+ "./adopter-delivery-gate": "./packages/core/adopter-delivery-gate.js",
52
+ "./kfd-adopter-category-driver": "./packages/core/kfd-adopter-category-driver.js",
53
+ "./buildchain-delivery-infrastructure": "./packages/core/buildchain-delivery-infrastructure.js",
54
+ "./buildchain-delivery-bootstrap": "./packages/core/buildchain-delivery-bootstrap.js",
55
+ "./buildchain-delivery-self-dogfood": "./packages/core/buildchain-delivery-self-dogfood.js",
56
+ "./published-delivery-authority": "./packages/core/published-delivery-authority.js",
57
+ "./legacy-kfd-adopter-driver": "./packages/core/legacy-kfd-adopter-driver.js",
58
+ "./adopter-delivery-passport": "./packages/core/adopter-delivery-passport.js",
59
+ "./adopter-delivery-vectors": "./packages/core/adopter-delivery-vectors.js",
60
+ "./v4-adopter-delivery": "./packages/core/v4-adopter-delivery.js",
61
+ "./v4-cross-platform-adopter-qualification": "./packages/core/v4-cross-platform-adopter-qualification.js",
46
62
  "./logging": "./packages/core/logging.js",
47
63
  "./portable-dev-cache": "./packages/core/portable-dev-cache.js",
48
64
  "./publication-artifact": "./packages/core/publication-artifact.js",
@@ -96,6 +112,10 @@
96
112
  "./site/schemas/kfd-support-projection-v1.schema.json": "./dist/site/schemas/kfd-support-projection-v1.schema.json",
97
113
  "./site/schemas/dev-delivery-authority-v2.schema.json": "./dist/site/schemas/dev-delivery-authority-v2.schema.json",
98
114
  "./site/schemas/v4-compatibility-facts-v1.schema.json": "./dist/site/schemas/v4-compatibility-facts-v1.schema.json",
115
+ "./site/schemas/v4-publication-rehearsal-capsule-v1.schema.json": "./dist/site/schemas/v4-publication-rehearsal-capsule-v1.schema.json",
116
+ "./site/schemas/v4-adopter-delivery-v1.schema.json": "./dist/site/schemas/v4-adopter-delivery-v1.schema.json",
117
+ "./site/schemas/release-tail-capabilities-v1.schema.json": "./dist/site/schemas/release-tail-capabilities-v1.schema.json",
118
+ "./site/schemas/v4-publication-qualification-v1.schema.json": "./dist/site/schemas/v4-publication-qualification-v1.schema.json",
99
119
  "./site/buildchain-contract.json": "./dist/site/buildchain-contract.json",
100
120
  "./site/product-mechanism.json": "./dist/site/product-mechanism.json",
101
121
  "./site/release-provenance.json": "./dist/site/release-provenance.json",
@@ -0,0 +1,199 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.kungfu.ai/contracts/release-tail-capabilities-v1.schema.json",
4
+ "title": "Buildchain release-tail capability declaration",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "contract",
9
+ "schemaVersion",
10
+ "transactionPolicy",
11
+ "subject",
12
+ "capabilities"
13
+ ],
14
+ "properties": {
15
+ "contract": {
16
+ "const": "kungfu-buildchain-release-tail-capabilities"
17
+ },
18
+ "schemaVersion": {
19
+ "const": 1
20
+ },
21
+ "transactionPolicy": {
22
+ "const": "buildchain.release-tail/v1"
23
+ },
24
+ "subject": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["repository", "sourceSha", "version", "tag", "channel"],
28
+ "properties": {
29
+ "repository": { "type": "string", "minLength": 1 },
30
+ "sourceSha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
31
+ "version": { "type": "string", "minLength": 1 },
32
+ "tag": { "type": "string", "minLength": 1 },
33
+ "channel": { "enum": ["alpha", "release", "stable"] }
34
+ }
35
+ },
36
+ "capabilities": {
37
+ "type": "array",
38
+ "minItems": 1,
39
+ "items": { "$ref": "#/$defs/capability" }
40
+ }
41
+ },
42
+ "$defs": {
43
+ "root": {
44
+ "type": "string",
45
+ "pattern": "^sha256:[0-9a-f]{64}$"
46
+ },
47
+ "capability": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": [
51
+ "id",
52
+ "executor",
53
+ "adapter",
54
+ "artifactRoles",
55
+ "destination",
56
+ "channelPolicy",
57
+ "activationPolicy",
58
+ "readbackPredicates",
59
+ "effect",
60
+ "observation",
61
+ "receipt",
62
+ "operationIdentity",
63
+ "idempotency",
64
+ "retry",
65
+ "evidenceRequirements"
66
+ ],
67
+ "properties": {
68
+ "id": {
69
+ "enum": [
70
+ "artifact.publish",
71
+ "signed-channel.commit",
72
+ "release.activate",
73
+ "released-evidence.synthesize"
74
+ ]
75
+ },
76
+ "executor": { "enum": ["buildchain-core", "provider-adapter"] },
77
+ "adapter": { "type": "string", "minLength": 1 },
78
+ "artifactRoles": {
79
+ "type": "array",
80
+ "items": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": ["role", "root"],
84
+ "properties": {
85
+ "role": { "type": "string", "minLength": 1 },
86
+ "root": { "$ref": "#/$defs/root" }
87
+ }
88
+ }
89
+ },
90
+ "destination": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["kind", "locator"],
94
+ "properties": {
95
+ "kind": { "type": "string", "minLength": 1 },
96
+ "locator": { "type": "string", "minLength": 1 }
97
+ }
98
+ },
99
+ "channelPolicy": {
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "required": ["channel", "tagPattern", "authorityMove"],
103
+ "properties": {
104
+ "channel": { "enum": ["alpha", "release", "stable"] },
105
+ "tagPattern": { "type": "string", "minLength": 1 },
106
+ "authorityMove": { "enum": ["none", "signed-cas", "verified-ref"] }
107
+ }
108
+ },
109
+ "activationPolicy": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": ["mode", "environment"],
113
+ "properties": {
114
+ "mode": { "enum": ["none", "receipt-set", "receipt-only"] },
115
+ "environment": { "enum": ["none", "shadow", "production"] }
116
+ }
117
+ },
118
+ "readbackPredicates": {
119
+ "type": "array",
120
+ "items": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": ["id", "kind", "expected"],
124
+ "properties": {
125
+ "id": { "type": "string", "minLength": 1 },
126
+ "kind": { "type": "string", "minLength": 1 },
127
+ "expected": { "type": "string", "minLength": 1 }
128
+ }
129
+ }
130
+ },
131
+ "effect": { "$ref": "#/$defs/message" },
132
+ "observation": { "$ref": "#/$defs/message" },
133
+ "receipt": { "$ref": "#/$defs/message" },
134
+ "operationIdentity": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": [
138
+ "transactionRoot",
139
+ "capabilityId",
140
+ "subjectRoot",
141
+ "targetRoot",
142
+ "attemptKey"
143
+ ],
144
+ "properties": {
145
+ "transactionRoot": { "$ref": "#/$defs/root" },
146
+ "capabilityId": {
147
+ "enum": [
148
+ "artifact.publish",
149
+ "signed-channel.commit",
150
+ "release.activate",
151
+ "released-evidence.synthesize"
152
+ ]
153
+ },
154
+ "subjectRoot": { "$ref": "#/$defs/root" },
155
+ "targetRoot": { "$ref": "#/$defs/root" },
156
+ "attemptKey": { "type": "string", "minLength": 1 }
157
+ }
158
+ },
159
+ "idempotency": {
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": ["scope", "duplicate"],
163
+ "properties": {
164
+ "scope": { "enum": ["operation", "subject-target"] },
165
+ "duplicate": {
166
+ "enum": ["return-observed-receipt", "readback-before-retry"]
167
+ }
168
+ }
169
+ },
170
+ "retry": {
171
+ "type": "object",
172
+ "additionalProperties": false,
173
+ "required": ["class", "localAttempts", "exhausted"],
174
+ "properties": {
175
+ "class": { "enum": ["never", "readback", "provider-transient"] },
176
+ "localAttempts": { "type": "integer", "minimum": 0, "maximum": 3 },
177
+ "exhausted": {
178
+ "enum": ["blocked", "repair-required", "terminal-failure"]
179
+ }
180
+ }
181
+ },
182
+ "evidenceRequirements": {
183
+ "type": "array",
184
+ "minItems": 1,
185
+ "items": { "type": "string", "minLength": 1 }
186
+ }
187
+ }
188
+ },
189
+ "message": {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": ["kind", "schema"],
193
+ "properties": {
194
+ "kind": { "type": "string", "minLength": 1 },
195
+ "schema": { "type": "string", "minLength": 1 }
196
+ }
197
+ }
198
+ }
199
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.kungfu-tech.com/schemas/v4-adopter-delivery-v1.schema.json",
4
+ "title": "Buildchain v4 adopter delivery gate input",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "contract",
10
+ "driverSelector",
11
+ "artifactProfileSelector",
12
+ "request",
13
+ "context"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": { "const": 1 },
17
+ "contract": { "const": "kungfu-buildchain-v4-adopter-delivery/v1" },
18
+ "driverSelector": {
19
+ "enum": ["json-assertion", "kfd-category", "legacy-kfd"]
20
+ },
21
+ "artifactProfileSelector": { "enum": ["git-commit", "package"] },
22
+ "request": { "$ref": "#/$defs/request" },
23
+ "context": { "type": "object" }
24
+ },
25
+ "$defs": {
26
+ "reference": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["id", "version"],
30
+ "properties": {
31
+ "id": {
32
+ "type": "string",
33
+ "pattern": "^[a-z][a-z0-9.-]*(/[a-z][a-z0-9.-]*)*$"
34
+ },
35
+ "version": {
36
+ "type": "string",
37
+ "pattern": "^[1-9][0-9]*\\.[0-9]+\\.[0-9]+$"
38
+ }
39
+ }
40
+ },
41
+ "request": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": [
45
+ "schemaVersion",
46
+ "contract",
47
+ "protocol",
48
+ "artifactProfile",
49
+ "project",
50
+ "artifact",
51
+ "declaration"
52
+ ],
53
+ "properties": {
54
+ "schemaVersion": { "const": 1 },
55
+ "contract": { "const": "kungfu-buildchain-adopter-delivery-request" },
56
+ "protocol": { "$ref": "#/$defs/reference" },
57
+ "artifactProfile": { "$ref": "#/$defs/reference" },
58
+ "project": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": ["instanceId", "adopterId"],
62
+ "properties": {
63
+ "instanceId": { "type": "string", "minLength": 1 },
64
+ "adopterId": { "type": "string", "minLength": 1 }
65
+ }
66
+ },
67
+ "artifact": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": ["kind", "coordinate", "root"],
71
+ "properties": {
72
+ "kind": { "type": "string", "minLength": 1 },
73
+ "coordinate": { "type": "string", "minLength": 1 },
74
+ "root": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
75
+ }
76
+ },
77
+ "declaration": { "type": "object" }
78
+ }
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://kungfu.link/schemas/buildchain/v4-publication-qualification-v1.schema.json",
4
+ "title": "Buildchain v4 Publication Qualification Receipt",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "repository",
10
+ "candidateRoot",
11
+ "sourceSha",
12
+ "sourceRoot",
13
+ "policyDigest",
14
+ "artifacts",
15
+ "issuedAt",
16
+ "expiresAt",
17
+ "artifactRoot",
18
+ "receiptRoot"
19
+ ],
20
+ "properties": {
21
+ "schema": { "const": "kungfu.buildchain.v4-publication-qualification/v1" },
22
+ "repository": { "type": "string", "pattern": "^[^/\\s]+/[^/\\s]+$" },
23
+ "candidateRoot": { "$ref": "#/$defs/root" },
24
+ "sourceSha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
25
+ "sourceRoot": { "$ref": "#/$defs/root" },
26
+ "policyDigest": { "$ref": "#/$defs/root" },
27
+ "artifacts": {
28
+ "type": "array",
29
+ "minItems": 1,
30
+ "items": { "$ref": "#/$defs/artifact" }
31
+ },
32
+ "issuedAt": { "type": "string", "format": "date-time" },
33
+ "expiresAt": { "type": "string", "format": "date-time" },
34
+ "artifactRoot": { "$ref": "#/$defs/root" },
35
+ "receiptRoot": { "$ref": "#/$defs/root" }
36
+ },
37
+ "$defs": {
38
+ "root": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
39
+ "artifact": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["role", "platform", "artifactRoot", "manifestRoot"],
43
+ "properties": {
44
+ "role": { "type": "string", "minLength": 1 },
45
+ "platform": { "type": "string", "minLength": 1 },
46
+ "artifactRoot": { "$ref": "#/$defs/root" },
47
+ "manifestRoot": { "$ref": "#/$defs/root" }
48
+ }
49
+ }
50
+ }
51
+ }