@kungfu-tech/buildchain 4.0.1 → 4.0.2-alpha.10

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 (65) hide show
  1. package/architecture/agent-change-map.md +15 -6
  2. package/architecture/ci-lane-change-budget.json +76 -8
  3. package/architecture/internal-capabilities.json +9 -2
  4. package/architecture/maintainability-debt.json +66 -136
  5. package/architecture/maintainability-policy.json +17 -12
  6. package/architecture/release-tail-contract-inventory.json +4 -4
  7. package/architecture/v3-core-mechanism-inventory.json +3 -0
  8. package/architecture/v3-v4-live-capability-inventory.json +17 -17
  9. package/architecture/v4-delivery-warrant-shadow-fixtures.json +5 -5
  10. package/architecture/v4-release-invocation-fixtures.json +139 -0
  11. package/architecture/v4-release-topology.json +316 -0
  12. package/architecture/v4-runtime-semantic-closure.json +4 -1
  13. package/contracts/buildchain-v2-residuals-v1.json +0 -9
  14. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
  15. package/contracts/v4-release-invocation-v1.schema.json +134 -0
  16. package/dist/site/buildchain-contract.json +9 -9
  17. package/dist/site/buildchain-site.json +9 -9
  18. package/dist/site/kfd-claims.json +28 -7
  19. package/dist/site/kfd-upstream-aggregate.json +1 -1
  20. package/dist/site/manual-registry.json +1 -1
  21. package/dist/site/node-api-registry.json +92 -17
  22. package/dist/site/page-registry.json +4 -4
  23. package/dist/site/public-surface-audit.json +42 -10
  24. package/dist/site/publication-authority-registry.json +2 -3
  25. package/dist/site/publication-registry.json +4 -4
  26. package/dist/site/site-manifest.json +5 -5
  27. package/dist/site/workflow-registry.json +38 -11
  28. package/docs/dev-delivery-warrant.md +21 -0
  29. package/docs/node-api-reference.md +19 -16
  30. package/package.json +2 -2
  31. package/packages/core/dev-delivery-candidate-identity.js +45 -17
  32. package/packages/core/dev-delivery-execution-transfer.js +6 -7
  33. package/packages/core/dev-delivery-provider-heartbeat.js +22 -6
  34. package/packages/core/dev-delivery-warrant-legacy-recovery.js +248 -0
  35. package/packages/core/dev-delivery-warrant-native-compatibility.js +33 -0
  36. package/packages/core/dev-delivery-warrant-state.js +54 -54
  37. package/packages/core/dev-delivery-warrant.js +8 -0
  38. package/packages/core/dev-delivery-writer-protocol-transition.js +72 -0
  39. package/packages/core/release-tail-product-capabilities.js +29 -0
  40. package/packages/core/release-tail-provider-plane.js +2 -2
  41. package/packages/core/v4-canonical-contracts.js +14 -0
  42. package/packages/core/v4-floating-consumer-policy.js +4 -1
  43. package/packages/core/v4-product-publication.js +387 -0
  44. package/packages/core/v4-protected-publication-source.js +93 -0
  45. package/packages/core/v4-publication-qualification.js +1 -0
  46. package/packages/core/v4-release-invocation.js +425 -0
  47. package/scripts/audit-publication-control-plane.mjs +0 -1
  48. package/scripts/check-inventory.mjs +27 -59
  49. package/scripts/check-maintainability.mjs +13 -5
  50. package/scripts/check-v3-v4-capability-inventory.mjs +3 -61
  51. package/scripts/check-v4-floating-consumer-policy-contract.mjs +10 -20
  52. package/scripts/check-v4-release-topology.mjs +490 -0
  53. package/scripts/dev-delivery-warrant-options.mjs +15 -4
  54. package/scripts/dev-delivery-warrant.mjs +41 -7
  55. package/scripts/generate-channel-promotion-workflow.mjs +14 -55
  56. package/scripts/release-candidate-resolver.mjs +23 -24
  57. package/scripts/resume-from-candidate-run.mjs +16 -17
  58. package/scripts/v3-v4-capability-catalog.mjs +107 -0
  59. package/scripts/v4-declarative-promotion-admission.mjs +4 -1
  60. package/scripts/v4-product-publication-intent.mjs +114 -0
  61. package/scripts/v4-release-candidate-adapter.mjs +41 -0
  62. package/scripts/capture-package-release-propagation.mjs +0 -263
  63. package/scripts/publication-commit-evidence.mjs +0 -444
  64. package/scripts/publish-github-artifact-attestation-evidence.mjs +0 -201
  65. package/scripts/stage-github-artifact-attestation-inputs.mjs +0 -65
@@ -1,65 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from "node:fs";
4
- import path from "node:path";
5
- import process from "node:process";
6
-
7
- import { stageGitHubArtifactAttestationInputs } from "../packages/core/github-artifact-attestation.js";
8
-
9
- function args(argv) {
10
- const values = {};
11
- for (let index = 0; index < argv.length; index += 2) {
12
- const key = argv[index];
13
- const value = argv[index + 1];
14
- if (!key?.startsWith("--") || value === undefined) {
15
- throw new Error(`invalid argument near ${key || "<end>"}`);
16
- }
17
- values[key.slice(2)] = value;
18
- }
19
- return values;
20
- }
21
-
22
- function splitPaths(value) {
23
- return String(value || "")
24
- .split(/[\n,]/)
25
- .map((entry) => entry.trim())
26
- .filter(Boolean);
27
- }
28
-
29
- function readPolicy(value) {
30
- const candidate = path.resolve(String(value || ""));
31
- return fs.existsSync(candidate)
32
- ? JSON.parse(fs.readFileSync(candidate, "utf8"))
33
- : JSON.parse(String(value || ""));
34
- }
35
-
36
- function appendOutput(name, value) {
37
- const output = process.env.GITHUB_OUTPUT;
38
- if (!output) return;
39
- fs.appendFileSync(output, `${name}=${String(value)}\n`);
40
- }
41
-
42
- const options = args(process.argv.slice(2));
43
- const result = stageGitHubArtifactAttestationInputs({
44
- policy: readPolicy(options.policy),
45
- subjectRoots: splitPaths(options["subject-roots"]),
46
- platformManifestPaths: splitPaths(options["platform-manifests"]),
47
- releasePassportPath: options["release-passport"],
48
- outputDir: options["output-dir"],
49
- });
50
- appendOutput("input-dir", result.outputDir);
51
- appendOutput("policy-json", result.policyJson);
52
- appendOutput("subject-relative-path", result.relativePaths.subject);
53
- appendOutput("platform-manifest-relative-path", result.relativePaths.platformManifest);
54
- appendOutput("release-passport-relative-path", result.relativePaths.releasePassport);
55
- appendOutput("source-sha", result.policy.caller.sourceSha);
56
- appendOutput("signer-sha", result.policy.signer.workflowDigest);
57
- appendOutput("buildchain-runtime-sha", result.policy.build.buildchainRuntimeSha);
58
- appendOutput("subject-name", result.policy.subject.name);
59
- process.stdout.write(`${JSON.stringify({
60
- contract: result.contract,
61
- subject: result.policy.subject,
62
- caller: result.policy.caller,
63
- signer: result.policy.signer,
64
- paths: result.relativePaths,
65
- }, null, 2)}\n`);