@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
@@ -7,6 +7,7 @@ declare const Slots: {
7
7
  readonly Root: 'root';
8
8
  readonly Body: 'body';
9
9
  readonly Title: 'title';
10
+ readonly Description: 'description';
10
11
  readonly Button: 'button';
11
12
  };
12
13
  type PreviewSlots = ValueOf<typeof Slots>;
@@ -50,8 +51,9 @@ export interface ThemeablePreviewProps extends OwnerState {
50
51
  * Each slot maps to a structural part of the UI:
51
52
  *
52
53
  * - `root` — The outer container (`motion.div`).
53
- * - `body` — The content area with title and start button (`motion.div`).
54
+ * - `body` — The content area for the preview copy and start button (`motion.div`).
54
55
  * - `title` — The heading element (MUI `Typography`).
56
+ * - `description` — The optional paragraph (MUI `Typography`).
55
57
  * - `button` — The start configuring button (MUI `Button`).
56
58
  *
57
59
  * @default {}
@@ -67,6 +69,7 @@ export interface ThemeablePreviewProps extends OwnerState {
67
69
  * animation props (`transition`, `layout`, `initial`, `animate`, etc.) in addition
68
70
  * to standard HTML div attributes.
69
71
  * - `title` — Props for the heading (`TypographyProps`).
72
+ * - `description` — Props for the optional paragraph (`TypographyProps`).
70
73
  * - `button` — Props for the start button (`ButtonProps`).
71
74
  *
72
75
  * @default {}
@@ -75,6 +78,7 @@ export interface ThemeablePreviewProps extends OwnerState {
75
78
  readonly [Slots.Root]: HTMLMotionProps<'div'>;
76
79
  readonly [Slots.Body]: HTMLMotionProps<'div'>;
77
80
  readonly [Slots.Title]: TypographyProps;
81
+ readonly [Slots.Description]: TypographyProps;
78
82
  readonly [Slots.Button]: ButtonProps;
79
83
  }>;
80
84
  }
@@ -83,6 +87,10 @@ export interface PreviewProps extends ThemeablePreviewProps {
83
87
  * The heading shown in the body.
84
88
  */
85
89
  readonly title: string;
90
+ /**
91
+ * Optional paragraph between the heading and the start button. Blank text is omitted.
92
+ */
93
+ readonly description?: string;
86
94
  /**
87
95
  * The label of the start button.
88
96
  */
@@ -113,14 +121,14 @@ export interface PreviewProps extends ThemeablePreviewProps {
113
121
  * when `true` the layout splits into a `scene | body` grid (vertical split on narrow
114
122
  * widths, horizontal above the `compact` breakpoint), letting the configurator scene
115
123
  * loaded behind show through the `scene` cell.
116
- * - Renders a centered title and a "start" button that invokes `onStart`.
117
- * - Exposes `root` / `body` / `title` / `button` slots plus `containerRef` /
124
+ * - Renders a title, an optional description and a "start" button that invokes `onStart`.
125
+ * - Exposes `root` / `body` / `title` / `description` / `button` slots plus `containerRef` /
118
126
  * `safeAreaRef` so smart wrappers can wire up animation and scene-safe-area
119
127
  * measurement.
120
128
  * - Integrates with MUI theming via the `PhxPreview` key.
121
129
  *
122
130
  * Typically wrapped by domain-aware components (`DesktopPreview`, `MobilePreview`) that
123
- * resolve the title/button label, attach refs for scene safe-area measurement, and
131
+ * resolve the preview copy, attach refs for scene safe-area measurement, and
124
132
  * supply variant-specific animation via `slotProps.root`.
125
133
  *
126
134
  * @example
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Button as n,Typography as o,styled as r,useThemeProps as a}from"@mui/material";import{motion as i}from"motion/react";let d="PhxPreview",s={Root:r(i.div,{name:d,slot:"root",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{breakpoints:t}})=>({display:"grid",gridTemplateAreas:`
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Button as o,Typography as n,styled as r,useThemeProps as i}from"@mui/material";import{motion as a}from"motion/react";let d="PhxPreview",s={Root:r(a.div,{name:d,slot:"root",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{breakpoints:t}})=>({display:"grid",gridTemplateAreas:`
2
2
  'body body'
3
3
  'body body'
4
4
  `,gridTemplateColumns:"repeat(2, 1fr)",gridTemplateRows:"repeat(2, 1fr)",inset:0,position:"absolute",zIndex:1,...e.withScene&&{gridTemplateAreas:`
@@ -7,4 +7,4 @@ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Button as n,Typography
7
7
  `,[`@container app (width > ${t.values.md}px)`]:{gridTemplateAreas:`
8
8
  'scene body'
9
9
  'scene body'
10
- `}}})),Body:r(i.div,{name:d,slot:"body",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{breakpoints:t,palette:n,spacing:o}})=>({alignContent:"center",alignItems:"center",background:n.background.scene,display:"grid",gap:o(3),gridArea:"body",justifyItems:"center",padding:o(3),textAlign:"center",zIndex:1,"@container app (width >= 560px)":{gap:o(4),paddingInline:o(5)},...e.withScene&&{alignContent:"start",[`@container app (width > ${t.values.md}px)`]:{alignContent:"center",background:"none",gap:o(4),justifyItems:"start",paddingInline:o(5),textAlign:"unset"}}})),Title:r(o,{name:d,slot:"title",shouldForwardProp:e=>"ownerState"!==e})(({theme:{palette:e,typography:t}})=>({...t.h5,color:e.text.primary,textWrap:"balance","@container app (width >= 560px)":{...t.h4}})),Button:r(n,{name:d,slot:"button",shouldForwardProp:e=>"ownerState"!==e})(()=>({}))},l=r("div")({gridArea:"1 / 1 / -1 / -1"}),p=r("div")(({ownerState:e,theme:{palette:t,spacing:n}})=>({gridArea:"1 / 1 / -1 / -1",inset:n(3),"@container app (width >= 560px)":{inset:n(5)},...e.withScene&&{gridArea:"scene",minBlockSize:80,position:"absolute"},"@container style(--inspect: on)":{border:`1px dashed ${t.info.light}`}}));export const Preview=n=>{let{buttonLabel:o,containerRef:r,onStart:i,safeAreaRef:c,slotProps:m={},slots:g={},title:h,withScene:u=!1}=a({props:n,name:d}),w=g.root??s.Root,b=g.body??s.Body,y=g.title??s.Title,x=g.button??s.Button,S={withScene:u};return t(w,{...m.root,layout:!0,ownerState:S,children:[e(l,{ref:r}),e(p,{ref:c,ownerState:S}),t(b,{...m.body,ownerState:S,children:[e(y,{component:"h1",...m.title,ownerState:S,children:h}),e(x,{variant:"contained",size:"large",...m.button,ownerState:S,onClick:i,children:o})]})]})};
10
+ `}}})),Body:r(a.div,{name:d,slot:"body",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{breakpoints:t,palette:o,spacing:n}})=>({alignContent:"center",alignItems:"center",background:o.background.scene,display:"grid",gap:n(3),gridArea:"body",justifyItems:"center",padding:n(3),textAlign:"center",zIndex:1,"@container app (width >= 560px)":{gap:n(4),paddingInline:n(5)},...e.withScene&&{alignContent:"start",[`@container app (width > ${t.values.md}px)`]:{alignContent:"center",background:"none",gap:n(4),justifyItems:"start",paddingInline:n(5),textAlign:"unset"}}})),Title:r(n,{name:d,slot:"title",shouldForwardProp:e=>"ownerState"!==e})(({theme:{palette:e,typography:t}})=>({...t.h5,color:e.text.primary,textWrap:"balance","@container app (width >= 560px)":{...t.h4}})),Description:r(n,{name:d,slot:"description",shouldForwardProp:e=>"ownerState"!==e})(({theme:e})=>({color:e.palette.text.secondary,overflowWrap:"anywhere"})),Button:r(o,{name:d,slot:"button",shouldForwardProp:e=>"ownerState"!==e})(()=>({}))},p=r("div")({gridArea:"1 / 1 / -1 / -1"}),l=r("div")(({ownerState:e,theme:{palette:t,spacing:o}})=>({gridArea:"1 / 1 / -1 / -1",inset:o(3),"@container app (width >= 560px)":{inset:o(5)},...e.withScene&&{gridArea:"scene",minBlockSize:80,position:"absolute"},"@container style(--inspect: on)":{border:`1px dashed ${t.info.light}`}}));export const Preview=o=>{let{buttonLabel:n,containerRef:r,description:a,onStart:c,safeAreaRef:m,slotProps:h={},slots:w={},title:g,withScene:u=!1}=i({props:o,name:d}),y=w.root??s.Root,b=w.body??s.Body,x=w.title??s.Title,S=w.description??s.Description,f=w.button??s.Button,v={withScene:u};return t(y,{...h.root,layout:!0,ownerState:v,children:[e(p,{ref:r}),e(l,{ref:m,ownerState:v}),t(b,{...h.body,ownerState:v,children:[e(x,{component:"h1",...h.title,ownerState:v,children:g}),a?.trim()&&e(S,{component:"p",...h.description,ownerState:v,children:a}),e(f,{variant:"contained",size:"large",...h.button,ownerState:v,onClick:c,children:n})]})]})};
@@ -31,7 +31,7 @@ declare module '@mui/material/styles' {
31
31
  }
