@kungfu-tech/buildchain 2.11.1 → 2.11.2-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,109 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "contract": "kungfu-buildchain-publication-release-registry",
4
+ "generatedAt": "2026-07-09T16:06:47.861Z",
5
+ "publishedAt": "2026-07-09T16:06:47.861Z",
6
+ "reproducible": true,
7
+ "timestampPolicy": "ci-injected",
8
+ "deterministicInputs": [
9
+ "README.md",
10
+ "docs/*.md",
11
+ "actions/*/README.md",
12
+ "fixtures/*/README.md",
13
+ "packages/core/README.md",
14
+ "package.json#exports",
15
+ "tests/buildchain-inventory.json",
16
+ "sourceRevision",
17
+ "sourceDateEpoch",
18
+ "package content",
19
+ "declared Buildchain surface manifest contract"
20
+ ],
21
+ "sourceDateEpoch": "0",
22
+ "sourceRevision": "b93fcd8237e6060596fc6bcb82198e9097356f5b",
23
+ "timestampPolicyDetails": {
24
+ "contract": "kungfu-buildchain-surface-timestamp-policy",
25
+ "timestampFields": [
26
+ "generatedAt",
27
+ "publishedAt"
28
+ ],
29
+ "timestampFieldsParticipateInArtifactDigest": true,
30
+ "artifactDigestScope": "npm package dist/site JSON files",
31
+ "note": "Human-readable timestamps are separate from reproducibility inputs; do not infer reproducibility from epoch timestamps."
32
+ },
33
+ "package": {
34
+ "name": "@kungfu-tech/buildchain",
35
+ "version": "2.11.2-alpha.2",
36
+ "versionSource": "package.json#version"
37
+ },
38
+ "sourceKind": "package-site-bundle",
39
+ "sourceBoundary": {
40
+ "truthOwner": "@kungfu-tech/buildchain",
41
+ "siteRole": "rendering, routing, archive preservation checks, and agent discovery",
42
+ "rule": "Downstream papers sites render this registry; Buildchain owns publication route, latest, immutable artifact, passport, and source bundle facts."
43
+ },
44
+ "archivePolicy": {
45
+ "contract": "kungfu-buildchain-publication-archive-policy",
46
+ "mutableRouteKinds": [
47
+ "canonical-reader",
48
+ "latest",
49
+ "registry-index"
50
+ ],
51
+ "immutableRouteKinds": [
52
+ "version-artifact",
53
+ "version-passport",
54
+ "version-source"
55
+ ],
56
+ "deploymentBoundary": "append-only immutable version prefixes",
57
+ "rule": "A site build may update latest and canonical reader pages, but it must not delete or overwrite files under a declared immutable version prefix."
58
+ },
59
+ "publications": [
60
+ {
61
+ "id": "publication-archive-fixture",
62
+ "title": "Publication Archive Fixture",
63
+ "summary": "A paper-shaped Buildchain package fact proving that site rendering preserves immutable versioned PDF, source, and passport routes while latest pages can move.",
64
+ "canonicalReader": {
65
+ "kind": "canonical-reader",
66
+ "url": "https://kungfu.tech/whitepaper/",
67
+ "owner": "site-kungfu-tech"
68
+ },
69
+ "latest": {
70
+ "kind": "latest",
71
+ "version": "0.1.0",
72
+ "path": "/publication-archive-fixture/latest/"
73
+ },
74
+ "immutablePrefixTemplate": "/publication-archive-fixture/v{version}/",
75
+ "versions": [
76
+ {
77
+ "version": "0.1.0",
78
+ "releasedAt": "2026-07-09T00:00:00.000Z",
79
+ "immutable": true,
80
+ "immutablePath": "/publication-archive-fixture/v0.1.0/",
81
+ "source": {
82
+ "repository": "https://github.com/kungfu-systems/publication-archive-fixture",
83
+ "tag": "v0.1.0",
84
+ "commit": "0000000000000000000000000000000000000000",
85
+ "bundle": {
86
+ "path": "source.tar.gz",
87
+ "sha256": "sha256:e2ca891dbf441f867ed135b21b3556ee5cdcd3ec80038f267a3ecff496c5a38b",
88
+ "fixtureBodyBase64": "c2l0ZS1saWJrdW5nZnUtZGV2IHB1YmxpY2F0aW9uIGFyY2hpdmUgZml4dHVyZSBzb3VyY2UgYnVuZGxlCnZlcnNpb246IDAuMS4wCg=="
89
+ }
90
+ },
91
+ "passport": {
92
+ "path": "publication-artifact-passport.json",
93
+ "sha256": "sha256:ca214e2e17c8d3c01565e507e57d5b440943c762199aa8d9de21995940538cea",
94
+ "fixtureBodyBase64": "ewogICJjb250cmFjdCI6ICJrdW5nZnUtYnVpbGRjaGFpbi1wdWJsaWNhdGlvbi1hcnRpZmFjdC1wYXNzcG9ydCIsCiAgInB1YmxpY2F0aW9uIjogInB1YmxpY2F0aW9uLWFyY2hpdmUtZml4dHVyZSIsCiAgInZlcnNpb24iOiAiMC4xLjAiLAogICJzdGF0dXMiOiAiZml4dHVyZSIKfQo="
95
+ },
96
+ "artifacts": [
97
+ {
98
+ "role": "pdf",
99
+ "path": "main.pdf",
100
+ "mediaType": "application/pdf",
101
+ "sha256": "sha256:c1c2020cbdcf0cc339323d2276480a48d9b8d7da9be1d19ab58a0b3c0b7a4fbb",
102
+ "fixtureBodyBase64": "JVBERi0xLjQKJSBzaXRlLWxpYmt1bmdmdS1kZXYgcHVibGljYXRpb24gYXJjaGl2ZSBmaXh0dXJlCjEgMCBvYmogPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDIgMCBSID4+IGVuZG9iagoyIDAgb2JqIDw8IC9UeXBlIC9QYWdlcyAvS2lkcyBbMyAwIFJdIC9Db3VudCAxID4+IGVuZG9iagozIDAgb2JqIDw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMiAwIFIgL01lZGlhQm94IFswIDAgMzAwIDE0NF0gL0NvbnRlbnRzIDQgMCBSID4+IGVuZG9iago0IDAgb2JqIDw8IC9MZW5ndGggNzIgPj4gc3RyZWFtCkJUIC9GMSAxMiBUZiAzNiAxMDAgVGQgKFB1YmxpY2F0aW9uIGFyY2hpdmUgZml4dHVyZSB2MC4xLjApIFRqIEVUCmVuZHN0cmVhbSBlbmRvYmoKeHJlZgowIDUKMDAwMDAwMDAwMCA2NTUzNSBmIAp0cmFpbGVyIDw8IC9Sb290IDEgMCBSIC9TaXplIDUgPj4Kc3RhcnR4cmVmCjM2MAolJUVPRgo="
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ }
108
+ ]
109
+ }
@@ -24,6 +24,7 @@
24
24
  "./public-surface-audit": "./packages/core/public-surface-audit.js",
25
25
  "./logging": "./packages/core/logging.js",
26
26
  "./publication-artifact": "./packages/core/publication-artifact.js",
27
+ "./publication-package": "./packages/core/publication-package.js",
27
28
  "./kfd-gate": "./packages/core/kfd-gate.js",
28
29
  "./release-candidate": "./packages/core/release-candidate.js",
29
30
  "./release-passport": "./packages/core/release-passport.js",
@@ -32,6 +33,7 @@
32
33
  "./buildchain-kfd-claims": "./packages/core/buildchain-kfd-claims.js",
33
34
  "./site/buildchain-site.json": "./dist/site/buildchain-site.json",
34
35
  "./site/site-manifest.json": "./dist/site/site-manifest.json",
36
+ "./site/publication-registry.json": "./dist/site/publication-registry.json",
35
37
  "./site/page-registry.json": "./dist/site/page-registry.json",
36
38
  "./site/capability-registry.json": "./dist/site/capability-registry.json",
37
39
  "./site/cli-registry.json": "./dist/site/cli-registry.json",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "contract": "kungfu-buildchain-site-manifest",
4
- "generatedAt": "2026-07-09T11:53:37.992Z",
5
- "publishedAt": "2026-07-09T11:53:37.992Z",
4
+ "generatedAt": "2026-07-09T16:06:47.861Z",
5
+ "publishedAt": "2026-07-09T16:06:47.861Z",
6
6
  "reproducible": true,
7
7
  "timestampPolicy": "ci-injected",
8
8
  "deterministicInputs": [
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "eca0282a03517a31383b533e27a7ee09c46a8392",
22
+ "sourceRevision": "b93fcd8237e6060596fc6bcb82198e9097356f5b",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "package": {
39
39
  "name": "@kungfu-tech/buildchain",
40
- "version": "2.11.1",
40
+ "version": "2.11.2-alpha.2",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -53,7 +53,7 @@
53
53
  "path": "docs/MAP.md",
54
54
  "plane": "use",
55
55
  "exists": true,
56
- "digest": "sha256:795464d3d84af5698b19a26821dbd16040c258b708e070daaaba6d55e6ad81f7"
56
+ "digest": "sha256:886d073bd37ac655e1ad9659baf161c72ef796b6032c5c3332218ac8198c2aeb"
57
57
  },
58
58
  {
59
59
  "id": "install",
@@ -141,7 +141,7 @@
141
141
  "path": "docs/site-bundle-contract.md",
142
142
  "plane": "use",
143
143
  "exists": true,
144
- "digest": "sha256:6b5bc2ee0f785b16d762f140f14a9163c07caf0d424200c2ececc74f7bb2271c"
144
+ "digest": "sha256:d67a874b356fbfbee9a5d5ece7021fb52b2848347dc6a14f5562c98570096916"
145
145
  },
146
146
  {
147
147
  "id": "migration-inventory",
@@ -173,7 +173,7 @@
173
173
  "path": "docs/cli.md",
174
174
  "plane": "use",
175
175
  "exists": true,
176
- "digest": "sha256:4b31f7ff5330cde8ab32b237f533c7af76463cce570d67dd14669c3a14c83c84"
176
+ "digest": "sha256:81624885888c9e357db128f644f93dcab2286910df426b532730b0141d7cb00d"
177
177
  },
178
178
  {
179
179
  "id": "build-facts",
@@ -267,6 +267,7 @@
267
267
  "release-model.json",
268
268
  "artifact-schemas.json",
269
269
  "badge-endpoint-registry.json",
270
+ "publication-registry.json",
270
271
  "product-mechanism.json",
271
272
  "release-provenance.json",
272
273
  "kfd-upstream-aggregate.json",
@@ -479,6 +479,48 @@
479
479
  "capabilityGroup": "api-cli-reference",
480
480
  "status": "active"
481
481
  },
482
+ {
483
+ "id": "paper-release",
484
+ "path": ".github/workflows/paper-release.yml",
485
+ "inputs": [
486
+ "artifact-name",
487
+ "artifact-retention-days",
488
+ "branch-protection-bypass-apps",
489
+ "branch-protection-bypass-teams",
490
+ "branch-protection-bypass-users",
491
+ "build-command",
492
+ "buildchain-contract-compatibility-policy",
493
+ "buildchain-contract-drift-issue-mode",
494
+ "buildchain-contract-lock-path",
495
+ "buildchain-ref",
496
+ "buildchain-repository",
497
+ "dry-run",
498
+ "github-release",
499
+ "github-release-notes",
500
+ "github-release-title",
501
+ "node-version",
502
+ "package-name",
503
+ "publish-dist-tag",
504
+ "publish-package-set-order",
505
+ "release-passport-impact-json",
506
+ "release-passport-output-dir",
507
+ "release-passport-product-name",
508
+ "required-status-check",
509
+ "setup-node",
510
+ "target-ref",
511
+ "target-sha",
512
+ "toolchain-command",
513
+ "toolchain-digest",
514
+ "toolchain-image",
515
+ "toolchain-type",
516
+ "verify-command",
517
+ "working-directory"
518
+ ],
519
+ "inputCount": 32,
520
+ "surface": "reusable-build",
521
+ "capabilityGroup": "reusable-build",
522
+ "status": "active"
523
+ },
482
524
  {
483
525
  "id": "patrol-daily",
484
526
  "path": ".github/workflows/patrol-daily.yml",
package/docs/MAP.md CHANGED
@@ -31,7 +31,7 @@ workflow, action, and Node API export also carries a `capabilityGroup`,
31
31
  | Reusable Build and Lifecycle | `workflow-registry.json`, `release-model.json` | [`reusable-build-surface.md`](reusable-build-surface.md), [`lifecycle-protocol.md`](lifecycle-protocol.md) |
32
32
  | KFD Trust and Surface Closure | `kfd-claims.json`, `public-surface-audit.json`, `cli-registry.json`, `node-api-registry.json` | [`kfd-support.md`](kfd-support.md), [`release-passport.md`](release-passport.md) |
33
33
  | Site Bundle, Web Surfaces, and Propagation | `buildchain-site.json`, `site-manifest.json`, `page-registry.json`, `release-model.json` | [`site-bundle-contract.md`](site-bundle-contract.md), [`web-surface-deployments.md`](web-surface-deployments.md), [`release-propagation.md`](release-propagation.md) |
34
- | Publication Artifacts | `workflow-registry.json`, `node-api-registry.json`, `manual-registry.json`, `kungfu-buildchain-publication-artifact-registry` | [`publication-artifacts.md`](publication-artifacts.md), [`reusable-build-surface.md`](reusable-build-surface.md) |
34
+ | Publication Artifacts | `publication-registry.json`, `workflow-registry.json`, `node-api-registry.json`, `manual-registry.json`, `kungfu-buildchain-publication-artifact-registry` | [`publication-artifacts.md`](publication-artifacts.md), [`reusable-build-surface.md`](reusable-build-surface.md) |
35
35
  | Distribution Indexes and Badges | `badge-endpoint-registry.json`, `node-api-registry.json`, `manual-registry.json` | [`readme-badges.md`](readme-badges.md), [`homebrew.md`](homebrew.md) |
36
36
  | Build Facts, Observability, and Diagnostics | `cli-registry.json`, `node-api-registry.json`, lifecycle artifacts | [`build-facts.md`](build-facts.md), [`toolkit-observability.md`](toolkit-observability.md), [`consumer-issue-reporting.md`](consumer-issue-reporting.md) |
37
37
  | Governance, Versioning, and Runtime Drift | `buildchain-contract.json`, `workflow-registry.json`, `release-model.json` | [`release-governance.md`](release-governance.md), [`release-flow.md`](release-flow.md), [`versioning.md`](versioning.md), [`runtime-train-validation.md`](runtime-train-validation.md) |
@@ -48,7 +48,7 @@ workflow, action, and Node API export also carries a `capabilityGroup`,
48
48
  | Git/source/version/module/product build facts | `dist/site/node-api-registry.json`, `dist/site/cli-registry.json`, `kungfu-buildchain-module-build-facts`, `kungfu-buildchain-product-build-facts` | [`build-facts.md`](build-facts.md) |
49
49
  | GitHub Release passport/evidence publication | `dist/site/release-model.json`, `dist/site/artifact-schemas.json` | [`release-governance.md`](release-governance.md), [`release-candidate.md`](release-candidate.md) |
50
50
  | release propagation for package/publication/site chains | `dist/site/release-model.json` | [`release-propagation.md`](release-propagation.md) |
51
- | publication artifact manifests, immutable archive registries, source bundles, and paper repository workflows | `dist/site/workflow-registry.json`, `dist/site/node-api-registry.json`, `kungfu-buildchain-publication-artifact-manifest`, `kungfu-buildchain-publication-artifact-registry` | [`publication-artifacts.md`](publication-artifacts.md) |
51
+ | publication artifact manifests, immutable archive registries, source bundles, and paper repository workflows | `dist/site/publication-registry.json`, `dist/site/workflow-registry.json`, `dist/site/node-api-registry.json`, `kungfu-buildchain-publication-artifact-manifest`, `kungfu-buildchain-publication-artifact-registry` | [`publication-artifacts.md`](publication-artifacts.md) |
52
52
  | Generated badge bundles, README badge blocks, and badge facts | `dist/site/node-api-registry.json`, `dist/site/manual-registry.json`, `kungfu-buildchain-badge-bundle-facts`, `kungfu-buildchain-readme-badge-facts` | [`readme-badges.md`](readme-badges.md) |
53
53
  | Homebrew tap distribution indexes | `dist/site/node-api-registry.json`, `dist/site/buildchain-contract.json` | [`homebrew.md`](homebrew.md) |
54
54
  | Buildchain CLI manual | `dist/site/cli-registry.json`, `dist/site/manual-registry.json` | [`cli.md`](cli.md) |
@@ -87,7 +87,7 @@ replace them.
87
87
  | How do I detect, register, audit, witness, or query KFD-3 product surfaces? | [`kfd-support.md`](kfd-support.md) + [`cli.md`](cli.md) | verify/use | stable |
88
88
  | How do I keep `@v2` floating refs while detecting Buildchain contract drift? | [`reusable-build-surface.md`](reusable-build-surface.md#floating-ref-contract-lock) | verify/use | stable |
89
89
  | How do I propagate finalized upstream releases to downstream package/site PRs? | [`release-propagation.md`](release-propagation.md) | use | preview |
90
- | How do paper or report repositories publish PDFs, metadata, source bundles, and site-consumable manifests? | [`publication-artifacts.md`](publication-artifacts.md) | use | stable |
90
+ | How do paper or report repositories publish PDFs, metadata, source bundles, site-consumable manifests, npm packages, and GitHub Releases? | [`publication-artifacts.md`](publication-artifacts.md) | use | stable |
91
91
  | How do I generate KFD / Release Passport badge bundles without hand-maintaining Markdown? | [`readme-badges.md`](readme-badges.md) + [`cli.md`](cli.md) | use | stable |
92
92
  | How do I generate and verify a Homebrew tap from release passport evidence? | [`homebrew.md`](homebrew.md) + [`cli.md`](cli.md) | use/verify | stable |
93
93
  | How do I prove a PR-stage reusable build is the artifact source promoted later? | [`release-candidate.md`](release-candidate.md) + [`reusable-build-surface.md`](reusable-build-surface.md) | verify | stable |
package/docs/cli.md CHANGED
@@ -398,6 +398,19 @@ buildchain publication-artifact manifest \
398
398
  --json
399
399
  ```
400
400
 
401
+ Generate the Buildchain-owned npm paper package contents from declared
402
+ publication facts:
403
+
404
+ ```bash
405
+ buildchain publication-artifact npm-package --json
406
+ ```
407
+
408
+ This command reads `project.type = "publication-artifact"`,
409
+ `publication.version`, and `[publish] kind = "npm-paper-package"` plus
410
+ `publish.package`; it writes `.buildchain/publication/npm-package` by default.
411
+ The `paper-release.yml@v2` reusable workflow uses the same command before
412
+ running the standard npm publish transaction.
413
+
401
414
  The command writes `.buildchain/publication/publication-artifact.json`,
402
415
  `.buildchain/publication/publication-artifact-passport.json`, a source bundle,
403
416
  and, when `[publication.archive]` is configured,
@@ -50,6 +50,11 @@ image = "ghcr.io/kungfu-systems/build-images/latex-pdf-builder"
50
50
  digest = "sha256:c20f3809e96836c1c78e97c76939d12f1de3fed0ea9b7c40c43332ec2ea480f8"
51
51
  command = "latexmk -pdf -outdir=_build paper/main.tex"
52
52
 
53
+ [publish]
54
+ kind = "npm-paper-package"
55
+ package = "@kungfu-tech/paper-observer-declared-timelines"
56
+ auth = "trusted-publishing"
57
+
53
58
  [lifecycle.build]
54
59
  command = "make pdf"
55
60
 
@@ -91,9 +96,16 @@ for compatibility, but the passport records it as lower trust because
91
96
  Buildchain can record the command boundary without proving the compiler or
92
97
  LaTeX distribution digest.
93
98
 
99
+ `publish.kind = "npm-paper-package"` declares that Buildchain, not the consumer
100
+ repository, owns the standard paper npm package shape and release transaction
101
+ mechanics. `publish.package` is the public npm package that contains the PDF,
102
+ publication manifest, publication passport, optional archive registry, source
103
+ bundle, and declared metadata files.
104
+
94
105
  ## Reusable Workflow
95
106
 
96
- Consumer repositories can call the Buildchain wrapper directly:
107
+ Consumer repositories that only need to build and upload paper evidence can
108
+ call the build-only wrapper directly:
97
109
 
98
110
  ```yaml
99
111
  jobs:
@@ -106,7 +118,7 @@ jobs:
106
118
  buildchain-contract-lock-path: .buildchain/contract-lock.json
107
119
  ```
108
120
 
109
- The workflow:
121
+ The build-only workflow:
110
122
 
111
123
  - resolves the Buildchain runtime and checks the floating contract lock before
112
124
  any paper build runs;
@@ -126,10 +138,76 @@ The workflow:
126
138
  - uploads one GitHub artifact containing the PDF, manifest, passport, optional
127
139
  registry, and source bundle.
128
140
 
129
- The wrapper is build-only. It does not publish npm packages, deploy web pages,
130
- or create GitHub Releases. Release publication can be layered later by a
131
- repository-specific governance workflow that attaches the generated manifest
132
- and passport as release assets.
141
+ It does not publish npm packages, deploy web pages, or create GitHub Releases.
142
+
143
+ ## Paper Release Preset
144
+
145
+ Paper repositories that publish a versioned npm package should use the
146
+ Buildchain-managed release preset instead of copying npm transaction scripts or
147
+ promotion YAML:
148
+
149
+ ```yaml
150
+ name: Paper Release
151
+
152
+ on:
153
+ push:
154
+ branches:
155
+ - alpha/v1/v1.0
156
+ - release/v1/v1.0
157
+ workflow_dispatch:
158
+ inputs:
159
+ buildchain-ref:
160
+ description: "Temporary Buildchain runtime ref"
161
+ required: false
162
+ default: ""
163
+
164
+ jobs:
165
+ paper-release:
166
+ uses: kungfu-systems/buildchain/.github/workflows/paper-release.yml@v2
167
+ permissions:
168
+ contents: write
169
+ id-token: write
170
+ issues: write
171
+ with:
172
+ buildchain-ref: ${{ inputs.buildchain-ref || '' }}
173
+ toolchain-type: config
174
+ verify-command: make check
175
+ buildchain-contract-lock-path: .buildchain/contract-lock.json
176
+ ```
177
+
178
+ The preset:
179
+
180
+ - resolves the same floating Buildchain runtime and contract lock as the build
181
+ workflow;
182
+ - builds the PDF through the declared pinned LaTeX Docker toolchain or custom
183
+ command;
184
+ - verifies the paper repository;
185
+ - writes the publication manifest, publication passport, optional archive
186
+ registry, and source bundle;
187
+ - synthesizes an npm package from `[publication]` and `[publish]` declarations
188
+ under `.buildchain/publication/npm-package`;
189
+ - computes npm-style `sha512` integrity from `npm pack --dry-run` and passes
190
+ it as `publish-required-artifacts-json`;
191
+ - creates a `publish-gate/<alpha|release>/.../<version>` source lock for the
192
+ channel commit and requires `promote-buildchain-ref` to verify that lock
193
+ before any publish side effect;
194
+ - publishes the package through npm Trusted Publishing;
195
+ - writes Buildchain release/passport evidence; and
196
+ - creates or updates the exact-version GitHub Release by default.
197
+
198
+ Consumers can opt out of the GitHub Release with `github-release: false`, but
199
+ the default is on so downstream release propagation can observe
200
+ `release.published` without hand-written `gh release` steps.
201
+
202
+ For npm Trusted Publishing, register the consumer workflow file that calls this
203
+ preset, for example `.github/workflows/paper-release.yml`, against the declared
204
+ package in npm. The trusted publisher is the consumer repository and workflow
205
+ file; the implementation still runs inside Buildchain's reusable workflow.
206
+
207
+ Standard paper repositories should not carry local copies of
208
+ `scripts/npm-publish-transaction.mjs`, package-generation scripts, or
209
+ promotion/ref-lock YAML. If the default package shape is insufficient, extend
210
+ Buildchain rather than forking the mechanics into each paper repository.
133
211
 
134
212
  ## CLI And Node API
135
213
 
@@ -139,6 +217,12 @@ Generate the publication manifest locally or in CI:
139
217
  buildchain publication-artifact manifest --source-sha "$(git rev-parse HEAD)" --json
140
218
  ```
141
219
 
220
+ Generate the npm package contents after the manifest exists:
221
+
222
+ ```sh
223
+ buildchain publication-artifact npm-package --json
224
+ ```
225
+
142
226
  Node API:
143
227
 
144
228
  ```js
@@ -146,6 +230,11 @@ import {
146
230
  collectPublicationArtifact,
147
231
  writePublicationArtifact,
148
232
  } from "@kungfu-tech/buildchain/publication-artifact";
233
+
234
+ import {
235
+ collectPublicationPackageFacts,
236
+ preparePublicationNpmPackage,
237
+ } from "@kungfu-tech/buildchain/publication-package";
149
238
  ```
150
239
 
151
240
  `writePublicationArtifact()` is the single implementation used by the CLI and
@@ -176,6 +265,24 @@ without rebuilding old PDFs from the latest npm package or paper source.
176
265
  A downstream papers site should treat the publication manifest as the single
177
266
  fact source for the artifact. The site owns rendering and navigation; it should
178
267
  not reinterpret the paper repository as a web deployment source.
268
+ For registry-level routing, sites should first consume the package-owned
269
+ Buildchain fact source:
270
+
271
+ ```text
272
+ node_modules/@kungfu-tech/buildchain/dist/site/publication-registry.json
273
+ ```
274
+
275
+ or the equivalent package export:
276
+
277
+ ```js
278
+ import registry from "@kungfu-tech/buildchain/site/publication-registry.json" with { type: "json" };
279
+ ```
280
+
281
+ That registry uses the `kungfu-buildchain-publication-release-registry`
282
+ contract. It separates mutable canonical/latest reader routes from immutable
283
+ version prefixes, publication artifacts, source bundles, and passport evidence
284
+ so site repositories can render `/papers/**` without maintaining a parallel
285
+ fixture truth source.
179
286
 
180
287
  For `paper-observer-declared-timelines`, the expected adoption path is:
181
288
 
@@ -13,6 +13,7 @@ release mechanics, command registry, workflow registry, or artifact schema.
13
13
  dist/site/
14
14
  buildchain-site.json
15
15
  site-manifest.json
16
+ publication-registry.json
16
17
  capability-registry.json
17
18
  cli-registry.json
18
19
  manual-registry.json
@@ -65,6 +66,10 @@ inputs, action inputs, site pages, and documentation command references, then
65
66
  compares those sets with `cli-registry.json`, `workflow-registry.json`, and
66
67
  `page-registry.json`. Buildchain's self-check fails closed when an enumerable
67
68
  public surface is missing from the generated registries.
69
+ `publication-registry.json` is the package-owned publication archive registry
70
+ for downstream papers surfaces. Site repositories can render latest reader
71
+ routes, immutable version artifact routes, source bundles, and publication
72
+ passport links from this file instead of keeping their own fixture registry.
68
73
 
69
74
  ## Timestamp and Reproducibility Policy
70
75
 
@@ -138,6 +143,7 @@ The P0 bundle includes:
138
143
  - complete markdown page registry for public Buildchain docs, action manuals,
139
144
  Node API overview, and fixtures;
140
145
  - site manifest;
146
+ - publication archive registry for downstream papers surfaces;
141
147
  - CLI command registry;
142
148
  - manual registry for packaged agent-facing documentation;
143
149
  - Node API registry for public package exports;
@@ -160,6 +166,11 @@ schema metadata without breaking existing consumers.
160
166
  release chain model. The site bundle exposes that document and the
161
167
  `release-propagation` CLI entry so downstream sites can render the current
162
168
  Buildchain-owned propagation contract instead of hand-writing it.
169
+ `publication-registry.json` is the static site-consumption entrypoint for
170
+ publication archive pages. It uses the
171
+ `kungfu-buildchain-publication-release-registry` contract and declares the
172
+ mutable latest/canonical routes separately from append-only immutable version
173
+ prefixes.
163
174
 
164
175
  ## Rendering Boundary
165
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "2.11.1",
3
+ "version": "2.11.2-alpha.2",
4
4
  "private": false,
5
5
  "description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
6
6
  "repository": "https://github.com/kungfu-systems/buildchain",
@@ -27,6 +27,7 @@
27
27
  "./public-surface-audit": "./packages/core/public-surface-audit.js",
28
28
  "./logging": "./packages/core/logging.js",
29
29
  "./publication-artifact": "./packages/core/publication-artifact.js",
30
+ "./publication-package": "./packages/core/publication-package.js",
30
31
  "./kfd-gate": "./packages/core/kfd-gate.js",
31
32
  "./release-candidate": "./packages/core/release-candidate.js",
32
33
  "./release-passport": "./packages/core/release-passport.js",
@@ -35,6 +36,7 @@
35
36
  "./buildchain-kfd-claims": "./packages/core/buildchain-kfd-claims.js",
36
37
  "./site/buildchain-site.json": "./dist/site/buildchain-site.json",
37
38
  "./site/site-manifest.json": "./dist/site/site-manifest.json",
39
+ "./site/publication-registry.json": "./dist/site/publication-registry.json",
38
40
  "./site/page-registry.json": "./dist/site/page-registry.json",
39
41
  "./site/capability-registry.json": "./dist/site/capability-registry.json",
40
42
  "./site/cli-registry.json": "./dist/site/cli-registry.json",
@@ -16,6 +16,7 @@ const SUPPORTED_VERSION_NEXT = new Set(["auto", "manual"]);
16
16
  const SUPPORTED_PROJECT_TYPES = new Set(["package", "web-surface", "infra-contract", "distribution-index", "publication-artifact"]);
17
17
  const SUPPORTED_PUBLISH_MODES = new Set(["publish-final-version", "promote-existing-version"]);
18
18
  const SUPPORTED_PUBLISH_AUTH = new Set(["trusted-publishing", "npm-token"]);
19
+ const SUPPORTED_PUBLISH_KINDS = new Set(["npm-package", "npm-paper-package"]);
19
20
  const SUPPORTED_PACKAGE_SET_ORDER = new Set(["as-provided", "platforms-first-main-last"]);
20
21
  const SUPPORTED_NATIVE_COMPILER_CACHE = new Set(["auto", "ccache", "sccache", "none"]);
21
22
  const WEB_SURFACE_CHANNELS = ["preview", "staging", "production"];
@@ -338,13 +339,19 @@ function normalizePublishSection(publish) {
338
339
  if (mode === "promote-existing-version" && auth !== "npm-token") {
339
340
  throw new Error('publish.mode = "promote-existing-version" requires publish.auth = "npm-token"');
340
341
  }
342
+ const kind = publish.kind === undefined
343
+ ? ""
344
+ : assertString(publish.kind, "publish.kind");
345
+ if (kind && !SUPPORTED_PUBLISH_KINDS.has(kind)) {
346
+ throw new Error("publish.kind must be one of npm-package or npm-paper-package");
347
+ }
341
348
  const packageSetOrder = publish.package_set_order === undefined
342
349
  ? "as-provided"
343
350
  : assertString(publish.package_set_order, "publish.package_set_order");
344
351
  if (!SUPPORTED_PACKAGE_SET_ORDER.has(packageSetOrder)) {
345
352
  throw new Error("publish.package_set_order must be one of as-provided or platforms-first-main-last");
346
353
  }
347
- return {
354
+ const normalized = {
348
355
  mode,
349
356
  auth,
350
357
  distTag: publish.dist_tag === undefined
@@ -355,6 +362,13 @@ function normalizePublishSection(publish) {
355
362
  ? ""
356
363
  : assertString(publish.main_package, "publish.main_package"),
357
364
  };
365
+ if (publish.kind !== undefined) {
366
+ normalized.kind = kind;
367
+ }
368
+ if (publish.package !== undefined) {
369
+ normalized.package = assertString(publish.package, "publish.package");
370
+ }
371
+ return normalized;
358
372
  }
359
373
 
360
374
  function normalizeProjectSection(project) {
@@ -42,6 +42,7 @@ export const BUILDCHAIN_AGENT_MANUALS = Object.freeze([
42
42
  const SITE_CONTRACT_FILES = Object.freeze([
43
43
  "dist/site/buildchain-site.json",
44
44
  "dist/site/site-manifest.json",
45
+ "dist/site/publication-registry.json",
45
46
  "dist/site/page-registry.json",
46
47
  "dist/site/capability-registry.json",
47
48
  "dist/site/cli-registry.json",
@@ -268,6 +269,7 @@ export function createBuildchainPublicClaimDefinitions() {
268
269
  "dist/site/node-api-registry.json",
269
270
  "dist/site/page-registry.json",
270
271
  "dist/site/capability-registry.json",
272
+ "dist/site/publication-registry.json",
271
273
  "dist/site/buildchain-site.json",
272
274
  "dist/site/site-manifest.json",
273
275
  ],
@@ -111,6 +111,12 @@ export {
111
111
  validateReleaseCandidatePassport,
112
112
  } from "./release-candidate.js";
113
113
 
114
+ export {
115
+ PUBLICATION_NPM_PACKAGE_CONTRACT,
116
+ collectPublicationPackageFacts,
117
+ preparePublicationNpmPackage,
118
+ } from "./publication-package.js";
119
+
114
120
  export {
115
121
  ARTIFACT_PASSPORT_LOCATOR_CONTRACT,
116
122
  ARTIFACT_PASSPORT_POINTER_CONTRACT,
@@ -1,9 +1,10 @@
1
1
  import crypto from "node:crypto";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
- import { createRequire } from "node:module";
5
4
 
6
- const require = createRequire(import.meta.url);
5
+ import kfdPackageJson from "@kungfu-tech/kfd/package.json" with { type: "json" };
6
+ import kfdStandards from "@kungfu-tech/kfd/standards.json" with { type: "json" };
7
+ import kfdTrustTaxonomySchema from "@kungfu-tech/kfd/schemas/kfd-2/trust-taxonomy.schema.json" with { type: "json" };
7
8
 
8
9
  export const KFD1_RELEASE_GATE_CONTRACT = "kungfu-buildchain-kfd-1-release-gate";
9
10
  export const KFD1_WITNESS_SET_CONTRACT = "kungfu-buildchain-kfd-1-witness-set";
@@ -54,8 +55,21 @@ export function sha256File(filePath) {
54
55
  return crypto.createHash("sha256").update(fs.readFileSync(filePath)).digest("hex");
55
56
  }
56
57
 
58
+ const bundledKfdJsonExports = new Map([
59
+ ["@kungfu-tech/kfd/package.json", kfdPackageJson],
60
+ ["@kungfu-tech/kfd/standards.json", kfdStandards],
61
+ ["@kungfu-tech/kfd/schemas/kfd-2/trust-taxonomy.schema.json", kfdTrustTaxonomySchema],
62
+ ]);
63
+
64
+ function cloneJson(value) {
65
+ return JSON.parse(JSON.stringify(value));
66
+ }
67
+
57
68
  function readJsonPackageExport(exportPath) {
58
- return JSON.parse(fs.readFileSync(require.resolve(exportPath), "utf8"));
69
+ if (!bundledKfdJsonExports.has(exportPath)) {
70
+ throw new Error(`KFD metadata package export is not bundled into Buildchain release gates: ${exportPath}`);
71
+ }
72
+ return cloneJson(bundledKfdJsonExports.get(exportPath));
59
73
  }
60
74
 
61
75
  function tryReadJsonPackageExport(exportPath) {