@kungfu-tech/buildchain 3.0.6 → 3.0.7-alpha.1

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 (103) hide show
  1. package/README.md +4 -2
  2. package/actions/promote-buildchain-ref/README.md +10 -0
  3. package/actions/release-tail/README.md +17 -0
  4. package/bin/buildchain.mjs +11 -0
  5. package/bin/internal/command-registry.mjs +2 -0
  6. package/contracts/auditable-demo-scenario-v1.schema.json +1 -1
  7. package/contracts/engineering-housekeeper-v1.schema.json +143 -0
  8. package/contracts/fixtures/engineering-housekeeper-v1/cases.json +68 -0
  9. package/contracts/fixtures/release-tail-capabilities-v1/kungfu-alpha.json +273 -0
  10. package/contracts/publication-rehearsal-capsule-v1.schema.json +173 -0
  11. package/contracts/release-tail-capabilities-v1.schema.json +199 -0
  12. package/contracts/release-tail-provider-bindings-v1.schema.json +56 -0
  13. package/dist/site/agent-index.json +3 -0
  14. package/dist/site/artifact-schemas.json +6 -0
  15. package/dist/site/buildchain-contract.json +42 -27
  16. package/dist/site/buildchain-site.json +384 -33
  17. package/dist/site/capability-registry.json +15 -12
  18. package/dist/site/cli-registry.json +102 -0
  19. package/dist/site/controller-registry.json +19 -3
  20. package/dist/site/kfd-claims.json +359 -17
  21. package/dist/site/kfd-upstream-aggregate.json +1 -1
  22. package/dist/site/manual-registry.json +53 -7
  23. package/dist/site/node-api-registry.json +5882 -3605
  24. package/dist/site/page-registry.json +348 -21
  25. package/dist/site/public-surface-audit.json +396 -16
  26. package/dist/site/publication-authority-registry.json +106 -1
  27. package/dist/site/publication-registry.json +4 -4
  28. package/dist/site/release-provenance.json +7 -0
  29. package/dist/site/schemas/publication-rehearsal-capsule-v1.schema.json +269 -0
  30. package/dist/site/schemas/release-tail-capabilities-v1.schema.json +353 -0
  31. package/dist/site/schemas/release-tail-provider-bindings-v1.schema.json +94 -0
  32. package/dist/site/site-manifest.json +35 -11
  33. package/dist/site/workflow-registry.json +204 -10
  34. package/docs/MAP.md +6 -2
  35. package/docs/auditable-demo.md +2 -2
  36. package/docs/cli-reference.md +136 -0
  37. package/docs/dev-delivery-warrant.md +49 -4
  38. package/docs/engineering-housekeeper.md +138 -0
  39. package/docs/lifecycle-protocol.md +4 -2
  40. package/docs/node-api-reference.md +495 -281
  41. package/docs/publication-rehearsal.md +94 -0
  42. package/docs/release-governance.md +17 -2
  43. package/docs/release-tail-contract.md +160 -0
  44. package/docs/release-tail-provider-plane.md +120 -0
  45. package/docs/reusable-build-surface.md +11 -0
  46. package/package.json +11 -3
  47. package/packages/core/artifact-signing.js +61 -0
  48. package/packages/core/buildchain-agent-manuals.js +3 -0
  49. package/packages/core/buildchain-config.js +66 -6
  50. package/packages/core/buildchain-kfd-claims.js +1 -1
  51. package/packages/core/buildchain-publication-authority.js +5 -0
  52. package/packages/core/controller-evidence.js +2 -1
  53. package/packages/core/dev-delivery-warrant-cancellation.js +1 -0
  54. package/packages/core/dev-delivery-warrant-shadow.js +502 -0
  55. package/packages/core/dev-delivery-warrant.js +15 -6
  56. package/packages/core/diagnostics.js +8 -3
  57. package/packages/core/engineering-housekeeper-github-client.js +222 -0
  58. package/packages/core/engineering-housekeeper-github.js +501 -0
  59. package/packages/core/engineering-housekeeper.js +259 -0
  60. package/packages/core/index.js +42 -0
  61. package/packages/core/kfd-gate.js +45 -15
  62. package/packages/core/paper-agent-entry.js +11 -5
  63. package/packages/core/paper-repository.js +1 -0
  64. package/packages/core/paper-scaffold-content.js +21 -0
  65. package/packages/core/paper.js +28 -2
  66. package/packages/core/publication-rehearsal-projection.js +173 -0
  67. package/packages/core/publication-rehearsal-runtime.js +921 -0
  68. package/packages/core/release-passport.js +130 -20
  69. package/packages/core/release-tail-compatibility.js +60 -0
  70. package/packages/core/release-tail-provider-adapters.js +461 -0
  71. package/packages/core/release-tail-provider-plane.js +1228 -0
  72. package/scripts/assemble-publication-artifact-admission.mjs +1 -1
  73. package/scripts/assemble-self-publication-admission.mjs +2 -2
  74. package/scripts/audit-publication-control-plane.mjs +1 -1
  75. package/scripts/auditable-demo-bundle-verification.mjs +2 -3
  76. package/scripts/auditable-demo-platform.mjs +2 -2
  77. package/scripts/auditable-demo-renditions.mjs +1 -1
  78. package/scripts/auditable-demo.mjs +2 -2
  79. package/scripts/build-contract-core.mjs +8 -3
  80. package/scripts/build-standalone-binary.mjs +14 -3
  81. package/scripts/buildchain-cli-help.mjs +13 -0
  82. package/scripts/check-core-mechanism-inventory.mjs +347 -0
  83. package/scripts/check-inventory.mjs +10 -8
  84. package/scripts/check-maintainability.mjs +9 -2
  85. package/scripts/check-release-tail-contract.mjs +435 -0
  86. package/scripts/dev-delivery-warrant.mjs +31 -4
  87. package/scripts/dev-pr-auto-merge.mjs +30 -4
  88. package/scripts/dev-pr-delivery-warrant.mjs +50 -0
  89. package/scripts/engineering-housekeeper-workflow.mjs +394 -0
  90. package/scripts/generate-channel-promotion-workflow.mjs +10 -8
  91. package/scripts/generate-site-bundle.mjs +47 -4
  92. package/scripts/init-repo.mjs +26 -2
  93. package/scripts/inspect-artifact-signing-requests.mjs +6 -0
  94. package/scripts/materialize-self-release-candidate-version.mjs +137 -0
  95. package/scripts/publication-commit-evidence.mjs +69 -23
  96. package/scripts/release-candidate-resolver.mjs +16 -10
  97. package/scripts/release-tail.mjs +159 -0
  98. package/scripts/resume-from-candidate-run.mjs +123 -9
  99. package/scripts/seal-artifact-signing-requests.mjs +6 -0
  100. package/scripts/site-capability-metadata.mjs +13 -0
  101. package/scripts/v4-architecture.mjs +600 -0
  102. package/scripts/web-surface-core.mjs +8 -2
  103. package/scripts/workflow-call-contract.mjs +184 -5
