@forgeax/engine-pack 0.1.20 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +159 -46
  2. package/dist/__tests__/inventory-schema.test.d.ts +2 -0
  3. package/dist/__tests__/inventory-schema.test.d.ts.map +1 -0
  4. package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts +2 -0
  5. package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts.map +1 -0
  6. package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts +2 -0
  7. package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts.map +1 -0
  8. package/dist/__tests__/parameterized-pack.unit.test.d.ts +2 -0
  9. package/dist/__tests__/parameterized-pack.unit.test.d.ts.map +1 -0
  10. package/dist/__tests__/scanner-blacklist.test.d.ts +2 -0
  11. package/dist/__tests__/scanner-blacklist.test.d.ts.map +1 -0
  12. package/dist/build.d.ts +9 -4
  13. package/dist/build.d.ts.map +1 -1
  14. package/dist/build.mjs +3317 -804
  15. package/dist/build.mjs.map +1 -1
  16. package/dist/builtin.mjs +37 -4
  17. package/dist/builtin.mjs.map +1 -1
  18. package/dist/catalog-builder.d.ts.map +1 -1
  19. package/dist/cli-asset.d.ts.map +1 -1
  20. package/dist/cli-asset.mjs +1368 -850
  21. package/dist/cli-asset.mjs.map +1 -1
  22. package/dist/deriveAssetName.d.ts +11 -7
  23. package/dist/deriveAssetName.d.ts.map +1 -1
  24. package/dist/evidence/material-cook.d.ts.map +1 -1
  25. package/dist/evidence/source-inventory.d.ts.map +1 -1
  26. package/dist/guid.d.ts +15 -0
  27. package/dist/guid.d.ts.map +1 -1
  28. package/dist/guid.mjs +53 -5
  29. package/dist/guid.mjs.map +1 -1
  30. package/dist/index.d.ts +3 -1
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.mjs +1255 -561
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/inventory/binding.d.ts +6 -0
  35. package/dist/inventory/binding.d.ts.map +1 -0
  36. package/dist/inventory/declaration.d.ts +24 -0
  37. package/dist/inventory/declaration.d.ts.map +1 -0
  38. package/dist/inventory/index.d.ts +3 -0
  39. package/dist/inventory/index.d.ts.map +1 -0
  40. package/dist/inventory/sync.d.ts +5 -0
  41. package/dist/inventory/sync.d.ts.map +1 -0
  42. package/dist/material-cook.mjs +3 -1
  43. package/dist/material-cook.mjs.map +1 -1
  44. package/dist/name.mjs +4 -7
  45. package/dist/name.mjs.map +1 -1
  46. package/dist/package-finalizer.d.ts +2 -20
  47. package/dist/package-finalizer.d.ts.map +1 -1
  48. package/dist/parameterized-pack-node.d.ts +26 -0
  49. package/dist/parameterized-pack-node.d.ts.map +1 -0
  50. package/dist/parameterized-pack-node.mjs +11093 -0
  51. package/dist/parameterized-pack-node.mjs.map +1 -0
  52. package/dist/parameterized-pack.d.ts +233 -0
  53. package/dist/parameterized-pack.d.ts.map +1 -0
  54. package/dist/resolve-asset-source.d.ts +1 -3
  55. package/dist/resolve-asset-source.d.ts.map +1 -1
  56. package/dist/resolve-asset-source.mjs +6 -81
  57. package/dist/resolve-asset-source.mjs.map +1 -1
  58. package/dist/runtime.mjs +77 -7
  59. package/dist/runtime.mjs.map +1 -1
  60. package/dist/scanner.d.ts +19 -8
  61. package/dist/scanner.d.ts.map +1 -1
  62. package/dist/scanner.mjs +1169 -690
  63. package/dist/scanner.mjs.map +1 -1
  64. package/dist/schema-compiled.d.ts.map +1 -1
  65. package/dist/schema.mjs +79 -7
  66. package/dist/schema.mjs.map +1 -1
  67. package/dist/scriptable-pack-node.d.ts +8 -32
  68. package/dist/scriptable-pack-node.d.ts.map +1 -1
  69. package/dist/scriptable-pack-node.mjs +576 -1021
  70. package/dist/scriptable-pack-node.mjs.map +1 -1
  71. package/dist/scriptable-pack-worker.mjs +29 -11
  72. package/dist/scriptable-pack-worker.mjs.map +1 -1
  73. package/dist/scriptable-pack.d.ts +19 -532
  74. package/dist/scriptable-pack.d.ts.map +1 -1
  75. package/dist/scriptable-pack.mjs +1042 -527
  76. package/dist/scriptable-pack.mjs.map +1 -1
  77. package/package.json +7 -7
  78. package/schema/meta.schema.json +1 -1
  79. package/schema/pack.schema.json +76 -6
  80. package/src/__tests__/guid-collision.unit.test.ts +18 -9
  81. package/src/__tests__/inventory-schema.test.ts +109 -0
  82. package/src/__tests__/pack.unit.test.ts +1 -238
  83. package/src/__tests__/package-finalizer.contract.test.ts +55 -0
  84. package/src/__tests__/parameterized-pack-authoring-gateway.unit.test.ts +249 -0
  85. package/src/__tests__/parameterized-pack-scanner.unit.test.ts +123 -0
  86. package/src/__tests__/parameterized-pack.unit.test.ts +266 -0
  87. package/src/__tests__/resolve-asset-source.test.ts +15 -98
  88. package/src/__tests__/scanner-blacklist.test.ts +55 -0
  89. package/src/__tests__/scanner-inventory.contract.test.ts +14 -15
  90. package/src/__tests__/scanner-inventory.test.ts +24 -12
  91. package/src/__tests__/scriptable-pack-cli.integration.test.ts +4 -9
  92. package/src/__tests__/topology.unit.test.ts +23 -0
  93. package/src/build.ts +28 -18
  94. package/src/catalog-builder.ts +61 -34
  95. package/src/cli-asset.ts +70 -85
  96. package/src/deriveAssetName.ts +14 -13
  97. package/src/evidence/material-cook.ts +3 -1
  98. package/src/evidence/source-inventory.ts +34 -21
  99. package/src/guid.ts +65 -4
  100. package/src/index.ts +12 -11
  101. package/src/inventory/binding.ts +25 -0
  102. package/src/inventory/declaration.ts +168 -0
  103. package/src/inventory/index.ts +18 -0
  104. package/src/inventory/sync.ts +22 -0
  105. package/src/package-finalizer.ts +2 -42
  106. package/src/parameterized-pack-node.ts +1968 -0
  107. package/src/parameterized-pack.ts +1493 -0
  108. package/src/resolve-asset-source.ts +4 -76
  109. package/src/scanner.ts +241 -59
  110. package/src/schema-compiled.ts +2 -0
  111. package/src/scriptable-pack-node.ts +111 -722
  112. package/src/scriptable-pack-worker.ts +48 -16
  113. package/src/scriptable-pack.ts +27 -939
  114. package/dist/.tsbuildinfo +0 -1
  115. package/dist/__tests__/load-asset-config.test.d.ts +0 -2
  116. package/dist/__tests__/load-asset-config.test.d.ts.map +0 -1
  117. package/dist/__tests__/scriptable-pack.test-d.d.ts +0 -2
  118. package/dist/__tests__/scriptable-pack.test-d.d.ts.map +0 -1
  119. package/dist/__tests__/scriptable-pack.unit.test.d.ts +0 -2
  120. package/dist/__tests__/scriptable-pack.unit.test.d.ts.map +0 -1
  121. package/dist/config.d.ts +0 -6
  122. package/dist/config.d.ts.map +0 -1
  123. package/dist/config.mjs +0 -29
  124. package/dist/config.mjs.map +0 -1
  125. package/src/__tests__/load-asset-config.test.ts +0 -121
  126. package/src/__tests__/scriptable-pack.test-d.ts +0 -131
  127. package/src/__tests__/scriptable-pack.unit.test.ts +0 -789
  128. package/src/config.ts +0 -36
