@kungfu-tech/buildchain 4.0.2-alpha.0 → 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 (59) hide show
  1. package/architecture/agent-change-map.md +7 -4
  2. package/architecture/ci-lane-change-budget.json +76 -8
  3. package/architecture/internal-capabilities.json +2 -0
  4. package/architecture/maintainability-debt.json +52 -124
  5. package/architecture/maintainability-policy.json +15 -10
  6. package/architecture/release-tail-contract-inventory.json +4 -4
  7. package/architecture/v3-core-mechanism-inventory.json +1 -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 +243 -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 +7 -7
  18. package/dist/site/kfd-claims.json +24 -5
  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 +90 -15
  22. package/dist/site/page-registry.json +2 -2
  23. package/dist/site/public-surface-audit.json +34 -9
  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 +36 -11
  28. package/docs/node-api-reference.md +16 -13
  29. package/package.json +2 -2
  30. package/packages/core/dev-delivery-candidate-identity.js +45 -17
  31. package/packages/core/dev-delivery-execution-transfer.js +6 -7
  32. package/packages/core/dev-delivery-provider-heartbeat.js +22 -6
  33. package/packages/core/dev-delivery-warrant-legacy-recovery.js +4 -2
  34. package/packages/core/dev-delivery-warrant-native-compatibility.js +33 -0
  35. package/packages/core/dev-delivery-warrant-state.js +54 -54
  36. package/packages/core/dev-delivery-warrant.js +8 -0
  37. package/packages/core/dev-delivery-writer-protocol-transition.js +72 -0
  38. package/packages/core/v4-canonical-contracts.js +10 -0
  39. package/packages/core/v4-floating-consumer-policy.js +4 -1
  40. package/packages/core/v4-protected-publication-source.js +93 -0
  41. package/packages/core/v4-publication-qualification.js +1 -0
  42. package/packages/core/v4-release-invocation.js +425 -0
  43. package/scripts/audit-publication-control-plane.mjs +0 -1
  44. package/scripts/check-inventory.mjs +27 -59
  45. package/scripts/check-maintainability.mjs +13 -5
  46. package/scripts/check-v3-v4-capability-inventory.mjs +3 -61
  47. package/scripts/check-v4-floating-consumer-policy-contract.mjs +10 -20
  48. package/scripts/check-v4-release-topology.mjs +383 -0
  49. package/scripts/dev-delivery-warrant.mjs +26 -5
  50. package/scripts/generate-channel-promotion-workflow.mjs +14 -55
  51. package/scripts/release-candidate-resolver.mjs +17 -17
  52. package/scripts/resume-from-candidate-run.mjs +15 -16
  53. package/scripts/v3-v4-capability-catalog.mjs +107 -0
  54. package/scripts/v4-declarative-promotion-admission.mjs +4 -1
  55. package/scripts/v4-release-candidate-adapter.mjs +41 -0
  56. package/scripts/capture-package-release-propagation.mjs +0 -263
  57. package/scripts/publication-commit-evidence.mjs +0 -444
  58. package/scripts/publish-github-artifact-attestation-evidence.mjs +0 -201
  59. 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`);