@forgeax/engine-pack 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 (276) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +429 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/__tests__/ai-recovery.unit.test.d.ts +2 -0
  5. package/dist/__tests__/ai-recovery.unit.test.d.ts.map +1 -0
  6. package/dist/__tests__/artifact-path.test.d.ts +2 -0
  7. package/dist/__tests__/artifact-path.test.d.ts.map +1 -0
  8. package/dist/__tests__/asset-evidence-error-hints.test.d.ts +2 -0
  9. package/dist/__tests__/asset-evidence-error-hints.test.d.ts.map +1 -0
  10. package/dist/__tests__/asset-evidence-lifecycle.test.d.ts +2 -0
  11. package/dist/__tests__/asset-evidence-lifecycle.test.d.ts.map +1 -0
  12. package/dist/__tests__/asset-evidence-schema.test.d.ts +2 -0
  13. package/dist/__tests__/asset-evidence-schema.test.d.ts.map +1 -0
  14. package/dist/__tests__/atlas-cli-region-mismatch.test.d.ts +2 -0
  15. package/dist/__tests__/atlas-cli-region-mismatch.test.d.ts.map +1 -0
  16. package/dist/__tests__/atlas-error-code-owner.test-d.d.ts +2 -0
  17. package/dist/__tests__/atlas-error-code-owner.test-d.d.ts.map +1 -0
  18. package/dist/__tests__/cli-asset-evidence.integration.test.d.ts +2 -0
  19. package/dist/__tests__/cli-asset-evidence.integration.test.d.ts.map +1 -0
  20. package/dist/__tests__/cli.unit.test.d.ts +2 -0
  21. package/dist/__tests__/cli.unit.test.d.ts.map +1 -0
  22. package/dist/__tests__/evidence-source-inventory.unit.test.d.ts +2 -0
  23. package/dist/__tests__/evidence-source-inventory.unit.test.d.ts.map +1 -0
  24. package/dist/__tests__/guid-collision.unit.test.d.ts +2 -0
  25. package/dist/__tests__/guid-collision.unit.test.d.ts.map +1 -0
  26. package/dist/__tests__/guid-validator-surface.unit.test.d.ts +2 -0
  27. package/dist/__tests__/guid-validator-surface.unit.test.d.ts.map +1 -0
  28. package/dist/__tests__/load-asset-config.test.d.ts +2 -0
  29. package/dist/__tests__/load-asset-config.test.d.ts.map +1 -0
  30. package/dist/__tests__/material-cook-dependencies.unit.test.d.ts +2 -0
  31. package/dist/__tests__/material-cook-dependencies.unit.test.d.ts.map +1 -0
  32. package/dist/__tests__/material-cook-receipt.unit.test.d.ts +2 -0
  33. package/dist/__tests__/material-cook-receipt.unit.test.d.ts.map +1 -0
  34. package/dist/__tests__/material-cook-schema.unit.test.d.ts +2 -0
  35. package/dist/__tests__/material-cook-schema.unit.test.d.ts.map +1 -0
  36. package/dist/__tests__/mesh-bin-consumer-surface.unit.test.d.ts +2 -0
  37. package/dist/__tests__/mesh-bin-consumer-surface.unit.test.d.ts.map +1 -0
  38. package/dist/__tests__/mesh-bin-contract.unit.test.d.ts +2 -0
  39. package/dist/__tests__/mesh-bin-contract.unit.test.d.ts.map +1 -0
  40. package/dist/__tests__/meta-schema-optional.test.d.ts +2 -0
  41. package/dist/__tests__/meta-schema-optional.test.d.ts.map +1 -0
  42. package/dist/__tests__/meta-source-overrides.unit.test.d.ts +2 -0
  43. package/dist/__tests__/meta-source-overrides.unit.test.d.ts.map +1 -0
  44. package/dist/__tests__/native-cooker-registry.test.d.ts +2 -0
  45. package/dist/__tests__/native-cooker-registry.test.d.ts.map +1 -0
  46. package/dist/__tests__/offline-evidence-artifact-verification-owner.test-d.d.ts +2 -0
  47. package/dist/__tests__/offline-evidence-artifact-verification-owner.test-d.d.ts.map +1 -0
  48. package/dist/__tests__/offline-evidence.integration.test.d.ts +2 -0
  49. package/dist/__tests__/offline-evidence.integration.test.d.ts.map +1 -0
  50. package/dist/__tests__/owner-chain.integration.test.d.ts +2 -0
  51. package/dist/__tests__/owner-chain.integration.test.d.ts.map +1 -0
  52. package/dist/__tests__/pack-v2-fixture-migration.test.d.ts +2 -0
  53. package/dist/__tests__/pack-v2-fixture-migration.test.d.ts.map +1 -0
  54. package/dist/__tests__/pack-v2-schema.test.d.ts +2 -0
  55. package/dist/__tests__/pack-v2-schema.test.d.ts.map +1 -0
  56. package/dist/__tests__/pack.unit.test.d.ts +2 -0
  57. package/dist/__tests__/pack.unit.test.d.ts.map +1 -0
  58. package/dist/__tests__/package-finalizer.contract.test.d.ts +2 -0
  59. package/dist/__tests__/package-finalizer.contract.test.d.ts.map +1 -0
  60. package/dist/__tests__/producer-contract-schema.unit.test.d.ts +2 -0
  61. package/dist/__tests__/producer-contract-schema.unit.test.d.ts.map +1 -0
  62. package/dist/__tests__/resolve-asset-source.test.d.ts +2 -0
  63. package/dist/__tests__/resolve-asset-source.test.d.ts.map +1 -0
  64. package/dist/__tests__/runtime-projection.unit.test.d.ts +2 -0
  65. package/dist/__tests__/runtime-projection.unit.test.d.ts.map +1 -0
  66. package/dist/__tests__/runtime.browser.test.d.ts +2 -0
  67. package/dist/__tests__/runtime.browser.test.d.ts.map +1 -0
  68. package/dist/__tests__/scanner-inventory.contract.test.d.ts +2 -0
  69. package/dist/__tests__/scanner-inventory.contract.test.d.ts.map +1 -0
  70. package/dist/__tests__/scanner-inventory.test.d.ts +2 -0
  71. package/dist/__tests__/scanner-inventory.test.d.ts.map +1 -0
  72. package/dist/__tests__/scanner-mount-cycle.test.d.ts +2 -0
  73. package/dist/__tests__/scanner-mount-cycle.test.d.ts.map +1 -0
  74. package/dist/__tests__/scriptable-pack-cli.integration.test.d.ts +2 -0
  75. package/dist/__tests__/scriptable-pack-cli.integration.test.d.ts.map +1 -0
  76. package/dist/__tests__/scriptable-pack-ddc-key.unit.test.d.ts +2 -0
  77. package/dist/__tests__/scriptable-pack-ddc-key.unit.test.d.ts.map +1 -0
  78. package/dist/__tests__/scriptable-pack.test-d.d.ts +2 -0
  79. package/dist/__tests__/scriptable-pack.test-d.d.ts.map +1 -0
  80. package/dist/__tests__/scriptable-pack.unit.test.d.ts +2 -0
  81. package/dist/__tests__/scriptable-pack.unit.test.d.ts.map +1 -0
  82. package/dist/__tests__/topology-actions.unit.test.d.ts +2 -0
  83. package/dist/__tests__/topology-actions.unit.test.d.ts.map +1 -0
  84. package/dist/__tests__/topology.unit.test.d.ts +2 -0
  85. package/dist/__tests__/topology.unit.test.d.ts.map +1 -0
  86. package/dist/artifact-path.d.ts +9 -0
  87. package/dist/artifact-path.d.ts.map +1 -0
  88. package/dist/artifact-path.mjs +53 -0
  89. package/dist/artifact-path.mjs.map +1 -0
  90. package/dist/atlas/run-atlas.d.ts +8 -0
  91. package/dist/atlas/run-atlas.d.ts.map +1 -0
  92. package/dist/atlas/shelf-pack.d.ts +55 -0
  93. package/dist/atlas/shelf-pack.d.ts.map +1 -0
  94. package/dist/bridge.d.ts +2 -0
  95. package/dist/bridge.d.ts.map +1 -0
  96. package/dist/bridge.mjs +3 -0
  97. package/dist/bridge.mjs.map +1 -0
  98. package/dist/build.d.ts +19 -0
  99. package/dist/build.d.ts.map +1 -0
  100. package/dist/build.mjs +10203 -0
  101. package/dist/build.mjs.map +1 -0
  102. package/dist/builtin.d.ts +44 -0
  103. package/dist/builtin.d.ts.map +1 -0
  104. package/dist/builtin.mjs +141 -0
  105. package/dist/builtin.mjs.map +1 -0
  106. package/dist/catalog-builder.d.ts +43 -0
  107. package/dist/catalog-builder.d.ts.map +1 -0
  108. package/dist/catalog-delta.d.ts +11 -0
  109. package/dist/catalog-delta.d.ts.map +1 -0
  110. package/dist/catalog-projection.d.ts +91 -0
  111. package/dist/catalog-projection.d.ts.map +1 -0
  112. package/dist/cli-asset.d.ts +22 -0
  113. package/dist/cli-asset.d.ts.map +1 -0
  114. package/dist/cli-asset.mjs +9697 -0
  115. package/dist/cli-asset.mjs.map +1 -0
  116. package/dist/config.d.ts +6 -0
  117. package/dist/config.d.ts.map +1 -0
  118. package/dist/config.mjs +29 -0
  119. package/dist/config.mjs.map +1 -0
  120. package/dist/deriveAssetName.d.ts +15 -0
  121. package/dist/deriveAssetName.d.ts.map +1 -0
  122. package/dist/errors.d.ts +30 -0
  123. package/dist/errors.d.ts.map +1 -0
  124. package/dist/errors.mjs +19 -0
  125. package/dist/errors.mjs.map +1 -0
  126. package/dist/evidence/material-cook.d.ts +92 -0
  127. package/dist/evidence/material-cook.d.ts.map +1 -0
  128. package/dist/evidence/offline-evidence.d.ts +25 -0
  129. package/dist/evidence/offline-evidence.d.ts.map +1 -0
  130. package/dist/evidence/source-inventory.d.ts +29 -0
  131. package/dist/evidence/source-inventory.d.ts.map +1 -0
  132. package/dist/guid.d.ts +45 -0
  133. package/dist/guid.d.ts.map +1 -0
  134. package/dist/guid.mjs +94 -0
  135. package/dist/guid.mjs.map +1 -0
  136. package/dist/index.d.ts +15 -0
  137. package/dist/index.d.ts.map +1 -0
  138. package/dist/index.mjs +8612 -0
  139. package/dist/index.mjs.map +1 -0
  140. package/dist/material/artifact-writer.d.ts +14 -0
  141. package/dist/material/artifact-writer.d.ts.map +1 -0
  142. package/dist/material-cook.d.ts +2 -0
  143. package/dist/material-cook.d.ts.map +1 -0
  144. package/dist/material-cook.mjs +248 -0
  145. package/dist/material-cook.mjs.map +1 -0
  146. package/dist/mesh-bin-contract.d.ts +36 -0
  147. package/dist/mesh-bin-contract.d.ts.map +1 -0
  148. package/dist/mesh-bin-contract.mjs +96 -0
  149. package/dist/mesh-bin-contract.mjs.map +1 -0
  150. package/dist/name.mjs +22 -0
  151. package/dist/name.mjs.map +1 -0
  152. package/dist/native-cooker-registry.d.ts +47 -0
  153. package/dist/native-cooker-registry.d.ts.map +1 -0
  154. package/dist/native-cooker.d.ts +3 -0
  155. package/dist/native-cooker.d.ts.map +1 -0
  156. package/dist/native-cooker.mjs +142 -0
  157. package/dist/native-cooker.mjs.map +1 -0
  158. package/dist/package-finalizer.d.ts +121 -0
  159. package/dist/package-finalizer.d.ts.map +1 -0
  160. package/dist/producer-contract.d.ts +19 -0
  161. package/dist/producer-contract.d.ts.map +1 -0
  162. package/dist/resolve-asset-source.d.ts +4 -0
  163. package/dist/resolve-asset-source.d.ts.map +1 -0
  164. package/dist/resolve-asset-source.mjs +109 -0
  165. package/dist/resolve-asset-source.mjs.map +1 -0
  166. package/dist/runtime-projection.d.ts +14 -0
  167. package/dist/runtime-projection.d.ts.map +1 -0
  168. package/dist/runtime-publication.d.ts +44 -0
  169. package/dist/runtime-publication.d.ts.map +1 -0
  170. package/dist/runtime.d.ts +8 -0
  171. package/dist/runtime.d.ts.map +1 -0
  172. package/dist/runtime.mjs +7261 -0
  173. package/dist/runtime.mjs.map +1 -0
  174. package/dist/scanner.d.ts +113 -0
  175. package/dist/scanner.d.ts.map +1 -0
  176. package/dist/scanner.mjs +8819 -0
  177. package/dist/scanner.mjs.map +1 -0
  178. package/dist/schema-compiled.d.ts +12 -0
  179. package/dist/schema-compiled.d.ts.map +1 -0
  180. package/dist/schema.mjs +7369 -0
  181. package/dist/schema.mjs.map +1 -0
  182. package/dist/scriptable-pack-node.d.ts +62 -0
  183. package/dist/scriptable-pack-node.d.ts.map +1 -0
  184. package/dist/scriptable-pack-node.mjs +1674 -0
  185. package/dist/scriptable-pack-node.mjs.map +1 -0
  186. package/dist/scriptable-pack-worker.d.ts +2 -0
  187. package/dist/scriptable-pack-worker.d.ts.map +1 -0
  188. package/dist/scriptable-pack-worker.mjs +224 -0
  189. package/dist/scriptable-pack-worker.mjs.map +1 -0
  190. package/dist/scriptable-pack.d.ts +558 -0
  191. package/dist/scriptable-pack.d.ts.map +1 -0
  192. package/dist/scriptable-pack.mjs +672 -0
  193. package/dist/scriptable-pack.mjs.map +1 -0
  194. package/dist/topology.d.ts +10 -0
  195. package/dist/topology.d.ts.map +1 -0
  196. package/package.json +154 -0
  197. package/schema/meta.schema.json +173 -0
  198. package/schema/pack.schema.json +232 -0
  199. package/src/__tests__/ai-recovery.unit.test.ts +114 -0
  200. package/src/__tests__/artifact-path.test.ts +41 -0
  201. package/src/__tests__/asset-evidence-error-hints.test.ts +46 -0
  202. package/src/__tests__/asset-evidence-lifecycle.test.ts +104 -0
  203. package/src/__tests__/asset-evidence-schema.test.ts +86 -0
  204. package/src/__tests__/atlas-cli-region-mismatch.test.ts +134 -0
  205. package/src/__tests__/atlas-error-code-owner.test-d.ts +23 -0
  206. package/src/__tests__/cli-asset-evidence.integration.test.ts +172 -0
  207. package/src/__tests__/cli.unit.test.ts +448 -0
  208. package/src/__tests__/evidence-source-inventory.unit.test.ts +37 -0
  209. package/src/__tests__/guid-collision.unit.test.ts +112 -0
  210. package/src/__tests__/guid-validator-surface.unit.test.ts +20 -0
  211. package/src/__tests__/load-asset-config.test.ts +121 -0
  212. package/src/__tests__/material-cook-dependencies.unit.test.ts +112 -0
  213. package/src/__tests__/material-cook-receipt.unit.test.ts +148 -0
  214. package/src/__tests__/material-cook-schema.unit.test.ts +152 -0
  215. package/src/__tests__/mesh-bin-consumer-surface.unit.test.ts +22 -0
  216. package/src/__tests__/mesh-bin-contract.unit.test.ts +32 -0
  217. package/src/__tests__/meta-schema-optional.test.ts +116 -0
  218. package/src/__tests__/meta-source-overrides.unit.test.ts +71 -0
  219. package/src/__tests__/native-cooker-registry.test.ts +64 -0
  220. package/src/__tests__/offline-evidence-artifact-verification-owner.test-d.ts +64 -0
  221. package/src/__tests__/offline-evidence.integration.test.ts +106 -0
  222. package/src/__tests__/owner-chain.integration.test.ts +78 -0
  223. package/src/__tests__/pack-v2-fixture-migration.test.ts +87 -0
  224. package/src/__tests__/pack-v2-schema.test.ts +142 -0
  225. package/src/__tests__/pack.unit.test.ts +2218 -0
  226. package/src/__tests__/package-finalizer.contract.test.ts +105 -0
  227. package/src/__tests__/producer-contract-schema.unit.test.ts +92 -0
  228. package/src/__tests__/resolve-asset-source.test.ts +121 -0
  229. package/src/__tests__/runtime-projection.unit.test.ts +87 -0
  230. package/src/__tests__/runtime.browser.test.ts +15 -0
  231. package/src/__tests__/scanner-inventory.contract.test.ts +167 -0
  232. package/src/__tests__/scanner-inventory.test.ts +76 -0
  233. package/src/__tests__/scanner-mount-cycle.test.ts +232 -0
  234. package/src/__tests__/scriptable-pack-cli.integration.test.ts +47 -0
  235. package/src/__tests__/scriptable-pack-ddc-key.unit.test.ts +63 -0
  236. package/src/__tests__/scriptable-pack.test-d.ts +131 -0
  237. package/src/__tests__/scriptable-pack.unit.test.ts +789 -0
  238. package/src/__tests__/topology-actions.unit.test.ts +94 -0
  239. package/src/__tests__/topology.unit.test.ts +85 -0
  240. package/src/artifact-path.ts +69 -0
  241. package/src/atlas/run-atlas.ts +358 -0
  242. package/src/atlas/shelf-pack.ts +172 -0
  243. package/src/atlas/upng-ambient.d.ts +13 -0
  244. package/src/bridge.ts +2 -0
  245. package/src/build.ts +139 -0
  246. package/src/builtin.ts +117 -0
  247. package/src/catalog-builder.ts +313 -0
  248. package/src/catalog-delta.ts +189 -0
  249. package/src/catalog-projection.ts +344 -0
  250. package/src/cli-asset.ts +586 -0
  251. package/src/config.ts +36 -0
  252. package/src/deriveAssetName.ts +42 -0
  253. package/src/errors.ts +47 -0
  254. package/src/evidence/material-cook.ts +411 -0
  255. package/src/evidence/offline-evidence.ts +90 -0
  256. package/src/evidence/source-inventory.ts +193 -0
  257. package/src/guid.ts +99 -0
  258. package/src/index.ts +108 -0
  259. package/src/material/artifact-writer.ts +26 -0
  260. package/src/material-cook.ts +15 -0
  261. package/src/mesh-bin-contract.ts +150 -0
  262. package/src/native-cooker-registry.ts +235 -0
  263. package/src/native-cooker.ts +2 -0
  264. package/src/package-finalizer.ts +394 -0
  265. package/src/producer-contract.ts +277 -0
  266. package/src/resolve-asset-source.ts +88 -0
  267. package/src/runtime-projection.ts +100 -0
  268. package/src/runtime-publication.ts +190 -0
  269. package/src/runtime.ts +23 -0
  270. package/src/scanner.ts +715 -0
  271. package/src/schema/material-cook.schema.json +119 -0
  272. package/src/schema-compiled.ts +238 -0
  273. package/src/scriptable-pack-node.ts +1394 -0
  274. package/src/scriptable-pack-worker.ts +308 -0
  275. package/src/scriptable-pack.ts +1006 -0
  276. package/src/topology.ts +157 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/scriptable-pack-worker.ts"],"names":["resolve"],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ACd,IAAA,IAAA,CAAK,WAAA,CAAY,EAAE,IAAA,EAAM,aAAA,EAAe,OAAA,EAAS,KAAA,CAAM,OAAA,EAAS,KAAA,EAAO,OAAA,CAAQ,KAAK,CAAA,EAAG,CAAA;AAAA,EACzF;AACF;AAEA,IAAA,CAAK,EAAA,CAAG,SAAA,EAAW,CAAC,OAAA,KAAqB;AACvC,EAAA,KAAK,cAAc,OAAO,CAAA;AAC5B,CAAC,CAAA;AAED,IAAI,CAAC,QAAA,IAAY,UAAA,KAAe,MAAA,IAAa,gBAAgB,MAAA,EAAW;AACtE,EAAA,IAAI;AACF,IAAA,MAAM,cAAA,CAAe,EAAE,UAAA,EAAY,WAAA,EAAa,CAAA;AAAA,EAClD,SAAS,KAAA,EAAO;AACd,IAAA,IAAA,CAAK,WAAA,CAAY,EAAE,IAAA,EAAM,YAAA,EAAc,OAAO,OAAA,CAAQ,KAAK,GAAG,CAAA;AAAA,EAChE;AACF","file":"scriptable-pack-worker.mjs","sourcesContent":["import { createHash } from 'node:crypto';\nimport { existsSync, readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, extname, join, resolve } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\nimport { parentPort, workerData } from 'node:worker_threads';\nimport ts from 'typescript';\n\nif (parentPort === null) throw new Error('ScriptablePack worker requires a parent port');\n\nconst port = parentPort;\nconst workerMode = workerData as {\n readonly mode?: 'single' | 'reusable';\n readonly sourcePath?: string;\n readonly compileRoot?: string;\n};\nconst reusable = workerMode.mode === 'reusable';\nlet sourcePath = workerMode.sourcePath;\nlet compileRoot = workerMode.compileRoot;\ntype LoadedDefinition = {\n readonly schemaVersion?: unknown;\n readonly packageId?: unknown;\n readonly name?: unknown;\n readonly assets?: unknown;\n readonly sceneComponents?: unknown;\n readonly externalAssets?: unknown;\n readonly build?: unknown;\n};\nlet definition: LoadedDefinition | undefined;\nlet nextReadId = 0;\nconst reads = new Map<number, (value: unknown) => void>();\n\nfunction failure(error: unknown): unknown {\n if (error === null || typeof error !== 'object') return error;\n const value = error as Record<string, unknown>;\n return {\n name: value.name,\n code: value.code,\n expected: value.expected,\n actual: value.actual,\n hint: value.hint,\n detail: value.detail,\n message: value.message,\n };\n}\n\nconst SOURCE_EXTENSIONS = ['.ts', '.tsx', '.mts', '.cts', '.js', '.mjs', '.cjs'] as const;\n\nfunction resolveRelativeImport(importer: string, specifier: string): string | undefined {\n if (!specifier.startsWith('.')) return undefined;\n const raw = resolve(dirname(importer), specifier);\n const candidates =\n extname(raw).length > 0\n ? [raw]\n : [\n raw,\n ...SOURCE_EXTENSIONS.map((extension) => `${raw}${extension}`),\n resolve(raw, 'index.ts'),\n ];\n return candidates.find((candidate) => existsSync(candidate));\n}\n\nfunction outputName(path: string): string {\n const digest = createHash('sha256').update(path).digest('hex').slice(0, 20);\n return `${digest}.mjs`;\n}\n\nfunction resolveBareImport(importer: string, specifier: string): string | undefined {\n const resolver = (\n import.meta as ImportMeta & {\n readonly resolve?: (specifier: string, parent?: string) => string;\n }\n ).resolve;\n if (resolver === undefined) return undefined;\n try {\n const resolved = resolver(specifier, pathToFileURL(importer).href);\n return resolved.startsWith('file:') ? fileURLToPath(resolved) : undefined;\n } catch {\n // Type-only or optional imports may not be installed in the game project.\n // Preserve them for TypeScript to erase or let Node report the real load\n // failure instead of guessing a workspace root.\n return undefined;\n }\n}\n\nfunction resolvedModuleSpecifier(\n target: string,\n sources: ReadonlyMap<string, string>,\n loadId?: number,\n): string {\n if (sources.has(target)) {\n return `./${outputName(target)}${loadId === undefined ? '' : `?load=${loadId}`}`;\n }\n return pathToFileURL(target).href;\n}\n\n/**\n * Node 22 does not execute `.ts` modules. Compile the trusted local module\n * closure into one disposable ESM directory before importing it. Bare package\n * imports are resolved by Node from the original source module and rewritten\n * to their canonical file URL; relative imports are rewritten to the compiled\n * closure by identity. This keeps unrelated nested node_modules directories\n * (for example Vite's cache) from changing package resolution.\n */\nfunction compileModuleClosure(entryPath: string, outputRoot: string, loadId?: number): string {\n const pending = [resolve(entryPath)];\n const sources = new Map<string, string>();\n const imports = new Map<string, ReadonlyMap<string, string>>();\n while (pending.length > 0) {\n const path = pending.pop();\n if (path === undefined || sources.has(path)) continue;\n const source = readFileSync(path, 'utf8');\n sources.set(path, source);\n const resolvedImports = new Map<string, string>();\n for (const imported of ts.preProcessFile(source, true, true).importedFiles) {\n const target = imported.fileName.startsWith('.')\n ? resolveRelativeImport(path, imported.fileName)\n : resolveBareImport(path, imported.fileName);\n if (target === undefined) continue;\n resolvedImports.set(imported.fileName, target);\n if (imported.fileName.startsWith('.') || /\\.(?:ts|tsx|mts|cts)$/.test(target)) {\n pending.push(target);\n }\n }\n imports.set(path, resolvedImports);\n }\n\n for (const [path, source] of sources) {\n const replacements = imports.get(path) ?? new Map<string, string>();\n const rewriteRelativeImports: ts.TransformerFactory<ts.SourceFile> = (context) => {\n const visit: ts.Visitor = (node) => {\n if (\n (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) &&\n node.moduleSpecifier !== undefined &&\n ts.isStringLiteral(node.moduleSpecifier)\n ) {\n const target = replacements.get(node.moduleSpecifier.text);\n if (target !== undefined) {\n const moduleSpecifier = ts.factory.createStringLiteral(\n resolvedModuleSpecifier(target, sources, loadId),\n );\n return ts.isImportDeclaration(node)\n ? ts.factory.updateImportDeclaration(\n node,\n node.modifiers,\n node.importClause,\n moduleSpecifier,\n node.attributes,\n )\n : ts.factory.updateExportDeclaration(\n node,\n node.modifiers,\n node.isTypeOnly,\n node.exportClause,\n moduleSpecifier,\n node.attributes,\n );\n }\n }\n if (\n ts.isCallExpression(node) &&\n node.expression.kind === ts.SyntaxKind.ImportKeyword &&\n node.arguments.length === 1 &&\n node.arguments[0] !== undefined &&\n ts.isStringLiteral(node.arguments[0])\n ) {\n const target = replacements.get(node.arguments[0].text);\n if (target !== undefined) {\n return ts.factory.updateCallExpression(node, node.expression, node.typeArguments, [\n ts.factory.createStringLiteral(resolvedModuleSpecifier(target, sources, loadId)),\n ]);\n }\n }\n return ts.visitEachChild(node, visit, context);\n };\n return (sourceFile) => ts.visitNode(sourceFile, visit) as ts.SourceFile;\n };\n const transpiled = ts.transpileModule(source, {\n fileName: path,\n compilerOptions: {\n target: ts.ScriptTarget.ES2022,\n module: ts.ModuleKind.ESNext,\n moduleResolution: ts.ModuleResolutionKind.Bundler,\n isolatedModules: true,\n sourceMap: false,\n },\n transformers: { before: [rewriteRelativeImports] },\n reportDiagnostics: true,\n });\n const errors =\n transpiled.diagnostics?.filter(\n (diagnostic) => diagnostic.category === ts.DiagnosticCategory.Error,\n ) ?? [];\n if (errors.length > 0) {\n throw new Error(\n `ScriptablePack TypeScript transpile failed for ${path}: ${errors\n .map((diagnostic) => ts.flattenDiagnosticMessageText(diagnostic.messageText, '\\n'))\n .join('; ')}`,\n );\n }\n writeFileSync(join(outputRoot, outputName(path)), transpiled.outputText);\n }\n return join(outputRoot, outputName(resolve(entryPath)));\n}\n\nasync function loadDefinition(task: {\n readonly sourcePath: string;\n readonly compileRoot: string;\n readonly loadId?: number;\n}): Promise<void> {\n sourcePath = task.sourcePath;\n compileRoot = task.compileRoot;\n definition = undefined;\n reads.clear();\n const executablePath = SOURCE_EXTENSIONS.includes(\n extname(task.sourcePath) as (typeof SOURCE_EXTENSIONS)[number],\n )\n ? compileModuleClosure(task.sourcePath, task.compileRoot, task.loadId)\n : task.sourcePath;\n const loaded = (await import(\n `${pathToFileURL(executablePath).href}${reusable ? `?load=${task.loadId ?? 0}` : ''}`\n )) as {\n readonly default?: unknown;\n };\n definition = loaded.default as LoadedDefinition | undefined;\n port.postMessage({\n kind: 'loaded',\n ...(task.loadId === undefined ? {} : { loadId: task.loadId }),\n definition:\n definition === undefined\n ? undefined\n : {\n schemaVersion: definition.schemaVersion,\n packageId: definition.packageId,\n name: definition.name,\n assets: definition.assets,\n sceneComponents: definition.sceneComponents,\n externalAssets: definition.externalAssets,\n },\n });\n}\n\nasync function handleMessage(message: unknown): Promise<void> {\n if (message === null || typeof message !== 'object') return;\n const value = message as Record<string, unknown>;\n if (value.kind === 'asset-result' && typeof value.readId === 'number') {\n reads.get(value.readId)?.(value.result);\n reads.delete(value.readId);\n return;\n }\n if (\n reusable &&\n value.kind === 'load' &&\n typeof value.sourcePath === 'string' &&\n typeof value.compileRoot === 'string' &&\n typeof value.loadId === 'number'\n ) {\n try {\n await loadDefinition({\n sourcePath: value.sourcePath,\n compileRoot: value.compileRoot,\n loadId: value.loadId,\n });\n } catch (error) {\n port.postMessage({ kind: 'load-threw', loadId: value.loadId, error: failure(error) });\n }\n return;\n }\n if (value.kind !== 'build' || typeof value.buildId !== 'number') return;\n if (typeof definition?.build !== 'function') {\n port.postMessage({\n kind: 'build-result',\n buildId: value.buildId,\n result: { ok: false, error: { message: 'default export has no build function' } },\n });\n return;\n }\n try {\n const result = await definition.build({\n readByGuid(guid: Uint8Array): Promise<unknown> {\n const readId = nextReadId++;\n port.postMessage({ kind: 'asset-read', buildId: value.buildId, readId, guid });\n return new Promise((resolve) => reads.set(readId, resolve));\n },\n });\n port.postMessage({\n kind: 'build-result',\n buildId: value.buildId,\n result:\n result !== null && typeof result === 'object' && 'ok' in result && !result.ok\n ? { ...result, error: failure(result.error) }\n : result,\n });\n } catch (error) {\n port.postMessage({ kind: 'build-threw', buildId: value.buildId, error: failure(error) });\n }\n}\n\nport.on('message', (message: unknown) => {\n void handleMessage(message);\n});\n\nif (!reusable && sourcePath !== undefined && compileRoot !== undefined) {\n try {\n await loadDefinition({ sourcePath, compileRoot });\n } catch (error) {\n port.postMessage({ kind: 'load-threw', error: failure(error) });\n }\n}\n"]}