package/README.md CHANGED
@@ -14,6 +14,72 @@ recook 并重新验证,不手改 cooked payload。
14
14
 
15
15
  ## Authoring and recovery index
16
16
 
17
+ ## Parameterized, GUID-less authoring
18
+
19
+ The current authoring contract keeps one Pack identity and derives every output
20
+ identity from the author-owned pair `(packageId, sourceKey)`:
21
+
22
+ ```ts
23
+ import { AssetGuid, definePack, definePackageId } from '@forgeax/engine/pack/source';
24
+ import { ok } from '@forgeax/engine/types';
25
+
26
+ const packageId = definePackageId('01900000-0000-7000-8000-000000000001');
27
+
28
+ export default definePack({
29
+ schemaVersion: '2.0.0',
30
+ packageId,
31
+ build: ({ packageId: subjectId }) =>
32
+ ok({
33
+ 'mesh/main': { kind: 'mesh', materialSlots: [] },
34
+ 'scene/main': {
35
+ kind: 'scene',
36
+ entities: [],
37
+ mounts: [],
38
+ mesh: AssetGuid.format(AssetGuid.derive(subjectId, 'mesh/main')),
39
+ },
40
+ }),
41
+ });
42
+ ```
43
+
44
+ `definePack` omits `parameters` for the default zero-parameter path; its build
45
+ context then has `packageId` and `readByGuid()` only. A non-empty `parameters`
46
+ array opts into typed `values`, defaults, numeric bounds, enum choices, vectors,
47
+ colors, and asset-GUID kind constraints. The build return object is the whole
48
+ current output topology: there is no output manifest, `output.add()`,
49
+ `externalAssets`, or per-output GUID field.
50
+
51
+ Authoring `pack.json` uses schema `3.0.0`. A direct document stores
52
+ `assets[sourceKey]`; an instance stores only its own `packageId`, `parent`, and
53
+ sparse `values`. These branches are mutually exclusive. Every instance has an
54
+ independent package identity, while the parent chain is resolved through the
55
+ current Source Index. The authoring form is lowered to the ordinary Pack v2
56
+ transport before runtime; player code still calls `loadByGuid()` and never
57
+ executes TypeScript or understands parameters.
58
+
59
+ `@forgeax/engine-pack/build` exposes the filesystem gateway
60
+ `createFileSystemParameterizedPackAuthoringGateway()`. Its read operations are
61
+ `asset.list`, `asset.inspect`, `asset.resolve`, and `asset.verify`; mutations
62
+ are `asset-source.create`, `asset-source.clone`,
63
+ `asset-source.create-instance`, `asset-source.apply-values`,
64
+ `asset-source.rebuild`, and `asset-source.cold-cook`. Every operation carries a
65
+ caller-minted `requestId`; source mutations are confined to the game root,
66
+ atomic, and CAS-protected by `expectedRevision`.
67
+
68
+ `AssetGuid.derive(packageId, sourceKey)` is the browser-safe UUIDv5 projection.
69
+ `PackageId` and `AssetGuid` are distinct brands, and a derived identity alone
70
+ reports only `identity`; `present` and `ready` require current materialization
71
+ and validated Pack/artifact evidence respectively.
72
+
73
+ ## 灯光 Pack/Catalog 入口
74
+
75
+ 三条最短入口:
76
+
77
+ 1. scene Pack 只保存 `RectAreaLight`、`SpotLight`、`LightProbe` 的 authored 字段,并把 `iesProfile`/`cookie` 写入 `refs`。
78
+ 2. `IesProfileAsset` 由 `iesImporter` 在 build-time 生成 fixed cooked payload;`SpotLight.cookie` 仍是普通 `TextureAsset`。
79
+ 3. runtime 按 GUID 读取 Catalog/Pack 记录;`current`、`accepted`、`lastKnownGood`、`verified` 分层检查,缺失时回到 producer 重建。
80
+
81
+ Pack 是 published 边界,不是 author authority、runtime registry 或 GPU owner。源文件与 Meta 保留 authored identity,DDC/Catalog 是可丢弃或可重建的 projection;`sourceKey` 只表达 producer 语义,不是 URL 替身。
82
+
17
83
  ## Material contract index
