@forgeax/engine-pack 0.1.33 → 0.1.34

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 CHANGED
@@ -148,7 +148,7 @@ lives in [`pack.schema.json`](schema/pack.schema.json) and
148
148
  [`meta.schema.json`](schema/meta.schema.json); this section is guidance, not a
149
149
  second manifest.
150
150
 
151
- The machine contract is [`asset-authority.schema.json`](../../asset-authority.schema.json). The audit gate is [`check-asset-authority-audit.mjs`](../../scripts/forgeax/check-asset-authority-audit.mjs); it reports subject, execution, author authority, runtime source, lifecycle, owner, producer, and sourceKey evidence for every named category.
151
+ The machine contract is [`schemas/asset-authority.schema.json`](../../schemas/asset-authority.schema.json). The audit gate is [`check-asset-authority-audit.mjs`](../../scripts/forgeax/check-asset-authority-audit.mjs); it reports subject, execution, author authority, runtime source, lifecycle, owner, producer, and sourceKey evidence for every named category.
152
152
 
153
153
  The staged route is explicit: `author-validation` -> `external-declaration` ->
154
154
  `import` -> `native-cook` -> `ddc-validation` -> `runtime-parse` ->
package/dist/build.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { ok, err, catalogOperationsFor, authoringCapabilityForAssetKind, MATERIAL_TEXTURE_SLOTS, isMaterialProgramAbi, projectCookProductEvidence, projectAssetEvidence, validateSourceOverrideMap, PACK_ERROR_HINTS, catalogEntryDigest, deriveStandardLayerPlan, AssetError, ImportError } from '@forgeax/engine-types';
1
+ import { ok, err, catalogOperationsFor, authoringCapabilityForAssetKind, MATERIAL_TEXTURE_SLOTS, isMaterialSurfaceDeclaration, isMaterialProgramAbi, projectCookProductEvidence, projectAssetEvidence, validateSourceOverrideMap, PACK_ERROR_HINTS, catalogEntryDigest, deriveStandardLayerPlan, AssetError, ImportError } from '@forgeax/engine-types';
2
2
  import { dirname, resolve, isAbsolute, relative, join, basename, sep, extname } from 'path';
3
3
  import { sha1 } from '@noble/hashes/legacy.js';
4
4
  import { uuidv7obj } from 'uuidv7';
@@ -7129,8 +7129,8 @@ function vectorLength(type) {
7129
7129
  }
7130
7130
  function parameterValueError(parameter, value, propertyPath) {
7131
7131
  const { type } = parameter;
7132
- if (type === "bool" && typeof value !== "boolean") {
7133
- return parameterFailure(propertyPath, "a boolean", value, "bool value has the wrong type");
7132
+ if (type === "bool") {
7133
+ return typeof value === "boolean" ? void 0 : parameterFailure(propertyPath, "a boolean", value, "bool value has the wrong type");
7134
7134
  }
7135
7135
  if (numericType(type)) {
7136
7136
  if (typeof value !== "number" || !Number.isFinite(value)) {
@@ -7191,8 +7191,8 @@ function parameterValueError(parameter, value, propertyPath) {
7191
7191
  }
7192
7192
  return void 0;
7193
7193
  }
7194
- if (type === "string" && typeof value !== "string") {
7195
- return parameterFailure(propertyPath, "a string", value, "string parameter has the wrong type");
7194
+ if (type === "string") {
7195
+ return typeof value === "string" ? void 0 : parameterFailure(propertyPath, "a string", value, "string parameter has the wrong type");
7196
7196
  }
7197
7197
  if (type === "enum") {
7198
7198
  if (typeof value !== "string") {
@@ -10362,7 +10362,10 @@ function collectMaterialCookRefs(material) {
10362
10362
  return guid === void 0 ? [] : [guid];
10363
10363
  })
10364
10364
  ),
10365
- modules: unique((material.passes ?? []).map((pass) => pass.program.module))
10365
+ modules: unique([
10366
+ ...(material.passes ?? []).map((pass) => pass.program.module),
10367
+ ...material.surface === void 0 ? [] : [material.surface.module]
10368
+ ])
10366
10369
  };
10367
10370
  }
10368
10371
  function createMaterialArtifactDigest(bytes) {
@@ -10535,6 +10538,8 @@ function validateCookedMaterialRecord(value) {
10535
10538
  return invalid("resolved.parameters", resolved.parameters);
10536
10539
  if (resolved.values === null || typeof resolved.values !== "object" || Array.isArray(resolved.values))
10537
10540
  return invalid("resolved.values", resolved.values);
10541
+ if (resolved.surface !== void 0 && !isMaterialSurfaceDeclaration(resolved.surface))
10542
+ return invalid("resolved.surface", resolved.surface);
10538
10543
  const passes = resolved.passes;
10539
10544
  const passNames = /* @__PURE__ */ new Set();
10540
10545
  for (const [index, pass] of passes.entries()) {