@@ -0,0 +1,173 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.kungfu.ai/contracts/publication-rehearsal-capsule-v1.schema.json",
4
+ "title": "Buildchain publication rehearsal capsule",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "contract",
9
+ "schemaVersion",
10
+ "root",
11
+ "declaration",
12
+ "policyRoots",
13
+ "passport",
14
+ "transaction",
15
+ "files",
16
+ "providerBindings",
17
+ "providerObservations",
18
+ "runtime"
19
+ ],
20
+ "properties": {
21
+ "contract": {
22
+ "const": "kungfu.buildchain.publication-rehearsal-capsule/v1"
23
+ },
24
+ "schemaVersion": { "const": 1 },
25
+ "root": { "$ref": "#/$defs/root" },
26
+ "declaration": {
27
+ "$ref": "release-tail-capabilities-v1.schema.json"
28
+ },
29
+ "policyRoots": {
30
+ "type": "array",
31
+ "minItems": 1,
32
+ "uniqueItems": true,
33
+ "items": { "$ref": "#/$defs/root" }
34
+ },
35
+ "passport": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["path", "root"],
39
+ "properties": {
40
+ "path": { "$ref": "#/$defs/path" },
41
+ "root": { "$ref": "#/$defs/root" }
42
+ }
43
+ },
44
+ "transaction": {
45
+ "type": "object",
46
+ "required": [
47
+ "schema",
48
+ "transactionPolicy",
49
+ "transactionRoot",
50
+ "declarationRoot",
51
+ "planRoot",
52
+ "subject",
53
+ "state",
54
+ "operationOrder",
55
+ "operations",
56
+ "observations",
57
+ "receipts",
58
+ "failure",
59
+ "stateRoot"
60
+ ]
61
+ },
62
+ "files": {
63
+ "type": "array",
64
+ "minItems": 1,
65
+ "items": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": ["role", "path", "size", "root"],
69
+ "properties": {
70
+ "role": { "type": "string", "minLength": 1 },
71
+ "path": { "$ref": "#/$defs/path" },
72
+ "size": { "type": "integer", "minimum": 0 },
73
+ "root": { "$ref": "#/$defs/root" }
74
+ }
75
+ }
76
+ },
77
+ "providerBindings": {
78
+ "$ref": "release-tail-provider-bindings-v1.schema.json"
79
+ },
80
+ "providerObservations": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["operationId", "readbacks", "apply"],
86
+ "properties": {
87
+ "operationId": { "$ref": "#/$defs/root" },
88
+ "readbacks": {
89
+ "type": "array",
90
+ "minItems": 1,
91
+ "items": { "$ref": "#/$defs/observation" }
92
+ },
93
+ "apply": {
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": ["outcome", "code", "classification"],
97
+ "properties": {
98
+ "outcome": {
99
+ "enum": ["applied", "transient", "conflict"]
100
+ },
101
+ "code": { "type": "string", "minLength": 1 },
102
+ "classification": { "type": "string", "minLength": 1 }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ },
108
+ "runtime": {
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": ["platform", "declaredEnvironment", "externalEffects"],
112
+ "properties": {
113
+ "platform": { "const": "portable" },
114
+ "declaredEnvironment": {
115
+ "type": "array",
116
+ "uniqueItems": true,
117
+ "items": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]*$" }
118
+ },
119
+ "externalEffects": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": ["capabilityId", "adapter", "kind"],
125
+ "properties": {
126
+ "capabilityId": { "type": "string", "minLength": 1 },
127
+ "adapter": { "type": "string", "minLength": 1 },
128
+ "kind": { "type": "string", "minLength": 1 }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
134
+ },
135
+ "$defs": {
136
+ "root": {
137
+ "type": "string",
138
+ "pattern": "^sha256:[0-9a-f]{64}$"
139
+ },
140
+ "path": {
141
+ "type": "string",
142
+ "minLength": 1,
143
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*//)(?!.*\\\\).+$"
144
+ },
145
+ "observation": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": [
149
+ "outcome",
150
+ "subjectRoot",
151
+ "targetRoot",
152
+ "evidenceRoots",
153
+ "providerCode"
154
+ ],
155
+ "properties": {
156
+ "outcome": {
157
+ "enum": ["observed", "absent", "transient", "conflict"]
158
+ },
159
+ "subjectRoot": {
160
+ "anyOf": [{ "$ref": "#/$defs/root" }, { "const": "" }]
161
+ },
162
+ "targetRoot": {
163
+ "anyOf": [{ "$ref": "#/$defs/root" }, { "const": "" }]
164
+ },
165
+ "evidenceRoots": {
166
+ "type": "array",
167
+ "items": { "$ref": "#/$defs/root" }
168
+ },
169
+ "providerCode": { "type": "string", "minLength": 1 }
170
+ }
171
+ }
172
+ }
173
+ }
@@ -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,56 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.kungfu.ai/contracts/release-tail-provider-bindings-v1.schema.json",
4
+ "title": "Buildchain release-tail provider bindings",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "artifacts", "documents", "evidence"],
8
+ "properties": {
9
+ "schema": {
10
+ "const": "kungfu.buildchain.release-tail.provider-bindings/v1"
11
+ },
12
+ "artifacts": {
13
+ "type": "object",
14
+ "additionalProperties": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["path", "name"],
18
+ "properties": {
19
+ "path": { "type": "string", "minLength": 1 },
20
+ "name": { "type": "string", "minLength": 1 }
21
+ }
22
+ }
23
+ },
24
+ "documents": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "properties": {
28
+ "signed-channel.commit": { "$ref": "#/$defs/document" },
29
+ "release.activate": { "$ref": "#/$defs/document" }
30
+ }
31
+ },
32
+ "evidence": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["inputs", "output"],
36
+ "properties": {
37
+ "inputs": {
38
+ "type": "array",
39
+ "items": { "type": "string", "minLength": 1 }
40
+ },
41
+ "output": { "type": "string", "minLength": 1 }
42
+ }
43
+ }
44
+ },
45
+ "$defs": {
46
+ "document": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["path", "method"],
50
+ "properties": {
51
+ "path": { "type": "string", "minLength": 1 },
52
+ "method": { "enum": ["PUT", "POST"] }
53
+ }
54
+ }
55
+ }
56
+ }
@@ -17,6 +17,9 @@
17
17
  "artifact-schemas.json",