18
84
 
19
85
  Pack is the single material-cook and publication boundary. It publishes one
@@ -44,12 +110,13 @@ recreate that table.
44
110
 
45
111
  ## ScriptablePack in 30 seconds
46
112
 
47
- The public happy path is: declare GUIDs in a `*.pack.ts`, run the Vite Pack
48
- producer, publish Pack v2 plus the Catalog, then call
49
- `AssetRegistry.loadByGuid(guid)`. The durable consumer matrix is the exported
113
+ The public happy path is: declare one stable `packageId` and return a complete
114
+ `sourceKey -> Asset` topology from `definePack`, run the Vite Pack producer,
115
+ publish Pack v2 plus the Catalog, then call `AssetRegistry.loadByGuid(guid)`.
116
+ The durable consumer matrix is the exported
50
117
  `SCRIPTABLE_PACK_ASSET_KINDS` list: mesh, material, scene, texture, equirect,
51
118
  sampler, font, render-pipeline, tileset, video, skeleton, skin,
52
- animation-clip, animation-graph, audio, and particle-effect.
119
+ animation-clip, animation-graph, audio, particle-effect, and ies-profile.
53
120
 
54
121
  Every successful row keeps its `sourceKey` identity, dependency `refs`, and
55
122
  producer-owned `artifacts`. Audio keeps `mediaType` and bytes; particle effects
