@forgeax/engine-pack 0.1.27 → 0.1.29

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 (52) hide show
  1. package/README.md +30 -17
  2. package/dist/build.mjs +35 -52
  3. package/dist/build.mjs.map +1 -1
  4. package/dist/cli-asset.d.ts +1 -1
  5. package/dist/cli-asset.d.ts.map +1 -1
  6. package/dist/cli-asset.mjs +40 -33
  7. package/dist/cli-asset.mjs.map +1 -1
  8. package/dist/index.mjs +1 -1
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/inventory/declaration.d.ts +1 -1
  11. package/dist/inventory/declaration.d.ts.map +1 -1
  12. package/dist/inventory/sync.d.ts.map +1 -1
  13. package/dist/native-cooker-registry.d.ts +1 -0
  14. package/dist/native-cooker-registry.d.ts.map +1 -1
  15. package/dist/native-cooker.mjs.map +1 -1
  16. package/dist/pack-authoring-node.mjs +22 -13
  17. package/dist/pack-authoring-node.mjs.map +1 -1
  18. package/dist/runtime.mjs +1 -1
  19. package/dist/runtime.mjs.map +1 -1
  20. package/dist/scanner.mjs +22 -13
  21. package/dist/scanner.mjs.map +1 -1
  22. package/dist/schema-compiled.d.ts.map +1 -1
  23. package/dist/schema.mjs +41 -63
  24. package/dist/schema.mjs.map +1 -1
  25. package/dist/scriptable-pack-node.d.ts.map +1 -1
  26. package/dist/scriptable-pack-node.mjs +11 -3
  27. package/dist/scriptable-pack-node.mjs.map +1 -1
  28. package/dist/scriptable-pack-worker.mjs +5 -1
  29. package/dist/scriptable-pack-worker.mjs.map +1 -1
  30. package/package.json +3 -6
  31. package/schema/meta.schema.json +1 -1
  32. package/src/__tests__/atlas-cli-region-mismatch.test.ts +1 -1
  33. package/src/__tests__/cli.unit.test.ts +1 -1
  34. package/src/__tests__/inventory-schema.test.ts +10 -10
  35. package/src/__tests__/pack-authoring.unit.test.ts +2 -4
  36. package/src/__tests__/pack.unit.test.ts +89 -127
  37. package/src/__tests__/scanner-instance-cycle.test.ts +92 -0
  38. package/src/__tests__/scanner-inventory.contract.test.ts +2 -2
  39. package/src/__tests__/scriptable-pack-diagnostic.integration.test.ts +45 -0
  40. package/src/atlas/run-atlas.ts +3 -3
  41. package/src/atlas/shelf-pack.ts +1 -1
  42. package/src/atlas/upng-ambient.d.ts +1 -1
  43. package/src/cli-asset.ts +22 -23
  44. package/src/inventory/binding.ts +3 -3
  45. package/src/inventory/declaration.ts +10 -48
  46. package/src/inventory/sync.ts +3 -2
  47. package/src/native-cooker-registry.ts +1 -0
  48. package/src/scanner.ts +29 -29
  49. package/src/schema-compiled.ts +40 -79
  50. package/src/scriptable-pack-node.ts +11 -3
  51. package/src/scriptable-pack-worker.ts +8 -1
  52. package/src/__tests__/scanner-mount-cycle.test.ts +0 -232
