@forgeax/engine-pack 0.1.21 → 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.
- package/README.md +159 -46
- package/dist/__tests__/inventory-schema.test.d.ts +2 -0
- package/dist/__tests__/inventory-schema.test.d.ts.map +1 -0
- package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts +2 -0
- package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts.map +1 -0
- package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts +2 -0
- package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/parameterized-pack.unit.test.d.ts +2 -0
- package/dist/__tests__/parameterized-pack.unit.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-blacklist.test.d.ts +2 -0
- package/dist/__tests__/scanner-blacklist.test.d.ts.map +1 -0
- package/dist/build.d.ts +9 -4
- package/dist/build.d.ts.map +1 -1
- package/dist/build.mjs +3314 -803
- package/dist/build.mjs.map +1 -1
- package/dist/builtin.mjs +37 -4
- package/dist/builtin.mjs.map +1 -1
- package/dist/catalog-builder.d.ts.map +1 -1
- package/dist/cli-asset.d.ts.map +1 -1
- package/dist/cli-asset.mjs +1368 -850
- package/dist/cli-asset.mjs.map +1 -1
- package/dist/deriveAssetName.d.ts +11 -7
- package/dist/deriveAssetName.d.ts.map +1 -1
- package/dist/evidence/source-inventory.d.ts.map +1 -1
- package/dist/guid.d.ts +15 -0
- package/dist/guid.d.ts.map +1 -1
- package/dist/guid.mjs +53 -5
- package/dist/guid.mjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1252 -560
- package/dist/index.mjs.map +1 -1
- package/dist/inventory/binding.d.ts +6 -0
- package/dist/inventory/binding.d.ts.map +1 -0
- package/dist/inventory/declaration.d.ts +24 -0
- package/dist/inventory/declaration.d.ts.map +1 -0
- package/dist/inventory/index.d.ts +3 -0
- package/dist/inventory/index.d.ts.map +1 -0
- package/dist/inventory/sync.d.ts +5 -0
- package/dist/inventory/sync.d.ts.map +1 -0
- package/dist/name.mjs +4 -7
- package/dist/name.mjs.map +1 -1
- package/dist/package-finalizer.d.ts +2 -20
- package/dist/package-finalizer.d.ts.map +1 -1
- package/dist/parameterized-pack-node.d.ts +26 -0
- package/dist/parameterized-pack-node.d.ts.map +1 -0
- package/dist/parameterized-pack-node.mjs +11093 -0
- package/dist/parameterized-pack-node.mjs.map +1 -0
- package/dist/parameterized-pack.d.ts +233 -0
- package/dist/parameterized-pack.d.ts.map +1 -0
- package/dist/resolve-asset-source.d.ts +1 -3
- package/dist/resolve-asset-source.d.ts.map +1 -1
- package/dist/resolve-asset-source.mjs +6 -81
- package/dist/resolve-asset-source.mjs.map +1 -1
- package/dist/runtime.mjs +77 -7
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.d.ts +19 -8
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.mjs +1169 -690
- package/dist/scanner.mjs.map +1 -1
- package/dist/schema-compiled.d.ts.map +1 -1
- package/dist/schema.mjs +79 -7
- package/dist/schema.mjs.map +1 -1
- package/dist/scriptable-pack-node.d.ts +8 -32
- package/dist/scriptable-pack-node.d.ts.map +1 -1
- package/dist/scriptable-pack-node.mjs +576 -1021
- package/dist/scriptable-pack-node.mjs.map +1 -1
- package/dist/scriptable-pack-worker.mjs +29 -11
- package/dist/scriptable-pack-worker.mjs.map +1 -1
- package/dist/scriptable-pack.d.ts +19 -532
- package/dist/scriptable-pack.d.ts.map +1 -1
- package/dist/scriptable-pack.mjs +1042 -527
- package/dist/scriptable-pack.mjs.map +1 -1
- package/package.json +7 -7
- package/schema/meta.schema.json +1 -1
- package/schema/pack.schema.json +76 -6
- package/src/__tests__/guid-collision.unit.test.ts +18 -9
- package/src/__tests__/inventory-schema.test.ts +109 -0
- package/src/__tests__/pack.unit.test.ts +1 -238
- package/src/__tests__/package-finalizer.contract.test.ts +55 -0
- package/src/__tests__/parameterized-pack-authoring-gateway.unit.test.ts +249 -0
- package/src/__tests__/parameterized-pack-scanner.unit.test.ts +123 -0
- package/src/__tests__/parameterized-pack.unit.test.ts +266 -0
- package/src/__tests__/resolve-asset-source.test.ts +15 -98
- package/src/__tests__/scanner-blacklist.test.ts +55 -0
- package/src/__tests__/scanner-inventory.contract.test.ts +14 -15
- package/src/__tests__/scanner-inventory.test.ts +24 -12
- package/src/__tests__/scriptable-pack-cli.integration.test.ts +4 -9
- package/src/__tests__/topology.unit.test.ts +23 -0
- package/src/build.ts +28 -18
- package/src/catalog-builder.ts +61 -34
- package/src/cli-asset.ts +70 -85
- package/src/deriveAssetName.ts +14 -13
- package/src/evidence/source-inventory.ts +34 -21
- package/src/guid.ts +65 -4
- package/src/index.ts +12 -11
- package/src/inventory/binding.ts +25 -0
- package/src/inventory/declaration.ts +168 -0
- package/src/inventory/index.ts +18 -0
- package/src/inventory/sync.ts +22 -0
- package/src/package-finalizer.ts +2 -42
- package/src/parameterized-pack-node.ts +1968 -0
- package/src/parameterized-pack.ts +1493 -0
- package/src/resolve-asset-source.ts +4 -76
- package/src/scanner.ts +241 -59
- package/src/schema-compiled.ts +2 -0
- package/src/scriptable-pack-node.ts +111 -722
- package/src/scriptable-pack-worker.ts +48 -16
- package/src/scriptable-pack.ts +27 -939
- package/dist/.tsbuildinfo +0 -1
- package/dist/__tests__/load-asset-config.test.d.ts +0 -2
- package/dist/__tests__/load-asset-config.test.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack.test-d.d.ts +0 -2
- package/dist/__tests__/scriptable-pack.test-d.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack.unit.test.d.ts +0 -2
- package/dist/__tests__/scriptable-pack.unit.test.d.ts.map +0 -1
- package/dist/config.d.ts +0 -6
- package/dist/config.d.ts.map +0 -1
- package/dist/config.mjs +0 -29
- package/dist/config.mjs.map +0 -1
- package/src/__tests__/load-asset-config.test.ts +0 -121
- package/src/__tests__/scriptable-pack.test-d.ts +0 -131
- package/src/__tests__/scriptable-pack.unit.test.ts +0 -789
- 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
|
|
48
|
-
|
|
49
|
-
`AssetRegistry.loadByGuid(guid)`.
|
|
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
|
|
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
|
|
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
|
|
166
|
-
import {
|
|
167
|
-
|
|
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: '
|
|
242
|
+
export default definePack({
|
|
243
|
+
schemaVersion: '2.0.0',
|
|
171
244
|
packageId,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
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
|
-
`
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
serializable
|
|
186
|
-
|
|
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
|
|
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
|
|
199
|
-
import { scan, scanInventory } from "@forgeax/engine
|
|
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.
|
|
294
|
+
console.log(inventory.value.paths, inventory.value.declarations);
|
|
215
295
|
```
|
|
216
296
|
|
|
217
297
|
## Schema shapes
|
|
218
298
|
|
|
219
|
-
|
|
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
|
-
|
|
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": "
|
|
253
|
-
"
|
|
254
|
-
"
|
|
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
|
-
|
|
268
|
-
`revision`, and structured `diagnostics`. Asset/output rows may
|
|
269
|
-
stable `sourceKey`; `sourceIndex` is positional evidence only. The
|
|
270
|
-
function `diffTopology(previous, next)` preserves GUIDs by `sourceKey`,
|
|
271
|
-
removals, and kind changes, and marks multi-output
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"inventory-schema.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/inventory-schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"parameterized-pack.unit.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/parameterized-pack.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -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
|
|
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,
|
|
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
|
package/dist/build.d.ts.map
CHANGED
|
@@ -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,EACrB,wBAAwB,EACxB,KAAK,sBAAsB,GAC5B,MAAM,yBAAyB,CAA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