@@ -157,46 +224,59 @@ root barrel. The root entry remains the build-time scanner/evidence surface.
157
224
 
158
225
  ## Quick start
159
226
 
160
- ### ScriptablePack source
227
+ ### Parameterized ScriptablePack source
161
228
 
162
- Use `@forgeax/engine-pack/source` when one trusted TypeScript source declares and builds a multi-asset package. The definition owns `packageId`, every output `guid`, `sourceKey`, `kind`, optional display `name`, and the scene component schema needed to externalize scene refs. `build(reader)` returns ordinary typed Assets keyed by the same `sourceKey` set; it cannot publish, mutate Catalog, or mint identity.
229
+ Use `@forgeax/engine-pack/source` when one trusted TypeScript source declares
230
+ and builds a multi-asset package. The definition owns one stable `packageId`;
231
+ each build returns ordinary typed Assets keyed by author-owned `sourceKey`.
232
+ The Pack boundary derives every output GUID as
233
+ `AssetGuid.derive(packageId, sourceKey)`, so the source does not contain a
234
+ per-output GUID table, `externalAssets`, or an output writer.
163
235
 
164
236
  ```ts
165
- import type { ScriptablePackDefinition } from '@forgeax/engine-pack/source';
166
- import { Camera } from '@forgeax/engine-render';
167
- import { Transform } from '@forgeax/engine-scene';
237
+ import { AssetGuid, definePackageId, definePack } from '@forgeax/engine/pack/source';
238
+ import { ok } from '@forgeax/engine/types';
239
+
240
+ const packageId = definePackageId('01900000-0000-7000-8000-000000000001');
168
241
 
169
- export default {
170
- schemaVersion: '1.0.0',
242
+ export default definePack({
243
+ schemaVersion: '2.0.0',
171
244
  packageId,
172
- assets: {
173
- mesh: { guid: meshGuid, kind: 'mesh', name: 'Generated Mesh' },
174
- scene: { guid: sceneGuid, kind: 'scene', name: 'Generated Scene' },
175
- },
176
- sceneComponents: [Transform, Camera],
177
- externalAssets: { material: materialGuid },
178
- build: async (assets) => ({ ok: true, value: { mesh, scene } }),
179
- } satisfies ScriptablePackDefinition;
245
+ build: ({ packageId: subjectId }) =>
246
+ ok({
247
+ 'mesh/main': { kind: 'mesh', payload: {}, refs: [] },
248
+ 'scene/main': {
249
+ kind: 'scene',
250
+ payload: { mesh: AssetGuid.derive(subjectId, 'mesh/main') },
251
+ refs: [],
252
+ },
253
+ }),
254
+ });
180
255
  ```