32
32
  interface Components {
33
33
  [MuiComponentName]?: {
34
- defaultProps?: ComponentsPropsList[typeof MuiComponentName];
34
+ defaultProps?: Partial<ComponentsPropsList[typeof MuiComponentName]>;
35
35
  styleOverrides?: ComponentsOverrides<Theme>[typeof MuiComponentName];
36
36
  variants?: ComponentsVariants<Theme>[typeof MuiComponentName];
37
37
  };
@@ -89,7 +89,8 @@ export interface SnackbarProps extends Readonly<CustomContentProps> {
89
89
  *
90
90
  * Available slot keys:
91
91
  * - `content` — Props for the snackbar content wrapper.
92
- * - `alert` — Props for the alert component (severity, variant, etc.).
92
+ * - `alert` — Props for the alert component (severity, variant, etc.). Its `iconMapping` and `icon` replace the
93
+ * snackbar's icons, including the success icon, which otherwise wins over the theme's `MuiAlert` `iconMapping`.
93
94
  * - `actionButton` — Props for the button of `actionButton`.
94
95
  *
95
96
  * @default { alert: { variant: 'standard' } }
@@ -1 +1 @@
1
- import{jsx as t,jsxs as n,Fragment as a}from"react/jsx-runtime";import{Alert as r,Button as o,styled as i,useThemeProps as e}from"@mui/material";import{SnackbarContent as c}from"notistack";import{forwardRef as s,useMemo as l}from"react";import{match as m}from"ts-pattern";export const notistackSnackbarClasses={container:"notistack-SnackbarContainer",snackbar:"notistack-Snackbar"};let k="PhxSnackbar",u={Content:i(c,{name:k,slot:"content"})({display:"block"}),Alert:i(r,{name:k,slot:"alert"})({userSelect:"none"}),ActionButton:i(o,{name:k,slot:"actionButton"})({})};export const SnackbarVariant={Default:"default",Info:"info",Success:"success",Warning:"warning",Error:"error"};export const Snackbar=s((r,o)=>{let{action:i,actionButton:c,id:s,message:f,slotProps:b={alert:{variant:"standard"}},slots:p={},variant:S="info"}=e({props:r,name:k}),h=p.content??u.Content,d=p.alert??u.Alert,x=p.actionButton??u.ActionButton,w=l(()=>{if(i)return"function"==typeof i?i(s):i},[i,s]),B=l(()=>void 0===c?w:n(a,{children:[w,t(x,{color:"inherit",size:"small",...b.actionButton,onClick:()=>{c.onClick(s)},children:c.label})]}),[x,c,s,w,b.actionButton]);return t(h,{...b.content,ref:o,children:t(d,{...b.alert,severity:m(S).with(SnackbarVariant.Error,()=>S).with(SnackbarVariant.Info,()=>S).with(SnackbarVariant.Success,()=>S).with(SnackbarVariant.Warning,()=>S).otherwise(()=>SnackbarVariant.Info),action:B,"aria-atomic":"true","aria-live":"polite",children:f})})});
1
+ import{jsx as t,jsxs as n,Fragment as a}from"react/jsx-runtime";import{Alert as r,Button as e,SvgIcon as i,styled as o,useTheme as c,useThemeProps as s}from"@mui/material";import{SnackbarContent as l}from"notistack";import{forwardRef as p,useId as u,useMemo as k}from"react";import{match as m}from"ts-pattern";export const notistackSnackbarClasses={container:"notistack-SnackbarContainer",snackbar:"notistack-Snackbar"};let f="PhxSnackbar",h={Content:o(l,{name:f,slot:"content"})({display:"block"}),Alert:o(r,{name:f,slot:"alert"})({userSelect:"none"}),ActionButton:o(e,{name:f,slot:"actionButton"})({})};export const SnackbarVariant={Default:"default",Info:"info",Success:"success",Warning:"warning",Error:"error"};let d=a=>{let r=`phx-snackbar-success-${u().replace(/[^\w-]/g,"")}`;return n(i,{"data-testid":"PhxSnackbarSuccessIcon",viewBox:"0 0 18 18",...a,children:[n("mask",{id:r,children:[t("rect",{width:"18",height:"18",fill:"white"}),t("path",{d:"m5 12.5 4.5 4.5L19 7.5",fill:"none",stroke:"black",strokeWidth:3,transform:"translate(3.5 3.5) scale(0.458333)"})]}),t("circle",{cx:"9",cy:"9",r:"9",mask:`url(#${r})`})]})};export const Snackbar=p((r,e)=>{let{action:i,actionButton:o,id:l,message:p,slotProps:u={alert:{variant:"standard"}},slots:b={},variant:S="info"}=s({props:r,name:f}),g=c(),x=b.content??h.Content,w=b.alert??h.Alert,B=b.actionButton??h.ActionButton,M=k(()=>{if(i)return"function"==typeof i?i(l):i},[i,l]),A=k(()=>void 0===o?M:n(a,{children:[M,t(B,{color:"inherit",size:"small",...u.actionButton,onClick:()=>{o.onClick(l)},children:o.label})]}),[B,o,l,M,u.actionButton]),C=k(()=>({...g.components?.MuiAlert?.defaultProps?.iconMapping,success:t(d,{fontSize:"inherit"}),...u.alert?.iconMapping}),[u.alert?.iconMapping,g.components?.MuiAlert?.defaultProps?.iconMapping]);return t(x,{...u.content,ref:e,children:t(w,{...u.alert,iconMapping:C,severity:m(S).with(SnackbarVariant.Error,()=>S).with(SnackbarVariant.Info,()=>S).with(SnackbarVariant.Success,()=>S).with(SnackbarVariant.Warning,()=>S).otherwise(()=>SnackbarVariant.Info),action:A,"aria-atomic":"true","aria-live":"polite",children:p})})});
@@ -4,6 +4,8 @@ export interface ToolbarPopperProps {
4
4
  anchorEl: HTMLElement | null;
5
5
  isOpen: boolean;
6
6
  placement: PopperPlacementType;
7
+ /** Limit automatic placement to the space above or below the anchor within this element. */
8
+ verticalBoundary?: HTMLElement | null;
7
9
  children?: ReactNode;
8
10
  onClose: (event: Event) => void;
9
11
  }
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{ClickAwayListener as e,Grow as r,Paper as t,Popper as l,styled as n}from"@mui/material";import{useCallback as i,useRef as a,useState as p}from"react";let s=n(l,{name:"PhxDesktopToolbarPopper",slot:"popper"})(()=>({zIndex:1}));export const ToolbarPopper=l=>{let{anchorEl:n,children:i,isOpen:a,onClose:p,placement:m}=l;return o(s,{modifiers:[{name:"offset",options:{offset:[0,16]}}],open:a,disablePortal:!0,transition:!0,anchorEl:n,role:void 0,placement:m,children:({TransitionProps:l,placement:n})=>o(r,{...l,style:{transformOrigin:"bottom"===n?"left top":"left bottom"},children:o(t,{children:o(e,{onClickAway:p,children:o("div",{children:i})})})})})};export const useToolbarPopper=()=>{let[o,e]=p(null),r=a(null);return{handleToggle:i(o=>{e(e=>e===o?null:o)},[]),handleClose:i(o=>{r.current?.contains(o.target)||e(null)},[]),ref:r,openedKey:o}};
1
+ import{jsx as e}from"react/jsx-runtime";import{ClickAwayListener as o,Grow as t,Paper as r,Popper as l,styled as n}from"@mui/material";import{detectOverflow as p}from"@popperjs/core";import{useCallback as a,useRef as i,useState as s}from"react";let m=n(l,{name:"PhxDesktopToolbarPopper",slot:"popper"})(()=>({zIndex:1})),c="--phx-toolbar-popper-available-height";export const ToolbarPopper=l=>{let{anchorEl:n,children:a,isOpen:i,onClose:s,placement:d,verticalBoundary:h}=l;return e(m,{modifiers:[{name:"offset",options:{offset:[0,16]}},...h?[{name:"flip",options:{boundary:h,allowedAutoPlacements:["top","bottom"]}},{name:"preventOverflow",options:{boundary:h}},{name:"availableHeight",enabled:!0,phase:"write",fn:({state:e})=>{let o=e.placement.startsWith("top")?"top":"bottom",t=p(e,{boundary:h}),r=Math.max(0,Math.floor(e.rects.popper.height-t[o]));e.elements.popper.style.setProperty(c,`${r}px`)},effect:({instance:e,state:o})=>{let t=new ResizeObserver(()=>void e.update());return t.observe(h),()=>{t.disconnect(),o.elements.popper.style.removeProperty(c)}}}]:[]],open:i,disablePortal:!0,transition:!0,anchorEl:n,role:void 0,placement:d,children:({TransitionProps:l,placement:n})=>e(t,{...l,style:{transformOrigin:"bottom"===n?"left top":"left bottom"},children:e(r,{children:e(o,{onClickAway:s,children:e("div",{children:a})})})})})};export const useToolbarPopper=()=>{let[e,o]=s(null),t=i(null);return{handleToggle:a(e=>{o(o=>o===e?null:e)},[]),handleClose:a(e=>{t.current?.contains(e.target)||o(null)},[]),ref:t,openedKey:e}};
@@ -1,4 +1,4 @@
1
- import type { MouseEvent, ReactNode } from 'react';
1
+ import type { HTMLAttributes, MouseEvent, ReactNode } from 'react';
2
2
  import type { ValueOf } from '@salsita-ai/common/utils';
3
3
  import type { PhxIconName } from '../../icons/index.js';
4
4
  /**
@@ -52,7 +52,9 @@ export interface ViewControlsItemEntry {
52
52
  */
53
53
  export interface ViewControlsContextValue {
54
54
  readonly variant: ViewControlsVariant;
55
+ readonly sizingLabelsByValue?: ReadonlyMap<string, readonly string[]>;
55
56
  readonly activeValue: string | null;
57
+ readonly compactMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'aria-haspopup' | 'aria-expanded' | 'aria-controls'>;
56
58
  readonly isMenuOpen: boolean;
57
59
  readonly register: (value: string, entry: ViewControlsItemEntry) => () => void;
58
60
  readonly openMenu: (event: MouseEvent<HTMLElement>) => void;
@@ -1 +1 @@
1
- import{jsx as o,jsxs as t}from"react/jsx-runtime";import{ToggleButton as e,Tooltip as n,Typography as i,styled as r,useThemeProps as a}from"@mui/material";import{useCallback as s,useLayoutEffect as l,useMemo as d}from"react";import{match as m}from"ts-pattern";import{PhxIcon as c}from"../../icons/index.js";import{VariantKeys as p,useViewControlsContext as w}from"./ViewControlsContext.js";import{useIsRegisteredIcon as h}from"./useIsRegisteredIcon.js";let g="PhxViewControlsItem",u={Root:r(e,{name:g,slot:"root",shouldForwardProp:o=>"ownerState"!==o})(({ownerState:o,theme:{shape:t,spacing:e,transitions:n}})=>({display:"grid",gap:e(1),gridTemplateColumns:m(o).with({isTrigger:!0,showIcon:!0,showLabel:!0},()=>"min-content 1fr min-content").with({isTrigger:!0,showIcon:!0,showLabel:!1},()=>"min-content min-content").with({isTrigger:!0,showIcon:!1,showLabel:!0},()=>"1fr min-content").with({isTrigger:!1,showIcon:!0},()=>"min-content 1fr").otherwise(()=>"1fr"),alignItems:"center",margin:0,minBlockSize:34,padding:`5px ${e(.5)}`,textTransform:"none",transitionDuration:`${n.duration.short}ms`,transitionProperty:"grid-template-columns",transitionTimingFunction:n.easing.easeOut,flexShrink:0,"&[class][class]":{border:0,borderRadius:t.borderRadius,margin:0},...o.isHidden&&{display:"none"}})),Icon:r(c,{name:g,slot:"icon",shouldForwardProp:o=>"ownerState"!==o})({fontSize:24}),Label:r(i,{name:g,slot:"label",shouldForwardProp:o=>"ownerState"!==o})({whiteSpace:"nowrap"}),Indicator:r(c,{name:g,slot:"indicator",shouldForwardProp:o=>"ownerState"!==o})(({ownerState:o,theme:{transitions:t}})=>({fontSize:12,transition:t.create(["rotate"],{duration:t.duration.short}),...o.isMenuOpen&&{rotate:"-180deg"}})),Tooltip:r(n,{name:g,slot:"tooltip"})({})};export const ViewControlsItem=e=>{let{icon:n,label:i,onClick:r,slotProps:c={},slots:f={},value:I,...S}=a({props:e,name:g}),x=f.root??u.Root,b=f.icon??u.Icon,T=f.label??u.Label,v=f.indicator??u.Indicator,C=f.tooltip??u.Tooltip,{activeValue:j,isMenuOpen:P,openMenu:F,register:L,variant:R}=w(),k=j===I,y=h()(n),z=s(o=>{R!==p.Expanded&&k?F(o):r?.(o,I)},[k,r,F,I,R]),V=d(()=>({label:i,icon:y?n:void 0}),[i,n,y]);l(()=>L(I,V),[L,I,V]);let D=m({variant:R,isActive:k}).with({variant:p.Expanded},()=>"item").with({isActive:!0},()=>"trigger").otherwise(()=>"hidden"),E="trigger"===D,M="hidden"===D,O=R===p.Minimal,$=!M&&!(E&&O&&y),A={isActive:k,isHidden:M,isMenuOpen:P,isTrigger:E,showIcon:y,showLabel:$,variant:R},B=E&&O&&y?i:void 0;return o(C,{placement:"top",...c.tooltip,title:B,ownerState:A,children:t(x,{...c.root,...S,value:I,...E&&{selected:!1},ownerState:A,"aria-hidden":M||void 0,onClick:z,children:[!M&&y&&o(b,{...c.icon,name:n,ownerState:A}),$&&o(T,{component:"span",variant:"caption",...c.label,ownerState:A,children:i}),E&&o(v,{name:"CaretDown",...c.indicator,ownerState:A})]})})};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{ToggleButton as o,Tooltip as i,Typography as n,styled as r,useThemeProps as a}from"@mui/material";import{useCallback as s,useLayoutEffect as d,useMemo as l}from"react";import{match as m}from"ts-pattern";import{PhxIcon as p}from"../../icons/index.js";import{VariantKeys as c,useViewControlsContext as h}from"./ViewControlsContext.js";import{useIsRegisteredIcon as w}from"./useIsRegisteredIcon.js";let g="PhxViewControlsItem",u=r("span")({display:"grid","& > span":{gridArea:"1 / 1"},"& > [aria-hidden]":{visibility:"hidden"}}),f={Root:r(o,{name:g,slot:"root",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{shape:t,spacing:o,transitions:i}})=>({display:"grid",gap:o(1),gridTemplateColumns:m(e).with({isTrigger:!0,showIcon:!0,showLabel:!0},()=>"min-content 1fr min-content").with({isTrigger:!0,showIcon:!0,showLabel:!1},()=>"min-content min-content").with({isTrigger:!0,showIcon:!1,showLabel:!0},()=>"1fr min-content").with({isTrigger:!1,showIcon:!0},()=>"min-content 1fr").otherwise(()=>"1fr"),alignItems:"center",margin:0,minBlockSize:34,padding:`5px ${o(.5)}`,textTransform:"none",transitionDuration:`${i.duration.short}ms`,transitionProperty:"grid-template-columns",transitionTimingFunction:i.easing.easeOut,flexShrink:0,"&[class][class]":{border:0,borderRadius:t.borderRadius,margin:0},...e.isHidden&&{display:"none"}})),Icon:r(p,{name:g,slot:"icon",shouldForwardProp:e=>"ownerState"!==e})({fontSize:24}),Label:r(n,{name:g,slot:"label",shouldForwardProp:e=>"ownerState"!==e})({whiteSpace:"nowrap"}),Indicator:r(p,{name:g,slot:"indicator",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{transitions:t}})=>({fontSize:12,transition:t.create(["rotate"],{duration:t.duration.short}),...e.isMenuOpen&&{rotate:"-180deg"}})),Tooltip:r(i,{name:g,slot:"tooltip"})({})};export const ViewControlsItem=o=>{let{icon:i,label:n,onClick:r,slotProps:p={},slots:S={},value:I,...x}=a({props:o,name:g}),b=S.root??f.Root,T=S.icon??f.Icon,v=S.label??f.Label,C=S.indicator??f.Indicator,j=S.tooltip??f.Tooltip,{activeValue:y,compactMenuProps:P,isMenuOpen:F,openMenu:L,register:R,sizingLabelsByValue:k,variant:z}=h(),A=y===I,M=k?.get(I),O=w()(i),V=s(e=>{z!==c.Expanded&&A?L(e):r?.(e,I)},[A,r,L,I,z]),D=l(()=>({label:n,icon:O?i:void 0}),[n,i,O]);d(()=>R(I,D),[R,I,D]);let E=m({variant:z,isActive:A}).with({variant:c.Expanded},()=>"item").with({isActive:!0},()=>"trigger").otherwise(()=>"hidden"),$="trigger"===E||"menu"===x["aria-haspopup"],B="hidden"===E,H=z===c.Minimal,q=!B&&!($&&H&&O),G={isActive:A,isHidden:B,isMenuOpen:F||("trigger"===E?P:x)?.["aria-expanded"]===!0,isTrigger:$,showIcon:O,showLabel:q,variant:z},J=$&&H&&O?n:void 0;return e(j,{placement:"top",...p.tooltip,title:J,ownerState:G,children:t(b,{...p.root,...x,value:I,..."trigger"===E&&{selected:!1,...P},ownerState:G,"aria-hidden":B||void 0,onClick:V,children:[!B&&O&&e(T,{...p.icon,name:i,ownerState:G}),q&&e(v,{component:"span",variant:"caption",...p.label,ownerState:G,children:M?t(u,{children:[e("span",{children:n}),Array.from(new Set(M),t=>e("span",{"aria-hidden":"true",children:t},t))]}):n}),$&&e(C,{name:"CaretDown",...p.indicator,ownerState:G})]})})};
@@ -1,5 +1,5 @@
1
1
  import type { ComponentsOverrides, ComponentsVariants, MenuItemProps, MenuProps, ToggleButtonGroupProps } from '@mui/material';
2
- import type { ElementType, HTMLAttributes, ReactNode } from 'react';
2
+ import type { ElementType, HTMLAttributes, MouseEvent, ReactNode } from 'react';
3
3
  import type { ValueOf } from '@salsita-ai/common/utils';
4
4
  declare const MuiComponentName: 'PhxViewControls';
5
5
  declare module '@mui/material/styles' {
@@ -50,6 +50,11 @@ export interface ThemeableViewControlsRootProps {
50
50
  }
51
51
  export interface ViewControlsRootProps extends ThemeableViewControlsRootProps, Omit<ToggleButtonGroupProps, 'children'> {
52
52
  readonly children: ReactNode;
53
+ /** Reserve space in each listed button for its widest possible label. */
54
+ readonly sizingLabelsByValue?: ReadonlyMap<string, readonly string[]>;
55
+ /** Supply the compact menu when the available choices have multiple levels. */
56
+ readonly compactMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'aria-haspopup' | 'aria-expanded' | 'aria-controls'>;
57
+ readonly onOpenMenu?: (event: MouseEvent<HTMLElement>) => void;
53
58
  }
54
59
  /**
55
60
  * `ViewControls` — a responsive group of toggle buttons.
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{ListItemIcon as n,ListItemText as t,Menu as o,MenuItem as a,ToggleButtonGroup as i,menuClasses as l,styled as m,useTheme as u,useThemeProps as p}from"@mui/material";import{useCallback as d,useEffect as c,useMemo as s,useRef as h,useState as x}from"react";import{flushSync as f}from"react-dom";import{match as w}from"ts-pattern";import{useResizeObserver as v}from"usehooks-ts";import{attrf as y}from"../../common/index.js";import{PhxIcon as S}from"../../icons/index.js";import{VariantKeys as g,ViewControlsContext as C}from"./ViewControlsContext.js";let M="PhxViewControls",P={Root:m("div",{name:M,slot:"root",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e})=>({display:"flex",...e.variant===g.Expanded&&{justifyContent:"center"}})),Paper:m(i,{name:M,slot:"paper",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{palette:r,shape:n,shadows:t,spacing:o}})=>({background:r.background.paper,borderRadius:n.borderRadius,display:"inline-flex",flexWrap:"nowrap",gap:o(.5),maxInlineSize:"100%",minInlineSize:60,padding:o(.5),..."elevation"===e.paperVariant&&{boxShadow:t[e.elevation]},..."outlined"===e.paperVariant&&{border:`1px solid ${r.divider}`}})),Menu:m(o,{name:M,slot:"menu",shouldForwardProp:e=>"ownerState"!==e})(({theme:{spacing:e}})=>({[`.${l.paper}`]:{translate:`0 ${e(-2)}`}})),MenuItem:m(a,{name:M,slot:"menuItem",shouldForwardProp:e=>"ownerState"!==e})({})};export const ViewControlsRoot=o=>{let{children:a,onChange:i,slotProps:l={},slots:m={},value:b,...I}=p({props:o,name:M}),{components:j}=u(),{elevation:E=1,variant:R="elevation"}=j?.MuiPaper?.defaultProps??{},z=m.root??P.Root,V=m.paper??P.Paper,k=m.menu??P.Menu,F=m.menuItem??P.MenuItem,[W,$]=x(g.Expanded),O=h({expanded:0,compact:0}),A=h(null),T=h(null),q=h(new Map),[B,D]=x(0),G=d((e,r)=>(q.current.set(e,r),D(e=>e+1),()=>{q.current.delete(e),D(e=>e+1)}),[]),[H,J]=x(null),K=d(e=>{J(e.currentTarget)},[]),L=d(()=>{J(null)},[]),N=d((e,r)=>{i?.(e,r),L()},[i,L]),Q=h(null),U=d(e=>{let r=A.current,n=T.current;if(!r||!n)return;if(null==Q.current)return void $(g.Expanded);let t=n.scrollWidth,o=r.clientWidth,a=t>o+2,i=()=>{$(e=>w(e).with(g.Expanded,e=>a?(O.current.expanded=t,g.Compact):e).with(g.Compact,e=>a?(O.current.compact=t,g.Minimal):o+2>=O.current.expanded?g.Expanded:e).with(g.Minimal,e=>o+2>=O.current.compact?g.Compact:e).exhaustive())};e.commitSynchronously?f(i):i()},[]);v({ref:A,onResize:()=>{U({commitSynchronously:!0})}}),v({ref:T,onResize:()=>{U({commitSynchronously:!0})}});let X="string"==typeof b?b:null,Y=h(null);c(()=>{let e=null==Y.current,r=null==X;Y.current=X,Q.current=X,e!==r&&U({commitSynchronously:!1})},[X,U]);let Z=null!==H,_=s(()=>({activeValue:X,dispatchChange:N,isMenuOpen:Z,openMenu:K,register:G,variant:W}),[X,N,Z,K,G,W]),ee=s(()=>Array.from(q.current.entries()),[B]),er={variant:W,elevation:E,paperVariant:R};return e(C.Provider,{value:_,children:r(z,{ref:A,...l.root,"data-view-controls":y({variant:{[W]:!0}}),ownerState:er,children:[e(V,{...l.paper,...I,ref:T,exclusive:!0,value:b,ownerState:er,onChange:i,children:a}),e(k,{anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},...l.menu,anchorEl:H,open:null!==H&&W!==g.Expanded,onClose:L,children:ee.map(([o,a])=>r(F,{...l.menuItem,selected:o===X,onClick:e=>{N(e,o)},children:[a.icon&&e(n,{children:e(S,{name:a.icon})}),e(t,{children:a.label})]},o))})]})})};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{ListItemIcon as n,ListItemText as t,Menu as o,MenuItem as a,ToggleButtonGroup as i,menuClasses as l,styled as m,useTheme as u,useThemeProps as d}from"@mui/material";import{useCallback as p,useEffect as c,useLayoutEffect as s,useMemo as h,useRef as x,useState as f}from"react";import{flushSync as w}from"react-dom";import{match as v}from"ts-pattern";import{useResizeObserver as y}from"usehooks-ts";import{attrf as S}from"../../common/index.js";import{PhxIcon as g}from"../../icons/index.js";import{VariantKeys as C,ViewControlsContext as M}from"./ViewControlsContext.js";let P="PhxViewControls",E={Root:m("div",{name:P,slot:"root",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e})=>({display:"flex",...e.variant===C.Expanded&&{justifyContent:"center"}})),Paper:m(i,{name:P,slot:"paper",shouldForwardProp:e=>"ownerState"!==e})(({ownerState:e,theme:{palette:r,shape:n,shadows:t,spacing:o}})=>({background:r.background.paper,borderRadius:n.borderRadius,display:"inline-flex",flexWrap:"nowrap",gap:o(.5),maxInlineSize:"100%",minInlineSize:60,padding:o(.5),..."elevation"===e.paperVariant&&{boxShadow:t[e.elevation]},..."outlined"===e.paperVariant&&{border:`1px solid ${r.divider}`}})),Menu:m(o,{name:P,slot:"menu",shouldForwardProp:e=>"ownerState"!==e})(({theme:{spacing:e}})=>({[`.${l.paper}`]:{translate:`0 ${e(-2)}`}})),MenuItem:m(a,{name:P,slot:"menuItem",shouldForwardProp:e=>"ownerState"!==e})({})};export const ViewControlsRoot=o=>{let{children:a,compactMenuProps:i,onChange:l,onOpenMenu:m,sizingLabelsByValue:b,slotProps:I={},slots:j={},value:R,...z}=d({props:o,name:P}),{components:V}=u(),{elevation:k=1,variant:F="elevation"}=V?.MuiPaper?.defaultProps??{},O=j.root??E.Root,W=j.paper??E.Paper,$=j.menu??E.Menu,A=j.menuItem??E.MenuItem,[J,N]=f(C.Expanded),T=x({expanded:0,compact:0}),q=x(null),B=x(null),D=x(new Map),[G,H]=f(0),K=p((e,r)=>(D.current.set(e,r),H(e=>e+1),()=>{D.current.delete(e),H(e=>e+1)}),[]),[L,Q]=f(null),U=p(e=>{Q(e.currentTarget)},[]),X=p(()=>{Q(null)},[]),Y=p((e,r)=>{l?.(e,r),X()},[l,X]),Z=x(null),_=p(e=>{let r=q.current,n=B.current;if(!r||!n)return;if(null==Z.current)return void N(C.Expanded);let t=n.scrollWidth,o=r.clientWidth,a=t>o+2,i=()=>{N(e=>v(e).with(C.Expanded,e=>a?(T.current.expanded=t,C.Compact):e).with(C.Compact,e=>a?(T.current.compact=t,C.Minimal):o+2>=T.current.expanded?C.Expanded:e).with(C.Minimal,e=>o+2>=T.current.compact?C.Compact:e).exhaustive())};e.commitSynchronously?w(i):i()},[]),ee=b&&JSON.stringify(Array.from(b)),er=x(ee);s(()=>{er.current!==ee&&(er.current=ee,T.current={expanded:0,compact:0},J!==C.Expanded)?N(C.Expanded):void 0!==ee&&_({commitSynchronously:!1})},[ee,J,_]),y({ref:q,onResize:()=>{_({commitSynchronously:!0})}}),y({ref:B,onResize:()=>{_({commitSynchronously:!0})}});let en="string"==typeof R?R:null,et=x(null);c(()=>{let e=null==et.current,r=null==en;et.current=en,Z.current=en,e!==r&&_({commitSynchronously:!1})},[en,_]);let eo=null!==L,ea=h(()=>({activeValue:en,dispatchChange:Y,isMenuOpen:eo,compactMenuProps:i,openMenu:m??U,register:K,sizingLabelsByValue:b,variant:J}),[en,i,Y,eo,m,U,K,b,J]),ei=h(()=>Array.from(D.current.entries()),[G]),el={variant:J,elevation:k,paperVariant:F};return e(M.Provider,{value:ea,children:r(O,{ref:q,...I.root,"data-view-controls":S({variant:{[J]:!0}}),ownerState:el,children:[e(W,{...I.paper,...z,ref:B,exclusive:!0,value:R,ownerState:el,onChange:l,children:a}),e($,{anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},...I.menu,anchorEl:L,open:null!==L&&J!==C.Expanded,onClose:X,children:ei.map(([o,a])=>r(A,{...I.menuItem,selected:o===en,onClick:e=>{Y(e,o)},children:[a.icon&&e(n,{children:e(g,{name:a.icon})}),e(t,{children:a.label})]},o))})]})})};
@@ -13,6 +13,7 @@ export declare class AuthHandlerBuilder<ENTITIES extends DomainEntity<string> =
13
13
  private readonly _handlers?;
14
14
  private readonly _clerkTokenService?;
15
15
  constructor(_context: BuilderDomainContext<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>, _handlers?: {
16
+ cognito?: boolean;
16
17
  onClerkCode?: (data: CodePayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>;
17
18
  onClerkSession?: (data: CodePayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>;
18
19
  onClerkRefresh?: (data: RefreshPayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>;
@@ -29,6 +30,8 @@ export declare class AuthHandlerBuilder<ENTITIES extends DomainEntity<string> =
29
30
  private handleAnonymous;
30
31
  private handleCode;
31
32
  private handleRefresh;
33
+ /** Enables shared-pool identities resolved and authorized by the Phoenix server. */
34
+ withCognitoHandlers(): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
32
35
  withCodeHandler(handler: (data: CodePayload, ctx: AuthHandlerContext) => Promise<AuthHandlerResponse<SESSION_DATA>>): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
33
36
  withClerkCodeHandler(): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
34
37
  withClerkSessionHandler(): AuthHandlerBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
@@ -1 +1 @@
1
- import{match as e}from"ts-pattern";import{ClerkTokenService as r,isClerkSessionToken as o}from"@salsita-ai/contracts/clerk";import{AuthPayload as s}from"@salsita-ai/contracts/webhook";import{SYSTEM_CHUNK_SCOPE as n}from"#package/domain";import{createClerkAuthCodeHandler as t}from"./clerk-auth-handlers/clerk-code-handler.js";import{createClerkRefreshHandler as i}from"./clerk-auth-handlers/clerk-refresh-handler.js";import{createClerkSessionHandler as h}from"./clerk-auth-handlers/clerk-session-handler.js";export class AuthHandlerBuilder{_context;_handlers;_clerkTokenService;constructor(e,o){this._context=e,this._handlers=o,e.clerk&&(this._clerkTokenService=new r(e.clerk.apiKey))}_isClerkIdToken(e){let r;if(!this._clerkTokenService)throw Error("Clerk token service is not configured!");try{r=this._clerkTokenService.parseIdToken(e)}catch(e){return!1}return r.iss.replace(/\/$/,"")===this._context.clerk?.oauthProviderBaseUrl.replace(/\/$/,"")}_isClerkRefreshToken(e){if(!this._clerkTokenService)throw Error("Clerk token service is not configured!");try{this._clerkTokenService.parseRefreshToken(e)}catch(e){return!1}return!0}async handleAnonymous(e,r){if(!this._handlers?.onAnonymous)throw Error("Can not authorize anonymous request, the anonymous handler is not configured!");return r.logger.debug("Anonymous flow."),{response:await this._handlers.onAnonymous(e,r),userIdSource:"custom"}}async handleCode(e,r){if(this._handlers?.onClerkCode&&e.idToken&&this._isClerkIdToken(e.idToken))return r.logger.debug("Clerk code flow."),{response:await this._handlers.onClerkCode(e,r),userIdSource:"clerk"};if(this._handlers?.onClerkSession&&!e.idToken&&this._context.clerk&&o(e.accessToken,this._context.clerk.oauthProviderBaseUrl))return r.logger.debug("Clerk session flow."),{response:await this._handlers.onClerkSession(e,r),userIdSource:"clerk"};if(this._handlers?.onCode)return r.logger.debug("Custom code flow."),{response:await this._handlers.onCode(e,r),userIdSource:"custom"};throw Error("Can not authorize code request, the code handler is not configured!")}async handleRefresh(e,r){if(this._handlers?.onClerkRefresh&&this._isClerkRefreshToken(e.refreshToken))return r.logger.debug("Clerk refresh flow."),{response:await this._handlers.onClerkRefresh(e,r),userIdSource:"clerk"};if(this._handlers?.onRefresh)return r.logger.debug("Custom refresh flow."),{response:await this._handlers.onRefresh(e,r),userIdSource:"custom"};throw Error("Refresh handler is not configured!")}withCodeHandler(e){if(this._handlers?.onCode)throw Error("Code handler is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,onCode:e})}withClerkCodeHandler(){if(this._handlers?.onClerkCode)throw Error("Clerk code handler is already configured!");if(!this._context.clerk)throw Error("Clerk context is not configured!");let e=t(this._context.clerk);return new AuthHandlerBuilder(this._context,{...this._handlers,onClerkCode:e})}withClerkSessionHandler(){if(this._handlers?.onClerkSession)throw Error("Clerk session handler is already configured!");if(!this._context.clerk)throw Error("Clerk context is not configured!");let{authorizedParties:e}=this._context.clerk;if(!e||0===e.length)throw Error("Clerk session handler authorized parties are not configured!");let r=h({...this._context.clerk,authorizedParties:e});return new AuthHandlerBuilder(this._context,{...this._handlers,onClerkSession:r})}withRefreshHandler(e){if(this._handlers?.onRefresh)throw Error("Refresh handler is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,onRefresh:e})}withClerkRefreshHandler(){if(this._handlers?.onClerkRefresh)throw Error("Clerk refresh handler is already configured!");if(!this._context.clerk)throw Error("Clerk context is not configured!");let e=i(this._context.clerk);return new AuthHandlerBuilder(this._context,{...this._handlers,onClerkRefresh:e})}withAnonymousHandler(e){if(this._handlers?.onAnonymous)throw Error("Anonymous handler is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,onAnonymous:e})}withPublishedChunkScopes(e){if(this._handlers?.scopeResolver)throw Error("Published chunk scopes resolver is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,scopeResolver:e})}build(){return async(r,o)=>{let t=s.parse(r),{response:i,userIdSource:h}=await e(t).with({type:"code"},e=>this.handleCode(e,o)).with({type:"refresh"},e=>this.handleRefresh(e,o)).with({type:"anonymous"},e=>this.handleAnonymous(e,o)).exhaustive(),l=this._context.configuratorBuilder.buildWebhookContext();if(!i.success)return{success:!1};{let e=l.config.domain.domainFactory.parseSessionData(i.data),r=this._handlers?.scopeResolver?this._handlers.scopeResolver({role:i.role,data:e}):[];return{success:i.success,data:e,role:i.role,refreshToken:i.refreshToken,expirationTime:i.expirationTime,scopes:[...new Set([...r,n])],userId:i.userId,userIdSource:h}}}}}
1
+ import{match as e}from"ts-pattern";import{ClerkTokenService as r,isClerkSessionToken as o}from"@salsita-ai/contracts/clerk";import{AuthPayload as n}from"@salsita-ai/contracts/webhook";import{SYSTEM_CHUNK_SCOPE as s}from"#package/domain";import{createClerkAuthCodeHandler as t}from"./clerk-auth-handlers/clerk-code-handler.js";import{createClerkRefreshHandler as i}from"./clerk-auth-handlers/clerk-refresh-handler.js";import{createClerkSessionHandler as h}from"./clerk-auth-handlers/clerk-session-handler.js";export class AuthHandlerBuilder{_context;_handlers;_clerkTokenService;constructor(e,o){this._context=e,this._handlers=o,e.clerk&&(this._clerkTokenService=new r(e.clerk.apiKey))}_isClerkIdToken(e){let r;if(!this._clerkTokenService)throw Error("Clerk token service is not configured!");try{r=this._clerkTokenService.parseIdToken(e)}catch(e){return!1}return r.iss.replace(/\/$/,"")===this._context.clerk?.oauthProviderBaseUrl.replace(/\/$/,"")}_isClerkRefreshToken(e){if(!this._clerkTokenService)throw Error("Clerk token service is not configured!");try{this._clerkTokenService.parseRefreshToken(e)}catch(e){return!1}return!0}async handleAnonymous(e,r){if(!this._handlers?.onAnonymous)throw Error("Can not authorize anonymous request, the anonymous handler is not configured!");return r.logger.debug("Anonymous flow."),{response:await this._handlers.onAnonymous(e,r),userIdSource:"custom"}}async handleCode(e,r){if(this._handlers?.onClerkCode&&e.idToken&&this._isClerkIdToken(e.idToken))return r.logger.debug("Clerk code flow."),{response:await this._handlers.onClerkCode(e,r),userIdSource:"clerk"};if(this._handlers?.onClerkSession&&!e.idToken&&this._context.clerk&&o(e.accessToken,this._context.clerk.oauthProviderBaseUrl))return r.logger.debug("Clerk session flow."),{response:await this._handlers.onClerkSession(e,r),userIdSource:"clerk"};if(this._handlers?.onCode)return r.logger.debug("Custom code flow."),{response:await this._handlers.onCode(e,r),userIdSource:"custom"};throw Error("Can not authorize code request, the code handler is not configured!")}async handleRefresh(e,r){if(this._handlers?.onClerkRefresh&&this._isClerkRefreshToken(e.refreshToken))return r.logger.debug("Clerk refresh flow."),{response:await this._handlers.onClerkRefresh(e,r),userIdSource:"clerk"};if(this._handlers?.onRefresh)return r.logger.debug("Custom refresh flow."),{response:await this._handlers.onRefresh(e,r),userIdSource:"custom"};throw Error("Refresh handler is not configured!")}withCognitoHandlers(){return new AuthHandlerBuilder(this._context,{...this._handlers,cognito:!0})}withCodeHandler(e){if(this._handlers?.onCode)throw Error("Code handler is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,onCode:e})}withClerkCodeHandler(){if(this._handlers?.onClerkCode)throw Error("Clerk code handler is already configured!");if(!this._context.clerk)throw Error("Clerk context is not configured!");let e=t(this._context.clerk);return new AuthHandlerBuilder(this._context,{...this._handlers,onClerkCode:e})}withClerkSessionHandler(){if(this._handlers?.onClerkSession)throw Error("Clerk session handler is already configured!");if(!this._context.clerk)throw Error("Clerk context is not configured!");let{authorizedParties:e}=this._context.clerk;if(!e||0===e.length)throw Error("Clerk session handler authorized parties are not configured!");let r=h({...this._context.clerk,authorizedParties:e});return new AuthHandlerBuilder(this._context,{...this._handlers,onClerkSession:r})}withRefreshHandler(e){if(this._handlers?.onRefresh)throw Error("Refresh handler is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,onRefresh:e})}withClerkRefreshHandler(){if(this._handlers?.onClerkRefresh)throw Error("Clerk refresh handler is already configured!");if(!this._context.clerk)throw Error("Clerk context is not configured!");let e=i(this._context.clerk);return new AuthHandlerBuilder(this._context,{...this._handlers,onClerkRefresh:e})}withAnonymousHandler(e){if(this._handlers?.onAnonymous)throw Error("Anonymous handler is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,onAnonymous:e})}withPublishedChunkScopes(e){if(this._handlers?.scopeResolver)throw Error("Published chunk scopes resolver is already configured!");return new AuthHandlerBuilder(this._context,{...this._handlers,scopeResolver:e})}build(){return async(r,o)=>{let t=n.parse(r),{response:i,userIdSource:h}=await e(t).with({type:"phoenix"},e=>{if(!this._handlers?.cognito&&!this._context.useCognito)throw Error("Cognito authentication is not configured. Enable useCognito or withCognitoHandlers().");return{response:{success:!0,data:this._context.configuratorBuilder.buildWebhookContext().config.domain.domainFactory.parseSessionData(e.data),role:e.role,userId:e.userId,expirationTime:e.expirationTime},userIdSource:"phoenix"}}).with({type:"code"},e=>this.handleCode(e,o)).with({type:"refresh"},e=>this.handleRefresh(e,o)).with({type:"anonymous"},e=>this.handleAnonymous(e,o)).exhaustive(),l=this._context.configuratorBuilder.buildWebhookContext();if(!i.success)return{success:!1};{let e=l.config.domain.domainFactory.parseSessionData(i.data),r=this._handlers?.scopeResolver?this._handlers.scopeResolver({role:i.role,data:e}):[];return{success:i.success,data:e,role:i.role,refreshToken:i.refreshToken,expirationTime:i.expirationTime,scopes:[...new Set([...r,s])],userId:i.userId,userIdSource:h}}}}}
@@ -13,13 +13,15 @@ export interface ClerkConfig {
13
13
  export interface BuilderDomainContext<ENTITIES extends DomainEntity<string> = never, ALLOWED_ROOT_ENTITIES extends ENTITIES = never, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>> = never, NAVIGATION_STATES extends string = never, VIEW_STATES extends string = never, TOOL_STATES extends string = never, EXPORT_STATES extends string = never, PUBLISHED_DATA extends Record<string, unknown> = never, SESSION_DATA extends Record<string, unknown> = never, FRONTEND_DATA extends Record<string, unknown> = never, ADMIN_ENTITIES extends DomainEntity<string> = never, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES = never, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>> = never, ADMIN_NAVIGATION_STATES extends string = never, ADMIN_VIEW_STATES extends string = never, FINALIZE_DATA extends Record<string, unknown> = never, PREFETCHED_FINALIZE_DATA extends Record<string, unknown> = never, FINALIZE_RESULT extends Record<string, unknown> = never, CALLBACK_DATA extends Record<string, unknown> = never, RESOURCE extends string = never> {
14
14
  configuratorBuilder: ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ActionTypes, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
15
15
  /** Server-only settings supplied by the generated webhook bundle. */
16
- assistantServerSettings?: Pick<DeploymentAssistant, 'instructions' | 'ai'> | null;
16
+ assistantServerSettings?: Pick<DeploymentAssistant, 'ai'> | null;
17
17
  /**
18
18
  * Asks a development environment to lock an assistant thread when the setup changes, as every
19
19
  * other environment does. The generated webhook bundle sets it from `ASSISTANT_STRICT_THREADS`.
20
20
  */
21
21
  assistantStrictThreads?: boolean;
22
22
  createI18n: () => I18n;
23
+ /** Accept server-resolved Phoenix identities over the authenticated webhook transport. */
24
+ useCognito?: boolean;
23
25
  clerk?: ClerkConfig;
24
26
  }
25
27
  export type ResourceMap<RESOURCE extends string> = {
@@ -1,3 +1,5 @@
1
+ import { ConfigurationInsightField } from '@salsita-ai/contracts/domain';
2
+ import { type ConfigurationInsightsPayload, type ConfigurationInsightsResponse } from '@salsita-ai/contracts/webhook';
1
3
  import { type $DomainEntity, type DomainEntity } from '#package/domain';
2
4
  import type { FetchBackendDataHandler } from '../backend-data-handler.js';
3
5
  import { type AuthHandler, AuthHandlerBuilder } from './auth-handler-builder.js';
@@ -11,11 +13,14 @@ export declare class WebhookBuilder<ENTITIES extends DomainEntity<string> = neve
11
13
  private readonly _context;
12
14
  private readonly _handlers?;
13
15
  constructor(_context: BuilderDomainContext<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>, _handlers?: {
16
+ onConfigurationInsights?: (data: ConfigurationInsightsPayload) => Promise<ConfigurationInsightsResponse>;
14
17
  onAuth?: AuthHandler<SESSION_DATA>;
15
18
  onFinalize?: ConfiguratorFinalizeHandler<FINALIZE_DATA, ENTITIES, SESSION_DATA, FRONTEND_DATA>;
16
19
  onCallback?: ConfiguratorCallbackHandler<CALLBACK_DATA, FINALIZE_RESULT, RESOURCE>;
17
20
  onFetchBackendData?: FetchBackendDataHandler<SESSION_DATA, FRONTEND_DATA>;
18
21
  } | undefined);
22
+ /** Publish only expressions reproducible from saved entities and versioned catalog data. */
23
+ withConfigurationInsights(definitions: readonly ConfigurationInsightField[]): WebhookBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
19
24
  withAuthHook(handler: AuthHandler<SESSION_DATA>): WebhookBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
20
25
  withConfiguratorFinalize(handlers: {
21
26
  onFinalize: ConfiguratorFinalizeHandler<FINALIZE_DATA, ENTITIES, SESSION_DATA, FRONTEND_DATA>;
@@ -1 +1 @@
1
- import{initConsoleLogger as t}from"@salsita-ai/common/utils";import{routeWebhookRequests as e}from"@salsita-ai/contracts/webhook";import{applyAssistantSetup as n,buildAssistantManifest as s,generateAssistantPrompt as i,isAssistantSetupHandler as o,projectAssistantSetupManifest as a,resolveHandlerModules as r}from"#package/domain";import{AdminFinalizeHandlerBuilder as d}from"./admin-finalize-handler-builder.js";import{AuthHandlerBuilder as l}from"./auth-handler-builder.js";import{CallbackBuilder as h}from"./callback-builder.js";import{ConfiguratorFinalizeHandlerBuilder as c}from"./configurator-finalize-handler-builder.js";import{DynamicResourcesFactory as u}from"./dynamic-resources-factory.js";import{PrefetchBuilder as m}from"./prefetch-builder.js";import{TaskFactory as f}from"./task-factory.js";export class WebhookBuilder{_context;_handlers;constructor(t,e){this._context=t,this._handlers=e}withAuthHook(t){return new WebhookBuilder(this._context,{...this._handlers,onAuth:t})}withConfiguratorFinalize(t){return new WebhookBuilder(this._context,{...this._handlers,...t})}withFetchBackendData(t){return new WebhookBuilder(this._context,{...this._handlers,onFetchBackendData:t})}build(){if(!this._handlers&&!this._context.assistantServerSettings)throw Error("Can not build webhook without any handlers! It would be very dumb!");let l=t(),h=new d(this._context).build();return e({onAuth:this._handlers?.onAuth!==void 0?(t,e)=>this._handlers.onAuth(t,{logger:l},e):void 0,admin:{onFinalize:(t,e)=>h(t,{logger:l},e)},configurator:{onAssistantSetup:this._context.assistantServerSettings?async t=>{let e=this._context.configuratorBuilder.buildConfig(),d=e.assistant;if(!d)throw Error("Assistant setup operation is not configured for this webhook!");let l=this._context.assistantServerSettings,h=r(e.handlers).find(o),c=h?n(d,l,h.handler().handler({manifest:a(d,l),inputs:{role:t.sessionRole,sessionData:t.sessionPayload,access:t.access}})):{resolved:d,settings:l};if(!c)return{setup:null,...this._context.assistantStrictThreads&&{threadLock:"strict"}};let u=s(c.resolved);return{setup:{sdl:u.sdl,prompt:i(u),...c.settings,instructions:c.settings?.instructions??void 0},...this._context.assistantStrictThreads&&{threadLock:"strict"}}}:void 0,onFetchBackendData:this._handlers?.onFetchBackendData?(t,e)=>this._handlers.onFetchBackendData(t,{logger:l},e):void 0,onFinalize:this._handlers?.onFinalize?async(t,e)=>{let n=await this._handlers?.onFetchBackendData?.({deploymentId:t.deploymentId,frontendUrl:t.frontendUrl,frontendData:t.frontendData,sessionRole:t.sessionRole,sessionPayload:t.sessionPayload,publishedAdminRevisionPath:t.publishedAdminRevisionPath,publishedChunkUrls:t.publishedChunkUrls},{logger:l},e);return this._handlers.onFinalize({deploymentId:t.deploymentId,frontendUrl:t.frontendUrl,frontendData:t.frontendData,sessionRole:t.sessionRole,sessionPayload:t.sessionPayload,publishedAdminRevisionPath:t.publishedAdminRevisionPath,publishedChunkUrls:t.publishedChunkUrls,data:t.data,locale:t.locale,configurationId:t.configurationId,entities:t.entities,modelVersion:t.modelVersion,revisionId:t.revisionId,rootEntityType:t.rootEntityType,backendData:n?.backendData},{logger:l},e)}:void 0,onCallback:this._handlers?.onCallback?(t,e)=>this._handlers.onCallback(t,{logger:l},e):void 0}},l)}}export const createDomainWebhook=t=>{let e=new l(t),n=new WebhookBuilder(t),s=new f(t),i=new u(t),o=new c(t,[]);return{authHandlerBuilder:e,webhookBuilder:n,taskFactory:s,finalizeHandlerBuilder:o,callbackBuilder:new h(t),dynamicResourcesFactory:i,prefetchBuilder:new m(t)}};
1
+ import{initConsoleLogger as t}from"@salsita-ai/common/utils";import{ConfigurationInsightField as e,ConfigurationInsightValue as n}from"@salsita-ai/contracts/domain";import{routeWebhookRequests as i}from"@salsita-ai/contracts/webhook";import{Domain as s,DomainEntityIdSchema as a,applyAssistantSetup as o,assistantTakesImages as r,buildAssistantManifest as l,createDecoder as d,createInitialDomainState as h,generateAssistantPrompt as u,isAssistantSetupHandler as c,projectAssistantSetupManifest as p,resolveHandlerModules as f}from"#package/domain";import{AdminFinalizeHandlerBuilder as m}from"./admin-finalize-handler-builder.js";import{AuthHandlerBuilder as b}from"./auth-handler-builder.js";import{CallbackBuilder as g}from"./callback-builder.js";import{ConfiguratorFinalizeHandlerBuilder as y}from"./configurator-finalize-handler-builder.js";import{DynamicResourcesFactory as k}from"./dynamic-resources-factory.js";import{PrefetchBuilder as w}from"./prefetch-builder.js";import{TaskFactory as v}from"./task-factory.js";export class WebhookBuilder{_context;_handlers;constructor(t,e){this._context=t,this._handlers=e}withConfigurationInsights(t){let i=t.map(t=>e.parse(t));if(i.length>50||new Set(i.map(t=>t.id)).size!==i.length)throw Error("Cannot publish analytical fields: use at most 50 unique field IDs.");let o=async t=>{let{config:e}=this._context.configuratorBuilder.buildWebhookContext(),{domainFactory:o}=e.domain;if(t.modelVersion!==o.modelVersion)return{status:"unavailable",values:[]};let r=async t=>{let e=await fetch(t,{signal:AbortSignal.timeout(1e4)});if(!e.ok)throw Error("Pinned publication is unavailable; restore that version before retrying evaluation.");return e.json()},l=Object.keys(e.chunks??{}),u=e.initialPublishedData;if(l.length>0){if(l.some(e=>!t.publishedChunks[e]))return{status:"unavailable",values:[]};u=Object.fromEntries(await Promise.all(l.map(async e=>[e,await r(t.publishedChunks[e])])))}else t.publishedDataUrl&&(u=await r(t.publishedDataUrl));let c=o.parsePublishedData(u),p=t.entities.map(d({type:"object",properties:{id:a,type:{type:"string"}},required:["id","type"],additionalProperties:!0},"Saved insight entity"));return{status:"verified",values:i.map(e=>{let i=!1,a=()=>{throw i=!0,Error("This expression requires an input that was not captured for evaluation.")},r=new s({selectors:{getDomainExpressions:()=>o.context.expressions,getAllowedRootEntityTypes:()=>o.context.allowedRootEntityTypes,getEntityReflections:a,getExpressionContext:()=>new Proxy({publishedData:c,domain:r,get mode(){return a()},get role(){return a()},get frontendData(){return a()},get backendData(){return a()},get sessionData(){return a()},get migrate(){return a()}},{get:(t,e)=>"domain"===e||"publishedData"===e?Reflect.get(t,e):a()})}});try{let s=h(p,t.rootEntityType),a=r.getRoot$Entity(s),o=Reflect.get(a,e.expression);if(i)return{field:e,status:"failed",value:null};if(null==o)return{field:e,status:"missing",value:null};return n.parse({field:e,status:"available",value:o})}catch{return{field:e,status:"failed",value:null}}})}};return new WebhookBuilder(this._context,{...this._handlers,onConfigurationInsights:o})}withAuthHook(t){return new WebhookBuilder(this._context,{...this._handlers,onAuth:t})}withConfiguratorFinalize(t){return new WebhookBuilder(this._context,{...this._handlers,...t})}withFetchBackendData(t){return new WebhookBuilder(this._context,{...this._handlers,onFetchBackendData:t})}build(){if(!this._handlers&&!this._context.assistantServerSettings)throw Error("Can not build webhook without any handlers! It would be very dumb!");let e=t(),n=new m(this._context).build();return i({onAuth:this._handlers?.onAuth!==void 0?(t,n)=>this._handlers.onAuth(t,{logger:e},n):void 0,admin:{onFinalize:(t,i)=>n(t,{logger:e},i)},configurator:{onConfigurationInsights:this._handlers?.onConfigurationInsights,onAssistantSetup:this._context.assistantServerSettings?async t=>{let e=this._context.configuratorBuilder.buildConfig(),n=e.assistant;if(!n)throw Error("Assistant setup operation is not configured for this webhook!");let i=this._context.assistantServerSettings,s=f(e.handlers).find(c),a=s?o(n,i,s.handler().handler({manifest:p(n,i),inputs:{role:t.sessionRole,sessionData:t.sessionPayload,access:t.access}})):{resolved:n,settings:i};if(!a)return{setup:null,...this._context.assistantStrictThreads&&{threadLock:"strict"}};let d=l(a.resolved),h=a.settings;return{setup:{sdl:d.sdl,prompt:u(d,{surface:"panel",voice:!0===h.ai.voice}),...h,instructions:a.resolved.instructions,...!r(d)&&{images:!1}},...this._context.assistantStrictThreads&&{threadLock:"strict"}}}:void 0,onFetchBackendData:this._handlers?.onFetchBackendData?(t,n)=>this._handlers.onFetchBackendData(t,{logger:e},n):void 0,onFinalize:this._handlers?.onFinalize?async(t,n)=>{let i=await this._handlers?.onFetchBackendData?.({deploymentId:t.deploymentId,frontendUrl:t.frontendUrl,frontendData:t.frontendData,sessionRole:t.sessionRole,sessionPayload:t.sessionPayload,publishedAdminRevisionPath:t.publishedAdminRevisionPath,publishedChunkUrls:t.publishedChunkUrls},{logger:e},n);return this._handlers.onFinalize({deploymentId:t.deploymentId,frontendUrl:t.frontendUrl,frontendData:t.frontendData,sessionRole:t.sessionRole,sessionPayload:t.sessionPayload,publishedAdminRevisionPath:t.publishedAdminRevisionPath,publishedChunkUrls:t.publishedChunkUrls,data:t.data,locale:t.locale,configurationId:t.configurationId,entities:t.entities,modelVersion:t.modelVersion,revisionId:t.revisionId,rootEntityType:t.rootEntityType,backendData:i?.backendData},{logger:e},n)}:void 0,onCallback:this._handlers?.onCallback?(t,n)=>this._handlers.onCallback(t,{logger:e},n):void 0}},e)}}export const createDomainWebhook=t=>{let e=new b(t),n=new WebhookBuilder(t),i=new v(t),s=new k(t),a=new y(t,[]);return{authHandlerBuilder:e,webhookBuilder:n,taskFactory:i,finalizeHandlerBuilder:a,callbackBuilder:new g(t),dynamicResourcesFactory:s,prefetchBuilder:new w(t)}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salsita-ai/sdk",
3
- "version": "0.50.0-develop.11a39afa73",
3
+ "version": "0.50.0-develop.12744a81f2",
4
4
  "description": "TypeScript SDK and CLI for building, running, and deploying Phoenix configurator applications.",
5
5
  "keywords": [
6
6
  "salsita",
@@ -120,6 +120,10 @@
120
120
  "import": "./dist/extras/index.js",
121
121
  "types": "./dist/extras/index.d.ts"
122
122
  },
123
+ "./extras/cognito": {
124
+ "import": "./dist/extras/cognito/index.js",
125
+ "types": "./dist/extras/cognito/index.d.ts"
126
+ },
123
127
  "./extras/clerk": {
124
128
  "import": "./dist/extras/clerk/index.js",
125
129
  "types": "./dist/extras/clerk/index.d.ts"
@@ -235,6 +239,7 @@
235
239
  "@lingui/vite-plugin": "5.9.5",
236
240
  "@monaco-editor/react": "4.7.0",
237
241
  "@mui/utils": "5.17.1",
242
+ "@popperjs/core": "2.11.8",
238
243
  "@swc/core": "1.15.40",
239
244
  "@swc/wasm-web": "1.15.40",
240
245
  "@tanstack/ai": "0.64.0",
@@ -310,8 +315,8 @@
310
315
  "yaml": "2.9.0",
311
316
  "yargs": "17.7.2",
312
317
  "zod": "3.25.76",
313
- "@salsita-ai/contracts": "0.50.0-develop.11a39afa73",
314
- "@salsita-ai/common": "0.50.0-develop.11a39afa73"
318
+ "@salsita-ai/common": "0.50.0-develop.12744a81f2",
319
+ "@salsita-ai/contracts": "0.50.0-develop.12744a81f2"
315
320
  },
316
321
  "devDependencies": {
317
322
  "@clerk/clerk-react": "5.61.8",
@@ -365,7 +370,7 @@
365
370
  "three": "0.160.1",
366
371
  "tsx": "4.22.3",
367
372
  "vitest": "4.1.11",
368
- "server": "1.65.0"
373
+ "server": "1.68.0"
369
374
  },
370
375
  "peerDependencies": {
371
376
  "@clerk/clerk-react": "^5.61.8",