@fps-games/editor 0.2.1-beta.1 → 0.2.1-beta.2

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 (245) hide show
  1. package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +1 -1
  2. package/dist/agent-bridge/capabilities/ui-regions.js +16 -0
  3. package/dist/agent-bridge/capabilities/ui-regions.js.map +1 -1
  4. package/dist/build-info.json +43 -43
  5. package/dist/internal/material-preview.d.ts +22 -0
  6. package/dist/internal/material-preview.d.ts.map +1 -0
  7. package/dist/internal/material-preview.js +186 -0
  8. package/dist/internal/material-preview.js.map +1 -0
  9. package/dist/internal/project-model-preview.d.ts +4 -0
  10. package/dist/internal/project-model-preview.d.ts.map +1 -0
  11. package/dist/internal/project-model-preview.js +359 -0
  12. package/dist/internal/project-model-preview.js.map +1 -0
  13. package/dist/local-editor-agent-context.d.ts +12 -1
  14. package/dist/local-editor-agent-context.d.ts.map +1 -1
  15. package/dist/local-editor-agent-context.js +47 -0
  16. package/dist/local-editor-agent-context.js.map +1 -1
  17. package/dist/local-editor-harness.d.ts +15 -2
  18. package/dist/local-editor-harness.d.ts.map +1 -1
  19. package/dist/local-editor-harness.js +310 -21
  20. package/dist/local-editor-harness.js.map +1 -1
  21. package/dist/local-editor-tools.d.ts +1 -0
  22. package/dist/local-editor-tools.d.ts.map +1 -1
  23. package/dist/local-editor-tools.js +3 -0
  24. package/dist/local-editor-tools.js.map +1 -1
  25. package/dist/playable-local-editor-host.d.ts +4 -0
  26. package/dist/playable-local-editor-host.d.ts.map +1 -1
  27. package/dist/playable-local-editor-host.js +27 -0
  28. package/dist/playable-local-editor-host.js.map +1 -1
  29. package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
  30. package/dist/playable-product-scene-capabilities.js +9 -3
  31. package/dist/playable-product-scene-capabilities.js.map +1 -1
  32. package/dist/playable-standard-project.d.ts.map +1 -1
  33. package/dist/playable-standard-project.js +5 -2
  34. package/dist/playable-standard-project.js.map +1 -1
  35. package/node_modules/@fps-games/babylon-renderer/package.json +7 -7
  36. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js +24 -0
  37. package/node_modules/@fps-games/editor-babylon/dist/marker-overlay.js.map +1 -1
  38. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +10 -1
  39. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
  40. package/node_modules/@fps-games/editor-babylon/dist/projection.js +96 -1
  41. package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
  42. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.d.ts.map +1 -1
  43. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js +85 -22
  44. package/node_modules/@fps-games/editor-babylon/dist/scene-view-spatial-overlay-controller.js.map +1 -1
  45. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts +2 -0
  46. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
  47. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +150 -4
  48. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
  49. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts +1 -0
  50. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
  51. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +249 -15
  52. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
  53. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts +1 -1
  54. package/node_modules/@fps-games/editor-babylon/dist/types.d.ts.map +1 -1
  55. package/node_modules/@fps-games/editor-babylon/dist/types.js.map +1 -1
  56. package/node_modules/@fps-games/editor-babylon/package.json +6 -6
  57. package/node_modules/@fps-games/editor-browser/dist/index.d.ts +5 -0
  58. package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
  59. package/node_modules/@fps-games/editor-browser/dist/index.js +3 -0
  60. package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
  61. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts +35 -0
  62. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.d.ts.map +1 -0
  63. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js +136 -0
  64. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-browser-continuity.js.map +1 -0
  65. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts +46 -0
  66. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.d.ts.map +1 -0
  67. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js +283 -0
  68. package/node_modules/@fps-games/editor-browser/dist/local-editor-asset-filesystem.js.map +1 -0
  69. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts +12 -0
  70. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.d.ts.map +1 -0
  71. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js +67 -0
  72. package/node_modules/@fps-games/editor-browser/dist/local-editor-preview-cleanup-registry.js.map +1 -0
  73. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts +6 -0
  74. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.d.ts.map +1 -0
  75. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js +9 -0
  76. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-open.js.map +1 -0
  77. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts +7 -0
  78. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.d.ts.map +1 -0
  79. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js +20 -0
  80. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-file-preview.js.map +1 -0
  81. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts +9 -0
  82. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.d.ts.map +1 -0
  83. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js +219 -0
  84. package/node_modules/@fps-games/editor-browser/dist/local-editor-project-media-thumbnail-cache.js.map +1 -0
  85. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts +14 -0
  86. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.d.ts.map +1 -0
  87. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js +42 -0
  88. package/node_modules/@fps-games/editor-browser/dist/local-editor-tool-presentation.js.map +1 -0
  89. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.d.ts.map +1 -1
  90. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js +2 -0
  91. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-asset-kind.js.map +1 -1
  92. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts +27 -0
  93. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.d.ts.map +1 -0
  94. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js +288 -0
  95. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-console.js.map +1 -0
  96. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts +1 -1
  97. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.d.ts.map +1 -1
  98. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js +29 -0
  99. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-icons.js.map +1 -1
  100. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +20 -1
  101. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
  102. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +321 -60
  103. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
  104. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts +2 -1
  105. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.d.ts.map +1 -1
  106. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js +4 -2
  107. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-prefab-stage.js.map +1 -1
  108. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +63 -3
  109. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
  110. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
  111. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts +9 -0
  112. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.d.ts.map +1 -1
  113. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js +88 -16
  114. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-workbench.js.map +1 -1
  115. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +2 -1
  116. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
  117. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +1463 -356
  118. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
  119. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts +13 -0
  120. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.d.ts.map +1 -0
  121. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js +15 -0
  122. package/node_modules/@fps-games/editor-browser/dist/local-editor-viewport-orientation.js.map +1 -0
  123. package/node_modules/@fps-games/editor-browser/package.json +7 -7
  124. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts +1 -0
  125. package/node_modules/@fps-games/editor-core/dist/editor-tools.d.ts.map +1 -1
  126. package/node_modules/@fps-games/editor-core/dist/editor-tools.js +3 -1
  127. package/node_modules/@fps-games/editor-core/dist/editor-tools.js.map +1 -1
  128. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts +11 -2
  129. package/node_modules/@fps-games/editor-core/dist/viewport-tools.d.ts.map +1 -1
  130. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js +12 -1
  131. package/node_modules/@fps-games/editor-core/dist/viewport-tools.js.map +1 -1
  132. package/node_modules/@fps-games/editor-core/package.json +6 -6
  133. package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
  134. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts +1 -0
  135. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.d.ts.map +1 -1
  136. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js +5 -0
  137. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/catalog.js.map +1 -1
  138. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts +1 -1
  139. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.d.ts.map +1 -1
  140. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js +1 -1
  141. package/node_modules/@fps-games/editor-playable-sdk/dist/asset-library/index.js.map +1 -1
  142. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.d.ts.map +1 -1
  143. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js +15 -1
  144. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/handler.js.map +1 -1
  145. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.d.ts.map +1 -1
  146. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js +3 -0
  147. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/routes.js.map +1 -1
  148. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts +6 -1
  149. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.d.ts.map +1 -1
  150. package/node_modules/@fps-games/editor-playable-sdk/dist/authoring-server/types.js.map +1 -1
  151. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts +1 -0
  152. package/node_modules/@fps-games/editor-playable-sdk/dist/index.d.ts.map +1 -1
  153. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js +1 -0
  154. package/node_modules/@fps-games/editor-playable-sdk/dist/index.js.map +1 -1
  155. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts +4 -0
  156. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.d.ts.map +1 -1
  157. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js +10 -1
  158. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-source.js.map +1 -1
  159. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts +4 -0
  160. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.d.ts.map +1 -0
  161. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js +4 -0
  162. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/index.js.map +1 -0
  163. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts +4 -0
  164. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.d.ts.map +1 -0
  165. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js +86 -0
  166. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/protocol.js.map +1 -0
  167. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts +9 -0
  168. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.d.ts.map +1 -0
  169. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js +76 -0
  170. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/support.js.map +1 -0
  171. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts +34 -0
  172. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.d.ts.map +1 -0
  173. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js +2 -0
  174. package/node_modules/@fps-games/editor-playable-sdk/dist/project-files/types.js.map +1 -0
  175. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts +4 -0
  176. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
  177. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +40 -0
  178. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
  179. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +1 -0
  180. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
  181. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +1 -0
  182. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
  183. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts +1 -0
  184. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
  185. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +94 -0
  186. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
  187. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts +14 -0
  188. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.d.ts.map +1 -0
  189. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js +101 -0
  190. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-file-handle.js.map +1 -0
  191. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts +23 -0
  192. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.d.ts.map +1 -0
  193. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js +180 -0
  194. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-files.js.map +1 -0
  195. package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
  196. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +23 -3
  197. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +1 -1
  198. package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +1 -1
  199. package/node_modules/@fps-games/editor-protocol/package.json +2 -2
  200. package/node_modules/@fps-games/editor-tooling/package.json +3 -3
  201. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.d.ts.map +1 -1
  202. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js +103 -10
  203. package/node_modules/@fps-games/editor-ui/dist/editor-ui-theme.js.map +1 -1
  204. package/node_modules/@fps-games/editor-ui/package.json +1 -1
  205. package/node_modules/@fps-games/playable-assets/package.json +1 -1
  206. package/node_modules/@fps-games/playable-contracts/package.json +1 -1
  207. package/node_modules/@fps-games/playable-rendering/package.json +2 -2
  208. package/node_modules/@fps-games/playable-runtime/package.json +12 -12
  209. package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
  210. package/node_modules/@fps-games/playable-scene/package.json +2 -2
  211. package/node_modules/@fps-games/plugin-api/package.json +1 -1
  212. package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
  213. package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
  214. package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
  215. package/node_modules/@fps-games/plugin-assets/package.json +5 -5
  216. package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
  217. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
  218. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
  219. package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
  220. package/node_modules/@fps-games/plugin-host/package.json +2 -2
  221. package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
  222. package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
  223. package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
  224. package/node_modules/@fps-games/plugin-markers/package.json +5 -5
  225. package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
  226. package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
  227. package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
  228. package/node_modules/@fps-games/plugin-materials/package.json +5 -5
  229. package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
  230. package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
  231. package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
  232. package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
  233. package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
  234. package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
  235. package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
  236. package/node_modules/@fps-games/plugin-scene/package.json +5 -5
  237. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
  238. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
  239. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
  240. package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
  241. package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
  242. package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
  243. package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
  244. package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
  245. package/package.json +22 -22
