@kungfu-tech/buildchain 3.0.3-alpha.1 → 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.
@@ -0,0 +1,256 @@
1
+ export const BUILDCHAIN_USAGE = `Usage:
2
+ buildchain --help
3
+ buildchain version
4
+ buildchain layout [--cwd <dir>] [--json]
5
+ buildchain portable-cache plan --manifest <file-or-json> [--output <file>]
6
+ [--github-output <file>] [--json]
7
+ buildchain portable-cache receipt --plan <file-or-json> [--matched-key <key>]
8
+ [--cache-hit true|false]
9
+ [--validation-status pass|fail]
10
+ [--validation-reason <text>]
11
+ [--cold-fallback-status not-run|passed|failed]
12
+ [--output <file>] [--json]
13
+ buildchain candidate timeline --input <file-or-json> [--output <file>] [--json]
14
+ buildchain init [--cwd <dir>] [--type package|native|web-surface|infra-contract|publication-artifact|anchored-package] [--force]
15
+ [--package-manager pnpm|npm|yarn] [--runner-preset <preset>]
16
+ [--artifact-name <template>]
17
+ buildchain validate [--cwd <dir>] [--require-version-state]
18
+ [--require-lifecycle-stages <comma-list>]
19
+ buildchain lifecycle run <stage> [--cwd <dir>] [--required]
20
+ [--artifact-name <name>] [--artifact-path <path>]...
21
+ [--manifest-path <path>] [--summary-path <path>]
22
+ [--process-summary <json>]
23
+ buildchain npm dry-run [--cwd <dir>] [--expected-tag <tag>] [--registry <url>]
24
+ [--dist-tag <tag>] [--skip-npm-publish-dry-run] [--json]
25
+ buildchain release --dry-run --target-ref <ref> [--sha <sha>] [--source-ref <ref>]
26
+ [--tags <comma-list>] [--json]
27
+ buildchain release explain --target-ref <ref> [--sha <sha>] [--source-ref <ref>]
28
+ [--tags <comma-list>] [--json]
29
+ buildchain release dry-run --target-ref <ref> [--sha <sha>] [--source-ref <ref>]
30
+ [--tags <comma-list>] [--json]
31
+ buildchain release line open --major <n> --minor <n> [--source-ref <ref>]
32
+ [--initial-version <version>] [--write] [--json]
33
+ buildchain release-governance reconcile --repository <owner/repo>
34
+ --branch <dev|alpha|release/vN/vN.N>
35
+ --candidate-sha <sha> [--apply] [--json]
36
+ buildchain github-governance <plan|apply|rollback|protection-policy-plan|ruleset-policy-plan> ...
37
+ buildchain release <inspect|recover|finalize|abort> ...
38
+ buildchain transaction inspect ...
39
+ buildchain collect github-release --tag <tag> [--repository <owner/repo>]
40
+ [--assets-dir <dir>] [--assets-json <json-or-path>]
41
+ [--release-json <json-or-path>] [--package-set-json <json-or-path>]
42
+ [--product-name <name>]
43
+ [--publish-evidence-json <json-or-path>]
44
+ [--trusted-publishing-json <json-or-path>]
45
+ [--transaction-json <json-or-path>]
46
+ [--anchor-manifest-json <json-or-path>]
47
+ [--impact-json <json-or-path>]
48
+ [--build-summary-json <json-or-path>]
49
+ [--build-facts-json <json-or-path>]...
50
+ [--platform-manifest-json <json-or-path>]...
51
+ [--dist-tag-evidence-json <json-or-path>]
52
+ [--kfd-1-witness-json <json-or-path>]...
53
+ [--kfd-2-claim-json <json-or-path>]...
54
+ [--kfd-3-prebuild-witness-json <json-or-path>]...
55
+ [--kfd-3-artifact-witness-json <json-or-path>]...
56
+ [--kfd-3-artifact-verify-cmd <command>]
57
+ [--kfd-support-matrix-json <json-or-path>]
58
+ [--kfd-product-gate-json <json-or-path>]...
59
+ [--invariant-passport-json <json-or-path>]...
60
+ [--invariant-passport-cmd <command>]
61
+ [--release-evidence-json <json-or-path>]...
62
+ [--github-artifact-attestation-policy-json <json-or-path>]...
63
+ [--kfd-agent-hub-evidence-json <json-or-path>]
64
+ [--base-passport-json <json-or-path>] [--require-base-kfd]
65
+ [--release-extra-json <json-or-path>]
66
+ [--publish-json <json-or-path>] [--output-dir <dir>] [--json]
67
+ buildchain create publication-admission --input-json <file-or-json> [--output <file>] [--json]
68
+ buildchain create runner-provenance --input-json <file-or-json> [--output <file>] [--json]
69
+ buildchain create github-artifact-attestation-policy --input-json <file-or-json> [--output <file>] [--json]
70
+ buildchain verify release-passport <file-or-url> [--json]
71
+ buildchain verify github-artifact-attestation <artifact>
72
+ --evidence <file> --bundle <file>
73
+ --platform-manifest <file> --release-passport <file> [--json]
74
+ buildchain verify publication-admission <file-or-json>
75
+ --registry-json <file-or-json>
76
+ --runner-json <file-or-json>
77
+ --control-plane-audit-json <file-or-json>
78
+ --publication-evidence-json <file-or-json>
79
+ [--expected-json <file-or-json>] [--used-nonce <nonce>]... [--json]
80
+ buildchain audit publication-control-plane --repository <owner/repo> --branch <protected-branch>
81
+ buildchain audit github-governance [--organization <owner>] [--repository <owner/repo>]
82
+ [--output <file>] [--require-qualifying] [--json]
83
+ [--source-sha <merged-branch-sha>] [--workflow-repository <owner/repo>]
84
+ [--workflow <path>] [--workflow-ref <sha-or-ref>]
85
+ [--job <id>] [--environment <name>] [--package <name>]
86
+ [--publisher-mode npm-trusted-publisher|github-token|oidc-role]
87
+ [--npm-trust-json <file-or-json>]
88
+ [--provider-audit-json <file>] [--output <file>] [--allow-nonqualifying]
89
+ buildchain verify artifact <file|dir|url|npm:...|oci:...|github-release:...>
90
+ [--passport <file-or-url>] [--locator-config <json>]
91
+ [--repository <owner/repo>] [--tag <tag>]
92
+ [--npm-registry <url>] [--json]
93
+ buildchain verify artifact-envelope <file-or-json> [--assessment-time <epoch>]
94
+ [--expected-root <sha256:...>] [--expected-issuer <issuer>]
95
+ [--expected-publisher <publisher>]
96
+ [--expected-contract <version>] [--json]
97
+ buildchain project kfx-admission <file-or-json> [--assessment-time <epoch>]
98
+ [--expected-root <sha256:...>] [--expected-issuer <issuer>]
99
+ [--expected-publisher <publisher>]
100
+ [--expected-contract <version>] [--json]
101
+ buildchain verify infra-contract-evidence-bundle <file> [--json]
102
+ buildchain verify observability-log <jsonl> [--min-events <n>]
103
+ [--require-phase <csv>]
104
+ [--require-component <csv>]
105
+ [--require-event <csv>] [--allow-errors] [--json]
106
+ buildchain explain release --passport <file-or-url> [--for human|agent] [--json]
107
+ buildchain explain artifact <subject> [--passport <file-or-url>] [--npm-registry <url>] [--for human|agent] [--json]
108
+ buildchain inspect release --passport <file-or-url> [--json]
109
+ buildchain inspect artifact <subject> [--passport <file-or-url>] [--npm-registry <url>] [--json]
110
+ buildchain doctor [--cwd <dir>] [--require-publish-source-lock] [--json]
111
+ buildchain dev merge-queue --repository <owner/repo> --branch <dev/vN/vN.M>
112
+ [--from-config | --workflow <required-workflow.yml>...] [--cwd <dir>]
113
+ [--check-response-timeout-minutes <n>]
114
+ [--max-entries-to-build <n>] [--apply]
115
+ buildchain log <info|warn|error> --event <name> [--phase <phase>]
116
+ [--component <name>] [--source <name>] [--attribute key=value]...
117
+ [--path <jsonl>] [--json]
118
+ buildchain log summary [--path <jsonl>] [--json]
119
+ buildchain diagnostics summary <diagnostics.json>... [--artifact <file>]...
120
+ [--output <file>] [--json]
121
+ buildchain facts module [--cwd <dir>] [--module <id>] [--module-root <path>]
122
+ [--version-source <id>] [--output <file>]
123
+ [--output-path <path>]... [--legacy-kungfu-buildinfo <file>] [--json]
124
+ buildchain facts aggregate [--cwd <dir>] [--product <id>]
125
+ [--module-fact <file>]... [--artifact <path>]...
126
+ [--output <file>] [--json]
127
+ buildchain facts verify [--cwd <dir>] --fact <file> [--json]
128
+ buildchain kfd ...
129
+ buildchain kfd hub <init|inspect|test|explain> [--cwd <dir>]
130
+ [--declaration <path>] [--output-dir <path>]
131
+ [--write] [--force] [--for agent] [--json]
132
+ buildchain kfd status [--cwd <dir>] [--json]
133
+ buildchain kfd migrate-layout [--cwd <dir>] [--write] [--force] [--json]
134
+ buildchain kfd schema list [--standard kfd-1|kfd-2|kfd-3|kfd-4] [--json]
135
+ buildchain kfd schema show <kfd-1|kfd-2|kfd-3|kfd-4> [--schema <name>] [--json]
136
+ buildchain kfd upstream roles [--json]
137
+ buildchain kfd upstream collect [--cwd <dir>] [--output <file>] [--json]
138
+ buildchain kfd upstream check [--cwd <dir>] [--aggregate-json <file-or-json>] [--json]
139
+ buildchain kfd aggregate [--cwd <dir>] [--json]
140
+ buildchain kfd 1 schema [--schema <name>] [--json]
141
+ buildchain kfd 1 witness [--cwd <dir>] [--source-sha <sha>] [--output <file>] [--json]
142
+ buildchain kfd 1 gate --witness-json <file-or-json>... [--cwd <dir>] [--artifact-root <dir>]
143
+ [--output <file>] [--json]
144
+ buildchain kfd 1 verify --gate-json <file-or-json> [--json]
145
+ buildchain kfd 2 schema [--schema <name>] [--json]
146
+ buildchain kfd 2 taxonomy --entry-json <file-or-json>... [--kind residualRisk|downgradeReason] [--json]
147
+ buildchain kfd 2 claims [--cwd <dir>] [--output-dir <dir>] [--json]
148
+ buildchain kfd 2 product-claims <check|write|render> [--cwd <dir>] [--registry <path>]
149
+ [--output-dir <dir>] [--version <version>]
150
+ [--channel <channel>] [--tag <tag>] [--source-sha <sha>] [--json]
151
+ buildchain kfd 2 trust-claims [--claims-json <file-or-json>] [--json]
152
+ buildchain kfd 2 trust-assessment [--assessment-json <file-or-json>] [--json]
153
+ buildchain kfd 3 ...
154
+ buildchain kfd 3 detect [--cwd <dir>] [--kind <kind>]... [--artifact <path>] [--json]
155
+ buildchain kfd 3 register <node-api|python-api|cli|binary|documentation|site-bundle>
156
+ [--cwd <dir>] [--registry <path>] [--artifact <path>]
157
+ [--product <name>] [--json]
158
+ buildchain kfd 3 audit [--cwd <dir>] [--registry <path>] [--artifact <path>] [--json]
159
+ buildchain kfd 3 witness [--cwd <dir>] [--registry <path>] [--kind prebuild|artifact]
160
+ [--source-sha <sha>] [--artifact <path>] [--output <file>] [--json]
161
+ buildchain kfd 3 query [<product>] [--cwd <dir>] [--registry <path>]
162
+ [--passport <file-or-url>] [--artifact <path>] [--json]
163
+ buildchain kfd 4 schema [--schema <name>] [--json]
164
+ buildchain kfd 4 gate --input-json <file-or-json> [--cwd <dir>] [--output <file>] [--json]
165
+ buildchain kfd 4 verify --gate-json <file-or-json> [--expected-source-sha <sha>] [--json]
166
+ buildchain kfd 5 schema [--schema <name>] [--json]
167
+ buildchain kfd 5 gate --input-json <file-or-json> [--cwd <dir>] [--output <file>] [--json]
168
+ buildchain kfd 5 verify --gate-json <file-or-json> [--expected-source-sha <sha>] [--json]
169
+ buildchain kfd 7 schema [--schema <name>] [--json]
170
+ buildchain kfd 7 gate --input-json <file-or-json> [--cwd <dir>] [--output <file>] [--json]
171
+ buildchain kfd 7 verify --gate-json <file-or-json> [--expected-source-sha <sha>] [--json]
172
+ buildchain kfd support project --matrix-json <file-or-json> --gate-json <file-or-json>...
173
+ [--expected-source-sha <sha>] [--checked-at <date-time>]
174
+ [--output <file>] [--json]
175
+ buildchain kfd support verify --projection-json <file-or-json>
176
+ [--expected-source-sha <sha>] [--checked-at <date-time>] [--json]
177
+ buildchain sample process-tree [--interval-ms <n>] [--label <name>]
178
+ [--output <jsonl>] [--summary-output <json>]
179
+ [--requested-parallelism <n>] [--json]
180
+ -- <command> [args...]
181
+ buildchain mark --event <name> [--phase <phase>] [--component <name>]
182
+ [--attribute key=value]... [--path <jsonl>] [--json]
183
+ buildchain span --event <name> [--phase <phase>] [--component <name>]
184
+ [--path <jsonl>] -- <command> [args...]
185
+ buildchain web-surface ...
186
+ buildchain infra-contract ...
187
+ buildchain publication-artifact manifest [--cwd <dir>] [--source-sha <sha>]
188
+ [--output <file>] [--passport-output <file>]
189
+ [--registry-output <file>] [--source-bundle <file>]
190
+ [--no-source-bundle] [--json]
191
+ buildchain publication-artifact npm-package [--cwd <dir>] [--output-dir <dir>] [--package-name <name>] [--json]
192
+ buildchain publication-artifact reproducibility [--cwd <dir>] [--source-sha <sha>]
193
+ [--output <file>] [--promote]
194
+ [--no-toolchain-pull]
195
+ [--allow-unpinned-toolchain] [--json]
196
+ buildchain paper scaffold --package <name> --repository <owner/repo> [--write] [--json]
197
+ buildchain paper migrate [--cwd <dir>] [--write] [--json]
198
+ buildchain paper work start <topic> [--cwd <dir>] [--branch <branch>] [--execute] [--json]
199
+ buildchain paper work submit [--cwd <dir>] [--title <title>] [--body <body>] [--execute] [--json]
200
+ buildchain paper fleet audit [--root <dir>] [--offline] [--json]
201
+ buildchain paper fleet update [--root <dir>] [--write] [--json]
202
+ buildchain paper preflight [--cwd <dir>] [--offline] [--json]
203
+ buildchain paper bootstrap npm [--cwd <dir>] [--execute]
204
+ [--confirm-public-package <name>] [--json]
205
+ buildchain paper build [--cwd <dir>] [--execute] [--json]
206
+ buildchain paper alpha [--cwd <dir>] [--source-ref <ref>] [--target-ref <ref>]
207
+ [--execute] [--json]
208
+ buildchain paper status [--cwd <dir>] [--json]
209
+ buildchain paper resume [--cwd <dir>] [--buildchain-ref <ref>] [--execute] [--json]
210
+ buildchain release-propagation <plan|write-lock> ...
211
+ buildchain badges readme [--cwd <dir>] [--readme <path>] [--check] [--write] [--json]
212
+ buildchain badges bundle [--cwd <dir>] [--readme <path>] [--claims <csv>] [--check] [--write] [--json]
213
+ buildchain homebrew update-formula --package <name> --release-passport <file-or-url> [--write] [--json]
214
+ buildchain homebrew check [--cwd <dir>] [--package <name>] [--release-passport <file-or-url>] [--json]
215
+ buildchain publish-source <lock|manifest|verify-lock|verify-channel-ref|validate-anchored-release> ...
216
+ buildchain build-contract ...
217
+
218
+ Examples:
219
+ buildchain init --type package --package-manager pnpm
220
+ buildchain validate --require-version-state --require-lifecycle-stages build,verify
221
+ buildchain lifecycle run build --artifact-path dist --artifact-name "{repo}-{version}-{platform}"
222
+ buildchain npm dry-run --json
223
+ buildchain release --dry-run --target-ref alpha/v3/v3.0
224
+ buildchain release line open --major 3 --minor 1 --source-ref release/v3/v3.0 --json
225
+ buildchain span --event native.build -- cmake --build build
226
+ buildchain collect github-release --tag v3.0.0 --assets-dir dist --output-dir .buildchain/release-passport
227
+ buildchain create publication-admission --input-json admission-input.json --output admission.json
228
+ buildchain create runner-provenance --input-json runner-input.json --output runner.json
229
+ buildchain verify release-passport .buildchain/release-passport/buildchain.release.json
230
+ buildchain verify publication-admission admission.json --registry-json publication-authority-registry.json --runner-json runner.json --control-plane-audit-json control-plane.json --expected-json expected.json --json
231
+ buildchain audit publication-control-plane --repository kungfu-systems/buildchain --branch release/v3/v3.0
232
+ buildchain verify artifact ./dist/buildchain-x86_64-unknown-linux-gnu.tar.gz --passport .buildchain/release-passport/buildchain.release.json
233
+ buildchain verify artifact-envelope .buildchain/kfx/artifact-verification-envelope.json --json
234
+ buildchain project kfx-admission .buildchain/kfx/artifact-verification-envelope.json --json
235
+ buildchain verify infra-contract-evidence-bundle .buildchain/infra-contract-evidence-bundle.json
236
+ buildchain verify observability-log .buildchain/logs/events.jsonl --min-events 4 --require-phase build
237
+ buildchain infra-contract --mode plan --source-sha <sha>
238
+ buildchain infra-contract --mode ci --source-sha <sha>
239
+ buildchain infra-contract --mode plan --source-sha <sha> --execute-adapter-commands true
240
+ buildchain infra-contract --mode apply --plan <plan.json> --source-sha <sha> --approval-id <id>
241
+ buildchain infra-contract --mode apply --plan <plan.json> --source-sha <sha> --approval-id <id> --dry-run false --execute-adapter-commands true
242
+ buildchain infra-contract --mode propagation-apply --propagation-plan <plan.json> --dry-run true
243
+ buildchain infra-contract --mode evidence-bundle --artifact <artifact.json> --propagation-result <result.json>
244
+ buildchain publication-artifact manifest --source-sha <sha> --json
245
+ buildchain paper preflight --json
246
+ buildchain paper status --json
247
+ buildchain release-propagation plan --graph graph.json --upstream-release release.json --json
248
+ buildchain kfd status --json
249
+ buildchain kfd schema list --json
250
+ buildchain kfd 1 witness --json
251
+ buildchain kfd 2 claims --json
252
+ buildchain kfd 2 trust-assessment --json
253
+ buildchain kfd upstream collect --json
254
+ buildchain kfd aggregate --json
255
+ buildchain kfd 3 query buildchain --json
256
+ `;
@@ -33,6 +33,7 @@ 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";
37
38
  import {
38
39
  BUILDCHAIN_COMMAND_REGISTRY,
@@ -406,193 +407,6 @@ function pageCapabilityMeta(relPath, category) {
406
407
  return { capabilityGroup: capabilityGroup("getting-started"), audience: ["agent"], maturity: "stable" };
407
408
  }
408
409
 
409
- function cliCommandMeta(id) {
410
- const map = new Map(Object.entries({
411
- audit: { group: "release-passport-trust", purpose: "Inspect read-only publication authority audit commands." },
412
- "audit-publication-control-plane": { group: "release-passport-trust", purpose: "Read GitHub publication controls, bind provider-enforced npm identity, and emit a sanitized expiring receipt." },
413
- "audit-github-governance": { group: "governance-versioning", purpose: "Read the managed GitHub zone, aggregate native protection and ownership, and emit sanitized fail-closed governance receipts." },
414
- badges: { group: "distribution-indexes", purpose: "Inspect README badge command families." },
415
- "badges-bundle": { group: "distribution-indexes", purpose: "Generate or verify the combined KFD and Release Passport badge bundle." },
416
- "badges-readme": { group: "distribution-indexes", purpose: "Generate or verify managed README badge blocks." },
417
- "build-contract": { group: "governance-versioning", purpose: "Resolve Buildchain runtime contract metadata for floating-ref drift checks." },
418
- "build-facts": { group: "observability-diagnostics", purpose: "Collect and verify Git source, version, module output, product artifact, and legacy Kungfu buildinfo facts." },
419
- candidate: { group: "observability-diagnostics", purpose: "Inspect source-bound candidate evidence command families." },
420
- "candidate-timeline": { group: "observability-diagnostics", purpose: "Create a critical-path-safe timeline across pull-request and Merge Queue attempts." },
421
- collect: { group: "release-passport-trust", purpose: "Inspect release evidence collection command families." },
422
- "collect-github-release": { group: "release-passport-trust", purpose: "Collect GitHub Release assets into a release passport." },
423
- create: { group: "release-passport-trust", purpose: "Create canonical sealed publication evidence documents." },
424
- "create-publication-admission": { group: "release-passport-trust", purpose: "Create a canonical short-lived publication admission envelope from exact consumer bindings." },
425
- "create-github-artifact-attestation-policy": { group: "release-passport-trust", purpose: "Create an exact source, signer, Linux build, and Release Passport attestation policy." },
426
- "create-runner-provenance": { group: "release-passport-trust", purpose: "Create runner provenance evidence with an explicit qualification floor." },
427
- diagnostics: { group: "observability-diagnostics", purpose: "Inspect diagnostics command families." },
428
- "diagnostics-summary": { group: "observability-diagnostics", purpose: "Summarize diagnostics artifacts into JSON and cross-platform lifecycle timing tables." },
429
- doctor: { group: "getting-started", purpose: "Report local integration readiness." },
430
- explain: { group: "release-passport-trust", purpose: "Inspect release and artifact explanation command families." },
431
- "explain-artifact": { group: "release-passport-trust", purpose: "Explain artifact evidence for humans or agents." },
432
- "explain-release": { group: "release-passport-trust", purpose: "Explain a release passport for humans or agents." },
433
- facts: { group: "observability-diagnostics", purpose: "Inspect build facts command families." },
434
- help: { group: "getting-started", purpose: "Print Buildchain CLI help." },
435
- homebrew: { group: "distribution-indexes", purpose: "Inspect Homebrew distribution-index command families." },
436
- "homebrew-check": { group: "distribution-indexes", purpose: "Verify Homebrew tap metadata against upstream release passport evidence." },
437
- "homebrew-update-formula": { group: "distribution-indexes", purpose: "Generate Homebrew Formula metadata from upstream release passport evidence." },
438
- "github-governance": { group: "governance-versioning", purpose: "Plan, apply, or roll back one root-bound GitHub branch-protection rollout after a frozen read-only inventory." },
439
- "infra-contract": { group: "governance-versioning", purpose: "Validate and publish provider-neutral infrastructure contract evidence." },
440
- init: { group: "getting-started", purpose: "Bootstrap a repository with Buildchain configuration and caller workflow files." },
441
- inspect: { group: "release-passport-trust", purpose: "Inspect release and artifact evidence command families." },
442
- "inspect-artifact": { group: "release-passport-trust", purpose: "Inspect artifact evidence." },
443
- "inspect-release": { group: "release-passport-trust", purpose: "Inspect release passport evidence." },
444
- kfd: { group: "kfd-trust", purpose: "Inspect KFD standards, schemas, and versioned KFD command families." },
445
- "kfd-hub": { group: "kfd-trust", purpose: "Initialize, inspect, test, and explain one declarative KFD Agent Hub adapter adoption." },
446
- layout: { group: "kfd-trust", purpose: "Return the versioned repository-layout and KFD registry discovery contract for tools such as Shifu." },
447
- "kfd-schema": { group: "kfd-trust", purpose: "Inspect KFD schema command families." },
448
- "kfd-schema-list": { group: "kfd-trust", purpose: "List machine-readable schemas exposed by the KFD package standards metadata." },
449
- "kfd-schema-show": { group: "kfd-trust", purpose: "Print a machine-readable KFD schema from the KFD package standards metadata." },
450
- "kfd-status": { group: "kfd-trust", purpose: "Report implemented KFD support and the active .buildchain repository layout." },
451
- "kfd-migrate-layout": { group: "kfd-trust", purpose: "Plan or apply migration of legacy root Buildchain files into .buildchain/." },
452
- "kfd-1": { group: "kfd-trust", purpose: "Inspect KFD-1 contract-world witness, gate, verify, and schema command families." },
453
- "kfd-1-gate": { group: "kfd-trust", purpose: "Generate KFD-1 release gate evidence from declared contract-world witnesses." },
454
- "kfd-1-schema": { group: "kfd-trust", purpose: "Print the default KFD-1 schema exposed by the KFD package standards metadata." },
455
- "kfd-1-verify": { group: "kfd-trust", purpose: "Validate KFD-1 release gate evidence." },
456
- "kfd-1-witness": { group: "kfd-trust", purpose: "Generate Buildchain's KFD-1 self contract-world witness." },
457
- "kfd-2": { group: "kfd-trust", purpose: "Inspect KFD-2 trust taxonomy, public claims, and schema command families." },
458
- "kfd-2-claims": { group: "kfd-trust", purpose: "Generate Buildchain's KFD-2 public trust claim evidence." },
459
- "kfd-2-product-claims": { group: "kfd-trust", purpose: "Validate and render product-owned KFD-2 claims in the canonical .buildchain/kfd layout." },
460
- "kfd-2-schema": { group: "kfd-trust", purpose: "Print the default KFD-2 schema exposed by the KFD package standards metadata." },
461
- "kfd-2-taxonomy": { group: "kfd-trust", purpose: "Validate KFD-2 trust taxonomy entries from the KFD package standards metadata." },
462
- "kfd-2-trust-assessment": { group: "kfd-trust", purpose: "Expose and validate the KFD package foundation KFD-2 trust assessment." },
463
- "kfd-2-trust-claims": { group: "kfd-trust", purpose: "Expose and validate the KFD package foundation KFD-2 trust claims." },
464
- "kfd-3": { group: "kfd-trust", purpose: "Inspect KFD-3 surface detection, registry, witness, audit, and query command families under the unified KFD namespace." },
465
- "kfd-3-audit": { group: "kfd-trust", purpose: "Compare detected, declared, and enforced KFD-3 public surfaces." },
466
- "kfd-3-detect": { group: "kfd-trust", purpose: "Detect standard KFD-3 public surface candidates from source and artifact metadata." },
467
- "kfd-3-query": { group: "kfd-trust", purpose: "Return an agent-readable KFD-3 capability map for a product, registry, or release passport." },
468
- "kfd-3-register": { group: "kfd-trust", purpose: "Declare detected KFD-3 public surfaces into a product-owned surface registry." },
469
- "kfd-3-witness": { group: "kfd-trust", purpose: "Generate release-passport-compatible KFD-3 surface witnesses from a product registry." },
470
- "kfd-4-schema": { group: "kfd-trust", purpose: "Print the default KFD-4 schema exposed by the KFD package standards metadata." },
471
- "kfd-4-gate": { group: "kfd-trust", purpose: "Evaluate source-bound KFD-4 observer-perspective and contrastive-replay product evidence." },
472
- "kfd-4-verify": { group: "kfd-trust", purpose: "Verify a retained KFD-4 product-gate result without widening product support." },
473
- "kfd-5-schema": { group: "kfd-trust", purpose: "Print the default KFD-5 schema exposed by the KFD package standards metadata." },
474
- "kfd-5-gate": { group: "kfd-trust", purpose: "Evaluate source-bound KFD-5 Primitive discovery qualification evidence." },
475
- "kfd-5-verify": { group: "kfd-trust", purpose: "Verify a retained KFD-5 product-gate result without widening product support." },
476
- "kfd-7-schema": { group: "kfd-trust", purpose: "Print the default KFD-7 schema exposed by the KFD package standards metadata." },
477
- "kfd-7-gate": { group: "kfd-trust", purpose: "Evaluate a source-bound KFD-7 Domain Profile, evidence obligations, and independent review." },
478
- "kfd-7-verify": { group: "kfd-trust", purpose: "Verify a retained KFD-7 product-gate result without widening product support." },
479
- "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." },
480
- "kfd-aggregate": { group: "kfd-trust", purpose: "Return a product KFD view that combines own KFD status with upstream KFD aggregate facts." },
481
- "kfd-upstream": { group: "kfd-trust", purpose: "Inspect KFD upstream aggregate command families." },
482
- "kfd-upstream-check": { group: "kfd-trust", purpose: "Validate a KFD upstream aggregate document and fail closed on missing evidence." },
483
- "kfd-upstream-collect": { group: "kfd-trust", purpose: "Collect declared KFD-aware upstream package evidence and hashes from Buildchain config." },
484
- "kfd-upstream-roles": { group: "kfd-trust", purpose: "List Buildchain-managed KFD upstream role values and inference policy." },
485
- lifecycle: { group: "reusable-build", purpose: "Run configured lifecycle commands and write deterministic artifact manifests." },
486
- dev: { group: "governance-versioning", purpose: "Inspect protected development-channel governance command families." },
487
- "dev-merge-queue": { group: "governance-versioning", purpose: "Plan or apply an exact-branch GitHub merge queue after required workflow event compatibility is verified." },
488
- log: { group: "observability-diagnostics", purpose: "Inspect Buildchain logging command families." },
489
- logging: { group: "observability-diagnostics", purpose: "Emit timestamped build events, summarize logs, and enforce required phases." },
490
- mark: { group: "observability-diagnostics", purpose: "Emit a single Buildchain log event." },
491
- npm: { group: "release-passport-trust", purpose: "Inspect npm publishing command families." },
492
- "portable-cache": { group: "observability-diagnostics", purpose: "Plan exact portable dependency/compiler cache inputs and seal provider outcomes." },
493
- "portable-cache-plan": { group: "observability-diagnostics", purpose: "Validate a consumer-neutral cache manifest and emit exact GitHub Actions cache inputs." },
494
- "portable-cache-receipt": { group: "observability-diagnostics", purpose: "Seal exact, compatible, miss, or corrupt provider evidence against one cache plan." },
495
- "npm-dry-run": { group: "release-passport-trust", purpose: "Verify npm publish shape before a release transaction." },
496
- paper: { group: "reusable-build", purpose: "Inspect the unified paper repository and publication command families." },
497
- "paper-alpha": { group: "release-passport-trust", purpose: "Plan or open the protected dev-to-alpha paper publication PR without direct publication." },
498
- "paper-bootstrap-npm": { group: "release-passport-trust", purpose: "Dry-run or explicitly bootstrap the public npm package and bind GitHub Trusted Publishing." },
499
- "paper-build": { group: "reusable-build", purpose: "Plan or execute the existing two-clean-build reproducibility gate for a paper." },
500
- "paper-migrate": { group: "getting-started", purpose: "Plan or write the bounded Buildchain-owned control-file migration for an existing paper repository." },
501
- "paper-preflight": { group: "reusable-build", purpose: "Report exact source, runtime, permission, npm trust, deterministic build, and release-state readiness." },
502
- "paper-resume": { group: "release-passport-trust", purpose: "Plan or dispatch recovery of the exact existing sealed paper release transaction." },
503
- "paper-scaffold": { group: "getting-started", purpose: "Plan or write an idempotent, no-overwrite, release-ready paper repository scaffold." },
504
- "paper-status": { group: "reusable-build", purpose: "Report explicit evidence for every paper lifecycle state without unsupported inference." },
505
- "publish-source": { group: "release-passport-trust", purpose: "Create, inspect, or verify publish-gate source-lock refs." },
506
- "publication-artifact": { group: "reusable-build", purpose: "Generate publication artifact manifests, passports, and source bundles for paper/report repositories." },
507
- "publication-artifact-manifest": { group: "reusable-build", purpose: "Write a site-consumable publication artifact manifest, publication passport, and source bundle." },
508
- "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." },
509
- project: { group: "release-passport-trust", purpose: "Inspect read-only consumer projection command families." },
510
- "project-kfx-admission": { group: "release-passport-trust", purpose: "Project one verified sealed envelope into direct KFX admission inputs without reconstructing evidence." },
511
- "publication-artifact-reproducibility": { group: "reusable-build", purpose: "Prove exact PDF, source bundle, publication evidence, and npm tarball bytes across two independent clean builds." },
512
- "release-dry-run": { group: "governance-versioning", purpose: "Explain what a channel merge would publish before the PR is merged." },
513
- "release-line-open": { group: "governance-versioning", purpose: "Plan or write the initial version-state commit for a new minor release line." },
514
- "release-governance": { group: "governance-versioning", purpose: "Reconcile a managed branch's Buildchain aggregate check to an already-tested pull request SHA." },
515
- "release-propagation": { group: "site-and-propagation", purpose: "Plan channel-preserving downstream release PRs and write exact upstream release locks." },
516
- "release-transaction": { group: "release-passport-trust", purpose: "Inspect, recover, finalize, or abort durable release transactions." },
517
- sample: { group: "observability-diagnostics", purpose: "Inspect sampler command families." },
518
- "sample-process-tree": { group: "observability-diagnostics", purpose: "Sample process-tree diagnostics for a wrapped command." },
519
- span: { group: "observability-diagnostics", purpose: "Run a command inside a Buildchain log span." },
520
- "transaction-inspect": { group: "release-passport-trust", purpose: "Inspect durable release transaction state." },
521
- validate: { group: "getting-started", purpose: "Validate .buildchain/buildchain.toml and declared lifecycle surfaces." },
522
- verify: { group: "release-passport-trust", purpose: "Inspect release and artifact verification command families." },
523
- "verify-artifact": { group: "release-passport-trust", purpose: "Verify artifact subjects against release passport evidence." },
524
- "verify-artifact-envelope": { group: "release-passport-trust", purpose: "Verify exact roots, identity, lifecycle, revocation, and an existing KFD assessment in a sealed artifact envelope." },
525
- "verify-github-artifact-attestation": { group: "release-passport-trust", purpose: "Verify GitHub keyless attestation identity plus local artifact, manifest, Passport, predicate, bundle, and evidence bindings." },
526
- "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." },
527
- "verify-observability-log": { group: "observability-diagnostics", purpose: "Verify Buildchain observability log events." },
528
- "verify-publication-admission": { group: "release-passport-trust", purpose: "Independently verify sealed publication admission, runner provenance, control-plane audit, nonce freshness, and exact artifact bindings." },
529
- "verify-release-passport": { group: "release-passport-trust", purpose: "Fail closed unless a release passport and its evidence are complete." },
530
- version: { group: "getting-started", purpose: "Print the package or embedded binary version." },
531
- "web-surface": { group: "site-and-propagation", purpose: "Plan, verify, and apply Buildchain web-surface deployments." },
532
- }));
533
- const meta = map.get(id);
534
- if (!meta) {
535
- throw new Error(`missing CLI command capability metadata: ${id}`);
536
- }
537
- return { capabilityGroup: capabilityGroup(meta.group), purpose: meta.purpose, audience: ["agent", "operator"], maturity: "stable" };
538
- }
539
-
540
- function nodeApiMeta(exportName) {
541
- const map = new Map(Object.entries({
542
- ".": { group: "api-cli-reference", summary: "Root toolkit export for Buildchain's public Node API." },
543
- "./core": { group: "api-cli-reference", summary: "Alias for the root public toolkit export." },
544
- "./badges": { group: "distribution-indexes", summary: "Badge bundle facts, rendering, checking, and update APIs." },
545
- "./readme-badges": { group: "distribution-indexes", summary: "Managed README badge block facts, rendering, drift checks, and updates." },
546
- "./homebrew": { group: "distribution-indexes", summary: "Homebrew tap fact collection, Formula rendering, update, and check APIs." },
547
- "./build-facts": { group: "observability-diagnostics", summary: "Git source, version, module output, product artifact, and legacy Kungfu build fact APIs." },
548
- "./candidate-timeline": { group: "observability-diagnostics", summary: "Source-bound candidate event normalization, per-attempt critical-path-safe aggregation, and compact reporting APIs." },
549
- "./channel-candidate": { group: "governance-versioning", summary: "Exact-source channel candidate decisions, same-SHA workflow evidence validation, and deterministic source-lock reference APIs." },
550
- "./cache-evidence": { group: "observability-diagnostics", summary: "Content-addressed cache operation receipts and source/platform-bound evidence-set verification APIs." },
551
- "./diagnostics": { group: "observability-diagnostics", summary: "Native diagnostics collection, summarization, cache, compiler, and process-sampler APIs." },
552
- "./logging": { group: "observability-diagnostics", summary: "Buildchain JSONL logging, span, summary, and verification APIs." },
553
- "./portable-dev-cache": { group: "observability-diagnostics", summary: "Portable dependency/compiler cache plan, exact-root verification, and provider receipt APIs." },
554
- "./publication-artifact": { group: "reusable-build", summary: "Publication artifact manifest, source bundle, and publication passport APIs." },
555
- "./publication-package": { group: "reusable-build", summary: "Publication npm package synthesis APIs for Buildchain-managed paper release presets." },
556
- "./publication-reproducibility": { group: "reusable-build", summary: "Two-clean-build publication byte reproducibility receipt APIs." },
557
- "./publication-sealed-bundle": { group: "reusable-build", summary: "Build-once publication bundle manifests and exact-byte resume verification APIs." },
558
- "./paper": { group: "reusable-build", summary: "Unified paper scaffold, preflight, npm bootstrap, build, Alpha, status, and resume planning APIs." },
559
- "./publication-authority": { group: "release-passport-trust", summary: "Sealed publication authority registry, runner provenance, control-plane audit, admission, and independent verification APIs." },
560
- "./publication-control-plane-audit": { group: "release-passport-trust", summary: "Read-only publication control-plane snapshot evaluation APIs." },
561
- "./buildchain-publication-authority": { group: "release-passport-trust", summary: "Buildchain-owned closed-world publication authority descriptor registry." },
562
- "./github-governance-authority": { group: "governance-versioning", summary: "Fail-closed GitHub ownership, effective-policy, managed-zone admission, rollout-plan, and immutable receipt APIs." },
563
- "./artifact-passport": { group: "release-passport-trust", summary: "Artifact passport digest and evidence helper APIs." },
564
- "./artifact-verification-envelope": { group: "release-passport-trust", summary: "Sealed exact-root, lifecycle, identity, and existing KFD assessment inputs for KFX admission." },
565
- "./artifact-signing": { group: "reusable-build", summary: "Credential-free artifact signing declarations, source-bound requests, authority receipts, profile resolution, and fail-closed validation APIs." },
566
- "./artifact-signing-result": { group: "release-passport-trust", summary: "Immutable signed-result, final-payload, receipt, evidence-root, and provider-verification binding APIs." },
567
- "./detached-artifact-signature": { group: "release-passport-trust", summary: "Buildchain-authority Ed25519 detached signature and verification APIs for arbitrary binary artifacts." },
568
- "./anchored-version-material": { group: "reusable-build", summary: "Anchored/manual derived version material preflight, exact-tree binding, and digest evidence APIs." },
569
- "./release-passport": { group: "release-passport-trust", summary: "Release passport collection, verification, explanation, and evidence APIs." },
570
- "./github-artifact-attestation": { group: "release-passport-trust", summary: "GitHub keyless artifact attestation policy, predicate, provider evidence, and fail-closed verification APIs." },
571
- "./kfd-agent-hub": { group: "kfd-trust", summary: "Declarative Agent Hub adapter inspection, fixed-suite execution, exact KFD cut locking, and agent explanation APIs." },
572
- "./release-passport-contract": { group: "release-passport-trust", summary: "Standalone release passport JSON Schema, ownership/check manifest, and structural validation APIs." },
573
- "./release-candidate": { group: "reusable-build", summary: "PR-stage release-candidate artifact, passport, and promote-only resolver APIs." },
574
- "./stable-candidate-ledger": { group: "governance-versioning", summary: "Immutable alpha candidate ledger, qualification, revocation, selection, and exact stable source-lock APIs." },
575
- "./release-propagation": { group: "site-and-propagation", summary: "Release propagation graph, plan, and exact upstream lock APIs." },
576
- "./release-activation-transaction": { group: "release-passport-trust", summary: "Ordered cross-repository activation, exact receipt-set binding, retry, abort, rollback, and shadow-rehearsal APIs." },
577
- "./release-line-bootstrap": { group: "governance-versioning", summary: "Semver release-line bootstrap planning and version-state APIs." },
578
- "./buildchain-contract": { group: "governance-versioning", summary: "Runtime contract world and compatibility digest APIs for floating-ref drift checks." },
579
- "./controller-evidence": { group: "reusable-build", summary: "Project-independent controller descriptors, source/runtime-bound plans, receipts, aggregates, and validation APIs." },
580
- "./surface-manifest": { group: "site-and-propagation", summary: "Surface manifest timestamp and reproducibility policy APIs." },
581
- "./issue-reporting": { group: "observability-diagnostics", summary: "Buildchain-owned issue reporting API for workflow friction feedback." },
582
- "./buildchain-layout": { group: "kfd-trust", summary: "Versioned Buildchain repository-layout discovery contract plus canonical .buildchain path resolution and migration APIs." },
583
- "./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." },
584
- "./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." },
585
- "./public-surface-audit": { group: "kfd-trust", summary: "Reverse audit APIs for CLI, workflow, action, site page, and documentation command surfaces." },
586
- "./kfd-gate": { group: "kfd-trust", summary: "KFD-1/KFD-2/KFD-3 release gate evidence and validation APIs." },
587
- "./buildchain-kfd-claims": { group: "kfd-trust", summary: "Buildchain self KFD claim registry, witnesses, and public claim APIs." },
588
- }));
589
- const meta = map.get(exportName);
590
- if (!meta) {
591
- throw new Error(`missing Node API capability metadata: ${exportName}`);
592
- }
593
- return { capabilityGroup: capabilityGroup(meta.group), summary: meta.summary, audience: ["developer", "agent"], maturity: "stable" };
594
- }
595
-
596
410
  function createCliRegistry(packageJson) {
597
411
  const commands = enumerateCliCommandsFromBin({ root });
598
412
  const documentedTopLevelCommands = new Set();