18
18
  "release-passport-check-manifest.json",
19
19
  "schemas/release-passport-v1.schema.json",
20
+ "schemas/publication-rehearsal-capsule-v1.schema.json",
21
+ "schemas/release-tail-capabilities-v1.schema.json",
22
+ "schemas/release-tail-provider-bindings-v1.schema.json",
20
23
  "schemas/kfd-agent-hub-adoption.schema.json",
21
24
  "schemas/kfd-product-gate-input-v1.schema.json",
22
25
  "schemas/kfd-support-projection-v1.schema.json",
@@ -5,6 +5,9 @@
5
5
  "buildchain.release.json",
6
6
  "release-passport-check-manifest.json",
7
7
  "schemas/release-passport-v1.schema.json",
8
+ "schemas/publication-rehearsal-capsule-v1.schema.json",
9
+ "schemas/release-tail-capabilities-v1.schema.json",
10
+ "schemas/release-tail-provider-bindings-v1.schema.json",
8
11
  "schemas/kfd-agent-hub-adoption.schema.json",
9
12
  "schemas/kfd-product-gate-input-v1.schema.json",
10
13
  "schemas/kfd-support-projection-v1.schema.json",
@@ -40,6 +43,9 @@
40
43
  "artifact-schemas.json",
41
44
  "release-passport-check-manifest.json",
42
45
  "schemas/release-passport-v1.schema.json",
46
+ "schemas/publication-rehearsal-capsule-v1.schema.json",
47
+ "schemas/release-tail-capabilities-v1.schema.json",
48
+ "schemas/release-tail-provider-bindings-v1.schema.json",
43
49
  "schemas/kfd-agent-hub-adoption.schema.json",
44
50
  "schemas/kfd-product-gate-input-v1.schema.json",
45
51
  "schemas/kfd-support-projection-v1.schema.json",