181
256
 
182
- `sceneComponents` is optional for packs that never produce a `scene`. When a
183
- scene is produced, declare every component used by its entities in the same
184
- definition; the isolated Pack worker projects the tokens to a neutral,
185
- serializable schema. A scene component missing from that declaration is a
186
- fail-closed producer error, not a lookup into a global World schema.
257
+ Omitting `parameters` selects the zero-parameter path; a non-empty
258
+ `parameters` array adds typed `values`, defaults, ranges, enum choices,
259
+ vectors, colors, and asset-GUID constraints. The isolated Pack worker passes
260
+ only serializable authoring data to the build and never exposes filesystem or
261
+ runtime state.
187
262
 
188
263
  `forgeax-engine-remote-asset meta <source.pack.ts> --json` executes module initialization, validates the default export, and projects canonical Meta without calling `build`. `@forgeax/engine-pack/source-node` accepts a host executor with `load` and optional `dispose`; `timeoutMs` bounds module initialization and `buildTimeoutMs` bounds one `build(reader)` call. A build timeout returns one structured `pack-source-load-failed` Result with `detail.phase: 'build'`, the configured `timeoutMs`, and deterministic cleanup of the isolated worker and compile root.
189
264
 
190
265
  The default worker executes the complete relative TypeScript module closure on the supported Node floor, including Node 22 hosts that do not load `.ts` files directly. It transpiles that closure into a disposable ESM directory, resolves bare imports through the source project's nearest `node_modules`, and removes the directory when the worker is disposed. Bulk producers use the internal `createScriptablePackModuleExecutorPool()` with two recyclable workers; a pooled lease is released after metadata projection or one build, so a generation never retains one live Worker-backed definition per source.
191
266
 
192
267
  > [!IMPORTANT]
193
- > Source authoring is an explicit Node contract. Every gateway call carries a caller-minted `requestId`; mutations may carry `expectedRevision` for SHA-256 CAS. The filesystem port confines paths to one game root and atomically replaces only `canonical-v1` scaffolds. Arbitrary valid TypeScript remains inspectable and rebuildable, but unsupported structural edits fail closed with stable `pack-source-*` errors.
268
+ > Source authoring is an explicit Node contract. Every gateway call carries a
269
+ > caller-minted `requestId`; mutations may carry `expectedRevision` for
270
+ > SHA-256 CAS. The filesystem port confines paths to one game root and only
271
+ > writes constrained generated source or structured v3 JSON. Arbitrary valid
272
+ > TypeScript remains inspectable and rebuildable, but unsupported structural
273
+ > edits fail closed with stable `pack-source-*` errors.
194
274
 
195
275
  `SOURCE_AUTHORING_OPERATION_DESCRIPTORS` is the producer-owned structured capability manifest for tools. The existing `asset.preflight` operation returns the current revision, canonical Meta, incoming references, and shape-derived mutation capabilities before any write.
196
276
 
197
277
  ```typescript
198
- import { AssetGuid } from "@forgeax/engine-pack/guid";
199
- import { scan, scanInventory } from "@forgeax/engine-pack/scanner";
278
+ import { AssetGuid } from "@forgeax/engine/pack/guid";
279
+ import { scan, scanInventory } from "@forgeax/engine/pack/scanner";
200
280
 
201
281
  // Runtime: resolve a known GUID at build time
202
282
  const result = AssetGuid.parse("cbe42beb-8975-5096-b3a1-3dda4cb4c077");
@@ -211,12 +291,14 @@ console.log(scanResult.value); // PackEntry[]
211
291
  // Build hosts can retain one validated inventory and project paths from it.
212
292
  const inventory = await scanInventory(["apps/hello/cube/assets"]);
213
293
  if (!inventory.ok) throw inventory.error;
214
- console.log(inventory.value.paths, inventory.value.scriptablePackMeta);
294
+ console.log(inventory.value.paths, inventory.value.declarations);
215
295
  ```
