@kungfu-tech/buildchain 3.0.9-alpha.7 → 3.0.9-alpha.9

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 (43) hide show
  1. package/bin/buildchain.mjs +5 -1
  2. package/contracts/dev-delivery-authority-v2.schema.json +253 -0
  3. package/dist/site/agent-index.json +1 -0
  4. package/dist/site/artifact-schemas.json +2 -0
  5. package/dist/site/buildchain-contract.json +7 -7
  6. package/dist/site/buildchain-site.json +135 -19
  7. package/dist/site/capability-registry.json +2 -2
  8. package/dist/site/cli-registry.json +23 -0
  9. package/dist/site/kfd-claims.json +33 -8
  10. package/dist/site/kfd-upstream-aggregate.json +1 -1
  11. package/dist/site/manual-registry.json +4 -4
  12. package/dist/site/node-api-registry.json +907 -143
  13. package/dist/site/page-registry.json +127 -11
  14. package/dist/site/public-surface-audit.json +228 -7
  15. package/dist/site/publication-registry.json +4 -4
  16. package/dist/site/release-provenance.json +2 -0
  17. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +442 -0
  18. package/dist/site/site-manifest.json +8 -8
  19. package/dist/site/workflow-registry.json +8 -6
  20. package/docs/MAP.md +1 -0
  21. package/docs/cli-reference.md +121 -0
  22. package/docs/dev-delivery-qualification-landing-adr.md +137 -0
  23. package/docs/dev-delivery-warrant.md +106 -13
  24. package/docs/node-api-reference.md +51 -20
  25. package/docs/versioning.md +2 -0
  26. package/package.json +4 -2
  27. package/packages/core/buildchain-channel-identity.js +2 -3
  28. package/packages/core/dev-delivery-authority.js +996 -0
  29. package/packages/core/dev-delivery-native-proof.js +89 -4
  30. package/packages/core/dev-delivery-warrant-settlement.js +65 -22
  31. package/packages/core/dev-delivery-warrant.js +92 -44
  32. package/scripts/buildchain-cli-help.mjs +3 -0
  33. package/scripts/check-inventory.mjs +1 -1
  34. package/scripts/dev-delivery-authority.mjs +368 -0
  35. package/scripts/dev-delivery-native-run.mjs +52 -4
  36. package/scripts/dev-delivery-proof.mjs +10 -0
  37. package/scripts/dev-delivery-two-phase-resume.mjs +90 -0
  38. package/scripts/dev-delivery-two-phase.mjs +31 -52
  39. package/scripts/dev-delivery-warrant.mjs +9 -2
  40. package/scripts/generate-site-bundle.mjs +6 -3
  41. package/scripts/site-capability-metadata.mjs +13 -1
  42. package/scripts/workflow-call-contract.mjs +1 -1
  43. package/templates/native-dev-delivery.yml +17 -13
@@ -1378,6 +1378,10 @@ async function handleDevCommand(args) {
1378
1378
  runScript("dev-delivery-warrant.mjs", devArgs);
1379
1379
  return;
1380
1380
  }
