@forgeax/engine-assets-runtime 0.0.0-dev.8d955ade1c79

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 (320) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +491 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/__tests__/aabb.unit.test.d.ts +2 -0
  5. package/dist/__tests__/aabb.unit.test.d.ts.map +1 -0
  6. package/dist/__tests__/artifact-integrity.unit.test.d.ts +2 -0
  7. package/dist/__tests__/artifact-integrity.unit.test.d.ts.map +1 -0
  8. package/dist/__tests__/artifact-io.unit.test.d.ts +2 -0
  9. package/dist/__tests__/artifact-io.unit.test.d.ts.map +1 -0
  10. package/dist/__tests__/asset-evidence-sdk.integration.test.d.ts +2 -0
  11. package/dist/__tests__/asset-evidence-sdk.integration.test.d.ts.map +1 -0
  12. package/dist/__tests__/asset-evidence.unit.test.d.ts +2 -0
  13. package/dist/__tests__/asset-evidence.unit.test.d.ts.map +1 -0
  14. package/dist/__tests__/asset-kind.unit.test.d.ts +2 -0
  15. package/dist/__tests__/asset-kind.unit.test.d.ts.map +1 -0
  16. package/dist/__tests__/asset-registry-catalog-reconcile.integration.test.d.ts +2 -0
  17. package/dist/__tests__/asset-registry-catalog-reconcile.integration.test.d.ts.map +1 -0
  18. package/dist/__tests__/asset-registry-catalog-reconcile.unit.test.d.ts +2 -0
  19. package/dist/__tests__/asset-registry-catalog-reconcile.unit.test.d.ts.map +1 -0
  20. package/dist/__tests__/asset-registry-catalog.unit.test.d.ts +2 -0
  21. package/dist/__tests__/asset-registry-catalog.unit.test.d.ts.map +1 -0
  22. package/dist/__tests__/asset-registry.pack-cache.test.d.ts +2 -0
  23. package/dist/__tests__/asset-registry.pack-cache.test.d.ts.map +1 -0
  24. package/dist/__tests__/asset-registry.unit.test.d.ts +2 -0
  25. package/dist/__tests__/asset-registry.unit.test.d.ts.map +1 -0
  26. package/dist/__tests__/asset-runtime-error-code-owner.test-d.d.ts +2 -0
  27. package/dist/__tests__/asset-runtime-error-code-owner.test-d.d.ts.map +1 -0
  28. package/dist/__tests__/catalog-replica.unit.test.d.ts +2 -0
  29. package/dist/__tests__/catalog-replica.unit.test.d.ts.map +1 -0
  30. package/dist/__tests__/catalog-source-v2.unit.test.d.ts +2 -0
  31. package/dist/__tests__/catalog-source-v2.unit.test.d.ts.map +1 -0
  32. package/dist/__tests__/catalog-source.unit.test.d.ts +2 -0
  33. package/dist/__tests__/catalog-source.unit.test.d.ts.map +1 -0
  34. package/dist/__tests__/catalog-subscription-order.unit.test.d.ts +2 -0
  35. package/dist/__tests__/catalog-subscription-order.unit.test.d.ts.map +1 -0
  36. package/dist/__tests__/catalog-subscription.unit.test.d.ts +2 -0
  37. package/dist/__tests__/catalog-subscription.unit.test.d.ts.map +1 -0
  38. package/dist/__tests__/decode-image-bytes-pass-through.test.d.ts +2 -0
  39. package/dist/__tests__/decode-image-bytes-pass-through.test.d.ts.map +1 -0
  40. package/dist/__tests__/decode-image-bytes.browser.test.d.ts +2 -0
  41. package/dist/__tests__/decode-image-bytes.browser.test.d.ts.map +1 -0
  42. package/dist/__tests__/decode-image-bytes.test-d.d.ts +2 -0
  43. package/dist/__tests__/decode-image-bytes.test-d.d.ts.map +1 -0
  44. package/dist/__tests__/decode-image-bytes.test.d.ts +2 -0
  45. package/dist/__tests__/decode-image-bytes.test.d.ts.map +1 -0
  46. package/dist/__tests__/decode-image-mime-owner.test.d.ts +2 -0
  47. package/dist/__tests__/decode-image-mime-owner.test.d.ts.map +1 -0
  48. package/dist/__tests__/dynamic-texture-store.unit.test.d.ts +2 -0
  49. package/dist/__tests__/dynamic-texture-store.unit.test.d.ts.map +1 -0
  50. package/dist/__tests__/errors-asset.unit.test.d.ts +2 -0
  51. package/dist/__tests__/errors-asset.unit.test.d.ts.map +1 -0
  52. package/dist/__tests__/inline-pack-loaders.unit.test.d.ts +2 -0
  53. package/dist/__tests__/inline-pack-loaders.unit.test.d.ts.map +1 -0
  54. package/dist/__tests__/instantiate-context.unit.test.d.ts +2 -0
  55. package/dist/__tests__/instantiate-context.unit.test.d.ts.map +1 -0
  56. package/dist/__tests__/instantiate-publication-fence.unit.test.d.ts +2 -0
  57. package/dist/__tests__/instantiate-publication-fence.unit.test.d.ts.map +1 -0
  58. package/dist/__tests__/instantiate.unit.test.d.ts +2 -0
  59. package/dist/__tests__/instantiate.unit.test.d.ts.map +1 -0
  60. package/dist/__tests__/loader-input-contract.unit.test.d.ts +2 -0
  61. package/dist/__tests__/loader-input-contract.unit.test.d.ts.map +1 -0
  62. package/dist/__tests__/loader-registry.unit.test.d.ts +2 -0
  63. package/dist/__tests__/loader-registry.unit.test.d.ts.map +1 -0
  64. package/dist/__tests__/material-dependency-invalidation.unit.test.d.ts +2 -0
  65. package/dist/__tests__/material-dependency-invalidation.unit.test.d.ts.map +1 -0
  66. package/dist/__tests__/material-generation-cache.unit.test.d.ts +2 -0
  67. package/dist/__tests__/material-generation-cache.unit.test.d.ts.map +1 -0
  68. package/dist/__tests__/material-load-consumer.test-d.d.ts +2 -0
  69. package/dist/__tests__/material-load-consumer.test-d.d.ts.map +1 -0
  70. package/dist/__tests__/material-ready.integration.test.d.ts +2 -0
  71. package/dist/__tests__/material-ready.integration.test.d.ts.map +1 -0
  72. package/dist/__tests__/material-stale-generation.unit.test.d.ts +2 -0
  73. package/dist/__tests__/material-stale-generation.unit.test.d.ts.map +1 -0
  74. package/dist/__tests__/mesh-bin-morph-v3.test.d.ts +2 -0
  75. package/dist/__tests__/mesh-bin-morph-v3.test.d.ts.map +1 -0
  76. package/dist/__tests__/mesh-bin.unit.test.d.ts +2 -0
  77. package/dist/__tests__/mesh-bin.unit.test.d.ts.map +1 -0
  78. package/dist/__tests__/mipmap-generator.unit.test.d.ts +2 -0
  79. package/dist/__tests__/mipmap-generator.unit.test.d.ts.map +1 -0
  80. package/dist/__tests__/pack-artifact-transcode-model-owner.test.d.ts +2 -0
  81. package/dist/__tests__/pack-artifact-transcode-model-owner.test.d.ts.map +1 -0
  82. package/dist/__tests__/pack-basis-load.integration.test.d.ts +2 -0
  83. package/dist/__tests__/pack-basis-load.integration.test.d.ts.map +1 -0
  84. package/dist/__tests__/payload-validate.unit.test.d.ts +2 -0
  85. package/dist/__tests__/payload-validate.unit.test.d.ts.map +1 -0
  86. package/dist/__tests__/plugin.test.d.ts +2 -0
  87. package/dist/__tests__/plugin.test.d.ts.map +1 -0
  88. package/dist/__tests__/registry-concurrency.bench.test.d.ts +2 -0
  89. package/dist/__tests__/registry-concurrency.bench.test.d.ts.map +1 -0
  90. package/dist/__tests__/registry-failure-retry.integration.test.d.ts +2 -0
  91. package/dist/__tests__/registry-failure-retry.integration.test.d.ts.map +1 -0
  92. package/dist/__tests__/registry-load-graph.integration.test.d.ts +2 -0
  93. package/dist/__tests__/registry-load-graph.integration.test.d.ts.map +1 -0
  94. package/dist/__tests__/registry-load-state.unit.test.d.ts +2 -0
  95. package/dist/__tests__/registry-load-state.unit.test.d.ts.map +1 -0
  96. package/dist/__tests__/registry-package-cache.unit.test.d.ts +2 -0
  97. package/dist/__tests__/registry-package-cache.unit.test.d.ts.map +1 -0
  98. package/dist/__tests__/registry-public-ready.unit.test.d.ts +2 -0
  99. package/dist/__tests__/registry-public-ready.unit.test.d.ts.map +1 -0
  100. package/dist/__tests__/resolve-asset-handle.unit.test.d.ts +2 -0
  101. package/dist/__tests__/resolve-asset-handle.unit.test.d.ts.map +1 -0
  102. package/dist/__tests__/scene-handle-fields.unit.test.d.ts +2 -0
  103. package/dist/__tests__/scene-handle-fields.unit.test.d.ts.map +1 -0
  104. package/dist/__tests__/scene-payload.unit.test.d.ts +2 -0
  105. package/dist/__tests__/scene-payload.unit.test.d.ts.map +1 -0
  106. package/dist/__tests__/scene-publication-fence.test.d.ts +2 -0
  107. package/dist/__tests__/scene-publication-fence.test.d.ts.map +1 -0
  108. package/dist/__tests__/scriptable-pack-public-surface.test-d.d.ts +2 -0
  109. package/dist/__tests__/scriptable-pack-public-surface.test-d.d.ts.map +1 -0
  110. package/dist/__tests__/static-rig.integration.test.d.ts +2 -0
  111. package/dist/__tests__/static-rig.integration.test.d.ts.map +1 -0
  112. package/dist/__tests__/validate-material.unit.test.d.ts +2 -0
  113. package/dist/__tests__/validate-material.unit.test.d.ts.map +1 -0
  114. package/dist/__tests__/video-pack-loader.integration.test.d.ts +2 -0
  115. package/dist/__tests__/video-pack-loader.integration.test.d.ts.map +1 -0
  116. package/dist/aabb.d.ts +3 -0
  117. package/dist/aabb.d.ts.map +1 -0
  118. package/dist/asset-kind.d.ts +4 -0
  119. package/dist/asset-kind.d.ts.map +1 -0
  120. package/dist/asset-registry.d.ts +554 -0
  121. package/dist/asset-registry.d.ts.map +1 -0
  122. package/dist/builtin-asset-registry.d.ts +22 -0
  123. package/dist/builtin-asset-registry.d.ts.map +1 -0
  124. package/dist/catalog-source.d.ts +24 -0
  125. package/dist/catalog-source.d.ts.map +1 -0
  126. package/dist/decode-image-bytes.d.ts +57 -0
  127. package/dist/decode-image-bytes.d.ts.map +1 -0
  128. package/dist/dynamic-texture-store.d.ts +89 -0
  129. package/dist/dynamic-texture-store.d.ts.map +1 -0
  130. package/dist/errors/asset.d.ts +201 -0
  131. package/dist/errors/asset.d.ts.map +1 -0
  132. package/dist/handles.d.ts +143 -0
  133. package/dist/handles.d.ts.map +1 -0
  134. package/dist/image-error.d.ts +6 -0
  135. package/dist/image-error.d.ts.map +1 -0
  136. package/dist/index.d.ts +34 -0
  137. package/dist/index.d.ts.map +1 -0
  138. package/dist/index.mjs +8359 -0
  139. package/dist/index.mjs.map +1 -0
  140. package/dist/internal/artifact-cache.d.ts +17 -0
  141. package/dist/internal/artifact-cache.d.ts.map +1 -0
  142. package/dist/internal/asset-graph.d.ts +70 -0
  143. package/dist/internal/asset-graph.d.ts.map +1 -0
  144. package/dist/internal/catalog-session.d.ts +60 -0
  145. package/dist/internal/catalog-session.d.ts.map +1 -0
  146. package/dist/internal/decoder-registry.d.ts +19 -0
  147. package/dist/internal/decoder-registry.d.ts.map +1 -0
  148. package/dist/internal/immutable-payload.d.ts +9 -0
  149. package/dist/internal/immutable-payload.d.ts.map +1 -0
  150. package/dist/internal/load-asset.d.ts +31 -0
  151. package/dist/internal/load-asset.d.ts.map +1 -0
  152. package/dist/internal/pack-reader.d.ts +18 -0
  153. package/dist/internal/pack-reader.d.ts.map +1 -0
  154. package/dist/internal/validate-runtime-row.d.ts +7 -0
  155. package/dist/internal/validate-runtime-row.d.ts.map +1 -0
  156. package/dist/internal.d.ts +3 -0
  157. package/dist/internal.d.ts.map +1 -0
  158. package/dist/internal.mjs +329 -0
  159. package/dist/internal.mjs.map +1 -0
  160. package/dist/loader-registry.d.ts +63 -0
  161. package/dist/loader-registry.d.ts.map +1 -0
  162. package/dist/loaders/inline-pack.d.ts +72 -0
  163. package/dist/loaders/inline-pack.d.ts.map +1 -0
  164. package/dist/loaders/mesh-bin.d.ts +21 -0
  165. package/dist/loaders/mesh-bin.d.ts.map +1 -0
  166. package/dist/loaders/pack-artifact.d.ts +20 -0
  167. package/dist/loaders/pack-artifact.d.ts.map +1 -0
  168. package/dist/material/dependency-graph.d.ts +9 -0
  169. package/dist/material/dependency-graph.d.ts.map +1 -0
  170. package/dist/material/generation-cache.d.ts +24 -0
  171. package/dist/material/generation-cache.d.ts.map +1 -0
  172. package/dist/material/inspection.d.ts +24 -0
  173. package/dist/material/inspection.d.ts.map +1 -0
  174. package/dist/material/loader.d.ts +59 -0
  175. package/dist/material/loader.d.ts.map +1 -0
  176. package/dist/material/runtime-shader.d.ts +14 -0
  177. package/dist/material/runtime-shader.d.ts.map +1 -0
  178. package/dist/mesh-bin.d.ts +3 -0
  179. package/dist/mesh-bin.d.ts.map +1 -0
  180. package/dist/mipmap-generator.d.ts +132 -0
  181. package/dist/mipmap-generator.d.ts.map +1 -0
  182. package/dist/payload-validate.d.ts +60 -0
  183. package/dist/payload-validate.d.ts.map +1 -0
  184. package/dist/plugin.d.ts +16 -0
  185. package/dist/plugin.d.ts.map +1 -0
  186. package/dist/registry/artifact-io.d.ts +16 -0
  187. package/dist/registry/artifact-io.d.ts.map +1 -0
  188. package/dist/registry/asset-evidence.d.ts +13 -0
  189. package/dist/registry/asset-evidence.d.ts.map +1 -0
  190. package/dist/registry/catalog-state.d.ts +47 -0
  191. package/dist/registry/catalog-state.d.ts.map +1 -0
  192. package/dist/registry/catalog.d.ts +48 -0
  193. package/dist/registry/catalog.d.ts.map +1 -0
  194. package/dist/registry/instantiate.d.ts +153 -0
  195. package/dist/registry/instantiate.d.ts.map +1 -0
  196. package/dist/registry/load-by-guid.d.ts +247 -0
  197. package/dist/registry/load-by-guid.d.ts.map +1 -0
  198. package/dist/registry/load-state.d.ts +26 -0
  199. package/dist/registry/load-state.d.ts.map +1 -0
  200. package/dist/registry/runtime-projection.d.ts +16 -0
  201. package/dist/registry/runtime-projection.d.ts.map +1 -0
  202. package/dist/registry/scene-publication-fence.d.ts +38 -0
  203. package/dist/registry/scene-publication-fence.d.ts.map +1 -0
  204. package/dist/registry/validate-material.d.ts +77 -0
  205. package/dist/registry/validate-material.d.ts.map +1 -0
  206. package/dist/resolve-asset-handle.d.ts +43 -0
  207. package/dist/resolve-asset-handle.d.ts.map +1 -0
  208. package/dist/resolve-tileset-runtime.d.ts +23 -0
  209. package/dist/resolve-tileset-runtime.d.ts.map +1 -0
  210. package/dist/scene-handle-fields.d.ts +88 -0
  211. package/dist/scene-handle-fields.d.ts.map +1 -0
  212. package/dist/scene-payload.d.ts +15 -0
  213. package/dist/scene-payload.d.ts.map +1 -0
  214. package/dist/wire-default-loaders.d.ts +29 -0
  215. package/dist/wire-default-loaders.d.ts.map +1 -0
  216. package/package.json +76 -0
  217. package/src/__tests__/aabb.unit.test.ts +97 -0
  218. package/src/__tests__/artifact-integrity.unit.test.ts +99 -0
  219. package/src/__tests__/artifact-io.unit.test.ts +127 -0
  220. package/src/__tests__/asset-evidence-sdk.integration.test.ts +32 -0
  221. package/src/__tests__/asset-evidence.unit.test.ts +32 -0
  222. package/src/__tests__/asset-kind.unit.test.ts +14 -0
  223. package/src/__tests__/asset-registry-catalog-reconcile.integration.test.ts +74 -0
  224. package/src/__tests__/asset-registry-catalog-reconcile.unit.test.ts +89 -0
  225. package/src/__tests__/asset-registry-catalog.unit.test.ts +170 -0
  226. package/src/__tests__/asset-registry.pack-cache.test.ts +96 -0
  227. package/src/__tests__/asset-registry.unit.test.ts +511 -0
  228. package/src/__tests__/asset-runtime-error-code-owner.test-d.ts +63 -0
  229. package/src/__tests__/catalog-replica.unit.test.ts +196 -0
  230. package/src/__tests__/catalog-source-v2.unit.test.ts +158 -0
  231. package/src/__tests__/catalog-source.unit.test.ts +126 -0
  232. package/src/__tests__/catalog-subscription-order.unit.test.ts +65 -0
  233. package/src/__tests__/catalog-subscription.unit.test.ts +28 -0
  234. package/src/__tests__/decode-image-bytes-pass-through.test.ts +34 -0
  235. package/src/__tests__/decode-image-bytes.browser.test.ts +102 -0
  236. package/src/__tests__/decode-image-bytes.test-d.ts +108 -0
  237. package/src/__tests__/decode-image-bytes.test.ts +90 -0
  238. package/src/__tests__/decode-image-mime-owner.test.ts +38 -0
  239. package/src/__tests__/dynamic-texture-store.unit.test.ts +115 -0
  240. package/src/__tests__/errors-asset.unit.test.ts +92 -0
  241. package/src/__tests__/inline-pack-loaders.unit.test.ts +548 -0
  242. package/src/__tests__/instantiate-context.unit.test.ts +65 -0
  243. package/src/__tests__/instantiate-publication-fence.unit.test.ts +158 -0
  244. package/src/__tests__/instantiate.unit.test.ts +684 -0
  245. package/src/__tests__/loader-input-contract.unit.test.ts +89 -0
  246. package/src/__tests__/loader-registry.unit.test.ts +101 -0
  247. package/src/__tests__/material-dependency-invalidation.unit.test.ts +14 -0
  248. package/src/__tests__/material-generation-cache.unit.test.ts +46 -0
  249. package/src/__tests__/material-load-consumer.test-d.ts +42 -0
  250. package/src/__tests__/material-ready.integration.test.ts +508 -0
  251. package/src/__tests__/material-stale-generation.unit.test.ts +147 -0
  252. package/src/__tests__/mesh-bin-morph-v3.test.ts +22 -0
  253. package/src/__tests__/mesh-bin.unit.test.ts +152 -0
  254. package/src/__tests__/mipmap-generator.unit.test.ts +202 -0
  255. package/src/__tests__/pack-artifact-transcode-model-owner.test.ts +32 -0
  256. package/src/__tests__/pack-basis-load.integration.test.ts +168 -0
  257. package/src/__tests__/payload-validate.unit.test.ts +285 -0
  258. package/src/__tests__/plugin.test.ts +55 -0
  259. package/src/__tests__/registry-concurrency.bench.test.ts +40 -0
  260. package/src/__tests__/registry-failure-retry.integration.test.ts +69 -0
  261. package/src/__tests__/registry-load-graph.integration.test.ts +246 -0
  262. package/src/__tests__/registry-load-state.unit.test.ts +35 -0
  263. package/src/__tests__/registry-package-cache.unit.test.ts +53 -0
  264. package/src/__tests__/registry-public-ready.unit.test.ts +38 -0
  265. package/src/__tests__/resolve-asset-handle.unit.test.ts +238 -0
  266. package/src/__tests__/scene-handle-fields.unit.test.ts +129 -0
  267. package/src/__tests__/scene-payload.unit.test.ts +151 -0
  268. package/src/__tests__/scene-publication-fence.test.ts +129 -0
  269. package/src/__tests__/scriptable-pack-public-surface.test-d.ts +27 -0
  270. package/src/__tests__/static-rig.integration.test.ts +8 -0
  271. package/src/__tests__/validate-material.unit.test.ts +359 -0
  272. package/src/__tests__/video-pack-loader.integration.test.ts +83 -0
  273. package/src/aabb.ts +107 -0
  274. package/src/asset-kind.ts +6 -0
  275. package/src/asset-registry.ts +2045 -0
  276. package/src/builtin-asset-registry.ts +164 -0
  277. package/src/catalog-source.ts +89 -0
  278. package/src/decode-image-bytes.ts +126 -0
  279. package/src/dynamic-texture-store.ts +234 -0
  280. package/src/errors/asset.ts +347 -0
  281. package/src/handles.ts +186 -0
  282. package/src/image-error.ts +45 -0
  283. package/src/index.ts +189 -0
  284. package/src/internal/artifact-cache.ts +65 -0
  285. package/src/internal/asset-graph.ts +420 -0
  286. package/src/internal/catalog-session.ts +345 -0
  287. package/src/internal/decoder-registry.ts +175 -0
  288. package/src/internal/immutable-payload.ts +20 -0
  289. package/src/internal/load-asset.ts +254 -0
  290. package/src/internal/pack-reader.ts +183 -0
  291. package/src/internal/validate-runtime-row.ts +51 -0
  292. package/src/internal.ts +6 -0
  293. package/src/loader-registry.ts +157 -0
  294. package/src/loaders/inline-pack.ts +837 -0
  295. package/src/loaders/mesh-bin.ts +304 -0
  296. package/src/loaders/pack-artifact.ts +665 -0
  297. package/src/material/dependency-graph.ts +46 -0
  298. package/src/material/generation-cache.ts +177 -0
  299. package/src/material/inspection.ts +46 -0
  300. package/src/material/loader.ts +326 -0
  301. package/src/material/runtime-shader.ts +133 -0
  302. package/src/mesh-bin.ts +5 -0
  303. package/src/mipmap-generator.ts +450 -0
  304. package/src/payload-validate.ts +573 -0
  305. package/src/plugin.ts +48 -0
  306. package/src/registry/artifact-io.ts +259 -0
  307. package/src/registry/asset-evidence.ts +51 -0
  308. package/src/registry/catalog-state.ts +409 -0
  309. package/src/registry/catalog.ts +369 -0
  310. package/src/registry/instantiate.ts +1056 -0
  311. package/src/registry/load-by-guid.ts +1657 -0
  312. package/src/registry/load-state.ts +115 -0
  313. package/src/registry/runtime-projection.ts +63 -0
  314. package/src/registry/scene-publication-fence.ts +256 -0
  315. package/src/registry/validate-material.ts +385 -0
  316. package/src/resolve-asset-handle.ts +147 -0
  317. package/src/resolve-tileset-runtime.ts +72 -0
  318. package/src/scene-handle-fields.ts +221 -0
  319. package/src/scene-payload.ts +207 -0
  320. package/src/wire-default-loaders.ts +79 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/internal/validate-runtime-row.ts","../src/internal/catalog-session.ts","../src/internal/load-asset.ts"],"names":["err","ok"],"mappings":";;;AAOA,SAAS,UAAA,CAAW,MAAc,MAAA,EAA+C;AAC/E,EAAA,OAAO,GAAA,CAAI;AAAA,IACT,IAAA,EAAM,uBAAA;AAAA,IACN,QAAA,EAAU,0CAAA;AAAA,IACV,IAAA,EAAM,4DAAA;AAAA,IACN,MAAA,EAAQ,EAAE,IAAA,EAAM,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,IAAM,iBAAA,mBAAoB,MAAA,CAAO,GAAA,CAAI,0CAA0C,CAAA;AAKxE,SAAS,yBAAyB,QAAA,EAAgD;AACvF,EAAA,MAAM,QAAA,GAAY,SAAkC,iBAAiB,CAAA;AACrE,EAAA,IAAI,aAAa,MAAA,EAAW;AAC1B,IAAA,MAAM,IAAI,UAAU,2DAA2D,CAAA;AAAA,EACjF;AACA,EAAA,OAAO,QAAA;AACT","file":"internal.mjs","sourcesContent":["import type { CatalogEntry } from '@forgeax/engine-types';\nimport { type AssetLoadError, err, ok, type Result } from '@forgeax/engine-types';\n\nexport interface RuntimeCatalogRow extends CatalogEntry {\n readonly publication: NonNullable<CatalogEntry['publication']>;\n}\n\nfunction invalidRow(guid: string, reason: string): Result<never, AssetLoadError> {\n return err({\n code: 'asset-package-invalid',\n expected: 'one complete current runtime Catalog row',\n hint: 'rebuild the producer Catalog and publish one Pack v2 tuple',\n detail: { guid, reason },\n });\n}\n\nexport function validateRuntimeRow(row: CatalogEntry): Result<RuntimeCatalogRow, AssetLoadError> {\n if (row === null || typeof row !== 'object') return invalidRow('', 'row');\n const candidate = row as Partial<CatalogEntry>;\n const guid = typeof candidate.guid === 'string' ? candidate.guid : '';\n if (guid.trim().length === 0) return invalidRow(guid, 'guid');\n if (typeof candidate.kind !== 'string' || candidate.kind.trim().length === 0)\n return invalidRow(guid, 'kind');\n if (typeof candidate.packageUrl !== 'string' || candidate.packageUrl.trim().length === 0)\n return invalidRow(guid, 'packageUrl');\n if (typeof candidate.sourcePath !== 'string' || candidate.sourcePath.trim().length === 0)\n return invalidRow(guid, 'sourcePath');\n if (!Number.isSafeInteger(candidate.publication?.generation))\n return invalidRow(guid, 'publication generation');\n if (candidate.publication === undefined) return invalidRow(guid, 'publication');\n const publication = candidate.publication;\n if (\n publication.schemaVersion !== 'asset-publication/1' ||\n typeof publication.sourcePath !== 'string' ||\n publication.sourcePath.trim().length === 0 ||\n typeof publication.sourceRevision !== 'string' ||\n publication.sourceRevision.trim().length === 0 ||\n publication.generation < 0 ||\n typeof publication.digest !== 'string' ||\n publication.digest.trim().length === 0 ||\n typeof publication.outputSetDigest !== 'string' ||\n publication.outputSetDigest.trim().length === 0 ||\n !Array.isArray(publication.outputs) ||\n publication.receipt === null ||\n typeof publication.receipt !== 'object' ||\n !Array.isArray(publication.externalEvidence)\n ) {\n return invalidRow(guid, 'publication tuple');\n }\n return ok(Object.freeze({ ...candidate, guid, publication }) as RuntimeCatalogRow);\n}\n","import type {\n CatalogDelta,\n CatalogDiagnostic,\n CatalogEntry,\n ResourceRevision,\n} from '@forgeax/engine-types';\nimport { type AssetLoadError, err, ok, type Result } from '@forgeax/engine-types';\nimport type { CatalogSource } from '../catalog-source.js';\nimport { type RuntimeCatalogRow, validateRuntimeRow } from './validate-runtime-row.js';\n\nexport interface CatalogSessionOptions {\n readonly scopeId?: string;\n readonly generation?: number;\n}\n\nexport interface CatalogSessionSnapshot {\n readonly scopeId: string;\n readonly generation: number;\n readonly epoch: number;\n readonly revision?: ResourceRevision;\n readonly entries: readonly RuntimeCatalogRow[];\n readonly changed: readonly string[];\n readonly removed: readonly string[];\n readonly diagnostics: readonly CatalogDiagnostic[];\n readonly listenerFailures: number;\n readonly stale: boolean;\n}\n\ntype SessionResult = Result<CatalogSessionSnapshot, AssetLoadError>;\ntype SessionListener = (snapshot: CatalogSessionSnapshot) => void;\n\nfunction runtimeError(\n code: AssetLoadError['code'],\n guid: string,\n detail: Record<string, unknown>,\n): AssetLoadError {\n if (code === 'catalog-discontinuous') {\n return {\n code,\n expected: 'an ordered catalog revision window',\n hint: 'reconcile the current Catalog before consuming this delta',\n detail: {\n scopeId: String(detail.scopeId ?? 'unknown'),\n expectedGeneration: Number(detail.expectedGeneration ?? 0),\n actualGeneration: Number(detail.actualGeneration ?? 0),\n },\n };\n }\n return {\n code: 'asset-package-invalid',\n expected: 'a verified Catalog source',\n hint: 'repair the producer Catalog and retry with the current publication',\n detail: { guid, reason: String(detail.reason ?? 'catalog source failed') },\n };\n}\n\nfunction freezeSnapshot(snapshot: CatalogSessionSnapshot): CatalogSessionSnapshot {\n return Object.freeze({\n ...snapshot,\n entries: Object.freeze([...snapshot.entries]),\n changed: Object.freeze([...snapshot.changed]),\n removed: Object.freeze([...snapshot.removed]),\n diagnostics: Object.freeze([...snapshot.diagnostics]),\n });\n}\n\nfunction sameEntry(left: CatalogEntry, right: CatalogEntry): boolean {\n return JSON.stringify(left) === JSON.stringify(right);\n}\n\nfunction key(guid: string): string {\n return guid.toLowerCase();\n}\n\nexport class CatalogSession {\n private readonly source: CatalogSource;\n private readonly scopeId: string;\n private readonly generation: number;\n private readonly entries = new Map<string, RuntimeCatalogRow>();\n private readonly listeners = new Set<SessionListener>();\n private unsubscribe: (() => void) | undefined;\n private baselinePromise: Promise<SessionResult> | undefined;\n private reconcilePromise: Promise<SessionResult> | undefined;\n private pending: CatalogDelta[] = [];\n private currentSnapshot: CatalogSessionSnapshot;\n private revision: ResourceRevision | undefined;\n private diagnostics: CatalogDiagnostic[] = [];\n private listenerFailures = 0;\n private changed = new Set<string>();\n private removed = new Set<string>();\n private epoch = 0;\n private stale = false;\n private staleGeneration = 0;\n private started = false;\n private disposed = false;\n\n constructor(source: CatalogSource, options: CatalogSessionOptions = {}) {\n this.source = source;\n this.scopeId = options.scopeId ?? source.expectedScope?.scopeId ?? 'asset-runtime';\n this.generation = options.generation ?? source.expectedScope?.generation ?? 0;\n this.currentSnapshot = freezeSnapshot({\n scopeId: this.scopeId,\n generation: this.generation,\n epoch: 0,\n entries: [],\n changed: [],\n removed: [],\n diagnostics: [],\n listenerFailures: 0,\n stale: false,\n });\n }\n\n start(): Promise<SessionResult> {\n if (this.baselinePromise !== undefined) return this.baselinePromise;\n if (this.disposed) return Promise.resolve(err(this.disposedError()));\n this.unsubscribe = this.source.subscribe((delta) => this.receive(delta));\n const promise = this.source\n .enumerate()\n .then((result) => {\n if (!result.ok) {\n this.markStale();\n this.publish();\n return err(runtimeError('asset-package-invalid', '', { reason: result.error.code }));\n }\n this.entries.clear();\n for (const entry of result.value) {\n const validated = validateRuntimeRow(entry);\n if (!validated.ok) {\n this.markStale();\n this.publish();\n return err(validated.error);\n }\n this.entries.set(key(validated.value.guid), validated.value);\n }\n this.started = true;\n this.stale = false;\n this.staleGeneration = this.generation;\n this.diagnostics = [];\n for (const delta of this.pending) this.fold(delta, false);\n this.pending = [];\n this.publish();\n return ok(this.currentSnapshot);\n })\n .catch((cause: unknown) => {\n this.markStale();\n this.addDiagnostic('catalog-degraded-rows', 'Catalog enumeration must resolve a Result');\n this.publish();\n return err(\n runtimeError('asset-package-invalid', '', {\n reason: cause instanceof Error ? cause.message : String(cause),\n }),\n );\n });\n this.baselinePromise = promise;\n void promise.then(\n (result) => {\n if (!result.ok) this.baselinePromise = undefined;\n },\n () => {\n this.baselinePromise = undefined;\n },\n );\n return promise;\n }\n\n reconcile(): Promise<SessionResult> {\n if (this.disposed) return Promise.resolve(err(this.disposedError()));\n if (this.reconcilePromise !== undefined) return this.reconcilePromise;\n this.unsubscribe?.();\n this.unsubscribe = undefined;\n this.started = false;\n this.pending = [];\n this.baselinePromise = undefined;\n this.epoch += 1;\n const promise = this.start();\n this.reconcilePromise = promise;\n void promise.then(\n () => {\n if (this.reconcilePromise === promise) this.reconcilePromise = undefined;\n },\n () => {\n if (this.reconcilePromise === promise) this.reconcilePromise = undefined;\n },\n );\n return promise;\n }\n\n current(guid: string): RuntimeCatalogRow | undefined {\n return this.entries.get(key(guid));\n }\n\n snapshot(): CatalogSessionSnapshot {\n return this.currentSnapshot;\n }\n\n discontinuity(): AssetLoadError | undefined {\n if (!this.stale) return undefined;\n return {\n code: 'catalog-discontinuous',\n expected: 'an ordered, authoritative catalog revision window',\n hint: 'reconcile the Catalog source and retry the current publication',\n detail: {\n scopeId: this.scopeId,\n expectedGeneration: this.generation,\n actualGeneration: this.staleGeneration,\n },\n };\n }\n\n subscribe(listener: SessionListener): () => void {\n this.listeners.add(listener);\n return () => this.listeners.delete(listener);\n }\n\n dispose(): void {\n if (this.disposed) return;\n this.disposed = true;\n this.unsubscribe?.();\n this.unsubscribe = undefined;\n this.pending = [];\n this.listeners.clear();\n }\n\n private receive(delta: CatalogDelta): void {\n if (this.disposed) return;\n if (!this.started) {\n this.pending.push(delta);\n return;\n }\n this.fold(delta, true);\n }\n\n private fold(delta: CatalogDelta, publish: boolean): void {\n if (\n (delta.scopeId !== undefined && delta.scopeId !== this.scopeId) ||\n (delta.generation !== undefined && delta.generation !== this.generation)\n ) {\n this.markStale(delta.generation);\n this.addDiagnostic('catalog-scope-mismatch', 'delta scope does not match the session');\n if (publish) this.publish();\n return;\n }\n if (delta.authority === 'degraded') {\n this.markStale(delta.generation);\n this.addDiagnostic('catalog-degraded-rows', 'degraded rows are not identity-bearing');\n if (publish) this.publish();\n return;\n }\n if (delta.revisions !== undefined) {\n const baseline = delta.revisions.baseline;\n const current = delta.revisions.current;\n const valid =\n baseline.length === current.length &&\n current.every((point) => {\n const prior = baseline.find((item) => item.rootId === point.rootId);\n return prior !== undefined && point.revision === prior.revision + 1;\n });\n if (!valid) {\n this.markStale(delta.generation);\n this.addDiagnostic('catalog-gap', 'delta revision window is not contiguous');\n if (publish) this.publish();\n return;\n }\n }\n let changed = false;\n for (const entry of [...delta.added, ...delta.changed]) {\n const validated = validateRuntimeRow(entry);\n if (!validated.ok) {\n this.markStale(delta.generation);\n this.addDiagnostic('catalog-degraded-rows', 'delta contains an invalid runtime row');\n if (publish) this.publish();\n return;\n }\n const entryKey = key(validated.value.guid);\n const prior = this.entries.get(entryKey);\n if (prior === undefined || !sameEntry(prior, validated.value)) {\n this.entries.set(entryKey, validated.value);\n this.changed.add(entryKey);\n changed = true;\n if (validated.value.revision !== undefined) this.revision = validated.value.revision;\n }\n }\n for (const guid of delta.removed) {\n const entryKey = key(guid);\n if (this.entries.delete(entryKey)) {\n this.removed.add(entryKey);\n changed = true;\n }\n }\n if (changed) this.epoch += 1;\n if (publish) this.publish();\n }\n\n private addDiagnostic(code: CatalogDiagnostic['code'], expected: string): void {\n if (this.diagnostics.some((diagnostic) => diagnostic.code === code)) return;\n this.diagnostics.push({\n code,\n severity: 'blocking',\n expected,\n hint: 'reconcile the Catalog before loading the affected publication',\n authority: 'catalog',\n });\n }\n\n private markStale(actualGeneration = this.generation): void {\n this.stale = true;\n this.staleGeneration = actualGeneration;\n this.epoch += 1;\n }\n\n private publish(): void {\n this.currentSnapshot = freezeSnapshot({\n scopeId: this.scopeId,\n generation: this.generation,\n epoch: this.epoch,\n ...(this.revision === undefined ? {} : { revision: this.revision }),\n entries: [...this.entries.values()].sort((left, right) =>\n key(left.guid).localeCompare(key(right.guid)),\n ),\n changed: [...this.changed].sort(),\n removed: [...this.removed].sort(),\n diagnostics: this.diagnostics,\n listenerFailures: this.listenerFailures,\n stale: this.stale,\n });\n this.changed.clear();\n this.removed.clear();\n for (const listener of [...this.listeners]) {\n try {\n listener(this.currentSnapshot);\n } catch {\n this.listenerFailures = Math.min(1024, this.listenerFailures + 1);\n this.currentSnapshot = freezeSnapshot({\n ...this.currentSnapshot,\n listenerFailures: this.listenerFailures,\n });\n }\n }\n }\n\n private disposedError(): AssetLoadError {\n return runtimeError('asset-runtime-disposed', '', { scopeId: this.scopeId });\n }\n}\n","import type {\n Asset,\n AssetArtifactReader,\n AssetDecoder,\n AssetDecoderInput,\n AssetDecoderLease,\n AssetKind,\n AssetLoadError,\n BuiltinAssetKind,\n BuiltinAssetPayload,\n Result,\n} from '@forgeax/engine-types';\nimport { err, ok } from '@forgeax/engine-types';\nimport type { CatalogSource } from '../catalog-source.js';\nimport { ArtifactCache } from './artifact-cache.js';\nimport { AssetGraph, type AssetGraphSnapshot } from './asset-graph.js';\nimport { CatalogSession, type CatalogSessionOptions } from './catalog-session.js';\nimport { DecoderRegistry } from './decoder-registry.js';\nimport { freezeRuntimePayload } from './immutable-payload.js';\nimport { PackReader } from './pack-reader.js';\nimport { validateRuntimeRow } from './validate-runtime-row.js';\n\nexport interface AssetRegistryOptions extends CatalogSessionOptions {\n readonly catalog: CatalogSource;\n readonly fetcher?: typeof globalThis.fetch;\n readonly maxConcurrentReads?: number;\n}\n\nexport interface AssetLoadOptions {\n readonly signal?: AbortSignal;\n}\n\nexport type AssetRegistrySnapshot = AssetGraphSnapshot;\n\nexport type AssetRegistrySnapshotCounters = AssetRegistrySnapshot['counters'];\n\nexport interface AssetRegistry {\n installDecoder<P, K extends string>(\n kind: AssetKind<P, K>,\n decoder: AssetDecoder<P>,\n ): AssetDecoderLease;\n load<K extends BuiltinAssetKind>(\n guid: string,\n kind: K,\n options?: AssetLoadOptions,\n ): Promise<Result<BuiltinAssetPayload<K>, AssetLoadError>>;\n load<P, K extends string>(\n guid: string,\n kind: AssetKind<P, K>,\n options?: AssetLoadOptions,\n ): Promise<Result<P, AssetLoadError>>;\n snapshot(): AssetRegistrySnapshot;\n subscribe(listener: (snapshot: AssetRegistrySnapshot) => void): () => void;\n dispose(): void;\n}\n\n/** Internal render projection; the root Registry keeps only its five actions. */\nexport interface AssetRegistryResolver {\n readonly epoch: number;\n lookup<T extends Asset>(guid: string): T | undefined;\n guidOf(asset: Asset): string | undefined;\n}\n\nconst REGISTRY_RESOLVER = Symbol.for('forgeax.assets-runtime.registry-resolver');\ntype RegistryWithResolver = AssetRegistry & {\n [REGISTRY_RESOLVER]?: AssetRegistryResolver;\n};\n\nexport function getAssetRegistryResolver(registry: AssetRegistry): AssetRegistryResolver {\n const resolver = (registry as RegistryWithResolver)[REGISTRY_RESOLVER];\n if (resolver === undefined) {\n throw new TypeError('AssetRegistry resolver is not owned by this asset runtime');\n }\n return resolver;\n}\n\nfunction missing(guid: string): AssetLoadError {\n return {\n code: 'asset-not-found',\n expected: `the current Catalog to contain GUID \"${guid}\"`,\n hint: 'inspect the producer Catalog and rebuild the missing publication',\n detail: { guid },\n };\n}\n\nfunction mismatch(guid: string, expectedKind: string, actualKind: string): AssetLoadError {\n return {\n code: 'asset-kind-mismatch',\n expected: `Catalog kind \"${actualKind}\" to match \"${expectedKind}\"`,\n hint: 'pass the Catalog kind or the matching custom AssetKind token',\n detail: { guid, expectedKind, actualKind },\n };\n}\n\nfunction artifactError(guid: string, reason: string): AssetLoadError {\n return {\n code: 'asset-integrity-failed',\n expected: 'the verified artifact byte length and digest',\n hint: 'verify the artifact digest and recook the Pack',\n detail: {\n guid,\n artifactKey: reason,\n expectedDigest: 'descriptor integrity',\n actualDigest: reason,\n },\n };\n}\n\nconst ASSET_GUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\nfunction invalidGuid(guid: string): AssetLoadError {\n return {\n code: 'asset-guid-invalid',\n expected: 'a 36-character dash-form asset GUID',\n hint: 'pass the producer GUID from the current Catalog row',\n detail: { guid },\n };\n}\n\nexport function createAssetRegistry(options: AssetRegistryOptions): AssetRegistry {\n const session = new CatalogSession(options.catalog, options);\n const reader = new PackReader(options.fetcher === undefined ? {} : { fetcher: options.fetcher });\n const cache = new ArtifactCache();\n const decoders = new DecoderRegistry(\n options.scopeId === undefined ? {} : { scopeId: options.scopeId },\n );\n const graph = new AssetGraph<{ readonly value: unknown; readonly refs: readonly string[] }>({\n ...(options.maxConcurrentReads === undefined\n ? {}\n : { maxConcurrentReads: options.maxConcurrentReads }),\n read: async (guid, signal) => {\n const row = session.current(guid);\n if (row === undefined) return err(missing(guid));\n const validated = validateRuntimeRow(row);\n if (!validated.ok) return validated;\n const publication = validated.value.publication;\n const tuple = {\n scopeId: session.snapshot().scopeId,\n generation: publication.generation,\n digest: publication.digest,\n outputSetDigest: publication.outputSetDigest,\n };\n const pack = await reader.read(row.packageUrl, tuple, signal);\n if (!pack.ok) return pack;\n const envelope = pack.value.assets.find(\n (asset) => asset.guid.toLowerCase() === guid.toLowerCase(),\n );\n if (envelope === undefined) return err(missing(guid));\n const artifacts: AssetArtifactReader = {\n read: (descriptor) => {\n const integrity = descriptor.integrity;\n if (integrity === undefined)\n return Promise.resolve(err(artifactError(guid, descriptor.path)));\n const key = `${tuple.scopeId}:${tuple.generation}:${tuple.outputSetDigest}:${integrity.digest}`;\n return cache.read(key, async () => {\n const url = resolveArtifactUrl(row.packageUrl, descriptor.path);\n let response: Response;\n try {\n response = await (options.fetcher ?? globalThis.fetch)(url, { signal });\n } catch {\n return err(artifactError(guid, descriptor.path));\n }\n if (!response.ok) return err(artifactError(guid, descriptor.path));\n const bytes = new Uint8Array(await response.arrayBuffer());\n if (descriptor.byteLength === undefined || bytes.byteLength !== descriptor.byteLength) {\n return err(artifactError(guid, descriptor.path));\n }\n const actualDigest = await sha256(bytes);\n if (actualDigest !== descriptor.integrity?.digest.toLowerCase()) {\n return err(artifactError(guid, `${descriptor.path}:${actualDigest}`));\n }\n return ok(bytes);\n });\n },\n };\n const input: AssetDecoderInput<unknown> = { envelope, artifacts, signal };\n const decoded = await decoders.loadByKind(envelope.kind, input);\n if (!decoded.ok) return decoded;\n return ok({ value: freezeRuntimePayload(decoded.value), refs: envelope.refs });\n },\n });\n\n let catalogEpoch = session.snapshot().epoch;\n const unsubscribeCatalog = session.subscribe((snapshot) => {\n if (snapshot.epoch === catalogEpoch) return;\n catalogEpoch = snapshot.epoch;\n graph.invalidateForCatalogChange(\n snapshot.stale ? undefined : [...snapshot.changed, ...snapshot.removed],\n );\n });\n\n const registry: AssetRegistry = {\n installDecoder: (kind, decoder) => decoders.install(kind, decoder),\n load: (async (\n guid: string,\n kind: BuiltinAssetKind | AssetKind<unknown, string>,\n loadOptions: AssetLoadOptions = {},\n ): Promise<Result<unknown, AssetLoadError>> => {\n if (!ASSET_GUID_PATTERN.test(guid)) return err(invalidGuid(guid));\n const expectedKind = typeof kind === 'string' ? kind : kind.kind;\n const started = await session.start();\n if (!started.ok) return err(started.error);\n if (session.snapshot().stale) {\n const reconciled = await session.reconcile();\n if (!reconciled.ok) return err(reconciled.error);\n const discontinuity = session.discontinuity();\n if (discontinuity !== undefined) return err(discontinuity);\n }\n const row = session.current(guid);\n if (row === undefined) return err(missing(guid));\n if (row.kind !== expectedKind) return err(mismatch(guid, expectedKind, row.kind));\n const result = await graph.load(guid, loadOptions.signal);\n return result.ok ? ok(result.value.value) : result;\n }) as AssetRegistry['load'],\n snapshot: () => graph.snapshot(),\n subscribe: (listener) => graph.subscribe(listener),\n dispose: () => {\n graph.dispose();\n unsubscribeCatalog();\n decoders.dispose();\n cache.clear();\n session.dispose();\n },\n };\n const resolver: AssetRegistryResolver = {\n get epoch() {\n return graph.snapshot().epoch;\n },\n lookup: <T extends Asset>(guid: string) => graph.lookup(guid) as T | undefined,\n guidOf: (asset: Asset) => graph.guidOf(asset),\n };\n Object.defineProperty(registry, REGISTRY_RESOLVER, {\n value: resolver,\n enumerable: false,\n });\n return registry;\n}\n\nasync function sha256(bytes: Uint8Array): Promise<string> {\n const digest = await globalThis.crypto.subtle.digest('SHA-256', bytes as unknown as BufferSource);\n return `sha256:${Array.from(new Uint8Array(digest), (byte) =>\n byte.toString(16).padStart(2, '0'),\n ).join('')}`;\n}\n\nfunction resolveArtifactUrl(packageUrl: string, path: string): string {\n const separator = packageUrl.lastIndexOf('/');\n const packageDirectory = separator < 0 ? '' : packageUrl.slice(0, separator + 1);\n try {\n return new URL(path, packageDirectory).toString();\n } catch {\n return `${packageDirectory}${path.replace(/^\\//, '')}`;\n }\n}\n"]}