@@ -0,0 +1,558 @@
1
+ import type { Asset, AssetGuid, AssetPublicationEnvelope, Result } from '@forgeax/engine-types';
2
+ /** Closed ordinary kind vocabulary shared by authoring, producers, and loaders. */
3
+ export type ScriptablePackAssetKind = Asset['kind'];
4
+ /** Complete ordinary Asset kind vocabulary exposed by ScriptablePack discovery. */
5
+ export declare const SCRIPTABLE_PACK_ASSET_KINDS: readonly ["mesh", "material", "scene", "texture", "equirect", "sampler", "font", "render-pipeline", "tileset", "video", "skeleton", "skin", "animation-clip", "animation-graph", "audio", "particle-effect"];
6
+ /** Machine-readable producer/loader floor owned by engine-pack. */
7
+ export declare const SCRIPTABLE_PACK_CAPABILITY_MANIFEST: {
8
+ readonly assetKinds: readonly ["mesh", "material", "scene", "texture", "equirect", "sampler", "font", "render-pipeline", "tileset", "video", "skeleton", "skin", "animation-clip", "animation-graph", "audio", "particle-effect"];
9
+ readonly durablePayload: true;
10
+ readonly refs: true;
11
+ readonly artifacts: true;
12
+ readonly hostCapabilities: readonly ["audio-install", "video-play", "particle-execute"];
13
+ };
14
+ export declare function isScriptablePackAssetKind(value: string): value is ScriptablePackAssetKind;
15
+ export interface ScriptablePackAssetDeclaration<TKind extends ScriptablePackAssetKind = ScriptablePackAssetKind> {
16
+ readonly guid: AssetGuid;
17
+ readonly kind: TKind;
18
+ readonly name?: string;
19
+ }
20
+ export type ScriptablePackAssetDeclarations = Readonly<Record<string, ScriptablePackAssetDeclaration>>;
21
+ export type ScriptablePackExternalAssets = Readonly<Record<string, AssetGuid>>;
22
+ /**
23
+ * Component-shaped input accepted by a ScriptablePack scene declaration.
24
+ * Engine component tokens satisfy this shape; plain `{ type }` rows keep the
25
+ * Pack contract independent of ECS and survive the isolated module worker.
26
+ */
27
+ export interface ScriptablePackSceneComponentInput {
28
+ readonly name: string;
29
+ readonly fields: Readonly<Record<string, string | {
30
+ readonly type: string;
31
+ }>>;
32
+ }
33
+ /** Neutral scene schema projection owned by the Pack definition. */
34
+ export interface ScriptablePackSceneComponent {
35
+ readonly name: string;
36
+ readonly fields: Readonly<Record<string, string>>;
37
+ }
38
+ /** Derive the frozen, ECS-neutral schema used by scene output producers. */
39
+ export declare function projectScriptablePackSceneComponents(components: readonly ScriptablePackSceneComponentInput[] | undefined): readonly ScriptablePackSceneComponent[];
40
+ /** Pack-facing name for the shared Engine publication envelope. */
41
+ export type ScriptablePackPublicationEnvelope = AssetPublicationEnvelope;
42
+ /** Structured domain failure permitted to cross the isolated build-time AssetReader seam. */
43
+ export interface ScriptablePackErrorProvenance {
44
+ /** Published source generation observed by the reader, when available. */
45
+ readonly generation?: number;
46
+ /** Stable producer identity for the failed output, when available. */
47
+ readonly sourceKey?: string;
48
+ /** GUID associated with the failed read or output, when available. */
49
+ readonly guid?: string;
50
+ }
51
+ export interface ScriptablePackReadError {
52
+ readonly code: string;
53
+ readonly expected: string;
54
+ readonly hint: string;
55
+ readonly detail?: unknown;
56
+ readonly provenance?: ScriptablePackErrorProvenance;
57
+ }
58
+ export type ScriptablePackAssetFor<TDescriptor extends ScriptablePackAssetDeclaration> = TDescriptor extends {
59
+ readonly kind: infer TKind extends ScriptablePackAssetKind;
60
+ } ? Extract<Asset, {
61
+ readonly kind: TKind;
62
+ }> : never;
63
+ export type ScriptablePackOutputs<TAssets extends ScriptablePackAssetDeclarations> = {
64
+ readonly [TKey in keyof TAssets]: TAssets[TKey] extends ScriptablePackAssetDeclaration ? ScriptablePackAssetFor<TAssets[TKey]> : never;
65
+ };
66
+ export interface AssetReader {
67
+ /** Load a declared GUID as a durable payload; this never mints a World handle. */
68
+ readByGuid<TAsset extends Asset = Asset>(guid: AssetGuid): Promise<Result<TAsset, ScriptablePackReadError>>;
69
+ }
70
+ export type ScriptablePackBuildResult<TAssets extends ScriptablePackAssetDeclarations, TError> = Result<ScriptablePackOutputs<TAssets>, TError>;
71
+ export interface ScriptablePackDefinition<TAssets extends ScriptablePackAssetDeclarations = ScriptablePackAssetDeclarations, TExternal extends ScriptablePackExternalAssets = ScriptablePackExternalAssets, TError = ScriptablePackReadError> {
72
+ readonly schemaVersion: '1.0.0';
73
+ readonly packageId: AssetGuid;
74
+ readonly name?: string;
75
+ readonly assets: TAssets;
76
+ /** Component tokens/schema rows used by scene ref externalization. */
77
+ readonly sceneComponents?: readonly ScriptablePackSceneComponentInput[];
78
+ readonly externalAssets: TExternal;
79
+ readonly build: (assetReader: AssetReader) => ScriptablePackBuildResult<TAssets, TError> | Promise<ScriptablePackBuildResult<TAssets, TError>>;
80
+ }
81
+ export interface ScriptablePackSourceClosureEntry {
82
+ readonly path: string;
83
+ readonly digest: string;
84
+ }
85
+ export interface ScriptablePackMetaJson {
86
+ readonly schemaVersion: '1.0.0';
87
+ readonly kind: 'external-asset-package';
88
+ readonly packageId: string;
89
+ readonly name?: string;
90
+ readonly importer: 'pack-ts';
91
+ readonly source: string;
92
+ readonly importSettings: {
93
+ readonly contractVersion: '1.0.0';
94
+ readonly externalAssets: readonly {
95
+ readonly alias: string;
96
+ readonly guid: string;
97
+ }[];
98
+ };
99
+ readonly subAssets: readonly {
100
+ readonly guid: string;
101
+ readonly sourceIndex: number;
102
+ readonly sourceKey: string;
103
+ readonly kind: ScriptablePackAssetKind;
104
+ readonly name?: string;
105
+ }[];
106
+ }
107
+ export interface ScriptablePackOperationEnvelope {
108
+ readonly requestId: string;
109
+ readonly expectedRevision?: string;
110
+ }
111
+ export type ScriptablePackGatewayOperation = (ScriptablePackOperationEnvelope & {
112
+ readonly kind: 'preflight';
113
+ readonly sourcePath: string;
114
+ }) | (ScriptablePackOperationEnvelope & {
115
+ readonly kind: 'create-scriptable-pack';
116
+ readonly sourcePath: string;
117
+ readonly name?: string;
118
+ readonly initialOutput: {
119
+ readonly sourceKey: string;
120
+ readonly kind: ScriptablePackAssetKind;
121
+ readonly name?: string;
122
+ };
123
+ }) | (ScriptablePackOperationEnvelope & {
124
+ readonly kind: 'add-output';
125
+ readonly sourcePath: string;
126
+ readonly sourceKey: string;
127
+ readonly assetKind: ScriptablePackAssetKind;
128
+ readonly name?: string;
129
+ }) | (ScriptablePackOperationEnvelope & {
130
+ readonly kind: 'add-external-asset';
131
+ readonly sourcePath: string;
132
+ readonly alias: string;
133
+ readonly guid: AssetGuid;
134
+ }) | (ScriptablePackOperationEnvelope & {
135
+ readonly kind: 'rename-display';
136
+ readonly sourcePath: string;
137
+ readonly target: {
138
+ readonly kind: 'package';
139
+ } | {
140
+ readonly kind: 'output';
141
+ readonly sourceKey: string;
142
+ };
143
+ readonly name: string;
144
+ }) | (ScriptablePackOperationEnvelope & {
145
+ readonly kind: 'remove-output';
146
+ readonly sourcePath: string;
147
+ readonly sourceKey: string;
148
+ /** Exact incoming reference identities acknowledged by the caller. */
149
+ readonly confirmIncomingRefs?: readonly string[];
150
+ }) | (ScriptablePackOperationEnvelope & {
151
+ readonly kind: 'clone-scriptable-pack';
152
+ readonly sourcePath: string;
153
+ readonly targetPath: string;
154
+ }) | (ScriptablePackOperationEnvelope & {
155
+ readonly kind: 'inspect-meta';
156
+ readonly sourcePath: string;
157
+ }) | (ScriptablePackOperationEnvelope & {
158
+ readonly kind: 'rebuild' | 'cold-cook';
159
+ readonly sourcePath: string;
160
+ });
161
+ export interface ScriptablePackMutationCapabilities {
162
+ readonly inspect: true;
163
+ readonly rebuild: true;
164
+ readonly coldCook: true;
165
+ readonly create?: true;
166
+ readonly addOutput?: true;
167
+ readonly addExternalAsset?: true;
168
+ readonly renameDisplay?: true;
169
+ readonly removeOutput?: true;
170
+ readonly clone?: true;
171
+ readonly reason?: string;
172
+ }
173
+ export interface ScriptablePackPreflight {
174
+ readonly sourcePath: string;
175
+ readonly revision: string;
176
+ readonly meta: ScriptablePackMetaJson;
177
+ readonly capabilities: ScriptablePackMutationCapabilities;
178
+ readonly incomingRefs: readonly string[];
179
+ }
180
+ export interface ScriptablePackGatewayMutation {
181
+ readonly sourcePath: string;
182
+ readonly revision: string;
183
+ readonly meta: ScriptablePackMetaJson;
184
+ }
185
+ export interface ScriptablePackAuthoringGateway {
186
+ execute(operation: ScriptablePackGatewayOperation): Promise<Result<ScriptablePackGatewayMutation | ScriptablePackPreflight, ScriptablePackError>>;
187
+ }
188
+ export type ScriptablePackAuthoringMutation = (ScriptablePackOperationEnvelope & {
189
+ readonly kind: 'create-scriptable-pack';
190
+ readonly sourcePath: string;
191
+ readonly packageId: AssetGuid;
192
+ readonly name?: string;
193
+ readonly initialOutput: {
194
+ readonly sourceKey: string;
195
+ readonly kind: ScriptablePackAssetKind;
196
+ readonly guid: AssetGuid;
197
+ readonly name?: string;
198
+ };
199
+ }) | (ScriptablePackOperationEnvelope & {
200
+ readonly kind: 'add-output';
201
+ readonly sourcePath: string;
202
+ readonly sourceKey: string;
203
+ readonly assetKind: ScriptablePackAssetKind;
204
+ readonly guid: AssetGuid;
205
+ readonly name?: string;
206
+ }) | Extract<ScriptablePackGatewayOperation, {
207
+ readonly kind: 'add-external-asset' | 'rename-display' | 'remove-output';
208
+ }> | (ScriptablePackOperationEnvelope & {
209
+ readonly kind: 'clone-scriptable-pack';
210
+ readonly sourcePath: string;
211
+ readonly targetPath: string;
212
+ readonly packageId: AssetGuid;
213
+ readonly outputGuids: Readonly<Record<string, AssetGuid>>;
214
+ });
215
+ export interface ScriptablePackAuthoringPort {
216
+ preflight(sourcePath: string): Promise<Result<Omit<ScriptablePackPreflight, 'sourcePath'>, ScriptablePackError>>;
217
+ mutate(operation: ScriptablePackAuthoringMutation): Promise<Result<{
218
+ readonly sourcePath: string;
219
+ readonly revision: string;
220
+ }, ScriptablePackError>>;
221
+ inspect(sourcePath: string): Promise<Result<{
222
+ readonly revision: string;
223
+ readonly meta: ScriptablePackMetaJson;
224
+ }, ScriptablePackError>>;
225
+ rebuild(sourcePath: string, mode: 'rebuild' | 'cold-cook'): Promise<Result<{
226
+ readonly revision: string;
227
+ readonly meta: ScriptablePackMetaJson;
228
+ }, ScriptablePackError>>;
229
+ }
230
+ /** Keep GUID allocation and multi-identity operations in one auditable gateway transaction. */
231
+ export declare function createScriptablePackAuthoringGateway(port: ScriptablePackAuthoringPort, allocateGuid?: () => AssetGuid): ScriptablePackAuthoringGateway;
232
+ export declare const SOURCE_AUTHORING_OPERATION_DESCRIPTORS: readonly [{
233
+ readonly id: "asset-source.create";
234
+ readonly kind: "create";
235
+ readonly domain: "session";
236
+ readonly title: "Create Asset Source";
237
+ readonly argsSchema: {
238
+ readonly additionalProperties: false;
239
+ readonly anyOf?: {
240
+ required: string[];
241
+ }[];
242
+ readonly type: "object";
243
+ readonly properties: {
244
+ readonly sourcePath: {
245
+ readonly type: "string";
246
+ readonly minLength: 8;
247
+ readonly pattern: "^[^/].*\\.pack\\.ts$";
248
+ readonly description: "Game-root-relative ScriptablePack source path.";
249
+ };
250
+ readonly ownerGuid: {
251
+ readonly type: "string";
252
+ readonly format: "uuid";
253
+ readonly description: "Catalog GUID used to resolve the producer-owned source subject.";
254
+ };
255
+ readonly requestId: {
256
+ readonly type: "string";
257
+ readonly minLength: 1;
258
+ readonly maxLength: 128;
259
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$";
260
+ readonly description: "Caller-minted identity for one idempotent ScriptablePack operation.";
261
+ };
262
+ };
263
+ readonly required: string[];
264
+ };
265
+ }, {
266
+ readonly id: "asset-source.add-output";
267
+ readonly kind: "add-output";
268
+ readonly domain: "session";
269
+ readonly title: "Add Asset Source Output";
270
+ readonly argsSchema: {
271
+ readonly additionalProperties: false;
272
+ readonly anyOf?: {
273
+ required: string[];
274
+ }[];
275
+ readonly type: "object";
276
+ readonly properties: {
277
+ readonly sourcePath: {
278
+ readonly type: "string";
279
+ readonly minLength: 8;
280
+ readonly pattern: "^[^/].*\\.pack\\.ts$";
281
+ readonly description: "Game-root-relative ScriptablePack source path.";
282
+ };
283
+ readonly ownerGuid: {
284
+ readonly type: "string";
285
+ readonly format: "uuid";
286
+ readonly description: "Catalog GUID used to resolve the producer-owned source subject.";
287
+ };
288
+ readonly requestId: {
289
+ readonly type: "string";
290
+ readonly minLength: 1;
291
+ readonly maxLength: 128;
292
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$";
293
+ readonly description: "Caller-minted identity for one idempotent ScriptablePack operation.";
294
+ };
295
+ };
296
+ readonly required: string[];
297
+ };
298
+ }, {
299
+ readonly id: "asset-source.add-external-asset";
300
+ readonly kind: "add-external-asset";
301
+ readonly domain: "session";
302
+ readonly title: "Add Asset Source External Asset";
303
+ readonly argsSchema: {
304
+ readonly additionalProperties: false;
305
+ readonly anyOf?: {
306
+ required: string[];
307
+ }[];
308
+ readonly type: "object";
309
+ readonly properties: {
310
+ readonly sourcePath: {
311
+ readonly type: "string";
312
+ readonly minLength: 8;
313
+ readonly pattern: "^[^/].*\\.pack\\.ts$";
314
+ readonly description: "Game-root-relative ScriptablePack source path.";
315
+ };
316
+ readonly ownerGuid: {
317
+ readonly type: "string";
318
+ readonly format: "uuid";
319
+ readonly description: "Catalog GUID used to resolve the producer-owned source subject.";
320
+ };
321
+ readonly requestId: {
322
+ readonly type: "string";
323
+ readonly minLength: 1;
324
+ readonly maxLength: 128;
325
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$";
326
+ readonly description: "Caller-minted identity for one idempotent ScriptablePack operation.";
327
+ };
328
+ };
329
+ readonly required: string[];
330
+ };
331
+ }, {
332
+ readonly id: "asset-source.rename";
333
+ readonly kind: "rename";
334
+ readonly domain: "session";
335
+ readonly title: "Rename Asset Source Display Name";
336
+ readonly argsSchema: {
337
+ readonly additionalProperties: false;
338
+ readonly anyOf?: {
339
+ required: string[];
340
+ }[];
341
+ readonly type: "object";
342
+ readonly properties: {
343
+ readonly sourcePath: {
344
+ readonly type: "string";
345
+ readonly minLength: 8;
346
+ readonly pattern: "^[^/].*\\.pack\\.ts$";
347
+ readonly description: "Game-root-relative ScriptablePack source path.";
348
+ };
349
+ readonly ownerGuid: {
350
+ readonly type: "string";
351
+ readonly format: "uuid";
352
+ readonly description: "Catalog GUID used to resolve the producer-owned source subject.";
353
+ };
354
+ readonly requestId: {
355
+ readonly type: "string";
356
+ readonly minLength: 1;
357
+ readonly maxLength: 128;
358
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$";
359
+ readonly description: "Caller-minted identity for one idempotent ScriptablePack operation.";
360
+ };
361
+ };
362
+ readonly required: string[];
363
+ };
364
+ }, {
365
+ readonly id: "asset-source.remove-output";
366
+ readonly kind: "remove-output";
367
+ readonly domain: "session";
368
+ readonly title: "Remove Asset Source Output";
369
+ readonly destructive: true;
370
+ readonly argsSchema: {
371
+ readonly additionalProperties: false;
372
+ readonly anyOf?: {
373
+ required: string[];
374
+ }[];
375
+ readonly type: "object";
376
+ readonly properties: {
377
+ readonly sourcePath: {
378
+ readonly type: "string";
379
+ readonly minLength: 8;
380
+ readonly pattern: "^[^/].*\\.pack\\.ts$";
381
+ readonly description: "Game-root-relative ScriptablePack source path.";
382
+ };
383
+ readonly ownerGuid: {
384
+ readonly type: "string";
385
+ readonly format: "uuid";
386
+ readonly description: "Catalog GUID used to resolve the producer-owned source subject.";
387
+ };
388
+ readonly requestId: {
389
+ readonly type: "string";
390
+ readonly minLength: 1;
391
+ readonly maxLength: 128;
392
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$";
393
+ readonly description: "Caller-minted identity for one idempotent ScriptablePack operation.";
394
+ };
395
+ };
396
+ readonly required: string[];
397
+ };
398
+ }, {
399
+ readonly id: "asset-source.clone";
400
+ readonly kind: "clone";
401
+ readonly domain: "session";
402
+ readonly title: "Clone Asset Source";
403
+ readonly argsSchema: {
404
+ readonly additionalProperties: false;
405
+ readonly anyOf?: {
406
+ required: string[];
407
+ }[];
408
+ readonly type: "object";
409
+ readonly properties: {
410
+ readonly sourcePath: {
411
+ readonly type: "string";
412
+ readonly minLength: 8;
413
+ readonly pattern: "^[^/].*\\.pack\\.ts$";
414
+ readonly description: "Game-root-relative ScriptablePack source path.";
415
+ };
416
+ readonly ownerGuid: {
417
+ readonly type: "string";
418
+ readonly format: "uuid";
419
+ readonly description: "Catalog GUID used to resolve the producer-owned source subject.";
420
+ };
421
+ readonly requestId: {
422
+ readonly type: "string";
423
+ readonly minLength: 1;
424
+ readonly maxLength: 128;
425
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$";
426
+ readonly description: "Caller-minted identity for one idempotent ScriptablePack operation.";
427
+ };
428
+ };
429
+ readonly required: string[];
430
+ };
431
+ }, {
432
+ readonly id: "asset-source.rebuild";
433
+ readonly kind: "rebuild";
434
+ readonly domain: "session";
435
+ readonly title: "Rebuild Asset Source";
436
+ readonly argsSchema: {
437
+ readonly additionalProperties: false;
438
+ readonly anyOf?: {
439
+ required: string[];
440
+ }[];
441
+ readonly type: "object";
442
+ readonly properties: {
443
+ readonly sourcePath: {
444
+ readonly type: "string";
445
+ readonly minLength: 8;
446
+ readonly pattern: "^[^/].*\\.pack\\.ts$";
447
+ readonly description: "Game-root-relative ScriptablePack source path.";
448
+ };
449
+ readonly ownerGuid: {
450
+ readonly type: "string";
451
+ readonly format: "uuid";
452
+ readonly description: "Catalog GUID used to resolve the producer-owned source subject.";
453
+ };
454
+ readonly requestId: {
455
+ readonly type: "string";
456
+ readonly minLength: 1;
457
+ readonly maxLength: 128;
458
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$";
459
+ readonly description: "Caller-minted identity for one idempotent ScriptablePack operation.";
460
+ };
461
+ };
462
+ readonly required: string[];
463
+ };
464
+ }, {
465
+ readonly id: "asset-source.cold-cook";
466
+ readonly kind: "cold-cook";
467
+ readonly domain: "session";
468
+ readonly title: "Cold Cook Asset Source";
469
+ readonly argsSchema: {
470
+ readonly additionalProperties: false;
471
+ readonly anyOf?: {
472
+ required: string[];
473
+ }[];
474
+ readonly type: "object";
475
+ readonly properties: {
476
+ readonly sourcePath: {
477
+ readonly type: "string";
478
+ readonly minLength: 8;
479
+ readonly pattern: "^[^/].*\\.pack\\.ts$";
480
+ readonly description: "Game-root-relative ScriptablePack source path.";
481
+ };
482
+ readonly ownerGuid: {
483
+ readonly type: "string";
484
+ readonly format: "uuid";
485
+ readonly description: "Catalog GUID used to resolve the producer-owned source subject.";
486
+ };
487
+ readonly requestId: {
488
+ readonly type: "string";
489
+ readonly minLength: 1;
490
+ readonly maxLength: 128;
491
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$";
492
+ readonly description: "Caller-minted identity for one idempotent ScriptablePack operation.";
493
+ };
494
+ };
495
+ readonly required: string[];
496
+ };
497
+ }];
498
+ export type ScriptablePackError = {
499
+ readonly code: 'pack-source-load-failed';
500
+ readonly expected: string;
501
+ readonly hint: string;
502
+ readonly detail: {
503
+ readonly sourcePath: string;
504
+ readonly reason: 'module-load' | 'timeout' | 'source-changed';
505
+ readonly phase: 'module-load' | 'build';
506
+ readonly diagnostic: string;
507
+ readonly timeoutMs?: number;
508
+ };
509
+ } | {
510
+ readonly code: 'pack-source-definition-invalid';
511
+ readonly expected: string;
512
+ readonly hint: string;
513
+ readonly detail: {
514
+ readonly sourcePath?: string;
515
+ readonly propertyPath: string;
516
+ readonly actual: string;
517
+ };
518
+ } | {
519
+ readonly code: 'pack-source-output-invalid';
520
+ readonly expected: string;
521
+ readonly hint: string;
522
+ readonly detail: {
523
+ readonly missingGuids: readonly string[];
524
+ readonly unexpectedSourceKeys: readonly string[];
525
+ readonly kindMismatches: readonly {
526
+ readonly sourceKey: string;
527
+ readonly expected: string;
528
+ readonly actual: string;
529
+ }[];
530
+ };
531
+ } | {
532
+ readonly code: 'pack-source-external-closure-mismatch';
533
+ readonly expected: string;
534
+ readonly hint: string;
535
+ readonly detail: {
536
+ readonly undeclaredReferencedGuids: readonly string[];
537
+ readonly undeclaredReadGuids: readonly string[];
538
+ readonly unusedDeclaredGuids: readonly string[];
539
+ };
540
+ } | {
541
+ readonly code: 'pack-source-path-invalid' | 'pack-source-revision-conflict' | 'pack-source-mutation-unsupported' | 'pack-source-reference-conflict' | 'pack-source-write-failed' | 'pack-source-build-cycle' | 'pack-source-publication-timeout' | 'pack-source-operation-committed';
542
+ readonly expected: string;
543
+ readonly actual?: string;
544
+ readonly hint: string;
545
+ readonly retryable: boolean;
546
+ readonly recoveryActions: readonly string[];
547
+ readonly detail: {
548
+ readonly requestId?: string;
549
+ readonly sourcePath?: string;
550
+ readonly packageId?: string;
551
+ readonly sourceKey?: string;
552
+ readonly incomingRefs?: readonly string[];
553
+ };
554
+ };
555
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
556
+ export declare function validateScriptablePackDefinition(value: unknown, sourcePath?: string): Result<Readonly<ScriptablePackDefinition>, ScriptablePackError>;
557
+ export declare function projectScriptablePackMeta(definition: ScriptablePackDefinition, source: string): ScriptablePackMetaJson;
558
+ //# sourceMappingURL=scriptable-pack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scriptable-pack.d.ts","sourceRoot":"","sources":["../src/scriptable-pack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIhG,mFAAmF;AACnF,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAEpD,mFAAmF;AACnF,eAAO,MAAM,2BAA2B,8MAiBe,CAAC;AAExD,mEAAmE;AACnE,eAAO,MAAM,mCAAmC;;;;;;CAMtC,CAAC;AAEX,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,uBAAuB,CAEzF;AAED,MAAM,WAAW,8BAA8B,CAC7C,KAAK,SAAS,uBAAuB,GAAG,uBAAuB;IAE/D,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,+BAA+B,GAAG,QAAQ,CACpD,MAAM,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAC/C,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAE/E;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM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