216
296
 
217
297
  ## Schema shapes
218
298
 
219
- Two sidecar JSON files live next to each source file in an asset directory:
299
+ External imports and authored Packs have different identity owners. An external
300
+ source keeps importer-owned sub-asset GUIDs in its `.meta.json`; an authored
301
+ Pack keeps one `packageId` and names outputs with `sourceKey`.
220
302
 
221
303
  ### `.meta.json` -- external-asset-package
222
304
 
@@ -231,6 +313,7 @@ Two sidecar JSON files live next to each source file in an asset directory:
231
313
  { "guid": "<UUIDv7-or-UUIDv5>", "sourceIndex": 0, "kind": "mesh", "compression": "zstd" }
232
314
  ]
233
315
  }
316
+ ```
234
317
 
235
318
  > [!NOTE]
236
319
  > `compression?: 'none' | 'zstd'` on `PackIndexEntry` (and `subAssets[].compression`)
@@ -243,33 +326,45 @@ Two sidecar JSON files live next to each source file in an asset directory:
243
326
  > (default: mesh -> `zstd`, texture -> `none`; `.pack.json` never compressed).
244
327
  > The importer honors the override and writes the resulting `compression` onto
245
328
  > the output catalog row. Omit it to accept the kind-keyed default.
329
+
330
+ ### `.pack.json` -- authored Pack v3
331
+
332
+ Direct authoring names its outputs by `sourceKey`; it never stores output GUIDs:
333
+
334
+ ```json
335
+ {
336
+ "schemaVersion": "3.0.0",
337
+ "packageId": "01900000-0000-7000-8000-000000000010",
338
+ "assets": {
339
+ "mesh/main": { "kind": "mesh", "payload": {}, "refs": [] }
340
+ }
341
+ }
246
342
  ```
247
343
 
248
- ### `.pack.json` -- internal-text-package
344
+ An instance uses the same extension and schema version, but has only its own
345
+ identity, parent, and sparse parameter values:
249
346
 
250
347
  ```json
251
348
  {
252
- "schemaVersion": "1.0.0",
253
- "kind": "internal-text-package",
254
- "assets": [
255
- {
256
- "guid": "<UUIDv7-or-UUIDv5>",
257
- "kind": "mesh",
258
- "payload": {},
259
- "refs": []
260
- }
261
- ]
349
+ "schemaVersion": "3.0.0",
350
+ "packageId": "01900000-0000-7000-8000-000000000011",
351
+ "parent": "01900000-0000-7000-8000-000000000010",
352
+ "values": { "count": 4 }
262
353
  }