@@ -0,0 +1,63 @@
1
+ import type { ArtifactDescriptor, LoadContext, Loader } from '@forgeax/engine-types';
2
+ export interface PackArtifactInput {
3
+ readonly descriptor: ArtifactDescriptor;
4
+ readonly bytes: Uint8Array;
5
+ }
6
+ export interface PackLoaderInput {
7
+ readonly guid: string;
8
+ readonly kind: string;
9
+ readonly payload: Record<string, unknown>;
10
+ readonly refs: readonly string[];
11
+ readonly artifacts: Readonly<Record<string, PackArtifactInput>>;
12
+ }
13
+ export interface PackLoader {
14
+ readonly kind: string;
15
+ load(input: PackLoaderInput, ctx: LoadContext): unknown;
16
+ }
17
+ export type PackLoadResult = {
18
+ readonly ok: true;
19
+ readonly value: unknown;
20
+ } | {
21
+ readonly ok: false;
22
+ readonly error: unknown;
23
+ };
24
+ /**
25
+ * Injectable `asset.kind` -> {@link Loader} table held by `AssetRegistry`.
26
+ *
27
+ * @example Wire + dispatch (host side)
28
+ * ```ts
29
+ * import { LoaderRegistry, wireDefaultLoaders } from '@forgeax/engine-assets-runtime';
30
+ * const loaders = new LoaderRegistry();
31
+ * wireDefaultLoaders(loaders);
32
+ * const meshLoader = loaders.get('mesh'); // Loader | undefined
33
+ * ```
34
+ */
35
+ export declare class LoaderRegistry {
36
+ private readonly loaders;
37
+ private readonly packLoaders;
38
+ /**
39
+ * Register a loader for its `loader.kind`. Fail-fast on a malformed loader
40
+ * (charter P3); rejects a repeated kind so the canonical owner cannot be replaced.
41
+ *
42
+ * @param loader the `{ kind, load }` object to register.
43
+ * @throws TypeError when `loader.kind` is empty or `loader.load` is not a
44
+ * function — a wire-time misconfiguration the host must fix.
45
+ */
46
+ register(loader: Loader<unknown>): () => void;
47
+ registerPackLoader(loader: PackLoader): () => void;
48
+ loadPack(input: PackLoaderInput, ctx: LoadContext): Promise<PackLoadResult>;
49
+ /**
50
+ * Look up the loader registered for `kind`. Returns `undefined` when no
51
+ * loader is wired — the `AssetRegistry` consumer maps that to a structured
52
+ * `AssetError(code='loader-not-registered')` with the registered kinds in
53
+ * `.detail` (charter P3).
54
+ */
55
+ get(kind: string): Loader<unknown> | undefined;
56
+ /**
57
+ * The kinds currently wired, in insertion order. Fed into the
58
+ * `loader-not-registered` error `.detail.registeredKinds` so AI users see
59
+ * exactly what is injectable.
60
+ */
61
+ registeredKinds(): readonly string[];
62
+ }
63
+ //# sourceMappingURL=loader-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader-registry.d.ts","sourceRoot":"","sources":["../src/loader-registry.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAErF,MAAM,WAAW,iBAAiB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IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,SAAS;IAI9C;;;;OAIG;IACH,eAAe,IAAI,SAAS,MAAM,EAAE;CAGrC"}
@@ -0,0 +1,72 @@
1
+ import type { Loader } from '@forgeax/engine-types';
2
+ /** mesh loader — Float32Array / Uint16Array | Uint32Array normalisation -> MeshAsset.
3
+ *
4
+ * feat-20260611: skinIndex (Uint16Array) and skinWeight (Float32Array) accept
5
+ * both their native typed-array shape (in-memory: dawn smoke / direct
6
+ * `register` test) AND `number[]` (post-`JSON.stringify` shape produced by the
7
+ * dev-server / build-mode pack-body round-trip — `JSON.stringify(pack) -> fetch
8
+ * -> JSON.parse` flattens every typed array to a plain Array). Same dual
9
+ * contract `skeletonLoader` / `animationClipLoader` already honour (PR #350);
10
+ * without the array arm, every Fox.glb / Khronos skinned glTF surfaces as
11
+ * `asset-parse-failed` on the browser path while dawn smoke stays green.
12
+ */
13
+ export declare const meshLoader: Loader;
14
+ /** scene loader — delegates to parseScenePayload; routes structured ref error via ctx. */
15
+ export declare const sceneLoader: Loader;
16
+ /** material loader — passes + values + serialized parent GUID -> parentGuid. */
17
+ export declare const materialLoader: Loader;
18
+ /** sampler loader — preserve the serialised SamplerAsset descriptor. */
19
+ export declare const samplerLoader: Loader;
20
+ /** skeleton loader — inverseBindMatrices stride validation.
21
+ *
22
+ * bug-20260611: accept both `Float32Array` (in-memory: dawn smoke / direct
23
+ * `register` test) AND `number[]` (post-`JSON.stringify` shape: `normaliseForPack`
24
+ * in @forgeax/engine-import flattens every typed array to a plain Array so
25
+ * `JSON.stringify(pack)` survives the dev-server / build-mode round-trip --
26
+ * the same dual contract `meshLoader` already honours). Without the array arm
27
+ * the .pack.json -> fetch -> JSON.parse path lands a plain object whose
28
+ * `instanceof Float32Array` check fails, surfacing as `asset-parse-failed`
29
+ * for any glTF carrying a Skin (e.g. Khronos Fox.glb).
30
+ */
31
+ export declare const skeletonLoader: Loader;
32
+ /** skin loader — skeletonGuid + jointPaths validation. */
33
+ export declare const skinLoader: Loader;
34
+ /** animation-clip loader — channels / sampler validation.
35
+ *
36
+ * bug-20260611: sampler.input / sampler.output accept both `Float32Array`
37
+ * (in-memory) and `number[]` (post-`JSON.stringify` shape produced by
38
+ * `normaliseForPack`). Same dual contract as `skeletonLoader` /
39
+ * `meshLoader`; without it the dev `.pack.json` round-trip surfaces every
40
+ * skinned-with-animation glTF as `asset-parse-failed`.
41
+ */
42
+ export declare const animationClipLoader: Loader;
43
+ /** animation-graph loader — pack payload -> AnimationGraph POD.
44
+ *
45
+ * feat-20260713-animation-state-machine-plugin M4 / w30 (plan D-4 landing (3)):
46
+ * the inverse of `serializeAnimationGraph` (runtime). Each Clip leaf's `clip`
47
+ * field arrives as a `refs[]` index (small int); the loader resolves it back to
48
+ * the GUID string verbatim, leaving GUID -> handle re-resolution to the ECS/use
49
+ * time (the same "GUID at load, handle at use" contract materialLoader honours
50
+ * for parentGuid / values texture fields, asset-registry D-19). Blend/Add
51
+ * node references + `root` are intra-graph node indices, validated against the
52
+ * node count. A malformed payload (out-of-range refs / node index, bad node
53
+ * shape, non-finite weight) returns `undefined` so the load-by-guid path
54
+ * surfaces the existing `asset-parse-failed` error code (AC-14).
55
+ *
56
+ * OOS-7: reconstructs only an engine-authored graph's topology; no DCC-import
57
+ * metadata is consumed.
58
+ */
59
+ export declare const animationGraphLoader: Loader;
60
+ /** audio loader -- restore the durable descriptor; host decode stays elsewhere. */
61
+ export declare const audioLoader: Loader;
62
+ /** particle loader -- restore the complete cooked program without a GPU device. */
63
+ export declare const particleEffectLoader: Loader;
64
+ export { renderPipelineLoader, tilesetLoader } from './pack-artifact';
65
+ /**
66
+ * The eight inline pack-payload loaders, in the historical `if`-chain order
67
+ * (the animation-graph loader, feat-20260713 M4 / w30, appends after the clip
68
+ * loader). `wireDefaultLoaders` (w5) registers these plus the texture / font /
69
+ * equirect loaders (w6) and the audio placeholder (w8).
70
+ */
71
+ export declare const INLINE_PACK_LOADERS: readonly Loader[];
72
+ //# sourceMappingURL=inline-pack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-pack.d.ts","sourceRoot":"","sources":["../../src/loaders/inline-pack.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAWV,MAAM,EAOP,MAAM,uBAAuB,CAAC;AAoB/B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,MA8OxB,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,WAAW,EAAE,MAazB,CAAC;AAiFF,gFAAgF;AAChF,eAAO,MAAM,cAAc,EAAE,MAsI5B,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,MAiE3B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,EAAE,MAoB5B,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,UAAU,EAAE,MAcxB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,MA0DjC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAgDlC,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,WAAW,EAAE,MAqBzB,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,oBAAoB,EAAE,MASlC,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAahD,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type VertexLayoutProjection } from '@forgeax/engine-geometry';
2
+ import { type Result, type VertexAttributeMap } from '@forgeax/engine-types';
3
+ import { MeshBinAssetError } from '../errors/asset';
4
+ export interface UnpackedMeshBin {
5
+ readonly version: 4;
6
+ readonly projection: VertexLayoutProjection;
7
+ readonly vertices: Float32Array;
8
+ readonly attributes: VertexAttributeMap;
9
+ readonly indices?: Uint16Array | Uint32Array;
10
+ readonly submeshes: ReadonlyArray<Record<string, unknown>>;
11
+ readonly materialSlots: readonly {
12
+ readonly slotName: string;
13
+ readonly sourceKey?: string;
14
+ readonly defaultMaterialRef?: number;
15
+ }[];
16
+ readonly aabb?: Float32Array;
17
+ readonly morphTargets?: ReadonlyArray<Record<string, Float32Array>>;
18
+ readonly morphWeights?: Float32Array;
19
+ }
20
+ export declare function unpackMeshBinV4(bytes: Uint8Array, sourceKey: string): Result<UnpackedMeshBin, MeshBinAssetError>;
21
+ //# sourceMappingURL=mesh-bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mesh-bin.d.ts","sourceRoot":"","sources":["../../src/loaders/mesh-bin.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAW,KAAK,MAAM,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC;IAC7C,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3D,QAAQ,CAAC,aAAa,EAAE,SAAS;QAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;KACtC,EAAE,CAAC;IACJ,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IACpE,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;CACtC;AAmDD,wBAAgB,eAAe,CAC7B,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,CAAC,eAAe,EAAE,iBAAiB,CAAC,CA8N5C"}
@@ -0,0 +1,20 @@
1
+ import type { Loader } from '@forgeax/engine-types';
2
+ export type CodecContextFailure = {
3
+ readonly code: 'basis-profile-unsupported';
4
+ readonly detail: {
5
+ readonly profile: string;
6
+ };
7
+ } | {
8
+ readonly code: 'ktx2-color-space-mismatch';
9
+ readonly detail: {
10
+ readonly authoredColorSpace: 'srgb' | 'linear';
11
+ readonly dfdColorSpace: 'srgb' | 'linear' | 'unknown';
12
+ };
13
+ };
14
+ export declare const textureLoader: Loader;
15
+ export declare const equirectLoader: Loader;
16
+ export declare const fontLoader: Loader;
17
+ export declare const renderPipelineLoader: Loader;
18
+ export declare const tilesetLoader: Loader;
19
+ export declare const PACK_ARTIFACT_LOADERS: readonly Loader[];
20
+ //# sourceMappingURL=pack-artifact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pack-artifact.d.ts","sourceRoot":"","sources":["../../src/loaders/pack-artifact.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAMV,MAAM,EAKP,MAAM,uBAAuB,CAAC;AA+L/B,MAAM,MAAM,mBAAmB,GAC3B;IACE,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,2BAA2B,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,kBAAkB,EAAE,MAAM,GAAG,QAAQ,CAAC;QAC/C,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;KACvD,CAAC;CACH,CAAC;AAyXN,eAAO,MAAM,aAAa,EAAE,MAI3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAI5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAIxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAkBlC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MA0B3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAMlD,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare class MaterialDependencyGraph {
2
+ #private;
3
+ link(materialGuid: string, dependencies: readonly string[]): void;
4
+ dependentsOf(dependency: string): readonly string[];
5
+ invalidate(dependencies: readonly string[]): readonly string[];
6
+ isInvalidated(materialGuid: string): boolean;
7
+ clear(materialGuid: string): void;
8
+ }
9
+ //# sourceMappingURL=dependency-graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependency-graph.d.ts","sourceRoot":"","sources":["../../src/material/dependency-graph.ts"],"names":[],"mappings":"AAAA,qBAAa,uBAAuB;;IAKlC,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI;IAYjE,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE;IAInD,UAAU,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE;IAiB9D,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAI5C,KAAK,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CAGlC"}
@@ -0,0 +1,24 @@
1
+ import { type MaterialErrorFor, type MaterialGenerationVector, type Result } from '@forgeax/engine-types';
2
+ export type { MaterialGenerationVector } from '@forgeax/engine-types';
3
+ export interface MaterialCachedArtifact {
4
+ readonly bytes: Uint8Array;
5
+ }
6
+ export type MaterialStaleGenerationError = MaterialErrorFor<'material-specialization-stale-generation'>;
7
+ export declare class MaterialGenerationCache {
8
+ #private;
9
+ resolve<T>(materialGuid: string, specializationKey: string, load: () => Promise<T>, publicationGeneration?: number): Promise<T>;
10
+ linkResolved(materialGuid: string, specializationKey: string): void;
11
+ getResolvedKey(materialGuid: string): string | undefined;
12
+ storeArtifact(key: string, artifact: MaterialCachedArtifact): void;
13
+ getArtifact(key: string): MaterialCachedArtifact | undefined;
14
+ bump(dependency: string): number;
15
+ generationError(materialGuid: string): MaterialStaleGenerationError | undefined;
16
+ loadWithGeneration<T>(materialGuid: string, dependencies: readonly string[], load: (generation: MaterialGenerationVector) => Promise<{
17
+ readonly generation: MaterialGenerationVector;
18
+ readonly value: T;
19
+ }>): Promise<Result<T, MaterialStaleGenerationError>>;
20
+ private trackDependencies;
21
+ private removeResolved;
22
+ private vector;
23
+ }
24
+ //# sourceMappingURL=generation-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation-cache.d.ts","sourceRoot":"","sources":["../../src/material/generation-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAE7B,KAAK,MAAM,EACZ,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC5B;AAED,MAAM,MAAM,4BAA4B,GACtC,gBAAgB,CAAC,0CAA0C,CAAC,CAAC;AAO/D,qBAAa,uBAAuB;;IAUlC,OAAO,CAAC,CAAC,EACP,YAAY,EAAE,MAAM,EACpB,iBAAiB,EAAE,MAAM,EACzB,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACtB,qBAAqB,SAAI,GACxB,OAAO,CAAC,CAAC,CAAC;IAkBb,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI;IAInE,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIxD,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,sBAAsB,GAAG,IAAI;IAIlE,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS;IAI5D,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAYhC,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,4BAA4B,GAAG,SAAS;IAIzE,kBAAkB,CAAC,CAAC,EACxB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,IAAI,EAAE,CACJ,UAAU,EAAE,wBAAwB,KACjC,OAAO,CAAC;QAAE,QAAQ,CAAC,UAAU,EAAE,wBAAwB,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;KAAE,CAAC,GACjF,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,4BAA4B,CAAC,CAAC;IAsBnD,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,MAAM;CAOf"}
@@ -0,0 +1,24 @@
1
+ import type { MaterialReady } from './loader.js';
2
+ /**
3
+ * Read-only facts for one GUID after the MaterialReady gate succeeds.
4
+ * `status` is retained for the existing runtime API; `readiness` is the
5
+ * machine-readable first-level field for inspection consumers. This owner
6
+ * does not invent transport provenance or compare transport URLs.
7
+ */
8
+ export interface MaterialRuntimeInfo {
9
+ readonly materialGuid: string;
10
+ readonly readiness: 'ready';
11
+ readonly publicationGeneration: number;
12
+ readonly specializationKey: string;
13
+ readonly artifactDigest: string;
14
+ readonly layoutIdentity: string;
15
+ readonly dependencies: readonly string[];
16
+ readonly profile: string;
17
+ readonly sourceClosure: readonly string[];
18
+ readonly parameterContract: MaterialReady['parameterContract'];
19
+ readonly refs: MaterialReady['record']['refs'];
20
+ readonly receipt: MaterialReady['record']['receipt'];
21
+ readonly status: 'Ready';
22
+ }
23
+ export declare function inspectMaterialRuntime(ready: MaterialReady): MaterialRuntimeInfo;
24
+ //# sourceMappingURL=inspection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspection.d.ts","sourceRoot":"","sources":["../../src/material/inspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC/D,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC;IACrD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,mBAAmB,CAqBhF"}
@@ -0,0 +1,59 @@
1
+ import { type CookedMaterialRecord } from '@forgeax/engine-pack';
2
+ export interface MaterialLoadRequest {
3
+ readonly guid: string;
4
+ readonly specializationKey: string;
5
+ }
6
+ export interface MaterialReady {
7
+ readonly status: 'Ready';
8
+ readonly guid: string;
9
+ readonly materialGuid: string;
10
+ readonly publicationGeneration: number;
11
+ readonly specializationKey: string;
12
+ readonly artifactDigest: string;
13
+ readonly sourceClosure: readonly string[];
14
+ readonly parameterContract: NonNullable<CookedMaterialRecord['parameterContract']>;
15
+ readonly record: CookedMaterialRecord;
16
+ readonly artifact: CookedMaterialRecord['artifact'];
17
+ }
18
+ export interface MaterialPublication {
19
+ readonly guid: string;
20
+ readonly record: unknown;
21
+ readonly artifactError?: {
22
+ readonly code: 'asset-artifact-missing' | 'asset-artifact-integrity-mismatch';
23
+ readonly expected: string;
24
+ readonly actual?: string;
25
+ };
26
+ readonly artifact?: {
27
+ readonly bytes: Uint8Array;
28
+ readonly digest?: string;
29
+ };
30
+ }
31
+ export type MaterialLoadErrorCode = 'material-specialization-not-cooked' | 'asset-artifact-missing' | 'asset-artifact-integrity-mismatch' | 'material-cook-record-invalid' | 'material-reference-not-ready';
32
+ export interface MaterialLoadErrorDetail {
33
+ readonly guid: string;
34
+ readonly specializationKey: string;
35
+ readonly publicationGeneration?: number;
36
+ readonly field?: string;
37
+ readonly missing?: readonly string[];
38
+ readonly expected?: string;
39
+ readonly actual?: string;
40
+ }
41
+ export interface MaterialLoadError {
42
+ readonly status: 'Error';
43
+ readonly error: {
44
+ readonly code: MaterialLoadErrorCode;
45
+ readonly expected: string;
46
+ readonly hint: string;
47
+ readonly retryable: boolean;
48
+ readonly recoveryActions: readonly string[];
49
+ readonly detail: MaterialLoadErrorDetail;
50
+ };
51
+ }
52
+ export interface MaterialLoaderOptions {
53
+ readonly loadPublication: (guid: string, specializationKey: string) => Promise<MaterialPublication | undefined>;
54
+ readonly loadReference?: (guid: string) => Promise<boolean>;
55
+ }
56
+ export declare function createMaterialLoader(options: MaterialLoaderOptions): {
57
+ load(request: MaterialLoadRequest): Promise<MaterialReady | MaterialLoadError>;
58
+ };
59
+ //# sourceMappingURL=loader.d.ts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AAoB,CAAC,OAAO,EAAE,qBAAqB;kBAE3C,mBAAmB,GAAG,OAAO,CAAC,aAAa,GAAG,iBAAiB,CAAC;EA6HvF"}
@@ -0,0 +1,14 @@
1
+ import type { ShaderRegistry } from '@forgeax/engine-shader';
2
+ import type { MaterialParameter, ParamSchemaEntry } from '@forgeax/engine-types';
3
+ import type { MaterialReady } from './loader';
4
+ /** Project authored MaterialAsset parameters into the runtime shader schema. */
5
+ export declare function materialParametersToParamSchema(parameters: readonly MaterialParameter[], shaderId: string | undefined): readonly ParamSchemaEntry[];
6
+ /** Project authored pass module ids onto the renderer's canonical ids. */
7
+ export declare function runtimeMaterialShaderId(module: string | undefined, passName?: string): string | undefined;
8
+ /**
9
+ * Install every authored pass module from one validated MaterialReady tuple.
10
+ * The publication artifact is the only runtime shader source; no host entry
11
+ * point is allowed to assemble or register the material separately.
12
+ */
13
+ export declare function installMaterialReadyShaders(shaderRegistry: ShaderRegistry, readiness: MaterialReady): void;
14
+ //# sourceMappingURL=runtime-shader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-shader.d.ts","sourceRoot":"","sources":["../../src/material/runtime-shader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAY9C,gFAAgF;AAChF,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,SAAS,iBAAiB,EAAE,EACxC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,SAAS,gBAAgB,EAAE,CA0B7B;AAED,0EAA0E;AAC1E,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,GAAG,SAAS,CAsBpB;AAuBD;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,aAAa,GACvB,IAAI,CA6BN"}
@@ -0,0 +1,3 @@
1
+ export { MeshBinAssetError } from './errors/asset.js';
2
+ export { type UnpackedMeshBin, unpackMeshBinV4, } from './loaders/mesh-bin.js';
3
+ //# sourceMappingURL=mesh-bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mesh-bin.d.ts","sourceRoot":"","sources":["../src/mesh-bin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,KAAK,eAAe,EACpB,eAAe,GAChB,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,132 @@
1
+ import { type Result, RhiError } from '@forgeax/engine-rhi';
2
+ /**
3
+ * Subset of `RhiDevice` consumed by the mipmap utility (charter F2: only
4
+ * the methods the algorithm actually invokes; the dawn integration tests
5
+ * pass a real `RhiDevice` and the unit cache tests pass a hand-rolled stub).
6
+ *
7
+ * Four entry-points (all synchronous Result):
8
+ * - createSampler (default linear / linear / linear)
9
+ * - createBindGroupLayout
10
+ * - createPipelineLayout
11
+ * - createRenderPipeline (per-format pipeline cache miss)
12
+ *
13
+ * Shader module is NOT an entry-point here; it is supplied by an injected
14
+ * `MipmapShaderModuleFactory` (bug-20260518 D-1) so the utility does not
15
+ * reach into the rhi-webgpu shim package from the runtime layer.
16
+ *
17
+ * Plus `createCommandEncoder` + `queue.submit` are added once the upload
18
+ * call-site (T-M3-05) wires generateMipmaps in; the cache-only public hooks
19
+ * exercised by T-M3-01 do not need them, so they live behind an extended
20
+ * MipmapDeviceForBlit alias.
21
+ */
22
+ export type MipmapDevice = {
23
+ createSampler(desc?: any): Result<any, any>;
24
+ createBindGroupLayout(desc: any): Result<any, any>;
25
+ createPipelineLayout(desc: any): Result<any, any>;
26
+ createRenderPipeline(desc: any): Result<any, any>;
27
+ };
28
+ /**
29
+ * Async shader-module factory injected through the call-chain
30
+ * `createRenderer.ts` -> `AssetRegistry.configureGpuDevice` ->
31
+ * `generateMipmaps` -> `getOrCreateMipmapPipeline` -> `ensureDeviceCache`
32
+ * (bug-20260518 D-1 / D-4).
33
+ *
34
+ * Signature mirrors the top-level async `createShaderModule(device, desc)`
35
+ * exposed by the rhi-webgpu shim (and the rhi-wgpu shim) so the
36
+ * call-site in createRenderer can pass `pack.createShaderModule` directly
37
+ * without a structural cast. The opaque module value is typed `unknown`
38
+ * here -- callers do not introspect it; they hand the value back to
39
+ * `createRenderPipeline` descriptors via the cached `MipmapPipelineCache`.
40
+ */
41
+ export type MipmapShaderModuleFactory = (device: MipmapDevice, desc: {
42
+ code: string;
43
+ label?: string;
44
+ }) => Promise<Result<unknown, RhiError>>;
45
+ /**
46
+ * Compute mip-level count for a 2D texture (research F-1 SSOT formula).
47
+ *
48
+ * Spec-anchor: WebGPU §3.6 texture-creation says `mipLevelCount` defaults
49
+ * to 1; the runtime utility opts AI users into a full chain via
50
+ * `floor(log2(max(width, height))) + 1` -- the same formula greggman /
51
+ * toji / webgpufundamentals all converge on.
52
+ *
53
+ * @example
54
+ * numMipLevels({ width: 256, height: 256 }) // 9
55
+ * numMipLevels({ width: 1, height: 1 }) // 1
56
+ */
57
+ export declare function numMipLevels(size: {
58
+ width: number;
59
+ height: number;
60
+ }): number;
61
+ /**
62
+ * Number of cached pipelines for the device (introspection hook used by
63
+ * T-M3-01 (c) cache-hit / (d) per-device-isolation tests; charter P3
64
+ * explicit failure: a cache size of 0 on a fresh device is a witnessed
65
+ * pre-condition rather than a swept-under hint).
66
+ */
67
+ export declare function mipmapCacheSize(device: MipmapDevice): number;
68
+ /**
69
+ * Get the existing per-format render pipeline or build a fresh one.
70
+ *
71
+ * Per-device WeakMap + per-format `Map<GPUTextureFormat, RenderPipeline>`
72
+ * (greggman 36-44 + 119-122). The shared sampler / shader-module /
73
+ * bind-group-layout are constructed lazily on the first cache miss for a
74
+ * given device and reused across all formats on that device.
75
+ */
76
+ export declare function getOrCreateMipmapPipeline(device: MipmapDevice, format: GPUTextureFormat, asyncCreateShaderModule: MipmapShaderModuleFactory): Promise<Result<any, unknown>>;
77
+ /**
78
+ * Extended device shape used by `generateMipmaps` (call-site T-M3-05).
79
+ * Adds command-encoder + bind-group + texture-view + queue surfaces beyond
80
+ * the cache-only `MipmapDevice` so the pipeline-cache unit tests still
81
+ * compile against the smaller surface.
82
+ */
83
+ export type MipmapBlitDevice = MipmapDevice & {
84
+ createTexture(desc: any): Result<any, any>;
85
+ createBindGroup(desc: any): Result<any, any>;
86
+ createTextureView(texture: any, desc: any): Result<any, any>;
87
+ createCommandEncoder(desc?: any): Result<any, any>;
88
+ readonly queue: {
89
+ submit(buffers: ReadonlyArray<any>): Result<void, any>;
90
+ };
91
+ };
92
+ /**
93
+ * Per-mip render-pass blit-loop (research F-1 SSOT main template).
94
+ *
95
+ * For mip levels 1..levels-1: source view = previous mip {baseMipLevel:i-1,
96
+ * mipLevelCount:1}; destination view = current mip {baseMipLevel:i,
97
+ * mipLevelCount:1, usage: RENDER_ATTACHMENT}; oversized-triangle pipeline
98
+ * draws 3 vertices, fragment shader samples source via linear sampler.
99
+ *
100
+ * Spec sRGB correctness (F-3): when format is `*-srgb`, both views inherit
101
+ * the sRGB encoding so hardware decode -> bilinear in linear -> encode back
102
+ * happens automatically; no special-casing required.
103
+ *
104
+ * `levels` defaults to `numMipLevels({ width, height })`. AI users that
105
+ * already created the texture with explicit `mipLevelCount` should pass the
106
+ * same value here.
107
+ */
108
+ export declare function generateMipmaps(device: MipmapBlitDevice, texture: any, descriptor: {
109
+ readonly format: GPUTextureFormat;
110
+ readonly width: number;
111
+ readonly height: number;
112
+ readonly levels?: number;
113
+ }, asyncCreateShaderModule: MipmapShaderModuleFactory): Promise<Result<void, unknown>>;
114
+ /**
115
+ * Synchronous sibling of `generateMipmaps` (feat-20260601-gpu-resource-store
116
+ * -extraction D-9). Identical per-mip blit loop, but reads the per-format
117
+ * pipeline + shared sampler / layout from the prewarmed device cache instead
118
+ * of building them. The pipeline MUST already be present (via a prior
119
+ * `getOrCreateMipmapPipeline` / `prewarmMipmapPipeline` async call) -- an
120
+ * un-prewarmed device or format returns a structured `RhiError` rather than
121
+ * awaiting a build, so the synchronous `draw(world)` frame contract is never
122
+ * broken. The async build itself does not affect the written bytes (same
123
+ * shader, same encoder sequence), so prewarm + sync blit reproduces the
124
+ * pre-extraction async `generateMipmaps` byte-for-byte (D-9 sub-contract 5).
125
+ */
126
+ export declare function blitMipmapsSync(device: MipmapBlitDevice, texture: any, descriptor: {
127
+ readonly format: GPUTextureFormat;
128
+ readonly width: number;
129
+ readonly height: number;
130
+ readonly levels?: number;
131
+ }): Result<void, RhiError>;
132
+ //# sourceMappingURL=mipmap-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mipmap-generator.d.ts","sourceRoot":"","sources":["../src/mipmap-generator.ts"],"names":[],"mappings":"AA+CA,OAAO,EAAW,KAAK,MAAM,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAErE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,YAAY,GAAG;IAEzB,aAAa,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAE5C,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAEnD,oBAAoB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAElD,oBAAoB,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;CACnD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM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