@salsita-ai/sdk 0.50.0-develop.aec0f535bf → 0.50.0-develop.af031dec0f

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 (520) hide show
  1. package/README.md +10 -3
  2. package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
  3. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  4. package/dist/application-spec/errors/diagnostic-messages.d.ts +7 -1
  5. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  6. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  7. package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
  8. package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +1 -1
  9. package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -2
  10. package/dist/application-spec/generate-application/code/templates/configurator-config.js +4 -2
  11. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +0 -1
  12. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +6 -8
  13. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -0
  14. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +8 -6
  15. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +1 -4
  16. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +2 -2
  17. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +1 -1
  18. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +26 -29
  19. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +0 -3
  20. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  21. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +11 -12
  22. package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
  23. package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +3 -2
  24. package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +13 -11
  25. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
  26. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
  27. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
  28. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.d.ts +3 -0
  29. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +16 -0
  30. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
  31. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +47 -0
  32. package/dist/application-spec/generate-application/code/templates/skills/features/{webhooks/assistant-setup.d.ts → assistant/session-setup.d.ts} +1 -1
  33. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +15 -0
  34. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +3 -3
  35. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +1 -1
  36. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +1 -1
  37. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +1 -1
  38. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +4 -2
  39. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +3 -3
  40. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +1 -1
  41. package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
  42. package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +2 -2
  43. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +1 -1
  44. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +1 -1
  45. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -1
  46. package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +1 -1
  47. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
  48. package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
  49. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
  50. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +23 -0
  51. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +29 -1
  52. package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -2
  53. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +29 -15
  54. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +17 -14
  55. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +2 -2
  56. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +3 -3
  57. package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -0
  58. package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
  59. package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
  60. package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +2 -2
  61. package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
  62. package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -1
  63. package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +1 -1
  64. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
  65. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
  66. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +2 -0
  67. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -1
  68. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.d.ts +2 -0
  69. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.js +28 -0
  70. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +7 -6
  71. package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +2 -1
  72. package/dist/application-spec/generate-application/code/templates/webhook-index.js +2 -2
  73. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +1 -0
  74. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
  75. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  76. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  77. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +42 -5
  78. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  79. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +4 -3
  80. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  81. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  82. package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
  83. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
  84. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +2 -2
  85. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  86. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +5 -6
  87. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.js +1 -1
  88. package/dist/application-spec/webhook-boundary.js +1 -1
  89. package/dist/client/cli-client/cli-api-client.d.ts +17 -0
  90. package/dist/client/cli-client/cli-api-client.js +1 -0
  91. package/dist/client/cli-client/index.d.ts +2 -0
  92. package/dist/client/cli-client/index.js +1 -0
  93. package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
  94. package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
  95. package/dist/client/index.d.ts +1 -0
  96. package/dist/client/index.js +1 -1
  97. package/dist/client/phoenix-api.d.ts +5290 -1754
  98. package/dist/configurator/ConfiguratorApp.js +1 -1
  99. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +5 -4
  100. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
  101. package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
  102. package/dist/configurator/application-runtime/extensions/selectors.d.ts +4 -2
  103. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  104. package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.d.ts +14 -0
  105. package/dist/configurator/application-runtime/extensions/systems/action-system/action-factory.d.ts +13 -0
  106. package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.d.ts +55 -0
  107. package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.js +1 -0
  108. package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +44 -0
  109. package/dist/configurator/application-runtime/extensions/systems/action-system/action.js +1 -0
  110. package/dist/configurator/application-runtime/extensions/systems/action-system/index.d.ts +6 -0
  111. package/dist/configurator/application-runtime/extensions/systems/action-system/index.js +1 -0
  112. package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.d.ts +4 -3
  113. package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.js +2 -2
  114. package/dist/{domain/spec/modules → configurator/application-runtime/extensions/systems/action-system}/resolve-action-modules.d.ts +2 -2
  115. package/dist/configurator/application-runtime/extensions/systems/action-system/resolve-action-modules.js +1 -0
  116. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +7 -4
  117. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +91 -33
  118. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  119. package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +12 -17
  120. package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -1
  121. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +43 -37
  122. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  123. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +2 -0
  124. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -0
  125. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +29 -0
  126. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +2 -0
  127. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.d.ts +10 -0
  128. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.js +1 -0
  129. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
  130. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
  131. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +14 -4
  132. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  133. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +8 -1
  134. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  135. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +38 -9
  136. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  137. package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.d.ts +16 -0
  138. package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.js +1 -0
  139. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +26 -0
  140. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -0
  141. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +25 -8
  142. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -1
  143. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +5 -4
  144. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  145. package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
  146. package/dist/configurator/common/configurator-interface.d.ts +9 -7
  147. package/dist/configurator/common/configurator-interface.js +1 -1
  148. package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
  149. package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
  150. package/dist/configurator/ui/assistant/AssistantChips.d.ts +5 -5
  151. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  152. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +4 -3
  153. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
  154. package/dist/configurator/ui/assistant/AssistantPanel.d.ts +6 -4
  155. package/dist/configurator/ui/assistant/AssistantThread.d.ts +10 -2
  156. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  157. package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -1
  158. package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -1
  159. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +6 -5
  160. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
  161. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +6 -5
  162. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
  163. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
  164. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
  165. package/dist/configurator/ui/assistant/annotation/index.d.ts +0 -1
  166. package/dist/configurator/ui/assistant/annotation/index.js +1 -1
  167. package/dist/configurator/ui/assistant/assistant-failure.d.ts +6 -4
  168. package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
  169. package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -1
  170. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +1 -1
  171. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -1
  172. package/dist/configurator/ui/assistant/drawing/index.d.ts +1 -1
  173. package/dist/configurator/ui/assistant/drawing/index.js +1 -1
  174. package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -1
  175. package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +6 -12
  176. package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -1
  177. package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +1 -1
  178. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  179. package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
  180. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +6 -5
  181. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  182. package/dist/configurator/ui/assistant/form/read-form-tile.d.ts +8 -0
  183. package/dist/configurator/ui/assistant/form/read-form-tile.js +1 -0
  184. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +6 -3
  185. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -1
  186. package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +1 -1
  187. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -1
  188. package/dist/configurator/ui/assistant/form/split-form-rows.d.ts +7 -0
  189. package/dist/configurator/ui/assistant/form/split-form-rows.js +1 -0
  190. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +7 -4
  191. package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -1
  192. package/dist/configurator/ui/assistant/form-elements/FormTile.d.ts +72 -0
  193. package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -0
  194. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +27 -0
  195. package/dist/configurator/ui/assistant/form-elements/index.d.ts +2 -3
  196. package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
  197. package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -1
  198. package/dist/configurator/ui/assistant/index.d.ts +2 -2
  199. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +4 -1
  200. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -1
  201. package/dist/configurator/ui/assistant/reference-link/index.d.ts +2 -1
  202. package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
  203. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
  204. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +2 -6
  205. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
  206. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +5 -6
  207. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
  208. package/dist/configurator/ui/assistant/thread-items.d.ts +2 -2
  209. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  210. package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +2 -1
  211. package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
  212. package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +15 -1
  213. package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -1
  214. package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +3 -3
  215. package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -1
  216. package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts} +1 -1
  217. package/dist/configurator/ui/assistant/use-on-unmount.js +1 -0
  218. package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
  219. package/dist/configurator/ui/configurator-layout/index.js +1 -1
  220. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  221. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
  222. package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
  223. package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
  224. package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
  225. package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
  226. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
  227. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
  228. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
  229. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
  230. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  231. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
  232. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  233. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
  234. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
  235. package/dist/configurator/ui/index.d.ts +1 -1
  236. package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
  237. package/dist/docs/index.json +22 -2
  238. package/dist/docs/layouts/nested-view-controls.mdx +223 -0
  239. package/dist/docs/layouts/presets/custom.mdx +1 -0
  240. package/dist/docs/layouts/preview/always.mdx +22 -0
  241. package/dist/docs/layouts/view-controls.mdx +2 -0
  242. package/dist/docs/other-features/domain-actions.mdx +10 -11
  243. package/dist/docs/other-features/violation-messages.mdx +3 -1
  244. package/dist/docs/phoenix/application-states.mdx +1 -1
  245. package/dist/docs/phoenix/configurator-interface.mdx +81 -35
  246. package/dist/docs/phoenix/data-sources.mdx +1 -1
  247. package/dist/docs/phoenix/getting-started.mdx +1 -1
  248. package/dist/docs/phoenix/layout-slots.mdx +1 -1
  249. package/dist/docs/phoenix/migrations.mdx +1 -1
  250. package/dist/docs/phoenix/phoenix-cli.mdx +89 -53
  251. package/dist/docs/phoenix/project-structure.mdx +7 -7
  252. package/dist/docs/phoenix/sdk-builder-workflow.mdx +56 -27
  253. package/dist/docs/phoenix/sessions-and-access.mdx +9 -6
  254. package/dist/docs/phoenix/theming.mdx +5 -9
  255. package/dist/docs/phoenix/webhooks.mdx +55 -3
  256. package/dist/docs/ux-guidelines/choosing-navigation.mdx +2 -0
  257. package/dist/docs/ux-guidelines/designing-the-configuration-journey.mdx +43 -0
  258. package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
  259. package/dist/docs/ux-guidelines/overview.mdx +11 -9
  260. package/dist/domain/application/application-config.d.ts +5 -0
  261. package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
  262. package/dist/domain/application/assistant/assistant-exposure.js +1 -0
  263. package/dist/domain/application/assistant/assistant-selection.d.ts +30 -0
  264. package/dist/domain/application/assistant/assistant-selection.js +1 -0
  265. package/dist/domain/application/assistant/build-assistant-lenses.js +4 -4
  266. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +2 -2
  267. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  268. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +14 -2
  269. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  270. package/dist/domain/application/assistant/index.d.ts +5 -1
  271. package/dist/domain/application/assistant/index.js +1 -1
  272. package/dist/domain/application/assistant/prepare-assistant-navigation-updates.d.ts +16 -0
  273. package/dist/domain/application/assistant/prepare-assistant-navigation-updates.js +1 -0
  274. package/dist/domain/application/assistant/read-assistant-navigation.d.ts +40 -0
  275. package/dist/domain/application/assistant/read-assistant-navigation.js +1 -0
  276. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  277. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +17 -1
  278. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  279. package/dist/domain/application/assistant-field-options.d.ts +2 -0
  280. package/dist/domain/application/assistant-field-options.js +1 -1
  281. package/dist/domain/application/assistant-mutations.d.ts +17 -11
  282. package/dist/domain/application/assistant-mutations.js +1 -1
  283. package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
  284. package/dist/domain/application/assistant-recipe-groups.js +1 -1
  285. package/dist/domain/application/configurator-builder.d.ts +8 -0
  286. package/dist/domain/application/configurator-builder.js +1 -1
  287. package/dist/domain/available-system-components/available-system-components.d.ts +1 -1
  288. package/dist/domain/available-system-components/available-system-components.js +1 -1
  289. package/dist/domain/core/action/action.d.ts +0 -49
  290. package/dist/domain/core/component/system-component-filter.d.ts +1 -0
  291. package/dist/domain/core/component/system-component-filter.js +1 -1
  292. package/dist/domain/core/component/view-state-component.d.ts +4 -3
  293. package/dist/domain/core/component/view-state-component.js +1 -1
  294. package/dist/domain/core/domain-factory.d.ts +2 -3
  295. package/dist/domain/core/invariant/control-violation-hints.d.ts +37 -0
  296. package/dist/domain/core/invariant/control-violation-hints.js +1 -0
  297. package/dist/domain/core/invariant/index.d.ts +1 -0
  298. package/dist/domain/core/invariant/index.js +1 -1
  299. package/dist/domain/domain-builder/domain-builder.d.ts +1 -6
  300. package/dist/domain/domain-builder/domain-builder.js +1 -1
  301. package/dist/domain/domain-context/domain-context-systems.d.ts +3 -5
  302. package/dist/domain/domain-context/index.d.ts +0 -1
  303. package/dist/domain/domain-context/index.js +1 -1
  304. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
  305. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  306. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  307. package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +1 -1
  308. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  309. package/dist/domain/domain-runtime/domain-context/index.d.ts +0 -1
  310. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +5 -6
  311. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  312. package/dist/domain/domain-runtime/domain-runtime.d.ts +13 -19
  313. package/dist/domain/domain-runtime/domain-runtime.js +1 -1
  314. package/dist/domain/domain-runtime/index.d.ts +0 -1
  315. package/dist/domain/domain-runtime/index.js +1 -1
  316. package/dist/domain/domain-runtime/spec/index.d.ts +0 -1
  317. package/dist/domain/domain-runtime/spec/index.js +1 -1
  318. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  319. package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
  320. package/dist/domain/domain-runtime/spec/types.d.ts +12 -10
  321. package/dist/domain/extensions/assistant/assistant-greeting.d.ts +30 -0
  322. package/dist/domain/extensions/assistant/assistant-greeting.js +1 -0
  323. package/dist/domain/extensions/assistant/index.d.ts +1 -0
  324. package/dist/domain/extensions/assistant/index.js +1 -0
  325. package/dist/domain/extensions/index.d.ts +1 -1
  326. package/dist/domain/extensions/index.js +1 -1
  327. package/dist/domain/index.d.ts +1 -1
  328. package/dist/domain/index.js +1 -1
  329. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +6 -8
  330. package/dist/domain/spec/modules/index.d.ts +0 -1
  331. package/dist/domain/spec/modules/index.js +1 -1
  332. package/dist/domain/spec/phx/phx-domain.d.ts +0 -1
  333. package/dist/domain/spec/phx/phx-domain.js +1 -1
  334. package/dist/domain/spec/runtime/application-spec-slice.d.ts +5 -5
  335. package/dist/domain/spec/runtime/application-spec-slice.js +1 -1
  336. package/dist/domain/spec/runtime/create-application.d.ts +5 -2
  337. package/dist/domain/spec/runtime/create-application.js +1 -1
  338. package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +2 -2
  339. package/dist/domain/spec/sections/app-metadata.d.ts +1 -0
  340. package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +28 -1
  341. package/dist/domain/spec/sections/assistant/assistant-navigation.d.ts +21 -0
  342. package/dist/domain/spec/sections/assistant/assistant-navigation.js +1 -0
  343. package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +30 -2
  344. package/dist/domain/spec/sections/assistant/assistant-select.d.ts +12 -0
  345. package/dist/domain/spec/sections/assistant/assistant-select.js +1 -0
  346. package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +10 -26
  347. package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -1
  348. package/dist/domain/spec/sections/assistant/index.d.ts +3 -1
  349. package/dist/domain/system-components/index.d.ts +1 -0
  350. package/dist/domain/system-components/index.js +1 -1
  351. package/dist/domain/system-components/navigation/index.d.ts +1 -0
  352. package/dist/domain/system-components/navigation/index.js +1 -0
  353. package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
  354. package/dist/domain/system-components/navigation/view-controls.js +1 -0
  355. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  356. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  357. package/dist/editor/domain-editors/use-implementation-files.d.ts +4 -3
  358. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  359. package/dist/extras/cognito/CognitoSignInPage.d.ts +2 -0
  360. package/dist/extras/cognito/CognitoSignInPage.js +1 -0
  361. package/dist/extras/cognito/index.d.ts +1 -0
  362. package/dist/extras/cognito/index.js +1 -0
  363. package/dist/i18n/locales/cs/messages.js +1 -1
  364. package/dist/i18n/locales/da/messages.js +1 -1
  365. package/dist/i18n/locales/de/messages.js +1 -1
  366. package/dist/i18n/locales/de-AT/messages.js +1 -1
  367. package/dist/i18n/locales/en/messages.js +1 -1
  368. package/dist/i18n/locales/en-AU/messages.js +1 -1
  369. package/dist/i18n/locales/en-GB/messages.js +1 -1
  370. package/dist/i18n/locales/es/messages.js +1 -1
  371. package/dist/i18n/locales/fr/messages.js +1 -1
  372. package/dist/i18n/locales/hu/messages.js +1 -1
  373. package/dist/i18n/locales/it/messages.js +1 -1
  374. package/dist/i18n/locales/nl/messages.js +1 -1
  375. package/dist/i18n/locales/pl/messages.js +1 -1
  376. package/dist/i18n/locales/pt/messages.js +1 -1
  377. package/dist/i18n/locales/ro/messages.js +1 -1
  378. package/dist/i18n/locales/sk/messages.js +1 -1
  379. package/dist/i18n/locales/tr/messages.js +1 -1
  380. package/dist/legacy/deployment-cli/commands/create-environment.js +1 -1
  381. package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
  382. package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
  383. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +24 -2
  384. package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
  385. package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
  386. package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
  387. package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
  388. package/dist/legacy/webhook-cli/lib/webhook-boundary.js +1 -1
  389. package/dist/phoenix/application-spec/index.d.ts +1 -1
  390. package/dist/phoenix/application-spec/index.js +1 -1
  391. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +1 -0
  392. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  393. package/dist/phoenix/cli.js +1 -1
  394. package/dist/phoenix/commands/account/index.d.ts +1 -0
  395. package/dist/phoenix/commands/account/index.js +1 -0
  396. package/dist/phoenix/commands/account/whoami.d.ts +10 -0
  397. package/dist/phoenix/commands/account/whoami.js +4 -0
  398. package/dist/phoenix/commands/cleanup-environment.js +1 -1
  399. package/dist/phoenix/commands/deploy.d.ts +7 -2
  400. package/dist/phoenix/commands/deploy.js +8 -2
  401. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  402. package/dist/phoenix/commands/feedback.d.ts +2 -2
  403. package/dist/phoenix/commands/feedback.js +1 -1
  404. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  405. package/dist/phoenix/commands/index.d.ts +1 -0
  406. package/dist/phoenix/commands/index.js +1 -1
  407. package/dist/phoenix/commands/init-starter-spec.js +3 -4
  408. package/dist/phoenix/commands/init.d.ts +2 -2
  409. package/dist/phoenix/commands/init.js +1 -1
  410. package/dist/phoenix/commands/login.d.ts +6 -3
  411. package/dist/phoenix/commands/login.js +3 -3
  412. package/dist/phoenix/commands/logout.js +1 -1
  413. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  414. package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
  415. package/dist/phoenix/services/cli-credentials.d.ts +26 -7
  416. package/dist/phoenix/services/cli-credentials.js +2 -2
  417. package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
  418. package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
  419. package/dist/phoenix/services/cli-server/index.d.ts +2 -0
  420. package/dist/phoenix/services/cli-server/index.js +1 -0
  421. package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +19 -0
  422. package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
  423. package/dist/phoenix/services/development-credential.js +1 -1
  424. package/dist/phoenix/services/index.d.ts +4 -2
  425. package/dist/phoenix/services/index.js +1 -1
  426. package/dist/phoenix/services/phoenix-regions.d.ts +6 -1
  427. package/dist/phoenix/services/phoenix-regions.js +1 -1
  428. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  429. package/dist/phoenix/services/session/phoenix-application.js +1 -1
  430. package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
  431. package/dist/phoenix/services/signed-in-development-environment.js +1 -1
  432. package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
  433. package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
  434. package/dist/phoenix/services/spec-project/index.d.ts +3 -0
  435. package/dist/phoenix/services/spec-project/index.js +1 -0
  436. package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
  437. package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
  438. package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
  439. package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
  440. package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
  441. package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
  442. package/dist/phoenix/services/telemetry/telemetry-event.js +1 -1
  443. package/dist/phoenix/services/telemetry/telemetry-state.d.ts +1 -1
  444. package/dist/phoenix/services/telemetry/telemetry-state.js +1 -1
  445. package/dist/phoenix/services/variant-file-session.js +1 -1
  446. package/dist/phoenix/services/webhook-service/transport.js +1 -1
  447. package/dist/react-sdk/application-runtime/common-services/index.d.ts +1 -0
  448. package/dist/react-sdk/application-runtime/common-services/index.js +1 -1
  449. package/dist/react-sdk/application-runtime/common-services/selectors.d.ts +2 -0
  450. package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
  451. package/dist/react-sdk/application-runtime/common-services/webmcp/index.d.ts +3 -0
  452. package/dist/react-sdk/application-runtime/common-services/webmcp/index.js +1 -0
  453. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.d.ts +35 -0
  454. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.js +1 -0
  455. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.d.ts +44 -0
  456. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.js +1 -0
  457. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.d.ts +24 -0
  458. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.js +1 -0
  459. package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.d.ts +7 -1
  460. package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.js +1 -1
  461. package/dist/react-sdk/application-runtime/domain-application-context/domain-application-systems.d.ts +2 -2
  462. package/dist/react-sdk/application-runtime/domain-application-context/selectors.d.ts +1 -3
  463. package/dist/react-sdk/application-runtime/domain-application-context/selectors.js +1 -1
  464. package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
  465. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  466. package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
  467. package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.d.ts +7 -0
  468. package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.js +1 -0
  469. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  470. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +14 -16
  471. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  472. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +5 -6
  473. package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +1 -1
  474. package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
  475. package/dist/react-sdk/domain-context/index.d.ts +1 -1
  476. package/dist/react-sdk/domain-context/index.js +1 -1
  477. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
  478. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  479. package/dist/react-sdk/preset-selection/PresetSelectionProvider.d.ts +11 -0
  480. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
  481. package/dist/react-sdk/preset-selection/PresetWebMcpTools.d.ts +14 -0
  482. package/dist/react-sdk/preset-selection/PresetWebMcpTools.js +1 -0
  483. package/dist/react-sdk/preset-selection/index.d.ts +2 -1
  484. package/dist/react-sdk/preset-selection/index.js +1 -1
  485. package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.d.ts +31 -0
  486. package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.js +1 -0
  487. package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
  488. package/dist/ui-sdk/components/preview/Preview.js +2 -2
  489. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
  490. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
  491. package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
  492. package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
  493. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
  494. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
  495. package/dist/webhook/builders/auth-handler-builder.d.ts +3 -0
  496. package/dist/webhook/builders/auth-handler-builder.js +1 -1
  497. package/dist/webhook/builders/common.d.ts +3 -1
  498. package/dist/webhook/builders/webhook-builder.d.ts +5 -0
  499. package/dist/webhook/builders/webhook-builder.js +1 -1
  500. package/package.json +9 -4
  501. package/schema/domain-spec.json +440 -53
  502. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +0 -32
  503. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +0 -2
  504. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +0 -25
  505. package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +0 -1
  506. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -68
  507. package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
  508. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -61
  509. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
  510. package/dist/domain/domain-context/action-system/action-system.d.ts +0 -64
  511. package/dist/domain/domain-context/action-system/action-system.js +0 -1
  512. package/dist/domain/domain-context/action-system/index.d.ts +0 -1
  513. package/dist/domain/domain-context/action-system/index.js +0 -1
  514. package/dist/domain/domain-runtime/action-factory.d.ts +0 -11
  515. package/dist/domain/domain-runtime/domain-context/action-context.d.ts +0 -11
  516. package/dist/domain/extensions/view-controls.d.ts +0 -25
  517. package/dist/domain/extensions/view-controls.js +0 -1
  518. package/dist/domain/spec/modules/resolve-action-modules.js +0 -1
  519. /package/dist/{domain/domain-runtime/domain-context → configurator/application-runtime/extensions/systems/action-system}/action-context.js +0 -0
  520. /package/dist/{domain/domain-runtime → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
@@ -1 +1 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import{I18nProvider as o}from"@lingui/react";import{QueryClientProvider as n}from"@tanstack/react-query";import i from"mui-modal-provider";import{useEffect as l}from"react";import{standardWebComponentProperties as a}from"#package/domain";import{getAvailableLocales as t,resolveLocale as c}from"#package/i18n";import{ApplicationType as d,ApplicationTypeProvider as m,ConfiguratorDataProvider as s,ConfiguratorProviderSlot as p,ConfiguratorProviderSlotHost as h,ConfiguratorRoutingProvider as u,ConfiguratorUiElement as f,ConfiguratorUiElementHost as g,ErrorFallbackElement as b,LoaderHost as k,OnApplicationStartProvider as x,OnRoutingReadyProvider as j,OnSessionReadyProvider as v,PlainErrorFallback as y,PresetSelectionProvider as C,SessionServiceProvider as w,useApplicationQueryClient as E,useI18n as F,usePowerRoutingLifecycle as L,useSpecAlwaysExpand as R,useSpecPreview as q,useWebComponentProperty$ as A,useWebComponentPropertySetter as B,useWebComponentPropertyValue as D}from"#package/react-sdk";import{PreviewApplicationProvider as G}from"./configurator-context/index.js";import{LoadingErrorBoundary as H}from"./pages/error-boundaries/LoadingErrorBoundary.js";import{RootPage as I}from"./pages/index.js";let M=e=>r(b,{name:f.GeneralErrorFallback,unregisteredFallback:y,...e});export const ConfiguratorApp=()=>{let b=E(),y=F(),S=q(),T=R(),z=B(a.locale),J=A(a.locale);l(()=>{let r=J.subscribe(r=>{let e=c(r,t(y));y.activate(e)}),e=()=>{z(y.locale)};return y.on("change",e),()=>{r.unsubscribe(),y.removeListener("change",e)}},[J,y,z]);let K=D(a.power);return(L(),"off"===K)?null:r(m,{type:d.Configurator,children:r(n,{client:b,children:r(h,{slot:p.Theme,children:r(k,{children:r(h,{slot:p.Container,children:r(h,{slot:p.Loader,children:r(G,{alwaysExpand:T,preview:S,children:r(o,{i18n:y,children:r(h,{slot:p.MessageHost,children:r(H,{FallbackComponent:M,children:r(h,{slot:p.SceneResources,children:r(x,{children:r(w,{children:r(v,{children:"on"===K&&r(u,{children:r(s,{children:r(C,{children:r(j,{children:e(i,{children:[r(g,{name:f.InvalidDeploymentReload}),r(I,{})]})})})})})})})})})})})})})})})})})})})};
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{I18nProvider as o}from"@lingui/react";import{QueryClientProvider as n}from"@tanstack/react-query";import i from"mui-modal-provider";import{useEffect as l}from"react";import{standardWebComponentProperties as a}from"#package/domain";import{getAvailableLocales as t,resolveLocale as c}from"#package/i18n";import{ApplicationType as d,ApplicationTypeProvider as m,ConfiguratorDataProvider as s,ConfiguratorProviderSlot as p,ConfiguratorProviderSlotHost as h,ConfiguratorRoutingProvider as u,ConfiguratorUiElement as f,ConfiguratorUiElementHost as g,ErrorFallbackElement as b,LoaderHost as k,OnApplicationStartProvider as x,OnRoutingReadyProvider as j,OnSessionReadyProvider as v,PlainErrorFallback as y,PresetSelectionProvider as C,PresetWebMcpTools as w,SessionServiceProvider as E,useApplicationQueryClient as F,useI18n as L,usePowerRoutingLifecycle as R,useSpecAlwaysExpand as q,useSpecPreview as A,useWebComponentProperty$ as B,useWebComponentPropertySetter as D,useWebComponentPropertyValue as G}from"#package/react-sdk";import{PreviewApplicationProvider as H}from"./configurator-context/index.js";import{LoadingErrorBoundary as I}from"./pages/error-boundaries/LoadingErrorBoundary.js";import{RootPage as M}from"./pages/index.js";let S=e=>r(b,{name:f.GeneralErrorFallback,unregisteredFallback:y,...e});export const ConfiguratorApp=()=>{let b=F(),y=L(),T=A(),z=q(),J=D(a.locale),K=B(a.locale);l(()=>{let r=K.subscribe(r=>{let e=c(r,t(y));y.activate(e)}),e=()=>{J(y.locale)};return y.on("change",e),()=>{r.unsubscribe(),y.removeListener("change",e)}},[K,y,J]);let N=G(a.power);return(R(),"off"===N)?null:r(m,{type:d.Configurator,children:r(n,{client:b,children:r(h,{slot:p.Theme,children:r(k,{children:r(h,{slot:p.Container,children:r(h,{slot:p.Loader,children:r(H,{alwaysExpand:z,preview:T,children:r(o,{i18n:y,children:r(h,{slot:p.MessageHost,children:r(I,{FallbackComponent:S,children:r(h,{slot:p.SceneResources,children:r(x,{children:r(E,{children:r(v,{children:"on"===N&&r(u,{children:r(s,{children:r(C,{children:e(j,{children:[r(w,{}),e(i,{children:[r(g,{name:f.InvalidDeploymentReload}),r(M,{})]})]})})})})})})})})})})})})})})})})})})};
@@ -1,5 +1,5 @@
1
- import type { $DomainEntity, DomainEntity } from '#package/domain';
2
- import type { AnimationSystem, AssistantSystem, CameraControlSystem, CameraSystem, CanvasSystem, DragAndDropSystem, ExportSystem, GraphQLSystem, ImageRenderingSystem, LayoutSystem, SketchingSystem } from './systems/index.js';
1
+ import type { $DomainEntity, ActionTypes, DomainEntity } from '#package/domain';
2
+ import type { ActionSystem, AnimationSystem, AssistantSystem, CameraControlSystem, CameraSystem, CanvasSystem, DragAndDropSystem, ExportSystem, GraphQLSystem, ImageRenderingSystem, LayoutSystem, SketchingSystem } from './systems/index.js';
3
3
  /**
4
4
  * The configurator systems of one slot. Every system reaches the domain through runtime selectors,
5
5
  * so its own entity types are all it needs and the erased aliases are what the runtime hands around.
@@ -7,7 +7,8 @@ import type { AnimationSystem, AssistantSystem, CameraControlSystem, CameraSyste
7
7
  * `blenderProjections` is not here: it is a domain projection and lives on the domain slice,
8
8
  * reachable as `domainContextSelectors.getBlenderProjections()`.
9
9
  */
10
- export interface ConfiguratorExtensionSystems<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string> {
10
+ export interface ConfiguratorExtensionSystems<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, ACTION_TYPES extends ActionTypes = ActionTypes> {
11
+ readonly actionSystem: ActionSystem<ENTITIES, ACTION_TYPES>;
11
12
  readonly canvasSystem: CanvasSystem<ENTITIES>;
12
13
  readonly cameraControlSystem: CameraControlSystem;
13
14
  readonly animationSystem: AnimationSystem;
@@ -21,5 +22,5 @@ export interface ConfiguratorExtensionSystems<ENTITIES extends DomainEntity<stri
21
22
  readonly assistantSystem: AssistantSystem;
22
23
  }
23
24
  /** The erased shape the runtime slice constructs; consumers that know their entities narrow on read. */
24
- export type AnyConfiguratorExtensionSystems = ConfiguratorExtensionSystems<any, any, any, any, any, any, any>;
25
+ export type AnyConfiguratorExtensionSystems = ConfiguratorExtensionSystems<any, any, any, any, any, any, any, any>;
25
26
  export declare const isConfiguratorExtensionSystems: (systems: object) => systems is AnyConfiguratorExtensionSystems;
@@ -1 +1 @@
1
- let e=["canvasSystem","cameraControlSystem","animationSystem","dragAndDropSystem","imageRenderingSystem","layoutSystem","sketchingSystem","exportSystem","cameraSystem","graphQLSystem","assistantSystem"];export const isConfiguratorExtensionSystems=t=>e.every(e=>e in t);
1
+ let t=["actionSystem","canvasSystem","cameraControlSystem","animationSystem","dragAndDropSystem","imageRenderingSystem","layoutSystem","sketchingSystem","exportSystem","cameraSystem","graphQLSystem","assistantSystem"];export const isConfiguratorExtensionSystems=e=>t.every(t=>t in e);
@@ -1 +1 @@
1
- import{createApplicationRuntimeExtension as e}from"#package/react-sdk";import{createConfiguratorExtensionSelectors as s}from"./selectors.js";export const createConfiguratorExtensions=o=>[e(s({getState:o.getState,domainContextSelectors:o.selectors.domainContext.configurator,specSelectors:o.selectors.spec,domainServicesSelectors:o.selectors.domainServices,accessSelectors:o.selectors.access,commonServicesSelectors:o.selectors.commonServices}).getSystems())];
1
+ import{createApplicationRuntimeExtension as e}from"#package/react-sdk";import{createConfiguratorExtensionSelectors as o}from"./selectors.js";export const createConfiguratorExtensions=t=>[e(o({getState:t.getState,domainApplicationContextSelectors:t.selectors.domainApplicationContext.configurator,domainContextSelectors:t.selectors.domainContext.configurator,specSelectors:t.selectors.spec,domainServicesSelectors:t.selectors.domainServices,accessSelectors:t.selectors.access,commonServicesSelectors:t.selectors.commonServices}).getSystems())];
@@ -1,8 +1,9 @@
1
1
  import { type AccessInfoSelectors, type DomainContextSelectorState, type DomainContextSelectors, type DomainServicesSelectors, type SpecSelectors } from '#package/domain';
2
- import type { CommonServicesSelectors } from '#package/react-sdk';
2
+ import type { AnyApplicationRuntimeExtension, CommonServicesSelectors, DomainApplicationContextSelectors } from '#package/react-sdk';
3
3
  import type { AnyConfiguratorExtensionSystems } from './configurator-extension-systems.js';
4
- import { AnimationSystem, type AnyCameraSystem, type AnyCanvasSystem, type AnyDragAndDropSystem, type AnyExportSystem, type AnyImageRenderingSystem, type AnyLayoutSystem, type AnySketchingSystem, AssistantSystem, CameraControlSystem, GraphQLSystem } from './systems/index.js';
4
+ import { AnimationSystem, type AnyActionSystem, type AnyCameraSystem, type AnyCanvasSystem, type AnyDragAndDropSystem, type AnyExportSystem, type AnyImageRenderingSystem, type AnyLayoutSystem, type AnySketchingSystem, AssistantSystem, CameraControlSystem, GraphQLSystem } from './systems/index.js';
5
5
  interface Context {
6
+ readonly domainApplicationContextSelectors: DomainApplicationContextSelectors<readonly AnyApplicationRuntimeExtension[]>;
6
7
  readonly getState: () => DomainContextSelectorState;
7
8
  readonly domainContextSelectors: DomainContextSelectors;
8
9
  readonly specSelectors: SpecSelectors;
@@ -23,6 +24,7 @@ interface Context {
23
24
  */
24
25
  export declare const createConfiguratorExtensionSelectors: (context: Context) => {
25
26
  getSystems: () => AnyConfiguratorExtensionSystems;
27
+ getActionSystem: () => AnyActionSystem;
26
28
  getCanvasSystem: () => AnyCanvasSystem;
27
29
  getCameraControlSystem: () => CameraControlSystem;
28
30
  getAnimationSystem: () => AnimationSystem;
@@ -1 +1 @@
1
- import{createSelector as e}from"@salsita-ai/common/utils";import{createSessionAssistant as t,isAssistantSetupHandler as n}from"#package/domain";import{rasterizeImage as s}from"./systems/assistant-system/rasterize-image.js";import{AnimationSystem as a,AssistantSystem as i,CameraControlSystem as r,CameraSystem as o,CanvasSystem as g,DragAndDropSystem as m,ExportSystem as l,GraphQLSystem as d,ImageRenderingSystem as h,LayoutSystem as u,SketchingSystem as c}from"./systems/index.js";export const createConfiguratorExtensionSelectors=S=>{let{getState:w,domainContextSelectors:y,specSelectors:f,domainServicesSelectors:p,accessSelectors:C,commonServicesSelectors:x}=S,A=e.withTypes()([f.selectConfiguratorSpec,y.selectInitializationContext],(e,s)=>t({resolved:e.assistant,handler:e.handlers.find(n),inputs:s&&s.access?{role:s.role,sessionData:s.sessionData,access:s.access}:null})),I={getConfigurationId:()=>C.getConfiguratorConfigurationId(),getAuthorizedClient:()=>x.getConfiguratorAuthorizedClient(),getAssistantSetup:()=>A(w()),domainContextSelectors:y,domainServicesSelectors:p,specSelectors:f},z={getSystems:()=>F,getCanvasSystem:()=>E,getCameraControlSystem:()=>b,getAnimationSystem:()=>D,getDragAndDropSystem:()=>T,getImageRenderingSystem:()=>V,getLayoutSystem:()=>k,getSketchingSystem:()=>H,getExportSystem:()=>M,getCameraSystem:()=>L,getGraphQLSystem:()=>R,getAssistantSystem:()=>j},v={...I,configuratorExtensionSelectors:z},E=new g(I),b=new r({configuratorExtensionSelectors:z}),T=new m(v),D=new a(I),M=new l(v),R=new d({...I,renderScreenshot:async(e,t)=>{let[n]=await z.getImageRenderingSystem().generateImagesFromComponents([e],t,{},{awaitSettledState:!0});if(!n)throw Error("The canvas rendered no image.");return n.blob},uploadScreenshot:e=>I.getAuthorizedClient().uploadAssistantImage(I.getConfigurationId(),e)}),j=new i({...v,freezeView:()=>z.getImageRenderingSystem().captureView(),rasterizeImage:(e,t)=>{let n=z.getCanvasSystem().r3fHandle$.value?.get().gl.domElement,a=globalThis.devicePixelRatio||1;return s(e,t,n&&n.width>0&&n.height>0?{width:n.width,height:n.height}:{width:Math.max(1,Math.round(globalThis.innerWidth*a)),height:Math.max(1,Math.round(globalThis.innerHeight*a))})},createAudio:()=>new Audio}),k=new u(I),H=new c(v),L=new o(v),V=new h(v),F={cameraControlSystem:b,layoutSystem:k,sketchingSystem:H,dragAndDropSystem:T,canvasSystem:E,cameraSystem:L,exportSystem:M,imageRenderingSystem:V,animationSystem:D,graphQLSystem:R,assistantSystem:j};return z};
1
+ import{createSelector as e}from"@salsita-ai/common/utils";import{createSessionAssistant as t,isAssistantSetupHandler as n}from"#package/domain";import{ActionSystem as o,AnimationSystem as s,AssistantSystem as a,CameraControlSystem as r,CameraSystem as i,CanvasSystem as g,DragAndDropSystem as m,ExportSystem as c,GraphQLSystem as l,ImageRenderingSystem as S,LayoutSystem as d,SketchingSystem as u}from"./systems/index.js";export const createConfiguratorExtensionSelectors=p=>{let{getState:y,domainContextSelectors:C,specSelectors:w,domainServicesSelectors:f,accessSelectors:A,commonServicesSelectors:h}=p,x=e.withTypes()([w.selectConfiguratorSpec,C.selectInitializationContext],(e,o)=>t({resolved:e.assistant,handler:e.handlers.find(n),inputs:o&&o.access?{role:o.role,sessionData:o.sessionData,access:o.access}:null})),I={getConfigurationId:()=>A.getConfiguratorConfigurationId(),getAuthorizedClient:()=>h.getConfiguratorAuthorizedClient(),getAssistantSetup:()=>x(y()),domainContextSelectors:C,domainServicesSelectors:f,specSelectors:w},E={getSystems:()=>G,getActionSystem:()=>z,getCanvasSystem:()=>D,getCameraControlSystem:()=>v,getAnimationSystem:()=>H,getDragAndDropSystem:()=>k,getImageRenderingSystem:()=>F,getLayoutSystem:()=>T,getSketchingSystem:()=>W,getExportSystem:()=>L,getCameraSystem:()=>j,getGraphQLSystem:()=>M,getAssistantSystem:()=>R},b={...I,configuratorExtensionSelectors:E},z=new o({domainContextSelectors:C,domainApplicationContextSelectors:p.domainApplicationContextSelectors}),D=new g(I),v=new r({configuratorExtensionSelectors:E}),k=new m(b),H=new s(I),L=new c(b),M=new l({...b,renderScreenshot:async(e,t)=>{let[n]=await E.getImageRenderingSystem().generateImagesFromComponents([e],t,{},{awaitSettledState:!0});if(!n)throw Error("The canvas rendered no image.");return n.blob},uploadScreenshot:e=>I.getAuthorizedClient().uploadAssistantImage(I.getConfigurationId(),e)}),R=new a({...b,createAudio:()=>new Audio,getWebMcpHost:()=>h.getWebMcpHost()}),T=new d(I),W=new u(b),j=new i(b),F=new S(b),G={actionSystem:z,cameraControlSystem:v,layoutSystem:T,sketchingSystem:W,dragAndDropSystem:k,canvasSystem:D,cameraSystem:j,exportSystem:L,imageRenderingSystem:F,animationSystem:H,graphQLSystem:M,assistantSystem:R};return E};
@@ -0,0 +1,14 @@
1
+ import type { $DomainEntity, ActionTypes, DomainContextSystems, DomainEntity, RuntimeExpressionContext } from '#package/domain';
2
+ import type { ConfiguratorExtensionSystems } from '../../configurator-extension-systems.js';
3
+ import type { ActionSystem } from './action-system.js';
4
+ import type { OpenActionContext } from './action.js';
5
+ /**
6
+ * The context of a runtime action: project-typed domain systems and optional host extensions,
7
+ * runtime expressions, entity updates and ID allocation. Configurator extensions are optional so implementations can check the capabilities they need;
8
+ * the owning action system is always present.
9
+ */
10
+ export interface ActionContext<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, ACTION_TYPES extends ActionTypes = ActionTypes> extends OpenActionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, RuntimeExpressionContext<ENTITIES>, DomainContextSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES> & Partial<ConfiguratorExtensionSystems<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, ACTION_TYPES>> & {
11
+ readonly actionSystem: ActionSystem<ENTITIES, ACTION_TYPES>;
12
+ }> {
13
+ }
14
+ export type AnyActionContext = ActionContext<any, any, any, any, any, any, any, any, any, any>;
@@ -0,0 +1,13 @@
1
+ import type { $DomainEntity, ActionTypes, DomainEntity, RuntimeExpressionContext } from '#package/domain';
2
+ import type { ActionContext } from './action-context.js';
3
+ import type { ActionImplementations } from './action.js';
4
+ /**
5
+ * Creates the `implementActions` factory the configurator interface exposes as
6
+ * `phx.frontend.implementActions`. A module in `src/actions/` implements any subset of the declared
7
+ * actions and gets each parameter and result typed from the spec; a name the spec does not declare
8
+ * is a type error, since its implementation would have to be `never`. The generated barrel lists
9
+ * the modules and `configurator-config.ts` registers them with `ConfiguratorBuilder.withActionModules`;
10
+ * the `ActionSystem` resolves them from the spec, and configurator initialization checks that every
11
+ * declared action is implemented.
12
+ */
13
+ export declare const createActionFactory: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ACTION_TYPES extends ActionTypes>() => <IMPLEMENTATIONS extends Partial<ActionImplementations<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ACTION_TYPES, RuntimeExpressionContext<ENTITIES>, ActionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, ACTION_TYPES>['systems']>>>(implementations: IMPLEMENTATIONS & Readonly<Record<Exclude<keyof IMPLEMENTATIONS, keyof ACTION_TYPES>, never>>) => IMPLEMENTATIONS;
@@ -0,0 +1,55 @@
1
+ import { type ActionTypes, type DomainContextSelectors, type DomainEntity, type DomainState, createUpdateFactory, getIdSequence } from '#package/domain';
2
+ import type { PreparedAction } from './action.js';
3
+ export interface ActionSystemContext {
4
+ /**
5
+ * Declarations and the unresolved `src/actions/` modules are both read from the current spec, so
6
+ * an editor update of either reaches the next call without rebuilding the runtime graph.
7
+ */
8
+ readonly domainContextSelectors: DomainContextSelectors;
9
+ readonly domainApplicationContextSelectors: {
10
+ readonly getSystems: () => object;
11
+ };
12
+ }
13
+ /** Runtime context retains the engine's entity and action types; the interface factory restores project types. */
14
+ interface RuntimeActionContext<ENTITIES extends DomainEntity<string>, ACTION_TYPES extends ActionTypes> {
15
+ readonly expressionContext: ReturnType<DomainContextSelectors['getExpressionContext']>;
16
+ readonly systems: ReturnType<DomainContextSelectors['getDomainSystems']> & {
17
+ readonly actionSystem: ActionSystem<ENTITIES, ACTION_TYPES>;
18
+ };
19
+ readonly getIdSequence: () => ReturnType<typeof getIdSequence<ENTITIES>>;
20
+ readonly updates: ReturnType<typeof createUpdateFactory<ENTITIES>>;
21
+ }
22
+ /** ActionSystem with its types erased — how the runtime selectors expose the instance. */
23
+ export type AnyActionSystem = ActionSystem<any, any>;
24
+ /**
25
+ * Runs the actions an application declares under `actions` and implements in `src/actions/`. It
26
+ * only prepares: an action gets the state it is called on and returns the updates it wants applied
27
+ * with a reader for its result, and the caller stages, commits or dry-runs them. Every caller of an
28
+ * action goes through it, so all of them run the same domain logic.
29
+ */
30
+ export declare class ActionSystem<ENTITIES extends DomainEntity<string>, ACTION_TYPES extends ActionTypes> {
31
+ private readonly _context;
32
+ /** One compiled validator per declared action, rebuilt only when the declarations change. */
33
+ private readonly _selectValidators;
34
+ private readonly _updates;
35
+ private readonly _selectImplementations;
36
+ constructor(_context: ActionSystemContext);
37
+ /** The implementations of the current spec, resolved and checked against its declarations. */
38
+ private readonly _implementations;
39
+ /** Fails on a declared action without an implementation, so a missing one surfaces at startup. */
40
+ readonly initialize: () => void;
41
+ /**
42
+ * The context an implementation runs with on `state`. Code that prepares updates outside an
43
+ * action can run on the same context, so it can do everything an action can, the same way.
44
+ */
45
+ readonly createContext: (state: DomainState<ENTITIES>) => RuntimeActionContext<ENTITIES, ACTION_TYPES>;
46
+ /**
47
+ * Prepares the action `name` with `args` on `state`. The arguments are validated against the
48
+ * params schema the action declares, and the implementation is called with the validated
49
+ * parameters and the context of the state; nothing is staged or committed. Throws for an unknown
50
+ * action, arguments that do not fit the schema, or a declared action without an implementation.
51
+ * The result of `readResult` is not validated: the generated type is its contract.
52
+ */
53
+ readonly prepareAction: <NAME extends keyof ACTION_TYPES & string>(name: NAME, args: ACTION_TYPES[NAME]['params'], state: DomainState<ENTITIES>) => PreparedAction<ENTITIES, ACTION_TYPES[NAME]['result']>;
54
+ }
55
+ export {};
@@ -0,0 +1 @@
1
+ import{createSelector as t}from"@salsita-ai/common/utils";import{createUpdateFactory as e,extendedSchemaValidator as i,getIdSequence as n}from"#package/domain";import{prepareActionImplementations as o}from"./prepare-action-implementations.js";import{resolveActionModules as s}from"./resolve-action-modules.js";export class ActionSystem{_context;_selectValidators=t([t.leaf(t=>t)],t=>new Map(Object.values(t).map(t=>[t.name,i.compile(t.params)])));_updates=e();_selectImplementations=t([t.leaf(t=>t.definitions),t.leaf(t=>t.modules)],(t,e)=>o(t,s(e)));constructor(t){this._context=t}_implementations=t=>this._selectImplementations({definitions:t,modules:this._context.domainContextSelectors.getActionModules()});initialize=()=>{this._implementations(this._context.domainContextSelectors.getActionDefinitions())};createContext=t=>{let e=this._context.domainContextSelectors.getDomainSystems(),i=this._context.domainApplicationContextSelectors.getSystems();return{expressionContext:this._context.domainContextSelectors.getExpressionContext(),systems:{...e,...i,actionSystem:this},getIdSequence:()=>n(t.entities,[]),updates:this._updates}};prepareAction=(t,e,n)=>{let o=this._context.domainContextSelectors.getActionDefinitions(),s=Object.values(o).find(e=>e.name===t);if(!s){let e=Object.values(o).map(t=>`"${t.name}"`);throw Error(`Unknown action "${t}". ${e.length>0?`The application declares these actions: ${e.join(", ")}.`:"The application declares no actions."} Declare it under "actions" in a spec file and implement it in src/actions/.`)}let a=this._selectValidators(o).get(s.name);if(a&&!a(e))throw Error(`The arguments of action "${t}" do not fit its params: ${i.errorsText(a.errors)}. Nothing was changed. Send arguments that fit the params the action declares.`);return(Object.entries(this._implementations(o)).find(([e])=>e===t)?.[1])(e,n,this.createContext(n))}}
@@ -0,0 +1,44 @@
1
+ import type { ActionTypes, DomainEntity, DomainState, IdSequence, OpenExpressionContext, StateUpdate, UpdateFactory } from '#package/domain';
2
+ /** The working state an action ran against and the state its applied updates produced. */
3
+ export interface ActionStateChange<ENTITIES extends DomainEntity<string>> {
4
+ readonly previousState: DomainState<ENTITIES>;
5
+ readonly state: DomainState<ENTITIES>;
6
+ }
7
+ /**
8
+ * What one action prepares: the updates it wants applied, computed from the state it ran against,
9
+ * and how to read its result from the change they made, including whatever the transformers added.
10
+ * Nothing is staged or committed; the caller decides what to do with the updates.
11
+ */
12
+ export interface PreparedAction<ENTITIES extends DomainEntity<string>, RESULT> {
13
+ readonly updates: ReadonlyArray<StateUpdate<ENTITIES, ENTITIES>>;
14
+ readonly readResult: (change: ActionStateChange<ENTITIES>) => RESULT;
15
+ }
16
+ /**
17
+ * What an implementation reads besides its parameters and state: an expression context extended
18
+ * through `CONTEXT_EXTENSION`, an entity ID sequence, and the typed update factory. `SYSTEMS`
19
+ * describes the complete graph the caller supplies. Both context parameters default to `unknown`
20
+ * for implementations that use neither.
21
+ */
22
+ export interface OpenActionContext<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, CONTEXT_EXTENSION = unknown, SYSTEMS = unknown> {
23
+ readonly expressionContext: OpenExpressionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION>;
24
+ readonly systems: SYSTEMS;
25
+ readonly getIdSequence: () => IdSequence<ENTITIES>;
26
+ readonly updates: UpdateFactory<ENTITIES>;
27
+ }
28
+ /**
29
+ * The implementation of one declared action. It must not change anything itself; a thrown error
30
+ * fails the call, and its message reaches whoever asked for the action, so it says what went wrong
31
+ * and how to fix the request.
32
+ */
33
+ export type ActionImplementation<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, PARAMS, RESULT, CONTEXT_EXTENSION = unknown, SYSTEMS = unknown> = (params: PARAMS, state: DomainState<ENTITIES>, context: OpenActionContext<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, CONTEXT_EXTENSION, SYSTEMS>) => PreparedAction<ENTITIES, RESULT>;
34
+ /**
35
+ * One action implementation with its types erased. The two parameters of its context are erased
36
+ * too, so that an implementation written against a closed context is assignable to it.
37
+ */
38
+ export type AnyActionImplementation = ActionImplementation<any, any, any, any, any, any, unknown, any, any>;
39
+ /** The implementations of every declared action by name, as the `ActionSystem` merges them from the `src/actions/` modules of the spec. */
40
+ export type ActionImplementations<ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ACTION_TYPES extends ActionTypes, CONTEXT_EXTENSION = unknown, SYSTEMS = unknown> = {
41
+ readonly [NAME in keyof ACTION_TYPES]: ActionImplementation<ENTITIES, ALLOWED_ROOT_ENTITIES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ACTION_TYPES[NAME]['params'], ACTION_TYPES[NAME]['result'], CONTEXT_EXTENSION, SYSTEMS>;
42
+ };
43
+ /** The action implementations of an application with their types erased, as the configurator action system holds them. */
44
+ export type AnyActionImplementations = Readonly<Record<string, AnyActionImplementation>>;
@@ -0,0 +1,6 @@
1
+ export * from './action-system.js';
2
+ export type * from './action-context.js';
3
+ export * from './action-factory.js';
4
+ export type * from './action.js';
5
+ export * from './resolve-action-modules.js';
6
+ export * from './prepare-action-implementations.js';
@@ -0,0 +1 @@
1
+ export*from"./action-system.js";export*from"./action-factory.js";export*from"./resolve-action-modules.js";export*from"./prepare-action-implementations.js";
@@ -1,4 +1,5 @@
1
- import type { ActionDefinitions, AnyActionImplementations } from '../../core/index.js';
1
+ import type { ActionDefinitions } from '#package/domain';
2
+ import type { AnyActionImplementations } from './action.js';
2
3
  /** The declared actions that have no implementation, and the implementations of undeclared names. */
3
4
  export interface ActionImplementationConflicts {
4
5
  readonly missing: readonly string[];
@@ -8,8 +9,8 @@ export interface ActionImplementationConflicts {
8
9
  export declare const findActionImplementationConflicts: (declared: readonly string[], implementations: AnyActionImplementations) => ActionImplementationConflicts;
9
10
  /**
10
11
  * Validates the implemented actions against the declared ones, as `prepareDomainExpressions` does
11
- * for expressions: a declared action without an implementation throws, so the domain is not
12
- * instantiated with an action that can only fail when it is called; an implementation of an
12
+ * for expressions: a declared action without an implementation throws, so the configurator is not
13
+ * initialized with an action that can only fail when it is called; an implementation of an
13
14
  * undeclared name is logged. Returns the implementations unchanged.
14
15
  */
15
16
  export declare const prepareActionImplementations: (definitions: ActionDefinitions, implementations: AnyActionImplementations) => AnyActionImplementations;
@@ -1,5 +1,5 @@
1
- export const findActionImplementationConflicts=(e,t)=>{let n=Object.entries(t).filter(([,e])=>"function"==typeof e).map(([e])=>e);return{missing:e.filter(e=>!n.includes(e)),extra:n.filter(t=>!e.includes(t))}};export const prepareActionImplementations=(e,t)=>{let{missing:n,extra:i}=findActionImplementationConflicts(Object.values(e).map(e=>e.name),t);if(0===n.length&&0===i.length)return t;let o=Error("Domain cannot be instantiated because there are conflicts between declared and implemented actions."+(n.length>0?`
1
+ export const findActionImplementationConflicts=(e,t)=>{let n=Object.entries(t).filter(([,e])=>"function"==typeof e).map(([e])=>e);return{missing:e.filter(e=>!n.includes(e)),extra:n.filter(t=>!e.includes(t))}};export const prepareActionImplementations=(e,t)=>{let{missing:n,extra:i}=findActionImplementationConflicts(Object.values(e).map(e=>e.name),t);if(0===n.length&&0===i.length)return t;let o=Error("Configurator actions cannot be initialized because there are conflicts between declared and implemented actions."+(n.length>0?`
2
2
 
3
- Missing actions: ${n.join(", ")}. Add each to a default export of phx.domain.implementActions({ ... }) in src/actions/.`:"")+(i.length>0?`
3
+ Missing actions: ${n.join(", ")}. Add each to a default export of phx.frontend.implementActions({ ... }) in src/actions/.`:"")+(i.length>0?`
4
4
 
5
5
  Extra actions: ${i.join(", ")}. Declare each under "actions" in a spec file or remove its implementation.`:"")+"\n");if(n.length>0)throw o;return console.error(o),t};
@@ -1,4 +1,4 @@
1
- import type { AnyActionImplementations } from '../../core/index.js';
2
- import { type ProjectModule } from './project-modules.js';
1
+ import { type ProjectModule } from '#package/domain';
2
+ import type { AnyActionImplementations } from './action.js';
3
3
  /** Validates the `src/actions/` files and merges their implementations by action name; a later file wins. */
4
4
  export declare const resolveActionModules: (modules: readonly ProjectModule[]) => AnyActionImplementations;
@@ -0,0 +1 @@
1
+ import{SHARED_FOLDER_HINT as e,createContractError as t,isRecord as o}from"#package/domain";let n={expected:"an object of action implementations keyed by action name",fix:`Create it with phx.frontend.implementActions({ ... }), ${e}.`},i=e=>"function"==typeof e;export const resolveActionModules=e=>e.reduce((e,r)=>{let c;if(!(o(c=r.exports)&&Object.values(c).every(i)))throw t(r,n,r.exports);return{...e,...r.exports}},{});
@@ -1,16 +1,19 @@
1
1
  import type { AssistantAnnotationPin, AssistantAnnotationSource, AssistantMessageAnnotation } from '@salsita-ai/contracts/assistant';
2
2
  /**
3
- * What the user made in the annotation editor: the frozen view of the configurator, or the image they
3
+ * An annotation attached to a message: the frozen view of the configurator, or the image the user
4
4
  * annotated, with their marker strokes and numbered pin badges flattened into one image, ready for the
5
5
  * upload, and the comments of the pins. It is attached to a message like an image; see
6
6
  * {@link AssistantSystem.send}.
7
7
  */
8
8
  export interface AssistantAnnotation {
9
+ readonly type: 'annotation';
9
10
  readonly blob: Blob;
10
11
  readonly pins: ReadonlyArray<AssistantAnnotationPin>;
11
- /** What was annotated; the view when nothing says otherwise. */
12
- readonly source?: AssistantAnnotationSource;
12
+ /** What was annotated. */
13
+ readonly source: AssistantAnnotationSource;
13
14
  }
15
+ /** What the user made in the annotation editor: the flattened image and the comments of its pins. */
16
+ export type AssistantAnnotationDrawing = Pick<AssistantAnnotation, 'blob' | 'pins'>;
14
17
  /**
15
18
  * What covers the configurator for an annotation, as the configurator page renders it over every
16
19
  * layout. The configurator is inert while there is one.
@@ -26,7 +29,7 @@ export type AssistantAnnotationOverlay = {
26
29
  readonly kind: 'editor';
27
30
  /** The frozen view, or the image drawn at its size, at the canvas's resolution. */
28
31
  readonly view: HTMLCanvasElement;
29
- readonly finish: (annotation: AssistantAnnotation | null) => void;
32
+ readonly finish: (drawing: AssistantAnnotationDrawing | null) => void;
30
33
  } | {
31
34
  readonly kind: 'viewer';
32
35
  readonly annotation: AssistantMessageAnnotation;
@@ -4,11 +4,12 @@ import { type ObservableWithLastValue } from '@salsita-ai/common/utils';
4
4
  import { type AssistantMessageAnnotation } from '@salsita-ai/contracts/assistant';
5
5
  import { type AuthorizedPhoenixApiClient } from '#package/client';
6
6
  import type { AssistantManifest, DomainContextSelectors, DomainServicesSelectors, InitializableSystem, SessionAssistantSetup } from '#package/domain';
7
+ import type { WebMcpHost } from '#package/react-sdk';
7
8
  import type { ConfiguratorExtensionSelectors } from '../../selectors.js';
8
- import type { AssistantAnnotation, AssistantAnnotationOverlay } from './assistant-annotation.js';
9
+ import type { AssistantAnnotationOverlay } from './assistant-annotation.js';
9
10
  import type { AssistantImageView } from './assistant-image-view.js';
10
11
  import { type AssistantPlayback } from './assistant-speech-player.js';
11
- import { type AssistantDraftAttachment } from './composer-attachments.js';
12
+ import { type AssistantAttachment, type AssistantDraftAttachment } from './composer-attachments.js';
12
13
  /** A tool of the assistant that the model calls and the browser runs, as the chat client accepts it. */
13
14
  export type AssistantClientTool = AnyClientTool;
14
15
  /**
@@ -25,40 +26,38 @@ export interface AssistantSystemContext {
25
26
  /** The assistant the initialized session runs: its tools, its exposed fields and whether chat runs at all. */
26
27
  readonly getAssistantSetup: () => SessionAssistantSetup;
27
28
  /**
28
- * Copies the configurator view as the next frame draws it, for the user to annotate; see
29
- * {@link AssistantSystem.annotate}. The only browser-bound step of an annotation the system takes,
30
- * so a test can provide one that takes none.
29
+ * Creates the one audio element the replies are read aloud through, the first time one is. A browser-bound step
30
+ * the system takes, so a test can provide an element that plays nothing.
31
31
  */
32
- readonly freezeView: () => Promise<HTMLCanvasElement>;
33
- /**
34
- * Draws an image the user annotates onto a canvas the size of the configurator view, contain-fitted
35
- * over `background`; see {@link AssistantSystem.annotate}. Rejects when the image cannot be drawn.
36
- */
37
- readonly rasterizeImage: (image: Blob, background: string) => Promise<HTMLCanvasElement>;
32
+ readonly createAudio: () => HTMLAudioElement;
38
33
  /**
39
- * Creates the one audio element the replies are read aloud through, the first time one is. The only other
40
- * browser-bound step the system takes, so a test can provide an element that plays nothing.
34
+ * The application's WebMCP host: its model context is the browser's entry point, through which the
35
+ * system offers its tools to the agents in the visitor's browser (`null` where there is none, which
36
+ * leaves them unregistered), and each load tells it how its tools settled.
41
37
  */
42
- readonly createAudio: () => HTMLAudioElement;
43
- }
44
- /** An image the user annotates instead of their view; see {@link AssistantSystem.annotate}. */
45
- export interface AssistantAnnotationImage {
46
- readonly image: Blob;
47
- /** A CSS colour behind the image and in the margins around it, such as the theme's background. */
48
- readonly background: string;
38
+ readonly getWebMcpHost: () => WebMcpHost;
49
39
  }
50
40
  /**
51
- * An image attached to the message being written that the user annotates, so the annotation takes its
52
- * place; see {@link AssistantSystem.annotate}.
41
+ * What the user annotates; see {@link AssistantSystem.annotate}:
42
+ *
43
+ * - `view` — their current view of the configurator.
44
+ * - `image` — an image, such as one of the thread.
45
+ * - `attachment` — an image attached to the message being written, by its id in `composerAttachments$`; the
46
+ * annotation takes its place.
47
+ *
48
+ * `background` is a CSS colour behind the image and in the margins around it, such as the theme's background.
53
49
  */
54
- export interface AssistantAnnotationAttachment {
55
- /** The id of the attachment in `composerAttachments$`. */
50
+ export type AssistantAnnotationTarget = {
51
+ readonly type: 'view';
52
+ } | {
53
+ readonly type: 'image';
54
+ readonly image: Blob;
55
+ readonly background: string;
56
+ } | {
57
+ readonly type: 'attachment';
56
58
  readonly attachmentId: string;
57
- /** A CSS colour behind the image and in the margins around it, such as the theme's background. */
58
59
  readonly background: string;
59
- }
60
- /** What the user attaches to a message: an image, or an annotation of their configurator view or of an image. */
61
- export type AssistantAttachment = Blob | AssistantAnnotation;
60
+ };
62
61
  /**
63
62
  * The conversation with the assistant as the panel paints it. One value is published per change, so
64
63
  * it changes with every chunk of a streaming reply.
@@ -81,6 +80,13 @@ export interface AssistantChatSnapshot {
81
80
  * limits. Nothing when that request carried none.
82
81
  */
83
82
  readonly retryAfterSeconds: number | undefined;
83
+ /**
84
+ * How the run of the reply failed, when it did: `busy` when the AI service behind the assistant was busy, `other`
85
+ * for any other failure. Set from the failed run's error code on a live reply, and from the thread read when the
86
+ * thread's newest run failed; nothing once a chat request was answered again, and for a failure that is not a failed
87
+ * run (a refusal, a dropped connection, an image upload or a compaction that failed), which also clears it. A failed run's reply is regenerated by {@link AssistantSystem.regenerate}.
88
+ */
89
+ readonly runFailed: 'busy' | 'other' | undefined;
84
90
  /** False when the server said this session may read the thread but not add to it. */
85
91
  readonly isContinuable: boolean;
86
92
  /**
@@ -237,6 +243,9 @@ export declare class AssistantSystem implements InitializableSystem {
237
243
  * the latest message was typed.
238
244
  */
239
245
  private _voiceReplyChat;
246
+ private readonly _toolDependencies;
247
+ /** Aborting it unregisters the WebMCP tools of the current load; nothing while none are registered. */
248
+ private _webMcpRegistration;
240
249
  constructor(_context: AssistantSystemContext);
241
250
  /** The conversation. It never completes, and holds the empty chat whenever no chat is active. */
242
251
  readonly chat$: ObservableWithLastValue<AssistantChatSnapshot>;
@@ -365,14 +374,14 @@ export declare class AssistantSystem implements InitializableSystem {
365
374
  */
366
375
  send: (content: string, attachments?: ReadonlyArray<AssistantAttachment>, { onSent, onUnsent, audio }?: AssistantSendOptions) => Promise<void>;
367
376
  /**
368
- * Lets the user annotate their current view of the configurator, or `source.image`, and attaches what
377
+ * Lets the user annotate their current view of the configurator, or an image, and attaches what
369
378
  * they made to the message being written (see `composerAttachments$`). Resolves with the id of the
370
379
  * attachment, or with `null` when they cancel, the view cannot be frozen or the image drawn, or another
371
380
  * configuration is loaded meanwhile. While the message is full, or another annotation is made or
372
381
  * shown, nothing happens: it resolves with `null` at once. The annotation holds a slot of the
373
382
  * message from the start, so nothing attached meanwhile can push it over the limit.
374
383
  *
375
- * With `source.attachmentId`, the user annotates that image of the message instead, and the annotation
384
+ * With an `attachment` target, the user annotates that image of the message instead, and the annotation
376
385
  * takes its place, at its position, so it needs no free slot. Nothing happens, and it resolves with
377
386
  * `null`, when that attachment is not attached or is already an annotation; also when it is taken off
378
387
  * while the user annotates it.
@@ -383,7 +392,9 @@ export declare class AssistantSystem implements InitializableSystem {
383
392
  * finishes, the view glides back to the padding. An image is drawn contain-fitted over its background
384
393
  * on a canvas the size of the configurator view, and the camera stays as it is.
385
394
  */
386
- annotate: (source?: AssistantAnnotationImage | AssistantAnnotationAttachment) => Promise<string | null>;
395
+ annotate: (target: AssistantAnnotationTarget) => Promise<string | null>;
396
+ /** Annotates the view or an image in a slot of its own, and attaches the annotation to the message. */
397
+ private _annotateIntoSlot;
387
398
  /**
388
399
  * Shows an annotation of a sent message over the configurator, read-only, until its overlay is
389
400
  * closed. Nothing happens while another annotation is made or shown.
@@ -480,6 +491,17 @@ export declare class AssistantSystem implements InitializableSystem {
480
491
  * server is therefore gone from the thread and has to be written again.
481
492
  */
482
493
  reloadThread: () => void;
494
+ /**
495
+ * Runs the model again on the user's newest message, after the run that answered it failed. Only Try again calls
496
+ * it. It restarts the chat client and reads the thread again before regenerating, because only the stored thread
497
+ * is right in each case it serves: the failed run never stored the user's message, the connection dropped while
498
+ * the run went on, or the page loaded on a failed thread. Once the read thread is painted, the chat client
499
+ * regenerates the reply, which drops whatever the failed run produced after the message there and on the server.
500
+ * The message itself is not sent again. When the read thread no longer reports a failed run, only the read
501
+ * happens. The server, not the client, decides whether a regeneration is allowed.
502
+ */
503
+ regenerate: () => void;
504
+ private _restartChat;
483
505
  /**
484
506
  * Undoes the changes of the given `apply` tool calls, one undo step at a time, while the step the
485
507
  * configuration is at is one of them. A change the user made in between stops it, so it is never
@@ -494,7 +516,7 @@ export declare class AssistantSystem implements InitializableSystem {
494
516
  setInputFocused: (isInputFocused: boolean) => void;
495
517
  /** Every change of the annotation overlay goes through here: the configurator is inert while there is one. */
496
518
  private _setAnnotationOverlay;
497
- /** The camera path of `annotate`: still camera, glide, freeze, edit, glide back. */
519
+ /** The camera path of `annotate`: still camera, glide off the padding, freeze, edit, glide back. */
498
520
  private _annotateView;
499
521
  /**
500
522
  * Runs one annotation as the current `annotate()` call and resolves with what the user made, or with
@@ -503,9 +525,22 @@ export declare class AssistantSystem implements InitializableSystem {
503
525
  private _runAnnotation;
504
526
  /** The attachment path of `annotate`: annotate an image of the message, which the annotation replaces. */
505
527
  private _annotateAttachment;
528
+ /**
529
+ * The size an annotated image is drawn at: the size a frozen view has, the canvas's drawing buffer, so the editor lays
530
+ * an image out like a view; the window at the device's pixel ratio when there is no canvas or it is not shown.
531
+ */
532
+ private _annotationArea;
506
533
  /** The image path of `annotate`: draw the image, edit. The camera stays as it is. */
507
534
  private _annotateImage;
508
- /** Opens the editor on `view` and resolves with what the user made, or `null` when they cancel. */
535
+ /**
536
+ * Opens the editor on `view` and resolves with what the user made, or `null` when they cancel.
537
+ *
538
+ * The 3D canvas is paused while the editor covers it: a canvas drawn every frame, with heavy
539
+ * postprocessing, would otherwise keep drawing beneath it and make the editor lag. The pause is the
540
+ * export system's shared one, so an export overlapping the editor neither resumes the canvas under it
541
+ * nor leaves it paused afterwards. It ends as the editor resolves, before the view glides back.
542
+ * The canvas keeps the pause through its own renders, such as on a resize (`frameloopPaused$`).
543
+ */
509
544
  private _edit;
510
545
  private _logAnnotationFailure;
511
546
  /** A new configuration load cancels an annotation that is made, and closes one that is shown. */
@@ -570,6 +605,29 @@ export declare class AssistantSystem implements InitializableSystem {
570
605
  * A chat that finishes a reply for another configuration is on another thread and is left alone.
571
606
  */
572
607
  private _takeOverThread;
608
+ /**
609
+ * Offers the assistant's tools to the AI agents in the visitor's browser through WebMCP for the
610
+ * session loaded now, in place of those of an earlier load. They come and go with the chat's
611
+ * activation, because the page that holds it is what tells the system that the spec has an
612
+ * `assistant` section and that the configuration is on screen; see {@link AssistantSystem.activate}.
613
+ * Nothing else of the chat is needed: no model runs here, so the server's assistant flags and
614
+ * limits do not apply. Nothing is registered without the browser API, while the assistant is off
615
+ * for the session or its setup failed, or when the spec or the setup handler turned WebMCP off.
616
+ *
617
+ * Every load tells the WebMCP host how its tools settled, registered or not, so the preset tool
618
+ * that opened this configuration can tell its agent whether `configurator_guide` is there.
619
+ *
620
+ * An outside agent's `apply` gets none of the panel's records: no chip row, no change record
621
+ * cleared, nothing in the thread. To the panel's assistant its edits are the user's own. It is not
622
+ * locked against a running panel reply either; the conflict retry of `GraphQLSystem.execute` is
623
+ * all that orders the two.
624
+ *
625
+ * Accepted: the tools describe the manifest as it was when they were registered. An editor hot
626
+ * reload that changes the `assistant` section without loading the configuration again, or turns
627
+ * WebMCP off, takes effect at the next load; until then their calls run against the current setup.
628
+ */
629
+ private _registerWebMcp;
630
+ private _unregisterWebMcp;
573
631
  private _startClient;
574
632
  /**
575
633
  * Lets go of the current chat and puts the empty chat in its place. The client itself is left as