@kungfu-tech/buildchain 3.0.3-alpha.0 → 3.0.3-alpha.2
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/AGENTS.md +1 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +32 -1
- package/actions/promote-buildchain-ref/README.md +90 -19
- package/actions/report-buildchain-issue/README.md +19 -1
- package/actions/run-lifecycle/README.md +5 -0
- package/actions/validate-config/README.md +19 -1
- package/bin/buildchain.mjs +41 -241
- package/bin/internal/command-registry.mjs +82 -0
- package/bin/internal/trust-release-cli.mjs +1 -0
- package/contracts/auditable-demo-media-profiles-v1.json +116 -1
- package/contracts/buildchain-v2-residuals-v1.json +0 -45
- package/contracts/evidence/auditable-demo-responsive-web-delivery-v1.json +143 -0
- package/contracts/evidence/auditable-demo-web-delivery-v1.json +7 -3
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/complete-transcript.txt +2 -0
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/public-projection.json +16 -0
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/scene.json +12 -0
- package/dist/site/buildchain-contract.json +161 -42
- package/dist/site/buildchain-site.json +180 -84
- package/dist/site/capability-registry.json +6 -6
- package/dist/site/cli-registry.json +932 -98
- package/dist/site/controller-registry.json +97 -5
- package/dist/site/kfd-claims.json +316 -23
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +20 -20
- package/dist/site/node-api-registry.json +371 -56
- package/dist/site/page-registry.json +155 -59
- package/dist/site/public-surface-audit.json +286 -24
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +3 -0
- package/dist/site/site-manifest.json +24 -24
- package/dist/site/workflow-registry.json +570 -79
- package/docs/MAP.md +22 -4
- package/docs/auditable-demo.md +35 -12
- package/docs/aws-us-elastic-runner-burst-plane.md +381 -0
- package/docs/cli.md +143 -12
- package/docs/consumer-issue-reporting.md +19 -1
- package/docs/github-governance-authority.md +2 -2
- package/docs/lifecycle-protocol.md +20 -2
- package/docs/migration-inventory.md +24 -5
- package/docs/ownership.md +19 -1
- package/docs/publication-artifacts.md +185 -18
- package/docs/publication-authority.md +4 -4
- package/docs/publish-transaction.md +78 -31
- package/docs/release-candidate.md +24 -0
- package/docs/release-flow.md +50 -32
- package/docs/release-governance.md +31 -31
- package/docs/release-passport.md +4 -0
- package/docs/release-propagation.md +57 -12
- package/docs/reusable-build-surface.md +95 -27
- package/docs/runtime-train-validation.md +20 -2
- package/docs/stable-candidate-patrol.md +6 -6
- package/docs/toolkit-observability.md +22 -0
- package/docs/versioning.md +6 -4
- package/docs/web-surface-deployments.md +62 -0
- package/package.json +7 -5
- package/packages/core/README.md +61 -4
- package/packages/core/buildchain-contract.js +8 -4
- package/packages/core/cache-evidence.js +1 -0
- package/packages/core/diagnostics.js +105 -30
- package/packages/core/github-governance-authority.js +10 -25
- package/packages/core/index.js +40 -0
- package/packages/core/paper-fleet.js +260 -0
- package/packages/core/paper-repository.js +210 -0
- package/packages/core/paper-work.js +365 -0
- package/packages/core/paper.js +3180 -0
- package/packages/core/public-surface-audit.js +26 -75
- package/packages/core/public-surface-cli.js +117 -0
- package/packages/core/publication-artifact.js +1 -6
- package/packages/core/publication-authority.js +1 -0
- package/packages/core/publication-reproducibility.js +947 -0
- package/packages/core/publication-sealed-bundle.js +190 -0
- package/packages/core/publish-transaction.js +147 -17
- package/packages/core/release-candidate.js +234 -0
- package/packages/core/release-passport.js +483 -201
- package/packages/core/release-propagation.js +175 -1
- package/scripts/auditable-demo.mjs +119 -5
- package/scripts/aws-codebuild-toolchain.mjs +285 -0
- package/scripts/aws-macos-jit-core.mjs +378 -0
- package/scripts/aws-macos-jit.mjs +123 -0
- package/scripts/aws-runner-burst-core.mjs +248 -0
- package/scripts/aws-runner-burst.mjs +79 -0
- package/scripts/aws-windows-jit-core.mjs +374 -0
- package/scripts/aws-windows-jit.mjs +121 -0
- package/scripts/build-contract-core.mjs +69 -6
- package/scripts/build-standalone-binary.mjs +23 -0
- package/scripts/buildchain-cli-help.mjs +256 -0
- package/scripts/buildchain-contract-lock.mjs +1 -1
- package/scripts/check-internal-architecture.mjs +69 -2
- package/scripts/check-inventory.mjs +69 -2
- package/scripts/check-javascript-syntax.mjs +31 -0
- package/scripts/check-maintainability.mjs +371 -0
- package/scripts/compiler-cache-evidence.mjs +221 -0
- package/scripts/dev-alpha-candidate-patrol.mjs +268 -43
- package/scripts/finalize-native-artifact-signing-result.mjs +75 -4
- package/scripts/generate-channel-promotion-workflow.mjs +3 -12
- package/scripts/generate-release-candidate-passport.mjs +4 -0
- package/scripts/generate-site-bundle.mjs +68 -188
- package/scripts/import-artifact-signing-results.mjs +64 -5
- package/scripts/inspect-artifact-signing-requests.mjs +7 -0
- package/scripts/maintainability-metrics.mjs +339 -0
- package/scripts/npm-publish-transaction.mjs +57 -6
- package/scripts/paper-work-fleet-cli.mjs +563 -0
- package/scripts/paper.mjs +631 -0
- package/scripts/promotion-channel-router.mjs +16 -4
- package/scripts/publication-reproducibility.mjs +62 -0
- package/scripts/release-propagation.mjs +39 -0
- package/scripts/resolve-build-contract.mjs +6 -0
- package/scripts/route-offline-runners.mjs +236 -0
- package/scripts/run-lifecycle-core.mjs +62 -1
- package/scripts/runtime-ref-core.mjs +23 -2
- package/scripts/seal-artifact-signing-requests.mjs +13 -6
- package/scripts/site-capability-metadata.mjs +202 -0
- package/scripts/stable-candidate-qualification.mjs +42 -0
- package/scripts/web-surface-core.mjs +272 -86
|
@@ -33,7 +33,12 @@ import {
|
|
|
33
33
|
enumerateWorkflowInputs,
|
|
34
34
|
} from "../packages/core/public-surface-audit.js";
|
|
35
35
|
import { createSurfaceTimestampPolicy } from "../packages/core/surface-manifest.js";
|
|
36
|
+
import { cliCommandMeta, nodeApiMeta } from "./site-capability-metadata.mjs";
|
|
36
37
|
import { projectHomepageIntro } from "./site-bundle-homepage.mjs";
|
|
38
|
+
import {
|
|
39
|
+
BUILDCHAIN_COMMAND_REGISTRY,
|
|
40
|
+
resolveBuildchainCommand,
|
|
41
|
+
} from "../bin/internal/command-registry.mjs";
|
|
37
42
|
|
|
38
43
|
const SITE_BUNDLE_CONTRACT = "kungfu-buildchain-site-bundle";
|
|
39
44
|
const PUBLICATION_RELEASE_REGISTRY_CONTRACT = "kungfu-buildchain-publication-release-registry";
|
|
@@ -322,6 +327,18 @@ function capabilityGroup(id) {
|
|
|
322
327
|
return id;
|
|
323
328
|
}
|
|
324
329
|
|
|
330
|
+
function publicSurfaceLifecycle({ owner, maturity, nonDuplicationRationale }) {
|
|
331
|
+
return {
|
|
332
|
+
owner,
|
|
333
|
+
maturity,
|
|
334
|
+
introducedVersion: "pre-3.0.2-alpha.4",
|
|
335
|
+
compatibilityPromise: "preserved-through-the-v3-major-line",
|
|
336
|
+
deprecationReplacement: "",
|
|
337
|
+
sunsetCondition: "explicit-breaking-change-review-in-a-future-major-line",
|
|
338
|
+
nonDuplicationRationale,
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
325
342
|
const manualMetaById = new Map(Object.entries({
|
|
326
343
|
map: { capabilityGroup: "getting-started", audience: ["agent", "consumer"], maturity: "stable", order: 10 },
|
|
327
344
|
install: { capabilityGroup: "getting-started", audience: ["consumer"], maturity: "stable", order: 20 },
|
|
@@ -390,178 +407,43 @@ function pageCapabilityMeta(relPath, category) {
|
|
|
390
407
|
return { capabilityGroup: capabilityGroup("getting-started"), audience: ["agent"], maturity: "stable" };
|
|
391
408
|
}
|
|
392
409
|
|
|
393
|
-
function
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
candidate: { group: "observability-diagnostics", purpose: "Inspect source-bound candidate evidence command families." },
|
|
404
|
-
"candidate-timeline": { group: "observability-diagnostics", purpose: "Create a critical-path-safe timeline across pull-request and Merge Queue attempts." },
|
|
405
|
-
collect: { group: "release-passport-trust", purpose: "Inspect release evidence collection command families." },
|
|
406
|
-
"collect-github-release": { group: "release-passport-trust", purpose: "Collect GitHub Release assets into a release passport." },
|
|
407
|
-
create: { group: "release-passport-trust", purpose: "Create canonical sealed publication evidence documents." },
|
|
408
|
-
"create-publication-admission": { group: "release-passport-trust", purpose: "Create a canonical short-lived publication admission envelope from exact consumer bindings." },
|
|
409
|
-
"create-github-artifact-attestation-policy": { group: "release-passport-trust", purpose: "Create an exact source, signer, Linux build, and Release Passport attestation policy." },
|
|
410
|
-
"create-runner-provenance": { group: "release-passport-trust", purpose: "Create runner provenance evidence with an explicit qualification floor." },
|
|
411
|
-
diagnostics: { group: "observability-diagnostics", purpose: "Inspect diagnostics command families." },
|
|
412
|
-
"diagnostics-summary": { group: "observability-diagnostics", purpose: "Summarize diagnostics artifacts into JSON and cross-platform lifecycle timing tables." },
|
|
413
|
-
doctor: { group: "getting-started", purpose: "Report local integration readiness." },
|
|
414
|
-
explain: { group: "release-passport-trust", purpose: "Inspect release and artifact explanation command families." },
|
|
415
|
-
"explain-artifact": { group: "release-passport-trust", purpose: "Explain artifact evidence for humans or agents." },
|
|
416
|
-
"explain-release": { group: "release-passport-trust", purpose: "Explain a release passport for humans or agents." },
|
|
417
|
-
facts: { group: "observability-diagnostics", purpose: "Inspect build facts command families." },
|
|
418
|
-
help: { group: "getting-started", purpose: "Print Buildchain CLI help." },
|
|
419
|
-
homebrew: { group: "distribution-indexes", purpose: "Inspect Homebrew distribution-index command families." },
|
|
420
|
-
"homebrew-check": { group: "distribution-indexes", purpose: "Verify Homebrew tap metadata against upstream release passport evidence." },
|
|
421
|
-
"homebrew-update-formula": { group: "distribution-indexes", purpose: "Generate Homebrew Formula metadata from upstream release passport evidence." },
|
|
422
|
-
"github-governance": { group: "governance-versioning", purpose: "Plan, apply, or roll back one root-bound GitHub branch-protection rollout after a frozen read-only inventory." },
|
|
423
|
-
"infra-contract": { group: "governance-versioning", purpose: "Validate and publish provider-neutral infrastructure contract evidence." },
|
|
424
|
-
init: { group: "getting-started", purpose: "Bootstrap a repository with Buildchain configuration and caller workflow files." },
|
|
425
|
-
inspect: { group: "release-passport-trust", purpose: "Inspect release and artifact evidence command families." },
|
|
426
|
-
"inspect-artifact": { group: "release-passport-trust", purpose: "Inspect artifact evidence." },
|
|
427
|
-
"inspect-release": { group: "release-passport-trust", purpose: "Inspect release passport evidence." },
|
|
428
|
-
kfd: { group: "kfd-trust", purpose: "Inspect KFD standards, schemas, and versioned KFD command families." },
|
|
429
|
-
"kfd-hub": { group: "kfd-trust", purpose: "Initialize, inspect, test, and explain one declarative KFD Agent Hub adapter adoption." },
|
|
430
|
-
layout: { group: "kfd-trust", purpose: "Return the versioned repository-layout and KFD registry discovery contract for tools such as Shifu." },
|
|
431
|
-
"kfd-schema": { group: "kfd-trust", purpose: "Inspect KFD schema command families." },
|
|
432
|
-
"kfd-schema-list": { group: "kfd-trust", purpose: "List machine-readable schemas exposed by the KFD package standards metadata." },
|
|
433
|
-
"kfd-schema-show": { group: "kfd-trust", purpose: "Print a machine-readable KFD schema from the KFD package standards metadata." },
|
|
434
|
-
"kfd-status": { group: "kfd-trust", purpose: "Report implemented KFD support and the active .buildchain repository layout." },
|
|
435
|
-
"kfd-migrate-layout": { group: "kfd-trust", purpose: "Plan or apply migration of legacy root Buildchain files into .buildchain/." },
|
|
436
|
-
"kfd-1": { group: "kfd-trust", purpose: "Inspect KFD-1 contract-world witness, gate, verify, and schema command families." },
|
|
437
|
-
"kfd-1-gate": { group: "kfd-trust", purpose: "Generate KFD-1 release gate evidence from declared contract-world witnesses." },
|
|
438
|
-
"kfd-1-schema": { group: "kfd-trust", purpose: "Print the default KFD-1 schema exposed by the KFD package standards metadata." },
|
|
439
|
-
"kfd-1-verify": { group: "kfd-trust", purpose: "Validate KFD-1 release gate evidence." },
|
|
440
|
-
"kfd-1-witness": { group: "kfd-trust", purpose: "Generate Buildchain's KFD-1 self contract-world witness." },
|
|
441
|
-
"kfd-2": { group: "kfd-trust", purpose: "Inspect KFD-2 trust taxonomy, public claims, and schema command families." },
|
|
442
|
-
"kfd-2-claims": { group: "kfd-trust", purpose: "Generate Buildchain's KFD-2 public trust claim evidence." },
|
|
443
|
-
"kfd-2-product-claims": { group: "kfd-trust", purpose: "Validate and render product-owned KFD-2 claims in the canonical .buildchain/kfd layout." },
|
|
444
|
-
"kfd-2-schema": { group: "kfd-trust", purpose: "Print the default KFD-2 schema exposed by the KFD package standards metadata." },
|
|
445
|
-
"kfd-2-taxonomy": { group: "kfd-trust", purpose: "Validate KFD-2 trust taxonomy entries from the KFD package standards metadata." },
|
|
446
|
-
"kfd-2-trust-assessment": { group: "kfd-trust", purpose: "Expose and validate the KFD package foundation KFD-2 trust assessment." },
|
|
447
|
-
"kfd-2-trust-claims": { group: "kfd-trust", purpose: "Expose and validate the KFD package foundation KFD-2 trust claims." },
|
|
448
|
-
"kfd-3": { group: "kfd-trust", purpose: "Inspect KFD-3 surface detection, registry, witness, audit, and query command families under the unified KFD namespace." },
|
|
449
|
-
"kfd-3-audit": { group: "kfd-trust", purpose: "Compare detected, declared, and enforced KFD-3 public surfaces." },
|
|
450
|
-
"kfd-3-detect": { group: "kfd-trust", purpose: "Detect standard KFD-3 public surface candidates from source and artifact metadata." },
|
|
451
|
-
"kfd-3-query": { group: "kfd-trust", purpose: "Return an agent-readable KFD-3 capability map for a product, registry, or release passport." },
|
|
452
|
-
"kfd-3-register": { group: "kfd-trust", purpose: "Declare detected KFD-3 public surfaces into a product-owned surface registry." },
|
|
453
|
-
"kfd-3-witness": { group: "kfd-trust", purpose: "Generate release-passport-compatible KFD-3 surface witnesses from a product registry." },
|
|
454
|
-
"kfd-4-schema": { group: "kfd-trust", purpose: "Print the default KFD-4 schema exposed by the KFD package standards metadata." },
|
|
455
|
-
"kfd-4-gate": { group: "kfd-trust", purpose: "Evaluate source-bound KFD-4 observer-perspective and contrastive-replay product evidence." },
|
|
456
|
-
"kfd-4-verify": { group: "kfd-trust", purpose: "Verify a retained KFD-4 product-gate result without widening product support." },
|
|
457
|
-
"kfd-5-schema": { group: "kfd-trust", purpose: "Print the default KFD-5 schema exposed by the KFD package standards metadata." },
|
|
458
|
-
"kfd-5-gate": { group: "kfd-trust", purpose: "Evaluate source-bound KFD-5 Primitive discovery qualification evidence." },
|
|
459
|
-
"kfd-5-verify": { group: "kfd-trust", purpose: "Verify a retained KFD-5 product-gate result without widening product support." },
|
|
460
|
-
"kfd-7-schema": { group: "kfd-trust", purpose: "Print the default KFD-7 schema exposed by the KFD package standards metadata." },
|
|
461
|
-
"kfd-7-gate": { group: "kfd-trust", purpose: "Evaluate a source-bound KFD-7 Domain Profile, evidence obligations, and independent review." },
|
|
462
|
-
"kfd-7-verify": { group: "kfd-trust", purpose: "Verify a retained KFD-7 product-gate result without widening product support." },
|
|
463
|
-
"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." },
|
|
464
|
-
"kfd-aggregate": { group: "kfd-trust", purpose: "Return a product KFD view that combines own KFD status with upstream KFD aggregate facts." },
|
|
465
|
-
"kfd-upstream": { group: "kfd-trust", purpose: "Inspect KFD upstream aggregate command families." },
|
|
466
|
-
"kfd-upstream-check": { group: "kfd-trust", purpose: "Validate a KFD upstream aggregate document and fail closed on missing evidence." },
|
|
467
|
-
"kfd-upstream-collect": { group: "kfd-trust", purpose: "Collect declared KFD-aware upstream package evidence and hashes from Buildchain config." },
|
|
468
|
-
"kfd-upstream-roles": { group: "kfd-trust", purpose: "List Buildchain-managed KFD upstream role values and inference policy." },
|
|
469
|
-
lifecycle: { group: "reusable-build", purpose: "Run configured lifecycle commands and write deterministic artifact manifests." },
|
|
470
|
-
dev: { group: "governance-versioning", purpose: "Inspect protected development-channel governance command families." },
|
|
471
|
-
"dev-merge-queue": { group: "governance-versioning", purpose: "Plan or apply an exact-branch GitHub merge queue after required workflow event compatibility is verified." },
|
|
472
|
-
log: { group: "observability-diagnostics", purpose: "Inspect Buildchain logging command families." },
|
|
473
|
-
logging: { group: "observability-diagnostics", purpose: "Emit timestamped build events, summarize logs, and enforce required phases." },
|
|
474
|
-
mark: { group: "observability-diagnostics", purpose: "Emit a single Buildchain log event." },
|
|
475
|
-
npm: { group: "release-passport-trust", purpose: "Inspect npm publishing command families." },
|
|
476
|
-
"portable-cache": { group: "observability-diagnostics", purpose: "Plan exact portable dependency/compiler cache inputs and seal provider outcomes." },
|
|
477
|
-
"portable-cache-plan": { group: "observability-diagnostics", purpose: "Validate a consumer-neutral cache manifest and emit exact GitHub Actions cache inputs." },
|
|
478
|
-
"portable-cache-receipt": { group: "observability-diagnostics", purpose: "Seal exact, compatible, miss, or corrupt provider evidence against one cache plan." },
|
|
479
|
-
"npm-dry-run": { group: "release-passport-trust", purpose: "Verify npm publish shape before a release transaction." },
|
|
480
|
-
"publish-source": { group: "release-passport-trust", purpose: "Create, inspect, or verify publish-gate source-lock refs." },
|
|
481
|
-
"publication-artifact": { group: "reusable-build", purpose: "Generate publication artifact manifests, passports, and source bundles for paper/report repositories." },
|
|
482
|
-
"publication-artifact-manifest": { group: "reusable-build", purpose: "Write a site-consumable publication artifact manifest, publication passport, and source bundle." },
|
|
483
|
-
"publication-artifact-npm-package": { group: "reusable-build", purpose: "Synthesize the declared npm paper package from a publication artifact manifest, passport, registry, source bundle, and primary artifact." },
|
|
484
|
-
project: { group: "release-passport-trust", purpose: "Inspect read-only consumer projection command families." },
|
|
485
|
-
"project-kfx-admission": { group: "release-passport-trust", purpose: "Project one verified sealed envelope into direct KFX admission inputs without reconstructing evidence." },
|
|
486
|
-
"release-dry-run": { group: "governance-versioning", purpose: "Explain what a channel merge would publish before the PR is merged." },
|
|
487
|
-
"release-line-open": { group: "governance-versioning", purpose: "Plan or write the initial version-state commit for a new minor release line." },
|
|
488
|
-
"release-governance": { group: "governance-versioning", purpose: "Reconcile a managed branch's Buildchain aggregate check to an already-tested pull request SHA." },
|
|
489
|
-
"release-propagation": { group: "site-and-propagation", purpose: "Plan channel-preserving downstream release PRs and write exact upstream release locks." },
|
|
490
|
-
"release-transaction": { group: "release-passport-trust", purpose: "Inspect, recover, finalize, or abort durable release transactions." },
|
|
491
|
-
sample: { group: "observability-diagnostics", purpose: "Inspect sampler command families." },
|
|
492
|
-
"sample-process-tree": { group: "observability-diagnostics", purpose: "Sample process-tree diagnostics for a wrapped command." },
|
|
493
|
-
span: { group: "observability-diagnostics", purpose: "Run a command inside a Buildchain log span." },
|
|
494
|
-
"transaction-inspect": { group: "release-passport-trust", purpose: "Inspect durable release transaction state." },
|
|
495
|
-
validate: { group: "getting-started", purpose: "Validate .buildchain/buildchain.toml and declared lifecycle surfaces." },
|
|
496
|
-
verify: { group: "release-passport-trust", purpose: "Inspect release and artifact verification command families." },
|
|
497
|
-
"verify-artifact": { group: "release-passport-trust", purpose: "Verify artifact subjects against release passport evidence." },
|
|
498
|
-
"verify-artifact-envelope": { group: "release-passport-trust", purpose: "Verify exact roots, identity, lifecycle, revocation, and an existing KFD assessment in a sealed artifact envelope." },
|
|
499
|
-
"verify-github-artifact-attestation": { group: "release-passport-trust", purpose: "Verify GitHub keyless attestation identity plus local artifact, manifest, Passport, predicate, bundle, and evidence bindings." },
|
|
500
|
-
"verify-infra-contract-evidence-bundle": { group: "governance-versioning", purpose: "Fail closed unless an infra-contract lifecycle evidence bundle is complete, hash-bound, and validation-consistent." },
|
|
501
|
-
"verify-observability-log": { group: "observability-diagnostics", purpose: "Verify Buildchain observability log events." },
|
|
502
|
-
"verify-publication-admission": { group: "release-passport-trust", purpose: "Independently verify sealed publication admission, runner provenance, control-plane audit, nonce freshness, and exact artifact bindings." },
|
|
503
|
-
"verify-release-passport": { group: "release-passport-trust", purpose: "Fail closed unless a release passport and its evidence are complete." },
|
|
504
|
-
version: { group: "getting-started", purpose: "Print the package or embedded binary version." },
|
|
505
|
-
"web-surface": { group: "site-and-propagation", purpose: "Plan, verify, and apply Buildchain web-surface deployments." },
|
|
506
|
-
}));
|
|
507
|
-
const meta = map.get(id);
|
|
508
|
-
if (!meta) {
|
|
509
|
-
throw new Error(`missing CLI command capability metadata: ${id}`);
|
|
410
|
+
function createCliRegistry(packageJson) {
|
|
411
|
+
const commands = enumerateCliCommandsFromBin({ root });
|
|
412
|
+
const documentedTopLevelCommands = new Set();
|
|
413
|
+
for (const entry of commands) {
|
|
414
|
+
const command = entry.usage.split(/\s+/)[1] || "";
|
|
415
|
+
const registration = resolveBuildchainCommand(command);
|
|
416
|
+
if (!registration) {
|
|
417
|
+
throw new Error(`CLI help documents an unregistered top-level command: ${command}`);
|
|
418
|
+
}
|
|
419
|
+
documentedTopLevelCommands.add(registration.id);
|
|
510
420
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
const map = new Map(Object.entries({
|
|
516
|
-
".": { group: "api-cli-reference", summary: "Root toolkit export for Buildchain's public Node API." },
|
|
517
|
-
"./core": { group: "api-cli-reference", summary: "Alias for the root public toolkit export." },
|
|
518
|
-
"./badges": { group: "distribution-indexes", summary: "Badge bundle facts, rendering, checking, and update APIs." },
|
|
519
|
-
"./readme-badges": { group: "distribution-indexes", summary: "Managed README badge block facts, rendering, drift checks, and updates." },
|
|
520
|
-
"./homebrew": { group: "distribution-indexes", summary: "Homebrew tap fact collection, Formula rendering, update, and check APIs." },
|
|
521
|
-
"./build-facts": { group: "observability-diagnostics", summary: "Git source, version, module output, product artifact, and legacy Kungfu build fact APIs." },
|
|
522
|
-
"./candidate-timeline": { group: "observability-diagnostics", summary: "Source-bound candidate event normalization, per-attempt critical-path-safe aggregation, and compact reporting APIs." },
|
|
523
|
-
"./channel-candidate": { group: "governance-versioning", summary: "Exact-source channel candidate decisions, same-SHA workflow evidence validation, and deterministic source-lock reference APIs." },
|
|
524
|
-
"./cache-evidence": { group: "observability-diagnostics", summary: "Content-addressed cache operation receipts and source/platform-bound evidence-set verification APIs." },
|
|
525
|
-
"./diagnostics": { group: "observability-diagnostics", summary: "Native diagnostics collection, summarization, cache, compiler, and process-sampler APIs." },
|
|
526
|
-
"./logging": { group: "observability-diagnostics", summary: "Buildchain JSONL logging, span, summary, and verification APIs." },
|
|
527
|
-
"./portable-dev-cache": { group: "observability-diagnostics", summary: "Portable dependency/compiler cache plan, exact-root verification, and provider receipt APIs." },
|
|
528
|
-
"./publication-artifact": { group: "reusable-build", summary: "Publication artifact manifest, source bundle, and publication passport APIs." },
|
|
529
|
-
"./publication-package": { group: "reusable-build", summary: "Publication npm package synthesis APIs for Buildchain-managed paper release presets." },
|
|
530
|
-
"./publication-authority": { group: "release-passport-trust", summary: "Sealed publication authority registry, runner provenance, control-plane audit, admission, and independent verification APIs." },
|
|
531
|
-
"./publication-control-plane-audit": { group: "release-passport-trust", summary: "Read-only publication control-plane snapshot evaluation APIs." },
|
|
532
|
-
"./buildchain-publication-authority": { group: "release-passport-trust", summary: "Buildchain-owned closed-world publication authority descriptor registry." },
|
|
533
|
-
"./github-governance-authority": { group: "governance-versioning", summary: "Fail-closed GitHub ownership, effective-policy, managed-zone admission, rollout-plan, and immutable receipt APIs." },
|
|
534
|
-
"./artifact-passport": { group: "release-passport-trust", summary: "Artifact passport digest and evidence helper APIs." },
|
|
535
|
-
"./artifact-verification-envelope": { group: "release-passport-trust", summary: "Sealed exact-root, lifecycle, identity, and existing KFD assessment inputs for KFX admission." },
|
|
536
|
-
"./artifact-signing": { group: "reusable-build", summary: "Credential-free artifact signing declarations, source-bound requests, authority receipts, profile resolution, and fail-closed validation APIs." },
|
|
537
|
-
"./artifact-signing-result": { group: "release-passport-trust", summary: "Immutable signed-result, final-payload, receipt, evidence-root, and provider-verification binding APIs." },
|
|
538
|
-
"./detached-artifact-signature": { group: "release-passport-trust", summary: "Buildchain-authority Ed25519 detached signature and verification APIs for arbitrary binary artifacts." },
|
|
539
|
-
"./anchored-version-material": { group: "reusable-build", summary: "Anchored/manual derived version material preflight, exact-tree binding, and digest evidence APIs." },
|
|
540
|
-
"./release-passport": { group: "release-passport-trust", summary: "Release passport collection, verification, explanation, and evidence APIs." },
|
|
541
|
-
"./github-artifact-attestation": { group: "release-passport-trust", summary: "GitHub keyless artifact attestation policy, predicate, provider evidence, and fail-closed verification APIs." },
|
|
542
|
-
"./kfd-agent-hub": { group: "kfd-trust", summary: "Declarative Agent Hub adapter inspection, fixed-suite execution, exact KFD cut locking, and agent explanation APIs." },
|
|
543
|
-
"./release-passport-contract": { group: "release-passport-trust", summary: "Standalone release passport JSON Schema, ownership/check manifest, and structural validation APIs." },
|
|
544
|
-
"./release-candidate": { group: "reusable-build", summary: "PR-stage release-candidate artifact, passport, and promote-only resolver APIs." },
|
|
545
|
-
"./stable-candidate-ledger": { group: "governance-versioning", summary: "Immutable alpha candidate ledger, qualification, revocation, selection, and exact stable source-lock APIs." },
|
|
546
|
-
"./release-propagation": { group: "site-and-propagation", summary: "Release propagation graph, plan, and exact upstream lock APIs." },
|
|
547
|
-
"./release-activation-transaction": { group: "release-passport-trust", summary: "Ordered cross-repository activation, exact receipt-set binding, retry, abort, rollback, and shadow-rehearsal APIs." },
|
|
548
|
-
"./release-line-bootstrap": { group: "governance-versioning", summary: "Semver release-line bootstrap planning and version-state APIs." },
|
|
549
|
-
"./buildchain-contract": { group: "governance-versioning", summary: "Runtime contract world and compatibility digest APIs for floating-ref drift checks." },
|
|
550
|
-
"./controller-evidence": { group: "reusable-build", summary: "Project-independent controller descriptors, source/runtime-bound plans, receipts, aggregates, and validation APIs." },
|
|
551
|
-
"./surface-manifest": { group: "site-and-propagation", summary: "Surface manifest timestamp and reproducibility policy APIs." },
|
|
552
|
-
"./issue-reporting": { group: "observability-diagnostics", summary: "Buildchain-owned issue reporting API for workflow friction feedback." },
|
|
553
|
-
"./buildchain-layout": { group: "kfd-trust", summary: "Versioned Buildchain repository-layout discovery contract plus canonical .buildchain path resolution and migration APIs." },
|
|
554
|
-
"./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." },
|
|
555
|
-
"./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." },
|
|
556
|
-
"./public-surface-audit": { group: "kfd-trust", summary: "Reverse audit APIs for CLI, workflow, action, site page, and documentation command surfaces." },
|
|
557
|
-
"./kfd-gate": { group: "kfd-trust", summary: "KFD-1/KFD-2/KFD-3 release gate evidence and validation APIs." },
|
|
558
|
-
"./buildchain-kfd-claims": { group: "kfd-trust", summary: "Buildchain self KFD claim registry, witnesses, and public claim APIs." },
|
|
559
|
-
}));
|
|
560
|
-
const meta = map.get(exportName);
|
|
561
|
-
if (!meta) {
|
|
562
|
-
throw new Error(`missing Node API capability metadata: ${exportName}`);
|
|
421
|
+
for (const entry of BUILDCHAIN_COMMAND_REGISTRY) {
|
|
422
|
+
if (!documentedTopLevelCommands.has(entry.id)) {
|
|
423
|
+
throw new Error(`CLI runtime command is absent from help enumeration: ${entry.id}`);
|
|
424
|
+
}
|
|
563
425
|
}
|
|
564
|
-
return {
|
|
426
|
+
return {
|
|
427
|
+
schemaVersion: 1,
|
|
428
|
+
contract: "kungfu-buildchain-cli-registry",
|
|
429
|
+
binary: "buildchain",
|
|
430
|
+
npmPackage: packageJson.name,
|
|
431
|
+
commandSource: "bin/internal/command-registry.mjs plus bin/buildchain.mjs help enumeration",
|
|
432
|
+
commands: commands.map((entry) => {
|
|
433
|
+
const meta = cliCommandMeta(entry.id);
|
|
434
|
+
return {
|
|
435
|
+
...entry,
|
|
436
|
+
purpose: meta.purpose,
|
|
437
|
+
capabilityGroup: meta.capabilityGroup,
|
|
438
|
+
audience: meta.audience,
|
|
439
|
+
...publicSurfaceLifecycle({
|
|
440
|
+
owner: "buildchain-cli",
|
|
441
|
+
maturity: meta.maturity,
|
|
442
|
+
nonDuplicationRationale: "Existing command identity retained for CLI compatibility and discoverability.",
|
|
443
|
+
}),
|
|
444
|
+
};
|
|
445
|
+
}),
|
|
446
|
+
};
|
|
565
447
|
}
|
|
566
448
|
|
|
567
449
|
function buildCapabilityRegistry({ docs, pages, cliRegistry, manualRegistry, nodeApiRegistry, workflowRegistry }) {
|
|
@@ -779,23 +661,7 @@ function buildSiteBundle() {
|
|
|
779
661
|
artifactDigestScope: "npm package dist/site JSON files",
|
|
780
662
|
});
|
|
781
663
|
|
|
782
|
-
const cliRegistry =
|
|
783
|
-
schemaVersion: 1,
|
|
784
|
-
contract: "kungfu-buildchain-cli-registry",
|
|
785
|
-
binary: "buildchain",
|
|
786
|
-
npmPackage: packageJson.name,
|
|
787
|
-
commandSource: "bin/buildchain.mjs reverse enumeration",
|
|
788
|
-
commands: enumerateCliCommandsFromBin({ root }).map((entry) => {
|
|
789
|
-
const meta = cliCommandMeta(entry.id);
|
|
790
|
-
return {
|
|
791
|
-
...entry,
|
|
792
|
-
purpose: meta.purpose,
|
|
793
|
-
capabilityGroup: meta.capabilityGroup,
|
|
794
|
-
audience: meta.audience,
|
|
795
|
-
maturity: meta.maturity,
|
|
796
|
-
};
|
|
797
|
-
}),
|
|
798
|
-
};
|
|
664
|
+
const cliRegistry = createCliRegistry(packageJson);
|
|
799
665
|
|
|
800
666
|
const manualRegistry = {
|
|
801
667
|
schemaVersion: 1,
|
|
@@ -874,7 +740,11 @@ function buildSiteBundle() {
|
|
|
874
740
|
summary: meta.summary,
|
|
875
741
|
capabilityGroup: meta.capabilityGroup,
|
|
876
742
|
audience: meta.audience,
|
|
877
|
-
|
|
743
|
+
...publicSurfaceLifecycle({
|
|
744
|
+
owner: "buildchain-core",
|
|
745
|
+
maturity: meta.maturity,
|
|
746
|
+
nonDuplicationRationale: "Existing package subpath retained as the canonical API boundary for this capability.",
|
|
747
|
+
}),
|
|
878
748
|
};
|
|
879
749
|
}),
|
|
880
750
|
docs: [
|
|
@@ -937,6 +807,11 @@ function buildSiteBundle() {
|
|
|
937
807
|
status: statusById.get(entry.id) || "active",
|
|
938
808
|
}),
|
|
939
809
|
status: statusById.get(entry.id) || "active",
|
|
810
|
+
...publicSurfaceLifecycle({
|
|
811
|
+
owner: "buildchain-workflows",
|
|
812
|
+
maturity: statusById.get(entry.id) || "active",
|
|
813
|
+
nonDuplicationRationale: "Existing workflow identity retained for caller compatibility and repository orchestration.",
|
|
814
|
+
}),
|
|
940
815
|
};
|
|
941
816
|
}),
|
|
942
817
|
actionSource: "actions/*/action.yml reverse input enumeration",
|
|
@@ -944,6 +819,11 @@ function buildSiteBundle() {
|
|
|
944
819
|
...entry,
|
|
945
820
|
capabilityGroup: actionCapabilityGroup(entry.id),
|
|
946
821
|
status: "active",
|
|
822
|
+
...publicSurfaceLifecycle({
|
|
823
|
+
owner: "buildchain-actions",
|
|
824
|
+
maturity: "stable",
|
|
825
|
+
nonDuplicationRationale: "Existing action identity retained as the canonical composite or JavaScript action boundary.",
|
|
826
|
+
}),
|
|
947
827
|
})),
|
|
948
828
|
};
|
|
949
829
|
const controllerRegistry = createControllerRegistry({ workflows: workflowRegistry.workflows });
|
|
@@ -20,6 +20,30 @@ function resolveBelow(root, relative, label) {
|
|
|
20
20
|
return target;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
function projectCredentialArtifact(source, destination) {
|
|
24
|
+
const manifest = JSON.parse(
|
|
25
|
+
fs.readFileSync(path.join(source, "manifest.json"), "utf8"),
|
|
26
|
+
);
|
|
27
|
+
if (!Array.isArray(manifest.files) || manifest.files.length === 0)
|
|
28
|
+
throw new Error("credential artifact manifest contains no files");
|
|
29
|
+
for (const [index, file] of manifest.files.entries()) {
|
|
30
|
+
const from = resolveBelow(
|
|
31
|
+
source,
|
|
32
|
+
file.path,
|
|
33
|
+
`credential artifact file ${index}`,
|
|
34
|
+
);
|
|
35
|
+
if (!fs.statSync(from).isFile() || fs.lstatSync(from).isSymbolicLink())
|
|
36
|
+
throw new Error(`credential artifact file is not regular: ${file.path}`);
|
|
37
|
+
const to = resolveBelow(
|
|
38
|
+
destination,
|
|
39
|
+
file.path,
|
|
40
|
+
`credential artifact projection ${index}`,
|
|
41
|
+
);
|
|
42
|
+
fs.mkdirSync(path.dirname(to), { recursive: true });
|
|
43
|
+
fs.copyFileSync(from, to, fs.constants.COPYFILE_EXCL);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
23
47
|
export function importArtifactSigningResults({
|
|
24
48
|
workspace = process.env.GITHUB_WORKSPACE || process.cwd(),
|
|
25
49
|
cwd = process.env.BUILDCHAIN_SIGNING_CWD || ".",
|
|
@@ -41,29 +65,64 @@ export function importArtifactSigningResults({
|
|
|
41
65
|
byId.set(entry.id, request);
|
|
42
66
|
}
|
|
43
67
|
const imported = [];
|
|
68
|
+
const credentialArtifacts = [];
|
|
44
69
|
for (const entry of resultIndex.results || []) {
|
|
45
70
|
const request = byId.get(entry.id);
|
|
46
71
|
if (!request) throw new Error(`result has no local sealed request: ${entry.id}`);
|
|
47
72
|
const resultPath = resolveBelow(results, entry.result, "result path");
|
|
48
73
|
const result = JSON.parse(fs.readFileSync(resultPath, "utf8"));
|
|
49
74
|
const payload = resolveBelow(path.dirname(resultPath), result.artifact.path, "signed payload");
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
75
|
+
if (request.artifact.kind === "app-bundle") {
|
|
76
|
+
const credentialArtifact = path.join(
|
|
77
|
+
path.dirname(resultPath),
|
|
78
|
+
"credential-artifact",
|
|
79
|
+
);
|
|
80
|
+
if (!fs.statSync(credentialArtifact).isDirectory())
|
|
81
|
+
throw new Error("native app signing result has no credential artifact");
|
|
82
|
+
projectCredentialArtifact(credentialArtifact, sourceRoot);
|
|
83
|
+
} else {
|
|
84
|
+
const target = resolveBelow(
|
|
85
|
+
sourceRoot,
|
|
86
|
+
request.artifact.path,
|
|
87
|
+
"consumer artifact path",
|
|
88
|
+
);
|
|
89
|
+
const mode = fs.statSync(target).mode;
|
|
90
|
+
fs.copyFileSync(payload, target);
|
|
91
|
+
fs.chmodSync(target, mode);
|
|
92
|
+
}
|
|
54
93
|
const destination = path.resolve(sourceRoot, evidenceRoot, entry.id);
|
|
55
94
|
const rel = path.relative(sourceRoot, destination);
|
|
56
95
|
if (rel.startsWith("..") || path.isAbsolute(rel)) throw new Error("imported signing evidence escapes consumer source root");
|
|
57
96
|
fs.mkdirSync(path.dirname(destination), { recursive: true });
|
|
58
97
|
fs.cpSync(path.dirname(resultPath), destination, { recursive: true, force: false, errorOnExist: true });
|
|
98
|
+
if (request.artifact.kind === "app-bundle") {
|
|
99
|
+
credentialArtifacts.push({
|
|
100
|
+
id: entry.id,
|
|
101
|
+
root: path.join(destination, "credential-artifact"),
|
|
102
|
+
manifest: path.join(
|
|
103
|
+
destination,
|
|
104
|
+
"credential-artifact",
|
|
105
|
+
"manifest.json",
|
|
106
|
+
),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
59
109
|
imported.push({ id: entry.id, path: request.artifact.path, resultDigest: result.digest });
|
|
60
110
|
}
|
|
111
|
+
if (credentialArtifacts.length > 1)
|
|
112
|
+
throw new Error(
|
|
113
|
+
"one platform artifact may project at most one native app release payload",
|
|
114
|
+
);
|
|
61
115
|
writeGitHubOutputs({
|
|
62
116
|
"imported-count": String(imported.length),
|
|
63
117
|
"imported-json": JSON.stringify(imported),
|
|
64
118
|
"evidence-root": path.resolve(sourceRoot, evidenceRoot),
|
|
119
|
+
"credential-artifact-count": String(credentialArtifacts.length),
|
|
120
|
+
"credential-artifact-root":
|
|
121
|
+
credentialArtifacts.length === 1 ? credentialArtifacts[0].root : "",
|
|
122
|
+
"credential-manifest-path":
|
|
123
|
+
credentialArtifacts.length === 1 ? credentialArtifacts[0].manifest : "",
|
|
65
124
|
});
|
|
66
|
-
return { ...verification, imported };
|
|
125
|
+
return { ...verification, imported, credentialArtifacts };
|
|
67
126
|
}
|
|
68
127
|
|
|
69
128
|
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
@@ -92,6 +92,13 @@ export function inspectArtifactSigningRequests({
|
|
|
92
92
|
.split(path.sep)
|
|
93
93
|
.join("/") || ".",
|
|
94
94
|
kind: request.artifact.kind,
|
|
95
|
+
platform: request.artifact.platform,
|
|
96
|
+
arch: request.artifact.arch || "",
|
|
97
|
+
platformId: [request.artifact.platform, request.artifact.arch]
|
|
98
|
+
.filter(Boolean)
|
|
99
|
+
.join("-"),
|
|
100
|
+
sourceSha: request.source.sha,
|
|
101
|
+
sourceTreeSha: request.source.treeSha,
|
|
95
102
|
transportFormat: request.artifact.transport?.format || "",
|
|
96
103
|
};
|
|
97
104
|
if (request.signature.profile === "detached-signature-v1")
|