1381
+ if (subcommand === "authority") {
1382
+ runScript("dev-delivery-authority.mjs", devArgs);
1383
+ return;
1384
+ }
1381
1385
  if (subcommand === "proof") {
1382
1386
  runScript("dev-delivery-proof.mjs", devArgs);
1383
1387
  return;
@@ -1387,7 +1391,7 @@ async function handleDevCommand(args) {
1387
1391
  return;
1388
1392
  }
1389
1393
  if (subcommand !== "merge-queue") {
1390
- throw new Error("usage: buildchain dev <pr-admit|merge-queue|warrant|proof|two-phase> [options]");
1394
+ throw new Error("usage: buildchain dev <pr-admit|merge-queue|warrant|authority|proof|two-phase> [options]");
1391
1395
  }
1392
1396
  runScript("dev-merge-queue.mjs", devArgs);
1393
1397
  return;
@@ -0,0 +1,253 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.libkungfu.dev/schemas/dev-delivery-authority-v2.schema.json",
4
+ "title": "Buildchain Dev Delivery Authority State v2",
5
+ "description": "Opt-in durable state separating bounded qualification-only leases from one exclusive merge_group Landing Warrant.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "contract",
11
+ "authorityMode",
12
+ "repository",
13
+ "protectedBase",
14
+ "generation",
15
+ "qualificationCounter",
16
+ "landingCounter",
17
+ "policy",
18
+ "qualificationLeases",
19
+ "landingWarrant",
20
+ "candidates",
21
+ "migration",
22
+ "updatedAt",
23
+ "stateRoot"
24
+ ],
25
+ "properties": {
26
+ "schemaVersion": { "const": 2 },
27
+ "contract": { "const": "kungfu-buildchain-dev-delivery-authority" },
28
+ "authorityMode": { "const": "bounded-qualification-landing" },
29
+ "repository": {
30
+ "type": "string",
31
+ "pattern": "^[^/\\s]+/[^/\\s]+$"
32
+ },
33
+ "protectedBase": {
34
+ "type": "string",
35
+ "pattern": "^dev/v[0-9]+/v[0-9]+\\.[0-9]+$"
36
+ },
37
+ "generation": { "type": "integer", "minimum": 0 },
38
+ "qualificationCounter": { "type": "integer", "minimum": 0 },
39
+ "landingCounter": { "type": "integer", "minimum": 0 },
40
+ "policy": {
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": [
44
+ "maxQualificationLeases",
45
+ "qualificationLeaseSeconds",
46
+ "landingLeaseSeconds"
47
+ ],
48
+ "properties": {
49
+ "maxQualificationLeases": { "type": "integer", "minimum": 1 },
50
+ "qualificationLeaseSeconds": { "type": "integer", "minimum": 1 },
51
+ "landingLeaseSeconds": { "type": "integer", "minimum": 1 },
52
+ "maxLandingOvertakes": { "type": "integer", "minimum": 0 },
53
+ "maxQualificationAttempts": { "type": "integer", "minimum": 1 }
54
+ }
55
+ },
56
+ "qualificationLeases": {
57
+ "type": "array",
58
+ "items": { "$ref": "#/$defs/qualificationLease" }
59
+ },
60
+ "landingWarrant": {
61
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/landingWarrant" }]
62
+ },
63
+ "candidates": {
64
+ "type": "array",
65
+ "items": { "$ref": "#/$defs/candidate" }
66
+ },
67
+ "migration": {
68
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/migration" }]
69
+ },
70
+ "updatedAt": { "type": "string", "format": "date-time" },
71
+ "stateRoot": { "$ref": "#/$defs/root" }
72
+ },
73
+ "$defs": {
74
+ "root": {
75
+ "type": "string",
76
+ "pattern": "^sha256:[0-9a-f]{64}$"
77
+ },
78
+ "sha": {
79
+ "type": "string",
80
+ "pattern": "^[0-9a-f]{40}$"
81
+ },
82
+ "qualificationLease": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "schema",
87
+ "authority",
88
+ "mergeGroupAdmission",
89
+ "candidateId",
90
+ "token",
91
+ "generation",
92
+ "issuedAt",
93
+ "expiresAt"
94
+ ],
95
+ "properties": {
96
+ "schema": {
97
+ "const": "kungfu.buildchain.dev-delivery-qualification-lease/v1"
98
+ },
99
+ "authority": { "const": "qualification-only" },
100
+ "mergeGroupAdmission": { "const": false },
101
+ "candidateId": { "$ref": "#/$defs/root" },
102
+ "token": { "$ref": "#/$defs/root" },
103
+ "generation": { "type": "integer", "minimum": 1 },
104
+ "issuedAt": { "type": "string", "format": "date-time" },
105
+ "heartbeatAt": { "type": "string", "format": "date-time" },
106
+ "expiresAt": { "type": "string", "format": "date-time" }
107
+ }
108
+ },
109
+ "landingWarrant": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "schema",
114
+ "authority",
115
+ "mergeGroupAdmission",
116
+ "candidateId",
117
+ "token",
118
+ "generation",
119
+ "issuedAt",
120
+ "expiresAt"
121
+ ],
122
+ "properties": {
123
+ "schema": {
124
+ "const": "kungfu.buildchain.dev-delivery-landing-warrant/v1"
125
+ },
126
+ "authority": { "const": "merge-group-admission" },
127
+ "mergeGroupAdmission": { "const": true },
128
+ "candidateId": { "$ref": "#/$defs/root" },
129
+ "token": { "$ref": "#/$defs/root" },
130
+ "generation": { "type": "integer", "minimum": 1 },
131
+ "issuedAt": { "type": "string", "format": "date-time" },
132
+ "heartbeatAt": { "type": "string", "format": "date-time" },
133
+ "expiresAt": { "type": "string", "format": "date-time" }
134
+ }
135
+ },
136
+ "qualification": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": ["evidenceRoot", "qualifiedAt"],
140
+ "properties": {
141
+ "evidenceRoot": { "$ref": "#/$defs/root" },
142
+ "qualifiedAt": { "type": "string", "format": "date-time" }
143
+ }
144
+ },
145
+ "terminal": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": ["outcome", "evidenceRoot", "reason", "settledAt"],
149
+ "properties": {
150
+ "outcome": {
151
+ "enum": ["merged", "terminal-failure", "dequeued", "cancelled"]
152
+ },
153
+ "evidenceRoot": { "$ref": "#/$defs/root" },
154
+ "reason": { "type": "string" },
155
+ "settledAt": { "type": "string", "format": "date-time" }
156
+ }
157
+ },
158
+ "migration": {
159
+ "type": "object",
160
+ "additionalProperties": false,
161
+ "required": ["schema", "legacyContract", "legacyStateRoot", "migratedAt"],
162
+ "properties": {
163
+ "schema": {
164
+ "const": "kungfu.buildchain.dev-delivery-authority-migration/v1"
165
+ },
166
+ "legacyContract": {
167
+ "const": "kungfu-buildchain-dev-delivery-warrant-queue"
168
+ },
169
+ "legacyStateRoot": { "$ref": "#/$defs/root" },
170
+ "migratedAt": { "type": "string", "format": "date-time" }
171
+ }
172
+ },
173
+ "candidate": {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "required": [
177
+ "repository",
178
+ "protectedBase",
179
+ "pullRequestNumber",
180
+ "assignmentRoot",
181
+ "initiativeRoot",
182
+ "sourceIdentityRoot",
183
+ "deliveryClass",
184
+ "candidateId",
185
+ "sourceHead",
186
+ "sourcePatchRoot",
187
+ "sourceProofRoot",
188
+ "planRoot",
189
+ "closureRoot",
190
+ "dependencyRoot",
191
+ "toolchainRoot",
192
+ "enqueuedAt",
193
+ "updatedAt",
194
+ "status",
195
+ "qualification",
196
+ "terminal"
197
+ ],
198
+ "properties": {
199
+ "repository": { "type": "string" },
200
+ "protectedBase": { "type": "string" },
201
+ "pullRequestNumber": { "type": "integer", "minimum": 1 },
202
+ "assignmentRoot": { "$ref": "#/$defs/root" },
203
+ "initiativeRoot": { "$ref": "#/$defs/root" },
204
+ "sourceIdentityRoot": { "$ref": "#/$defs/root" },
205
+ "deliveryClass": {
206
+ "enum": [
207
+ "non-native-fast",
208
+ "native-proof-required",
209
+ "cross-platform",
210
+ "release"
211
+ ]
212
+ },
213
+ "identitySemantics": { "const": "chained-attempt-v2" },
214
+ "predecessorCandidateId": { "$ref": "#/$defs/root" },
215
+ "candidateId": { "$ref": "#/$defs/root" },
216
+ "sourceHead": { "$ref": "#/$defs/sha" },
217
+ "sourcePatchRoot": { "$ref": "#/$defs/root" },
218
+ "sourceProofRoot": { "$ref": "#/$defs/root" },
219
+ "planRoot": { "$ref": "#/$defs/root" },
220
+ "closureRoot": { "$ref": "#/$defs/root" },
221
+ "dependencyRoot": { "$ref": "#/$defs/root" },
222
+ "toolchainRoot": { "$ref": "#/$defs/root" },
223
+ "qualificationDomains": {
224
+ "type": "array",
225
+ "uniqueItems": true,
226
+ "items": { "$ref": "#/$defs/root" }
227
+ },
228
+ "qualificationAttempts": { "type": "integer", "minimum": 0 },
229
+ "landingOvertakes": { "type": "integer", "minimum": 0 },
230
+ "enqueuedAt": { "type": "string", "format": "date-time" },
231
+ "updatedAt": { "type": "string", "format": "date-time" },
232
+ "status": {
233
+ "enum": [
234
+ "queued",
235
+ "qualifying",
236
+ "qualified",
237
+ "landing",
238
+ "merged",
239
+ "terminal-failure",
240
+ "dequeued",
241
+ "cancelled"
242
+ ]
243
+ },
244
+ "qualification": {
245
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/qualification" }]
246
+ },
247
+ "terminal": {
248
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/terminal" }]
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }
@@ -22,6 +22,7 @@
22
22
  "schemas/release-tail-provider-bindings-v1.schema.json",
23
23
  "schemas/kfd-agent-hub-adoption.schema.json",
24
24
  "schemas/kfd-product-gate-input-v1.schema.json",
25
+ "schemas/dev-delivery-authority-v2.schema.json",
25
26
  "buildchain-contract.json",
26
27
  "kfd-upstream-aggregate.json",
27
28
  "kfd-claims.json",
@@ -10,6 +10,7 @@
10
10
  "schemas/release-tail-provider-bindings-v1.schema.json",
11
11
  "schemas/kfd-agent-hub-adoption.schema.json",
12
12
  "schemas/kfd-product-gate-input-v1.schema.json",
13
+ "schemas/dev-delivery-authority-v2.schema.json",
13
14
  "kfd-support.json",
14
15
  "artifact-evidence.json",
15
16
  "product-mechanism.json",
@@ -47,6 +48,7 @@
47
48
  "schemas/release-tail-provider-bindings-v1.schema.json",
48
49
  "schemas/kfd-agent-hub-adoption.schema.json",
49
50
  "schemas/kfd-product-gate-input-v1.schema.json",
51
+ "schemas/dev-delivery-authority-v2.schema.json",
50
52
  "buildchain-contract.json",
51
53
  "kfd-claims.json",
52
54
  "product-mechanism.json",
@@ -4,7 +4,7 @@
4
4
  "product": {
5
5
  "name": "Buildchain",
6
6
  "package": "@kungfu-tech/buildchain",
7
- "version": "3.0.9-alpha.7",
7
+ "version": "3.0.9-alpha.9",
8
8
  "repository": "https://github.com/kungfu-systems/buildchain"
9
9
  },
10
10
  "majorLine": "v3",
@@ -575,7 +575,7 @@
575
575
  "resume-from-candidate-run is fail-closed and uses a fresh caller event instead of rerunning a frozen startup graph"
576
576
  ],
577
577
  "breakingDigest": "sha256:9db8dd07152855d03ff30f9c571438593c689d3e8139fa45431d000f548242f5",
578
- "auditDigest": "sha256:d58c6ca74c7ac1defb9dcc35e26b6dde097b82f6aaea4e2c71e90ea15887158e",
578
+ "auditDigest": "sha256:27d35c025cbf7b5c87af599da3559657fc1aea88cf9d912a8035ccc1e7057c07",
579
579
  "compatibleBreakingDigests": [
580
580
  "sha256:aa30f22e3af0a89841310bdbdc900844dd95a66974db173fa140a71bbd7e82c0"
581
581
  ],
@@ -1035,7 +1035,7 @@
1035
1035
  "README badge block checks and writes are generated from machine-readable repository facts"
1036
1036
  ],
