@salsita-ai/sdk 0.50.0-develop.11a39afa73 → 0.50.0-develop.12744a81f2

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 (587) hide show
  1. package/README.md +10 -3
  2. package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -0
  3. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  4. package/dist/application-spec/errors/diagnostic-messages.d.ts +9 -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/application-types.js +5 -5
  11. package/dist/application-spec/generate-application/code/templates/configurator-config.js +4 -2
  12. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +0 -1
  13. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +6 -8
  14. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -0
  15. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +8 -6
  16. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +1 -4
  17. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +2 -2
  18. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +1 -1
  19. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +26 -29
  20. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +0 -3
  21. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  22. package/dist/application-spec/generate-application/code/templates/frontend-config.js +7 -3
  23. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +3 -3
  24. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +3 -3
  25. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +10 -6
  26. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -7
  27. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +11 -12
  28. package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
  29. package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +3 -2
  30. package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +13 -11
  31. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
  32. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
  33. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
  34. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.d.ts +3 -0
  35. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +42 -0
  36. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
  37. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +55 -0
  38. package/dist/application-spec/generate-application/code/templates/skills/features/{webhooks/assistant-setup.d.ts → assistant/session-setup.d.ts} +1 -1
  39. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +16 -0
  40. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +3 -3
  41. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +1 -1
  42. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +1 -1
  43. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +1 -1
  44. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +4 -2
  45. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +3 -3
  46. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +1 -1
  47. package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
  48. package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +2 -2
  49. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +1 -1
  50. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +1 -1
  51. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -1
  52. package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +1 -1
  53. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
  54. package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
  55. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
  56. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +3 -0
  57. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +29 -1
  58. package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -2
  59. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +29 -15
  60. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +17 -14
  61. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +2 -2
  62. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +3 -3
  63. package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -0
  64. package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
  65. package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
  66. package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +2 -2
  67. package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
  68. package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -1
  69. package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +1 -1
  70. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
  71. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
  72. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +2 -0
  73. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -1
  74. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.d.ts +2 -0
  75. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.js +28 -0
  76. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +7 -6
  77. package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +2 -1
  78. package/dist/application-spec/generate-application/code/templates/webhook-index.js +2 -2
  79. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +3 -0
  80. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
  81. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  82. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  83. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +3 -2
  84. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -1
  85. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +66 -7
  86. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  87. package/dist/application-spec/parse-application-files/raw-spec/raw-components.js +1 -1
  88. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +6 -3
  89. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  90. package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
  91. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  92. package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
  93. package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
  94. package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -1
  95. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
  96. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +14 -2
  97. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -1
  98. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +7 -10
  99. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  100. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +5 -6
  101. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.js +1 -1
  102. package/dist/application-spec/parse-application-files/spec/sections/assistant/index.d.ts +0 -1
  103. package/dist/application-spec/webhook-boundary.js +1 -1
  104. package/dist/client/cli-client/cli-api-client.d.ts +17 -0
  105. package/dist/client/cli-client/cli-api-client.js +1 -0
  106. package/dist/client/cli-client/index.d.ts +2 -0
  107. package/dist/client/cli-client/index.js +1 -0
  108. package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
  109. package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
  110. package/dist/client/contract.d.ts +1 -1
  111. package/dist/client/index.d.ts +1 -0
  112. package/dist/client/index.js +1 -1
  113. package/dist/client/phoenix-api.d.ts +5263 -1723
  114. package/dist/configurator/ConfiguratorApp.js +1 -1
  115. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +5 -4
  116. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
  117. package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
  118. package/dist/configurator/application-runtime/extensions/selectors.d.ts +4 -2
  119. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  120. package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.d.ts +14 -0
  121. package/dist/configurator/application-runtime/extensions/systems/action-system/action-factory.d.ts +13 -0
  122. package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.d.ts +55 -0
  123. package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.js +1 -0
  124. package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +56 -0
  125. package/dist/configurator/application-runtime/extensions/systems/action-system/action.js +1 -0
  126. package/dist/configurator/application-runtime/extensions/systems/action-system/index.d.ts +6 -0
  127. package/dist/configurator/application-runtime/extensions/systems/action-system/index.js +1 -0
  128. package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.d.ts +4 -3
  129. package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.js +2 -2
  130. package/dist/{domain/spec/modules → configurator/application-runtime/extensions/systems/action-system}/resolve-action-modules.d.ts +2 -2
  131. package/dist/configurator/application-runtime/extensions/systems/action-system/resolve-action-modules.js +1 -0
  132. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +7 -4
  133. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +99 -35
  134. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  135. package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +12 -17
  136. package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -1
  137. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +52 -36
  138. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  139. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +3 -0
  140. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -0
  141. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +33 -0
  142. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +6 -0
  143. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.d.ts +14 -0
  144. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.js +2 -0
  145. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.d.ts +10 -0
  146. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.js +1 -0
  147. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
  148. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
  149. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +14 -4
  150. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  151. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +8 -1
  152. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  153. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +46 -12
  154. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  155. package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.d.ts +16 -0
  156. package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.js +1 -0
  157. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +26 -0
  158. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -0
  159. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +25 -8
  160. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -1
  161. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.d.ts +15 -4
  162. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.js +3 -3
  163. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +15 -7
  164. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  165. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +5 -4
  166. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  167. package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
  168. package/dist/configurator/common/configurator-interface.d.ts +9 -7
  169. package/dist/configurator/common/configurator-interface.js +1 -1
  170. package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
  171. package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
  172. package/dist/configurator/scene/resources/use-phx-gltf.js +1 -1
  173. package/dist/configurator/scene/scene-entity/materials/LocalCreatedMaterial.js +1 -1
  174. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.d.ts +5 -0
  175. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
  176. package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.d.ts +27 -0
  177. package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.js +1 -0
  178. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -1
  179. package/dist/configurator/ui/assistant/AssistantChips.d.ts +5 -5
  180. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  181. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +4 -3
  182. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
  183. package/dist/configurator/ui/assistant/AssistantPanel.d.ts +6 -4
  184. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  185. package/dist/configurator/ui/assistant/AssistantThread.d.ts +10 -2
  186. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  187. package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -1
  188. package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -1
  189. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +6 -5
  190. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
  191. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +6 -5
  192. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
  193. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
  194. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
  195. package/dist/configurator/ui/assistant/annotation/index.d.ts +0 -1
  196. package/dist/configurator/ui/assistant/annotation/index.js +1 -1
  197. package/dist/configurator/ui/assistant/assistant-failure.d.ts +6 -4
  198. package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
  199. package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -1
  200. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.d.ts +10 -0
  201. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.js +1 -0
  202. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.d.ts +10 -0
  203. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.js +1 -0
  204. package/dist/configurator/ui/assistant/disclaimer/index.d.ts +2 -0
  205. package/dist/configurator/ui/assistant/disclaimer/index.js +1 -0
  206. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +1 -1
  207. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -1
  208. package/dist/configurator/ui/assistant/drawing/index.d.ts +1 -1
  209. package/dist/configurator/ui/assistant/drawing/index.js +1 -1
  210. package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -1
  211. package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +6 -12
  212. package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -1
  213. package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +1 -1
  214. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  215. package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
  216. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +6 -5
  217. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  218. package/dist/configurator/ui/assistant/form/read-form-tile.d.ts +8 -0
  219. package/dist/configurator/ui/assistant/form/read-form-tile.js +1 -0
  220. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +6 -3
  221. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -1
  222. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +11 -7
  223. package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +1 -1
  224. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -1
  225. package/dist/configurator/ui/assistant/form/split-form-rows.d.ts +7 -0
  226. package/dist/configurator/ui/assistant/form/split-form-rows.js +1 -0
  227. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +7 -4
  228. package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -1
  229. package/dist/configurator/ui/assistant/form-elements/FormTile.d.ts +72 -0
  230. package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -0
  231. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +27 -0
  232. package/dist/configurator/ui/assistant/form-elements/index.d.ts +2 -3
  233. package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
  234. package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -1
  235. package/dist/configurator/ui/assistant/index.d.ts +2 -2
  236. package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -1
  237. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +4 -1
  238. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -1
  239. package/dist/configurator/ui/assistant/reference-link/index.d.ts +2 -1
  240. package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
  241. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
  242. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +2 -6
  243. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
  244. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +5 -6
  245. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
  246. package/dist/configurator/ui/assistant/thread-items.d.ts +2 -2
  247. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  248. package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +7 -1
  249. package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
  250. package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +15 -1
  251. package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -1
  252. package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +3 -3
  253. package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -1
  254. package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts} +1 -1
  255. package/dist/configurator/ui/assistant/use-on-unmount.js +1 -0
  256. package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
  257. package/dist/configurator/ui/configurator-layout/index.js +1 -1
  258. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  259. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
  260. package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
  261. package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
  262. package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
  263. package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
  264. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
  265. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
  266. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
  267. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
  268. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  269. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
  270. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  271. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
  272. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
  273. package/dist/configurator/ui/index.d.ts +1 -1
  274. package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
  275. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  276. package/dist/docs/index.json +128 -3
  277. package/dist/docs/layouts/nested-view-controls.mdx +223 -0
  278. package/dist/docs/layouts/presets/custom.mdx +1 -0
  279. package/dist/docs/layouts/preview/always.mdx +22 -0
  280. package/dist/docs/layouts/view-controls.mdx +2 -0
  281. package/dist/docs/other-features/domain-actions.mdx +58 -62
  282. package/dist/docs/other-features/violation-messages.mdx +3 -1
  283. package/dist/docs/phoenix/application-states.mdx +1 -1
  284. package/dist/docs/phoenix/assistant/actions.mdx +183 -0
  285. package/dist/docs/phoenix/assistant/changing-the-configuration.mdx +333 -0
  286. package/dist/docs/phoenix/assistant/instructions-and-ai-settings.mdx +221 -0
  287. package/dist/docs/phoenix/assistant/overview.mdx +137 -0
  288. package/dist/docs/phoenix/assistant/per-session-setup.mdx +166 -0
  289. package/dist/docs/phoenix/assistant/reading-the-configuration.mdx +349 -0
  290. package/dist/docs/phoenix/assistant/screenshots.mdx +135 -0
  291. package/dist/docs/phoenix/assistant/security-and-limits.mdx +151 -0
  292. package/dist/docs/phoenix/assistant/the-panel.mdx +298 -0
  293. package/dist/docs/phoenix/configurator-interface.mdx +68 -39
  294. package/dist/docs/phoenix/data-sources.mdx +1 -1
  295. package/dist/docs/phoenix/getting-started.mdx +1 -1
  296. package/dist/docs/phoenix/layout-slots.mdx +2 -2
  297. package/dist/docs/phoenix/migrations.mdx +1 -1
  298. package/dist/docs/phoenix/phoenix-cli.mdx +90 -54
  299. package/dist/docs/phoenix/project-structure.mdx +17 -7
  300. package/dist/docs/phoenix/sdk-builder-workflow.mdx +57 -28
  301. package/dist/docs/phoenix/sessions-and-access.mdx +10 -7
  302. package/dist/docs/phoenix/theming.mdx +5 -9
  303. package/dist/docs/phoenix/webhook-membership.mdx +1 -1
  304. package/dist/docs/phoenix/webhooks.mdx +56 -4
  305. package/dist/docs/ux-guidelines/choosing-navigation.mdx +2 -0
  306. package/dist/docs/ux-guidelines/designing-the-configuration-journey.mdx +43 -0
  307. package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
  308. package/dist/docs/ux-guidelines/overview.mdx +11 -9
  309. package/dist/domain/application/application-config.d.ts +5 -0
  310. package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
  311. package/dist/domain/application/assistant/assistant-exposure.js +1 -0
  312. package/dist/domain/application/assistant/assistant-selection.d.ts +30 -0
  313. package/dist/domain/application/assistant/assistant-selection.js +1 -0
  314. package/dist/domain/application/assistant/build-assistant-lenses.js +4 -4
  315. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +2 -2
  316. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  317. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +18 -2
  318. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  319. package/dist/domain/application/assistant/index.d.ts +5 -1
  320. package/dist/domain/application/assistant/index.js +1 -1
  321. package/dist/domain/application/assistant/prepare-assistant-navigation-updates.d.ts +16 -0
  322. package/dist/domain/application/assistant/prepare-assistant-navigation-updates.js +1 -0
  323. package/dist/domain/application/assistant/read-assistant-navigation.d.ts +40 -0
  324. package/dist/domain/application/assistant/read-assistant-navigation.js +1 -0
  325. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  326. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +30 -2
  327. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  328. package/dist/domain/application/assistant/session-setup/assistant-takes-images.d.ts +7 -0
  329. package/dist/domain/application/assistant/session-setup/assistant-takes-images.js +1 -0
  330. package/dist/domain/application/assistant/session-setup/index.d.ts +1 -0
  331. package/dist/domain/application/assistant/session-setup/index.js +1 -1
  332. package/dist/domain/application/assistant-field-options.d.ts +2 -0
  333. package/dist/domain/application/assistant-field-options.js +1 -1
  334. package/dist/domain/application/assistant-mutations.d.ts +17 -11
  335. package/dist/domain/application/assistant-mutations.js +1 -1
  336. package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
  337. package/dist/domain/application/assistant-recipe-groups.js +1 -1
  338. package/dist/domain/application/configurator-builder.d.ts +8 -0
  339. package/dist/domain/application/configurator-builder.js +1 -1
  340. package/dist/domain/available-system-components/available-system-components.d.ts +1 -1
  341. package/dist/domain/available-system-components/available-system-components.js +1 -1
  342. package/dist/domain/core/action/action.d.ts +0 -49
  343. package/dist/domain/core/component/system-component-filter.d.ts +1 -0
  344. package/dist/domain/core/component/system-component-filter.js +1 -1
  345. package/dist/domain/core/component/view-state-component.d.ts +4 -3
  346. package/dist/domain/core/component/view-state-component.js +1 -1
  347. package/dist/domain/core/domain-factory.d.ts +2 -3
  348. package/dist/domain/core/invariant/control-violation-hints.d.ts +37 -0
  349. package/dist/domain/core/invariant/control-violation-hints.js +1 -0
  350. package/dist/domain/core/invariant/index.d.ts +1 -0
  351. package/dist/domain/core/invariant/index.js +1 -1
  352. package/dist/domain/domain-builder/domain-builder.d.ts +1 -6
  353. package/dist/domain/domain-builder/domain-builder.js +1 -1
  354. package/dist/domain/domain-context/domain-context-systems.d.ts +3 -5
  355. package/dist/domain/domain-context/index.d.ts +0 -1
  356. package/dist/domain/domain-context/index.js +1 -1
  357. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
  358. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  359. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  360. package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +1 -1
  361. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  362. package/dist/domain/domain-runtime/domain-context/index.d.ts +0 -1
  363. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +5 -6
  364. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  365. package/dist/domain/domain-runtime/domain-runtime.d.ts +13 -19
  366. package/dist/domain/domain-runtime/domain-runtime.js +1 -1
  367. package/dist/domain/domain-runtime/index.d.ts +0 -1
  368. package/dist/domain/domain-runtime/index.js +1 -1
  369. package/dist/domain/domain-runtime/spec/index.d.ts +0 -1
  370. package/dist/domain/domain-runtime/spec/index.js +1 -1
  371. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  372. package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
  373. package/dist/domain/domain-runtime/spec/types.d.ts +12 -10
  374. package/dist/domain/extensions/assistant/assistant-greeting.d.ts +30 -0
  375. package/dist/domain/extensions/assistant/assistant-greeting.js +1 -0
  376. package/dist/domain/extensions/assistant/index.d.ts +1 -0
  377. package/dist/domain/extensions/assistant/index.js +1 -0
  378. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +5 -4
  379. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
  380. package/dist/domain/extensions/index.d.ts +1 -1
  381. package/dist/domain/extensions/index.js +1 -1
  382. package/dist/domain/index.d.ts +1 -1
  383. package/dist/domain/index.js +1 -1
  384. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +6 -8
  385. package/dist/domain/spec/modules/index.d.ts +0 -1
  386. package/dist/domain/spec/modules/index.js +1 -1
  387. package/dist/domain/spec/phx/phx-domain.d.ts +0 -1
  388. package/dist/domain/spec/phx/phx-domain.js +1 -1
  389. package/dist/domain/spec/runtime/application-spec-slice.d.ts +5 -5
  390. package/dist/domain/spec/runtime/application-spec-slice.js +1 -1
  391. package/dist/domain/spec/runtime/create-application.d.ts +5 -2
  392. package/dist/domain/spec/runtime/create-application.js +1 -1
  393. package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +2 -2
  394. package/dist/domain/spec/sections/actions.d.ts +3 -2
  395. package/dist/domain/spec/sections/app-metadata.d.ts +3 -0
  396. package/dist/domain/spec/sections/assistant/assistant-features.d.ts +13 -0
  397. package/dist/domain/spec/sections/assistant/assistant-features.js +1 -0
  398. package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +34 -1
  399. package/dist/domain/spec/sections/assistant/assistant-navigation.d.ts +21 -0
  400. package/dist/domain/spec/sections/assistant/assistant-navigation.js +1 -0
  401. package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +45 -4
  402. package/dist/domain/spec/sections/assistant/assistant-select.d.ts +12 -0
  403. package/dist/domain/spec/sections/assistant/assistant-select.js +1 -0
  404. package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +10 -26
  405. package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -1
  406. package/dist/domain/spec/sections/assistant/index.d.ts +4 -1
  407. package/dist/domain/system-components/index.d.ts +1 -0
  408. package/dist/domain/system-components/index.js +1 -1
  409. package/dist/domain/system-components/navigation/index.d.ts +1 -0
  410. package/dist/domain/system-components/navigation/index.js +1 -0
  411. package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
  412. package/dist/domain/system-components/navigation/view-controls.js +1 -0
  413. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  414. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  415. package/dist/editor/domain-editors/use-implementation-files.d.ts +4 -3
  416. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  417. package/dist/extras/cognito/CognitoSignInPage.d.ts +2 -0
  418. package/dist/extras/cognito/CognitoSignInPage.js +1 -0
  419. package/dist/extras/cognito/index.d.ts +1 -0
  420. package/dist/extras/cognito/index.js +1 -0
  421. package/dist/globals/index.d.ts +5 -0
  422. package/dist/i18n/locales/cs/messages.js +1 -1
  423. package/dist/i18n/locales/da/messages.js +1 -1
  424. package/dist/i18n/locales/de/messages.js +1 -1
  425. package/dist/i18n/locales/de-AT/messages.js +1 -1
  426. package/dist/i18n/locales/en/messages.js +1 -1
  427. package/dist/i18n/locales/en-AU/messages.js +1 -1
  428. package/dist/i18n/locales/en-GB/messages.js +1 -1
  429. package/dist/i18n/locales/es/messages.js +1 -1
  430. package/dist/i18n/locales/fr/messages.js +1 -1
  431. package/dist/i18n/locales/hu/messages.js +1 -1
  432. package/dist/i18n/locales/it/messages.js +1 -1
  433. package/dist/i18n/locales/nl/messages.js +1 -1
  434. package/dist/i18n/locales/pl/messages.js +1 -1
  435. package/dist/i18n/locales/pt/messages.js +1 -1
  436. package/dist/i18n/locales/ro/messages.js +1 -1
  437. package/dist/i18n/locales/sk/messages.js +1 -1
  438. package/dist/i18n/locales/tr/messages.js +1 -1
  439. package/dist/legacy/deployment-cli/commands/create-environment.js +1 -1
  440. package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
  441. package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
  442. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +25 -3
  443. package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
  444. package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
  445. package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
  446. package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
  447. package/dist/legacy/webhook-cli/lib/webhook-boundary.js +1 -1
  448. package/dist/phoenix/application-spec/index.d.ts +1 -1
  449. package/dist/phoenix/application-spec/index.js +1 -1
  450. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +1 -0
  451. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  452. package/dist/phoenix/cli.js +1 -1
  453. package/dist/phoenix/commands/account/index.d.ts +1 -0
  454. package/dist/phoenix/commands/account/index.js +1 -0
  455. package/dist/phoenix/commands/account/whoami.d.ts +10 -0
  456. package/dist/phoenix/commands/account/whoami.js +4 -0
  457. package/dist/phoenix/commands/cleanup-environment.js +1 -1
  458. package/dist/phoenix/commands/deploy.d.ts +7 -2
  459. package/dist/phoenix/commands/deploy.js +8 -2
  460. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  461. package/dist/phoenix/commands/feedback.d.ts +2 -2
  462. package/dist/phoenix/commands/feedback.js +1 -1
  463. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  464. package/dist/phoenix/commands/index.d.ts +1 -0
  465. package/dist/phoenix/commands/index.js +1 -1
  466. package/dist/phoenix/commands/init-starter-spec.js +3 -4
  467. package/dist/phoenix/commands/init.d.ts +2 -2
  468. package/dist/phoenix/commands/init.js +1 -1
  469. package/dist/phoenix/commands/login.d.ts +6 -3
  470. package/dist/phoenix/commands/login.js +3 -3
  471. package/dist/phoenix/commands/logout.js +1 -1
  472. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  473. package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
  474. package/dist/phoenix/services/cli-credentials.d.ts +26 -7
  475. package/dist/phoenix/services/cli-credentials.js +2 -2
  476. package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
  477. package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
  478. package/dist/phoenix/services/cli-server/index.d.ts +2 -0
  479. package/dist/phoenix/services/cli-server/index.js +1 -0
  480. package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +19 -0
  481. package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
  482. package/dist/phoenix/services/development-credential.js +1 -1
  483. package/dist/phoenix/services/frontend-config.d.ts +2 -0
  484. package/dist/phoenix/services/index.d.ts +4 -2
  485. package/dist/phoenix/services/index.js +1 -1
  486. package/dist/phoenix/services/phoenix-regions.d.ts +6 -1
  487. package/dist/phoenix/services/phoenix-regions.js +1 -1
  488. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  489. package/dist/phoenix/services/session/phoenix-application.js +1 -1
  490. package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
  491. package/dist/phoenix/services/signed-in-development-environment.js +1 -1
  492. package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
  493. package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
  494. package/dist/phoenix/services/spec-project/index.d.ts +3 -0
  495. package/dist/phoenix/services/spec-project/index.js +1 -0
  496. package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
  497. package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
  498. package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
  499. package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
  500. package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
  501. package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
  502. package/dist/phoenix/services/telemetry/telemetry-event.js +1 -1
  503. package/dist/phoenix/services/telemetry/telemetry-state.d.ts +1 -1
  504. package/dist/phoenix/services/telemetry/telemetry-state.js +1 -1
  505. package/dist/phoenix/services/variant-file-session.js +1 -1
  506. package/dist/phoenix/services/vite-config.js +1 -1
  507. package/dist/phoenix/services/webhook-service/transport.js +1 -1
  508. package/dist/react-sdk/application-runtime/common-services/index.d.ts +1 -0
  509. package/dist/react-sdk/application-runtime/common-services/index.js +1 -1
  510. package/dist/react-sdk/application-runtime/common-services/selectors.d.ts +2 -0
  511. package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
  512. package/dist/react-sdk/application-runtime/common-services/webmcp/index.d.ts +3 -0
  513. package/dist/react-sdk/application-runtime/common-services/webmcp/index.js +1 -0
  514. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.d.ts +35 -0
  515. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.js +1 -0
  516. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.d.ts +44 -0
  517. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.js +1 -0
  518. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.d.ts +24 -0
  519. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.js +1 -0
  520. package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.d.ts +7 -1
  521. package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.js +1 -1
  522. package/dist/react-sdk/application-runtime/domain-application-context/domain-application-systems.d.ts +2 -2
  523. package/dist/react-sdk/application-runtime/domain-application-context/selectors.d.ts +1 -3
  524. package/dist/react-sdk/application-runtime/domain-application-context/selectors.js +1 -1
  525. package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
  526. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  527. package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
  528. package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.d.ts +7 -0
  529. package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.js +1 -0
  530. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  531. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +14 -16
  532. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  533. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +5 -6
  534. package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +1 -1
  535. package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
  536. package/dist/react-sdk/domain-context/index.d.ts +3 -2
  537. package/dist/react-sdk/domain-context/index.js +1 -1
  538. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +1 -5
  539. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -1
  540. package/dist/react-sdk/domain-context/system-hooks/generate-share-link.d.ts +25 -0
  541. package/dist/react-sdk/domain-context/system-hooks/generate-share-link.js +1 -0
  542. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
  543. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  544. package/dist/react-sdk/preset-selection/PresetSelectionProvider.d.ts +11 -0
  545. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
  546. package/dist/react-sdk/preset-selection/PresetWebMcpTools.d.ts +14 -0
  547. package/dist/react-sdk/preset-selection/PresetWebMcpTools.js +1 -0
  548. package/dist/react-sdk/preset-selection/index.d.ts +2 -1
  549. package/dist/react-sdk/preset-selection/index.js +1 -1
  550. package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.d.ts +31 -0
  551. package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.js +1 -0
  552. package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
  553. package/dist/ui-sdk/components/preview/Preview.js +2 -2
  554. package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +3 -2
  555. package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
  556. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
  557. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
  558. package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
  559. package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
  560. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
  561. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
  562. package/dist/webhook/builders/auth-handler-builder.d.ts +3 -0
  563. package/dist/webhook/builders/auth-handler-builder.js +1 -1
  564. package/dist/webhook/builders/common.d.ts +3 -1
  565. package/dist/webhook/builders/webhook-builder.d.ts +5 -0
  566. package/dist/webhook/builders/webhook-builder.js +1 -1
  567. package/package.json +9 -4
  568. package/schema/domain-spec.json +444 -65
  569. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +0 -32
  570. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +0 -2
  571. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +0 -25
  572. package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +0 -1
  573. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -68
  574. package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
  575. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -61
  576. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
  577. package/dist/domain/domain-context/action-system/action-system.d.ts +0 -64
  578. package/dist/domain/domain-context/action-system/action-system.js +0 -1
  579. package/dist/domain/domain-context/action-system/index.d.ts +0 -1
  580. package/dist/domain/domain-context/action-system/index.js +0 -1
  581. package/dist/domain/domain-runtime/action-factory.d.ts +0 -11
  582. package/dist/domain/domain-runtime/domain-context/action-context.d.ts +0 -11
  583. package/dist/domain/extensions/view-controls.d.ts +0 -25
  584. package/dist/domain/extensions/view-controls.js +0 -1
  585. package/dist/domain/spec/modules/resolve-action-modules.js +0 -1
  586. /package/dist/{domain/domain-runtime/domain-context → configurator/application-runtime/extensions/systems/action-system}/action-context.js +0 -0
  587. /package/dist/{domain/domain-runtime → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
@@ -1,13 +1,15 @@
1
- import{autoHeader as o}from"../common/file-headers.js";import{CodeImports as e,generateProjectModuleImports as n,generateProjectModuleList as r}from"../common/index.js";export const generateApplicationSpecConfiguratorFrontendCode=t=>{let{transformerFiles:s,handlerFiles:d,elementFiles:l,componentFiles:a}=t,m=new e;m.addTypeImport("@salsita-ai/sdk/domain","ProjectModule");let c=[...n(s,"transformers"),...n(d,"handlers"),...n(l,"elements"),...n(a,"frontendComponents")];return`${o("configurator-frontend-code.ts","Barrel file for user-authored frontend code — transformers, handlers, elements and frontend-only components. Needs phx.frontend.")}
1
+ import{autoHeader as o}from"../common/file-headers.js";import{CodeImports as e,generateProjectModuleImports as n,generateProjectModuleList as t}from"../common/index.js";export const generateApplicationSpecConfiguratorFrontendCode=r=>{let{actionFiles:s,transformerFiles:d,handlerFiles:a,elementFiles:c,componentFiles:l}=r,m=new e;m.addTypeImport("@salsita-ai/sdk/domain","ProjectModule");let i=[...n(s,"actions"),...n(d,"transformers"),...n(a,"handlers"),...n(c,"elements"),...n(l,"frontendComponents")];return`${o("configurator-frontend-code.ts","Barrel file for user-authored frontend code — actions, transformers, handlers, elements and frontend-only components. Needs phx.frontend.")}
2
2
  ${m.toString()}
3
3
 
4
4
  import './configurator-globals.js'
5
- ${c.length>0?"\n"+c.join("\n")+"\n":""}
6
- export const customTransformers: readonly ProjectModule[] = ${r(s,"transformers")}
5
+ ${i.length>0?"\n"+i.join("\n")+"\n":""}
6
+ export const customActions: readonly ProjectModule[] = ${t(s,"actions")}
7
7
 
8
- export const customHandlers: readonly ProjectModule[] = ${r(d,"handlers")}
8
+ export const customTransformers: readonly ProjectModule[] = ${t(d,"transformers")}
9
9
 
10
- export const customElements: readonly ProjectModule[] = ${r(l,"elements")}
10
+ export const customHandlers: readonly ProjectModule[] = ${t(a,"handlers")}
11
11
 
12
- export const customFrontendComponentOptics: readonly ProjectModule[] = ${r(a,"frontendComponents")}
12
+ export const customElements: readonly ProjectModule[] = ${t(c,"elements")}
13
+
14
+ export const customFrontendComponentOptics: readonly ProjectModule[] = ${t(l,"frontendComponents")}
13
15
  `};
@@ -11,8 +11,6 @@ export interface DomainFactoryTypes {
11
11
  readonly typeArguments: string;
12
12
  /** What the domain runtime adds to the expression context. */
13
13
  readonly contextExtension: string;
14
- /** Project types and the host extension contract supplied to the runtime action factory. */
15
- readonly actionTypeArguments: string;
16
14
  /** The type of the domain's `model`: one reflection per entity, alias, common type and shape. */
17
15
  readonly modelType: string;
18
16
  /** The type of the domain's `enhancedModel`: one enhanced reflection per entity and alias. */
@@ -26,10 +24,9 @@ interface DomainFactoryTypesSpec {
26
24
  readonly latestModel: ModelVersion;
27
25
  readonly expressions: Expressions;
28
26
  }
29
- /** The domain's type namespace and whether its factories belong to the admin domain. */
27
+ /** The namespace qualifying a generated domain's project types. */
30
28
  interface DomainFactoryTypesOptions {
31
29
  readonly typePrefix: string;
32
- readonly isAdmin: boolean;
33
30
  }
34
31
  /** Builds the type strings of a domain; namespace qualification and domain capabilities are explicit. */
35
32
  export declare const getDomainFactoryTypes: (domainSpec: DomainFactoryTypesSpec, options: DomainFactoryTypesOptions) => DomainFactoryTypes;
@@ -1,5 +1,5 @@
1
- export const getDomainFactoryTypes=(t,e)=>{let{typePrefix:n,isAdmin:a}=e,o=n?`${n}.`:"",{entityTypes:i}=t.latestModel,$=[...t.latestModel.aliases].map(([t])=>String(t)),s=[...t.latestModel.commonTypes],l=[...t.latestModel.shapes].map(([t])=>`${t}Shape`),r=new Map([...t.expressions.constants].map(([t,e])=>[String(t),e])),y=(t,e)=>{let n=[...r.get(e)?.keys()??[]],a=n.length>0?`, ${n.map(t=>`'${t}'`).join(" | ")}`:"";return`${t}<${o}$${e}${a}>`},m=[...i.map(t=>` readonly ${String(t)}: DomainEntityReflection<${o}${String(t)}>`),...$.map(t=>` readonly ${t}: RawAliasReflection<${o}${t}>`),...s.map(([t,e])=>{let n,a=(n=e.schema.enum,n?.length&&n.every(t=>"string"==typeof t))?"EnumLike":"SchemaReflection";return` readonly ${t}: ${a}<${o}${t}>`}),...l.map(t=>` readonly ${t}: SchemaReflection<unknown>`)].join("\n"),p=[...i.map(t=>` readonly $${String(t)}: ${y("$DomainEntityReflection",String(t))}`),...$.map(t=>` readonly $${t}: ${y("EnhancedAliasReflection",t)}`)].join("\n");return{typeArguments:`${o}AnyDomainEntity, ${o}RootEntity, ${o}$Map, PublishedData, SessionData, FrontendData, ${o}Aliases`,contextExtension:`RuntimeExpressionContext<${o}AnyDomainEntity>`,actionTypeArguments:`${o}AnyDomainEntity, ${o}RootEntity, ${o}$Map, NavigationState, ViewState, ToolState, ExportState, PublishedData, SessionData, FrontendData, ActionTypes${a?"":`, ConfiguratorExtensionSystems<${o}AnyDomainEntity, ${o}RootEntity, ${o}$Map, NavigationState, ViewState, ToolState, ExportState>`}`,modelType:`{
1
+ export const getDomainFactoryTypes=(e,n)=>{let{typePrefix:t}=n,a=t?`${t}.`:"",{entityTypes:o}=e.latestModel,i=[...e.latestModel.aliases].map(([e])=>String(e)),$=[...e.latestModel.commonTypes],l=[...e.latestModel.shapes].map(([e])=>`${e}Shape`),s=new Map([...e.expressions.constants].map(([e,n])=>[String(e),n])),r=(e,n)=>{let t=[...s.get(n)?.keys()??[]],o=t.length>0?`, ${t.map(e=>`'${e}'`).join(" | ")}`:"";return`${e}<${a}$${n}${o}>`},m=[...o.map(e=>` readonly ${String(e)}: DomainEntityReflection<${a}${String(e)}>`),...i.map(e=>` readonly ${e}: RawAliasReflection<${a}${e}>`),...$.map(([e,n])=>{let t,o=(t=n.schema.enum,t?.length&&t.every(e=>"string"==typeof e))?"EnumLike":"SchemaReflection";return` readonly ${e}: ${o}<${a}${e}>`}),...l.map(e=>` readonly ${e}: SchemaReflection<unknown>`)].join("\n"),p=[...o.map(e=>` readonly $${String(e)}: ${r("$DomainEntityReflection",String(e))}`),...i.map(e=>` readonly $${e}: ${r("EnhancedAliasReflection",e)}`)].join("\n");return{typeArguments:`${a}AnyDomainEntity, ${a}RootEntity, ${a}$Map, PublishedData, SessionData, FrontendData, ${a}Aliases`,contextExtension:`RuntimeExpressionContext<${a}AnyDomainEntity>`,modelType:`{
2
2
  ${m}
3
3
  }`,enhancedModelType:`{
4
4
  ${p}
5
- }`,enhancedReflectionType:y}};
5
+ }`,enhancedReflectionType:r}};
@@ -9,13 +9,13 @@ interface DomainBlockSpec {
9
9
  readonly resolvedVersions: ResolvedVersions;
10
10
  }
11
11
  export interface DomainBlockOptions {
12
+ readonly isAdmin: boolean;
12
13
  readonly domainSpec: DomainBlockSpec;
13
14
  readonly invariants: Invariants;
14
15
  /** The declared actions of the configurator domain; `undefined` for the admin domain, which has none. */
15
16
  readonly actions: Actions | undefined;
16
17
  readonly typePrefix: string;
17
18
  readonly versionNsPrefix: string;
18
- readonly isAdmin: boolean;
19
19
  readonly modelVersionsExportName: string;
20
20
  readonly relationExpressionsExportName: string;
21
21
  readonly componentOpticsExportName: string;
@@ -1,7 +1,7 @@
1
- import{skipApplicationTypeImports as e}from"../../common/index.js";import{getDomainFactoryTypes as n}from"./factory-types/index.js";import{generateComponentOpticsCode as t}from"./generate-component-optics.js";import{generateDefaultsBlock as a}from"./generate-defaults.js";import{generateInvariantsBlock as o}from"./generate-invariants.js";import{generateRelationExpressionsCode as i}from"./generate-relation-expressions.js";import{generateStaticValueCode as s}from"./generate-static-value-code.js";import{generateValueExpressionsCode as r}from"./generate-value-expressions.js";let m="@salsita-ai/sdk/domain",l=(e,n,t)=>{let a=[],o=[];for(let i of e.modelVersion.entitySchemas){let e=JSON.stringify(i.shapeSchema,null,2);a.push(`${t}const ${i.entityType} = new DomainEntityReflection<${n}${i.entityType}>('${i.entityType}', [${e}])`),o.push(String(i.entityType))}return{entityDecls:a.join("\n"),entityNames:o}};export const generateDomainBlock=p=>{let{domainSpec:c,invariants:$,actions:d,typePrefix:u,versionNsPrefix:y,isAdmin:h,modelVersionsExportName:f,relationExpressionsExportName:S,componentOpticsExportName:D,valueExpressionsExportName:E,createRecipeExportName:g,imports:A,registerApplicationTypeImports:x=e}=p;A.addImport(m,"$DomainEntityReflection"),A.addImport(m,"DomainBuilder"),A.addImport(m,"DomainComponentOpticBuilder"),A.addImport(m,"DomainEntityReflection"),A.addImport(m,"EnhancedAliasReflection"),A.addImport(m,"RawAliasReflection"),A.addImport(m,"SchemaReflection"),A.addImport(m,"createCustomExpressionFactory"),A.addImport(m,"createCustomInvariantFactory"),h&&(A.addImport(m,"commonAdminCustomExpressions"),A.addImport(m,"commonAdminViolationExpressions"),A.addImport(m,"createMapPublishedRevisionDataHandlerFactory"),A.addImport(m,"createMapPublishedChunkedDataHandlerFactory"),A.addImport(m,"createDataRowValidatorHandler"),A.addImport(m,"createSheetValidatorHandler")),h||A.addImport(m,"createAssistantSetupHandlerFactory"),A.addTypeImport(m,"RuntimeExpressionContext"),A.addTypeImport(m,"SchemaOfObject"),d&&(A.addImport(m,"createActionFactory"),A.addTypeImport(m,"ActionDefinition"),A.addTypeImport("@salsita-ai/sdk/configurator","ConfiguratorExtensionSystems"));let{entityTypes:R,entitySchemas:v}=c.latestModel,I=[...c.latestModel.aliases],j=I.map(([e])=>String(e)),C=j.includes("RootEntity")?"RootEntity":"AnyDomainEntity",{resolvedVersions:M}=c,H=M.latestVersion,F=u?`${u}.`:"",P=new Map([...c.expressions.constants].map(([e,n])=>[String(e),n])),b=n(c,{typePrefix:u,isAdmin:h}),{enhancedReflectionType:w}=b,T=e=>{let n=P.get(e);if(!n)return"{}";let t=[...n].map(([e,n])=>{let t=s(n,A).replaceAll("\n","\n ");return` ${e}: ${t},`});return`{
1
+ import{skipApplicationTypeImports as e}from"../../common/index.js";import{getDomainFactoryTypes as n}from"./factory-types/index.js";import{generateComponentOpticsCode as t}from"./generate-component-optics.js";import{generateDefaultsBlock as a}from"./generate-defaults.js";import{generateInvariantsBlock as o}from"./generate-invariants.js";import{generateRelationExpressionsCode as i}from"./generate-relation-expressions.js";import{generateStaticValueCode as s}from"./generate-static-value-code.js";import{generateValueExpressionsCode as r}from"./generate-value-expressions.js";let m="@salsita-ai/sdk/domain",l=(e,n,t)=>{let a=[],o=[];for(let i of e.modelVersion.entitySchemas){let e=JSON.stringify(i.shapeSchema,null,2);a.push(`${t}const ${i.entityType} = new DomainEntityReflection<${n}${i.entityType}>('${i.entityType}', [${e}])`),o.push(String(i.entityType))}return{entityDecls:a.join("\n"),entityNames:o}};export const generateDomainBlock=p=>{let{domainSpec:$,invariants:c,actions:d,typePrefix:u,versionNsPrefix:y,isAdmin:h,modelVersionsExportName:f,relationExpressionsExportName:S,componentOpticsExportName:D,valueExpressionsExportName:E,createRecipeExportName:R,imports:g,registerApplicationTypeImports:x=e}=p;g.addImport(m,"$DomainEntityReflection"),g.addImport(m,"DomainBuilder"),g.addImport(m,"DomainComponentOpticBuilder"),g.addImport(m,"DomainEntityReflection"),g.addImport(m,"EnhancedAliasReflection"),g.addImport(m,"RawAliasReflection"),g.addImport(m,"SchemaReflection"),g.addImport(m,"createCustomExpressionFactory"),g.addImport(m,"createCustomInvariantFactory"),h&&(g.addImport(m,"commonAdminCustomExpressions"),g.addImport(m,"commonAdminViolationExpressions"),g.addImport(m,"createMapPublishedRevisionDataHandlerFactory"),g.addImport(m,"createMapPublishedChunkedDataHandlerFactory"),g.addImport(m,"createDataRowValidatorHandler"),g.addImport(m,"createSheetValidatorHandler")),h||g.addImport(m,"createAssistantSetupHandlerFactory"),g.addTypeImport(m,"RuntimeExpressionContext"),g.addTypeImport(m,"SchemaOfObject"),d&&g.addTypeImport(m,"ActionDefinition");let{entityTypes:v,entitySchemas:A}=$.latestModel,j=[...$.latestModel.aliases],C=j.map(([e])=>String(e)),I=C.includes("RootEntity")?"RootEntity":"AnyDomainEntity",{resolvedVersions:M}=$,H=M.latestVersion,P=u?`${u}.`:"",b=new Map([...$.expressions.constants].map(([e,n])=>[String(e),n])),w=n($,{typePrefix:u}),{enhancedReflectionType:F}=w,k=e=>{let n=b.get(e);if(!n)return"{}";let t=[...n].map(([e,n])=>{let t=s(n,g).replaceAll("\n","\n ");return` ${e}: ${t},`});return`{
2
2
  ${t.join("\n")}
3
- }`},k=v.map(e=>{let n=JSON.stringify(e.shapeSchema,null,2);return` const ${e.entityType} = new DomainEntityReflection<${F}${e.entityType}>('${e.entityType}', [${n}])`}),O=I.map(([e,n])=>{let t=n.map(String).join(", ");return` const ${e} = new RawAliasReflection<${F}${e}>('${e}', [${t}])`}),V=[...c.latestModel.commonTypes],B=V.map(([e])=>String(e)),N=M.versionedModels.filter(e=>!e.isLatest).map(e=>`${y}${e.version}`);x(A,[...h?["Admin",...N]:[...R.map(String),...j,...B,...R.map(e=>`$${String(e)}`),...j.map(e=>`$${e}`),"Aliases","$Map",...N,...d?["ActionTypes","NavigationState","ViewState","ToolState","ExportState"]:[]],"PublishedData","SessionData","FrontendData",...h?[]:["BackendData"]]);let J=V.map(([e,n])=>{let t=JSON.stringify(n.runtimeSchema,null,2);return n.schema.enum?.length&&n.schema.enum.every(e=>"string"==typeof e)?` const ${e}: EnumLike<${F}${e}> = new EnumReflection('${e}', ${t}) as EnumLike<${F}${e}>`:` const ${e}: SchemaReflection<${F}${e}> = new SchemaReflection('${e}', ${t})`}),L=[...c.latestModel.shapes],_=L.map(([e,n])=>{let t=JSON.stringify(n.runtimeSchema,null,2);return` const ${e}Shape = new SchemaReflection('${e}Shape', ${t})`}),z=L.map(([e])=>`${e}Shape`),G=j.map(e=>` ${e}: ${e}.types,`).join("\n"),q=j.map(e=>` ${e},`).join("\n"),K=B.map(e=>` ${e},`).join("\n"),Q=z.map(e=>` ${e},`).join("\n"),U=R.map(e=>` ${e},`).join("\n"),W=[];for(let[e,n]of c.expressions.expressions)n.size>0&&W.push(` const ${e}Expressions = ${JSON.stringify([...n.keys()])}`);let X=R.map(e=>{let n=c.expressions.entityExpressions.get(e),t=(n?.shapeGroups??[]).map(e=>`${e}Expressions`),a=t.length>0?t.map(e=>`...${e}`).join(", "):"",o=w("$DomainEntityReflection",String(e));return` const $${e}: ${o} = new ${o}('${e}', [${a}], ${T(String(e))})`}).join("\n"),Y=R.map(e=>` ${e}: $${e},`).join("\n"),Z=I.map(([e,n])=>{let t=n.map(e=>JSON.stringify(String(e))).join(", "),a=w("EnhancedAliasReflection",String(e));return` const $${e}: ${a} = new ${a}('$${e}', [${t}], ${T(String(e))})`}).join("\n"),ee=[...R.map(String),...j].map(e=>` $${e},`).join("\n"),en=[],et=[];for(let e of M.versionedModels)if(e.isLatest)en.push(` ${e.version}: entities,`),et.push(` readonly ${e.version}: {
4
- ${R.map(e=>` readonly ${String(e)}: DomainEntityReflection<${F}${String(e)}>`).join("\n")}
3
+ }`},O=A.map(e=>{let n=JSON.stringify(e.shapeSchema,null,2);return` const ${e.entityType} = new DomainEntityReflection<${P}${e.entityType}>('${e.entityType}', [${n}])`}),T=j.map(([e,n])=>{let t=n.map(String).join(", ");return` const ${e} = new RawAliasReflection<${P}${e}>('${e}', [${t}])`}),V=[...$.latestModel.commonTypes],B=V.map(([e])=>String(e)),N=M.versionedModels.filter(e=>!e.isLatest).map(e=>`${y}${e.version}`);x(g,[...h?["Admin",...N]:[...v.map(String),...C,...B,...v.map(e=>`$${String(e)}`),...C.map(e=>`$${e}`),"Aliases","$Map",...N,...d?["ActionTypes","NavigationState","ViewState","ToolState","ExportState"]:[]],"PublishedData","SessionData","FrontendData",...h?[]:["BackendData"]]);let J=V.map(([e,n])=>{let t=JSON.stringify(n.runtimeSchema,null,2);return n.schema.enum?.length&&n.schema.enum.every(e=>"string"==typeof e)?` const ${e}: EnumLike<${P}${e}> = new EnumReflection('${e}', ${t}) as EnumLike<${P}${e}>`:` const ${e}: SchemaReflection<${P}${e}> = new SchemaReflection('${e}', ${t})`}),L=[...$.latestModel.shapes],_=L.map(([e,n])=>{let t=JSON.stringify(n.runtimeSchema,null,2);return` const ${e}Shape = new SchemaReflection('${e}Shape', ${t})`}),z=L.map(([e])=>`${e}Shape`),G=C.map(e=>` ${e}: ${e}.types,`).join("\n"),q=C.map(e=>` ${e},`).join("\n"),K=B.map(e=>` ${e},`).join("\n"),Q=z.map(e=>` ${e},`).join("\n"),U=v.map(e=>` ${e},`).join("\n"),W=[];for(let[e,n]of $.expressions.expressions)n.size>0&&W.push(` const ${e}Expressions = ${JSON.stringify([...n.keys()])}`);let X=v.map(e=>{let n=$.expressions.entityExpressions.get(e),t=(n?.shapeGroups??[]).map(e=>`${e}Expressions`),a=t.length>0?t.map(e=>`...${e}`).join(", "):"",o=F("$DomainEntityReflection",String(e));return` const $${e}: ${o} = new ${o}('${e}', [${a}], ${k(String(e))})`}).join("\n"),Y=v.map(e=>` ${e}: $${e},`).join("\n"),Z=j.map(([e,n])=>{let t=n.map(e=>JSON.stringify(String(e))).join(", "),a=F("EnhancedAliasReflection",String(e));return` const $${e}: ${a} = new ${a}('$${e}', [${t}], ${k(String(e))})`}).join("\n"),ee=[...v.map(String),...C].map(e=>` $${e},`).join("\n"),en=[],et=[];for(let e of M.versionedModels)if(e.isLatest)en.push(` ${e.version}: entities,`),et.push(` readonly ${e.version}: {
4
+ ${v.map(e=>` readonly ${String(e)}: DomainEntityReflection<${P}${String(e)}>`).join("\n")}
5
5
  }`);else{let n=`${y}${e.version}.`,{entityDecls:t,entityNames:a}=l(e,n," "),o=a.map(e=>` ${e},`).join("\n");en.push(` ${e.version}: (() => {
6
6
  ${t}
7
7
  return {
@@ -9,26 +9,24 @@ ${o}
9
9
  } as const
10
10
  })(),`),et.push(` readonly ${e.version}: {
11
11
  ${a.map(e=>` readonly ${e}: DomainEntityReflection<${n}${e}>`).join("\n")}
12
- }`)}let ea=h?"adminDomainBuilder":"domainBuilder",eo=h?"attachAdminComponent":"attachComponent",ei=h?"implementAdminCustomExpressions":"implementCustomExpressions",es=h?"implementCustomAdminInvariants":"implementCustomInvariants",er=h?"adminAliases":"aliases",em=h?"adminModel":"model",el=h?"adminEnhancedModel":"enhancedModel",ep=h?"implementAdminRelation":"implementRelation",ec=h?"__adminDomain":"__configuratorDomain",e$=b.typeArguments,ed=`<${e$}>`,{contextExtension:eu}=b,ey=`<${e$}, ${eu}>`,eh=o($,e$,eu,A),ef=(e,n)=>e===n?e:`${e}: ${n}`,eS=[...c.expressions.expressions.values()].some(e=>[...e.values()].some(e=>"relation"===e.implementation.kind));eS&&A.addImport(m,"createRelationFactory");let eD=eS?`
12
+ }`)}let ea=h?"adminDomainBuilder":"domainBuilder",eo=h?"attachAdminComponent":"attachComponent",ei=h?"implementAdminCustomExpressions":"implementCustomExpressions",es=h?"implementCustomAdminInvariants":"implementCustomInvariants",er=h?"adminAliases":"aliases",em=h?"adminModel":"model",el=h?"adminEnhancedModel":"enhancedModel",ep=h?"implementAdminRelation":"implementRelation",e$=h?"__adminDomain":"__configuratorDomain",ec=w.typeArguments,ed=`<${ec}>`,{contextExtension:eu}=w,ey=`<${ec}, ${eu}>`,eh=o(c,ec,eu,g),ef=(e,n)=>e===n?e:`${e}: ${n}`,eS=[...$.expressions.expressions.values()].some(e=>[...e.values()].some(e=>"relation"===e.implementation.kind));eS&&g.addImport(m,"createRelationFactory");let eD=eS?`
13
13
  const ${ep} = createRelationFactory(aliases)
14
14
 
15
- const relationExpressions = ${i(c.expressions,ep)}`:"\n const relationExpressions = {} as const",eE=`
16
- const componentOptics = ${t(c.components,A)}`,eg=`
17
- const valueExpressions = ${r(c.expressions,A,"implementCustomExpressions",h?{PresetCategory:"commonAdminCustomExpressions.PresetCategory"}:{})}`;A.addImport(m,"createRecipeFactory");let eA=a(c.defaults,A),ex=[...d?.values()??[]].map(e=>({name:String(e.name),...void 0===e.description?{}:{description:e.description},params:e.paramsSchema})),eR=d?`
18
- const actionDefinitions: readonly ActionDefinition[] = ${JSON.stringify(ex,null,2).replaceAll("\n","\n ")}
19
-
20
- const implementActions = createActionFactory<${b.actionTypeArguments}>()`:"",ev=`
21
- const createRecipe = createRecipeFactory<${F}AnyDomainEntity>(aliases, AnyDomainEntity.reflections, defaults)`,{modelType:eI,enhancedModelType:ej}=b,eC=`{
15
+ const relationExpressions = ${i($.expressions,ep)}`:"\n const relationExpressions = {} as const",eE=`
16
+ const componentOptics = ${t($.components,g)}`,eR=`
17
+ const valueExpressions = ${r($.expressions,g,"implementCustomExpressions",h?{PresetCategory:"commonAdminCustomExpressions.PresetCategory"}:{})}`;g.addImport(m,"createRecipeFactory");let eg=a($.defaults,g),ex=[...d?.values()??[]].map(e=>({name:String(e.name),...void 0===e.description?{}:{description:e.description},params:e.paramsSchema})),ev=d?`
18
+ const actionDefinitions: readonly ActionDefinition[] = ${JSON.stringify(ex,null,2).replaceAll("\n","\n ")}`:"",eA=`
19
+ const createRecipe = createRecipeFactory<${P}AnyDomainEntity>(aliases, AnyDomainEntity.reflections, defaults)`,{modelType:ej,enhancedModelType:eC}=w,eI=`{
22
20
  ${et.join("\n")}
23
- }`;return`const ${ec} = (() => {
21
+ }`;return`const ${e$} = (() => {
24
22
  const modelVersion = ${H}
25
23
 
26
- ${eA}
27
-
28
- ${k.join("\n")}
24
+ ${eg}
29
25
 
30
26
  ${O.join("\n")}
31
27
 
28
+ ${T.join("\n")}
29
+
32
30
  ${J.join("\n")}
33
31
 
34
32
  ${_.join("\n")}
@@ -60,8 +58,8 @@ ${ee}
60
58
  } as const
61
59
 
62
60
  const implementCustomExpressions = createCustomExpressionFactory${ey}()
63
- ${eR}${eD}
64
- ${eg}
61
+ ${ev}${eD}
62
+ ${eR}
65
63
 
66
64
  const modelVersions = {
67
65
  ${en.join("\n")}
@@ -71,17 +69,17 @@ ${en.join("\n")}
71
69
  ${eh}
72
70
  ${h?` const commonInvariants = implementCustomInvariants(commonAdminViolationExpressions)
73
71
 
74
- const createMapPublishedRevisionDataHandler = createMapPublishedRevisionDataHandlerFactory<${F}AnyDomainEntity, ${F}RootEntity, ${F}$Map, PublishedData>()
75
- const createMapPublishedChunkedDataHandler = createMapPublishedChunkedDataHandlerFactory<${F}AnyDomainEntity, ${F}RootEntity, ${F}$Map>()
72
+ const createMapPublishedRevisionDataHandler = createMapPublishedRevisionDataHandlerFactory<${P}AnyDomainEntity, ${P}RootEntity, ${P}$Map, PublishedData>()
73
+ const createMapPublishedChunkedDataHandler = createMapPublishedChunkedDataHandlerFactory<${P}AnyDomainEntity, ${P}RootEntity, ${P}$Map>()
76
74
  `:"\n const createAssistantSetupHandler = createAssistantSetupHandlerFactory<SessionData, AnyDomainEntity, $Map, ActionTypes>()\n"}${eE}
77
- ${ev}
75
+ ${eA}
78
76
 
79
77
  return {
80
78
  domainBuilder: DomainBuilder.from${ed}(
81
79
  entities,
82
80
  aliases,
83
81
  $entityReflections,
84
- ${C}.types,
82
+ ${I}.types,
85
83
  modelVersion,
86
84
  PublishedData,
87
85
  SessionData,
@@ -89,7 +87,7 @@ ${ev}
89
87
  ${h?"undefined":"BackendData"},
90
88
  ${h}
91
89
  ).withExpressions(valueExpressions)${d?".withActions(actionDefinitions)":""},
92
- attachComponent,${d?"\n implementActions,":""}
90
+ attachComponent,
93
91
  implementCustomExpressions,
94
92
  implementCustomInvariants,
95
93
  aliases,${h?`
@@ -115,15 +113,14 @@ const {
115
113
  commonInvariants: commonAdminInvariants,
116
114
  createMapPublishedRevisionDataHandler,
117
115
  createMapPublishedChunkedDataHandler,`:`
118
- implementActions,
119
116
  createAssistantSetupHandler,`}
120
117
  ${ef("relationExpressions",S)},
121
118
  ${ef("valueExpressions",E)},
122
119
  ${ef("componentOptics",D)},
123
- ${ef("createRecipe",g)},
124
- } = ${ec}
120
+ ${ef("createRecipe",R)},
121
+ } = ${e$}
125
122
 
126
- const ${em}: ${eI} = ${ec}.model
127
- const ${el}: ${ej} = ${ec}.enhancedModel
128
- const ${f}: ${eC} = ${ec}.modelVersions
129
- export { ${ea}, ${eo}, ${ei}, ${es}, ${er}, ${h?"commonAdminInvariants, ":""}${em}, ${el}, ${S}, ${E}, ${D}, ${f}, ${g}${h?", createMapPublishedRevisionDataHandler, createMapPublishedChunkedDataHandler, createDataRowValidatorHandler, createSheetValidatorHandler":", implementActions, createAssistantSetupHandler"} }`};
123
+ const ${em}: ${ej} = ${e$}.model
124
+ const ${el}: ${eC} = ${e$}.enhancedModel
125
+ const ${f}: ${eI} = ${e$}.modelVersions
126
+ export { ${ea}, ${eo}, ${ei}, ${es}, ${er}, ${h?"commonAdminInvariants, ":""}${em}, ${el}, ${S}, ${E}, ${D}, ${f}, ${R}${h?", createMapPublishedRevisionDataHandler, createMapPublishedChunkedDataHandler, createDataRowValidatorHandler, createSheetValidatorHandler":", createAssistantSetupHandler"} }`};
@@ -10,7 +10,6 @@ globalThis.phx.domain = {
10
10
  enhancedModel,
11
11
  implementCustomExpressions,
12
12
  implementCustomInvariants,
13
- implementActions,
14
13
  createAssistantSetupHandler,
15
14
  attachComponent,
16
15
  createRecipe,
@@ -52,7 +51,6 @@ globalThis.phx.applicationTypes = {
52
51
  readonly enhancedModel: typeof enhancedModel
53
52
  readonly implementCustomExpressions: typeof implementCustomExpressions
54
53
  readonly implementCustomInvariants: typeof implementCustomInvariants
55
- readonly implementActions: typeof implementActions
56
54
  readonly createAssistantSetupHandler: typeof createAssistantSetupHandler
57
55
  readonly attachComponent: typeof attachComponent
58
56
  readonly createRecipe: typeof createRecipe
@@ -73,7 +71,6 @@ globalThis.phx.applicationTypes = {
73
71
  enhancedModel,
74
72
  implementCustomExpressions,
75
73
  implementCustomInvariants,
76
- implementActions,
77
74
  createAssistantSetupHandler,
78
75
  attachComponent,
79
76
  createRecipe,
@@ -1,9 +1,9 @@
1
- import{CodeImports as o}from"../common/code-imports.js";import{autoHeader as i}from"../common/file-headers.js";let n=/v(\d+)\.ts$/,s=(o,i)=>o.versionedModels.filter(o=>void 0!==o.migrationFile).map(o=>({version:o.version,file:o.migrationFile,importName:i?`${i}MigrateToV${o.version}`:`migrateToV${o.version}`})),t=o=>o.map(o=>{let i=o.file.replace(n,`v${o.version}.js`),s=`migrateToV${o.version}`,t=o.importName!==s?` as ${o.importName}`:"";return`import { ${s}${t} } from '../${i}'`}).join("\n"),e=(o,i,n,s)=>[`const ${s}Migrations = {`,...o.map(o=>` ${o.version}: ${o.importName},`),"}","",`const ${s} = createMigrateFunction(${i}, ${n}, ${s}Migrations)`].join("\n");export const generateApplicationSpecDomainFile=n=>{let a=new o,r="./domain-spec.js",m="./configurator-domain-code.js",d="./admin-domain-code.js",p="@salsita-ai/sdk/domain",l=o=>[...o.expressions.values()].some(o=>[...o.values()].some(o=>"relation"===o.implementation.kind)),c=l(n.configurator.expressions),u=l(n.admin.expressions),x=s(n.configurator.resolvedVersions,""),I=s(n.admin.resolvedVersions,"admin"),g=x.length>0,h=I.length>0;a.addImport(r,"baseConfiguratorBuilder"),a.addImport(r,"domainBuilder"),a.addImport(r,"adminDomainBuilder"),a.addImport(r,"attachComponent"),a.addImport(r,"attachAdminComponent"),a.addImport(r,"implementCustomExpressions"),a.addImport(r,"implementAdminCustomExpressions"),a.addImport(r,"createI18n"),a.addImport(r,"componentOptics"),a.addImport(r,"adminComponentOptics"),a.addImport(r,"aliases"),a.addImport(r,"adminAliases"),a.addImport(r,"commonAdminInvariants"),a.addImport(p,"createViolationExpressions"),a.addImport(m,"customExpressions"),a.addImport(m,"customInvariants"),a.addImport(m,"customActions"),a.addImport(d,"customAdminExpressions"),a.addImport(d,"customAdminInvariants"),c&&a.addImport(r,"relationExpressions"),u&&a.addImport(r,"adminRelationExpressions"),(g||h)&&a.addImport(p,"createMigrateFunction"),g&&a.addImport(r,"modelVersions"),h&&a.addImport(r,"adminModelVersions");let $=[];g&&$.push(t(x)),h&&$.push(t(I));let v=$.length>0?"\n"+$.join("\n")+"\n":"",A=[];g&&A.push(e(x,"modelVersions",n.configurator.schemaVersion,"migrate")),h&&A.push(e(I,"adminModelVersions",n.admin.schemaVersion,"migrateAdmin"));let E=A.length>0?"\n"+A.join("\n\n")+"\n":"",f=["const domainFactory = domainBuilder",c?" .withExpressions(relationExpressions)":null," .withExpressions(createViolationExpressions(aliases, customInvariants))"," .withExpressionModules(customExpressions)"," .withActionModules(customActions)",g?" .withMigrate(migrate)":null," .build()"].filter(Boolean).join("\n"),w=["const adminDomainFactory = adminDomainBuilder",u?" .withExpressions(adminRelationExpressions)":null," .withExpressions(createViolationExpressions(adminAliases, customAdminInvariants, commonAdminInvariants))"," .withExpressionModules(customAdminExpressions)",h?" .withMigrate(migrateAdmin)":null," .build()"].filter(Boolean).join("\n");return`${i("domain.ts","Assembles domain and admin domain factories from builders, migrations, expressions and invariants.")}
1
+ import{CodeImports as o}from"../common/code-imports.js";import{autoHeader as i}from"../common/file-headers.js";let n=/v(\d+)\.ts$/,s=(o,i)=>o.versionedModels.filter(o=>void 0!==o.migrationFile).map(o=>({version:o.version,file:o.migrationFile,importName:i?`${i}MigrateToV${o.version}`:`migrateToV${o.version}`})),e=o=>o.map(o=>{let i=o.file.replace(n,`v${o.version}.js`),s=`migrateToV${o.version}`,e=o.importName!==s?` as ${o.importName}`:"";return`import { ${s}${e} } from '../${i}'`}).join("\n"),t=(o,i,n,s)=>[`const ${s}Migrations = {`,...o.map(o=>` ${o.version}: ${o.importName},`),"}","",`const ${s} = createMigrateFunction(${i}, ${n}, ${s}Migrations)`].join("\n");export const generateApplicationSpecDomainFile=n=>{let a=new o,r="./domain-spec.js",m="./configurator-domain-code.js",d="./admin-domain-code.js",p="@salsita-ai/sdk/domain",l=o=>[...o.expressions.values()].some(o=>[...o.values()].some(o=>"relation"===o.implementation.kind)),c=l(n.configurator.expressions),u=l(n.admin.expressions),x=s(n.configurator.resolvedVersions,""),g=s(n.admin.resolvedVersions,"admin"),I=x.length>0,h=g.length>0;a.addImport(r,"baseConfiguratorBuilder"),a.addImport(r,"domainBuilder"),a.addImport(r,"adminDomainBuilder"),a.addImport(r,"attachComponent"),a.addImport(r,"attachAdminComponent"),a.addImport(r,"implementCustomExpressions"),a.addImport(r,"implementAdminCustomExpressions"),a.addImport(r,"createI18n"),a.addImport(r,"componentOptics"),a.addImport(r,"adminComponentOptics"),a.addImport(r,"aliases"),a.addImport(r,"adminAliases"),a.addImport(r,"commonAdminInvariants"),a.addImport(p,"createViolationExpressions"),a.addImport(m,"customExpressions"),a.addImport(m,"customInvariants"),a.addImport(d,"customAdminExpressions"),a.addImport(d,"customAdminInvariants"),c&&a.addImport(r,"relationExpressions"),u&&a.addImport(r,"adminRelationExpressions"),(I||h)&&a.addImport(p,"createMigrateFunction"),I&&a.addImport(r,"modelVersions"),h&&a.addImport(r,"adminModelVersions");let $=[];I&&$.push(e(x)),h&&$.push(e(g));let v=$.length>0?"\n"+$.join("\n")+"\n":"",E=[];I&&E.push(t(x,"modelVersions",n.configurator.schemaVersion,"migrate")),h&&E.push(t(g,"adminModelVersions",n.admin.schemaVersion,"migrateAdmin"));let f=E.length>0?"\n"+E.join("\n\n")+"\n":"",A=["const domainFactory = domainBuilder",c?" .withExpressions(relationExpressions)":null," .withExpressions(createViolationExpressions(aliases, customInvariants))"," .withExpressionModules(customExpressions)",I?" .withMigrate(migrate)":null," .build()"].filter(Boolean).join("\n"),C=["const adminDomainFactory = adminDomainBuilder",u?" .withExpressions(adminRelationExpressions)":null," .withExpressions(createViolationExpressions(adminAliases, customAdminInvariants, commonAdminInvariants))"," .withExpressionModules(customAdminExpressions)",h?" .withMigrate(migrateAdmin)":null," .build()"].filter(Boolean).join("\n");return`${i("domain.ts","Assembles domain and admin domain factories from builders, migrations, expressions and invariants.")}
2
2
  ${a.toString()}
3
3
  ${v}export { attachComponent, attachAdminComponent, implementCustomExpressions, implementAdminCustomExpressions, createI18n }
4
- ${E}
5
4
  ${f}
6
- ${w}
5
+ ${A}
6
+ ${C}
7
7
 
8
8
  export const configuratorBuilder = baseConfiguratorBuilder
9
9
  .withDomainFactory(domainFactory)
@@ -1,17 +1,21 @@
1
- import{generateEnvReader as e}from"../common/env-reader.js";import{autoHeader as t}from"../common/file-headers.js";let o={IS_DEV:{type:"bool",default:!1,devDefault:!0},SERVER_URL:{type:"str",devDefault:"http://localhost:3000"},ENVIRONMENT_ID:{type:"str"},DEPLOYMENT_ID:{type:"str"},GTM_ID:{type:"str"},GTM_DEBUG:{type:"bool",default:!1,devDefault:!0},PERSISTENCE_MODE:{type:"str",default:"server",devDefault:"server",choices:["memory","local-storage","server"]},DATADOG_SITE:{type:"str"},DATADOG_CLIENT_TOKEN:{type:"str"},DATADOG_ENABLED:{type:"bool",default:!0,devDefault:!1},SERVICE_NAME:{type:"str",devDefault:"local"},RESOURCES_URL:{type:"str",devDefault:"http://localhost:5173"}},r={CLERK_PUBLISHABLE_KEY:{type:"str",required:!0}};export const generateApplicationSpecFrontendConfig=a=>{let n=a.infra.env?.frontend??{},d=a.appMetadata.useClerk?r:{},{imports:l,config:p}=e({...o,...d,...n}),i=[...l,"createEnvReader"].sort();return`${t("frontend.config.ts","Runtime environment config for the frontend (Vite-injected env vars).")}
2
- import { ${i.join(", ")} } from '@salsita-ai/sdk/common/env'
1
+ import{generateEnvReader as e}from"../common/env-reader.js";import{autoHeader as t}from"../common/file-headers.js";let o={IS_DEV:{type:"bool",default:!1,devDefault:!0},SERVER_URL:{type:"str",devDefault:"http://localhost:3000"},ENVIRONMENT_ID:{type:"str"},DEPLOYMENT_ID:{type:"str"},GTM_ID:{type:"str"},GTM_DEBUG:{type:"bool",default:!1,devDefault:!0},PERSISTENCE_MODE:{type:"str",default:"server",devDefault:"server",choices:["memory","local-storage","server"]},DATADOG_SITE:{type:"str"},DATADOG_CLIENT_TOKEN:{type:"str"},DATADOG_ENABLED:{type:"bool",default:!0,devDefault:!1},SERVICE_NAME:{type:"str",devDefault:"local"},RESOURCES_URL:{type:"str",devDefault:"http://localhost:5173"}},r={CLERK_PUBLISHABLE_KEY:{type:"str",required:!0}};export const generateApplicationSpecFrontendConfig=a=>{let n=a.infra.env?.frontend??{},d=a.appMetadata.useClerk?r:{},{imports:i,config:l}=e({...o,...d,...n}),p=[...i,"createEnvReader"].sort();return`${t("frontend.config.ts","Runtime environment config for the frontend (Vite-injected env vars).")}
2
+ import { ${p.join(", ")} } from '@salsita-ai/sdk/common/env'
3
3
 
4
- export const readRuntimeConfig = createEnvReader(${p})
4
+ export const readRuntimeConfig = createEnvReader(${l})
5
5
 
6
6
  export type RuntimeConfig = ReturnType<typeof readRuntimeConfig>
7
7
 
8
8
  export interface FrontendBuildConfig {
9
9
  readonly jsonSchemaValidator: 'ajv' | 'csp-compatible'
10
10
  readonly gltfDecoder: 'js' | 'wasm'
11
+ readonly gltfDecoderWorkerLimit: number
12
+ readonly exportPixelRatio: number | undefined
11
13
  }
12
14
 
13
15
  export const frontendBuildConfig: FrontendBuildConfig = {
14
16
  jsonSchemaValidator: '${a.appMetadata.jsonSchemaValidator}',
15
17
  gltfDecoder: '${a.appMetadata.gltfDecoder}',
18
+ gltfDecoderWorkerLimit: ${a.appMetadata.gltfDecoderWorkerLimit},
19
+ exportPixelRatio: ${a.appMetadata.exportPixelRatio??"undefined"},
16
20
  }
17
21
  `};
@@ -4,8 +4,8 @@ import type { CodeImports } from '../../common/code-imports.js';
4
4
  /**
5
5
  * Generates the `ActionTypes` map of the declared actions (name → `{ params, result }`) and the
6
6
  * `ActionName`, `ActionParams<NAME>` and `ActionResult<NAME>` types derived from it. A nullable
7
- * param is optional. The `description` of an action, a param and a result member becomes the doc
8
- * comment of its property, so it shows wherever the types are used. Without actions the map is
9
- * empty, so `ActionName` is `never`.
7
+ * param is optional, and an action without a result has a `void` result. The `description` of an
8
+ * action, a param and a result member becomes the doc comment of its property, so it shows
9
+ * wherever the types are used. Without actions the map is empty, so `ActionName` is `never`.
10
10
  */
11
11
  export declare const generateActionTypeDecls: (actions: Actions, model: ModelVersion, phxDefinitions: PhoenixDefinitions, imports: CodeImports, indent: number, typeOnlyImports?: boolean) => string;
@@ -1,8 +1,8 @@
1
- import{docComment as e}from"../common/doc-comment.js";import{schemaToTypeString as t}from"../common/schema-to-type-string.js";export const generateActionTypeDecls=(n,o,r,a,s,p=!1)=>{let c=" ".repeat(s),i=" ".repeat(s+2),m=" ".repeat(s+4),$=" ".repeat(s+6),y={phxDefinitions:r,commonTypeNames:new Set(o.commonTypes.keys()),imports:a,typeOnlyImports:p},l=[...n.values()].map(n=>{let o=Object.entries(n.params).flatMap(([n,{schema:o,required:r}])=>[...e(o.description,$),`${$}readonly ${n}${r?"":"?"}: ${t(o,y)}`]),r=Object.entries(n.result).flatMap(([n,o])=>[...e(o.description,$),`${$}readonly ${n}: ${t(o,y)}`]),a=e=>e.length>0?`{
1
+ import{docComment as e}from"../common/doc-comment.js";import{schemaToTypeString as t}from"../common/schema-to-type-string.js";export const generateActionTypeDecls=(n,o,r,s,a,p=!1)=>{let c=" ".repeat(a),i=" ".repeat(a+2),m=" ".repeat(a+4),$=" ".repeat(a+6),y={phxDefinitions:r,commonTypeNames:new Set(o.commonTypes.keys()),imports:s,typeOnlyImports:p},l=[...n.values()].map(n=>{let o=Object.entries(n.params).flatMap(([n,{schema:o,required:r}])=>[...e(o.description,$),`${$}readonly ${n}${r?"":"?"}: ${t(o,y)}`]),r=Object.entries(n.result??{}).flatMap(([n,o])=>[...e(o.description,$),`${$}readonly ${n}: ${t(o,y)}`]),s=e=>e.length>0?`{
2
2
  ${e.join("\n")}
3
- ${m}}`:"Record<string, never>";return[...e(n.description,i),`${i}readonly ${n.name}: {`,`${m}readonly params: ${a(o)}`,`${m}readonly result: ${a(r)}`,`${i}}`].join("\n")}),A=l.length>0?`{
3
+ ${m}}`:"Record<string, never>";return[...e(n.description,i),`${i}readonly ${n.name}: {`,`${m}readonly params: ${s(o)}`,`${m}readonly result: ${n.result?s(r):"void"}`,`${i}}`].join("\n")}),d=l.length>0?`{
4
4
  ${l.join("\n")}
5
- ${c}}`:"Record<never, never>";return`${c}type ActionTypes = ${A}
5
+ ${c}}`:"Record<never, never>";return`${c}type ActionTypes = ${d}
6
6
  ${c}type ActionName = keyof ActionTypes
7
7
  ${c}type ActionParams<NAME extends ActionName> = ActionTypes[NAME]['params']
8
8
  ${c}type ActionResult<NAME extends ActionName> = ActionTypes[NAME]['result']`};
@@ -1,12 +1,16 @@
1
1
  import type { AssistantFormElementDescriptor } from '#package/domain';
2
+ import type { EnhancedJsonSchemaType } from '../../../../core/enhanced-json-schema.js';
2
3
  import type { PhoenixDefinitions } from '../../../../core/phoenix-definitions.js';
3
4
  import type { CodeImports } from '../../common/code-imports.js';
4
5
  /**
5
6
  * Generates the `AssistantFormElementTypes` map of the project's own assistant form elements (name →
6
- * `{ role, attributes }`), and the `AssistantFormElementName` and `AssistantFormElementProps<NAME>`
7
- * types derived from it, which `phx.frontend.createAssistantFormElement` is typed by. An attribute
8
- * outside `required` is optional and an enum is a union of its values. The `description` of an element becomes the doc
9
- * comment of its property. Without elements the map is empty, so `AssistantFormElementName` is
10
- * `never`.
7
+ * `{ role, attributes, state? }`), and the `AssistantFormElementName` and
8
+ * `AssistantFormElementProps<NAME>` types derived from it, which
9
+ * `phx.frontend.createAssistantFormElement` is typed by. An attribute outside `required` is optional
10
+ * and an enum is a union of its values. An input that declares a `state` schema in `states` gets it
11
+ * as its `state` type, with its `description` as the doc comment, whose `$ref`s resolve as in action params, `common:` ones among
12
+ * `commonTypeNames`; one without it has no `state`, so
13
+ * its component holds `unknown`. The `description` of an element becomes the doc comment of its
14
+ * property. Without elements the map is empty, so `AssistantFormElementName` is `never`.
11
15
  */
12
- export declare const generateAssistantFormElementTypeDecls: (formElements: readonly AssistantFormElementDescriptor[], phxDefinitions: PhoenixDefinitions, imports: CodeImports, indent: number) => string;
16
+ export declare const generateAssistantFormElementTypeDecls: (formElements: readonly AssistantFormElementDescriptor[], states: Readonly<Record<string, EnhancedJsonSchemaType>>, commonTypeNames: ReadonlySet<string>, phxDefinitions: PhoenixDefinitions, imports: CodeImports, indent: number) => string;
@@ -1,7 +1,7 @@
1
- import{docComment as e}from"../common/doc-comment.js";import{formatPropertyKey as t}from"../common/format-property-key.js";import{schemaToTypeString as n}from"../common/schema-to-type-string.js";export const generateAssistantFormElementTypeDecls=(o,r,s,m)=>{let a=" ".repeat(m),p=" ".repeat(m+2),l=" ".repeat(m+4),i=" ".repeat(m+6),$={phxDefinitions:r,commonTypeNames:new Set,imports:s},y=o.map(({name:o,role:r,description:s,attributes:m,required:a=[]})=>{let y=Object.entries(m).map(([e,o])=>`${i}readonly ${t(e)}${a.includes(e)?"":"?"}: ${n({...o},$)}`);return[...e(s,p),`${p}readonly ${t(o)}: {`,`${l}readonly role: '${r}'`,`${l}readonly attributes: ${y.length>0?`{
2
- ${y.join("\n")}
3
- ${l}}`:"Record<never, never>"}`,`${p}}`].join("\n")});s.addTypeImport("@salsita-ai/sdk/configurator","AssistantFormElementRoleProps");let c=y.length>0?`{
4
- ${y.join("\n")}
5
- ${a}}`:"Record<never, never>";return`${a}type AssistantFormElementTypes = ${c}
6
- ${a}type AssistantFormElementName = keyof AssistantFormElementTypes
7
- ${a}type AssistantFormElementProps<NAME extends AssistantFormElementName, STATE = unknown> = AssistantFormElementRoleProps<AssistantFormElementTypes[NAME], STATE>`};
1
+ import{docComment as e}from"../common/doc-comment.js";import{formatPropertyKey as t}from"../common/format-property-key.js";import{schemaToTypeString as o}from"../common/schema-to-type-string.js";export const generateAssistantFormElementTypeDecls=(n,r,s,m,a,i)=>{let p=" ".repeat(i),l=" ".repeat(i+2),$=" ".repeat(i+4),y=" ".repeat(i+6),d={phxDefinitions:m,commonTypeNames:s,imports:a},c=n.map(({name:n,role:s,description:m,attributes:a,required:i=[]})=>{let p=Object.hasOwn(r,n)?r[n]:void 0,c=Object.entries(a).map(([e,n])=>`${y}readonly ${t(e)}${i.includes(e)?"":"?"}: ${o({...n},d)}`);return[...e(m,l),`${l}readonly ${t(n)}: {`,`${$}readonly role: '${s}'`,`${$}readonly attributes: ${c.length>0?`{
2
+ ${c.join("\n")}
3
+ ${$}}`:"Record<never, never>"}`,...void 0===p?[]:[...e(p.description,$),`${$}readonly state: ${o(p,d)}`],`${l}}`].join("\n")});a.addTypeImport("@salsita-ai/sdk/configurator","AssistantFormElementRoleProps");let A=c.length>0?`{
4
+ ${c.join("\n")}
5
+ ${p}}`:"Record<never, never>";return`${p}type AssistantFormElementTypes = ${A}
6
+ ${p}type AssistantFormElementName = keyof AssistantFormElementTypes
7
+ ${p}type AssistantFormElementProps<NAME extends AssistantFormElementName> = AssistantFormElementRoleProps<AssistantFormElementTypes[NAME]>`};
@@ -1,14 +1,13 @@
1
1
  import{generateInvariantBlueprintMembers as e,getDomainFactoryTypes as t}from"../domain-spec/index.js";let a="@salsita-ai/sdk/configurator",n="CustomInvariantBlueprints",o="AdminCustomInvariantBlueprints",r=["authHandlerBuilder","webhookBuilder","taskFactory","finalizeHandlerBuilder","callbackBuilder","prefetchBuilder","dynamicResourcesFactory"],i=(e,t)=>e.replaceAll("\n",`
2
- ${t}`),s=(e,t)=>{let a=(e.infra.resources??[]).map(e=>JSON.stringify(e.name));return["AnyDomainEntity","RootEntity","$Map","NavigationState","ViewState","ToolState","ExportState","PublishedData","SessionData","FrontendData",...t?["ActionTypes"]:[],"Admin.AnyDomainEntity","Admin.RootEntity","Admin.$Map","AdminNavigationState","never","FinalizeData","PrefetchedFinalizeData","FinalizeResult","CallbackData",a.length>0?[...new Set(a)].join(" | "):"never"].join(", ")},d=()=>{let e=new Map;return{member:(t,a)=>(e.set(t,a),t),declarations:()=>[...e].map(([e,t])=>`type ${e} = ${t}`).join("\n")}},p=(r,d,p)=>{for(let e of["$DomainEntityReflection","DomainComponentOpticBuilder","DomainEntityReflection","EnhancedAliasReflection","EnumLike","RawAliasReflection","RuntimeExpressionContext","SchemaReflection","createActionFactory","createAssistantSetupHandlerFactory","createCustomExpressionFactory","createCustomInvariantFactory","createDataRowValidatorHandler","createMapPublishedChunkedDataHandlerFactory","createMapPublishedRevisionDataHandlerFactory","createRecipeFactory","createSheetValidatorHandler"])d.addTypeImport("@salsita-ai/sdk/domain",e);d.addTypeImport(a,"createConfiguratorInterface"),d.addTypeImport(a,"CreateAssistantFormElement"),d.addTypeImport(a,"ConfiguratorExtensionSystems");let l=t(r.configurator,{typePrefix:"",isAdmin:!1}),m=t(r.admin,{typePrefix:"Admin",isAdmin:!0}),y=s(r,!0),c=(e,t)=>t?`interface ${e} {
2
+ ${t}`),s=(e,t)=>{let a=(e.infra.resources??[]).map(e=>JSON.stringify(e.name));return["AnyDomainEntity","RootEntity","$Map","NavigationState","ViewState","ToolState","ExportState","PublishedData","SessionData","FrontendData",...t?["ActionTypes"]:[],"Admin.AnyDomainEntity","Admin.RootEntity","Admin.$Map","AdminNavigationState","never","FinalizeData","PrefetchedFinalizeData","FinalizeResult","CallbackData",a.length>0?[...new Set(a)].join(" | "):"never"].join(", ")},d=()=>{let e=new Map;return{member:(t,a)=>(e.set(t,a),t),declarations:()=>[...e].map(([e,t])=>`type ${e} = ${t}`).join("\n")}},l=(r,d,l)=>{for(let e of["$DomainEntityReflection","DomainComponentOpticBuilder","DomainEntityReflection","EnhancedAliasReflection","EnumLike","RawAliasReflection","RuntimeExpressionContext","SchemaReflection","createAssistantSetupHandlerFactory","createCustomExpressionFactory","createCustomInvariantFactory","createDataRowValidatorHandler","createMapPublishedChunkedDataHandlerFactory","createMapPublishedRevisionDataHandlerFactory","createRecipeFactory","createSheetValidatorHandler"])d.addTypeImport("@salsita-ai/sdk/domain",e);d.addTypeImport(a,"createConfiguratorInterface"),d.addTypeImport(a,"CreateAssistantFormElement");let p=t(r.configurator,{typePrefix:""}),m=t(r.admin,{typePrefix:"Admin"}),y=s(r,!0),c=(e,t)=>t?`interface ${e} {
3
3
  ${t}
4
- }`:`interface ${e} {}`,{member:u}=p,A=`{
5
- readonly model: ${i(l.modelType," ")}
6
- readonly enhancedModel: ${i(l.enhancedModelType," ")}
7
- readonly implementCustomExpressions: ${u("PhxImplementCustomExpressions",`ReturnType<typeof createCustomExpressionFactory<${l.typeArguments}, ${l.contextExtension}>>`)}
8
- readonly implementCustomInvariants: ${u("PhxImplementCustomInvariants",`ReturnType<ReturnType<typeof createCustomInvariantFactory<${l.typeArguments}, ${n}, ${l.contextExtension}>>>`)}
9
- readonly implementActions: ${u("PhxImplementActions",`ReturnType<typeof createActionFactory<${l.actionTypeArguments}>>`)}
4
+ }`:`interface ${e} {}`,{member:u}=l,$=`{
5
+ readonly model: ${i(p.modelType," ")}
6
+ readonly enhancedModel: ${i(p.enhancedModelType," ")}
7
+ readonly implementCustomExpressions: ${u("PhxImplementCustomExpressions",`ReturnType<typeof createCustomExpressionFactory<${p.typeArguments}, ${p.contextExtension}>>`)}
8
+ readonly implementCustomInvariants: ${u("PhxImplementCustomInvariants",`ReturnType<ReturnType<typeof createCustomInvariantFactory<${p.typeArguments}, ${n}, ${p.contextExtension}>>>`)}
10
9
  readonly createAssistantSetupHandler: ${u("PhxCreateAssistantSetupHandler","ReturnType<typeof createAssistantSetupHandlerFactory<SessionData, AnyDomainEntity, $Map, ActionTypes>>")}
11
- readonly attachComponent: ${u("PhxAttachComponent",`ReturnType<typeof DomainComponentOpticBuilder.from<${l.typeArguments}, ${l.contextExtension}>>`)}
10
+ readonly attachComponent: ${u("PhxAttachComponent",`ReturnType<typeof DomainComponentOpticBuilder.from<${p.typeArguments}, ${p.contextExtension}>>`)}
12
11
  readonly createRecipe: ${u("PhxCreateRecipe","ReturnType<typeof createRecipeFactory<AnyDomainEntity>>")}
13
12
  readonly admin: {
14
13
  readonly model: ${i(m.modelType," ")}
@@ -22,12 +21,12 @@ ${t}
22
21
  readonly createSheetValidatorHandler: typeof createSheetValidatorHandler
23
22
  readonly createRecipe: ${u("PhxAdminCreateRecipe","ReturnType<typeof createRecipeFactory<Admin.AnyDomainEntity>>")}
24
23
  }
25
- }`,$=u("PhxFrontend",`ReturnType<typeof createConfiguratorInterface<${y}>> & {
24
+ }`,h=u("PhxFrontend",`ReturnType<typeof createConfiguratorInterface<${y}>> & {
26
25
  readonly createAssistantFormElement: CreateAssistantFormElement<AssistantFormElementTypes>
27
- }`),{latestModel:h}=r.configurator;return{declarations:[c(n,e(r.configurator.invariants," ")),c(o,e(r.admin.invariants," "))].join("\n\n"),domainType:A,configuratorInterfaceType:$,applicationTypeNames:[...h.entityTypes.map(String),...[...h.aliases].map(([e])=>String(e)),...[...h.commonTypes].map(([e])=>String(e)),...h.entityTypes.map(e=>`$${String(e)}`),...[...h.aliases].map(([e])=>`$${String(e)}`),"Aliases","$Map","ActionTypes","AssistantFormElementTypes","Admin","PublishedData","SessionData","FrontendData","BackendData","FinalizeData","PrefetchedFinalizeData","FinalizeResult","CallbackData","NavigationState","ViewState","ToolState","ExportState","AdminNavigationState"]}};export const generatePhxTypes=(e,t)=>{let a=d(),n=p(e,t,a);return{...n,declarations:`${n.declarations}
26
+ }`),{latestModel:A}=r.configurator;return{declarations:[c(n,e(r.configurator.invariants," ")),c(o,e(r.admin.invariants," "))].join("\n\n"),domainType:$,configuratorInterfaceType:h,applicationTypeNames:[...A.entityTypes.map(String),...[...A.aliases].map(([e])=>String(e)),...[...A.commonTypes].map(([e])=>String(e)),...A.entityTypes.map(e=>`$${String(e)}`),...[...A.aliases].map(([e])=>`$${String(e)}`),"Aliases","$Map","ActionTypes","AssistantFormElementTypes","Admin","PublishedData","SessionData","FrontendData","BackendData","FinalizeData","PrefetchedFinalizeData","FinalizeResult","CallbackData","NavigationState","ViewState","ToolState","ExportState","AdminNavigationState"]}};export const generatePhxTypes=(e,t)=>{let a=d(),n=l(e,t,a);return{...n,declarations:`${n.declarations}
28
27
 
29
- ${a.declarations()}`}};export const generateGlobalPhxTypes=(e,t)=>{let a=d(),{member:n}=a,o=p(e,t,a);t.addTypeImport("@salsita-ai/sdk/admin","createAdminInterface"),t.addTypeImport("@salsita-ai/sdk/webhook","createDomainWebhook");let i=s(e,!1),l=n("PhxFrontendAdmin",`ReturnType<typeof createAdminInterface<${i}>>`),m=n("PhxWebhookBuilders",`ReturnType<typeof createDomainWebhook<${i}>>`),y=r.map(e=>` readonly ${e}: ${n(`PhxWebhooks${e.charAt(0).toUpperCase()}${e.slice(1)}`,`${m}['${e}']`)}`);return{...o,declarations:`${o.declarations}
28
+ ${a.declarations()}`}};export const generateGlobalPhxTypes=(e,t)=>{let a=d(),{member:n}=a,o=l(e,t,a);t.addTypeImport("@salsita-ai/sdk/admin","createAdminInterface"),t.addTypeImport("@salsita-ai/sdk/webhook","createDomainWebhook");let i=s(e,!1),p=n("PhxFrontendAdmin",`ReturnType<typeof createAdminInterface<${i}>>`),m=n("PhxWebhookBuilders",`ReturnType<typeof createDomainWebhook<${i}>>`),y=r.map(e=>` readonly ${e}: ${n(`PhxWebhooks${e.charAt(0).toUpperCase()}${e.slice(1)}`,`${m}['${e}']`)}`);return{...o,declarations:`${o.declarations}
30
29
 
31
- ${a.declarations()}`,adminInterfaceType:l,webhooksType:`{
30
+ ${a.declarations()}`,adminInterfaceType:p,webhooksType:`{
32
31
  ${y.join("\n")}
33
32
  }`}};
@@ -1 +1 @@
1
- import{createPhoenixTopicGuide as e}from"../guide.js";export const generatePhoenixCliCore=()=>e({path:"core/cli.md",title:"CLI",summary:"tooling, identity, project structure and ownership, local development and deployment",sections:["## Tooling and dependencies\n\nCommands use pnpm notation; use the project's package manager identified by its lockfile or `packageManager` in `package.json`, and ask when neither identifies it. Keep the SDK on its intended release channel: stable, PR beta and workspace-linked projects must not be moved to canary.\n\n`phoenix deps` aligns missing or out-of-range peer dependencies in `package.json` but installs nothing. Install with the project's package manager, then `phoenix sync` regenerates project files and guidance. Refresh changed guidance after sync. An install with pnpm 11 that skips build scripts leaves placeholder entries under `allowBuilds` in `pnpm-workspace.yaml`; decide them, `true` for `@swc/core` and `esbuild` and `false` for `es5-ext`, because the platform build stops on a placeholder and `phoenix deploy` refuses one. [CLI and setup documentation](../features/index.md#cli-access-and-deployment) owns flags and installation details.\n\n## Identity and authentication\n\nA workspace contains projects, and a project has target environments and deployments. Confirm ambiguous identity before mutations or deploys. `phoenix login <workspace>` authorizes the CLI; local dev and deploy use that identity. Consult [project and authentication documentation](../features/index.md#cli-access-and-deployment) for local versus remote setup.\n\n## Project structure\n\n- `spec/` — domain, relations, expressions, invariants, components and application YAML.\n- `src/expressions/`, `actions/`, `invariants/`, `transformers/` — typed implementations of domain behavior and consistency rules.\n- `src/components/`, `elements/`, `handlers/` — runtime components, custom UI and layout elements, event and lifecycle handlers. See [Custom project layout](../features/custom-layout/index.md) and [Domain controls](../features/domain-controls/index.md).\n- `src/webhooks/` — the server side. The entry is the default export of `index.ts`, the only file imported; it imports the others. Without it the SDK supplies anonymous auth only, and enabling custom or Clerk auth reports `AUTH_WITHOUT_PROJECT_WEBHOOK`. See [Webhooks](../features/webhooks/index.md).\n- `src/migrations/` — versioned model migrations; `src/admin/` mirrors the main source structure for Admin.\n- `src/locales/` — authored PO catalogs and generated TS catalogs.\n- `src/_shared/`, `src/_utils/` and other `_`-prefixed folders — helpers and supporting modules. Phoenix skips these folders during auto-import; import their modules explicitly.\n- `public/` — static models, textures, images and fonts; `assets/` — uploadable resources such as templates and email assets.\n- `docs/` — rendered specification PDFs for the client.\n- `tools/` — reproducible project scripts, such as model conversion or rendering the specification PDFs. One-off scripts, screenshots and downloads stay in the agent's scratch space outside the project.\n- `.phoenix/` — generated files, with the project-owned exceptions below. The root `tsconfig.json` belongs to the project and extends `.phoenix/tsconfig.json`.\n\nDo not edit generated output or compiled locale TS. `.phoenix/workspace/` holds the specification sources and project records; application-spec sync, build and clean preserve it, and the generated Git ignore rules leave it available for version control. Deploy includes `.phoenix/workspace/` and `docs/` in the private deployment sources, outside application inputs and public assets. `.phoenix/variants/` option files survive rebuilds. Legacy tooling has a separate lifecycle.\n\nSync rewrites and prunes Phoenix's `phoenix` and `phoenix-*` skill folders under `.claude/skills/` and `.agents/skills/`; keep custom skills under another name. Root `AGENTS.md` and client source documents are client-owned. Components use PascalCase TSX, utilities kebab-case TS, expressions entity-name TS, migrations sequential `v*.ts` and specs kebab-case YAML. `docs/phoenix/project-structure.mdx` has the full reference; the [capability index](../features/index.md#project-and-customization) lists it.\n\n### Source conventions\n\n- Auto-imported expressions, actions, invariants, transformers, components, handlers and elements must default-export their folder's phx factory result, as one item or an array. Named exports are ignored.\n- `phx` is a global in every project: use it without importing it.\n- Keep plain helpers in underscore folders and import them explicitly.\n- Use relative imports: dev, build and webhook bundling do not resolve tsconfig `paths` aliases.\n\n## Local development\n\n`phoenix dev` runs the live preview, `sync` regenerates without bundling, `build` produces the production build, and `check` checks project quality.\n\n### Keep the preview in front of the client\n\nThe client should see the configurator change while it is built. Before the first change in a conversation, make sure `pnpm phoenix dev` is running, starting it in the background when it is not, and wait for the `Preview: <url>` line it prints and writes to `.phoenix/phoenix-dev.log`. The log keeps the lines of earlier runs, so use the last one written after the start.\n\nFor a new project, start by understanding the client’s product and what they want to configure before asking them to sign in; then make the preview reflect that before showing it, rather than presenting the generated starter scene.\n\nOpen the address where the client can see it: in the agent application's built-in browser when it has one the client sees, otherwise in the client's browser with `open '<url>'` on macOS, `xdg-open '<url>'` on Linux or `Start-Process '<url>'` in PowerShell. Keep the quotes; the shell would otherwise read a `?` in the address as a pattern. Then tell the client in one line where the preview is and that it updates by itself as the work goes on. Variant comparisons open in the same preview, so say there what to compare and how to choose.\n\nOpen it once: the preview reloads on every change. A domain model change is the exception. Dev registers the model with the server only when it starts and logs an error asking for a restart; restart it, wait for the new `Preview:` line and open that address in place of the old tab, whose `?cid=` names a configuration of the earlier model.\n\n### Logs and inspection\n\nLogs in `.phoenix/phoenix-dev.log` contain spec, build and runtime errors and watcher events; check them after changes. Signed in, `phoenix dev` runs in agent mode: the preview hides the editor, a corner badge shows when the latest change didn't build, and any dev error shows an \"Agent at work\" screen with no details, so the client never sees them. The details are only in the log; the page recovers by itself after the next successful rebuild. `--editor` shows the editor and the detailed error pages. [Inspection tools](../features/inspection.md) cover assets, state, data, scene and screenshots. Runtime inspection needs dev running and the preview open in a browser; a screenshot of the canvas does not verify the surrounding interface.\n\n## Deployment\n\n`pnpm phoenix deploy` sends the project sources for a server build and waits for the target environment to go live. Run it so its output can be read while it runs: right after `Build <id> started` it prints `Follow the build in Studio: <url>`. Open that link where the client sees it, as with the preview, so they can follow the build. When the line is missing, the sign-in predates the link: the build is listed under Deployments in Studio, and `pnpm phoenix login <workspace>` brings the link back.\n\nA successful local preview does not establish deployed model compatibility. The deploy is refused before the upload when the domain model changed under a version that is already deployed, such as a starter deployed before the first draft; [Model migration](../processes/model-migration.md) handles that. When the build fails, tell the client the cause and the next step. Record each deploy and its outcome in the project record. [Deployment documentation](../features/index.md#cli-access-and-deployment) covers status and environment details.\n\n## Internal beta\n\nPhoenix is in an internal beta. Read [Beta](../processes/beta.md) before each deploy and when a deploy goes live; a project on the `canary` SDK build also reads it once per conversation before changing anything.\n\n## Interactive and support tools\n\n[Variants](../features/variants.md) compares frontend alternatives over the live preview and applies the choice. [Feedback](../processes/feedback/index.md) submits an approved issue or evaluation. The [workflow](workflow.md) owns when either is useful and how much client interaction fits the task."]});
1
+ import{createPhoenixTopicGuide as e}from"../guide.js";export const generatePhoenixCliCore=()=>e({path:"core/cli.md",title:"CLI",summary:"tooling, identity, project structure and ownership, local development and deployment",sections:["## Tooling and dependencies\n\nCommands use pnpm notation; use the project's package manager identified by its lockfile or `packageManager` in `package.json`, and ask when neither identifies it. Keep the SDK on its intended release channel: stable, PR beta and workspace-linked projects must not be moved to canary.\n\n`phoenix deps` aligns missing or out-of-range peer dependencies in `package.json` but installs nothing. Install with the project's package manager, then `phoenix sync` regenerates project files and guidance. Refresh changed guidance after sync. An install with pnpm 11 that skips build scripts leaves placeholder entries under `allowBuilds` in `pnpm-workspace.yaml`; decide them, `true` for `@swc/core` and `esbuild` and `false` for `es5-ext`, because the platform build stops on a placeholder and `phoenix deploy` refuses one. [CLI and setup documentation](../features/index.md#cli-access-and-deployment) owns flags and installation details.\n\n## Identity and authentication\n\nA workspace contains projects, and a project has target environments and deployments. Confirm ambiguous identity before mutations or deploys. `phoenix login` authorizes the CLI across currently permitted Builder projects. `phoenix dev` and `phoenix deploy` work in the project that `--project <slug>` names, else the one `project` in `spec/application.yaml` names; the starter spec names none. With neither, a run without a terminal uses the only project the sign-in can reach and prints the `project: <slug>` line to add, so add it; when it can reach several, the command stops and lists them, and the client chooses the slug to set as `project` or to pass as `--project`. `project: default` no longer names a project: replace it with a slug from the list. `phoenix whoami` shows current access. The legacy `phoenix login <workspace>` form keeps workspace-bound credentials. For CI deploys, a superadmin creates a deploy-only token in Studio for one project they manage, or a workspace superadmin for the whole workspace, and supplies `PHOENIX_API_TOKEN` through the process environment. It overrides saved login only for deploy and whoami; never print it, write it into project files, or load it from dotenv. The token belongs to that project or workspace, not to the person who created it, and keeps deploying after that person leaves, until someone who manages the scope revokes it. Consult [project and authentication documentation](../features/index.md#cli-access-and-deployment) for local versus remote setup.\n\n## Project structure\n\n- `spec/` — domain, relations, expressions, invariants, components and application YAML.\n- `src/expressions/`, `actions/`, `invariants/`, `transformers/` — typed implementations of domain behavior and consistency rules.\n- `src/components/`, `elements/`, `handlers/` — runtime components, custom UI and layout elements, event and lifecycle handlers. See [Custom project layout](../features/custom-layout/index.md) and [Domain controls](../features/domain-controls/index.md).\n- `src/webhooks/` — the server side. The entry is the default export of `index.ts`, the only file imported; it imports the others. Without it the SDK supplies anonymous auth, or invitation-only Phoenix auth when `useCognito: true`; enabling custom or Clerk auth without it reports `AUTH_WITHOUT_PROJECT_WEBHOOK`. See [Webhooks](../features/webhooks/index.md).\n- `src/migrations/` — versioned model migrations; `src/admin/` mirrors the main source structure for Admin.\n- `src/locales/` — authored PO catalogs and generated TS catalogs.\n- `src/_shared/`, `src/_utils/` and other `_`-prefixed folders — helpers and supporting modules. Phoenix skips these folders during auto-import; import their modules explicitly.\n- `public/` — static models, textures, images and fonts; `assets/` — uploadable resources such as templates and email assets.\n- `docs/` — rendered specification PDFs for the client.\n- `tools/` — reproducible project scripts, such as model conversion or rendering the specification PDFs. One-off scripts, screenshots and downloads stay in the agent's scratch space outside the project.\n- `.phoenix/` — generated files, with the project-owned exceptions below. The root `tsconfig.json` belongs to the project and extends `.phoenix/tsconfig.json`.\n\nDo not edit generated output or compiled locale TS. `.phoenix/workspace/` holds the specification sources and project records; application-spec sync, build and clean preserve it, and the generated Git ignore rules leave it available for version control. Deploy includes `.phoenix/workspace/` and `docs/` in the private deployment sources, outside application inputs and public assets. `.phoenix/variants/` option files survive rebuilds. Legacy tooling has a separate lifecycle.\n\nSync rewrites and prunes Phoenix's `phoenix` and `phoenix-*` skill folders under `.claude/skills/` and `.agents/skills/`; keep custom skills under another name. Root `AGENTS.md` and client source documents are client-owned. Components use PascalCase TSX, utilities kebab-case TS, expressions entity-name TS, migrations sequential `v*.ts` and specs kebab-case YAML. `docs/phoenix/project-structure.mdx` has the full reference; the [capability index](../features/index.md#project-and-customization) lists it.\n\n### Source conventions\n\n- Auto-imported expressions, actions, invariants, transformers, components, handlers and elements must default-export their folder's phx factory result, as one item or an array. Named exports are ignored.\n- `phx` is a global in every project: use it without importing it.\n- Keep plain helpers in underscore folders and import them explicitly.\n- Use relative imports: dev, build and webhook bundling do not resolve tsconfig `paths` aliases.\n\n## Local development\n\n`phoenix dev` runs the live preview, `sync` regenerates without bundling, `build` produces the production build, and `check` checks project quality.\n\n### Keep the preview in front of the client\n\nThe client should see the configurator change while it is built. Before the first change in a conversation, make sure `pnpm phoenix dev` is running, starting it in the background when it is not, and wait for the `Preview: <url>` line it prints and writes to `.phoenix/phoenix-dev.log`. The log keeps the lines of earlier runs, so use the last one written after the start.\n\nFor a new project, start by understanding the client’s product and what they want to configure before asking them to sign in; then make the preview reflect that before showing it, rather than presenting the generated starter scene.\n\nOpen the address where the client can see it: in the agent application's built-in browser when it has one the client sees, otherwise in the client's browser with `open '<url>'` on macOS, `xdg-open '<url>'` on Linux or `Start-Process '<url>'` in PowerShell. Keep the quotes; the shell would otherwise read a `?` in the address as a pattern. Then tell the client in one line where the preview is and that it updates by itself as the work goes on. Variant comparisons open in the same preview, so say there what to compare and how to choose.\n\nOpen it once: the preview reloads on every change. A domain model change is the exception. Dev registers the model with the server only when it starts and logs an error asking for a restart; restart it, wait for the new `Preview:` line and open that address in place of the old tab, whose `?cid=` names a configuration of the earlier model.\n\n### Logs and inspection\n\nLogs in `.phoenix/phoenix-dev.log` contain spec, build and runtime errors and watcher events; check them after changes. Signed in, `phoenix dev` runs in agent mode: the preview hides the editor, a corner badge shows when the latest change didn't build, and any dev error shows an \"Agent at work\" screen with no details, so the client never sees them. The details are only in the log; the page recovers by itself after the next successful rebuild. `--editor` shows the editor and the detailed error pages. [Inspection tools](../features/inspection.md) cover assets, state, data, scene and screenshots. Runtime inspection needs dev running and the preview open in a browser; a screenshot of the canvas does not verify the surrounding interface.\n\n## Deployment\n\n`pnpm phoenix deploy` builds the project on the server into a hosted preview (not the local preview of `phoenix dev`) and waits until it is live. Without `--env` it uses `preview`, created when missing; `--env <name>` needs an existing preview. It never deploys to production: the client promotes a checked build in Studio. Watch its output: after `Build #<n> started in <preview>` it prints `Follow the build in Studio: <url>`; open that link where the client sees it. If that line is missing, run `pnpm phoenix login` again. `Build #<n> is queued behind build #<m>` means wait: it starts after the build ahead.\n\nA successful local preview does not establish deployed model compatibility. A new project starts empty, so the model of its first deploy becomes v1. A hosted preview replaces a changed schema, but promotion is refused when the model changed under a version production serves, as is the hello-world starter that the production of some early beta projects was first deployed as; [Model migration](../processes/model-migration.md) handles that. `pnpm phoenix deploy` and `pnpm phoenix dev` are both refused while the project is being set up (its first minute) or after its setup failed: wait a minute and retry, or ask the client to choose **Retry setup** on the project's overview in Studio. When the build fails, tell the client why and what next. Record each deploy and its outcome in the project record. [Deployment documentation](../features/index.md#cli-access-and-deployment) covers status and environment details.\n\n## Internal beta\n\nPhoenix is in an internal beta. Read [Beta](../processes/beta.md) before each deploy and when a deploy goes live; a project on the `canary` SDK build also reads it once per conversation before changing anything.\n\n## Interactive and support tools\n\n[Variants](../features/variants.md) compares frontend alternatives over the live preview and applies the choice. [Feedback](../processes/feedback/index.md) submits an approved issue or evaluation. The [workflow](workflow.md) owns when either is useful and how much client interaction fits the task."]});
@@ -8,7 +8,7 @@ Phoenix turns YAML in \`spec/\` into a typed domain, configured components and a
8
8
 
9
9
  ### The \`phx\` global
10
10
 
11
- Project code reaches the SDK through the \`phx\` global: \`phx.domain\` for model reflections and the implementations of expressions, invariants and actions, \`phx.frontend\` for elements, handlers, hooks, updates and transformers, and \`phx.webhooks\` for server builders and tasks. Each [feature guide](../features/index.md) teaches its part as \`phx.<namespace>.<member>\`; a few things \`phx\` does not carry, such as \`memoEval\`, are SDK subpath imports.
11
+ Project code reaches the SDK through the \`phx\` global: \`phx.domain\` for model reflections and the implementations of expressions and invariants, \`phx.frontend\` for actions, elements, handlers, hooks, updates and transformers, and \`phx.webhooks\` for server builders and tasks. Each [feature guide](../features/index.md) teaches its part as \`phx.<namespace>.<member>\`; a few things \`phx\` does not carry, such as \`memoEval\`, are SDK subpath imports.
12
12
 
13
13
  ### Entity-component-system model
14
14
 
@@ -43,11 +43,12 @@ Build the interface from elements and handlers, connected through \`phx.frontend
43
43
 
44
44
  | Surface | Use for | Guide |
45
45
  | --- | --- | --- |
46
- | Layout elements | The project layout, loading and error pages, preset screen, assistant forms | [Custom project layout](../features/custom-layout/index.md) |
46
+ | Layout elements | The project layout, loading and error pages, preset screen | [Custom project layout](../features/custom-layout/index.md) |
47
47
  | Entity elements and control hooks | Controls the layout renders or anchors in the scene | [Domain controls](../features/domain-controls/index.md) |
48
48
  | Handlers | Event and lifecycle behavior, registered finalization actions | [Finalization actions](../features/custom-layout/finalization-actions.md) |
49
49
  | Spec texts | Translated texts and the language switch | [Localization](../features/localization.md) |
50
50
  | Scene objects built in code | Geometry a loaded model cannot express, such as a worktop with cut-outs | [Scene objects built in code](../features/scene-objects.md) |
51
+ | Assistant | What the AI assistant reads and changes, its panel and per-session setup | [Assistant](../features/assistant/index.md) |
51
52
 
52
53
  Prefer a custom \`ConfiguratorLayout\` composed from Phoenix controls, slots and hooks; it owns the canvas, messages, read mode and finalization. Register the React component with the supported factory:
53
54