@kungfu-tech/buildchain 3.0.1 → 3.0.2-alpha.0
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.
- package/README.md +5 -3
- package/actions/promote-buildchain-ref/README.md +7 -0
- package/bin/buildchain.mjs +173 -513
- package/bin/internal/cli-options.mjs +79 -0
- package/bin/internal/trust-release-cli.mjs +469 -0
- package/dist/site/agent-index.json +2 -0
- package/dist/site/artifact-schemas.json +5 -0
- package/dist/site/badge-endpoint-registry.json +18 -18
- package/dist/site/badges/v1/kfd-12/aligned.json +1 -1
- package/dist/site/badges/v1/kfd-12/declared.json +1 -1
- package/dist/site/badges/v1/kfd-12/downgraded.json +1 -1
- package/dist/site/badges/v1/kfd-12/draft.json +1 -1
- package/dist/site/badges/v1/kfd-12/failed.json +1 -1
- package/dist/site/badges/v1/kfd-12/missing.json +1 -1
- package/dist/site/badges/v1/kfd-12/passed.json +1 -1
- package/dist/site/badges/v1/kfd-12/planned.json +1 -1
- package/dist/site/badges/v1/kfd-13/aligned.json +1 -1
- package/dist/site/badges/v1/kfd-13/declared.json +1 -1
- package/dist/site/badges/v1/kfd-13/downgraded.json +1 -1
- package/dist/site/badges/v1/kfd-13/draft.json +1 -1
- package/dist/site/badges/v1/kfd-13/failed.json +1 -1
- package/dist/site/badges/v1/kfd-13/missing.json +1 -1
- package/dist/site/badges/v1/kfd-13/passed.json +1 -1
- package/dist/site/badges/v1/kfd-13/planned.json +1 -1
- package/dist/site/buildchain-contract.json +32 -22
- package/dist/site/buildchain-site.json +28 -18
- package/dist/site/capability-registry.json +2 -2
- package/dist/site/cli-registry.json +108 -0
- package/dist/site/controller-registry.json +10 -2
- package/dist/site/kfd-claims.json +136 -10
- package/dist/site/kfd-upstream-aggregate.json +20 -11
- package/dist/site/manual-registry.json +3 -3
- package/dist/site/node-api-registry.json +21 -8
- package/dist/site/page-registry.json +20 -10
- package/dist/site/public-surface-audit.json +114 -8
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-passport-check-manifest.json +11 -0
- package/dist/site/release-provenance.json +3 -0
- package/dist/site/schemas/kfd-product-gate-input-v1.schema.json +164 -0
- package/dist/site/schemas/kfd-support-projection-v1.schema.json +106 -0
- package/dist/site/schemas/release-passport-v1.schema.json +3 -0
- package/dist/site/site-manifest.json +7 -7
- package/dist/site/workflow-registry.json +9 -3
- package/docs/cli.md +9 -2
- package/docs/kfd-support.md +43 -7
- package/docs/release-passport.md +15 -0
- package/package.json +6 -3
- package/packages/core/index.js +17 -0
- package/packages/core/kfd-product-gates.js +865 -0
- package/packages/core/kfd.js +16 -7
- package/packages/core/kfd3-surface-register.js +105 -1
- package/packages/core/public-surface-audit.js +6 -1
- package/packages/core/release-passport-contract.js +13 -0
- package/packages/core/release-passport.js +87 -3
- package/scripts/check-internal-architecture.mjs +171 -0
- package/scripts/check-inventory.mjs +4 -0
- package/scripts/generate-site-bundle.mjs +23 -0
- package/scripts/promotion-routing-evidence.mjs +73 -0
|
@@ -15,6 +15,10 @@ import {
|
|
|
15
15
|
collectKfdUpstreamFacts,
|
|
16
16
|
} from "../packages/core/kfd.js";
|
|
17
17
|
import { KFD_AGENT_HUB_ADOPTION_SCHEMA } from "../packages/core/kfd-agent-hub.js";
|
|
18
|
+
import {
|
|
19
|
+
KFD_PRODUCT_GATE_INPUT_SCHEMA,
|
|
20
|
+
KFD_SUPPORT_PROJECTION_SCHEMA,
|
|
21
|
+
} from "../packages/core/kfd-product-gates.js";
|
|
18
22
|
import {
|
|
19
23
|
createReadmeBadgeEndpointRegistry,
|
|
20
24
|
} from "../packages/core/readme-badges.js";
|
|
@@ -445,6 +449,15 @@ function cliCommandMeta(id) {
|
|
|
445
449
|
"kfd-3-register": { group: "kfd-trust", purpose: "Declare detected KFD-3 public surfaces into a product-owned surface registry." },
|
|
446
450
|
"kfd-3-witness": { group: "kfd-trust", purpose: "Generate release-passport-compatible KFD-3 surface witnesses from a product registry." },
|
|
447
451
|
"kfd-4-schema": { group: "kfd-trust", purpose: "Print the default KFD-4 schema exposed by the KFD package standards metadata." },
|
|
452
|
+
"kfd-4-gate": { group: "kfd-trust", purpose: "Evaluate source-bound KFD-4 observer-perspective and contrastive-replay product evidence." },
|
|
453
|
+
"kfd-4-verify": { group: "kfd-trust", purpose: "Verify a retained KFD-4 product-gate result without widening product support." },
|
|
454
|
+
"kfd-5-schema": { group: "kfd-trust", purpose: "Print the default KFD-5 schema exposed by the KFD package standards metadata." },
|
|
455
|
+
"kfd-5-gate": { group: "kfd-trust", purpose: "Evaluate source-bound KFD-5 Primitive discovery qualification evidence." },
|
|
456
|
+
"kfd-5-verify": { group: "kfd-trust", purpose: "Verify a retained KFD-5 product-gate result without widening product support." },
|
|
457
|
+
"kfd-7-schema": { group: "kfd-trust", purpose: "Print the default KFD-7 schema exposed by the KFD package standards metadata." },
|
|
458
|
+
"kfd-7-gate": { group: "kfd-trust", purpose: "Evaluate a source-bound KFD-7 Domain Profile, evidence obligations, and independent review." },
|
|
459
|
+
"kfd-7-verify": { group: "kfd-trust", purpose: "Verify a retained KFD-7 product-gate result without widening product support." },
|
|
460
|
+
"kfd-support": { group: "kfd-trust", purpose: "Project and verify a product-owned KFD-1 through KFD-13 support matrix against KFD-4/5/7 gates." },
|
|
448
461
|
"kfd-aggregate": { group: "kfd-trust", purpose: "Return a product KFD view that combines own KFD status with upstream KFD aggregate facts." },
|
|
449
462
|
"kfd-upstream": { group: "kfd-trust", purpose: "Inspect KFD upstream aggregate command families." },
|
|
450
463
|
"kfd-upstream-check": { group: "kfd-trust", purpose: "Validate a KFD upstream aggregate document and fail closed on missing evidence." },
|
|
@@ -529,6 +542,7 @@ function nodeApiMeta(exportName) {
|
|
|
529
542
|
"./issue-reporting": { group: "observability-diagnostics", summary: "Buildchain-owned issue reporting API for workflow friction feedback." },
|
|
530
543
|
"./buildchain-layout": { group: "kfd-trust", summary: "Versioned Buildchain repository-layout discovery contract plus canonical .buildchain path resolution and migration APIs." },
|
|
531
544
|
"./kfd": { group: "kfd-trust", summary: "Unified KFD standards, schema discovery, KFD-1/KFD-2/KFD-3 grouped APIs, KFD-4 schema discovery, upstream KFD aggregate facts, and Buildchain KFD claim helpers." },
|
|
545
|
+
"./kfd-product-gates": { group: "kfd-trust", summary: "Fail-closed KFD-4, KFD-5, and KFD-7 product evidence gates plus non-widening KFD support-matrix release projections." },
|
|
532
546
|
"./public-surface-audit": { group: "kfd-trust", summary: "Reverse audit APIs for CLI, workflow, action, site page, and documentation command surfaces." },
|
|
533
547
|
"./kfd-gate": { group: "kfd-trust", summary: "KFD-1/KFD-2/KFD-3 release gate evidence and validation APIs." },
|
|
534
548
|
"./buildchain-kfd-claims": { group: "kfd-trust", summary: "Buildchain self KFD claim registry, witnesses, and public claim APIs." },
|
|
@@ -993,6 +1007,9 @@ function buildSiteBundle() {
|
|
|
993
1007
|
"release-passport-check-manifest.json",
|
|
994
1008
|
"schemas/release-passport-v1.schema.json",
|
|
995
1009
|
"schemas/kfd-agent-hub-adoption.schema.json",
|
|
1010
|
+
"schemas/kfd-product-gate-input-v1.schema.json",
|
|
1011
|
+
"schemas/kfd-support-projection-v1.schema.json",
|
|
1012
|
+
"kfd-support.json",
|
|
996
1013
|
"artifact-evidence.json",
|
|
997
1014
|
"product-mechanism.json",
|
|
998
1015
|
"impact.json",
|
|
@@ -1021,6 +1038,8 @@ function buildSiteBundle() {
|
|
|
1021
1038
|
"release-passport-check-manifest.json",
|
|
1022
1039
|
"schemas/release-passport-v1.schema.json",
|
|
1023
1040
|
"schemas/kfd-agent-hub-adoption.schema.json",
|
|
1041
|
+
"schemas/kfd-product-gate-input-v1.schema.json",
|
|
1042
|
+
"schemas/kfd-support-projection-v1.schema.json",
|
|
1024
1043
|
"buildchain-contract.json",
|
|
1025
1044
|
"kfd-claims.json",
|
|
1026
1045
|
"product-mechanism.json",
|
|
@@ -1150,6 +1169,8 @@ function buildSiteBundle() {
|
|
|
1150
1169
|
"release-passport-check-manifest.json",
|
|
1151
1170
|
"schemas/release-passport-v1.schema.json",
|
|
1152
1171
|
"schemas/kfd-agent-hub-adoption.schema.json",
|
|
1172
|
+
"schemas/kfd-product-gate-input-v1.schema.json",
|
|
1173
|
+
"schemas/kfd-support-projection-v1.schema.json",
|
|
1153
1174
|
"buildchain-contract.json",
|
|
1154
1175
|
"kfd-upstream-aggregate.json",
|
|
1155
1176
|
"kfd-claims.json",
|
|
@@ -1323,6 +1344,8 @@ function buildSiteBundle() {
|
|
|
1323
1344
|
"release-passport-check-manifest.json": createReleasePassportCheckManifest(),
|
|
1324
1345
|
"schemas/release-passport-v1.schema.json": RELEASE_PASSPORT_SCHEMA,
|
|
1325
1346
|
"schemas/kfd-agent-hub-adoption.schema.json": KFD_AGENT_HUB_ADOPTION_SCHEMA,
|
|
1347
|
+
"schemas/kfd-product-gate-input-v1.schema.json": KFD_PRODUCT_GATE_INPUT_SCHEMA,
|
|
1348
|
+
"schemas/kfd-support-projection-v1.schema.json": KFD_SUPPORT_PROJECTION_SCHEMA,
|
|
1326
1349
|
"badge-endpoint-registry.json": badgeEndpointRegistry,
|
|
1327
1350
|
"publication-registry.json": publicationRegistry,
|
|
1328
1351
|
"buildchain-contract.json": createBuildchainContractWorld({ root, controllerRegistry }),
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
6
|
+
|
|
7
|
+
function createPromotionRoutingEvidence({
|
|
8
|
+
env = process.env,
|
|
9
|
+
cwd = process.cwd(),
|
|
10
|
+
} = {}) {
|
|
11
|
+
const routing = {
|
|
12
|
+
schemaVersion: 1,
|
|
13
|
+
contract: "buildchain.promotion-routing/v1",
|
|
14
|
+
router: { ref: env.ROUTER_REF, sha: env.ROUTER_SHA },
|
|
15
|
+
shell: {
|
|
16
|
+
channel: env.SHELL_CHANNEL,
|
|
17
|
+
ref: env.SHELL_REF,
|
|
18
|
+
sha: env.SHELL_SHA,
|
|
19
|
+
},
|
|
20
|
+
runtime: {
|
|
21
|
+
requestedRef: env.RUNTIME_REF,
|
|
22
|
+
resolvedSha: env.RUNTIME_SHA,
|
|
23
|
+
},
|
|
24
|
+
contractLock: { path: env.LOCK_PATH, digest: env.LOCK_DIGEST },
|
|
25
|
+
publication: {
|
|
26
|
+
channel: env.PUBLICATION_CHANNEL,
|
|
27
|
+
targetRef: env.TARGET_REF,
|
|
28
|
+
},
|
|
29
|
+
trustedOverrideUsed: env.OVERRIDE_USED === "true",
|
|
30
|
+
};
|
|
31
|
+
const controllerDir = path.join(cwd, ".buildchain", "controller");
|
|
32
|
+
const routingPath = path.join(controllerDir, "promotion-routing.json");
|
|
33
|
+
const candidatePath = path.join(
|
|
34
|
+
controllerDir,
|
|
35
|
+
"release-candidate-promotion-passport.json",
|
|
36
|
+
);
|
|
37
|
+
const candidate = JSON.parse(
|
|
38
|
+
fs.readFileSync(path.resolve(cwd, env.RELEASE_CANDIDATE_PASSPORT), "utf8"),
|
|
39
|
+
);
|
|
40
|
+
fs.mkdirSync(controllerDir, { recursive: true });
|
|
41
|
+
fs.writeFileSync(routingPath, `${JSON.stringify(routing, null, 2)}\n`);
|
|
42
|
+
fs.writeFileSync(
|
|
43
|
+
candidatePath,
|
|
44
|
+
`${JSON.stringify({ ...candidate, promotionRouting: routing }, null, 2)}\n`,
|
|
45
|
+
);
|
|
46
|
+
if (env.GITHUB_OUTPUT) {
|
|
47
|
+
fs.appendFileSync(
|
|
48
|
+
env.GITHUB_OUTPUT,
|
|
49
|
+
[
|
|
50
|
+
"routing-path=.buildchain/controller/promotion-routing.json",
|
|
51
|
+
"candidate-passport-path=.buildchain/controller/release-candidate-promotion-passport.json",
|
|
52
|
+
"",
|
|
53
|
+
].join("\n"),
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return { routing, routingPath, candidatePath };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (
|
|
60
|
+
process.argv[1] &&
|
|
61
|
+
import.meta.url === pathToFileURL(path.resolve(process.argv[1])).href
|
|
62
|
+
) {
|
|
63
|
+
try {
|
|
64
|
+
createPromotionRoutingEvidence();
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error(
|
|
67
|
+
`promotion routing evidence failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
68
|
+
);
|
|
69
|
+
process.exitCode = 1;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { createPromotionRoutingEvidence };
|