@@ -1 +1 @@
1
- {"version":3,"file":"playable-local-editor-host.js","sourceRoot":"","sources":["../src/playable-local-editor-host.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sCAAsC,EACtC,0BAA0B,GAO3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oCAAoC,EAC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ED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC","sourcesContent":["import {\n createEditorAgentInteractionController,\n createProjectAuthoringHost,\n type AuthoringSourceDriver,\n type DocumentCommand,\n type EditorProjectionImpact,\n type EditorTransformDocumentCapabilities,\n type EditorTransformSnapshot,\n type ProjectAuthoringHost,\n} from '@fps-games/editor-core';\nimport {\n getFpsEditorPluginLifecycleScopeHost,\n resolveFpsEditorLifecycleParticipants,\n type FpsEditorPluginHost,\n} from '@fps-games/editor-core/plugin-host';\nimport type {\n FpsEditorLifecycleService,\n} from '@fps-games/editor-core/lifecycle';\nimport {\n createForgePlayAgentTransport,\n} from '@fps-games/editor-forge-play';\nimport type { BabylonEditorProjectionSelectionEdgesPrewarm } from '@fps-games/editor-babylon';\nimport type {\n ArtistMaterialTextureRef,\n EditorAgentContextSemantics,\n EditorDiagnostic,\n EditorDiagnosticLocator,\n EditorDiagnosticPhase,\n SpatialMarkerGraph,\n SpatialMarkerNode,\n SpatialMarkerTypeDefinition,\n SpatialRelationTypeDefinition,\n} from '@fps-games/editor-protocol';\nimport {\n createPlayableLocalEditorLoadingOverlay,\n formatPlayableEditorDoctorReport,\n inspectPlayableEditorHostCompatibilityReport,\n type FpsGameEditorProjectDefinition,\n type PlayableForgePlayModeBridge,\n type PlayableForgePlayDocumentExportResult,\n type PlayableForgePlaySaveState,\n type PlayableForgePlayWindowLike,\n type PlayableLocalEditorDiscardConfirmationInput,\n type PlayableLocalEditorHostBridgeContext,\n type PlayableLocalEditorHostLoadingContent,\n type PlayableLocalEditorInteractionPolicy,\n type PlayableLocalEditorDocumentOperationExecutor,\n type PlayableLocalEditorSaveFailureInput,\n type PlayableLocalEditorSaveFailureState,\n type PlayableLocalEditorUnsavedChangesState,\n} from '@fps-games/editor-playable-sdk';\nimport {\n createPlayableLocalEditorHostController,\n PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID,\n type PlayableLocalEditorLifecycleController,\n} from '@fps-games/editor-playable-sdk/internal/local-harness';\nimport {\n createLocalEditorHarness,\n type LocalEditorHarness,\n type LocalEditorHarnessDocumentAdapter,\n type LocalEditorHarnessHistoryOperation,\n type LocalEditorHarnessHistoryOperationOptions,\n type LocalEditorHarnessHistoryOperationResult,\n type LocalEditorHarnessHistoryProjectionResult,\n type LocalEditorHarnessHistoryStateResult,\n type LocalEditorHarnessHierarchyOperationRegistration,\n type LocalEditorMarkerGraphCommand,\n type LocalEditorHarnessOptions,\n type LocalEditorHarnessOperationOrigin,\n type LocalEditorHarnessPersistenceAdapter,\n type LocalEditorHarnessProjectionWaitPolicy,\n type LocalEditorHarnessWorldAdapter,\n} from './local-editor-harness.js';\nimport {\n getLocalEditorHarnessLifecycleOperations,\n type LocalEditorHarnessLifecycleOperations,\n} from './internal/local-editor-lifecycle-operations.js';\nimport { createLocalEditorAgentHierarchyOperations } from './local-editor-agent-actions.js';\n\nexport const PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION = 2 as const;\n\n/**\n * Frozen required contract for playable local editor host manifests.\n * \n * This contract defines the minimum set of methods that a host manifest must provide.\n * The contract is deeply frozen to prevent accidental modifications that would break\n * backward compatibility.\n * \n * IMPORTANT: Adding new required methods is a BREAKING CHANGE and requires:\n * - Incrementing PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION\n * - Providing migration documentation\n * - Updating all reference consumers\n */\nexport const PLAYABLE_LOCAL_EDITOR_HOST_REQUIRED_CONTRACT = Object.freeze({\n document: Object.freeze([\n 'reduceDocument',\n 'getHierarchyItems',\n 'getProjectionNodes',\n 'getProjectionNode',\n 'createPatchFromAsset',\n 'createSerializedPropertyPatch',\n ] as const),\n persistence: Object.freeze([\n 'loadAssets',\n 'runGame',\n ] as const),\n world: Object.freeze({\n direct: Object.freeze([\n 'getCanvas',\n 'disposeWorld',\n 'loadPreviewEngine',\n 'createPreviewEngine',\n 'importPreviewAsset',\n ] as const),\n }),\n});\n\ntype PlayableLocalEditorMaybePromise<T> = T | Promise<T>;\n\nexport type PlayableLocalEditorHostCompatibilitySeverity = 'error' | 'warning' | 'info';\n\nexport interface PlayableLocalEditorHostManifestMetadata {\n manifestVersion: typeof PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION;\n projectId?: string;\n projectName?: string;\n compatibilityTag?: string;\n}\n\nexport interface PlayableLocalEditorHostCompatibilityDiagnostic {\n severity: PlayableLocalEditorHostCompatibilitySeverity;\n code: string;\n message: string;\n path?: string;\n}\n\nexport interface PlayableLocalEditorHostCompatibilityReport {\n supportedManifestVersion: typeof PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION;\n manifestVersion?: unknown;\n projectId?: string;\n projectName?: string;\n compatibilityTag?: string;\n ok: boolean;\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[];\n}\n\nexport interface PlayableLocalEditorAuthoringSourceDriverLike<TDocument = unknown, TPayload = unknown> {\n sourceType: string;\n load(input: unknown): PlayableLocalEditorMaybePromise<unknown>;\n reduce?(input: {\n source: unknown;\n document: TDocument;\n command?: unknown;\n intent?: unknown;\n }): PlayableLocalEditorMaybePromise<TDocument>;\n validate?(input: unknown): PlayableLocalEditorMaybePromise<unknown>;\n save(input: {\n source: unknown;\n document: TDocument;\n command?: unknown;\n intent?: unknown;\n }): PlayableLocalEditorMaybePromise<unknown>;\n compile?(input: unknown): PlayableLocalEditorMaybePromise<unknown>;\n compileRuntimePatch?(input: unknown): PlayableLocalEditorMaybePromise<unknown>;\n}\n\nexport interface PlayableLocalEditorAuthoringHostLike {\n getSourceRegistry(): unknown;\n registerSource(source: unknown): void;\n registerSourceDriver(driver: PlayableLocalEditorAuthoringSourceDriverLike): void;\n loadSource<TDocument = unknown>(ref: unknown): Promise<unknown>;\n commitSource<TDocument = unknown>(input: {\n source: unknown;\n document: TDocument;\n beforeDocument?: TDocument;\n expectedRevision?: number;\n command?: unknown;\n }): Promise<unknown>;\n dispatch<TDocument = unknown, TPayload = unknown>(command: unknown): Promise<unknown>;\n attachRuntimeAdapter?(adapter: unknown): void;\n detachRuntimeAdapter?(): void;\n}\n\nexport interface PlayableLocalEditorPatchResult<TPatch> {\n patch: TPatch;\n label?: string;\n changedId?: string;\n createdId?: string | null;\n changedIds?: string[];\n reprojectIds?: string[];\n projectionImpact?: PlayableLocalEditorProjectionImpact;\n selectId?: string | null;\n}\n\nexport type PlayableLocalEditorProjectionImpact = EditorProjectionImpact;\n\nexport interface PlayableLocalEditorPropertyPatchInput<TDocument = unknown> {\n document: TDocument;\n targetId: string;\n targetIds?: string[];\n path: string;\n value: unknown;\n control?: string;\n valueType?: string;\n commitMode?: string;\n persistence?: string;\n source?: unknown;\n}\n\nexport interface PlayableLocalEditorMultiPropertyPatchInput<TDocument = unknown>\n extends Omit<PlayableLocalEditorPropertyPatchInput<TDocument>, 'targetId'> {\n targetIds: string[];\n activeId: string | null;\n}\n\nexport interface PlayableLocalEditorMultiPropertyCapabilityInput<TDocument = unknown> {\n document: TDocument;\n targetIds: string[];\n activeId: string | null;\n path: string;\n control?: string;\n valueType?: string;\n commitMode?: string;\n persistence?: string;\n}\n\nexport interface PlayableLocalEditorTransformPatchInput<TDocument = unknown> {\n document: TDocument;\n targetId: string;\n targetIds?: string[];\n transform?: unknown;\n worldTransform?: unknown;\n operation?: string;\n duplicate?: boolean;\n [key: string]: unknown;\n}\n\nexport interface PlayableLocalEditorTransformInspectorPreviewInput<TDocument = unknown> {\n document: TDocument;\n targetId: string;\n targetIds: string[];\n activeId: string | null;\n transform: EditorTransformSnapshot;\n}\n\nexport interface PlayableLocalEditorTransformBatchPatchInput<TDocument = unknown> {\n document: TDocument;\n targetIds: string[];\n activeId?: string | null;\n operation?: string;\n [key: string]: unknown;\n}\n\nexport interface PlayableLocalEditorRenderingPropertyChangeResult<TPatch = unknown> {\n changed?: boolean;\n dirty?: boolean;\n status?: string;\n statusTone?: string;\n statusDetails?: string;\n details?: Record<string, unknown>;\n refreshWorldRendering?: boolean;\n documentPatch?: PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport interface PlayableLocalEditorRuntimeInspectorContext<TDocument = unknown> {\n document: TDocument;\n targetIds: string[];\n activeId: string | null;\n inspectorObject: unknown;\n projectionNode?: unknown | null;\n projectedRoot?: unknown;\n}\n\nexport interface PlayableLocalEditorPrefabStageInput<TAsset = unknown> {\n assetId: string;\n browserAssetId?: string;\n asset?: TAsset | null;\n}\n\nexport interface PlayableLocalEditorPrefabStageDescriptor<TDocument = unknown> {\n assetId: string;\n browserAssetId?: string;\n label: string;\n sourceAssetId?: string;\n sourceAssetGuid?: string;\n readonly?: boolean;\n previewNodeId?: string;\n document?: TDocument;\n data?: unknown;\n}\n\nexport interface PlayableLocalEditorPrefabStageContext {\n previewNodeId?: string;\n importStructureReady: boolean;\n importStructure: unknown | null;\n}\n\nexport interface PlayableLocalEditorHierarchyActionsCapability<TDocument, TPatch = unknown> {\n operations?: readonly LocalEditorHarnessHierarchyOperationRegistration<TDocument, TPatch>[];\n}\n\nexport interface PlayableLocalEditorAgentContextObjectInput<TDocument = unknown> {\n document: TDocument;\n objectId: string;\n targetIds: string[];\n activeId: string | null;\n contextNodeId: string | null;\n hierarchyItem: unknown | null;\n hierarchyItems: readonly unknown[];\n projectionNode: unknown | null | undefined;\n}\n\nexport interface PlayableLocalEditorAgentContextObjectSetInput<TDocument = unknown> {\n document: TDocument;\n objectIds: string[];\n activeId: string | null;\n hierarchyItems: readonly unknown[];\n projectionNodes: Record<string, unknown | null | undefined>;\n}\n\nexport interface PlayableLocalEditorAgentContextRegionBindingInput<TDocument = unknown>\n extends PlayableLocalEditorAgentContextObjectSetInput<TDocument> {\n relationshipType: 'selection-region';\n}\n\nexport interface PlayableLocalEditorAgentContextCapability<TDocument> {\n describeSceneObject?(input: PlayableLocalEditorAgentContextObjectInput<TDocument>): EditorAgentContextSemantics | null | undefined;\n describeSceneObjectSet?(input: PlayableLocalEditorAgentContextObjectSetInput<TDocument>): EditorAgentContextSemantics | null | undefined;\n describeRegionBinding?(input: PlayableLocalEditorAgentContextRegionBindingInput<TDocument>): EditorAgentContextSemantics | null | undefined;\n}\n\nexport interface PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset = unknown> {\n cloneDocument?(document: TDocument): TDocument;\n compareDocuments?(left: TDocument, right: TDocument): boolean;\n prepareDocument?(document: TDocument, assets: TAsset[]): TDocument;\n hydrateDocumentAssets?(document: TDocument, assets: TAsset[]): TDocument;\n resolveUpdatedAssetSnapshot?(\n assets: TAsset[],\n input: { assetId: string },\n ): { assetId: string; contentHash?: string } | null;\n listAssetSnapshots?(assets: TAsset[]): Array<{ assetId: string; contentHash?: string }>;\n reconcileUpdatedAsset?(\n document: TDocument,\n input: { assetId: string },\n ): {\n document: TDocument;\n reconciledBindingCount?: number;\n warnings?: Array<{\n code: string;\n gameObjectId?: string;\n slotId?: string;\n materialAssetId?: string;\n candidateSlotIds?: string[];\n }>;\n };\n validateDocument?(\n document: TDocument,\n context: {\n phase: EditorDiagnosticPhase;\n scopeId: string;\n documentRevision: number;\n projectionRevision: number;\n },\n ): readonly EditorDiagnostic[];\n summarize?(document: TDocument): string;\n}\n\nexport interface PlayableLocalEditorSelectionCapability<TDocument> {\n isSelectable?(document: TDocument, id: string): boolean;\n isLocked?(document: TDocument, id: string): boolean;\n}\n\nexport interface PlayableLocalEditorInspectorCapability<TDocument> {\n getInspectorObject?(document: TDocument, activeId: string): unknown | null;\n getInspectorMultiObject?(document: TDocument, selectedIds: string[], activeId: string | null): unknown | null;\n getRuntimeInspectorSections?(context: PlayableLocalEditorRuntimeInspectorContext<TDocument>): unknown[];\n}\n\nexport interface PlayableLocalEditorAssetBrowserCapability<TDocument> {\n getBrowserAssetItems?(document: TDocument): unknown[];\n}\n\nexport interface PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset = unknown> {\n createPatchFromAsset?(asset: TAsset, input?: Record<string, unknown> & { document?: TDocument; placement?: unknown }): {\n patch: TPatch;\n label?: string;\n };\n createAssetActionPatch?(input: Record<string, unknown> & { document: TDocument; asset?: TAsset }): PlayableLocalEditorPatchResult<TPatch> | null;\n createPlacedAssetPatch?(input: Record<string, unknown> & { document: TDocument; asset?: TAsset }): PlayableLocalEditorPatchResult<TPatch> | null;\n findCreatedId?(beforeDocument: TDocument, afterDocument: TDocument): string | null;\n}\n\nexport interface PlayableLocalEditorTransformCommandsCapability<TDocument, TPatch> {\n documentCapabilities?: Partial<EditorTransformDocumentCapabilities>;\n canCreateSerializedMultiPropertyPatch?(input: PlayableLocalEditorMultiPropertyCapabilityInput<TDocument>): boolean;\n createSerializedMultiPropertyPatch?(input: PlayableLocalEditorMultiPropertyPatchInput<TDocument>): PlayableLocalEditorPatchResult<TPatch> | null;\n createTransformInspectorPreview?(input: PlayableLocalEditorTransformInspectorPreviewInput<TDocument>): EditorTransformSnapshot | null;\n createTransformPatch?(input: PlayableLocalEditorTransformPatchInput<TDocument>): PlayableLocalEditorPatchResult<TPatch> | null;\n createTransformBatchPatch?(input: PlayableLocalEditorTransformBatchPatchInput<TDocument>): PlayableLocalEditorPatchResult<TPatch> | null;\n createDuplicateSelectionPatch?(input: Record<string, unknown> & { document: TDocument; targetIds: string[] }): PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport interface PlayableLocalEditorSceneGraphCapability<TDocument, TPatch> {\n validateSceneGraphDrop?(document: TDocument, intent: unknown): unknown;\n createSceneGraphRenamePatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n createSceneGraphCreateGroupPatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n createSceneGraphCreatePrimitivePatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n createSceneGraphDeletePatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n createSceneGraphDropPatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n validateSceneGraphMove?(document: TDocument, intent: unknown): unknown;\n createSceneGraphMovePatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n validateSceneGraphGroupSelection?(document: TDocument, intent: unknown): unknown;\n createSceneGraphGroupSelectionPatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport type PlayableLocalEditorMarkerGraphCommand = LocalEditorMarkerGraphCommand;\n\nexport interface PlayableLocalEditorMarkerGraphCapability<TDocument, TPatch> {\n getMarkerGraph?(document: TDocument): SpatialMarkerGraph | null;\n getMarkerTypeCatalog?(document: TDocument): SpatialMarkerTypeDefinition[];\n getRelationTypeCatalog?(document: TDocument): SpatialRelationTypeDefinition[];\n getPrefabInstanceMarkerOverlays?(document: TDocument): Array<{ ownerInstanceId: string; localNodeId: string; marker: SpatialMarkerNode }>;\n getPrefabStageMarkerOverlays?(document: TDocument, prefabAssetId: string, previewInstanceId: string): Array<{ ownerInstanceId: string; localNodeId: string; marker: SpatialMarkerNode }>;\n createMarkerGraphPatch?(document: TDocument, command: PlayableLocalEditorMarkerGraphCommand): PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport interface PlayableLocalEditorWorldPreviewCapability<TDocument> {\n getSceneCameraPreviewRig?(document: TDocument): unknown | null;\n getWorldAppearance?(document: TDocument): unknown | null;\n}\n\nexport interface PlayableLocalEditorRenderingCapability<TDocument, TPatch = unknown> {\n getWorldRendering?(document: TDocument): unknown | null;\n getRenderingPanelState?(document: TDocument, context?: Record<string, unknown>): unknown | null;\n onRenderingAction?(input: Record<string, unknown> & { document: TDocument }): PlayableLocalEditorMaybePromise<\n boolean | void | PlayableLocalEditorRenderingPropertyChangeResult<TPatch>\n >;\n onRenderingPropertyChange?(input: Record<string, unknown> & { document: TDocument }): PlayableLocalEditorMaybePromise<\n boolean | void | PlayableLocalEditorRenderingPropertyChangeResult<TPatch>\n >;\n getShadowMapExperimentConfig?(): unknown | null;\n getShadowMapExperimentPlan?(document: TDocument): unknown | null;\n createShadowMapExperimentProfilesPatch?(input: {\n document: TDocument;\n qualityProfile?: string | null;\n behaviorProfile?: string | null;\n }): PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport interface PlayableLocalEditorPrefabStageCapability<TDocument, TAsset = unknown> {\n getPrefabStageDescriptor?(\n document: TDocument,\n input: PlayableLocalEditorPrefabStageInput<TAsset>,\n ): PlayableLocalEditorPrefabStageDescriptor<TDocument> | null;\n getPrefabStageProjectionNodes?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n ): unknown[];\n getPrefabStageStructure?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n context: PlayableLocalEditorPrefabStageContext,\n ): unknown[];\n getPrefabStageInspectorObject?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n selectedItemId: string | null,\n context: PlayableLocalEditorPrefabStageContext,\n ): unknown | null;\n resolvePrefabStagePreviewTarget?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n projectionNodeId: string,\n context: PlayableLocalEditorPrefabStageContext,\n ): unknown | null;\n getPrefabStageProjectionNodeId?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n nodeId: string,\n context: PlayableLocalEditorPrefabStageContext,\n ): string | null;\n}\n\nexport interface PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset = unknown> {\n documentLifecycle?: PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset>;\n selection?: PlayableLocalEditorSelectionCapability<TDocument>;\n inspector?: PlayableLocalEditorInspectorCapability<TDocument>;\n assetBrowser?: PlayableLocalEditorAssetBrowserCapability<TDocument>;\n assetActions?: PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset>;\n transformCommands?: PlayableLocalEditorTransformCommandsCapability<TDocument, TPatch>;\n sceneGraph?: PlayableLocalEditorSceneGraphCapability<TDocument, TPatch>;\n markerGraph?: PlayableLocalEditorMarkerGraphCapability<TDocument, TPatch>;\n worldPreview?: PlayableLocalEditorWorldPreviewCapability<TDocument>;\n rendering?: PlayableLocalEditorRenderingCapability<TDocument, TPatch>;\n prefabStage?: PlayableLocalEditorPrefabStageCapability<TDocument, TAsset>;\n hierarchyActions?: PlayableLocalEditorHierarchyActionsCapability<TDocument, TPatch>;\n agentContext?: PlayableLocalEditorAgentContextCapability<TDocument>;\n}\n\nexport interface PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset = unknown> {\n reduceDocument(document: TDocument, command: any): TDocument;\n getHierarchyItems(document: TDocument): unknown[];\n isHierarchyStructureChange?(command: DocumentCommand<TDocument, TPatch>): boolean;\n getProjectionNodes(document: TDocument): unknown[];\n getProjectionNode(document: TDocument, id: string): unknown | null;\n getProjectionNodesForTarget?(document: TDocument, targetId: string): unknown[];\n resolveProjectionTargetId?(document: TDocument, projectionNodeId: string): string | null;\n getProjectionSelectionNodeIds?(document: TDocument, targetId: string): string[];\n createPatchFromAsset(asset: TAsset, input?: Record<string, unknown> & { document?: TDocument; placement?: unknown }): {\n patch: TPatch;\n label?: string;\n };\n createSerializedPropertyPatch(input: PlayableLocalEditorPropertyPatchInput<TDocument>): PlayableLocalEditorPatchResult<TPatch> | null;\n resolveDiagnosticLocator?(\n document: TDocument,\n diagnostic: EditorDiagnostic,\n ): EditorDiagnosticLocator | null;\n}\n\nexport interface PlayableLocalEditorPersistenceCapability<TDocument, TAsset = unknown> {\n loadAuthoringSource?(): PlayableLocalEditorMaybePromise<{\n source: unknown;\n document: TDocument;\n assets?: TAsset[];\n summary?: string;\n }>;\n loadDocument?(): PlayableLocalEditorMaybePromise<TDocument>;\n loadAssets(): PlayableLocalEditorMaybePromise<TAsset[]>;\n saveAuthoringSource?(input: {\n source: unknown;\n document: TDocument;\n }): PlayableLocalEditorMaybePromise<{\n source: unknown;\n document: TDocument;\n summary?: string;\n }>;\n saveDocument?(document: TDocument): PlayableLocalEditorMaybePromise<{ document: TDocument; summary?: string }>;\n runGame(context?: { reason: 'save' | 'discard' }): PlayableLocalEditorMaybePromise<void>;\n}\n\nexport interface PlayableLocalEditorWorldCapability<TAsset = unknown> {\n disposeWorld(): PlayableLocalEditorMaybePromise<void>;\n getCanvas(): HTMLCanvasElement | null;\n loadPreviewEngine(): PlayableLocalEditorMaybePromise<Record<string, any>>;\n createPreviewEngine(engineModule: Record<string, any>, canvas: HTMLCanvasElement): any;\n importPreviewAsset(context: any): Promise<unknown | null>;\n resolveMaterialTextureUrl?(texture: ArtistMaterialTextureRef): string | null | undefined;\n toBrowserAssetItem?(asset: TAsset): unknown;\n resolveAssetId?(asset: TAsset): string;\n}\n\nexport interface PlayableLocalEditorWorldOptions {\n cameraTarget?: { x: number; y: number; z: number };\n cameraRadius?: number;\n clearColor?: { r: number; g: number; b: number; a: number };\n sky?: Record<string, unknown> | false;\n grid?: Record<string, unknown>;\n useRightHandedSystem?: boolean;\n coordinateAxes?: boolean;\n selectionEdgesPrewarm?: BabylonEditorProjectionSelectionEdgesPrewarm;\n}\n\nexport interface PlayableLocalEditorGridContext {\n getCamera(): unknown | null;\n getEditorCamera(): unknown | null;\n}\n\nexport type PlayableLocalEditorGridFactory = (\n babylon: Record<string, any>,\n scene: unknown,\n camera?: unknown,\n context?: PlayableLocalEditorGridContext,\n) => unknown | void;\n\nexport interface PlayableLocalEditorAssetReloadResult {\n ok: boolean;\n assetCount: number;\n status: string;\n}\n\nexport interface PlayableLocalEditorUpdatedAssetRefreshResult extends PlayableLocalEditorAssetReloadResult {\n assetId: string;\n reconciledBindingCount: number;\n warnings: Array<{\n code: string;\n gameObjectId?: string;\n slotId?: string;\n materialAssetId?: string;\n candidateSlotIds?: string[];\n }>;\n error?: string;\n}\n\nexport interface PlayableLocalEditorAssetCreationOptions {\n placement?: unknown;\n}\n\nexport interface PlayableLocalEditorAssetCreationResult {\n ok: boolean;\n assetId: string;\n changed?: boolean;\n createdId?: string | null;\n status: string;\n error?: string;\n}\n\nexport type PlayableLocalEditorOperationOrigin = LocalEditorHarnessOperationOrigin;\nexport type PlayableLocalEditorProjectionWaitPolicy = LocalEditorHarnessProjectionWaitPolicy;\nexport type PlayableLocalEditorHistoryOperation = LocalEditorHarnessHistoryOperation;\nexport type PlayableLocalEditorHistoryOperationOptions = LocalEditorHarnessHistoryOperationOptions;\nexport type PlayableLocalEditorHistoryProjectionResult = LocalEditorHarnessHistoryProjectionResult;\nexport type PlayableLocalEditorHistoryStateResult = LocalEditorHarnessHistoryStateResult;\nexport type PlayableLocalEditorHistoryOperationResult<TDocument = unknown> =\n LocalEditorHarnessHistoryOperationResult<TDocument>;\n\nexport interface PlayableLocalEditorHarnessApi<TDocument = unknown> {\n render(): void;\n notifyViewportRevealed(reason?: string): void;\n getWorkingDocument(): TDocument | null;\n projectAssetDropPoint(point: { x: number; y: number } | null): { x: number; y: number; z: number } | null;\n getUnsavedChangesState(): PlayableLocalEditorUnsavedChangesState;\n getSaveFailureState(): PlayableLocalEditorSaveFailureState | null;\n getLifecycleService(): FpsEditorLifecycleService | null;\n validateOperation(phase: 'save' | 'run' | 'export'): boolean;\n validateOperationSettled(phase: 'save' | 'run' | 'export'): Promise<boolean>;\n validateOperationSettledForCurrentDocument(phase: 'save' | 'run' | 'export'): Promise<boolean>;\n runExclusiveDocumentOperation<TResult>(\n operation: (executor: PlayableLocalEditorDocumentOperationExecutor) => Promise<TResult>,\n ): Promise<TResult>;\n reloadAssets(): Promise<PlayableLocalEditorAssetReloadResult>;\n refreshUpdatedAsset(input: {\n assetId: string;\n expectedContentHash: string;\n }): Promise<PlayableLocalEditorUpdatedAssetRefreshResult>;\n createAssetFromAssetId(assetId: string, options?: PlayableLocalEditorAssetCreationOptions): PlayableLocalEditorAssetCreationResult;\n undo(options?: PlayableLocalEditorHistoryOperationOptions): Promise<PlayableLocalEditorHistoryOperationResult<TDocument>>;\n redo(options?: PlayableLocalEditorHistoryOperationOptions): Promise<PlayableLocalEditorHistoryOperationResult<TDocument>>;\n enterEditor(): Promise<void>;\n saveScene(): Promise<boolean>;\n saveAndRunGame(): Promise<boolean>;\n discardAndRunGame(): Promise<void>;\n}\n\nexport interface PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset = unknown> {\n metadata: PlayableLocalEditorHostManifestMetadata;\n root?: HTMLElement;\n localTestActions?: boolean;\n gameModeEntryVisible?: boolean;\n pluginHost?: FpsEditorPluginHost;\n authoring?: {\n host?: PlayableLocalEditorAuthoringHostLike;\n drivers?: readonly PlayableLocalEditorAuthoringSourceDriverLike[];\n };\n documentAdapter: PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset>;\n capabilities?: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>;\n persistenceAdapter: PlayableLocalEditorPersistenceCapability<TDocument, TAsset>;\n worldAdapter: PlayableLocalEditorWorldCapability<TAsset>;\n agentBridge?: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>['agentBridge'];\n world?: PlayableLocalEditorWorldOptions;\n createGrid?: PlayableLocalEditorGridFactory;\n lifecycle: {\n loadingContent: PlayableLocalEditorHostLoadingContent;\n interactions?: PlayableLocalEditorInteractionPolicy;\n beforeDiscardAndRunGame?: () => void | Promise<void>;\n minAssetLoadingOverlayMs?: number;\n };\n forgePlay?: {\n enabled?: boolean;\n window?: PlayableForgePlayWindowLike;\n handleProjectAssetCommand?: (\n context: PlayableLocalEditorHostBridgeContext<PlayableLocalEditorHarnessApi<TDocument>>,\n ) => Promise<void> | void;\n handleAssetDrop?: (\n payload: Record<string, unknown>,\n context: Omit<PlayableLocalEditorHostBridgeContext<PlayableLocalEditorHarnessApi<TDocument>>, 'name'>,\n ) => void;\n hasUnsavedPlatformChanges?: () => boolean;\n exportDocument?: (input: {\n payload: Record<string, unknown>;\n saveState: PlayableForgePlaySaveState;\n postEvent: (name: string, payload?: Record<string, unknown>) => void;\n context: Omit<PlayableLocalEditorHostBridgeContext<PlayableLocalEditorHarnessApi<TDocument>>, 'name' | 'payload'>;\n }) => Promise<PlayableForgePlayDocumentExportResult> | PlayableForgePlayDocumentExportResult;\n reportError?: (error: unknown) => void;\n };\n}\n\nexport interface PlayableLocalEditorHost<TDocument = unknown> {\n harness: PlayableLocalEditorHarnessApi<TDocument>;\n lifecycle: FpsEditorLifecycleService;\n enterEditor(): Promise<void>;\n saveScene(): Promise<boolean>;\n saveAndRunGame(): Promise<boolean>;\n discardAndRunGame(): Promise<void>;\n runWithAssetLoadingOverlay<T>(operation: () => Promise<T>): Promise<T>;\n getBridge(): PlayableForgePlayModeBridge | null;\n getCompatibilityReport(): PlayableLocalEditorHostCompatibilityReport;\n dispose(): Promise<void>;\n}\n\nexport interface FpsGameEditorLocalEditorHostOptions<TDocument, TPatch, TAsset = unknown>\n extends Omit<PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>, 'metadata' | 'agentBridge'> {\n project: Pick<FpsGameEditorProjectDefinition, 'projectId' | 'projectName'>;\n compatibilityTag?: string;\n agentBridgeSessionMetadata?: Record<string, unknown>;\n agentBridge?: PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>['agentBridge'];\n logCompatibilityReport?: boolean;\n logger?: Pick<Console, 'warn' | 'error'>;\n}\n\nexport interface FpsGameEditorLocalEditorHostResult<TDocument, TPatch, TAsset = unknown> {\n host: PlayableLocalEditorHost<TDocument>;\n manifest: PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>;\n compatibilityReport: PlayableLocalEditorHostCompatibilityReport;\n}\n\nexport function createFpsGameEditorLocalEditorHost<TDocument, TPatch, TAsset = unknown>(\n options: FpsGameEditorLocalEditorHostOptions<TDocument, TPatch, TAsset>,\n): FpsGameEditorLocalEditorHostResult<TDocument, TPatch, TAsset> {\n const manifest = createFpsGameEditorLocalEditorHostManifest(options);\n const host = createPlayableLocalEditorHost<TDocument, TPatch, TAsset>(manifest);\n const compatibilityReport = host.getCompatibilityReport();\n if (options.logCompatibilityReport !== false) {\n logPlayableLocalEditorHostCompatibilityReport(compatibilityReport, options.logger);\n }\n return {\n host,\n manifest,\n compatibilityReport,\n };\n}\n\nexport function createFpsGameEditorLocalEditorHostManifest<TDocument, TPatch, TAsset = unknown>(\n options: FpsGameEditorLocalEditorHostOptions<TDocument, TPatch, TAsset>,\n): PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset> {\n const {\n project,\n compatibilityTag,\n agentBridgeSessionMetadata,\n agentBridge: configuredAgentBridge,\n logCompatibilityReport: _logCompatibilityReport,\n logger: _logger,\n ...manifestOptions\n } = options;\n const agentBridge = agentBridgeSessionMetadata\n ? {\n ...(configuredAgentBridge ?? {}),\n sessionMetadata: {\n ...(configuredAgentBridge?.sessionMetadata as Record<string, unknown> | undefined),\n ...agentBridgeSessionMetadata,\n },\n }\n : configuredAgentBridge;\n\n return {\n ...manifestOptions,\n metadata: {\n manifestVersion: PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION,\n projectId: project.projectId,\n projectName: project.projectName,\n ...(compatibilityTag ? { compatibilityTag } : {}),\n },\n ...(agentBridge ? { agentBridge } : {}),\n };\n}\n\nfunction logPlayableLocalEditorHostCompatibilityReport(\n report: PlayableLocalEditorHostCompatibilityReport,\n logger: Pick<Console, 'warn' | 'error'> = console,\n): void {\n const visibleDiagnostics = report.diagnostics.filter(\n diagnostic => diagnostic.severity === 'warning' || diagnostic.severity === 'error',\n );\n if (visibleDiagnostics.length === 0) return;\n const doctorReport = inspectPlayableEditorHostCompatibilityReport({\n diagnostics: visibleDiagnostics,\n });\n const formatted = formatPlayableEditorDoctorReport(doctorReport);\n if (doctorReport.ok) logger.warn(formatted);\n else logger.error(formatted);\n}\n\nexport function inspectPlayableLocalEditorHostManifest(\n manifest: unknown,\n): PlayableLocalEditorHostCompatibilityReport {\n const diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[] = [];\n const report: PlayableLocalEditorHostCompatibilityReport = {\n supportedManifestVersion: PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION,\n ok: true,\n diagnostics,\n };\n\n if (!isRecord(manifest)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'manifest.invalid',\n 'Playable local editor host manifest must be an object.',\n 'manifest',\n ));\n report.ok = false;\n return report;\n }\n\n inspectMetadata(manifest.metadata, report, diagnostics);\n inspectRequiredCapability(\n manifest,\n diagnostics,\n 'documentAdapter',\n 'documentCapability',\n PLAYABLE_LOCAL_EDITOR_HOST_REQUIRED_CONTRACT.document,\n );\n inspectRequiredCapability(\n manifest,\n diagnostics,\n 'persistenceAdapter',\n 'persistenceCapability',\n PLAYABLE_LOCAL_EDITOR_HOST_REQUIRED_CONTRACT.persistence,\n );\n inspectWorldCapability(manifest.worldAdapter, diagnostics);\n inspectLifecycle(manifest.lifecycle, diagnostics);\n inspectForgePlay(manifest.forgePlay, diagnostics);\n inspectAuthoring(manifest.authoring, diagnostics);\n inspectCapabilities(manifest.capabilities, diagnostics);\n\n report.ok = !diagnostics.some(diagnostic => diagnostic.severity === 'error');\n return report;\n}\n\nexport function formatPlayableLocalEditorHostCompatibilityReport(\n report: PlayableLocalEditorHostCompatibilityReport,\n): string {\n const project = report.projectName ?? report.projectId ?? 'unknown project';\n const header = report.ok\n ? `Playable local editor host compatibility: PASS (${project})`\n : `Playable local editor host compatibility: BLOCKED (${project})`;\n if (report.diagnostics.length === 0) return header;\n const lines = report.diagnostics.map((diagnostic) => {\n const path = diagnostic.path ? ` ${diagnostic.path}` : '';\n return `[${diagnostic.severity.toUpperCase()}] ${diagnostic.code}${path}: ${diagnostic.message}`;\n });\n return [header, ...lines].join('\\n');\n}\n\nfunction createHarnessDocumentAdapter<TDocument, TPatch, TAsset>(\n documentCapability: PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset>,\n capabilities: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset> | undefined,\n): LocalEditorHarnessDocumentAdapter<TDocument, TPatch, TAsset> {\n return {\n ...documentCapability,\n ...capabilities?.documentLifecycle,\n ...capabilities?.selection,\n ...capabilities?.inspector,\n ...capabilities?.markerGraph,\n ...capabilities?.assetBrowser,\n ...capabilities?.assetActions,\n ...capabilities?.transformCommands,\n ...capabilities?.sceneGraph,\n ...capabilities?.worldPreview,\n ...capabilities?.rendering,\n ...capabilities?.prefabStage,\n } as unknown as LocalEditorHarnessDocumentAdapter<TDocument, TPatch, TAsset>;\n}\n\nfunction createHarnessHierarchyOptions<TDocument, TPatch, TAsset>(\n manifest: PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>,\n): LocalEditorHarnessOptions<TDocument, TPatch, TAsset>['hierarchy'] | undefined {\n const capabilities = manifest.capabilities;\n const agentController = createEditorAgentInteractionController({\n transport: createForgePlayAgentTransport({\n window: manifest.forgePlay?.window,\n }),\n });\n const agentOperations = createLocalEditorAgentHierarchyOperations<TDocument>({\n sendContext: context => agentController.sendContext(context),\n getProjectionNode: (document, id) => manifest.documentAdapter.getProjectionNode(document, id),\n getMarkerGraph: document => capabilities?.markerGraph?.getMarkerGraph?.(document) ?? null,\n getMarkerTypeCatalog: document => capabilities?.markerGraph?.getMarkerTypeCatalog?.(document) ?? [],\n getRelationTypeCatalog: document => capabilities?.markerGraph?.getRelationTypeCatalog?.(document) ?? [],\n describeSceneObject: manifest.capabilities?.agentContext?.describeSceneObject,\n describeSceneObjectSet: manifest.capabilities?.agentContext?.describeSceneObjectSet,\n describeRegionBinding: manifest.capabilities?.agentContext?.describeRegionBinding,\n source: {\n projectId: manifest.metadata?.projectId,\n projectName: manifest.metadata?.projectName,\n },\n reportError: manifest.forgePlay?.reportError,\n });\n const operations = capabilities?.hierarchyActions?.operations;\n return {\n operations: [\n ...(agentOperations as readonly LocalEditorHarnessHierarchyOperationRegistration<TDocument, TPatch>[]),\n ...((operations ?? []) as readonly LocalEditorHarnessHierarchyOperationRegistration<TDocument, TPatch>[]),\n ],\n };\n}\n\nexport function createPlayableLocalEditorHost<TDocument, TPatch, TAsset = unknown>(\n manifest: PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>,\n): PlayableLocalEditorHost<TDocument> {\n const compatibilityReport = inspectPlayableLocalEditorHostManifest(manifest);\n if (!compatibilityReport.ok) {\n throw new Error(formatPlayableLocalEditorHostCompatibilityReport(compatibilityReport));\n }\n\n const authoringHost = manifest.authoring\n ? (manifest.authoring.host as ProjectAuthoringHost | undefined)\n ?? createProjectAuthoringHost({ drivers: [...(manifest.authoring.drivers ?? [])] as AuthoringSourceDriver[] })\n : undefined;\n const harnessOptions = {\n root: manifest.root,\n localTestActions: manifest.localTestActions,\n gameModeEntryVisible: manifest.gameModeEntryVisible,\n pluginHost: manifest.pluginHost,\n authoringHost,\n documentAdapter: createHarnessDocumentAdapter(manifest.documentAdapter, manifest.capabilities),\n persistenceAdapter: manifest.persistenceAdapter as unknown as LocalEditorHarnessPersistenceAdapter<TDocument, TAsset>,\n worldAdapter: createHarnessWorldAdapter(manifest.worldAdapter),\n agentBridge: manifest.agentBridge,\n transformDocumentCapabilities: manifest.capabilities?.transformCommands?.documentCapabilities,\n world: manifest.world as LocalEditorHarnessOptions<TDocument, TPatch, TAsset>['world'],\n createGrid: manifest.createGrid as LocalEditorHarnessOptions<TDocument, TPatch, TAsset>['createGrid'],\n hierarchy: createHarnessHierarchyOptions(manifest),\n } satisfies LocalEditorHarnessOptions<TDocument, TPatch, TAsset>;\n const harness = createLocalEditorHarness<TDocument, TPatch, TAsset>(harnessOptions);\n const lifecycleOperations = getLocalEditorHarnessLifecycleOperations(harness);\n const root = manifest.root ?? document.body;\n const loadingOverlay = createPlayableLocalEditorLoadingOverlay(root);\n const interactions = composePlayableLocalEditorInteractionPolicy(\n manifest.lifecycle.interactions,\n harness.getDefaultInteractionPolicy?.(),\n createNativePlayableLocalEditorInteractionPolicy(root),\n );\n const uninstallBeforeUnloadGuard = installPlayableLocalEditorBeforeUnloadGuard(root, harness);\n const controller = createPlayableLocalEditorHostController({\n harness,\n lifecycleOperations,\n lifecycleScopeHost: manifest.pluginHost\n ? getFpsEditorPluginLifecycleScopeHost(manifest.pluginHost)\n : undefined,\n eventPublisher: manifest.pluginHost?.eventPublisher,\n reportDiagnostic: manifest.pluginHost\n ? diagnostic => manifest.pluginHost?.reportDiagnostic(diagnostic)\n : undefined,\n loadingOverlay,\n loadingContent: manifest.lifecycle.loadingContent,\n interactions,\n beforeDiscardAndRunGame: manifest.lifecycle.beforeDiscardAndRunGame,\n minAssetLoadingOverlayMs: manifest.lifecycle.minAssetLoadingOverlayMs,\n renderAfterEnter: false,\n forgePlay: manifest.forgePlay\n ? {\n enabled: manifest.forgePlay.enabled,\n window: manifest.forgePlay.window,\n hasUnsavedPlatformChanges: manifest.forgePlay.hasUnsavedPlatformChanges,\n handleProjectAssetCommand: manifest.forgePlay.handleProjectAssetCommand,\n handleAssetDrop: manifest.forgePlay.handleAssetDrop,\n exportDocument: manifest.forgePlay.exportDocument,\n reportError: manifest.forgePlay.reportError,\n }\n : undefined,\n });\n const hostHarness = controller.harness as PlayableLocalEditorHarnessApi<TDocument>;\n bindHarnessLifecycle(lifecycleOperations, controller);\n const lifecycleParticipantDisposers = manifest.pluginHost\n ? resolveFpsEditorLifecycleParticipants(manifest.pluginHost.contributions)\n .map(participant => controller.lifecycle.registerParticipant(participant))\n : [];\n if (lifecycleParticipantDisposers.length > 0) {\n controller.lifecycle.addScopeResource(\n PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID,\n () => {\n for (const dispose of [...lifecycleParticipantDisposers].reverse()) dispose();\n },\n );\n }\n\n let disposal: Promise<void> | null = null;\n let harnessDisposed = false;\n return {\n harness: hostHarness,\n lifecycle: controller.lifecycle.lifecycle,\n enterEditor: controller.enterEditor,\n saveScene: controller.saveScene,\n saveAndRunGame: controller.saveAndRunGame,\n discardAndRunGame: async () => {\n await controller.discardAndRunGame();\n },\n runWithAssetLoadingOverlay: controller.runWithAssetLoadingOverlay,\n getBridge: controller.getBridge,\n getCompatibilityReport() {\n return cloneCompatibilityReport(compatibilityReport);\n },\n async dispose() {\n if (disposal) return disposal;\n const pending = (async () => {\n await controller.dispose();\n uninstallBeforeUnloadGuard();\n if (!harnessDisposed) {\n await harness.dispose();\n harnessDisposed = true;\n }\n })();\n disposal = pending;\n void pending.catch(() => {\n if (disposal === pending) disposal = null;\n });\n return pending;\n },\n };\n}\n\nfunction bindHarnessLifecycle<TDocument>(\n lifecycleOperations: LocalEditorHarnessLifecycleOperations,\n controller: Pick<PlayableLocalEditorHost<TDocument>, 'enterEditor'> & {\n saveScene(executor?: PlayableLocalEditorDocumentOperationExecutor): Promise<boolean>;\n } & Pick<\n PlayableLocalEditorLifecycleController,\n | 'saveAndRunGame'\n | 'discardAndRunGame'\n | 'prepareSaveAndRunGame'\n | 'prepareDiscardAndRunGame'\n > & { lifecycle: PlayableLocalEditorLifecycleController },\n): void {\n lifecycleOperations.setLifecycleController({\n enterEditor: controller.enterEditor,\n saveScene: (_operation, _context, executor) => controller.saveScene(executor),\n saveAndRunGame: controller.saveAndRunGame,\n discardAndRunGame: controller.discardAndRunGame,\n prepareSaveAndRunGame: controller.prepareSaveAndRunGame,\n prepareDiscardAndRunGame: controller.prepareDiscardAndRunGame,\n lifecycle: controller.lifecycle.lifecycle,\n synchronizeDocumentState: controller.lifecycle.synchronizeDocumentState,\n registerParticipant: controller.lifecycle.registerParticipant,\n openScope: controller.lifecycle.openScope,\n addScopeResource: controller.lifecycle.addScopeResource,\n closeScope: controller.lifecycle.closeScope,\n });\n}\n\nfunction createNativePlayableLocalEditorInteractionPolicy(\n root: HTMLElement,\n): PlayableLocalEditorInteractionPolicy {\n const browserWindow = resolvePlayableLocalEditorWindow(root);\n return {\n confirmDiscardUnsavedChanges(input: PlayableLocalEditorDiscardConfirmationInput) {\n return browserWindow?.confirm?.(formatNativeDiscardConfirmationMessage(input)) ?? true;\n },\n notifySaveFailed(input: PlayableLocalEditorSaveFailureInput) {\n browserWindow?.alert?.(formatNativeSaveFailureMessage(input));\n },\n };\n}\n\nfunction composePlayableLocalEditorInteractionPolicy(\n override: PlayableLocalEditorInteractionPolicy | undefined,\n fallback: PlayableLocalEditorInteractionPolicy | undefined,\n nativeFallback: PlayableLocalEditorInteractionPolicy,\n): PlayableLocalEditorInteractionPolicy {\n return {\n confirmDiscardUnsavedChanges: override?.confirmDiscardUnsavedChanges\n ?? fallback?.confirmDiscardUnsavedChanges\n ?? nativeFallback.confirmDiscardUnsavedChanges,\n notifySaveFailed: override?.notifySaveFailed\n ?? fallback?.notifySaveFailed\n ?? nativeFallback.notifySaveFailed,\n };\n}\n\nfunction installPlayableLocalEditorBeforeUnloadGuard(\n root: HTMLElement,\n harness: Pick<LocalEditorHarness, 'getUnsavedChangesState'>,\n): () => void {\n const browserWindow = resolvePlayableLocalEditorWindow(root);\n if (!browserWindow?.addEventListener || !browserWindow.removeEventListener) return () => {};\n const onBeforeUnload = (event: BeforeUnloadEvent): string | void => {\n let unsavedChanges: PlayableLocalEditorUnsavedChangesState;\n try {\n unsavedChanges = harness.getUnsavedChangesState();\n } catch (error) {\n console.error('[PlayableLocalEditorHost] beforeunload dirty state unavailable', error);\n return;\n }\n if (!unsavedChanges.dirty || !unsavedChanges.hasWorkingDocument) return;\n event.preventDefault();\n event.returnValue = '';\n return '';\n };\n browserWindow.addEventListener('beforeunload', onBeforeUnload);\n return () => {\n browserWindow.removeEventListener('beforeunload', onBeforeUnload);\n };\n}\n\nfunction resolvePlayableLocalEditorWindow(root: HTMLElement): Window | null {\n return root.ownerDocument?.defaultView ?? (typeof window === 'undefined' ? null : window);\n}\n\nfunction formatNativeDiscardConfirmationMessage(\n _input: PlayableLocalEditorDiscardConfirmationInput,\n): string {\n return '当前编辑内容尚未保存。\\n\\n继续会丢弃这些更改并运行游戏。';\n}\n\nfunction formatNativeSaveFailureMessage(input: PlayableLocalEditorSaveFailureInput): string {\n const status = input.status?.trim() || '保存没有成功,当前编辑内容仍保留在编辑器中。';\n const details = input.details?.trim();\n const error = stringifyPlayableLocalEditorError(input.error)?.trim();\n const extra = [details, error]\n .filter((part): part is string => !!part && part !== status);\n return ['保存失败', status, ...extra].join('\\n\\n');\n}\n\nfunction stringifyPlayableLocalEditorError(error: unknown): string | undefined {\n if (error == null) return undefined;\n if (error instanceof Error) return error.message;\n return String(error);\n}\n\nfunction inspectMetadata(\n metadata: unknown,\n report: PlayableLocalEditorHostCompatibilityReport,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (metadata === undefined) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'metadata.missing',\n 'Manifest metadata is required for the host compatibility contract.',\n 'metadata',\n ));\n return;\n }\n if (!isRecord(metadata)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'metadata.invalid',\n 'Manifest metadata must be an object.',\n 'metadata',\n ));\n return;\n }\n\n report.manifestVersion = metadata.manifestVersion;\n report.projectId = readOptionalString(metadata.projectId);\n report.projectName = readOptionalString(metadata.projectName);\n report.compatibilityTag = readOptionalString(metadata.compatibilityTag);\n\n if (metadata.manifestVersion !== PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'metadata.manifest-version.unsupported',\n `Manifest version ${String(metadata.manifestVersion)} is incompatible with supported version ${PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION}. Upgrade the manifest or use a compatible editor package version.`,\n 'metadata.manifestVersion',\n ));\n }\n}\n\nfunction inspectRequiredCapability(\n manifest: Record<string, unknown>,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n fieldName: string,\n capabilityName: string,\n requiredFunctions: readonly string[],\n): void {\n const capability = manifest[fieldName];\n if (!isRecord(capability)) {\n diagnostics.push(createDiagnostic(\n 'error',\n `${capabilityName}.missing`,\n `${capabilityName} is required.`,\n capabilityName,\n ));\n return;\n }\n for (const functionName of requiredFunctions) {\n const fn = capability[functionName];\n if (typeof fn !== 'function') {\n diagnostics.push(createDiagnostic(\n 'error',\n `${capabilityName}.${functionName}.missing`,\n `${capabilityName}.${functionName} must be a function.`,\n `${capabilityName}.${functionName}`,\n ));\n } else {\n // Validate function signature: check parameter count\n validateFunctionSignature(fn, functionName, capabilityName, diagnostics);\n }\n }\n}\n\n/**\n * Validates function signature by checking parameter count.\n * Issues warnings when declared parameter count differs from expected.\n * \n * Note: Function.length is not fully reliable (rest params, default values, \n * destructured params all affect it), so signature mismatches are reported as\n * warnings rather than blocking errors.\n */\nfunction validateFunctionSignature(\n fn: Function,\n functionName: string,\n capabilityName: string,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n const expectedArity = getExpectedFunctionArity(capabilityName, functionName);\n if (expectedArity === undefined) return; // No validation defined for this function\n \n const actualArity = fn.length;\n const arityMismatch = actualArity < expectedArity.min\n || (expectedArity.max !== undefined && actualArity > expectedArity.max);\n if (arityMismatch) {\n const severity = capabilityName === 'worldCapability' ? 'error' : 'warning';\n diagnostics.push(createDiagnostic(\n severity,\n `${capabilityName}.${functionName}.arity-mismatch`,\n `${capabilityName}.${functionName} declares ${actualArity} parameter(s), but SDK expects ${expectedArity.min}${expectedArity.max !== undefined && expectedArity.max !== expectedArity.min ? `-${expectedArity.max}` : ''}. Verify the function signature matches the SDK contract.`,\n `${capabilityName}.${functionName}`,\n ));\n }\n}\n\n/**\n * Returns expected parameter count for required functions.\n * min: minimum required parameters\n * max: maximum expected parameters (undefined = no limit)\n */\nfunction getExpectedFunctionArity(\n capabilityName: string,\n functionName: string,\n): { min: number; max?: number } | undefined {\n // Document capability function signatures\n if (capabilityName === 'documentCapability') {\n switch (functionName) {\n case 'reduceDocument': return { min: 2, max: 2 }; // (document, command)\n case 'getHierarchyItems': return { min: 1, max: 1 }; // (document)\n case 'getProjectionNodes': return { min: 1, max: 1 }; // (document)\n case 'getProjectionNode': return { min: 2, max: 2 }; // (document, id)\n case 'createPatchFromAsset': return { min: 1, max: 2 }; // (asset, input?)\n case 'createSerializedPropertyPatch': return { min: 1, max: 1 }; // (input)\n }\n }\n \n // Persistence capability function signatures\n if (capabilityName === 'persistenceCapability') {\n switch (functionName) {\n case 'loadAssets': return { min: 1, max: 1 }; // (document)\n case 'runGame': return { min: 0, max: 1 }; // (context?)\n }\n }\n \n // World capability function signatures\n if (capabilityName === 'worldCapability') {\n switch (functionName) {\n case 'getCanvas': return { min: 0, max: 0 }; // ()\n case 'disposeWorld': return { min: 0, max: 0 }; // ()\n case 'loadPreviewEngine': return { min: 0, max: 0 }; // ()\n case 'createPreviewEngine': return { min: 2, max: 2 }; // (engineModule, canvas)\n case 'importPreviewAsset': return { min: 1, max: 1 }; // (context)\n }\n }\n \n return undefined;\n}\n\nfunction inspectWorldCapability(\n worldCapability: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (!isRecord(worldCapability)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'worldCapability.missing',\n 'worldCapability is required.',\n 'worldCapability',\n ));\n return;\n }\n for (const functionName of PLAYABLE_LOCAL_EDITOR_HOST_REQUIRED_CONTRACT.world.direct) {\n const fn = worldCapability[functionName];\n if (typeof fn !== 'function') {\n diagnostics.push(createDiagnostic(\n 'error',\n `worldCapability.${functionName}.missing`,\n `worldCapability.${functionName} must be a function.`,\n `worldCapability.${functionName}`,\n ));\n } else {\n validateFunctionSignature(fn, functionName, 'worldCapability', diagnostics);\n }\n }\n}\n\nfunction createHarnessWorldAdapter<TAsset>(\n worldCapability: PlayableLocalEditorWorldCapability<TAsset>,\n): LocalEditorHarnessWorldAdapter<TAsset> {\n const adapter: LocalEditorHarnessWorldAdapter<TAsset> = {\n disposeGameWorld() {\n return worldCapability.disposeWorld?.() as ReturnType<LocalEditorHarnessWorldAdapter<TAsset>['disposeGameWorld']>;\n },\n getCanvas() {\n return worldCapability.getCanvas();\n },\n loadBabylon() {\n return worldCapability.loadPreviewEngine?.() as ReturnType<LocalEditorHarnessWorldAdapter<TAsset>['loadBabylon']>;\n },\n createEngine(engineModule, canvas) {\n return worldCapability.createPreviewEngine?.(engineModule, canvas);\n },\n importProjectionModel(context) {\n return worldCapability.importPreviewAsset?.(context) as ReturnType<LocalEditorHarnessWorldAdapter<TAsset>['importProjectionModel']>;\n },\n };\n if (worldCapability.toBrowserAssetItem) {\n adapter.toBrowserAssetItem = worldCapability.toBrowserAssetItem as LocalEditorHarnessWorldAdapter<TAsset>['toBrowserAssetItem'];\n }\n if (worldCapability.resolveAssetId) {\n adapter.resolveAssetId = worldCapability.resolveAssetId;\n }\n if (worldCapability.resolveMaterialTextureUrl) {\n adapter.resolveMaterialTextureUrl = worldCapability.resolveMaterialTextureUrl;\n }\n return adapter;\n}\n\nfunction inspectLifecycle(\n lifecycle: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (!isRecord(lifecycle)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'lifecycle.missing',\n 'lifecycle is required.',\n 'lifecycle',\n ));\n return;\n }\n if (!isRecord(lifecycle.loadingContent)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'lifecycle.loading-content.missing',\n 'lifecycle.loadingContent is required.',\n 'lifecycle.loadingContent',\n ));\n }\n}\n\nfunction inspectForgePlay(\n forgePlay: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (!isRecord(forgePlay)) return;\n if (forgePlay.enabled !== false && !forgePlay.window) {\n diagnostics.push(createDiagnostic(\n 'warning',\n 'forge-play.window.missing',\n 'Forge Play bridge is enabled but no window was provided; mode and document bridge commands will not be installed.',\n 'forgePlay.window',\n ));\n }\n}\n\nfunction inspectAuthoring(\n authoring: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (!isRecord(authoring)) return;\n const drivers = Array.isArray(authoring.drivers) ? authoring.drivers : [];\n if (authoring.host && drivers.length > 0) {\n diagnostics.push(createDiagnostic(\n 'info',\n 'authoring.host-overrides-drivers',\n 'authoring.host and authoring.drivers are both present; the provided host will be used.',\n 'authoring',\n ));\n }\n}\n\nfunction inspectCapabilities(\n capabilities: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (capabilities === undefined) return;\n if (!isRecord(capabilities)) {\n diagnostics.push(createDiagnostic(\n 'warning',\n 'capabilities.invalid',\n 'capabilities must be an object when provided.',\n 'capabilities',\n ));\n return;\n }\n const hierarchyActions = capabilities.hierarchyActions;\n if (isRecord(hierarchyActions) && hierarchyActions.contextActions !== undefined) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'capabilities.hierarchyActions.contextActions.removed',\n 'capabilities.hierarchyActions.contextActions was removed; migrate each action to capabilities.hierarchyActions.operations.',\n 'capabilities.hierarchyActions.contextActions',\n ));\n }\n if (isRecord(hierarchyActions)\n && hierarchyActions.operations !== undefined\n && !Array.isArray(hierarchyActions.operations)) {\n diagnostics.push(createDiagnostic(\n 'warning',\n 'capabilities.hierarchyActions.operations.invalid',\n 'capabilities.hierarchyActions.operations should be an array of typed hierarchy operation registrations.',\n 'capabilities.hierarchyActions.operations',\n ));\n }\n if (isRecord(hierarchyActions) && Array.isArray(hierarchyActions.operations)) {\n hierarchyActions.operations.forEach((operation, index) => {\n if (!isRecord(operation)) return;\n if (operation.contextMenu === undefined) return;\n diagnostics.push(createDiagnostic(\n 'error',\n 'capabilities.hierarchyActions.operations.contextMenu.removed',\n 'Hierarchy operation contextMenu was removed; use operation.menu or menu: false.',\n `capabilities.hierarchyActions.operations[${index}].contextMenu`,\n ));\n });\n }\n}\n\nfunction createDiagnostic(\n severity: PlayableLocalEditorHostCompatibilitySeverity,\n code: string,\n message: string,\n path?: string,\n): PlayableLocalEditorHostCompatibilityDiagnostic {\n return {\n severity,\n code,\n message,\n path,\n };\n}\n\nfunction cloneCompatibilityReport(\n report: PlayableLocalEditorHostCompatibilityReport,\n): PlayableLocalEditorHostCompatibilityReport {\n return {\n supportedManifestVersion: report.supportedManifestVersion,\n manifestVersion: report.manifestVersion,\n projectId: report.projectId,\n projectName: report.projectName,\n compatibilityTag: report.compatibilityTag,\n ok: report.ok,\n diagnostics: report.diagnostics.map(diagnostic => ({ ...diagnostic })),\n };\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction readOptionalString(value: unknown): string | undefined {\n return typeof value === 'string' ? value : undefined;\n}\n"]}
1
+ {"version":3,"file":"playable-local-editor-host.js","sourceRoot":"","sources":["../src/playable-local-editor-host.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sCAAsC,EACtC,0BAA0B,GAO3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oCAAoC,EACpC,qCAAqC,GAEtC,MAAM,oCAAoC,CAAC;AAI5C,OAAO,EACL,6BAA6B,GAC9B,MAAM,8BAA8B,CAAC;AAkBtC,OAAO,EACL,uCAAuC,EACvC,gCAAgC,EAChC,4CAA4C,GAc7C,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,uCAAuC,EACvC,0CAA0C,GAE3C,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,wBAAwB,GAezB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,wCAAwC,GAEzC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,yCAAyC,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,yCAAyC,EAAE,MAAM,iCAAiC,CAAC;AAE5F,MAAM,CAAC,MAAM,2CAA2C,GAAG,CAAU,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,4CAA4C,GAAG,MAAM,CAAC,MAAM,CAAC;IACxE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;QACtB,gBAAgB;QAChB,mBAAmB;QACnB,oBAAoB;QACpB,mBAAmB;QACnB,sBAAsB;QACtB,+BAA+B;KACvB,CAAC;IACX,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;QACzB,YAAY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GAAG,UAAU,EAAE,CAAC,CAAC;KACvE,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC","sourcesContent":["import {\n createEditorAgentInteractionController,\n createProjectAuthoringHost,\n type AuthoringSourceDriver,\n type DocumentCommand,\n type EditorProjectionImpact,\n type EditorTransformDocumentCapabilities,\n type EditorTransformSnapshot,\n type ProjectAuthoringHost,\n} from '@fps-games/editor-core';\nimport {\n getFpsEditorPluginLifecycleScopeHost,\n resolveFpsEditorLifecycleParticipants,\n type FpsEditorPluginHost,\n} from '@fps-games/editor-core/plugin-host';\nimport type {\n FpsEditorLifecycleService,\n} from '@fps-games/editor-core/lifecycle';\nimport {\n createForgePlayAgentTransport,\n} from '@fps-games/editor-forge-play';\nimport type { BabylonEditorProjectionSelectionEdgesPrewarm } from '@fps-games/editor-babylon';\nimport type {\n LocalEditorBrowserProjectFileContent,\n LocalEditorBrowserProjectFileSnapshot,\n LocalEditorBrowserProjectMediaSource,\n} from '@fps-games/editor-browser';\nimport type {\n ArtistMaterialTextureRef,\n EditorAgentContextSemantics,\n EditorDiagnostic,\n EditorDiagnosticLocator,\n EditorDiagnosticPhase,\n SpatialMarkerGraph,\n SpatialMarkerNode,\n SpatialMarkerTypeDefinition,\n SpatialRelationTypeDefinition,\n} from '@fps-games/editor-protocol';\nimport {\n createPlayableLocalEditorLoadingOverlay,\n formatPlayableEditorDoctorReport,\n inspectPlayableEditorHostCompatibilityReport,\n type FpsGameEditorProjectDefinition,\n type PlayableForgePlayModeBridge,\n type PlayableForgePlayDocumentExportResult,\n type PlayableForgePlaySaveState,\n type PlayableForgePlayWindowLike,\n type PlayableLocalEditorDiscardConfirmationInput,\n type PlayableLocalEditorHostBridgeContext,\n type PlayableLocalEditorHostLoadingContent,\n type PlayableLocalEditorInteractionPolicy,\n type PlayableLocalEditorDocumentOperationExecutor,\n type PlayableLocalEditorSaveFailureInput,\n type PlayableLocalEditorSaveFailureState,\n type PlayableLocalEditorUnsavedChangesState,\n} from '@fps-games/editor-playable-sdk';\nimport {\n createPlayableLocalEditorHostController,\n PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID,\n type PlayableLocalEditorLifecycleController,\n} from '@fps-games/editor-playable-sdk/internal/local-harness';\nimport {\n createLocalEditorHarness,\n type LocalEditorHarness,\n type LocalEditorHarnessDocumentAdapter,\n type LocalEditorHarnessHistoryOperation,\n type LocalEditorHarnessHistoryOperationOptions,\n type LocalEditorHarnessHistoryOperationResult,\n type LocalEditorHarnessHistoryProjectionResult,\n type LocalEditorHarnessHistoryStateResult,\n type LocalEditorHarnessHierarchyOperationRegistration,\n type LocalEditorMarkerGraphCommand,\n type LocalEditorHarnessOptions,\n type LocalEditorHarnessOperationOrigin,\n type LocalEditorHarnessPersistenceAdapter,\n type LocalEditorHarnessProjectionWaitPolicy,\n type LocalEditorHarnessWorldAdapter,\n} from './local-editor-harness.js';\nimport {\n getLocalEditorHarnessLifecycleOperations,\n type LocalEditorHarnessLifecycleOperations,\n} from './internal/local-editor-lifecycle-operations.js';\nimport { createLocalEditorAgentHierarchyOperations } from './local-editor-agent-actions.js';\nimport { createLocalEditorProjectEntryAgentContext } from './local-editor-agent-context.js';\n\nexport const PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION = 2 as const;\n\n/**\n * Frozen required contract for playable local editor host manifests.\n * \n * This contract defines the minimum set of methods that a host manifest must provide.\n * The contract is deeply frozen to prevent accidental modifications that would break\n * backward compatibility.\n * \n * IMPORTANT: Adding new required methods is a BREAKING CHANGE and requires:\n * - Incrementing PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION\n * - Providing migration documentation\n * - Updating all reference consumers\n */\nexport const PLAYABLE_LOCAL_EDITOR_HOST_REQUIRED_CONTRACT = Object.freeze({\n document: Object.freeze([\n 'reduceDocument',\n 'getHierarchyItems',\n 'getProjectionNodes',\n 'getProjectionNode',\n 'createPatchFromAsset',\n 'createSerializedPropertyPatch',\n ] as const),\n persistence: Object.freeze([\n 'loadAssets',\n 'runGame',\n ] as const),\n world: Object.freeze({\n direct: Object.freeze([\n 'getCanvas',\n 'disposeWorld',\n 'loadPreviewEngine',\n 'createPreviewEngine',\n 'importPreviewAsset',\n ] as const),\n }),\n});\n\ntype PlayableLocalEditorMaybePromise<T> = T | Promise<T>;\n\nexport type PlayableLocalEditorHostCompatibilitySeverity = 'error' | 'warning' | 'info';\n\nexport interface PlayableLocalEditorHostManifestMetadata {\n manifestVersion: typeof PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION;\n projectId?: string;\n projectName?: string;\n compatibilityTag?: string;\n}\n\nexport interface PlayableLocalEditorHostCompatibilityDiagnostic {\n severity: PlayableLocalEditorHostCompatibilitySeverity;\n code: string;\n message: string;\n path?: string;\n}\n\nexport interface PlayableLocalEditorHostCompatibilityReport {\n supportedManifestVersion: typeof PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION;\n manifestVersion?: unknown;\n projectId?: string;\n projectName?: string;\n compatibilityTag?: string;\n ok: boolean;\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[];\n}\n\nexport interface PlayableLocalEditorAuthoringSourceDriverLike<TDocument = unknown, TPayload = unknown> {\n sourceType: string;\n load(input: unknown): PlayableLocalEditorMaybePromise<unknown>;\n reduce?(input: {\n source: unknown;\n document: TDocument;\n command?: unknown;\n intent?: unknown;\n }): PlayableLocalEditorMaybePromise<TDocument>;\n validate?(input: unknown): PlayableLocalEditorMaybePromise<unknown>;\n save(input: {\n source: unknown;\n document: TDocument;\n command?: unknown;\n intent?: unknown;\n }): PlayableLocalEditorMaybePromise<unknown>;\n compile?(input: unknown): PlayableLocalEditorMaybePromise<unknown>;\n compileRuntimePatch?(input: unknown): PlayableLocalEditorMaybePromise<unknown>;\n}\n\nexport interface PlayableLocalEditorAuthoringHostLike {\n getSourceRegistry(): unknown;\n registerSource(source: unknown): void;\n registerSourceDriver(driver: PlayableLocalEditorAuthoringSourceDriverLike): void;\n loadSource<TDocument = unknown>(ref: unknown): Promise<unknown>;\n commitSource<TDocument = unknown>(input: {\n source: unknown;\n document: TDocument;\n beforeDocument?: TDocument;\n expectedRevision?: number;\n command?: unknown;\n }): Promise<unknown>;\n dispatch<TDocument = unknown, TPayload = unknown>(command: unknown): Promise<unknown>;\n attachRuntimeAdapter?(adapter: unknown): void;\n detachRuntimeAdapter?(): void;\n}\n\nexport interface PlayableLocalEditorPatchResult<TPatch> {\n patch: TPatch;\n label?: string;\n changedId?: string;\n createdId?: string | null;\n changedIds?: string[];\n reprojectIds?: string[];\n projectionImpact?: PlayableLocalEditorProjectionImpact;\n selectId?: string | null;\n}\n\nexport type PlayableLocalEditorProjectionImpact = EditorProjectionImpact;\n\nexport interface PlayableLocalEditorPropertyPatchInput<TDocument = unknown> {\n document: TDocument;\n targetId: string;\n targetIds?: string[];\n path: string;\n value: unknown;\n control?: string;\n valueType?: string;\n commitMode?: string;\n persistence?: string;\n source?: unknown;\n}\n\nexport interface PlayableLocalEditorMultiPropertyPatchInput<TDocument = unknown>\n extends Omit<PlayableLocalEditorPropertyPatchInput<TDocument>, 'targetId'> {\n targetIds: string[];\n activeId: string | null;\n}\n\nexport interface PlayableLocalEditorMultiPropertyCapabilityInput<TDocument = unknown> {\n document: TDocument;\n targetIds: string[];\n activeId: string | null;\n path: string;\n control?: string;\n valueType?: string;\n commitMode?: string;\n persistence?: string;\n}\n\nexport interface PlayableLocalEditorTransformPatchInput<TDocument = unknown> {\n document: TDocument;\n targetId: string;\n targetIds?: string[];\n transform?: unknown;\n worldTransform?: unknown;\n operation?: string;\n duplicate?: boolean;\n [key: string]: unknown;\n}\n\nexport interface PlayableLocalEditorTransformInspectorPreviewInput<TDocument = unknown> {\n document: TDocument;\n targetId: string;\n targetIds: string[];\n activeId: string | null;\n transform: EditorTransformSnapshot;\n}\n\nexport interface PlayableLocalEditorTransformBatchPatchInput<TDocument = unknown> {\n document: TDocument;\n targetIds: string[];\n activeId?: string | null;\n operation?: string;\n [key: string]: unknown;\n}\n\nexport interface PlayableLocalEditorRenderingPropertyChangeResult<TPatch = unknown> {\n changed?: boolean;\n dirty?: boolean;\n status?: string;\n statusTone?: string;\n statusDetails?: string;\n details?: Record<string, unknown>;\n refreshWorldRendering?: boolean;\n documentPatch?: PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport interface PlayableLocalEditorRuntimeInspectorContext<TDocument = unknown> {\n document: TDocument;\n targetIds: string[];\n activeId: string | null;\n inspectorObject: unknown;\n projectionNode?: unknown | null;\n projectedRoot?: unknown;\n}\n\nexport interface PlayableLocalEditorPrefabStageInput<TAsset = unknown> {\n assetId: string;\n browserAssetId?: string;\n asset?: TAsset | null;\n}\n\nexport interface PlayableLocalEditorPrefabStageDescriptor<TDocument = unknown> {\n assetId: string;\n browserAssetId?: string;\n label: string;\n sourceAssetId?: string;\n sourceAssetGuid?: string;\n readonly?: boolean;\n previewNodeId?: string;\n document?: TDocument;\n data?: unknown;\n}\n\nexport interface PlayableLocalEditorPrefabStageContext {\n previewNodeId?: string;\n importStructureReady: boolean;\n importStructure: unknown | null;\n}\n\nexport interface PlayableLocalEditorHierarchyActionsCapability<TDocument, TPatch = unknown> {\n operations?: readonly LocalEditorHarnessHierarchyOperationRegistration<TDocument, TPatch>[];\n}\n\nexport interface PlayableLocalEditorAgentContextObjectInput<TDocument = unknown> {\n document: TDocument;\n objectId: string;\n targetIds: string[];\n activeId: string | null;\n contextNodeId: string | null;\n hierarchyItem: unknown | null;\n hierarchyItems: readonly unknown[];\n projectionNode: unknown | null | undefined;\n}\n\nexport interface PlayableLocalEditorAgentContextObjectSetInput<TDocument = unknown> {\n document: TDocument;\n objectIds: string[];\n activeId: string | null;\n hierarchyItems: readonly unknown[];\n projectionNodes: Record<string, unknown | null | undefined>;\n}\n\nexport interface PlayableLocalEditorAgentContextRegionBindingInput<TDocument = unknown>\n extends PlayableLocalEditorAgentContextObjectSetInput<TDocument> {\n relationshipType: 'selection-region';\n}\n\nexport interface PlayableLocalEditorAgentContextCapability<TDocument> {\n describeSceneObject?(input: PlayableLocalEditorAgentContextObjectInput<TDocument>): EditorAgentContextSemantics | null | undefined;\n describeSceneObjectSet?(input: PlayableLocalEditorAgentContextObjectSetInput<TDocument>): EditorAgentContextSemantics | null | undefined;\n describeRegionBinding?(input: PlayableLocalEditorAgentContextRegionBindingInput<TDocument>): EditorAgentContextSemantics | null | undefined;\n}\n\nexport interface PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset = unknown> {\n cloneDocument?(document: TDocument): TDocument;\n compareDocuments?(left: TDocument, right: TDocument): boolean;\n prepareDocument?(document: TDocument, assets: TAsset[]): TDocument;\n hydrateDocumentAssets?(document: TDocument, assets: TAsset[]): TDocument;\n resolveUpdatedAssetSnapshot?(\n assets: TAsset[],\n input: { assetId: string },\n ): { assetId: string; contentHash?: string } | null;\n listAssetSnapshots?(assets: TAsset[]): Array<{ assetId: string; contentHash?: string }>;\n reconcileUpdatedAsset?(\n document: TDocument,\n input: { assetId: string },\n ): {\n document: TDocument;\n reconciledBindingCount?: number;\n warnings?: Array<{\n code: string;\n gameObjectId?: string;\n slotId?: string;\n materialAssetId?: string;\n candidateSlotIds?: string[];\n }>;\n };\n validateDocument?(\n document: TDocument,\n context: {\n phase: EditorDiagnosticPhase;\n scopeId: string;\n documentRevision: number;\n projectionRevision: number;\n },\n ): readonly EditorDiagnostic[];\n summarize?(document: TDocument): string;\n}\n\nexport interface PlayableLocalEditorSelectionCapability<TDocument> {\n isSelectable?(document: TDocument, id: string): boolean;\n isLocked?(document: TDocument, id: string): boolean;\n}\n\nexport interface PlayableLocalEditorInspectorCapability<TDocument> {\n getInspectorObject?(document: TDocument, activeId: string): unknown | null;\n getInspectorMultiObject?(document: TDocument, selectedIds: string[], activeId: string | null): unknown | null;\n getRuntimeInspectorSections?(context: PlayableLocalEditorRuntimeInspectorContext<TDocument>): unknown[];\n}\n\nexport interface PlayableLocalEditorAssetBrowserCapability<TDocument> {\n getBrowserAssetItems?(document: TDocument): unknown[];\n}\n\nexport interface PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset = unknown> {\n createPatchFromAsset?(asset: TAsset, input?: Record<string, unknown> & { document?: TDocument; placement?: unknown }): {\n patch: TPatch;\n label?: string;\n };\n createAssetActionPatch?(input: Record<string, unknown> & { document: TDocument; asset?: TAsset }): PlayableLocalEditorPatchResult<TPatch> | null;\n createPlacedAssetPatch?(input: Record<string, unknown> & { document: TDocument; asset?: TAsset }): PlayableLocalEditorPatchResult<TPatch> | null;\n findCreatedId?(beforeDocument: TDocument, afterDocument: TDocument): string | null;\n}\n\nexport interface PlayableLocalEditorTransformCommandsCapability<TDocument, TPatch> {\n documentCapabilities?: Partial<EditorTransformDocumentCapabilities>;\n canCreateSerializedMultiPropertyPatch?(input: PlayableLocalEditorMultiPropertyCapabilityInput<TDocument>): boolean;\n createSerializedMultiPropertyPatch?(input: PlayableLocalEditorMultiPropertyPatchInput<TDocument>): PlayableLocalEditorPatchResult<TPatch> | null;\n createTransformInspectorPreview?(input: PlayableLocalEditorTransformInspectorPreviewInput<TDocument>): EditorTransformSnapshot | null;\n createTransformPatch?(input: PlayableLocalEditorTransformPatchInput<TDocument>): PlayableLocalEditorPatchResult<TPatch> | null;\n createTransformBatchPatch?(input: PlayableLocalEditorTransformBatchPatchInput<TDocument>): PlayableLocalEditorPatchResult<TPatch> | null;\n createDuplicateSelectionPatch?(input: Record<string, unknown> & { document: TDocument; targetIds: string[] }): PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport interface PlayableLocalEditorSceneGraphCapability<TDocument, TPatch> {\n validateSceneGraphDrop?(document: TDocument, intent: unknown): unknown;\n createSceneGraphRenamePatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n createSceneGraphCreateGroupPatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n createSceneGraphCreatePrimitivePatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n createSceneGraphDeletePatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n createSceneGraphDropPatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n validateSceneGraphMove?(document: TDocument, intent: unknown): unknown;\n createSceneGraphMovePatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n validateSceneGraphGroupSelection?(document: TDocument, intent: unknown): unknown;\n createSceneGraphGroupSelectionPatch?(document: TDocument, intent: unknown): PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport type PlayableLocalEditorMarkerGraphCommand = LocalEditorMarkerGraphCommand;\n\nexport interface PlayableLocalEditorMarkerGraphCapability<TDocument, TPatch> {\n getMarkerGraph?(document: TDocument): SpatialMarkerGraph | null;\n getMarkerTypeCatalog?(document: TDocument): SpatialMarkerTypeDefinition[];\n getRelationTypeCatalog?(document: TDocument): SpatialRelationTypeDefinition[];\n getPrefabInstanceMarkerOverlays?(document: TDocument): Array<{ ownerInstanceId: string; localNodeId: string; marker: SpatialMarkerNode }>;\n getPrefabStageMarkerOverlays?(document: TDocument, prefabAssetId: string, previewInstanceId: string): Array<{ ownerInstanceId: string; localNodeId: string; marker: SpatialMarkerNode }>;\n createMarkerGraphPatch?(document: TDocument, command: PlayableLocalEditorMarkerGraphCommand): PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport interface PlayableLocalEditorWorldPreviewCapability<TDocument> {\n getSceneCameraPreviewRig?(document: TDocument): unknown | null;\n getWorldAppearance?(document: TDocument): unknown | null;\n}\n\nexport interface PlayableLocalEditorRenderingCapability<TDocument, TPatch = unknown> {\n getWorldRendering?(document: TDocument): unknown | null;\n getRenderingPanelState?(document: TDocument, context?: Record<string, unknown>): unknown | null;\n onRenderingAction?(input: Record<string, unknown> & { document: TDocument }): PlayableLocalEditorMaybePromise<\n boolean | void | PlayableLocalEditorRenderingPropertyChangeResult<TPatch>\n >;\n onRenderingPropertyChange?(input: Record<string, unknown> & { document: TDocument }): PlayableLocalEditorMaybePromise<\n boolean | void | PlayableLocalEditorRenderingPropertyChangeResult<TPatch>\n >;\n getShadowMapExperimentConfig?(): unknown | null;\n getShadowMapExperimentPlan?(document: TDocument): unknown | null;\n createShadowMapExperimentProfilesPatch?(input: {\n document: TDocument;\n qualityProfile?: string | null;\n behaviorProfile?: string | null;\n }): PlayableLocalEditorPatchResult<TPatch> | null;\n}\n\nexport interface PlayableLocalEditorPrefabStageCapability<TDocument, TAsset = unknown> {\n getPrefabStageDescriptor?(\n document: TDocument,\n input: PlayableLocalEditorPrefabStageInput<TAsset>,\n ): PlayableLocalEditorPrefabStageDescriptor<TDocument> | null;\n getPrefabStageProjectionNodes?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n ): unknown[];\n getPrefabStageStructure?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n context: PlayableLocalEditorPrefabStageContext,\n ): unknown[];\n getPrefabStageInspectorObject?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n selectedItemId: string | null,\n context: PlayableLocalEditorPrefabStageContext,\n ): unknown | null;\n resolvePrefabStagePreviewTarget?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n projectionNodeId: string,\n context: PlayableLocalEditorPrefabStageContext,\n ): unknown | null;\n getPrefabStageProjectionNodeId?(\n document: TDocument,\n descriptor: PlayableLocalEditorPrefabStageDescriptor<TDocument>,\n nodeId: string,\n context: PlayableLocalEditorPrefabStageContext,\n ): string | null;\n}\n\nexport interface PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset = unknown> {\n documentLifecycle?: PlayableLocalEditorDocumentLifecycleCapability<TDocument, TAsset>;\n selection?: PlayableLocalEditorSelectionCapability<TDocument>;\n inspector?: PlayableLocalEditorInspectorCapability<TDocument>;\n assetBrowser?: PlayableLocalEditorAssetBrowserCapability<TDocument>;\n assetActions?: PlayableLocalEditorAssetActionsCapability<TDocument, TPatch, TAsset>;\n transformCommands?: PlayableLocalEditorTransformCommandsCapability<TDocument, TPatch>;\n sceneGraph?: PlayableLocalEditorSceneGraphCapability<TDocument, TPatch>;\n markerGraph?: PlayableLocalEditorMarkerGraphCapability<TDocument, TPatch>;\n worldPreview?: PlayableLocalEditorWorldPreviewCapability<TDocument>;\n rendering?: PlayableLocalEditorRenderingCapability<TDocument, TPatch>;\n prefabStage?: PlayableLocalEditorPrefabStageCapability<TDocument, TAsset>;\n hierarchyActions?: PlayableLocalEditorHierarchyActionsCapability<TDocument, TPatch>;\n agentContext?: PlayableLocalEditorAgentContextCapability<TDocument>;\n}\n\nexport interface PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset = unknown> {\n reduceDocument(document: TDocument, command: any): TDocument;\n getHierarchyItems(document: TDocument): unknown[];\n isHierarchyStructureChange?(command: DocumentCommand<TDocument, TPatch>): boolean;\n getProjectionNodes(document: TDocument): unknown[];\n getProjectionNode(document: TDocument, id: string): unknown | null;\n getProjectionNodesForTarget?(document: TDocument, targetId: string): unknown[];\n resolveProjectionTargetId?(document: TDocument, projectionNodeId: string): string | null;\n getProjectionSelectionNodeIds?(document: TDocument, targetId: string): string[];\n createPatchFromAsset(asset: TAsset, input?: Record<string, unknown> & { document?: TDocument; placement?: unknown }): {\n patch: TPatch;\n label?: string;\n };\n createSerializedPropertyPatch(input: PlayableLocalEditorPropertyPatchInput<TDocument>): PlayableLocalEditorPatchResult<TPatch> | null;\n resolveDiagnosticLocator?(\n document: TDocument,\n diagnostic: EditorDiagnostic,\n ): EditorDiagnosticLocator | null;\n}\n\nexport interface PlayableLocalEditorPersistenceCapability<TDocument, TAsset = unknown> {\n loadAuthoringSource?(): PlayableLocalEditorMaybePromise<{\n source: unknown;\n document: TDocument;\n assets?: TAsset[];\n summary?: string;\n }>;\n loadDocument?(): PlayableLocalEditorMaybePromise<TDocument>;\n loadAssets(): PlayableLocalEditorMaybePromise<TAsset[]>;\n loadProjectFiles?(): PlayableLocalEditorMaybePromise<LocalEditorBrowserProjectFileSnapshot>;\n loadProjectFile?(path: string): PlayableLocalEditorMaybePromise<LocalEditorBrowserProjectFileContent>;\n resolveProjectMedia?(path: string): PlayableLocalEditorMaybePromise<LocalEditorBrowserProjectMediaSource | null>;\n saveAuthoringSource?(input: {\n source: unknown;\n document: TDocument;\n }): PlayableLocalEditorMaybePromise<{\n source: unknown;\n document: TDocument;\n summary?: string;\n }>;\n saveDocument?(document: TDocument): PlayableLocalEditorMaybePromise<{ document: TDocument; summary?: string }>;\n runGame(context?: { reason: 'save' | 'discard' }): PlayableLocalEditorMaybePromise<void>;\n}\n\nexport interface PlayableLocalEditorWorldCapability<TAsset = unknown> {\n disposeWorld(): PlayableLocalEditorMaybePromise<void>;\n getCanvas(): HTMLCanvasElement | null;\n loadPreviewEngine(): PlayableLocalEditorMaybePromise<Record<string, any>>;\n createPreviewEngine(engineModule: Record<string, any>, canvas: HTMLCanvasElement): any;\n importPreviewAsset(context: any): Promise<unknown | null>;\n resolveMaterialTextureUrl?(texture: ArtistMaterialTextureRef): string | null | undefined;\n toBrowserAssetItem?(asset: TAsset): unknown;\n resolveAssetId?(asset: TAsset): string;\n}\n\nexport interface PlayableLocalEditorWorldOptions {\n cameraTarget?: { x: number; y: number; z: number };\n cameraRadius?: number;\n clearColor?: { r: number; g: number; b: number; a: number };\n sky?: Record<string, unknown> | false;\n grid?: Record<string, unknown>;\n useRightHandedSystem?: boolean;\n coordinateAxes?: boolean;\n selectionEdgesPrewarm?: BabylonEditorProjectionSelectionEdgesPrewarm;\n}\n\nexport interface PlayableLocalEditorGridContext {\n getCamera(): unknown | null;\n getEditorCamera(): unknown | null;\n}\n\nexport type PlayableLocalEditorGridFactory = (\n babylon: Record<string, any>,\n scene: unknown,\n camera?: unknown,\n context?: PlayableLocalEditorGridContext,\n) => unknown | void;\n\nexport interface PlayableLocalEditorAssetReloadResult {\n ok: boolean;\n assetCount: number;\n status: string;\n}\n\nexport interface PlayableLocalEditorUpdatedAssetRefreshResult extends PlayableLocalEditorAssetReloadResult {\n assetId: string;\n reconciledBindingCount: number;\n warnings: Array<{\n code: string;\n gameObjectId?: string;\n slotId?: string;\n materialAssetId?: string;\n candidateSlotIds?: string[];\n }>;\n error?: string;\n}\n\nexport interface PlayableLocalEditorAssetCreationOptions {\n placement?: unknown;\n}\n\nexport interface PlayableLocalEditorAssetCreationResult {\n ok: boolean;\n assetId: string;\n changed?: boolean;\n createdId?: string | null;\n status: string;\n error?: string;\n}\n\nexport type PlayableLocalEditorOperationOrigin = LocalEditorHarnessOperationOrigin;\nexport type PlayableLocalEditorProjectionWaitPolicy = LocalEditorHarnessProjectionWaitPolicy;\nexport type PlayableLocalEditorHistoryOperation = LocalEditorHarnessHistoryOperation;\nexport type PlayableLocalEditorHistoryOperationOptions = LocalEditorHarnessHistoryOperationOptions;\nexport type PlayableLocalEditorHistoryProjectionResult = LocalEditorHarnessHistoryProjectionResult;\nexport type PlayableLocalEditorHistoryStateResult = LocalEditorHarnessHistoryStateResult;\nexport type PlayableLocalEditorHistoryOperationResult<TDocument = unknown> =\n LocalEditorHarnessHistoryOperationResult<TDocument>;\n\nexport interface PlayableLocalEditorHarnessApi<TDocument = unknown> {\n render(): void;\n notifyViewportRevealed(reason?: string): void;\n getWorkingDocument(): TDocument | null;\n projectAssetDropPoint(point: { x: number; y: number } | null): { x: number; y: number; z: number } | null;\n getUnsavedChangesState(): PlayableLocalEditorUnsavedChangesState;\n getSaveFailureState(): PlayableLocalEditorSaveFailureState | null;\n getLifecycleService(): FpsEditorLifecycleService | null;\n validateOperation(phase: 'save' | 'run' | 'export'): boolean;\n validateOperationSettled(phase: 'save' | 'run' | 'export'): Promise<boolean>;\n validateOperationSettledForCurrentDocument(phase: 'save' | 'run' | 'export'): Promise<boolean>;\n runExclusiveDocumentOperation<TResult>(\n operation: (executor: PlayableLocalEditorDocumentOperationExecutor) => Promise<TResult>,\n ): Promise<TResult>;\n reloadAssets(): Promise<PlayableLocalEditorAssetReloadResult>;\n refreshUpdatedAsset(input: {\n assetId: string;\n expectedContentHash: string;\n }): Promise<PlayableLocalEditorUpdatedAssetRefreshResult>;\n createAssetFromAssetId(assetId: string, options?: PlayableLocalEditorAssetCreationOptions): PlayableLocalEditorAssetCreationResult;\n undo(options?: PlayableLocalEditorHistoryOperationOptions): Promise<PlayableLocalEditorHistoryOperationResult<TDocument>>;\n redo(options?: PlayableLocalEditorHistoryOperationOptions): Promise<PlayableLocalEditorHistoryOperationResult<TDocument>>;\n enterEditor(): Promise<void>;\n saveScene(): Promise<boolean>;\n saveAndRunGame(): Promise<boolean>;\n discardAndRunGame(): Promise<void>;\n}\n\nexport interface PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset = unknown> {\n metadata: PlayableLocalEditorHostManifestMetadata;\n root?: HTMLElement;\n localTestActions?: boolean;\n gameModeEntryVisible?: boolean;\n pluginHost?: FpsEditorPluginHost;\n authoring?: {\n host?: PlayableLocalEditorAuthoringHostLike;\n drivers?: readonly PlayableLocalEditorAuthoringSourceDriverLike[];\n };\n documentAdapter: PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset>;\n capabilities?: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset>;\n persistenceAdapter: PlayableLocalEditorPersistenceCapability<TDocument, TAsset>;\n worldAdapter: PlayableLocalEditorWorldCapability<TAsset>;\n agentBridge?: LocalEditorHarnessOptions<TDocument, TPatch, TAsset>['agentBridge'];\n world?: PlayableLocalEditorWorldOptions;\n createGrid?: PlayableLocalEditorGridFactory;\n lifecycle: {\n loadingContent: PlayableLocalEditorHostLoadingContent;\n interactions?: PlayableLocalEditorInteractionPolicy;\n beforeDiscardAndRunGame?: () => void | Promise<void>;\n minAssetLoadingOverlayMs?: number;\n };\n forgePlay?: {\n enabled?: boolean;\n window?: PlayableForgePlayWindowLike;\n handleProjectAssetCommand?: (\n context: PlayableLocalEditorHostBridgeContext<PlayableLocalEditorHarnessApi<TDocument>>,\n ) => Promise<void> | void;\n handleAssetDrop?: (\n payload: Record<string, unknown>,\n context: Omit<PlayableLocalEditorHostBridgeContext<PlayableLocalEditorHarnessApi<TDocument>>, 'name'>,\n ) => void;\n hasUnsavedPlatformChanges?: () => boolean;\n exportDocument?: (input: {\n payload: Record<string, unknown>;\n saveState: PlayableForgePlaySaveState;\n postEvent: (name: string, payload?: Record<string, unknown>) => void;\n context: Omit<PlayableLocalEditorHostBridgeContext<PlayableLocalEditorHarnessApi<TDocument>>, 'name' | 'payload'>;\n }) => Promise<PlayableForgePlayDocumentExportResult> | PlayableForgePlayDocumentExportResult;\n reportError?: (error: unknown) => void;\n };\n}\n\nexport interface PlayableLocalEditorHost<TDocument = unknown> {\n harness: PlayableLocalEditorHarnessApi<TDocument>;\n lifecycle: FpsEditorLifecycleService;\n enterEditor(): Promise<void>;\n saveScene(): Promise<boolean>;\n saveAndRunGame(): Promise<boolean>;\n discardAndRunGame(): Promise<void>;\n runWithAssetLoadingOverlay<T>(operation: () => Promise<T>): Promise<T>;\n getBridge(): PlayableForgePlayModeBridge | null;\n getCompatibilityReport(): PlayableLocalEditorHostCompatibilityReport;\n dispose(): Promise<void>;\n}\n\nexport interface FpsGameEditorLocalEditorHostOptions<TDocument, TPatch, TAsset = unknown>\n extends Omit<PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>, 'metadata' | 'agentBridge'> {\n project: Pick<FpsGameEditorProjectDefinition, 'projectId' | 'projectName'>;\n compatibilityTag?: string;\n agentBridgeSessionMetadata?: Record<string, unknown>;\n agentBridge?: PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>['agentBridge'];\n logCompatibilityReport?: boolean;\n logger?: Pick<Console, 'warn' | 'error'>;\n}\n\nexport interface FpsGameEditorLocalEditorHostResult<TDocument, TPatch, TAsset = unknown> {\n host: PlayableLocalEditorHost<TDocument>;\n manifest: PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>;\n compatibilityReport: PlayableLocalEditorHostCompatibilityReport;\n}\n\nexport function createFpsGameEditorLocalEditorHost<TDocument, TPatch, TAsset = unknown>(\n options: FpsGameEditorLocalEditorHostOptions<TDocument, TPatch, TAsset>,\n): FpsGameEditorLocalEditorHostResult<TDocument, TPatch, TAsset> {\n const manifest = createFpsGameEditorLocalEditorHostManifest(options);\n const host = createPlayableLocalEditorHost<TDocument, TPatch, TAsset>(manifest);\n const compatibilityReport = host.getCompatibilityReport();\n if (options.logCompatibilityReport !== false) {\n logPlayableLocalEditorHostCompatibilityReport(compatibilityReport, options.logger);\n }\n return {\n host,\n manifest,\n compatibilityReport,\n };\n}\n\nexport function createFpsGameEditorLocalEditorHostManifest<TDocument, TPatch, TAsset = unknown>(\n options: FpsGameEditorLocalEditorHostOptions<TDocument, TPatch, TAsset>,\n): PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset> {\n const {\n project,\n compatibilityTag,\n agentBridgeSessionMetadata,\n agentBridge: configuredAgentBridge,\n logCompatibilityReport: _logCompatibilityReport,\n logger: _logger,\n ...manifestOptions\n } = options;\n const agentBridge = agentBridgeSessionMetadata\n ? {\n ...(configuredAgentBridge ?? {}),\n sessionMetadata: {\n ...(configuredAgentBridge?.sessionMetadata as Record<string, unknown> | undefined),\n ...agentBridgeSessionMetadata,\n },\n }\n : configuredAgentBridge;\n\n return {\n ...manifestOptions,\n metadata: {\n manifestVersion: PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION,\n projectId: project.projectId,\n projectName: project.projectName,\n ...(compatibilityTag ? { compatibilityTag } : {}),\n },\n ...(agentBridge ? { agentBridge } : {}),\n };\n}\n\nfunction logPlayableLocalEditorHostCompatibilityReport(\n report: PlayableLocalEditorHostCompatibilityReport,\n logger: Pick<Console, 'warn' | 'error'> = console,\n): void {\n const visibleDiagnostics = report.diagnostics.filter(\n diagnostic => diagnostic.severity === 'warning' || diagnostic.severity === 'error',\n );\n if (visibleDiagnostics.length === 0) return;\n const doctorReport = inspectPlayableEditorHostCompatibilityReport({\n diagnostics: visibleDiagnostics,\n });\n const formatted = formatPlayableEditorDoctorReport(doctorReport);\n if (doctorReport.ok) logger.warn(formatted);\n else logger.error(formatted);\n}\n\nexport function inspectPlayableLocalEditorHostManifest(\n manifest: unknown,\n): PlayableLocalEditorHostCompatibilityReport {\n const diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[] = [];\n const report: PlayableLocalEditorHostCompatibilityReport = {\n supportedManifestVersion: PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION,\n ok: true,\n diagnostics,\n };\n\n if (!isRecord(manifest)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'manifest.invalid',\n 'Playable local editor host manifest must be an object.',\n 'manifest',\n ));\n report.ok = false;\n return report;\n }\n\n inspectMetadata(manifest.metadata, report, diagnostics);\n inspectRequiredCapability(\n manifest,\n diagnostics,\n 'documentAdapter',\n 'documentCapability',\n PLAYABLE_LOCAL_EDITOR_HOST_REQUIRED_CONTRACT.document,\n );\n inspectRequiredCapability(\n manifest,\n diagnostics,\n 'persistenceAdapter',\n 'persistenceCapability',\n PLAYABLE_LOCAL_EDITOR_HOST_REQUIRED_CONTRACT.persistence,\n );\n inspectWorldCapability(manifest.worldAdapter, diagnostics);\n inspectLifecycle(manifest.lifecycle, diagnostics);\n inspectForgePlay(manifest.forgePlay, diagnostics);\n inspectAuthoring(manifest.authoring, diagnostics);\n inspectCapabilities(manifest.capabilities, diagnostics);\n\n report.ok = !diagnostics.some(diagnostic => diagnostic.severity === 'error');\n return report;\n}\n\nexport function formatPlayableLocalEditorHostCompatibilityReport(\n report: PlayableLocalEditorHostCompatibilityReport,\n): string {\n const project = report.projectName ?? report.projectId ?? 'unknown project';\n const header = report.ok\n ? `Playable local editor host compatibility: PASS (${project})`\n : `Playable local editor host compatibility: BLOCKED (${project})`;\n if (report.diagnostics.length === 0) return header;\n const lines = report.diagnostics.map((diagnostic) => {\n const path = diagnostic.path ? ` ${diagnostic.path}` : '';\n return `[${diagnostic.severity.toUpperCase()}] ${diagnostic.code}${path}: ${diagnostic.message}`;\n });\n return [header, ...lines].join('\\n');\n}\n\nfunction createHarnessDocumentAdapter<TDocument, TPatch, TAsset>(\n documentCapability: PlayableLocalEditorDocumentCapability<TDocument, TPatch, TAsset>,\n capabilities: PlayableLocalEditorHostCapabilities<TDocument, TPatch, TAsset> | undefined,\n): LocalEditorHarnessDocumentAdapter<TDocument, TPatch, TAsset> {\n return {\n ...documentCapability,\n ...capabilities?.documentLifecycle,\n ...capabilities?.selection,\n ...capabilities?.inspector,\n ...capabilities?.markerGraph,\n ...capabilities?.assetBrowser,\n ...capabilities?.assetActions,\n ...capabilities?.transformCommands,\n ...capabilities?.sceneGraph,\n ...capabilities?.worldPreview,\n ...capabilities?.rendering,\n ...capabilities?.prefabStage,\n } as unknown as LocalEditorHarnessDocumentAdapter<TDocument, TPatch, TAsset>;\n}\n\nfunction createHarnessHierarchyOptions<TDocument, TPatch, TAsset>(\n manifest: PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>,\n): LocalEditorHarnessOptions<TDocument, TPatch, TAsset>['hierarchy'] | undefined {\n const capabilities = manifest.capabilities;\n const agentController = createEditorAgentInteractionController({\n transport: createForgePlayAgentTransport({\n window: manifest.forgePlay?.window,\n }),\n });\n const agentOperations = createLocalEditorAgentHierarchyOperations<TDocument>({\n sendContext: context => agentController.sendContext(context),\n getProjectionNode: (document, id) => manifest.documentAdapter.getProjectionNode(document, id),\n getMarkerGraph: document => capabilities?.markerGraph?.getMarkerGraph?.(document) ?? null,\n getMarkerTypeCatalog: document => capabilities?.markerGraph?.getMarkerTypeCatalog?.(document) ?? [],\n getRelationTypeCatalog: document => capabilities?.markerGraph?.getRelationTypeCatalog?.(document) ?? [],\n describeSceneObject: manifest.capabilities?.agentContext?.describeSceneObject,\n describeSceneObjectSet: manifest.capabilities?.agentContext?.describeSceneObjectSet,\n describeRegionBinding: manifest.capabilities?.agentContext?.describeRegionBinding,\n source: {\n projectId: manifest.metadata?.projectId,\n projectName: manifest.metadata?.projectName,\n },\n reportError: manifest.forgePlay?.reportError,\n });\n const operations = capabilities?.hierarchyActions?.operations;\n return {\n operations: [\n ...(agentOperations as readonly LocalEditorHarnessHierarchyOperationRegistration<TDocument, TPatch>[]),\n ...((operations ?? []) as readonly LocalEditorHarnessHierarchyOperationRegistration<TDocument, TPatch>[]),\n ],\n };\n}\n\nfunction createHarnessProjectAgentOptions<TDocument, TPatch, TAsset>(\n manifest: PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>,\n): NonNullable<LocalEditorHarnessOptions<TDocument, TPatch, TAsset>['agentContext']> {\n const controller = createEditorAgentInteractionController({\n transport: createForgePlayAgentTransport({ window: manifest.forgePlay?.window }),\n });\n return {\n async sendProjectEntry(input) {\n const context = createLocalEditorProjectEntryAgentContext({\n ...input,\n source: {\n projectId: manifest.metadata?.projectId,\n projectName: manifest.metadata?.projectName,\n },\n });\n if (!context) return false;\n try {\n return await controller.sendContext(context);\n } catch (error) {\n manifest.forgePlay?.reportError?.(error);\n return false;\n }\n },\n };\n}\n\nexport function createPlayableLocalEditorHost<TDocument, TPatch, TAsset = unknown>(\n manifest: PlayableLocalEditorHostManifest<TDocument, TPatch, TAsset>,\n): PlayableLocalEditorHost<TDocument> {\n const compatibilityReport = inspectPlayableLocalEditorHostManifest(manifest);\n if (!compatibilityReport.ok) {\n throw new Error(formatPlayableLocalEditorHostCompatibilityReport(compatibilityReport));\n }\n\n const authoringHost = manifest.authoring\n ? (manifest.authoring.host as ProjectAuthoringHost | undefined)\n ?? createProjectAuthoringHost({ drivers: [...(manifest.authoring.drivers ?? [])] as AuthoringSourceDriver[] })\n : undefined;\n const harnessOptions = {\n root: manifest.root,\n localTestActions: manifest.localTestActions,\n gameModeEntryVisible: manifest.gameModeEntryVisible,\n pluginHost: manifest.pluginHost,\n authoringHost,\n documentAdapter: createHarnessDocumentAdapter(manifest.documentAdapter, manifest.capabilities),\n persistenceAdapter: manifest.persistenceAdapter as unknown as LocalEditorHarnessPersistenceAdapter<TDocument, TAsset>,\n worldAdapter: createHarnessWorldAdapter(manifest.worldAdapter),\n agentBridge: manifest.agentBridge,\n transformDocumentCapabilities: manifest.capabilities?.transformCommands?.documentCapabilities,\n world: manifest.world as LocalEditorHarnessOptions<TDocument, TPatch, TAsset>['world'],\n createGrid: manifest.createGrid as LocalEditorHarnessOptions<TDocument, TPatch, TAsset>['createGrid'],\n hierarchy: createHarnessHierarchyOptions(manifest),\n agentContext: createHarnessProjectAgentOptions(manifest),\n } satisfies LocalEditorHarnessOptions<TDocument, TPatch, TAsset>;\n const harness = createLocalEditorHarness<TDocument, TPatch, TAsset>(harnessOptions);\n const lifecycleOperations = getLocalEditorHarnessLifecycleOperations(harness);\n const root = manifest.root ?? document.body;\n const loadingOverlay = createPlayableLocalEditorLoadingOverlay(root);\n const interactions = composePlayableLocalEditorInteractionPolicy(\n manifest.lifecycle.interactions,\n harness.getDefaultInteractionPolicy?.(),\n createNativePlayableLocalEditorInteractionPolicy(root),\n );\n const uninstallBeforeUnloadGuard = installPlayableLocalEditorBeforeUnloadGuard(root, harness);\n const controller = createPlayableLocalEditorHostController({\n harness,\n lifecycleOperations,\n lifecycleScopeHost: manifest.pluginHost\n ? getFpsEditorPluginLifecycleScopeHost(manifest.pluginHost)\n : undefined,\n eventPublisher: manifest.pluginHost?.eventPublisher,\n reportDiagnostic: manifest.pluginHost\n ? diagnostic => manifest.pluginHost?.reportDiagnostic(diagnostic)\n : undefined,\n loadingOverlay,\n loadingContent: manifest.lifecycle.loadingContent,\n interactions,\n beforeDiscardAndRunGame: manifest.lifecycle.beforeDiscardAndRunGame,\n minAssetLoadingOverlayMs: manifest.lifecycle.minAssetLoadingOverlayMs,\n renderAfterEnter: false,\n forgePlay: manifest.forgePlay\n ? {\n enabled: manifest.forgePlay.enabled,\n window: manifest.forgePlay.window,\n hasUnsavedPlatformChanges: manifest.forgePlay.hasUnsavedPlatformChanges,\n handleProjectAssetCommand: manifest.forgePlay.handleProjectAssetCommand,\n handleAssetDrop: manifest.forgePlay.handleAssetDrop,\n exportDocument: manifest.forgePlay.exportDocument,\n reportError: manifest.forgePlay.reportError,\n }\n : undefined,\n });\n const hostHarness = controller.harness as PlayableLocalEditorHarnessApi<TDocument>;\n bindHarnessLifecycle(lifecycleOperations, controller);\n const lifecycleParticipantDisposers = manifest.pluginHost\n ? resolveFpsEditorLifecycleParticipants(manifest.pluginHost.contributions)\n .map(participant => controller.lifecycle.registerParticipant(participant))\n : [];\n if (lifecycleParticipantDisposers.length > 0) {\n controller.lifecycle.addScopeResource(\n PLAYABLE_LOCAL_EDITOR_APPLICATION_SCOPE_ID,\n () => {\n for (const dispose of [...lifecycleParticipantDisposers].reverse()) dispose();\n },\n );\n }\n\n let disposal: Promise<void> | null = null;\n let harnessDisposed = false;\n return {\n harness: hostHarness,\n lifecycle: controller.lifecycle.lifecycle,\n enterEditor: controller.enterEditor,\n saveScene: controller.saveScene,\n saveAndRunGame: controller.saveAndRunGame,\n discardAndRunGame: async () => {\n await controller.discardAndRunGame();\n },\n runWithAssetLoadingOverlay: controller.runWithAssetLoadingOverlay,\n getBridge: controller.getBridge,\n getCompatibilityReport() {\n return cloneCompatibilityReport(compatibilityReport);\n },\n async dispose() {\n if (disposal) return disposal;\n const pending = (async () => {\n await controller.dispose();\n uninstallBeforeUnloadGuard();\n if (!harnessDisposed) {\n await harness.dispose();\n harnessDisposed = true;\n }\n })();\n disposal = pending;\n void pending.catch(() => {\n if (disposal === pending) disposal = null;\n });\n return pending;\n },\n };\n}\n\nfunction bindHarnessLifecycle<TDocument>(\n lifecycleOperations: LocalEditorHarnessLifecycleOperations,\n controller: Pick<PlayableLocalEditorHost<TDocument>, 'enterEditor'> & {\n saveScene(executor?: PlayableLocalEditorDocumentOperationExecutor): Promise<boolean>;\n } & Pick<\n PlayableLocalEditorLifecycleController,\n | 'saveAndRunGame'\n | 'discardAndRunGame'\n | 'prepareSaveAndRunGame'\n | 'prepareDiscardAndRunGame'\n > & { lifecycle: PlayableLocalEditorLifecycleController },\n): void {\n lifecycleOperations.setLifecycleController({\n enterEditor: controller.enterEditor,\n saveScene: (_operation, _context, executor) => controller.saveScene(executor),\n saveAndRunGame: controller.saveAndRunGame,\n discardAndRunGame: controller.discardAndRunGame,\n prepareSaveAndRunGame: controller.prepareSaveAndRunGame,\n prepareDiscardAndRunGame: controller.prepareDiscardAndRunGame,\n lifecycle: controller.lifecycle.lifecycle,\n synchronizeDocumentState: controller.lifecycle.synchronizeDocumentState,\n registerParticipant: controller.lifecycle.registerParticipant,\n openScope: controller.lifecycle.openScope,\n addScopeResource: controller.lifecycle.addScopeResource,\n closeScope: controller.lifecycle.closeScope,\n });\n}\n\nfunction createNativePlayableLocalEditorInteractionPolicy(\n root: HTMLElement,\n): PlayableLocalEditorInteractionPolicy {\n const browserWindow = resolvePlayableLocalEditorWindow(root);\n return {\n confirmDiscardUnsavedChanges(input: PlayableLocalEditorDiscardConfirmationInput) {\n return browserWindow?.confirm?.(formatNativeDiscardConfirmationMessage(input)) ?? true;\n },\n notifySaveFailed(input: PlayableLocalEditorSaveFailureInput) {\n browserWindow?.alert?.(formatNativeSaveFailureMessage(input));\n },\n };\n}\n\nfunction composePlayableLocalEditorInteractionPolicy(\n override: PlayableLocalEditorInteractionPolicy | undefined,\n fallback: PlayableLocalEditorInteractionPolicy | undefined,\n nativeFallback: PlayableLocalEditorInteractionPolicy,\n): PlayableLocalEditorInteractionPolicy {\n return {\n confirmDiscardUnsavedChanges: override?.confirmDiscardUnsavedChanges\n ?? fallback?.confirmDiscardUnsavedChanges\n ?? nativeFallback.confirmDiscardUnsavedChanges,\n notifySaveFailed: override?.notifySaveFailed\n ?? fallback?.notifySaveFailed\n ?? nativeFallback.notifySaveFailed,\n };\n}\n\nfunction installPlayableLocalEditorBeforeUnloadGuard(\n root: HTMLElement,\n harness: Pick<LocalEditorHarness, 'getUnsavedChangesState'>,\n): () => void {\n const browserWindow = resolvePlayableLocalEditorWindow(root);\n if (!browserWindow?.addEventListener || !browserWindow.removeEventListener) return () => {};\n const onBeforeUnload = (event: BeforeUnloadEvent): string | void => {\n let unsavedChanges: PlayableLocalEditorUnsavedChangesState;\n try {\n unsavedChanges = harness.getUnsavedChangesState();\n } catch (error) {\n console.error('[PlayableLocalEditorHost] beforeunload dirty state unavailable', error);\n return;\n }\n if (!unsavedChanges.dirty || !unsavedChanges.hasWorkingDocument) return;\n event.preventDefault();\n event.returnValue = '';\n return '';\n };\n browserWindow.addEventListener('beforeunload', onBeforeUnload);\n return () => {\n browserWindow.removeEventListener('beforeunload', onBeforeUnload);\n };\n}\n\nfunction resolvePlayableLocalEditorWindow(root: HTMLElement): Window | null {\n return root.ownerDocument?.defaultView ?? (typeof window === 'undefined' ? null : window);\n}\n\nfunction formatNativeDiscardConfirmationMessage(\n _input: PlayableLocalEditorDiscardConfirmationInput,\n): string {\n return '当前编辑内容尚未保存。\\n\\n继续会丢弃这些更改并运行游戏。';\n}\n\nfunction formatNativeSaveFailureMessage(input: PlayableLocalEditorSaveFailureInput): string {\n const status = input.status?.trim() || '保存没有成功,当前编辑内容仍保留在编辑器中。';\n const details = input.details?.trim();\n const error = stringifyPlayableLocalEditorError(input.error)?.trim();\n const extra = [details, error]\n .filter((part): part is string => !!part && part !== status);\n return ['保存失败', status, ...extra].join('\\n\\n');\n}\n\nfunction stringifyPlayableLocalEditorError(error: unknown): string | undefined {\n if (error == null) return undefined;\n if (error instanceof Error) return error.message;\n return String(error);\n}\n\nfunction inspectMetadata(\n metadata: unknown,\n report: PlayableLocalEditorHostCompatibilityReport,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (metadata === undefined) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'metadata.missing',\n 'Manifest metadata is required for the host compatibility contract.',\n 'metadata',\n ));\n return;\n }\n if (!isRecord(metadata)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'metadata.invalid',\n 'Manifest metadata must be an object.',\n 'metadata',\n ));\n return;\n }\n\n report.manifestVersion = metadata.manifestVersion;\n report.projectId = readOptionalString(metadata.projectId);\n report.projectName = readOptionalString(metadata.projectName);\n report.compatibilityTag = readOptionalString(metadata.compatibilityTag);\n\n if (metadata.manifestVersion !== PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'metadata.manifest-version.unsupported',\n `Manifest version ${String(metadata.manifestVersion)} is incompatible with supported version ${PLAYABLE_LOCAL_EDITOR_HOST_MANIFEST_VERSION}. Upgrade the manifest or use a compatible editor package version.`,\n 'metadata.manifestVersion',\n ));\n }\n}\n\nfunction inspectRequiredCapability(\n manifest: Record<string, unknown>,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n fieldName: string,\n capabilityName: string,\n requiredFunctions: readonly string[],\n): void {\n const capability = manifest[fieldName];\n if (!isRecord(capability)) {\n diagnostics.push(createDiagnostic(\n 'error',\n `${capabilityName}.missing`,\n `${capabilityName} is required.`,\n capabilityName,\n ));\n return;\n }\n for (const functionName of requiredFunctions) {\n const fn = capability[functionName];\n if (typeof fn !== 'function') {\n diagnostics.push(createDiagnostic(\n 'error',\n `${capabilityName}.${functionName}.missing`,\n `${capabilityName}.${functionName} must be a function.`,\n `${capabilityName}.${functionName}`,\n ));\n } else {\n // Validate function signature: check parameter count\n validateFunctionSignature(fn, functionName, capabilityName, diagnostics);\n }\n }\n}\n\n/**\n * Validates function signature by checking parameter count.\n * Issues warnings when declared parameter count differs from expected.\n * \n * Note: Function.length is not fully reliable (rest params, default values, \n * destructured params all affect it), so signature mismatches are reported as\n * warnings rather than blocking errors.\n */\nfunction validateFunctionSignature(\n fn: Function,\n functionName: string,\n capabilityName: string,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n const expectedArity = getExpectedFunctionArity(capabilityName, functionName);\n if (expectedArity === undefined) return; // No validation defined for this function\n \n const actualArity = fn.length;\n const arityMismatch = actualArity < expectedArity.min\n || (expectedArity.max !== undefined && actualArity > expectedArity.max);\n if (arityMismatch) {\n const severity = capabilityName === 'worldCapability' ? 'error' : 'warning';\n diagnostics.push(createDiagnostic(\n severity,\n `${capabilityName}.${functionName}.arity-mismatch`,\n `${capabilityName}.${functionName} declares ${actualArity} parameter(s), but SDK expects ${expectedArity.min}${expectedArity.max !== undefined && expectedArity.max !== expectedArity.min ? `-${expectedArity.max}` : ''}. Verify the function signature matches the SDK contract.`,\n `${capabilityName}.${functionName}`,\n ));\n }\n}\n\n/**\n * Returns expected parameter count for required functions.\n * min: minimum required parameters\n * max: maximum expected parameters (undefined = no limit)\n */\nfunction getExpectedFunctionArity(\n capabilityName: string,\n functionName: string,\n): { min: number; max?: number } | undefined {\n // Document capability function signatures\n if (capabilityName === 'documentCapability') {\n switch (functionName) {\n case 'reduceDocument': return { min: 2, max: 2 }; // (document, command)\n case 'getHierarchyItems': return { min: 1, max: 1 }; // (document)\n case 'getProjectionNodes': return { min: 1, max: 1 }; // (document)\n case 'getProjectionNode': return { min: 2, max: 2 }; // (document, id)\n case 'createPatchFromAsset': return { min: 1, max: 2 }; // (asset, input?)\n case 'createSerializedPropertyPatch': return { min: 1, max: 1 }; // (input)\n }\n }\n \n // Persistence capability function signatures\n if (capabilityName === 'persistenceCapability') {\n switch (functionName) {\n case 'loadAssets': return { min: 1, max: 1 }; // (document)\n case 'runGame': return { min: 0, max: 1 }; // (context?)\n }\n }\n \n // World capability function signatures\n if (capabilityName === 'worldCapability') {\n switch (functionName) {\n case 'getCanvas': return { min: 0, max: 0 }; // ()\n case 'disposeWorld': return { min: 0, max: 0 }; // ()\n case 'loadPreviewEngine': return { min: 0, max: 0 }; // ()\n case 'createPreviewEngine': return { min: 2, max: 2 }; // (engineModule, canvas)\n case 'importPreviewAsset': return { min: 1, max: 1 }; // (context)\n }\n }\n \n return undefined;\n}\n\nfunction inspectWorldCapability(\n worldCapability: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (!isRecord(worldCapability)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'worldCapability.missing',\n 'worldCapability is required.',\n 'worldCapability',\n ));\n return;\n }\n for (const functionName of PLAYABLE_LOCAL_EDITOR_HOST_REQUIRED_CONTRACT.world.direct) {\n const fn = worldCapability[functionName];\n if (typeof fn !== 'function') {\n diagnostics.push(createDiagnostic(\n 'error',\n `worldCapability.${functionName}.missing`,\n `worldCapability.${functionName} must be a function.`,\n `worldCapability.${functionName}`,\n ));\n } else {\n validateFunctionSignature(fn, functionName, 'worldCapability', diagnostics);\n }\n }\n}\n\nfunction createHarnessWorldAdapter<TAsset>(\n worldCapability: PlayableLocalEditorWorldCapability<TAsset>,\n): LocalEditorHarnessWorldAdapter<TAsset> {\n const adapter: LocalEditorHarnessWorldAdapter<TAsset> = {\n disposeGameWorld() {\n return worldCapability.disposeWorld?.() as ReturnType<LocalEditorHarnessWorldAdapter<TAsset>['disposeGameWorld']>;\n },\n getCanvas() {\n return worldCapability.getCanvas();\n },\n loadBabylon() {\n return worldCapability.loadPreviewEngine?.() as ReturnType<LocalEditorHarnessWorldAdapter<TAsset>['loadBabylon']>;\n },\n createEngine(engineModule, canvas) {\n return worldCapability.createPreviewEngine?.(engineModule, canvas);\n },\n importProjectionModel(context) {\n return worldCapability.importPreviewAsset?.(context) as ReturnType<LocalEditorHarnessWorldAdapter<TAsset>['importProjectionModel']>;\n },\n };\n if (worldCapability.toBrowserAssetItem) {\n adapter.toBrowserAssetItem = worldCapability.toBrowserAssetItem as LocalEditorHarnessWorldAdapter<TAsset>['toBrowserAssetItem'];\n }\n if (worldCapability.resolveAssetId) {\n adapter.resolveAssetId = worldCapability.resolveAssetId;\n }\n if (worldCapability.resolveMaterialTextureUrl) {\n adapter.resolveMaterialTextureUrl = worldCapability.resolveMaterialTextureUrl;\n }\n return adapter;\n}\n\nfunction inspectLifecycle(\n lifecycle: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (!isRecord(lifecycle)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'lifecycle.missing',\n 'lifecycle is required.',\n 'lifecycle',\n ));\n return;\n }\n if (!isRecord(lifecycle.loadingContent)) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'lifecycle.loading-content.missing',\n 'lifecycle.loadingContent is required.',\n 'lifecycle.loadingContent',\n ));\n }\n}\n\nfunction inspectForgePlay(\n forgePlay: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (!isRecord(forgePlay)) return;\n if (forgePlay.enabled !== false && !forgePlay.window) {\n diagnostics.push(createDiagnostic(\n 'warning',\n 'forge-play.window.missing',\n 'Forge Play bridge is enabled but no window was provided; mode and document bridge commands will not be installed.',\n 'forgePlay.window',\n ));\n }\n}\n\nfunction inspectAuthoring(\n authoring: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (!isRecord(authoring)) return;\n const drivers = Array.isArray(authoring.drivers) ? authoring.drivers : [];\n if (authoring.host && drivers.length > 0) {\n diagnostics.push(createDiagnostic(\n 'info',\n 'authoring.host-overrides-drivers',\n 'authoring.host and authoring.drivers are both present; the provided host will be used.',\n 'authoring',\n ));\n }\n}\n\nfunction inspectCapabilities(\n capabilities: unknown,\n diagnostics: PlayableLocalEditorHostCompatibilityDiagnostic[],\n): void {\n if (capabilities === undefined) return;\n if (!isRecord(capabilities)) {\n diagnostics.push(createDiagnostic(\n 'warning',\n 'capabilities.invalid',\n 'capabilities must be an object when provided.',\n 'capabilities',\n ));\n return;\n }\n const hierarchyActions = capabilities.hierarchyActions;\n if (isRecord(hierarchyActions) && hierarchyActions.contextActions !== undefined) {\n diagnostics.push(createDiagnostic(\n 'error',\n 'capabilities.hierarchyActions.contextActions.removed',\n 'capabilities.hierarchyActions.contextActions was removed; migrate each action to capabilities.hierarchyActions.operations.',\n 'capabilities.hierarchyActions.contextActions',\n ));\n }\n if (isRecord(hierarchyActions)\n && hierarchyActions.operations !== undefined\n && !Array.isArray(hierarchyActions.operations)) {\n diagnostics.push(createDiagnostic(\n 'warning',\n 'capabilities.hierarchyActions.operations.invalid',\n 'capabilities.hierarchyActions.operations should be an array of typed hierarchy operation registrations.',\n 'capabilities.hierarchyActions.operations',\n ));\n }\n if (isRecord(hierarchyActions) && Array.isArray(hierarchyActions.operations)) {\n hierarchyActions.operations.forEach((operation, index) => {\n if (!isRecord(operation)) return;\n if (operation.contextMenu === undefined) return;\n diagnostics.push(createDiagnostic(\n 'error',\n 'capabilities.hierarchyActions.operations.contextMenu.removed',\n 'Hierarchy operation contextMenu was removed; use operation.menu or menu: false.',\n `capabilities.hierarchyActions.operations[${index}].contextMenu`,\n ));\n });\n }\n}\n\nfunction createDiagnostic(\n severity: PlayableLocalEditorHostCompatibilitySeverity,\n code: string,\n message: string,\n path?: string,\n): PlayableLocalEditorHostCompatibilityDiagnostic {\n return {\n severity,\n code,\n message,\n path,\n };\n}\n\nfunction cloneCompatibilityReport(\n report: PlayableLocalEditorHostCompatibilityReport,\n): PlayableLocalEditorHostCompatibilityReport {\n return {\n supportedManifestVersion: report.supportedManifestVersion,\n manifestVersion: report.manifestVersion,\n projectId: report.projectId,\n projectName: report.projectName,\n compatibilityTag: report.compatibilityTag,\n ok: report.ok,\n diagnostics: report.diagnostics.map(diagnostic => ({ ...diagnostic })),\n };\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction readOptionalString(value: unknown): string | undefined {\n return typeof value === 'string' ? value : undefined;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"playable-product-scene-capabilities.d.ts","sourceRoot":"","sources":["../src/playable-product-scene-capabilities.ts"],"names":[],"mappings":"AAAA,OA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MAAM,EACN,MAAM,SAAS,2BAA2B,EAC1C,QAAQ,EAER,KAAK,EAAE,qCAAqC,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,GAC7F,gCAAgC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAkJ7D"}
1
+ {"version":3,"file":"playable-product-scene-capabilities.d.ts","sourceRoot":"","sources":["../src/playable-product-scene-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yCAAyC,EACzC,yCAAyC,EACzC,qCAAqC,EACrC,8CAA8C,EAC9C,6CAA6C,EAC7C,mCAAmC,EACnC,sCAAsC,EACtC,wCAAwC,EAExC,wCAAwC,EACxC,sCAAsC,EACtC,uCAAuC,EACvC,sCAAsC,EACtC,8CAA8C,EAC9C,yCAAyC,EACzC,6BAA6B,EAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,sCAAsC,EACtC,0CAA0C,EAC3C,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAML,mCAAmC,EACnC,gDAAgD,EAChD,wCAAwC,EACxC,kCAAkC,EAIlC,0CAA0C,EAE1C,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAE1B,KAAK,kCAAkC,EACxC,MAAM,gCAAgC,CAAC;AAIxC,MAAM,WAAW,+CAA+C,CAAC,SAAS,EAAE,MAAM;IAChF,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,WAAW,EAAE,GAAG,CAAC;IACjB,SAAS,EAAE,GAAG,CAAC;IACf,eAAe,EAAE,GAAG,CAAC;IACrB,sGAAsG;IACtG,MAAM,CAAC,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,mCAAmC,CAAC;QAC1D,kBAAkB,EAAE,OAAO,wCAAwC,CAAC;QACpE,YAAY,EAAE,OAAO,kCAAkC,CAAC;QACxD,kBAAkB,EAAE,kCAAkC,C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MAAM,EAAE,MAAM,CACzE,SAAQ,oCAAoC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC;IACvE,iBAAiB,CACf,OAAO,EAAE,sCAAsC,CAAC,SAAS,CAAC,GACzD,0CAA0C,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1E;AAED,wBAAgB,sCAAsC,CACpD,SAAS,SAAS,mBAAmB,CAAC,WAAW,CAAC,EAClD,WAAW,SAAS,qBAAqB,EACzC,MAAM,EACN,MAAM,SAAS,2BAA2B,EAC1C,QAAQ,EAER,KAAK,EAAE,qCAAqC,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,GAC7F,gCAAgC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAkJ7D"}
@@ -1,4 +1,4 @@
1
- import { EDITOR_SCENE_STATIC_SHADOW_BAKE_ACTION_PATH, assertPlayableEditorSceneDocumentContract, createEditorSceneSerializedMultiTransformPatch, createEditorSceneTransformBatchPatch, createEditorSceneTransformPatch, getEditorScenePrefabStageDescriptor, getEditorScenePrefabStageProjectionNodeIdForNode, getEditorScenePrefabStageProjectionNodes, getEditorScenePrefabStageStructure, resolveEditorSceneLightingPreviewProfile, resolveEditorSceneMaterialSlotReimportDiff, resolveEditorScenePrefabStagePreviewTarget, toEditorSceneLocalTransformFromWorld, } from '@fps-games/editor-playable-sdk';
1
+ import { EDITOR_SCENE_STATIC_SHADOW_BAKE_ACTION_PATH, assertPlayableEditorSceneDocumentContract, createEditorSceneSerializedMultiTransformPatch, createEditorSceneTransformBatchPatch, createEditorSceneTransformPatch, getEditorScenePrefabStageDescriptor, getEditorScenePrefabStageProjectionNodeIdForNode, getEditorScenePrefabStageProjectionNodes, getEditorScenePrefabStageStructure, resolveEditorSceneAssetLibraryItemRelativePath, resolveEditorSceneLightingPreviewProfile, resolveEditorSceneMaterialSlotReimportDiff, resolveEditorScenePrefabStagePreviewTarget, toEditorSceneLocalTransformFromWorld, } from '@fps-games/editor-playable-sdk';
2
2
  import { createBabylonEditorPreviewEngine } from './internal/babylon-preview-engine.js';
3
3
  export function prepareFpsGameEditorStandardDocument(input) {
4
4
  return input.normalizeHierarchyDocument(input.ensureEnvironmentDefaults(input.hydrateDocumentAssets(input.document, input.assets)));
@@ -127,14 +127,20 @@ export function createFpsGameEditorPlayableProjectHostAssembly(input) {
127
127
  localTestActions: input.runtimeWindow.parent === input.runtimeWindow,
128
128
  gameModeEntryVisible: input.gameModeEntryVisible,
129
129
  authoring: { drivers: [input.sceneSource.createDriver()] },
130
- persistenceAdapter: { loadAuthoringSource: async () => { const loaded = await input.sceneSource.load(); return { source: loaded.source, document: loaded.document, assets: loaded.assets, summary: loaded.summary }; }, loadAssets: input.sceneSource.loadAssets },
130
+ persistenceAdapter: {
131
+ loadAuthoringSource: async () => { const loaded = await input.sceneSource.load(); return { source: loaded.source, document: loaded.document, assets: loaded.assets, summary: loaded.summary }; },
132
+ loadAssets: input.sceneSource.loadAssets,
133
+ ...(input.sceneSource.loadProjectFiles ? { loadProjectFiles: input.sceneSource.loadProjectFiles } : {}),
134
+ ...(input.sceneSource.loadProjectFile ? { loadProjectFile: input.sceneSource.loadProjectFile } : {}),
135
+ ...(input.sceneSource.resolveProjectMedia ? { resolveProjectMedia: input.sceneSource.resolveProjectMedia } : {}),
136
+ },
131
137
  worldAdapter: {
132
138
  loadPreviewEngine: async () => projection.createEditorPreviewBabylonModule(await input.loadBabylon()),
133
139
  createPreviewEngine: createBabylonEditorPreviewEngine,
134
140
  importPreviewAsset: projection.importEditorProjectionModel,
135
141
  resolveMaterialTextureUrl: (texture) => projection.resolveEditorSceneTextureRefUrl(assets, texture),
136
142
  resolveAssetId: (asset) => asset.assetId,
137
- toBrowserAssetItem: (asset) => ({ id: asset.assetId, guid: asset.guid, assetId: asset.assetId, kind: asset.kind, label: asset.displayName, meta: asset.assetId, external: asset.external, origin: asset.origin, dedupeKey: asset.dedupeKey, placeable: asset.placeable, preview: projection.createEditorSceneLibraryAssetPreview(asset), disabled: asset.placeable === false }),
143
+ toBrowserAssetItem: (asset) => ({ id: asset.assetId, guid: asset.guid, assetId: asset.assetId, kind: asset.kind, label: asset.displayName, relativePath: resolveEditorSceneAssetLibraryItemRelativePath(asset), meta: asset.assetId, external: asset.external, origin: asset.origin, dedupeKey: asset.dedupeKey, contentHash: typeof asset.metadata?.contentHash === 'string' ? asset.metadata.contentHash : undefined, placeable: asset.placeable, preview: projection.createEditorSceneLibraryAssetPreview(asset), disabled: asset.placeable === false }),
138
144
  },
139
145
  world: input.world,
140
146
  createGrid: projection.createEditorGrid,