@@ -1 +1 @@
1
- {"version":3,"file":"schema-compiled.d.ts","sourceRoot":"","sources":["../src/schema-compiled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAC;AASjD,eAAO,MAAM,YAAY;;EAA8B,CAAC;AACxD,eAAO,MAAM,YAAY;;EAA8B,CAAC;AAExD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAS9D;AAwCD,wBAAgB,wBAAwB,CACtC,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACjD,gBAAgB,CAwHlB;AAsBD,wBAAgB,2BAA2B,CACzC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,GACtC,gBAAgB,CA+BlB"}
1
+ {"version":3,"file":"schema-compiled.d.ts","sourceRoot":"","sources":["../src/schema-compiled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAC;AASjD,eAAO,MAAM,YAAY;;EAA8B,CAAC;AACxD,eAAO,MAAM,YAAY;;EAA8B,CAAC;AAExD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAS9D;AAwCD,wBAAgB,wBAAwB,CACtC,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACjD,gBAAgB,CAiFlB;AAsBD,wBAAgB,2BAA2B,CACzC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,GACtC,gBAAgB,CA+BlB"}
package/dist/schema.mjs CHANGED
@@ -6827,7 +6827,7 @@ var meta_schema_default = {
6827
6827
  properties: {
6828
6828
  schemaVersion: {
6829
6829
  oneOf: [{ type: "string" }, { type: "integer" }],
6830
- description: "Schema version. Strings (e.g. '1.0.0') for hand-authored .meta.json; integers (1, 2, ...) for importer-emitted .meta.json (forgeax-engine-remote-asset import writes schemaVersion: 1 as the wire format SSOT, GltfMetaJson literal type)."
6830
+ description: "Schema version. Strings (e.g. '1.0.0') for hand-authored .meta.json; integers (1, 2, ...) for importer-emitted .meta.json (forgeax asset import writes schemaVersion: 1 as the wire format SSOT, GltfMetaJson literal type)."
6831
6831
  },
6832
6832
  kind: {
6833
6833
  type: "string",
@@ -7317,91 +7317,69 @@ function buildSceneAssetValidator(componentSchemas) {
7317
7317
  for (const [name, sub] of Object.entries(componentSchemas)) {
7318
7318
  componentsProperties[name] = sub;
7319
7319
  }
7320
- const mountOverrideSchema = {
7320
+ const componentsSchema = {
7321
7321
  type: "object",
7322
7322
  additionalProperties: false,
7323
- required: ["localId", "comp", "value"],
7324
- properties: {
7325
- localId: { type: "integer", minimum: 0 },
7326
- comp: { type: "string", minLength: 1 },
7327
- field: { type: "string", minLength: 1 },
7328
- value: {}
7329
- }
7323
+ properties: componentsProperties
7330
7324
  };
7331
- const mountSchema = {
7325
+ const instanceSchema = {
7332
7326
  type: "object",
7333
7327
  additionalProperties: false,
7334
- required: ["localId", "source", "memberFirst", "memberCount"],
7328
+ required: ["source"],
7335
7329
  properties: {
7336
- localId: { type: "integer", minimum: 0 },
7337
- source: { type: "integer", minimum: 0 },
7338
- memberFirst: { type: "integer", minimum: 0 },
7339
- memberCount: { type: "integer", minimum: 0 },
7340
- parent: { type: "integer", minimum: 0 },
7341
- components: {
7342
- type: "object",
7343
- additionalProperties: false,
7344
- properties: componentsProperties
7330
+ // Authored scenes use a GUID string. Pack output may carry a refs[]
7331
+ // index, which is resolved by the Scene decoder before instantiation.
7332
+ source: {
7333
+ oneOf: [
7334
+ { type: "string", minLength: 1 },
7335
+ { type: "integer", minimum: 0 }
7336
+ ]
7345
7337
  },
7346
7338
  overrides: {
7347
7339
  type: "array",
7348
- items: mountOverrideSchema
7349
- },
7350
- publicationFence: {
7351
- type: "object",
7352
- additionalProperties: false,
7353
- required: [
7354
- "schemaVersion",
7355
- "sourcePath",
7356
- "sourceRevision",
7357
- "publicationGeneration",
7358
- "outputDigest",
7359
- "outputSetDigest",
7360
- "receiptIdentity"
7361
- ],
7362
- properties: {
7363
- schemaVersion: { type: "string", const: "scene-publication-fence/1" },
7364
- sourcePath: { type: "string", minLength: 1 },
7365
- sourceRevision: { type: "string", minLength: 1 },
7366
- publicationGeneration: { type: "integer", minimum: 1 },
7367
- outputDigest: { type: "string", minLength: 1 },
7368
- outputSetDigest: { type: "string", minLength: 1 },
7369
- receiptIdentity: { type: "string", minLength: 1 }
7340
+ items: {
7341
+ type: "object",
7342
+ additionalProperties: false,
7343
+ required: ["target", "components"],
7344
+ properties: {
7345
+ target: { type: "array", minItems: 1, items: { type: "string", minLength: 1 } },
7346
+ components: componentsSchema
7347
+ }
7370
7348
  }
7371
7349
  }
7372
7350
  }
7373
7351
  };
7352
+ const entitySchema = {
7353
+ type: "object",
7354
+ additionalProperties: false,
7355
+ required: ["components"],
7356
+ properties: {
7357
+ components: componentsSchema,
7358
+ instance: instanceSchema
7359
+ }
7360
+ };
7374
7361
  const sceneSchema = {
7375
7362
  type: "object",
7376
7363
  additionalProperties: false,
7377
7364
  required: ["kind", "entities"],
7378
7365
  properties: {
7379
7366
  kind: { type: "string", const: "scene" },
7380
- sourceKey: { type: "string", minLength: 1 },
7381
- entities: {
7367
+ // Skin assets are explicit scene dependencies so async catalog loading
7368
+ // can finish the joint-wiring path before the Scene is instantiated.
7369
+ // Authored producers use GUID strings; Pack output may use refs[] indices.
7370
+ skinGuids: {
7382
7371
  type: "array",
7383
7372
  items: {
7384
- type: "object",
7385
- additionalProperties: false,
7386
- required: ["localId", "components"],
7387
- properties: {
7388
- localId: { type: "integer", minimum: 0 },
7389
- bindingKey: { type: "string", minLength: 1 },
7390
- components: {
7391
- type: "object",
7392
- additionalProperties: false,
7393
- properties: componentsProperties
7394
- }
7395
- }
7373
+ oneOf: [
7374
+ { type: "string", minLength: 1 },
7375
+ { type: "integer", minimum: 0 }
7376
+ ]
7396
7377
  }
7397
7378
  },
7398
- // Optional top-level mounts[] (feat-20260608-scene-nesting-ecs-fication
7399
- // M1 / w11). Missing mounts is semantically equivalent to mounts: []
7400
- // (plan-strategy §6.3 back-compat); ajv default produces the empty
7401
- // array on absent input.
7402
- mounts: {
7403
- type: "array",
7404
- items: mountSchema
7379
+ entities: {
7380
+ type: "object",
7381
+ propertyNames: { type: "string", minLength: 1 },
7382
+ additionalProperties: entitySchema
7405
7383
  }
7406
7384
  }
7407
7385
  };