@kungfu-tech/buildchain 4.0.2-alpha.2 → 4.0.2-alpha.4

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 (39) hide show
  1. package/architecture/agent-change-map.md +3 -0
  2. package/architecture/internal-capabilities.json +2 -0
  3. package/architecture/maintainability-debt.json +17 -15
  4. package/architecture/maintainability-policy.json +6 -6
  5. package/architecture/v3-core-mechanism-inventory.json +1 -0
  6. package/architecture/v4-delivery-warrant-shadow-fixtures.json +5 -5
  7. package/architecture/v4-release-invocation-fixtures.json +20 -0
  8. package/architecture/v4-release-topology.json +85 -80
  9. package/architecture/v4-runtime-semantic-closure.json +4 -1
  10. package/contracts/v4-release-invocation-v1.schema.json +50 -2
  11. package/dist/site/buildchain-contract.json +8 -8
  12. package/dist/site/buildchain-site.json +7 -7
  13. package/dist/site/kfd-claims.json +20 -3
  14. package/dist/site/kfd-upstream-aggregate.json +1 -1
  15. package/dist/site/manual-registry.json +1 -1
  16. package/dist/site/node-api-registry.json +88 -13
  17. package/dist/site/page-registry.json +2 -2
  18. package/dist/site/public-surface-audit.json +20 -3
  19. package/dist/site/publication-registry.json +4 -4
  20. package/dist/site/site-manifest.json +5 -5
  21. package/dist/site/workflow-registry.json +22 -5
  22. package/docs/node-api-reference.md +13 -10
  23. package/package.json +1 -1
  24. package/packages/core/dev-delivery-execution-transfer.js +6 -7
  25. package/packages/core/dev-delivery-warrant-legacy-recovery.js +4 -2
  26. package/packages/core/dev-delivery-warrant-native-compatibility.js +33 -0
  27. package/packages/core/dev-delivery-warrant-state.js +42 -26
  28. package/packages/core/dev-delivery-warrant.js +8 -0
  29. package/packages/core/dev-delivery-writer-protocol-transition.js +72 -0
  30. package/packages/core/v4-canonical-contracts.js +2 -0
  31. package/packages/core/v4-protected-publication-source.js +93 -0
  32. package/packages/core/v4-publication-qualification.js +1 -0
  33. package/packages/core/v4-release-invocation.js +72 -3
  34. package/scripts/check-v4-release-topology.mjs +169 -23
  35. package/scripts/dev-delivery-warrant.mjs +13 -1
  36. package/scripts/generate-channel-promotion-workflow.mjs +2 -1
  37. package/scripts/release-candidate-resolver.mjs +17 -17
  38. package/scripts/resume-from-candidate-run.mjs +15 -16
  39. package/scripts/v4-release-candidate-adapter.mjs +41 -0
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execFileSync } from "node:child_process";
4
+ import path from "node:path";
5
+ import { fileURLToPath, pathToFileURL } from "node:url";
6
+
7
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
8
+
9
+ export function resolveV4ReleaseCandidateAdapter({
10
+ resumeCandidateRunId = "",
11
+ } = {}) {
12
+ const mode = String(resumeCandidateRunId || "").trim() ? "recovery" : "fresh";
13
+ return Object.freeze({
14
+ mode,
15
+ script:
16
+ mode === "recovery"
17
+ ? "scripts/resume-from-candidate-run.mjs"
18
+ : "scripts/release-candidate-resolver.mjs",
19
+ });
20
+ }
21
+
22
+ export function runV4ReleaseCandidateAdapter({
23
+ env = process.env,
24
+ exec = execFileSync,
25
+ } = {}) {
26
+ const route = resolveV4ReleaseCandidateAdapter({
27
+ resumeCandidateRunId: env.BUILDCHAIN_RESUME_CANDIDATE_RUN_ID,
28
+ });
29
+ exec(process.execPath, [path.join(root, route.script)], {
30
+ env,
31
+ stdio: "inherit",
32
+ });
33
+ return route;
34
+ }
35
+
36
+ if (
37
+ process.argv[1] &&
38
+ import.meta.url === pathToFileURL(process.argv[1]).href
39
+ ) {
40
+ runV4ReleaseCandidateAdapter();
41
+ }