1037
1037
  "breakingDigest": "sha256:90a73892b2d6c214048448d5f45df75639bdf7b7e8fefd9c596e04b087407bcc",
1038
- "auditDigest": "sha256:eb793611ddb1463f4e9414a6d861d9573f737485b4a57ac6e86cc4ed8a928b35"
1038
+ "auditDigest": "sha256:856e79ff668877e0b366850bb0e37fa193206f8dc5a51091bc74dd1c2240f8e2"
1039
1039
  },
1040
1040
  {
1041
1041
  "contractVersion": 1,
@@ -1125,7 +1125,7 @@
1125
1125
  "manual entries carry source file digests so downstream sites and agents can detect stale hand-written documentation"
1126
1126
  ],
1127
1127
  "breakingDigest": "sha256:7d0d2819e3a3e72989d9c57b5efe9d0bc0a79bc0f2c82a0c7b9d6c5a211a91f2",
1128
- "auditDigest": "sha256:68a70c70463b5a5baa36201e17b487c266a3945306eaa90f2afc9f9bc09c76ca"
1128
+ "auditDigest": "sha256:76c7533430e36b4675b960be6a9bfa027db80638f87fb1a760ccd47c149531bb"
1129
1129
  },
1130
1130
  {
1131
1131
  "contractVersion": 1,
@@ -1147,7 +1147,7 @@
1147
1147
  "agents can discover supported Node APIs without importing internal file paths"
1148
1148
  ],
