@fps-games/editor 0.2.1-beta.3 → 0.2.1-beta.4

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 (514) hide show
  1. package/dist/build-info.json +44 -44
  2. package/dist/editor-commands/capabilities/assets.d.ts +8 -0
  3. package/dist/editor-commands/capabilities/assets.d.ts.map +1 -0
  4. package/dist/{agent-bridge → editor-commands}/capabilities/assets.js +41 -41
  5. package/dist/editor-commands/capabilities/assets.js.map +1 -0
  6. package/dist/editor-commands/capabilities/editor-state.d.ts +5 -0
  7. package/dist/editor-commands/capabilities/editor-state.d.ts.map +1 -0
  8. package/dist/{agent-bridge → editor-commands}/capabilities/editor-state.js +22 -22
  9. package/dist/editor-commands/capabilities/editor-state.js.map +1 -0
  10. package/dist/editor-commands/capabilities/hierarchy.d.ts +4 -0
  11. package/dist/editor-commands/capabilities/hierarchy.d.ts.map +1 -0
  12. package/dist/{agent-bridge → editor-commands}/capabilities/hierarchy.js +5 -5
  13. package/dist/editor-commands/capabilities/hierarchy.js.map +1 -0
  14. package/dist/editor-commands/capabilities/host-lifecycle.d.ts +11 -0
  15. package/dist/editor-commands/capabilities/host-lifecycle.d.ts.map +1 -0
  16. package/dist/editor-commands/capabilities/host-lifecycle.js +149 -0
  17. package/dist/editor-commands/capabilities/host-lifecycle.js.map +1 -0
  18. package/dist/editor-commands/capabilities/prefabs.d.ts +5 -0
  19. package/dist/editor-commands/capabilities/prefabs.d.ts.map +1 -0
  20. package/dist/{agent-bridge → editor-commands}/capabilities/prefabs.js +93 -93
  21. package/dist/editor-commands/capabilities/prefabs.js.map +1 -0
  22. package/dist/editor-commands/capabilities/scene-objects.d.ts +8 -0
  23. package/dist/editor-commands/capabilities/scene-objects.d.ts.map +1 -0
  24. package/dist/editor-commands/capabilities/scene-objects.js +480 -0
  25. package/dist/editor-commands/capabilities/scene-objects.js.map +1 -0
  26. package/dist/editor-commands/capabilities/selection.d.ts +5 -0
  27. package/dist/editor-commands/capabilities/selection.d.ts.map +1 -0
  28. package/dist/editor-commands/capabilities/selection.js +60 -0
  29. package/dist/editor-commands/capabilities/selection.js.map +1 -0
  30. package/dist/editor-commands/capabilities/shadows.d.ts +5 -0
  31. package/dist/editor-commands/capabilities/shadows.d.ts.map +1 -0
  32. package/dist/{agent-bridge → editor-commands}/capabilities/shadows.js +74 -74
  33. package/dist/editor-commands/capabilities/shadows.js.map +1 -0
  34. package/dist/editor-commands/capabilities/transform.d.ts +5 -0
  35. package/dist/editor-commands/capabilities/transform.d.ts.map +1 -0
  36. package/dist/editor-commands/capabilities/transform.js +164 -0
  37. package/dist/editor-commands/capabilities/transform.js.map +1 -0
  38. package/dist/editor-commands/capabilities/ui-regions.d.ts +4 -0
  39. package/dist/editor-commands/capabilities/ui-regions.d.ts.map +1 -0
  40. package/dist/{agent-bridge → editor-commands}/capabilities/ui-regions.js +55 -57
  41. package/dist/editor-commands/capabilities/ui-regions.js.map +1 -0
  42. package/dist/editor-commands/capabilities/viewport.d.ts +5 -0
  43. package/dist/editor-commands/capabilities/viewport.d.ts.map +1 -0
  44. package/dist/{agent-bridge → editor-commands}/capabilities/viewport.js +100 -100
  45. package/dist/editor-commands/capabilities/viewport.js.map +1 -0
  46. package/dist/editor-commands/command-sources.d.ts +7 -0
  47. package/dist/editor-commands/command-sources.d.ts.map +1 -0
  48. package/dist/editor-commands/command-sources.js +34 -0
  49. package/dist/editor-commands/command-sources.js.map +1 -0
  50. package/dist/editor-commands/diagnostics.d.ts +12 -0
  51. package/dist/editor-commands/diagnostics.d.ts.map +1 -0
  52. package/dist/{agent-bridge → editor-commands}/diagnostics.js +4 -4
  53. package/dist/editor-commands/diagnostics.js.map +1 -0
  54. package/dist/{agent-bridge → editor-commands}/index.d.ts +1 -1
  55. package/dist/editor-commands/index.d.ts.map +1 -0
  56. package/dist/{agent-bridge → editor-commands}/index.js +1 -1
  57. package/dist/editor-commands/index.js.map +1 -0
  58. package/dist/editor-commands/register.d.ts +4 -0
  59. package/dist/editor-commands/register.d.ts.map +1 -0
  60. package/dist/{agent-bridge → editor-commands}/register.js +323 -286
  61. package/dist/editor-commands/register.js.map +1 -0
  62. package/dist/{agent-bridge → editor-commands}/shared.d.ts +80 -80
  63. package/dist/editor-commands/shared.d.ts.map +1 -0
  64. package/dist/{agent-bridge → editor-commands}/shared.js +29 -29
  65. package/dist/editor-commands/shared.js.map +1 -0
  66. package/dist/editor-commands/source-types.d.ts +110 -0
  67. package/dist/editor-commands/source-types.d.ts.map +1 -0
  68. package/dist/editor-commands/source-types.js.map +1 -0
  69. package/dist/editor-plugin-commands.d.ts +4 -0
  70. package/dist/editor-plugin-commands.d.ts.map +1 -0
  71. package/dist/editor-plugin-commands.js +18 -0
  72. package/dist/editor-plugin-commands.js.map +1 -0
  73. package/dist/index.d.ts +2 -2
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/index.js.map +1 -1
  77. package/dist/local-editor-commands.d.ts +2 -0
  78. package/dist/local-editor-commands.d.ts.map +1 -0
  79. package/dist/local-editor-commands.js +2 -0
  80. package/dist/local-editor-commands.js.map +1 -0
  81. package/dist/local-editor-harness.d.ts +35 -21
  82. package/dist/local-editor-harness.d.ts.map +1 -1
  83. package/dist/local-editor-harness.js +1721 -367
  84. package/dist/local-editor-harness.js.map +1 -1
  85. package/dist/local-editor-prefab-stage-transaction.d.ts +2 -1
  86. package/dist/local-editor-prefab-stage-transaction.d.ts.map +1 -1
  87. package/dist/local-editor-prefab-stage-transaction.js +6 -5
  88. package/dist/local-editor-prefab-stage-transaction.js.map +1 -1
  89. package/dist/local-editor-scene-view-interaction-runtime.d.ts.map +1 -1
  90. package/dist/local-editor-scene-view-interaction-runtime.js +2 -5
  91. package/dist/local-editor-scene-view-interaction-runtime.js.map +1 -1
  92. package/dist/playable-local-editor-entry.d.ts +10 -0
  93. package/dist/playable-local-editor-entry.d.ts.map +1 -1
  94. package/dist/playable-local-editor-entry.js +10 -2
  95. package/dist/playable-local-editor-entry.js.map +1 -1
  96. package/dist/playable-local-editor-host.d.ts +3 -32
  97. package/dist/playable-local-editor-host.d.ts.map +1 -1
  98. package/dist/playable-local-editor-host.js +6 -70
  99. package/dist/playable-local-editor-host.js.map +1 -1
  100. package/dist/playable-product-local-editor.d.ts +1 -2
  101. package/dist/playable-product-local-editor.d.ts.map +1 -1
  102. package/dist/playable-product-local-editor.js +0 -1
  103. package/dist/playable-product-local-editor.js.map +1 -1
  104. package/dist/playable-product-projection-preview.d.ts.map +1 -1
  105. package/dist/playable-product-projection-preview.js +1 -1
  106. package/dist/playable-product-projection-preview.js.map +1 -1
  107. package/dist/playable-product-scene-capabilities.d.ts +0 -2
  108. package/dist/playable-product-scene-capabilities.d.ts.map +1 -1
  109. package/dist/playable-product-scene-capabilities.js +33 -6
  110. package/dist/playable-product-scene-capabilities.js.map +1 -1
  111. package/dist/playable-runtime-babylon.d.ts +4 -0
  112. package/dist/playable-runtime-babylon.d.ts.map +1 -1
  113. package/dist/playable-runtime-babylon.js +4 -0
  114. package/dist/playable-runtime-babylon.js.map +1 -1
  115. package/dist/playable-sdk.d.ts +1 -1
  116. package/dist/playable-sdk.d.ts.map +1 -1
  117. package/dist/playable-sdk.js.map +1 -1
  118. package/dist/playable-standard-project.d.ts +0 -2
  119. package/dist/playable-standard-project.d.ts.map +1 -1
  120. package/dist/playable-standard-project.js +1 -2
  121. package/dist/playable-standard-project.js.map +1 -1
  122. package/dist/project-service-projection.d.ts +16 -0
  123. package/dist/project-service-projection.d.ts.map +1 -0
  124. package/dist/project-service-projection.js +67 -0
  125. package/dist/project-service-projection.js.map +1 -0
  126. package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts +18 -0
  127. package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.d.ts.map +1 -1
  128. package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js +54 -18
  129. package/node_modules/@fps-games/babylon-renderer/dist/post-process/babylon-default-pipeline.js.map +1 -1
  130. package/node_modules/@fps-games/babylon-renderer/package.json +9 -9
  131. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts +1 -0
  132. package/node_modules/@fps-games/editor-babylon/dist/projection.d.ts.map +1 -1
  133. package/node_modules/@fps-games/editor-babylon/dist/projection.js +1 -1
  134. package/node_modules/@fps-games/editor-babylon/dist/projection.js.map +1 -1
  135. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.d.ts.map +1 -1
  136. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js +127 -13
  137. package/node_modules/@fps-games/editor-babylon/dist/selection-presentation-controller.js.map +1 -1
  138. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.d.ts.map +1 -1
  139. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js +66 -1
  140. package/node_modules/@fps-games/editor-babylon/dist/transform-gizmo-controller.js.map +1 -1
  141. package/node_modules/@fps-games/editor-babylon/package.json +6 -6
  142. package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts +32 -0
  143. package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.d.ts.map +1 -0
  144. package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js +254 -0
  145. package/node_modules/@fps-games/editor-browser/dist/editor-command-service-client.js.map +1 -0
  146. package/node_modules/@fps-games/editor-browser/dist/index.d.ts +3 -1
  147. package/node_modules/@fps-games/editor-browser/dist/index.d.ts.map +1 -1
  148. package/node_modules/@fps-games/editor-browser/dist/index.js +2 -0
  149. package/node_modules/@fps-games/editor-browser/dist/index.js.map +1 -1
  150. package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts +68 -0
  151. package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.d.ts.map +1 -0
  152. package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js +650 -0
  153. package/node_modules/@fps-games/editor-browser/dist/local-editor-command-center.js.map +1 -0
  154. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts +1 -0
  155. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.d.ts.map +1 -1
  156. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js +22 -0
  157. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-formal-surface-visibility.js.map +1 -1
  158. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts +8 -0
  159. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.d.ts.map +1 -1
  160. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js +117 -6
  161. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-controller.js.map +1 -1
  162. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts +14 -1
  163. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.d.ts.map +1 -1
  164. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js +100 -1
  165. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-hierarchy-view.js.map +1 -1
  166. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts +8 -1
  167. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.d.ts.map +1 -1
  168. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js +75 -2
  169. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-panels.js.map +1 -1
  170. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts +37 -12
  171. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.d.ts.map +1 -1
  172. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui-types.js.map +1 -1
  173. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts +25 -2
  174. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.d.ts.map +1 -1
  175. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js +332 -107
  176. package/node_modules/@fps-games/editor-browser/dist/local-editor-ui.js.map +1 -1
  177. package/node_modules/@fps-games/editor-browser/package.json +7 -7
  178. package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts +107 -0
  179. package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.d.ts.map +1 -0
  180. package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js +1211 -0
  181. package/node_modules/@fps-games/editor-core/dist/editor-authoring-host.js.map +1 -0
  182. package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts +34 -0
  183. package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.d.ts.map +1 -0
  184. package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js +260 -0
  185. package/node_modules/@fps-games/editor-core/dist/editor-command-capability-adapter.js.map +1 -0
  186. package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts +9 -0
  187. package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.d.ts.map +1 -0
  188. package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js +14 -0
  189. package/node_modules/@fps-games/editor-core/dist/editor-command-composed-authority.js.map +1 -0
  190. package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts +18 -0
  191. package/node_modules/@fps-games/editor-core/dist/editor-command-observability.d.ts.map +1 -0
  192. package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js +113 -0
  193. package/node_modules/@fps-games/editor-core/dist/editor-command-observability.js.map +1 -0
  194. package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts +82 -0
  195. package/node_modules/@fps-games/editor-core/dist/editor-command-system.d.ts.map +1 -0
  196. package/node_modules/@fps-games/editor-core/dist/editor-command-system.js +1098 -0
  197. package/node_modules/@fps-games/editor-core/dist/editor-command-system.js.map +1 -0
  198. package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts +6 -7
  199. package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.d.ts.map +1 -1
  200. package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js +62 -103
  201. package/node_modules/@fps-games/editor-core/dist/editor-plugin-host.js.map +1 -1
  202. package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts +30 -0
  203. package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.d.ts.map +1 -0
  204. package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js +540 -0
  205. package/node_modules/@fps-games/editor-core/dist/editor-service-gateway.js.map +1 -0
  206. package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts +9 -0
  207. package/node_modules/@fps-games/editor-core/dist/editor-session-authority.d.ts.map +1 -0
  208. package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js +61 -0
  209. package/node_modules/@fps-games/editor-core/dist/editor-session-authority.js.map +1 -0
  210. package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts +55 -0
  211. package/node_modules/@fps-games/editor-core/dist/editor-session.d.ts.map +1 -1
  212. package/node_modules/@fps-games/editor-core/dist/editor-session.js +247 -6
  213. package/node_modules/@fps-games/editor-core/dist/editor-session.js.map +1 -1
  214. package/node_modules/@fps-games/editor-core/dist/index.d.ts +6 -2
  215. package/node_modules/@fps-games/editor-core/dist/index.d.ts.map +1 -1
  216. package/node_modules/@fps-games/editor-core/dist/index.js +6 -2
  217. package/node_modules/@fps-games/editor-core/dist/index.js.map +1 -1
  218. package/node_modules/@fps-games/editor-core/package.json +6 -6
  219. package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts +0 -1
  220. package/node_modules/@fps-games/editor-forge-play/dist/index.d.ts.map +1 -1
  221. package/node_modules/@fps-games/editor-forge-play/dist/index.js +0 -1
  222. package/node_modules/@fps-games/editor-forge-play/dist/index.js.map +1 -1
  223. package/node_modules/@fps-games/editor-forge-play/package.json +2 -2
  224. package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts +2 -0
  225. package/node_modules/@fps-games/editor-playable-sdk/dist/bridge-command/protocol.d.ts.map +1 -1
  226. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.d.ts.map +1 -1
  227. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js +41 -1
  228. package/node_modules/@fps-games/editor-playable-sdk/dist/document/helpers.js.map +1 -1
  229. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts +27 -1
  230. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.d.ts.map +1 -1
  231. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play-types.js.map +1 -1
  232. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts +2 -0
  233. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.d.ts.map +1 -1
  234. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js +214 -7
  235. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/forge-play.js.map +1 -1
  236. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts +1 -0
  237. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.d.ts.map +1 -1
  238. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js +11 -3
  239. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/host-controller.js.map +1 -1
  240. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts +2 -4
  241. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.d.ts.map +1 -1
  242. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js +0 -1
  243. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/index.js.map +1 -1
  244. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.d.ts.map +1 -1
  245. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js +77 -31
  246. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/lifecycle.js.map +1 -1
  247. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts +8 -1
  248. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.d.ts.map +1 -1
  249. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/types.js.map +1 -1
  250. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts +21 -1
  251. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.d.ts.map +1 -1
  252. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js +90 -4
  253. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/asset-fields.js.map +1 -1
  254. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts +27 -1
  255. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.d.ts.map +1 -1
  256. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js +161 -1
  257. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/binding.js.map +1 -1
  258. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts +2 -2
  259. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.d.ts.map +1 -1
  260. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js +5 -92
  261. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/inspector.js.map +1 -1
  262. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts +7 -0
  263. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.d.ts.map +1 -1
  264. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js +26 -9
  265. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/scene-inspector.js.map +1 -1
  266. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts +9 -0
  267. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.d.ts.map +1 -1
  268. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js +19 -8
  269. package/node_modules/@fps-games/editor-playable-sdk/dist/material-binding/slot-inspector.js.map +1 -1
  270. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts +5 -0
  271. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.d.ts.map +1 -1
  272. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js +16 -4
  273. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/material-override-inspector.js.map +1 -1
  274. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts +9 -0
  275. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.d.ts.map +1 -1
  276. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js +12 -2
  277. package/node_modules/@fps-games/editor-playable-sdk/dist/prefab-stage/stage-inspector.js.map +1 -1
  278. package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts +2 -1
  279. package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.d.ts.map +1 -1
  280. package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js +10 -5
  281. package/node_modules/@fps-games/editor-playable-sdk/dist/product/ground-decal.js.map +1 -1
  282. package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts +1 -0
  283. package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.d.ts.map +1 -1
  284. package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js +1 -0
  285. package/node_modules/@fps-games/editor-playable-sdk/dist/product/index.js.map +1 -1
  286. package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts +17 -82
  287. package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.d.ts.map +1 -1
  288. package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js +53 -57
  289. package/node_modules/@fps-games/editor-playable-sdk/dist/product/project-host-services.js.map +1 -1
  290. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.d.ts.map +1 -1
  291. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js +3 -2
  292. package/node_modules/@fps-games/editor-playable-sdk/dist/product/scene-session.js.map +1 -1
  293. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts +10 -0
  294. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.d.ts.map +1 -0
  295. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js +256 -0
  296. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-authoring-commands.js.map +1 -0
  297. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.d.ts.map +1 -1
  298. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js +7 -5
  299. package/node_modules/@fps-games/editor-playable-sdk/dist/product/standard-scene-assembly.js.map +1 -1
  300. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.d.ts.map +1 -1
  301. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js +8 -0
  302. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/client.js.map +1 -1
  303. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts +1 -0
  304. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.d.ts.map +1 -1
  305. package/node_modules/@fps-games/editor-playable-sdk/dist/scene-source/types.js.map +1 -1
  306. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js +134 -12
  307. package/node_modules/@fps-games/editor-playable-sdk/dist/upgrade-doctor/inspectors.js.map +1 -1
  308. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.d.ts.map +1 -1
  309. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js +47 -0
  310. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-scene-workflow.js.map +1 -1
  311. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts +27 -0
  312. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.d.ts.map +1 -0
  313. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js +592 -0
  314. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/editor-service-vite.js.map +1 -0
  315. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts +3 -1
  316. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.d.ts.map +1 -1
  317. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js +2 -1
  318. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/index.js.map +1 -1
  319. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.d.ts.map +1 -1
  320. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js +61 -6
  321. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/plugin.js.map +1 -1
  322. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts +0 -2
  323. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.d.ts.map +1 -1
  324. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js +1 -10
  325. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-adapter.js.map +1 -1
  326. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.d.ts.map +1 -1
  327. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js +21 -0
  328. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/product-authoring-api.js.map +1 -1
  329. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts +13 -0
  330. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.d.ts.map +1 -0
  331. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js +18 -0
  332. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-authoring-backend.js.map +1 -0
  333. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts +28 -0
  334. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.d.ts.map +1 -0
  335. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js +863 -0
  336. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/project-editor-service.js.map +1 -0
  337. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts +2 -0
  338. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.d.ts.map +1 -1
  339. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/types.js.map +1 -1
  340. package/node_modules/@fps-games/editor-playable-sdk/package.json +6 -6
  341. package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts +1626 -0
  342. package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.d.ts.map +1 -0
  343. package/node_modules/@fps-games/editor-protocol/dist/{agent-bridge.js → editor-command-capabilities.js} +766 -620
  344. package/node_modules/@fps-games/editor-protocol/dist/editor-command-capabilities.js.map +1 -0
  345. package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts +69 -0
  346. package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.d.ts.map +1 -0
  347. package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js +22 -0
  348. package/node_modules/@fps-games/editor-protocol/dist/editor-command-trace.js.map +1 -0
  349. package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts +136 -0
  350. package/node_modules/@fps-games/editor-protocol/dist/editor-command.d.ts.map +1 -0
  351. package/node_modules/@fps-games/editor-protocol/dist/editor-command.js +2 -0
  352. package/node_modules/@fps-games/editor-protocol/dist/editor-command.js.map +1 -0
  353. package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts +225 -0
  354. package/node_modules/@fps-games/editor-protocol/dist/editor-service.d.ts.map +1 -0
  355. package/node_modules/@fps-games/editor-protocol/dist/editor-service.js +4 -0
  356. package/node_modules/@fps-games/editor-protocol/dist/editor-service.js.map +1 -0
  357. package/node_modules/@fps-games/editor-protocol/dist/index.d.ts +6 -3
  358. package/node_modules/@fps-games/editor-protocol/dist/index.d.ts.map +1 -1
  359. package/node_modules/@fps-games/editor-protocol/dist/index.js +6 -3
  360. package/node_modules/@fps-games/editor-protocol/dist/index.js.map +1 -1
  361. package/node_modules/@fps-games/editor-protocol/package.json +2 -2
  362. package/node_modules/@fps-games/editor-tooling/package.json +3 -3
  363. package/node_modules/@fps-games/editor-ui/package.json +1 -1
  364. package/node_modules/@fps-games/playable-assets/package.json +1 -1
  365. package/node_modules/@fps-games/playable-contracts/package.json +1 -1
  366. package/node_modules/@fps-games/playable-rendering/package.json +2 -2
  367. package/node_modules/@fps-games/playable-runtime/package.json +12 -12
  368. package/node_modules/@fps-games/playable-runtime-data/package.json +4 -4
  369. package/node_modules/@fps-games/playable-scene/package.json +2 -2
  370. package/node_modules/@fps-games/plugin-api/package.json +1 -1
  371. package/node_modules/@fps-games/plugin-assets/dist/version.d.ts +1 -1
  372. package/node_modules/@fps-games/plugin-assets/dist/version.js +1 -1
  373. package/node_modules/@fps-games/plugin-assets/dist/version.js.map +1 -1
  374. package/node_modules/@fps-games/plugin-assets/package.json +6 -6
  375. package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts +1 -0
  376. package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.d.ts.map +1 -1
  377. package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js +78 -4
  378. package/node_modules/@fps-games/plugin-hierarchy/dist/kernel.js.map +1 -1
  379. package/node_modules/@fps-games/plugin-hierarchy/dist/version.d.ts +1 -1
  380. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js +1 -1
  381. package/node_modules/@fps-games/plugin-hierarchy/dist/version.js.map +1 -1
  382. package/node_modules/@fps-games/plugin-hierarchy/package.json +5 -5
  383. package/node_modules/@fps-games/plugin-host/package.json +2 -2
  384. package/node_modules/@fps-games/plugin-markers/dist/version.d.ts +1 -1
  385. package/node_modules/@fps-games/plugin-markers/dist/version.js +1 -1
  386. package/node_modules/@fps-games/plugin-markers/dist/version.js.map +1 -1
  387. package/node_modules/@fps-games/plugin-markers/package.json +5 -5
  388. package/node_modules/@fps-games/plugin-materials/dist/version.d.ts +1 -1
  389. package/node_modules/@fps-games/plugin-materials/dist/version.js +1 -1
  390. package/node_modules/@fps-games/plugin-materials/dist/version.js.map +1 -1
  391. package/node_modules/@fps-games/plugin-materials/package.json +5 -5
  392. package/node_modules/@fps-games/plugin-rendering/dist/version.d.ts +1 -1
  393. package/node_modules/@fps-games/plugin-rendering/dist/version.js +1 -1
  394. package/node_modules/@fps-games/plugin-rendering/dist/version.js.map +1 -1
  395. package/node_modules/@fps-games/plugin-rendering/package.json +5 -5
  396. package/node_modules/@fps-games/plugin-scene/dist/version.d.ts +1 -1
  397. package/node_modules/@fps-games/plugin-scene/dist/version.js +1 -1
  398. package/node_modules/@fps-games/plugin-scene/dist/version.js.map +1 -1
  399. package/node_modules/@fps-games/plugin-scene/package.json +5 -5
  400. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.d.ts +1 -1
  401. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js +1 -1
  402. package/node_modules/@fps-games/plugin-shadow-map-experiment/dist/version.js.map +1 -1
  403. package/node_modules/@fps-games/plugin-shadow-map-experiment/package.json +5 -5
  404. package/node_modules/@fps-games/plugin-shadows/dist/version.d.ts +1 -1
  405. package/node_modules/@fps-games/plugin-shadows/dist/version.js +1 -1
  406. package/node_modules/@fps-games/plugin-shadows/dist/version.js.map +1 -1
  407. package/node_modules/@fps-games/plugin-shadows/package.json +7 -7
  408. package/package.json +23 -23
  409. package/dist/agent-bridge/capabilities/assets.d.ts +0 -8
  410. package/dist/agent-bridge/capabilities/assets.d.ts.map +0 -1
  411. package/dist/agent-bridge/capabilities/assets.js.map +0 -1
  412. package/dist/agent-bridge/capabilities/editor-state.d.ts +0 -5
  413. package/dist/agent-bridge/capabilities/editor-state.d.ts.map +0 -1
  414. package/dist/agent-bridge/capabilities/editor-state.js.map +0 -1
  415. package/dist/agent-bridge/capabilities/hierarchy.d.ts +0 -4
  416. package/dist/agent-bridge/capabilities/hierarchy.d.ts.map +0 -1
  417. package/dist/agent-bridge/capabilities/hierarchy.js.map +0 -1
  418. package/dist/agent-bridge/capabilities/host-lifecycle.d.ts +0 -11
  419. package/dist/agent-bridge/capabilities/host-lifecycle.d.ts.map +0 -1
  420. package/dist/agent-bridge/capabilities/host-lifecycle.js +0 -149
  421. package/dist/agent-bridge/capabilities/host-lifecycle.js.map +0 -1
  422. package/dist/agent-bridge/capabilities/prefabs.d.ts +0 -5
  423. package/dist/agent-bridge/capabilities/prefabs.d.ts.map +0 -1
  424. package/dist/agent-bridge/capabilities/prefabs.js.map +0 -1
  425. package/dist/agent-bridge/capabilities/scene-objects.d.ts +0 -8
  426. package/dist/agent-bridge/capabilities/scene-objects.d.ts.map +0 -1
  427. package/dist/agent-bridge/capabilities/scene-objects.js +0 -480
  428. package/dist/agent-bridge/capabilities/scene-objects.js.map +0 -1
  429. package/dist/agent-bridge/capabilities/selection.d.ts +0 -5
  430. package/dist/agent-bridge/capabilities/selection.d.ts.map +0 -1
  431. package/dist/agent-bridge/capabilities/selection.js +0 -60
  432. package/dist/agent-bridge/capabilities/selection.js.map +0 -1
  433. package/dist/agent-bridge/capabilities/shadows.d.ts +0 -5
  434. package/dist/agent-bridge/capabilities/shadows.d.ts.map +0 -1
  435. package/dist/agent-bridge/capabilities/shadows.js.map +0 -1
  436. package/dist/agent-bridge/capabilities/transform.d.ts +0 -5
  437. package/dist/agent-bridge/capabilities/transform.d.ts.map +0 -1
  438. package/dist/agent-bridge/capabilities/transform.js +0 -164
  439. package/dist/agent-bridge/capabilities/transform.js.map +0 -1
  440. package/dist/agent-bridge/capabilities/ui-regions.d.ts +0 -4
  441. package/dist/agent-bridge/capabilities/ui-regions.d.ts.map +0 -1
  442. package/dist/agent-bridge/capabilities/ui-regions.js.map +0 -1
  443. package/dist/agent-bridge/capabilities/viewport.d.ts +0 -5
  444. package/dist/agent-bridge/capabilities/viewport.d.ts.map +0 -1
  445. package/dist/agent-bridge/capabilities/viewport.js.map +0 -1
  446. package/dist/agent-bridge/capability-sources.d.ts +0 -7
  447. package/dist/agent-bridge/capability-sources.d.ts.map +0 -1
  448. package/dist/agent-bridge/capability-sources.js +0 -34
  449. package/dist/agent-bridge/capability-sources.js.map +0 -1
  450. package/dist/agent-bridge/diagnostics.d.ts +0 -12
  451. package/dist/agent-bridge/diagnostics.d.ts.map +0 -1
  452. package/dist/agent-bridge/diagnostics.js.map +0 -1
  453. package/dist/agent-bridge/index.d.ts.map +0 -1
  454. package/dist/agent-bridge/index.js.map +0 -1
  455. package/dist/agent-bridge/register.d.ts +0 -4
  456. package/dist/agent-bridge/register.d.ts.map +0 -1
  457. package/dist/agent-bridge/register.js.map +0 -1
  458. package/dist/agent-bridge/shared.d.ts.map +0 -1
  459. package/dist/agent-bridge/shared.js.map +0 -1
  460. package/dist/agent-bridge/source-types.d.ts +0 -110
  461. package/dist/agent-bridge/source-types.d.ts.map +0 -1
  462. package/dist/agent-bridge/source-types.js.map +0 -1
  463. package/dist/editor-plugin-agent-capabilities.d.ts +0 -4
  464. package/dist/editor-plugin-agent-capabilities.d.ts.map +0 -1
  465. package/dist/editor-plugin-agent-capabilities.js +0 -64
  466. package/dist/editor-plugin-agent-capabilities.js.map +0 -1
  467. package/dist/local-editor-agent-actions.d.ts +0 -43
  468. package/dist/local-editor-agent-actions.d.ts.map +0 -1
  469. package/dist/local-editor-agent-actions.js +0 -321
  470. package/dist/local-editor-agent-actions.js.map +0 -1
  471. package/dist/local-editor-agent-bridge-transport.d.ts +0 -129
  472. package/dist/local-editor-agent-bridge-transport.d.ts.map +0 -1
  473. package/dist/local-editor-agent-bridge-transport.js +0 -403
  474. package/dist/local-editor-agent-bridge-transport.js.map +0 -1
  475. package/dist/local-editor-agent-bridge.d.ts +0 -2
  476. package/dist/local-editor-agent-bridge.d.ts.map +0 -1
  477. package/dist/local-editor-agent-bridge.js +0 -2
  478. package/dist/local-editor-agent-bridge.js.map +0 -1
  479. package/dist/local-editor-agent-context.d.ts +0 -68
  480. package/dist/local-editor-agent-context.d.ts.map +0 -1
  481. package/dist/local-editor-agent-context.js +0 -716
  482. package/dist/local-editor-agent-context.js.map +0 -1
  483. package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts +0 -22
  484. package/node_modules/@fps-games/editor-core/dist/agent-bridge.d.ts.map +0 -1
  485. package/node_modules/@fps-games/editor-core/dist/agent-bridge.js +0 -106
  486. package/node_modules/@fps-games/editor-core/dist/agent-bridge.js.map +0 -1
  487. package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts +0 -17
  488. package/node_modules/@fps-games/editor-core/dist/agent-interaction.d.ts.map +0 -1
  489. package/node_modules/@fps-games/editor-core/dist/agent-interaction.js +0 -14
  490. package/node_modules/@fps-games/editor-core/dist/agent-interaction.js.map +0 -1
  491. package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts +0 -23
  492. package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.d.ts.map +0 -1
  493. package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js +0 -47
  494. package/node_modules/@fps-games/editor-forge-play/dist/agent-transport.js.map +0 -1
  495. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts +0 -112
  496. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.d.ts.map +0 -1
  497. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js +0 -159
  498. package/node_modules/@fps-games/editor-playable-sdk/dist/local-harness/agent-descriptions.js.map +0 -1
  499. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts +0 -15
  500. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.d.ts.map +0 -1
  501. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js +0 -76
  502. package/node_modules/@fps-games/editor-playable-sdk/dist/vite/session-metadata.js.map +0 -1
  503. package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts +0 -1622
  504. package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.d.ts.map +0 -1
  505. package/node_modules/@fps-games/editor-protocol/dist/agent-bridge.js.map +0 -1
  506. package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts +0 -68
  507. package/node_modules/@fps-games/editor-protocol/dist/agent-trace.d.ts.map +0 -1
  508. package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js +0 -23
  509. package/node_modules/@fps-games/editor-protocol/dist/agent-trace.js.map +0 -1
  510. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts +0 -187
  511. package/node_modules/@fps-games/editor-protocol/dist/agent.d.ts.map +0 -1
  512. package/node_modules/@fps-games/editor-protocol/dist/agent.js +0 -5
  513. package/node_modules/@fps-games/editor-protocol/dist/agent.js.map +0 -1
  514. /package/dist/{agent-bridge → editor-commands}/source-types.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"source-types.js","sourceRoot":"","sources":["../../src/agent-bridge/source-types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n EditorAgentBridgeCallResult,\n EditorAgentBridgeAssetAnalysisGetInput,\n EditorAgentBridgeAssetAnalysisGetOutput,\n EditorAgentBridgeAssetInfoGetInput,\n EditorAgentBridgeAssetInfoGetOutput,\n EditorAgentBridgeAssetLibraryListInput,\n EditorAgentBridgeAssetLibraryListOutput,\n EditorAgentBridgeEditorSnapshot,\n EditorAgentBridgeEditorSnapshotGetInput,\n EditorAgentBridgeEditorState,\n EditorAgentBridgeEditorStateGetInput,\n EditorAgentBridgeEditorDiagnosticsListInput,\n EditorAgentBridgeEditorDiagnosticsListOutput,\n EditorAgentBridgeUiRegionsGetInput,\n EditorAgentBridgeUiRegionsGetOutput,\n EditorAgentBridgeHostEditorEnterInput,\n EditorAgentBridgeHostEditorEnterOutput,\n EditorAgentBridgeHostEditorSaveAndRunInput,\n EditorAgentBridgeHostEditorSaveAndRunOutput,\n EditorAgentBridgeHostEditorDiscardAndRunInput,\n EditorAgentBridgeHostEditorDiscardAndRunOutput,\n EditorAgentBridgeHostEditorWaitReadyInput,\n EditorAgentBridgeHostEditorWaitReadyOutput,\n EditorAgentBridgeHostModeGetInput,\n EditorAgentBridgeHostModeGetOutput,\n EditorAgentBridgeHierarchyScopeGetInput,\n EditorAgentBridgeHierarchyScopeGetOutput,\n EditorAgentBridgeHierarchyOperationsListInput,\n EditorAgentBridgeHierarchyOperationsListOutput,\n EditorAgentBridgeHierarchyOperationExecuteInput,\n EditorAgentBridgeHierarchyOperationExecuteOutput,\n EditorAgentBridgeObjectCreatePrimitiveInput,\n EditorAgentBridgeObjectCreatePrimitiveOutput,\n EditorAgentBridgeObjectCreateFromAssetInput,\n EditorAgentBridgeObjectCreateFromAssetOutput,\n EditorAgentBridgeObjectDeleteInput,\n EditorAgentBridgeObjectDeleteOutput,\n EditorAgentBridgeObjectResolveInput,\n EditorAgentBridgeObjectResolveOutput,\n EditorAgentBridgePrefabMaterialSlotsListInput,\n EditorAgentBridgePrefabMaterialSlotsListOutput,\n EditorAgentBridgePrefabAssetRenameInput,\n EditorAgentBridgePrefabAssetRenameOutput,\n EditorAgentBridgePrefabNodeCreateFromAssetInput,\n EditorAgentBridgePrefabNodeCreateGroupInput,\n EditorAgentBridgePrefabNodeCreateMarkerInput,\n EditorAgentBridgePrefabNodeCreatePrimitiveInput,\n EditorAgentBridgePrefabNodeDeleteInput,\n EditorAgentBridgePrefabNodeMutationOutput,\n EditorAgentBridgePrefabNodeReparentInput,\n EditorAgentBridgePrefabNodeRenameInput,\n EditorAgentBridgePrefabNodeRenameOutput,\n EditorAgentBridgePrefabNodeSelectInput,\n EditorAgentBridgePrefabNodeSelectOutput,\n EditorAgentBridgePrefabNodeSetTransformInput,\n EditorAgentBridgePrefabNodeSetMarkerInput,\n EditorAgentBridgePrefabResolveInput,\n EditorAgentBridgePrefabResolveOutput,\n EditorAgentBridgePrefabSceneGetInput,\n EditorAgentBridgePrefabSceneGetOutput,\n EditorAgentBridgePrefabSourceStructureGetInput,\n EditorAgentBridgePrefabSourceStructureGetOutput,\n EditorAgentBridgePrefabStageExitInput,\n EditorAgentBridgePrefabStageExitOutput,\n EditorAgentBridgePrefabStageActionInput,\n EditorAgentBridgePrefabStageActionOutput,\n EditorAgentBridgePrefabStageOpenInput,\n EditorAgentBridgePrefabStageOpenOutput,\n EditorAgentBridgeSceneObject,\n EditorAgentBridgeSceneObjectsListInput,\n EditorAgentBridgeSelectionSetInput,\n EditorAgentBridgeSelectionSetOutput,\n EditorAgentBridgeSelectionState,\n EditorAgentBridgeShadowPolicyGetInput,\n EditorAgentBridgeShadowPolicyGetOutput,\n EditorAgentBridgeShadowPolicySetInput,\n EditorAgentBridgeShadowPolicySetOutput,\n EditorAgentBridgeShadowMapExperimentConfigGetInput,\n EditorAgentBridgeShadowMapExperimentConfigGetOutput,\n EditorAgentBridgeShadowMapExperimentPolicyGetInput,\n EditorAgentBridgeShadowMapExperimentPolicyOutput,\n EditorAgentBridgeShadowMapExperimentPolicySetInput,\n EditorAgentBridgeShadowMapExperimentPolicySetOutput,\n EditorAgentBridgeShadowMapExperimentPlanPreviewInput,\n EditorAgentBridgeShadowMapExperimentPlanPreviewOutput,\n EditorAgentBridgeShadowMapExperimentRuntimeSnapshotInput,\n EditorAgentBridgeShadowMapExperimentRuntimeSnapshotOutput,\n EditorAgentBridgeShadowDebugInspectInput,\n EditorAgentBridgeShadowDebugInspectOutput,\n EditorAgentBridgeShadowDebugContextClearInput,\n EditorAgentBridgeShadowDebugContextClearOutput,\n EditorAgentBridgeShadowDebugContextEnterInput,\n EditorAgentBridgeShadowDebugContextEnterOutput,\n EditorAgentBridgeShadowDebugOverlayClearInput,\n EditorAgentBridgeShadowDebugOverlayClearOutput,\n EditorAgentBridgeShadowDebugOverlaySetInput,\n EditorAgentBridgeShadowDebugOverlaySetOutput,\n EditorAgentBridgeShadowDebugVisibilityMeasureInput,\n EditorAgentBridgeShadowDebugVisibilityMeasureOutput,\n EditorAgentBridgeShadowReceiversListInput,\n EditorAgentBridgeShadowReceiversListOutput,\n EditorAgentBridgeShadowResolvePreviewInput,\n EditorAgentBridgeShadowResolvePreviewOutput,\n EditorAgentBridgeShadowStaticBakeInput,\n EditorAgentBridgeShadowStaticBakeOutput,\n EditorAgentBridgeShadowStaticInvalidateInput,\n EditorAgentBridgeShadowStaticInvalidateOutput,\n EditorAgentBridgeTransformMoveInput,\n EditorAgentBridgeTransformMoveOutput,\n EditorAgentBridgeTransformSetInput,\n EditorAgentBridgeTransformSetOutput,\n EditorAgentBridgeViewportCameraGetInput,\n EditorAgentBridgeViewportCameraOrbitInput,\n EditorAgentBridgeViewportCameraOrbitOutput,\n EditorAgentBridgeViewportCameraSetPresetInput,\n EditorAgentBridgeViewportCameraSetPresetOutput,\n EditorAgentBridgeViewportCameraState,\n EditorAgentBridgeViewportFocusObjectInput,\n EditorAgentBridgeViewportFocusObjectOutput,\n EditorAgentBridgeViewportFrameSelectionInput,\n EditorAgentBridgeViewportFrameSelectionOutput,\n EditorAgentBridgeViewportIsolationEnterInput,\n EditorAgentBridgeViewportIsolationEnterOutput,\n EditorAgentBridgeViewportVisibilityClearInput,\n EditorAgentBridgeViewportVisibilityMutationOutput,\n EditorAgentBridgeViewportVisibilitySetInput,\n EditorAgentBridgeViewportVisibilitySnapshotInput,\n EditorAgentBridgeViewportVisibilitySnapshotOutput,\n} from '@fps-games/editor-protocol';\nimport type { EditorAgentBridgeCallContext } from '@fps-games/editor-core';\n\nexport type LocalEditorAgentBridgeSourceResult<TOutput> =\n | TOutput\n | EditorAgentBridgeCallResult<TOutput>\n | Promise<TOutput | EditorAgentBridgeCallResult<TOutput>>;\n\nexport interface LocalEditorAgentBridgeHostSource {\n isBusy(): boolean;\n getMode(input: EditorAgentBridgeHostModeGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeHostModeGetOutput>;\n enterEditor(input: EditorAgentBridgeHostEditorEnterInput, context?: EditorAgentBridgeCallContext): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeHostEditorEnterOutput>;\n saveAndRun(input: EditorAgentBridgeHostEditorSaveAndRunInput, context?: EditorAgentBridgeCallContext): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeHostEditorSaveAndRunOutput>;\n discardAndRun(input: EditorAgentBridgeHostEditorDiscardAndRunInput, context?: EditorAgentBridgeCallContext): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeHostEditorDiscardAndRunOutput>;\n waitReady(input: EditorAgentBridgeHostEditorWaitReadyInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeHostEditorWaitReadyOutput>;\n}\n\nexport interface LocalEditorAgentBridgeAssetSource {\n listAssets(input: EditorAgentBridgeAssetLibraryListInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeAssetLibraryListOutput>;\n getAssetInfo(input: EditorAgentBridgeAssetInfoGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeAssetInfoGetOutput>;\n getAssetAnalysis(input: EditorAgentBridgeAssetAnalysisGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeAssetAnalysisGetOutput>;\n}\n\nexport interface LocalEditorAgentBridgeHierarchySource {\n getScope(input: EditorAgentBridgeHierarchyScopeGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeHierarchyScopeGetOutput>;\n listOperations(input: EditorAgentBridgeHierarchyOperationsListInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeHierarchyOperationsListOutput>;\n executeOperation(input: EditorAgentBridgeHierarchyOperationExecuteInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeHierarchyOperationExecuteOutput>;\n}\n\nexport interface LocalEditorAgentBridgeObjectSource {\n listObjects(input: EditorAgentBridgeSceneObjectsListInput): EditorAgentBridgeSceneObject[];\n resolveObject(input: EditorAgentBridgeObjectResolveInput): EditorAgentBridgeObjectResolveOutput;\n getObject(objectId: string): EditorAgentBridgeSceneObject | null;\n createPrimitive(input: EditorAgentBridgeObjectCreatePrimitiveInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeObjectCreatePrimitiveOutput>;\n createFromAsset(input: EditorAgentBridgeObjectCreateFromAssetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeObjectCreateFromAssetOutput>;\n deleteObjects(input: EditorAgentBridgeObjectDeleteInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeObjectDeleteOutput>;\n}\n\nexport interface LocalEditorAgentBridgePrefabSource {\n resolvePrefab(input: EditorAgentBridgePrefabResolveInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabResolveOutput>;\n openStage(input: EditorAgentBridgePrefabStageOpenInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabStageOpenOutput>;\n exitStage(input: EditorAgentBridgePrefabStageExitInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabStageExitOutput>;\n saveStage(input: EditorAgentBridgePrefabStageActionInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabStageActionOutput>;\n discardStage(input: EditorAgentBridgePrefabStageActionInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabStageActionOutput>;\n renameAsset(input: EditorAgentBridgePrefabAssetRenameInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabAssetRenameOutput>;\n getScene(input: EditorAgentBridgePrefabSceneGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabSceneGetOutput>;\n selectNode(input: EditorAgentBridgePrefabNodeSelectInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeSelectOutput>;\n createNodeFromAsset(input: EditorAgentBridgePrefabNodeCreateFromAssetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeMutationOutput>;\n createGroupNode(input: EditorAgentBridgePrefabNodeCreateGroupInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeMutationOutput>;\n createMarkerNode(input: EditorAgentBridgePrefabNodeCreateMarkerInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeMutationOutput>;\n createPrimitiveNode(input: EditorAgentBridgePrefabNodeCreatePrimitiveInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeMutationOutput>;\n setNodeTransform(input: EditorAgentBridgePrefabNodeSetTransformInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeMutationOutput>;\n setNodeMarker(input: EditorAgentBridgePrefabNodeSetMarkerInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeMutationOutput>;\n renameNode(input: EditorAgentBridgePrefabNodeRenameInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeRenameOutput>;\n reparentNode(input: EditorAgentBridgePrefabNodeReparentInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeMutationOutput>;\n deleteNode(input: EditorAgentBridgePrefabNodeDeleteInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabNodeMutationOutput>;\n getSourceStructure(input: EditorAgentBridgePrefabSourceStructureGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabSourceStructureGetOutput>;\n listMaterialSlots(input: EditorAgentBridgePrefabMaterialSlotsListInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgePrefabMaterialSlotsListOutput>;\n}\n\nexport interface LocalEditorAgentBridgeSelectionSource {\n getSelection(): EditorAgentBridgeSelectionState;\n setSelection(input: EditorAgentBridgeSelectionSetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeSelectionSetOutput>;\n}\n\nexport interface LocalEditorAgentBridgeShadowSource {\n getPolicy(input: EditorAgentBridgeShadowPolicyGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowPolicyGetOutput>;\n setPolicy(input: EditorAgentBridgeShadowPolicySetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowPolicySetOutput>;\n getShadowMapExperimentConfig(input: EditorAgentBridgeShadowMapExperimentConfigGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowMapExperimentConfigGetOutput>;\n getShadowMapExperimentPolicy(input: EditorAgentBridgeShadowMapExperimentPolicyGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowMapExperimentPolicyOutput>;\n setShadowMapExperimentPolicy(input: EditorAgentBridgeShadowMapExperimentPolicySetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowMapExperimentPolicySetOutput>;\n previewShadowMapExperimentPlan(input: EditorAgentBridgeShadowMapExperimentPlanPreviewInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowMapExperimentPlanPreviewOutput>;\n snapshotShadowMapExperimentRuntime(input: EditorAgentBridgeShadowMapExperimentRuntimeSnapshotInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowMapExperimentRuntimeSnapshotOutput>;\n listReceivers(input: EditorAgentBridgeShadowReceiversListInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowReceiversListOutput>;\n resolvePreview(input: EditorAgentBridgeShadowResolvePreviewInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowResolvePreviewOutput>;\n inspectDebug(input: EditorAgentBridgeShadowDebugInspectInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowDebugInspectOutput>;\n enterDebugContext(input: EditorAgentBridgeShadowDebugContextEnterInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowDebugContextEnterOutput>;\n clearDebugContext(input: EditorAgentBridgeShadowDebugContextClearInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowDebugContextClearOutput>;\n setDebugOverlay(input: EditorAgentBridgeShadowDebugOverlaySetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowDebugOverlaySetOutput>;\n clearDebugOverlay(input: EditorAgentBridgeShadowDebugOverlayClearInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowDebugOverlayClearOutput>;\n measureVisibility(input: EditorAgentBridgeShadowDebugVisibilityMeasureInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowDebugVisibilityMeasureOutput>;\n bakeStatic(input: EditorAgentBridgeShadowStaticBakeInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowStaticBakeOutput>;\n invalidateStatic(input: EditorAgentBridgeShadowStaticInvalidateInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeShadowStaticInvalidateOutput>;\n}\n\nexport interface LocalEditorAgentBridgeTransformSource {\n move(input: EditorAgentBridgeTransformMoveInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeTransformMoveOutput>;\n set(input: EditorAgentBridgeTransformSetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeTransformSetOutput>;\n}\n\nexport interface LocalEditorAgentBridgeViewportSource {\n focusObject(input: EditorAgentBridgeViewportFocusObjectInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeViewportFocusObjectOutput>;\n frameSelection(input: EditorAgentBridgeViewportFrameSelectionInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeViewportFrameSelectionOutput>;\n getCamera(input: EditorAgentBridgeViewportCameraGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeViewportCameraState>;\n setCameraPreset(input: EditorAgentBridgeViewportCameraSetPresetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeViewportCameraSetPresetOutput>;\n orbitCamera(input: EditorAgentBridgeViewportCameraOrbitInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeViewportCameraOrbitOutput>;\n getVisibilitySnapshot(input: EditorAgentBridgeViewportVisibilitySnapshotInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeViewportVisibilitySnapshotOutput>;\n setVisibility(input: EditorAgentBridgeViewportVisibilitySetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeViewportVisibilityMutationOutput>;\n clearVisibility(input: EditorAgentBridgeViewportVisibilityClearInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeViewportVisibilityMutationOutput>;\n enterIsolation(input: EditorAgentBridgeViewportIsolationEnterInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeViewportIsolationEnterOutput>;\n}\n\nexport interface LocalEditorAgentBridgeStateSource {\n getSnapshot(input: EditorAgentBridgeEditorSnapshotGetInput): EditorAgentBridgeEditorSnapshot;\n getState(input: EditorAgentBridgeEditorStateGetInput): EditorAgentBridgeEditorState;\n listDiagnostics(input: EditorAgentBridgeEditorDiagnosticsListInput): EditorAgentBridgeEditorDiagnosticsListOutput;\n}\n\nexport interface LocalEditorAgentBridgeUiSource {\n getRegions(input: EditorAgentBridgeUiRegionsGetInput): LocalEditorAgentBridgeSourceResult<EditorAgentBridgeUiRegionsGetOutput>;\n}\n\nexport interface LocalEditorAgentBridgeCapabilitySources {\n assets: LocalEditorAgentBridgeAssetSource;\n host: LocalEditorAgentBridgeHostSource;\n hierarchy: LocalEditorAgentBridgeHierarchySource;\n objects: LocalEditorAgentBridgeObjectSource;\n prefabs: LocalEditorAgentBridgePrefabSource;\n selection: LocalEditorAgentBridgeSelectionSource;\n shadows: LocalEditorAgentBridgeShadowSource;\n transform: LocalEditorAgentBridgeTransformSource;\n viewport: LocalEditorAgentBridgeViewportSource;\n state: LocalEditorAgentBridgeStateSource;\n ui: LocalEditorAgentBridgeUiSource;\n}\n"]}