263
354
  ```
264
355
 
356
+ The two v3 branches are mutually exclusive. The build lowers them to the
357
+ runtime Pack v2 projection, whose rows contain derived GUIDs and `kind:
358
+ "internal-text-package"`; runtime still loads only that cooked projection.
359
+
265
360
  ### Producer provenance and topology
266
361
 
267
- Both package schemas accept producer-owned `packageId`, `provenance`,
268
- `revision`, and structured `diagnostics`. Asset/output rows may declare a
269
- stable `sourceKey`; `sourceIndex` is positional evidence only. The runtime
270
- function `diffTopology(previous, next)` preserves GUIDs by `sourceKey`, reports additions,
271
- removals, and kind changes, and marks multi-output source-index-only matching
272
- as ambiguous.
362
+ Authored and cooked Pack projections carry producer-owned `packageId`,
363
+ `provenance`, `revision`, and structured `diagnostics`. Asset/output rows may
364
+ declare a stable `sourceKey`; `sourceIndex` is positional evidence only. The
365
+ runtime function `diffTopology(previous, next)` preserves GUIDs by `sourceKey`,
366
+ reports additions, removals, and kind changes, and marks multi-output
367
+ source-index-only matching as ambiguous.
273
368
 
274
369
  | Fact | Published by | Consumer rule |
275
370
  |:--|:--|:--|
@@ -417,6 +512,24 @@ one receipt per GUID, validates asset-local artifact paths and bytes, and emits
417
512
  the deterministic package URL and digest. Producers provide policy through the
418
513
  finalizer sink; Pack owns package serialization and publication facts.
419
514
 
515
+ ## Mesh LOD relation closure
516
+
517
+ LOD is a relation inside the root mesh payload, not an independent runtime
518
+ asset kind. A valid Pack row contains the lower MeshAsset GUID in both the
519
+ payload and root `refs[]`, and the lower row is present in the same package:
520
+
521
+ ```json
522
+ {
523
+ "kind": "mesh",
524
+ "payload": { "lods": [{ "mesh": "<lod-guid>", "screenCoverage": 0.5 }] },
525
+ "refs": ["<lod-guid>"]
526
+ }
527
+ ```
528
+
529
+ The finalizer preserves this relation while sorting rows deterministically.
530
+ Missing closure, duplicate GUIDs, invalid artifacts, or incomplete receipts
531
+ fail before publication; repair the producer and retry the same source Meta.
532
+
420
533
  ## Entry subpaths
421
534
 
422
535
  | Subpath | Exports |
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=inventory-schema.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inventory-schema.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/inventory-schema.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parameterized-pack-authoring-gateway.unit.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameterized-pack-authoring-gateway.unit.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/parameterized-pack-authoring-gateway.unit.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parameterized-pack-scanner.unit.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameterized-pack-scanner.unit.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/parameterized-pack-scanner.unit.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=parameterized-pack.unit.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameterized-pack.unit.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/parameterized-pack.unit.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scanner-blacklist.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner-blacklist.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/scanner-blacklist.test.ts"],"names":[],"mappings":""}
package/dist/build.d.ts CHANGED
@@ -4,16 +4,21 @@ export { validateArtifactPath } from './artifact-path.js';
4
4
  export { buildCatalogProjection, type CatalogAuthority, type CatalogBuildError, type CatalogBuildErrorCode, type CatalogBuildProjectionOptions, type CatalogBuildResult, type CatalogImporterPolicy, type CatalogProducerVisibility, catalogSourcePathFor, metaPathForGuid, } from './catalog-builder.js';
5
5
  export { calculateCatalogDelta } from './catalog-delta.js';
6
6
  export { type CatalogOutputDeclaration, type CatalogProducerMeta, type CookedPackageProjection, catalogProjectionFor, currentProjectionFor, findReservedAssetKindConflict, type PackageCatalogInput, projectCookedPackageEntry, projectExternalCatalogEntries, projectPackageCatalog, projectRuntimeCatalogRow, type RuntimeCatalogRowInput, } from './catalog-projection.js';
7
- export { type LoadAssetConfigResult, loadAssetConfig } from './config.js';
8
7
  export { type CookedMaterialRecord, collectMaterialCookRefs, createMaterialArtifactDigest, type MaterialCookArtifact, type MaterialCookIdentityExpectation, type MaterialCookReceipt, type MaterialCookRecordError, type MaterialCookRefs, projectCookedMaterialRecord, serializeCookedMaterialRecord, serializeMaterialCookReceipt, validateCookedMaterialRecord, validateMaterialCookReceipt, } from './evidence/material-cook.js';
9
8
  export { buildOfflineAssetEvidence, packageVerification } from './evidence/offline-evidence.js';
9
+ export { AssetGuid, isValidAssetGuidString, isValidPackSourceKey, PACK_SOURCE_KEY_RE, PackageId, } from './guid.js';
10
+ export { projectAssetRefs, projectSceneEntityRefs } from './inventory/binding.js';
11
+ export { type AuthorInventory, type AuthorInventoryRow, type InventoryError, type InventoryErrorCode, validateAuthorInventory, } from './inventory/declaration.js';
12
+ export { inventoryDigest, syncAuthorInventory } from './inventory/sync.js';
10
13
  export { decodeMeshBinHeader, MESH_BIN_DIGEST_BYTES, MESH_BIN_HEADER_V4_BYTES, MESH_BIN_PROJECTION_VERSION, MESH_BIN_VERSION, type MeshBinContractError, type MeshBinHeaderResult, type MeshBinHeaderV4, writeMeshBinHeader, } from './mesh-bin-contract.js';
11
- export { type AuthoredPackAssetInput, type AuthoredPackInput, type FinalizedPackageProduct, finalizePackageProduct, finalizePackageTransportSource, type PackageArtifactBody, type PackageFinalizePolicy, type PackageFinalizeResult, type PackageFinalizerError, type PackageProduct, type PackageProductAsset, packageTransportRevision, upgradeLegacyAuthoredPack, } from './package-finalizer.js';
14
+ export { type FinalizedPackageProduct, finalizePackageProduct, finalizePackageTransportSource, type PackageArtifactBody, type PackageFinalizePolicy, type PackageFinalizeResult, type PackageFinalizerError, type PackageProduct, type PackageProductAsset, packageTransportRevision, } from './package-finalizer.js';
15
+ export * from './parameterized-pack.js';
16
+ export { createFileSystemParameterizedPackAuthoringGateway, createFileSystemParameterizedPackAuthoringPort, type FileSystemParameterizedPackAuthoringOptions, type ParameterizedPackMaterializedAsset, } from './parameterized-pack-node.js';
12
17
  export { validateProducerContract, validateProducerOutputs } from './producer-contract.js';
13
18
  export { resolveAssetSource } from './resolve-asset-source.js';
14
19
  export { parsePackV2, validateMeta, validatePack, validatePackV2 } from './runtime.js';
15
20
  export { createRuntimePackPublication, type RuntimePackAssetInput, type RuntimePackEnvelope, type RuntimePackInput, type RuntimePackPublication, type RuntimePackPublicationInput, } from './runtime-publication.js';
16
- export { type InventoryDeclaration, type ScanInventory, type ScanOptions, type ScriptablePackInventoryDeclaration, type ScriptablePackScanOptions, STANDARD_SCRIPTABLE_PACK_SCAN_OPTIONS, scanInventory, } from './scanner.js';
17
- export { type AssetReader, isScriptablePackAssetKind, projectScriptablePackMeta, projectScriptablePackSceneComponents, SCRIPTABLE_PACK_ASSET_KINDS, SCRIPTABLE_PACK_CAPABILITY_MANIFEST, type ScriptablePackAssetDeclaration, type ScriptablePackAssetDeclarations, type ScriptablePackAssetFor, type ScriptablePackAssetKind, type ScriptablePackDefinition, type ScriptablePackError, type ScriptablePackExternalAssets, type ScriptablePackMetaJson, type ScriptablePackOutputs, type ScriptablePackPublicationEnvelope, type ScriptablePackReadError, type ScriptablePackSceneComponent, type ScriptablePackSceneComponentInput, type ScriptablePackSourceClosureEntry, validateScriptablePackDefinition, } from './scriptable-pack.js';
21
+ export { type InventoryDeclaration, type LegacyPackInventoryDocument, type PackInventoryAsset, type PackInventoryDocument, type ParameterizedPackInventoryDocument, type ScanInventory, type ScanOptions, type ScanSourceDeclaration, type ScriptablePackInventoryDeclaration, type ScriptablePackScanOptions, STANDARD_SCRIPTABLE_PACK_SCAN_OPTIONS, scanInventory, } from './scanner.js';
22
+ export { type AssetReader, isScriptablePackAssetKind, projectScriptablePackSceneComponents, SCRIPTABLE_PACK_ASSET_KINDS, type ScriptablePackAssetKind, type ScriptablePackReadError, type ScriptablePackSourceClosureEntry, } from './scriptable-pack.js';
18
23
  export { calculateTopologyDiff, diffTopology } from './topology.js';
19
24
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,aAAa,EACb,cAAc,EACd,KAAK,EACL,cAAc,EACd,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACT,MAAM,EACN,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,UAAU,GACX,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EACL,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,oBAAoB,EACpB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,oBAAoB,EACpB,oBAAoB,EACpB,6BAA6B,EAC7B,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,E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