1149
1149
  "breakingDigest": "sha256:48f925608d3e2131d90936b07dc2a30341204cae3e6e785c0f77d61ad755c945",
1150
- "auditDigest": "sha256:60c1db203ba2c8b505bb5dfead664eb1d4c2384958b6f83a66e082a3ab3b64c9"
1150
+ "auditDigest": "sha256:77d83706fea0f37219e8dbb5c84db17e2caac44a568caa7085dfef4a8548d6b1"
1151
1151
  },
1152
1152
  {
1153
1153
  "contractVersion": 1,
@@ -3869,7 +3869,7 @@
3869
3869
  "missing receipts are non-qualifying and must not be represented as a successful controller run"
3870
3870
  ],
3871
3871
  "breakingDigest": "sha256:015d8de793adbd4c539416be7d7512e18cc92097e629b0203fa06d2c183e98bd",
3872
- "auditDigest": "sha256:d58c6ca74c7ac1defb9dcc35e26b6dde097b82f6aaea4e2c71e90ea15887158e"
3872
+ "auditDigest": "sha256:27d35c025cbf7b5c87af599da3559657fc1aea88cf9d912a8035ccc1e7057c07"
3873
3873
  },
3874
3874
  {
3875
3875
  "contractVersion": 1,
@@ -4084,5 +4084,5 @@
4084
4084
  ],
4085
4085
  "compatibilityProofRegistryRoot": "sha256:aec674d174461493e3493b3fe3164d62745a9ce18cb6a560f94bd99f2759eb53",
4086
4086
  "compatibilityDigest": "sha256:eb2fafb181b33002f81102a966f0a801ab1798101446635703ab6acfea51d9aa",
4087
- "contractDigest": "sha256:78fb5d4869379fa9274eb299f8f01ff264be3c66c1528d46b2dd3b86c45e0383"
4087
+ "contractDigest": "sha256:68b34e019870d326f662de17cdf959bd916d9c04ae3b5040f2836af569bb8e10"
4088
4088
  }