@@ -1,4 +0,0 @@
1
- import type { FpsEditorPluginHost } from '@fps-games/editor-core/plugin-host';
2
- import type { EditorAgentBridge } from '@fps-games/editor-core';
3
- export declare function registerEditorPluginAgentCapabilities(bridge: EditorAgentBridge, pluginHost: FpsEditorPluginHost | undefined): () => void;
4
- //# sourceMappingURL=editor-plugin-agent-capabilities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-plugin-agent-capabilities.d.ts","sourceRoot":"","sources":["../src/editor-plugin-agent-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,mBAAmB,GAAG,SAAS,GAC1C,MAAM,IAAI,CAuCZ"}
@@ -1,64 +0,0 @@
1
- export function registerEditorPluginAgentCapabilities(bridge, pluginHost) {
2
- if (!pluginHost)
3
- return () => undefined;
4
- if (pluginHost.state !== 'started' || pluginHost.transitioning) {
5
- throw new Error('Plugin Agent capabilities require an idle started Editor Plugin Host.');
6
- }
7
- const commands = pluginHost.listCommands().filter(command => command.agent);
8
- const existingIds = new Set(bridge.listCapabilities().map(capability => capability.id));
9
- const unregister = [];
10
- try {
11
- for (const command of commands) {
12
- const manifest = command.agent;
13
- if (existingIds.has(manifest.id)) {
14
- throw new Error(`Plugin Agent capability conflicts with an existing capability: ${manifest.id}`);
15
- }
16
- existingIds.add(manifest.id);
17
- unregister.push(bridge.registerCapability({
18
- manifest,
19
- available: () => (pluginHost.state === 'started' && !pluginHost.transitioning
20
- ? true
21
- : `Editor Plugin Host is not available: ${pluginHost.state}`),
22
- handler: input => pluginHost.executeCommand(command.command, input),
23
- }));
24
- }
25
- }
26
- catch (error) {
27
- try {
28
- disposePluginAgentCapabilities(unregister);
29
- }
30
- catch (cleanupError) {
31
- throw combinePluginAgentCapabilityErrors(error, cleanupError, 'registration');
32
- }
33
- throw error;
34
- }
35
- let active = true;
36
- return () => {
37
- if (!active)
38
- return;
39
- disposePluginAgentCapabilities(unregister);
40
- active = false;
41
- };
42
- }
43
- function combinePluginAgentCapabilityErrors(cause, cleanupError, operation) {
44
- const error = new Error(`Plugin Agent capability ${operation} failed and cleanup reported errors.`);
45
- error.errors = [cause, cleanupError];
46
- return error;
47
- }
48
- function disposePluginAgentCapabilities(unregister) {
49
- const errors = [];
50
- for (const dispose of [...unregister].reverse()) {
51
- try {
52
- dispose();
53
- }
54
- catch (error) {
55
- errors.push(error);
56
- }
57
- }
58
- if (errors.length > 0) {
59
- const error = new Error('Plugin Agent capability cleanup failed.');
60
- error.errors = errors;
61
- throw error;
62
- }
63
- }
64
- //# sourceMappingURL=editor-plugin-agent-capabilities.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"editor-plugin-agent-capabilities.js","sourceRoot":"","sources":["../src/editor-plugin-agent-capabilities.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,qCAAqC,CACnD,MAAyB,EACzB,UAA2C;IAE3C,IAAI,CAAC,UAAU;QAAE,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC;IACxC,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS,IAAI,UAAU,CAAC,aAAa,EAAE,CAAC;QAC/D,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IACD,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5E,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IACxF,MAAM,UAAU,GAAsB,EAAE,CAAC;IACzC,IAAI,CAAC;QACH,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAM,CAAC;YAChC,IAAI,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;gBACjC,MAAM,IAAI,KAAK,CAAC,kEAAkE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;YACnG,CAAC;YACD,WAAW,CAAC,GAAG,CAAC,QAAQ,C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O,EAAE,EAAE,CAAC;QAChD,IAAI,CAAC;YAAC,OAAO,EAAE,CAAC;QAAC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAAC,CAAC;IAC1D,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,yCAAyC,CAAkC,CAAC;QACpG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["import type { FpsEditorPluginHost } from '@fps-games/editor-core/plugin-host';\nimport type { EditorAgentBridge } from '@fps-games/editor-core';\n\nexport function registerEditorPluginAgentCapabilities(\n bridge: EditorAgentBridge,\n pluginHost: FpsEditorPluginHost | undefined,\n): () => void {\n if (!pluginHost) return () => undefined;\n if (pluginHost.state !== 'started' || pluginHost.transitioning) {\n throw new Error('Plugin Agent capabilities require an idle started Editor Plugin Host.');\n }\n const commands = pluginHost.listCommands().filter(command => command.agent);\n const existingIds = new Set(bridge.listCapabilities().map(capability => capability.id));\n const unregister: Array<() => void> = [];\n try {\n for (const command of commands) {\n const manifest = command.agent!;\n if (existingIds.has(manifest.id)) {\n throw new Error(`Plugin Agent capability conflicts with an existing capability: ${manifest.id}`);\n }\n existingIds.add(manifest.id);\n unregister.push(bridge.registerCapability({\n manifest,\n available: () => (\n pluginHost.state === 'started' && !pluginHost.transitioning\n ? true\n : `Editor Plugin Host is not available: ${pluginHost.state}`\n ),\n handler: input => pluginHost.executeCommand(command.command, input),\n }));\n }\n } catch (error) {\n try {\n disposePluginAgentCapabilities(unregister);\n } catch (cleanupError) {\n throw combinePluginAgentCapabilityErrors(error, cleanupError, 'registration');\n }\n throw error;\n }\n let active = true;\n return () => {\n if (!active) return;\n disposePluginAgentCapabilities(unregister);\n active = false;\n };\n}\n\nfunction combinePluginAgentCapabilityErrors(\n cause: unknown,\n cleanupError: unknown,\n operation: string,\n): Error {\n const error = new Error(`Plugin Agent capability ${operation} failed and cleanup reported errors.`) as Error & {\n errors: unknown[];\n };\n error.errors = [cause, cleanupError];\n return error;\n}\n\nfunction disposePluginAgentCapabilities(unregister: readonly (() => void)[]): void {\n const errors: unknown[] = [];\n for (const dispose of [...unregister].reverse()) {\n try { dispose(); } catch (error) { errors.push(error); }\n }\n if (errors.length > 0) {\n const error = new Error('Plugin Agent capability cleanup failed.') as Error & { errors: unknown[] };\n error.errors = errors;\n throw error;\n }\n}\n"]}
@@ -1,43 +0,0 @@
1
- import type { EditorAgentContext, EditorAgentContextSemantics, EditorAgentSource, SpatialMarkerGraph, SpatialMarkerTypeDefinition, SpatialRelationTypeDefinition } from '@fps-games/editor-protocol';
2
- import type { LocalEditorHarnessHierarchyOperationRegistration } from './local-editor-harness.js';
3
- export interface LocalEditorAgentSceneObjectSemanticsInput<TDocument> {
4
- document: TDocument;
5
- objectId: string;
6
- targetIds: string[];
7
- activeId: string | null;
8
- contextNodeId: string | null;
9
- hierarchyItem: unknown | null;
10
- hierarchyItems: readonly unknown[];
11
- projectionNode: unknown | null | undefined;
12
- }
13
- export interface LocalEditorAgentSceneObjectSetSemanticsInput<TDocument> {
14
- document: TDocument;
15
- objectIds: string[];
16
- activeId: string | null;
17
- hierarchyItems: readonly unknown[];
18
- projectionNodes: Record<string, unknown | null | undefined>;
19
- }
20
- export interface LocalEditorAgentRegionBindingSemanticsInput<TDocument> extends LocalEditorAgentSceneObjectSetSemanticsInput<TDocument> {
21
- relationshipType: 'selection-region';
22
- }
23
- export interface LocalEditorAgentHierarchyActionOptions<TDocument> {
24
- sendContext(context: EditorAgentContext): void | boolean | Promise<unknown>;
25
- getProjectionNode(document: TDocument, id: string): unknown | null | undefined;
26
- getMarkerGraph?(document: TDocument): SpatialMarkerGraph | null;
27
- getMarkerTypeCatalog?(document: TDocument): SpatialMarkerTypeDefinition[];
28
- getRelationTypeCatalog?(document: TDocument): SpatialRelationTypeDefinition[];
29
- describeSceneObject?(input: LocalEditorAgentSceneObjectSemanticsInput<TDocument>): EditorAgentContextSemantics | null | undefined;
30
- describeSceneObjectSet?(input: LocalEditorAgentSceneObjectSetSemanticsInput<TDocument>): EditorAgentContextSemantics | null | undefined;
31
- describeRegionBinding?(input: LocalEditorAgentRegionBindingSemanticsInput<TDocument>): EditorAgentContextSemantics | null | undefined;
32
- source?: Partial<EditorAgentSource>;
33
- reportError?(error: unknown): void;
34
- }
35
- export declare const LOCAL_EDITOR_AGENT_ACTION_ID: {
36
- readonly SEND_OBJECT: "agent.send-object";
37
- readonly SEND_SELECTION: "agent.send-selection";
38
- readonly SEND_SELECTION_AS_REGION: "agent.send-selection-as-region";
39
- readonly SEND_MARKER: "agent.send-marker";
40
- readonly SEND_MARKER_GRAPH: "agent.send-marker-graph";
41
- };
42
- export declare function createLocalEditorAgentHierarchyOperations<TDocument>(options: LocalEditorAgentHierarchyActionOptions<TDocument>): LocalEditorHarnessHierarchyOperationRegistration<TDocument>[];
43
- //# sourceMappingURL=local-editor-agent-actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-editor-agent-actions.d.ts","sourceRoot":"","sources":["../src/local-editor-agent-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,4BAA4B,CAAC;AAiBpC,OAAO,KAAK,EAEV,gDAAgD,EACjD,MAAM,2BAA2B,CAAC;AAQnC,MAAM,WAAW,yCAAyC,CAAC,SAAS;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,OAAO,GAAG,I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AK,EAAE,2CAA2C,CAAC,SAAS,CAAC,GAAG,2BAA2B,GAAG,IAAI,GAAG,SAAS,CAAC;IACtI,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACpC,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,4BAA4B;;;;;;CAM/B,CAAC;AAEX,wBAAgB,yCAAyC,CAAC,SAAS,EACjE,OAAO,EAAE,sCAAsC,CAAC,SAAS,CAAC,GACzD,gDAAgD,CAAC,SAAS,CAAC,EAAE,CAyK/D"}
@@ -1,321 +0,0 @@
1
- import { createLocalEditorRegionBindingAgentContext, createLocalEditorSceneObjectAgentContext, createLocalEditorSceneObjectSetAgentContext, createLocalEditorSpatialMarkerAgentContext, createLocalEditorSpatialRelationGraphAgentContext, } from './local-editor-agent-context.js';
2
- import { findSpatialMarkerById, getSpatialMarkerDirectRelations, getSpatialRelationRelatedIds, isMarkerGraphHierarchyRootRowId, readMarkerGraphHierarchyMarkerIdForGraph, readSpatialMarkerIdFromHierarchySelection, resolveSpatialMarkerGraph, } from './local-editor-marker-graph.js';
3
- import { createAgentBridgeSafeSceneReadModel, getAgentBridgeSafeHierarchyTargetByRowId, } from './agent-bridge/shared.js';
4
- export const LOCAL_EDITOR_AGENT_ACTION_ID = {
5
- SEND_OBJECT: 'agent.send-object',
6
- SEND_SELECTION: 'agent.send-selection',
7
- SEND_SELECTION_AS_REGION: 'agent.send-selection-as-region',
8
- SEND_MARKER: 'agent.send-marker',
9
- SEND_MARKER_GRAPH: 'agent.send-marker-graph',
10
- };
11
- export function createLocalEditorAgentHierarchyOperations(options) {
12
- return [
13
- {
14
- id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_OBJECT,
15
- label: 'Send to Agent',
16
- menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },
17
- visible: context => context.contextNodeId !== null && resolvePrimarySceneObjectId(context, options) !== null,
18
- disabled(context) {
19
- return resolvePrimarySceneObjectId(context, options) ? false : 'Select a scene object to send to Agent.';
20
- },
21
- run(context) {
22
- const objectId = resolvePrimarySceneObjectId(context, options);
23
- if (!objectId)
24
- return false;
25
- const hierarchyItems = getSafeSceneAgentHierarchyItems(context);
26
- const projectionNode = options.getProjectionNode(context.document, objectId);
27
- const agentContext = createLocalEditorSceneObjectAgentContext({
28
- document: context.document,
29
- objectId,
30
- hierarchyItems,
31
- projectionNode,
32
- source: options.source,
33
- semantics: options.describeSceneObject?.({
34
- document: context.document,
35
- objectId,
36
- targetIds: resolveSceneObjectSelectionIds(context, options),
37
- activeId: context.activeId ? resolveSafeSceneObjectId(context, context.activeId) : null,
38
- contextNodeId: context.contextNodeId ? resolveSafeSceneObjectId(context, context.contextNodeId) : null,
39
- hierarchyItem: hierarchyItems.find(item => item.id === objectId) ?? null,
40
- hierarchyItems,
41
- projectionNode,
42
- }),
43
- });
44
- return sendAgentContext(agentContext, options);
45
- },
46
- },
47
- {
48
- id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_SELECTION,
49
- label: 'Send Selection to Agent',
50
- menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },
51
- visible: context => resolveSceneObjectSelectionIds(context, options).length > 1,
52
- disabled(context) {
53
- return resolveSceneObjectSelectionIds(context, options).length > 1
54
- ? false
55
- : 'Select multiple scene objects to send selection to Agent.';
56
- },
57
- run(context) {
58
- const targetIds = resolveSceneObjectSelectionIds(context, options);
59
- if (targetIds.length === 0)
60
- return false;
61
- const hierarchyItems = getSafeSceneAgentHierarchyItems(context);
62
- const projectionNodes = createProjectionNodeMap(context.document, targetIds, options);
63
- const agentContext = createLocalEditorSceneObjectSetAgentContext({
64
- document: context.document,
65
- objectIds: targetIds,
66
- hierarchyItems,
67
- projectionNodes,
68
- source: options.source,
69
- semantics: options.describeSceneObjectSet?.({
70
- document: context.document,
71
- objectIds: targetIds,
72
- activeId: context.activeId ? resolveSafeSceneObjectId(context, context.activeId) : null,
73
- hierarchyItems,
74
- projectionNodes,
75
- }),
76
- });
77
- return sendAgentContext(agentContext, options);
78
- },
79
- },
80
- {
81
- id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_SELECTION_AS_REGION,
82
- label: 'Send Selection as Region',
83
- menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },
84
- visible: context => resolveSceneObjectSelectionIds(context, options).length > 1,
85
- disabled(context) {
86
- return resolveSceneObjectSelectionIds(context, options).length > 1
87
- ? false
88
- : 'Select multiple scene objects to describe a region to Agent.';
89
- },
90
- run(context) {
91
- const targetIds = resolveSceneObjectSelectionIds(context, options);
92
- if (targetIds.length < 2)
93
- return false;
94
- const hierarchyItems = getSafeSceneAgentHierarchyItems(context);
95
- const projectionNodes = createProjectionNodeMap(context.document, targetIds, options);
96
- const agentContext = createLocalEditorRegionBindingAgentContext({
97
- document: context.document,
98
- objectIds: targetIds,
99
- hierarchyItems,
100
- projectionNodes,
101
- source: options.source,
102
- semantics: options.describeRegionBinding?.({
103
- document: context.document,
104
- objectIds: targetIds,
105
- activeId: context.activeId ? resolveSafeSceneObjectId(context, context.activeId) : null,
106
- hierarchyItems,
107
- projectionNodes,
108
- relationshipType: 'selection-region',
109
- }),
110
- });
111
- return sendAgentContext(agentContext, options);
112
- },
113
- },
114
- {
115
- id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_MARKER,
116
- label: 'Send Marker to Agent',
117
- menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },
118
- visible: context => resolveContextMarkerId(context, options) !== null,
119
- disabled(context) {
120
- const resolved = resolveContextMarker(context, options);
121
- if (!resolved.marker)
122
- return 'Select a spatial marker to send to Agent.';
123
- if (resolved.marker.spatial.status !== 'resolved') {
124
- return resolved.marker.spatial.unresolvedReason
125
- ? `Marker spatial facts unresolved: ${resolved.marker.spatial.unresolvedReason}`
126
- : 'Marker spatial facts are unresolved.';
127
- }
128
- return false;
129
- },
130
- run(context) {
131
- const resolved = resolveContextMarker(context, options);
132
- if (!resolved.graph || !resolved.marker)
133
- return false;
134
- const directRelations = getSpatialMarkerDirectRelations(resolved.graph, resolved.marker.id);
135
- const relatedIds = getSpatialRelationRelatedIds(directRelations, resolved.marker.id);
136
- const agentContext = createLocalEditorSpatialMarkerAgentContext({
137
- document: context.document,
138
- marker: resolved.marker,
139
- graph: resolved.graph,
140
- directRelations,
141
- relatedMarkerIds: relatedIds.markerIds,
142
- relatedObjectIds: relatedIds.objectIds,
143
- hierarchyItems: getSafeSceneAgentHierarchyItems(context),
144
- markerTypes: options.getMarkerTypeCatalog?.(context.document) ?? [],
145
- relationTypes: options.getRelationTypeCatalog?.(context.document) ?? [],
146
- source: options.source,
147
- });
148
- return sendAgentContext(agentContext, options);
149
- },
150
- },
151
- {
152
- id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_MARKER_GRAPH,
153
- label: 'Send Marker Graph to Agent',
154
- menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },
155
- visible: context => isMarkerGraphContext(context, options),
156
- disabled(context) {
157
- const graph = resolveContextMarkerGraph(context, options);
158
- if (!graph || graph.markers.length === 0)
159
- return 'No marker graph is available.';
160
- const unresolved = graph.markers.filter(marker => marker.spatial.status !== 'resolved');
161
- if (unresolved.length > 0) {
162
- const labels = unresolved.map(marker => marker.label || marker.id).join(', ');
163
- return `Marker graph has unresolved spatial facts: ${labels}.`;
164
- }
165
- return false;
166
- },
167
- run(context) {
168
- const graph = resolveContextMarkerGraph(context, options);
169
- if (!graph)
170
- return false;
171
- const focusMarkerIds = collectContextMarkerIds(context, options);
172
- const focusObjectIds = collectRelatedObjectIdsForMarkers(graph, focusMarkerIds);
173
- const agentContext = createLocalEditorSpatialRelationGraphAgentContext({
174
- document: context.document,
175
- graph,
176
- focusMarkerIds,
177
- focusObjectIds,
178
- hierarchyItems: getSafeSceneAgentHierarchyItems(context),
179
- markerTypes: options.getMarkerTypeCatalog?.(context.document) ?? [],
180
- relationTypes: options.getRelationTypeCatalog?.(context.document) ?? [],
181
- source: options.source,
182
- });
183
- return sendAgentContext(agentContext, options);
184
- },
185
- },
186
- ];
187
- }
188
- function getSafeSceneAgentHierarchyItems(context) {
189
- return isSceneHierarchyOperationContext(context)
190
- ? [...createAgentBridgeSafeSceneReadModel(createHierarchyActionReadModel(context)).hierarchy]
191
- : [];
192
- }
193
- function resolvePrimarySceneObjectId(context, options) {
194
- if (!isSceneHierarchyOperationContext(context))
195
- return null;
196
- const rowId = context.contextNodeId ?? context.activeId ?? context.targetIds[0] ?? null;
197
- if (!rowId)
198
- return null;
199
- const id = resolveSafeSceneObjectId(context, rowId);
200
- if (!id)
201
- return null;
202
- const graph = options.getMarkerGraph?.(context.document) ?? null;
203
- if (!graph)
204
- return id;
205
- const hierarchyItems = getSafeSceneAgentHierarchyItems(context);
206
- if (isMarkerGraphHierarchyRootRowId(graph, rowId, hierarchyItems))
207
- return null;
208
- return readSpatialMarkerIdFromHierarchySelection(graph, id, hierarchyItems) ? null : id;
209
- }
210
- function resolveSceneObjectSelectionIds(context, options) {
211
- if (!isSceneHierarchyOperationContext(context))
212
- return [];
213
- const ids = normalizeActionIds(context.targetIds.map(rowId => resolveSafeSceneObjectId(context, rowId)));
214
- const graph = options.getMarkerGraph?.(context.document) ?? null;
215
- if (!graph)
216
- return ids;
217
- const hierarchyItems = getSafeSceneAgentHierarchyItems(context);
218
- return ids.filter(id => (!isMarkerGraphHierarchyRootRowId(graph, id, hierarchyItems)
219
- && !readSpatialMarkerIdFromHierarchySelection(graph, id, hierarchyItems)));
220
- }
221
- function createProjectionNodeMap(document, objectIds, options) {
222
- const nodes = {};
223
- for (const objectId of objectIds)
224
- nodes[objectId] = options.getProjectionNode(document, objectId);
225
- return nodes;
226
- }
227
- function sendAgentContext(context, options) {
228
- if (!context)
229
- return false;
230
- try {
231
- void Promise.resolve(options.sendContext(context)).catch(error => options.reportError?.(error));
232
- return true;
233
- }
234
- catch (error) {
235
- options.reportError?.(error);
236
- return false;
237
- }
238
- }
239
- function resolveContextMarkerId(context, options) {
240
- if (!isSceneHierarchyOperationContext(context))
241
- return null;
242
- const graph = options.getMarkerGraph?.(context.document) ?? null;
243
- if (!graph)
244
- return null;
245
- const hierarchyItems = getSafeSceneAgentHierarchyItems(context);
246
- const candidateIds = [
247
- context.contextNodeId,
248
- context.activeId,
249
- ...context.targetIds,
250
- ];
251
- for (const candidateRowId of candidateIds) {
252
- const candidateId = candidateRowId ? resolveSafeSceneObjectId(context, candidateRowId) ?? candidateRowId : null;
253
- const markerId = readSpatialMarkerIdFromHierarchySelection(graph, candidateId, hierarchyItems);
254
- if (markerId)
255
- return markerId;
256
- }
257
- return null;
258
- }
259
- function resolveContextMarker(context, options) {
260
- const graph = resolveContextMarkerGraph(context, options);
261
- const markerId = resolveContextMarkerId(context, options);
262
- return {
263
- graph,
264
- marker: graph && markerId ? findSpatialMarkerById(graph, markerId) : null,
265
- };
266
- }
267
- function resolveContextMarkerGraph(context, options) {
268
- return resolveSpatialMarkerGraph(options.getMarkerGraph?.(context.document) ?? null);
269
- }
270
- function isMarkerGraphContext(context, options) {
271
- if (!isSceneHierarchyOperationContext(context))
272
- return false;
273
- const graph = options.getMarkerGraph?.(context.document) ?? null;
274
- if (!graph || graph.markers.length === 0)
275
- return false;
276
- const hierarchyItems = getSafeSceneAgentHierarchyItems(context);
277
- if (isMarkerGraphHierarchyRootRowId(graph, context.contextNodeId, hierarchyItems))
278
- return true;
279
- return collectContextMarkerIds(context, options).length > 0;
280
- }
281
- function collectContextMarkerIds(context, options) {
282
- const graph = options.getMarkerGraph?.(context.document) ?? null;
283
- if (!graph)
284
- return [];
285
- const hierarchyItems = getSafeSceneAgentHierarchyItems(context);
286
- const markerIds = new Set();
287
- for (const candidateRowId of [context.contextNodeId, context.activeId, ...context.targetIds]) {
288
- const candidateId = candidateRowId ? resolveSafeSceneObjectId(context, candidateRowId) ?? candidateRowId : null;
289
- const markerId = readSpatialMarkerIdFromHierarchySelection(graph, candidateId, hierarchyItems);
290
- if (markerId)
291
- markerIds.add(markerId);
292
- }
293
- return [...markerIds];
294
- }
295
- function collectRelatedObjectIdsForMarkers(graph, markerIds) {
296
- const objectIds = new Set();
297
- for (const markerId of markerIds) {
298
- const relatedIds = getSpatialRelationRelatedIds(getSpatialMarkerDirectRelations(graph, markerId), markerId);
299
- for (const objectId of relatedIds.objectIds)
300
- objectIds.add(objectId);
301
- }
302
- return [...objectIds];
303
- }
304
- function normalizeActionIds(values) {
305
- return [...new Set(values.map(value => value?.trim()).filter((value) => !!value))];
306
- }
307
- function createHierarchyActionReadModel(context) {
308
- return {
309
- authorityToken: 0,
310
- snapshot: context.scope,
311
- resolveTarget: rowId => context.resolveTarget(rowId),
312
- };
313
- }
314
- function resolveSafeSceneObjectId(context, rowId) {
315
- return getAgentBridgeSafeHierarchyTargetByRowId(createHierarchyActionReadModel(context), 'scene-object', rowId)?.authoredId ?? null;
316
- }
317
- function isSceneHierarchyOperationContext(context) {
318
- const scopeType = context.scope?.scopeType;
319
- return scopeType === undefined || scopeType === 'scene';
320
- }
321
- //# sourceMappingURL=local-editor-agent-actions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-editor-agent-actions.js","sourceRoot":"","sources":["../src/local-editor-agent-actions.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,0CAA0C,EAC1C,wCAAwC,EACxC,2CAA2C,EAC3C,0CAA0C,EAC1C,iDAAiD,GAClD,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,4BAA4B,EAC5B,+BAA+B,EAC/B,wCAAwC,EACxC,yCAAyC,EACzC,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AAMxC,OAAO,EACL,mCAAmC,EACnC,wCAAwC,GAEzC,MAAM,0BAA0B,CAAC;AAuClC,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,WAAW,EAAE,mBAAmB;IAChC,cAAc,EAAE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AAC,SAAS;YAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,CAAC;AAED,SAAS,kBAAkB,CAAC,MAA8C;IACxE,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtG,CAAC;AAED,SAAS,8BAA8B,CACrC,OAA+D;IAE/D,OAAO;QACL,cAAc,EAAE,CAAC;QACjB,QAAQ,EAAE,OAAO,CAAC,KAAK;QACvB,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC;KACrD,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAC/B,OAA+D,EAC/D,KAAa;IAEb,OAAO,wCAAwC,CAC7C,8BAA8B,CAAC,OAAO,CAAC,EACvC,cAAc,EACd,KAAK,CACN,EAAE,UAAU,IAAI,IAAI,CAAC;AACxB,CAAC;AAED,SAAS,gCAAgC,CACvC,OAA+D;IAE/D,MAAM,SAAS,GAAI,OAA8C,CAAC,KAAK,EAAE,SAAS,CAAC;IACnF,OAAO,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,OAAO,CAAC;AAC1D,CAAC","sourcesContent":["import type {\n EditorAgentContext,\n EditorAgentContextSemantics,\n EditorAgentSource,\n SpatialMarkerGraph,\n SpatialMarkerTypeDefinition,\n SpatialRelationTypeDefinition,\n} from '@fps-games/editor-protocol';\nimport {\n createLocalEditorRegionBindingAgentContext,\n createLocalEditorSceneObjectAgentContext,\n createLocalEditorSceneObjectSetAgentContext,\n createLocalEditorSpatialMarkerAgentContext,\n createLocalEditorSpatialRelationGraphAgentContext,\n} from './local-editor-agent-context.js';\nimport {\n findSpatialMarkerById,\n getSpatialMarkerDirectRelations,\n getSpatialRelationRelatedIds,\n isMarkerGraphHierarchyRootRowId,\n readMarkerGraphHierarchyMarkerIdForGraph,\n readSpatialMarkerIdFromHierarchySelection,\n resolveSpatialMarkerGraph,\n} from './local-editor-marker-graph.js';\nimport type {\n LocalEditorHarnessHierarchyOperationContext,\n LocalEditorHarnessHierarchyOperationRegistration,\n} from './local-editor-harness.js';\nimport type { SceneGraphTreeItem } from '@fps-games/editor-core';\nimport {\n createAgentBridgeSafeSceneReadModel,\n getAgentBridgeSafeHierarchyTargetByRowId,\n type LocalEditorAgentBridgeHierarchyReadModel,\n} from './agent-bridge/shared.js';\n\nexport interface LocalEditorAgentSceneObjectSemanticsInput<TDocument> {\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 LocalEditorAgentSceneObjectSetSemanticsInput<TDocument> {\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 LocalEditorAgentRegionBindingSemanticsInput<TDocument>\n extends LocalEditorAgentSceneObjectSetSemanticsInput<TDocument> {\n relationshipType: 'selection-region';\n}\n\nexport interface LocalEditorAgentHierarchyActionOptions<TDocument> {\n sendContext(context: EditorAgentContext): void | boolean | Promise<unknown>;\n getProjectionNode(document: TDocument, id: string): unknown | null | undefined;\n getMarkerGraph?(document: TDocument): SpatialMarkerGraph | null;\n getMarkerTypeCatalog?(document: TDocument): SpatialMarkerTypeDefinition[];\n getRelationTypeCatalog?(document: TDocument): SpatialRelationTypeDefinition[];\n describeSceneObject?(input: LocalEditorAgentSceneObjectSemanticsInput<TDocument>): EditorAgentContextSemantics | null | undefined;\n describeSceneObjectSet?(input: LocalEditorAgentSceneObjectSetSemanticsInput<TDocument>): EditorAgentContextSemantics | null | undefined;\n describeRegionBinding?(input: LocalEditorAgentRegionBindingSemanticsInput<TDocument>): EditorAgentContextSemantics | null | undefined;\n source?: Partial<EditorAgentSource>;\n reportError?(error: unknown): void;\n}\n\nexport const LOCAL_EDITOR_AGENT_ACTION_ID = {\n SEND_OBJECT: 'agent.send-object',\n SEND_SELECTION: 'agent.send-selection',\n SEND_SELECTION_AS_REGION: 'agent.send-selection-as-region',\n SEND_MARKER: 'agent.send-marker',\n SEND_MARKER_GRAPH: 'agent.send-marker-graph',\n} as const;\n\nexport function createLocalEditorAgentHierarchyOperations<TDocument>(\n options: LocalEditorAgentHierarchyActionOptions<TDocument>,\n): LocalEditorHarnessHierarchyOperationRegistration<TDocument>[] {\n return [\n {\n id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_OBJECT,\n label: 'Send to Agent',\n menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },\n visible: context => context.contextNodeId !== null && resolvePrimarySceneObjectId(context, options) !== null,\n disabled(context) {\n return resolvePrimarySceneObjectId(context, options) ? false : 'Select a scene object to send to Agent.';\n },\n run(context) {\n const objectId = resolvePrimarySceneObjectId(context, options);\n if (!objectId) return false;\n const hierarchyItems = getSafeSceneAgentHierarchyItems(context);\n const projectionNode = options.getProjectionNode(context.document, objectId);\n const agentContext = createLocalEditorSceneObjectAgentContext({\n document: context.document,\n objectId,\n hierarchyItems,\n projectionNode,\n source: options.source,\n semantics: options.describeSceneObject?.({\n document: context.document,\n objectId,\n targetIds: resolveSceneObjectSelectionIds(context, options),\n activeId: context.activeId ? resolveSafeSceneObjectId(context, context.activeId) : null,\n contextNodeId: context.contextNodeId ? resolveSafeSceneObjectId(context, context.contextNodeId) : null,\n hierarchyItem: hierarchyItems.find(item => item.id === objectId) ?? null,\n hierarchyItems,\n projectionNode,\n }),\n });\n return sendAgentContext(agentContext, options);\n },\n },\n {\n id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_SELECTION,\n label: 'Send Selection to Agent',\n menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },\n visible: context => resolveSceneObjectSelectionIds(context, options).length > 1,\n disabled(context) {\n return resolveSceneObjectSelectionIds(context, options).length > 1\n ? false\n : 'Select multiple scene objects to send selection to Agent.';\n },\n run(context) {\n const targetIds = resolveSceneObjectSelectionIds(context, options);\n if (targetIds.length === 0) return false;\n const hierarchyItems = getSafeSceneAgentHierarchyItems(context);\n const projectionNodes = createProjectionNodeMap(context.document, targetIds, options);\n const agentContext = createLocalEditorSceneObjectSetAgentContext({\n document: context.document,\n objectIds: targetIds,\n hierarchyItems,\n projectionNodes,\n source: options.source,\n semantics: options.describeSceneObjectSet?.({\n document: context.document,\n objectIds: targetIds,\n activeId: context.activeId ? resolveSafeSceneObjectId(context, context.activeId) : null,\n hierarchyItems,\n projectionNodes,\n }),\n });\n return sendAgentContext(agentContext, options);\n },\n },\n {\n id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_SELECTION_AS_REGION,\n label: 'Send Selection as Region',\n menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },\n visible: context => resolveSceneObjectSelectionIds(context, options).length > 1,\n disabled(context) {\n return resolveSceneObjectSelectionIds(context, options).length > 1\n ? false\n : 'Select multiple scene objects to describe a region to Agent.';\n },\n run(context) {\n const targetIds = resolveSceneObjectSelectionIds(context, options);\n if (targetIds.length < 2) return false;\n const hierarchyItems = getSafeSceneAgentHierarchyItems(context);\n const projectionNodes = createProjectionNodeMap(context.document, targetIds, options);\n const agentContext = createLocalEditorRegionBindingAgentContext({\n document: context.document,\n objectIds: targetIds,\n hierarchyItems,\n projectionNodes,\n source: options.source,\n semantics: options.describeRegionBinding?.({\n document: context.document,\n objectIds: targetIds,\n activeId: context.activeId ? resolveSafeSceneObjectId(context, context.activeId) : null,\n hierarchyItems,\n projectionNodes,\n relationshipType: 'selection-region',\n }),\n });\n return sendAgentContext(agentContext, options);\n },\n },\n {\n id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_MARKER,\n label: 'Send Marker to Agent',\n menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },\n visible: context => resolveContextMarkerId(context, options) !== null,\n disabled(context) {\n const resolved = resolveContextMarker(context, options);\n if (!resolved.marker) return 'Select a spatial marker to send to Agent.';\n if (resolved.marker.spatial.status !== 'resolved') {\n return resolved.marker.spatial.unresolvedReason\n ? `Marker spatial facts unresolved: ${resolved.marker.spatial.unresolvedReason}`\n : 'Marker spatial facts are unresolved.';\n }\n return false;\n },\n run(context) {\n const resolved = resolveContextMarker(context, options);\n if (!resolved.graph || !resolved.marker) return false;\n const directRelations = getSpatialMarkerDirectRelations(resolved.graph, resolved.marker.id);\n const relatedIds = getSpatialRelationRelatedIds(directRelations, resolved.marker.id);\n const agentContext = createLocalEditorSpatialMarkerAgentContext({\n document: context.document,\n marker: resolved.marker,\n graph: resolved.graph,\n directRelations,\n relatedMarkerIds: relatedIds.markerIds,\n relatedObjectIds: relatedIds.objectIds,\n hierarchyItems: getSafeSceneAgentHierarchyItems(context),\n markerTypes: options.getMarkerTypeCatalog?.(context.document) ?? [],\n relationTypes: options.getRelationTypeCatalog?.(context.document) ?? [],\n source: options.source,\n });\n return sendAgentContext(agentContext, options);\n },\n },\n {\n id: LOCAL_EDITOR_AGENT_ACTION_ID.SEND_MARKER_GRAPH,\n label: 'Send Marker Graph to Agent',\n menu: { path: [{ id: 'agent', label: 'Agent', order: 80 }], group: 'agent', order: 0 },\n visible: context => isMarkerGraphContext(context, options),\n disabled(context) {\n const graph = resolveContextMarkerGraph(context, options);\n if (!graph || graph.markers.length === 0) return 'No marker graph is available.';\n const unresolved = graph.markers.filter(marker => marker.spatial.status !== 'resolved');\n if (unresolved.length > 0) {\n const labels = unresolved.map(marker => marker.label || marker.id).join(', ');\n return `Marker graph has unresolved spatial facts: ${labels}.`;\n }\n return false;\n },\n run(context) {\n const graph = resolveContextMarkerGraph(context, options);\n if (!graph) return false;\n const focusMarkerIds = collectContextMarkerIds(context, options);\n const focusObjectIds = collectRelatedObjectIdsForMarkers(graph, focusMarkerIds);\n const agentContext = createLocalEditorSpatialRelationGraphAgentContext({\n document: context.document,\n graph,\n focusMarkerIds,\n focusObjectIds,\n hierarchyItems: getSafeSceneAgentHierarchyItems(context),\n markerTypes: options.getMarkerTypeCatalog?.(context.document) ?? [],\n relationTypes: options.getRelationTypeCatalog?.(context.document) ?? [],\n source: options.source,\n });\n return sendAgentContext(agentContext, options);\n },\n },\n ];\n}\n\nfunction getSafeSceneAgentHierarchyItems<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n): SceneGraphTreeItem[] {\n return isSceneHierarchyOperationContext(context)\n ? [...createAgentBridgeSafeSceneReadModel(createHierarchyActionReadModel(context)).hierarchy]\n : [];\n}\n\nfunction resolvePrimarySceneObjectId<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n options: Pick<LocalEditorAgentHierarchyActionOptions<TDocument>, 'getMarkerGraph'>,\n): string | null {\n if (!isSceneHierarchyOperationContext(context)) return null;\n const rowId = context.contextNodeId ?? context.activeId ?? context.targetIds[0] ?? null;\n if (!rowId) return null;\n const id = resolveSafeSceneObjectId(context, rowId);\n if (!id) return null;\n const graph = options.getMarkerGraph?.(context.document) ?? null;\n if (!graph) return id;\n const hierarchyItems = getSafeSceneAgentHierarchyItems(context);\n if (isMarkerGraphHierarchyRootRowId(graph, rowId, hierarchyItems)) return null;\n return readSpatialMarkerIdFromHierarchySelection(graph, id, hierarchyItems) ? null : id;\n}\n\nfunction resolveSceneObjectSelectionIds<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n options: Pick<LocalEditorAgentHierarchyActionOptions<TDocument>, 'getMarkerGraph'>,\n): string[] {\n if (!isSceneHierarchyOperationContext(context)) return [];\n const ids = normalizeActionIds(context.targetIds.map(rowId => resolveSafeSceneObjectId(context, rowId)));\n const graph = options.getMarkerGraph?.(context.document) ?? null;\n if (!graph) return ids;\n const hierarchyItems = getSafeSceneAgentHierarchyItems(context);\n return ids.filter(id => (\n !isMarkerGraphHierarchyRootRowId(graph, id, hierarchyItems)\n && !readSpatialMarkerIdFromHierarchySelection(graph, id, hierarchyItems)\n ));\n}\n\nfunction createProjectionNodeMap<TDocument>(\n document: TDocument,\n objectIds: readonly string[],\n options: Pick<LocalEditorAgentHierarchyActionOptions<TDocument>, 'getProjectionNode'>,\n): Record<string, unknown | null | undefined> {\n const nodes: Record<string, unknown | null | undefined> = {};\n for (const objectId of objectIds) nodes[objectId] = options.getProjectionNode(document, objectId);\n return nodes;\n}\n\nfunction sendAgentContext<TDocument>(\n context: EditorAgentContext | null,\n options: Pick<LocalEditorAgentHierarchyActionOptions<TDocument>, 'sendContext' | 'reportError'>,\n): boolean {\n if (!context) return false;\n try {\n void Promise.resolve(options.sendContext(context)).catch(error => options.reportError?.(error));\n return true;\n } catch (error) {\n options.reportError?.(error);\n return false;\n }\n}\n\nfunction resolveContextMarkerId<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n options: Pick<LocalEditorAgentHierarchyActionOptions<TDocument>, 'getMarkerGraph'>,\n): string | null {\n if (!isSceneHierarchyOperationContext(context)) return null;\n const graph = options.getMarkerGraph?.(context.document) ?? null;\n if (!graph) return null;\n const hierarchyItems = getSafeSceneAgentHierarchyItems(context);\n const candidateIds = [\n context.contextNodeId,\n context.activeId,\n ...context.targetIds,\n ];\n for (const candidateRowId of candidateIds) {\n const candidateId = candidateRowId ? resolveSafeSceneObjectId(context, candidateRowId) ?? candidateRowId : null;\n const markerId = readSpatialMarkerIdFromHierarchySelection(graph, candidateId, hierarchyItems);\n if (markerId) return markerId;\n }\n return null;\n}\n\nfunction resolveContextMarker<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n options: Pick<LocalEditorAgentHierarchyActionOptions<TDocument>, 'getMarkerGraph'>,\n) {\n const graph = resolveContextMarkerGraph(context, options);\n const markerId = resolveContextMarkerId(context, options);\n return {\n graph,\n marker: graph && markerId ? findSpatialMarkerById(graph, markerId) : null,\n };\n}\n\nfunction resolveContextMarkerGraph<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n options: Pick<LocalEditorAgentHierarchyActionOptions<TDocument>, 'getMarkerGraph'>,\n) {\n return resolveSpatialMarkerGraph(options.getMarkerGraph?.(context.document) ?? null);\n}\n\nfunction isMarkerGraphContext<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n options: Pick<LocalEditorAgentHierarchyActionOptions<TDocument>, 'getMarkerGraph'>,\n): boolean {\n if (!isSceneHierarchyOperationContext(context)) return false;\n const graph = options.getMarkerGraph?.(context.document) ?? null;\n if (!graph || graph.markers.length === 0) return false;\n const hierarchyItems = getSafeSceneAgentHierarchyItems(context);\n if (isMarkerGraphHierarchyRootRowId(graph, context.contextNodeId, hierarchyItems)) return true;\n return collectContextMarkerIds(context, options).length > 0;\n}\n\nfunction collectContextMarkerIds<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n options: Pick<LocalEditorAgentHierarchyActionOptions<TDocument>, 'getMarkerGraph'>,\n): string[] {\n const graph = options.getMarkerGraph?.(context.document) ?? null;\n if (!graph) return [];\n const hierarchyItems = getSafeSceneAgentHierarchyItems(context);\n const markerIds = new Set<string>();\n for (const candidateRowId of [context.contextNodeId, context.activeId, ...context.targetIds]) {\n const candidateId = candidateRowId ? resolveSafeSceneObjectId(context, candidateRowId) ?? candidateRowId : null;\n const markerId = readSpatialMarkerIdFromHierarchySelection(graph, candidateId, hierarchyItems);\n if (markerId) markerIds.add(markerId);\n }\n return [...markerIds];\n}\n\nfunction collectRelatedObjectIdsForMarkers(\n graph: { relations: SpatialMarkerGraph['relations'] },\n markerIds: readonly string[],\n): string[] {\n const objectIds = new Set<string>();\n for (const markerId of markerIds) {\n const relatedIds = getSpatialRelationRelatedIds(getSpatialMarkerDirectRelations(graph, markerId), markerId);\n for (const objectId of relatedIds.objectIds) objectIds.add(objectId);\n }\n return [...objectIds];\n}\n\nfunction normalizeActionIds(values: readonly (string | null | undefined)[]): string[] {\n return [...new Set(values.map(value => value?.trim()).filter((value): value is string => !!value))];\n}\n\nfunction createHierarchyActionReadModel<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n): LocalEditorAgentBridgeHierarchyReadModel {\n return {\n authorityToken: 0,\n snapshot: context.scope,\n resolveTarget: rowId => context.resolveTarget(rowId),\n };\n}\n\nfunction resolveSafeSceneObjectId<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n rowId: string,\n): string | null {\n return getAgentBridgeSafeHierarchyTargetByRowId(\n createHierarchyActionReadModel(context),\n 'scene-object',\n rowId,\n )?.authoredId ?? null;\n}\n\nfunction isSceneHierarchyOperationContext<TDocument>(\n context: LocalEditorHarnessHierarchyOperationContext<TDocument>,\n): boolean {\n const scopeType = (context as { scope?: { scopeType?: string } }).scope?.scopeType;\n return scopeType === undefined || scopeType === 'scene';\n}\n"]}