@salsita-ai/sdk 0.50.0-develop.9241bcf09e → 0.50.0-develop.927e2414eb

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 (527) hide show
  1. package/README.md +3 -3
  2. package/dist/admin/common/admin-interface.d.ts +11 -1
  3. package/dist/admin/common/admin-interface.js +1 -1
  4. package/dist/admin/ui/layout/UserProfile.d.ts +1 -1
  5. package/dist/admin/ui/layout/UserProfile.js +1 -1
  6. package/dist/admin/ui/maintenance/ImportPresets.js +1 -1
  7. package/dist/application/mount-application.js +1 -1
  8. package/dist/application/mount-configurator.js +1 -1
  9. package/dist/application/studio-embedding.d.ts +6 -0
  10. package/dist/application/studio-embedding.js +1 -0
  11. package/dist/application-spec/core/enhanced-json-schema.d.ts +5 -6
  12. package/dist/application-spec/core/enhanced-json-schema.js +1 -1
  13. package/dist/application-spec/core/markers/index.d.ts +1 -0
  14. package/dist/application-spec/core/markers/index.js +1 -1
  15. package/dist/application-spec/core/markers/set-in-studio-marker.d.ts +15 -0
  16. package/dist/application-spec/core/markers/set-in-studio-marker.js +1 -0
  17. package/dist/application-spec/errors/diagnostic-codes.d.ts +16 -0
  18. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  19. package/dist/application-spec/errors/diagnostic-messages.d.ts +16 -0
  20. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  21. package/dist/application-spec/generate-application/code/domain-runtime-files.d.ts +3 -3
  22. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  23. package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +0 -12
  24. package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
  25. package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +5 -1
  26. package/dist/application-spec/generate-application/code/templates/admin-config.js +4 -4
  27. package/dist/application-spec/generate-application/code/templates/application-types.js +5 -5
  28. package/dist/application-spec/generate-application/code/templates/configurator-config.js +6 -6
  29. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.d.ts +1 -1
  30. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +19 -0
  31. package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
  32. package/dist/application-spec/generate-application/code/templates/frontend-config.js +7 -3
  33. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +3 -3
  34. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +3 -3
  35. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +10 -6
  36. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -7
  37. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +12 -12
  38. package/dist/application-spec/generate-application/code/templates/globals.js +21 -12
  39. package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
  40. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  41. package/dist/application-spec/generate-application/code/templates/sign-in-page-options.d.ts +5 -0
  42. package/dist/application-spec/generate-application/code/templates/sign-in-page-options.js +1 -0
  43. package/dist/application-spec/generate-application/code/templates/skills/core/cli.d.ts +2 -1
  44. package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
  45. package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +2 -1
  46. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.js +1 -1
  47. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
  48. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
  49. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
  50. package/dist/application-spec/generate-application/code/templates/skills/features/{custom-layout/assistant.d.ts → assistant/panel.d.ts} +1 -1
  51. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +42 -0
  52. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
  53. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +55 -0
  54. package/dist/application-spec/generate-application/code/templates/skills/features/{webhooks/assistant-setup.d.ts → assistant/session-setup.d.ts} +1 -1
  55. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +16 -0
  56. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +2 -2
  57. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/sign-in.d.ts +3 -0
  58. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/sign-in.js +19 -0
  59. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +1 -1
  60. package/dist/application-spec/generate-application/code/templates/skills/features/embedding.d.ts +2 -0
  61. package/dist/application-spec/generate-application/code/templates/skills/features/embedding.js +1 -0
  62. package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
  63. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.d.ts +1 -1
  64. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +32 -26
  65. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +1 -3
  66. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.js +1 -1
  67. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/session-fields.d.ts +3 -0
  68. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/session-fields.js +1 -0
  69. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -1
  70. package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +1 -1
  71. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +1 -1
  72. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
  73. package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
  74. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
  75. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +3 -0
  76. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +2 -2
  77. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +1 -1
  78. package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -1
  79. package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
  80. package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
  81. package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +1 -1
  82. package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
  83. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
  84. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
  85. package/dist/application-spec/generate-application/code/templates/skills/sdk-channel.d.ts +17 -0
  86. package/dist/application-spec/generate-application/code/templates/skills/sdk-channel.js +1 -0
  87. package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -1
  88. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +3 -2
  89. package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +1 -2
  90. package/dist/application-spec/generate-application/code/templates/webhook-index.js +3 -7
  91. package/dist/application-spec/generate-application/code/webhook-safe-files.d.ts +3 -1
  92. package/dist/application-spec/generate-application/code/webhook-safe-files.js +1 -1
  93. package/dist/application-spec/parse-application-files/access/access-handler-kinds.d.ts +18 -0
  94. package/dist/application-spec/parse-application-files/access/access-handler-kinds.js +1 -0
  95. package/dist/application-spec/parse-application-files/access/analyzed-file.d.ts +7 -0
  96. package/dist/application-spec/parse-application-files/access/analyzed-file.js +1 -0
  97. package/dist/application-spec/parse-application-files/access/check-access-handler-files.d.ts +20 -0
  98. package/dist/application-spec/parse-application-files/access/check-access-handler-files.js +1 -0
  99. package/dist/application-spec/parse-application-files/access/check-auth-hook-files.d.ts +17 -0
  100. package/dist/application-spec/parse-application-files/access/check-auth-hook-files.js +1 -0
  101. package/dist/application-spec/parse-application-files/access/index.d.ts +5 -0
  102. package/dist/application-spec/parse-application-files/access/index.js +1 -0
  103. package/dist/application-spec/parse-application-files/access/sign-in-control.d.ts +7 -0
  104. package/dist/application-spec/parse-application-files/access/sign-in-control.js +1 -0
  105. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +2 -1
  106. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  107. package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +30 -4
  108. package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
  109. package/dist/application-spec/parse-application-files/categorize/webhook-safety.js +1 -1
  110. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +16 -1
  111. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
  112. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  113. package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +7 -1
  114. package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
  115. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  116. package/dist/application-spec/parse-application-files/parse-common-admin-spec.js +1 -1
  117. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +3 -2
  118. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -1
  119. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +29 -6
  120. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  121. package/dist/application-spec/parse-application-files/raw-spec/raw-components.js +1 -1
  122. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +11 -3
  123. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  124. package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
  125. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +6 -0
  126. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  127. package/dist/application-spec/parse-application-files/spec/model/index.d.ts +2 -1
  128. package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
  129. package/dist/application-spec/parse-application-files/spec/model/session-data-schema.d.ts +5 -2
  130. package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
  131. package/dist/application-spec/parse-application-files/spec/model/session-fields/index.d.ts +1 -0
  132. package/dist/application-spec/parse-application-files/spec/model/session-fields/index.js +1 -0
  133. package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.d.ts +15 -0
  134. package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.js +1 -0
  135. package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
  136. package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -1
  137. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
  138. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +14 -2
  139. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -1
  140. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +6 -9
  141. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  142. package/dist/application-spec/parse-application-files/spec/sections/assistant/index.d.ts +0 -1
  143. package/dist/client/authenticated-client.d.ts +5 -1
  144. package/dist/client/authenticated-client.js +1 -1
  145. package/dist/client/authorized-client.d.ts +3 -1
  146. package/dist/client/authorized-client.js +1 -1
  147. package/dist/client/base-client.d.ts +15 -1
  148. package/dist/client/base-client.js +1 -1
  149. package/dist/client/cli-client/cli-api-client.d.ts +17 -0
  150. package/dist/client/cli-client/cli-api-client.js +1 -0
  151. package/dist/client/cli-client/index.d.ts +2 -0
  152. package/dist/client/cli-client/index.js +1 -0
  153. package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
  154. package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
  155. package/dist/client/contract.d.ts +39 -4
  156. package/dist/client/contract.js +1 -1
  157. package/dist/client/index.d.ts +3 -1
  158. package/dist/client/index.js +1 -1
  159. package/dist/client/phoenix-api.d.ts +7834 -2378
  160. package/dist/client/unauthenticated-client.d.ts +2 -1
  161. package/dist/client/unauthenticated-client.js +1 -1
  162. package/dist/client/version.d.ts +11 -0
  163. package/dist/client/version.js +1 -1
  164. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  165. package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +16 -4
  166. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +25 -10
  167. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  168. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +15 -5
  169. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +1 -0
  170. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -1
  171. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +7 -3
  172. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +6 -2
  173. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.d.ts +14 -0
  174. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.js +2 -0
  175. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
  176. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
  177. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +4 -2
  178. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  179. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +9 -3
  180. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  181. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +6 -3
  182. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -1
  183. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.d.ts +15 -4
  184. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.js +3 -3
  185. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +15 -7
  186. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  187. package/dist/configurator/common/configurator-interface.d.ts +13 -1
  188. package/dist/configurator/common/configurator-interface.js +1 -1
  189. package/dist/configurator/scene/animations/Animations.js +1 -1
  190. package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
  191. package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
  192. package/dist/configurator/scene/resources/use-phx-gltf.js +1 -1
  193. package/dist/configurator/scene/scene-entity/materials/LocalCreatedMaterial.js +1 -1
  194. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.d.ts +5 -0
  195. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
  196. package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.d.ts +27 -0
  197. package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.js +1 -0
  198. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -1
  199. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
  200. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  201. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +6 -5
  202. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
  203. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +4 -3
  204. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
  205. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
  206. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
  207. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.d.ts +10 -0
  208. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.js +1 -0
  209. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.d.ts +10 -0
  210. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.js +1 -0
  211. package/dist/configurator/ui/assistant/disclaimer/index.d.ts +2 -0
  212. package/dist/configurator/ui/assistant/disclaimer/index.js +1 -0
  213. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +2 -3
  214. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -1
  215. package/dist/configurator/ui/assistant/drawing/index.d.ts +1 -1
  216. package/dist/configurator/ui/assistant/drawing/index.js +1 -1
  217. package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +6 -12
  218. package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -1
  219. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +11 -7
  220. package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -1
  221. package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -1
  222. package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -1
  223. package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +5 -0
  224. package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
  225. package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
  226. package/dist/configurator/ui/configurator-layout/index.js +1 -1
  227. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
  228. package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
  229. package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
  230. package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
  231. package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
  232. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
  233. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
  234. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
  235. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
  236. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  237. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
  238. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  239. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
  240. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
  241. package/dist/configurator/ui/index.d.ts +1 -1
  242. package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
  243. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  244. package/dist/docs/index.json +117 -2
  245. package/dist/docs/layouts/nested-view-controls.mdx +223 -0
  246. package/dist/docs/layouts/preview/always.mdx +22 -0
  247. package/dist/docs/layouts/view-controls.mdx +2 -0
  248. package/dist/docs/other-features/domain-actions.mdx +53 -56
  249. package/dist/docs/phoenix/admin.mdx +5 -40
  250. package/dist/docs/phoenix/application-states.mdx +1 -1
  251. package/dist/docs/phoenix/assistant/actions.mdx +183 -0
  252. package/dist/docs/phoenix/assistant/changing-the-configuration.mdx +333 -0
  253. package/dist/docs/phoenix/assistant/instructions-and-ai-settings.mdx +221 -0
  254. package/dist/docs/phoenix/assistant/overview.mdx +137 -0
  255. package/dist/docs/phoenix/assistant/per-session-setup.mdx +166 -0
  256. package/dist/docs/phoenix/assistant/reading-the-configuration.mdx +349 -0
  257. package/dist/docs/phoenix/assistant/screenshots.mdx +135 -0
  258. package/dist/docs/phoenix/assistant/security-and-limits.mdx +151 -0
  259. package/dist/docs/phoenix/assistant/the-panel.mdx +298 -0
  260. package/dist/docs/phoenix/clerk-sign-in.mdx +9 -5
  261. package/dist/docs/phoenix/configurator-interface.mdx +18 -33
  262. package/dist/docs/phoenix/csp.mdx +3 -1
  263. package/dist/docs/phoenix/data-sources.mdx +26 -30
  264. package/dist/docs/phoenix/deployments.mdx +3 -3
  265. package/dist/docs/phoenix/finalization.mdx +0 -1
  266. package/dist/docs/phoenix/integration/authentication-external.mdx +17 -15
  267. package/dist/docs/phoenix/integration/authentication-internal.mdx +1 -1
  268. package/dist/docs/phoenix/integration/finalization-internal.mdx +1 -4
  269. package/dist/docs/phoenix/integration/integration-modes-external.mdx +2 -2
  270. package/dist/docs/phoenix/integration/integration-modes-internal.mdx +9 -0
  271. package/dist/docs/phoenix/layout-slots.mdx +1 -1
  272. package/dist/docs/phoenix/migrations.mdx +1 -1
  273. package/dist/docs/phoenix/phoenix-cli.mdx +90 -57
  274. package/dist/docs/phoenix/project-structure.mdx +30 -15
  275. package/dist/docs/phoenix/publishing.mdx +21 -28
  276. package/dist/docs/phoenix/sdk-builder-workflow.mdx +51 -34
  277. package/dist/docs/phoenix/sessions-and-access.mdx +171 -164
  278. package/dist/docs/phoenix/webhook-membership.mdx +4 -1
  279. package/dist/docs/phoenix/webhooks.mdx +93 -116
  280. package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
  281. package/dist/domain/application/access/access-handlers.d.ts +19 -0
  282. package/dist/domain/application/access/access-handlers.js +1 -0
  283. package/dist/domain/application/access/anonymous-handler.d.ts +16 -0
  284. package/dist/domain/application/access/anonymous-handler.js +1 -0
  285. package/dist/domain/application/access/chunk-scopes-handler.d.ts +27 -0
  286. package/dist/domain/application/access/chunk-scopes-handler.js +1 -0
  287. package/dist/domain/application/access/code-handler.d.ts +16 -0
  288. package/dist/domain/application/access/code-handler.js +1 -0
  289. package/dist/domain/application/access/index.d.ts +7 -0
  290. package/dist/domain/application/access/index.js +1 -0
  291. package/dist/domain/application/access/refresh-handler.d.ts +16 -0
  292. package/dist/domain/application/access/refresh-handler.js +1 -0
  293. package/dist/domain/application/access/signed-in-handler.d.ts +44 -0
  294. package/dist/domain/application/access/signed-in-handler.js +1 -0
  295. package/dist/domain/application/access/visitor-handler.d.ts +23 -0
  296. package/dist/domain/application/access/visitor-handler.js +1 -0
  297. package/dist/domain/application/application-config.d.ts +36 -1
  298. package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
  299. package/dist/domain/application/assistant/assistant-exposure.js +1 -0
  300. package/dist/domain/application/assistant/build-assistant-lenses.js +3 -3
  301. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  302. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +6 -2
  303. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  304. package/dist/domain/application/assistant/index.d.ts +1 -0
  305. package/dist/domain/application/assistant/index.js +1 -1
  306. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  307. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +14 -2
  308. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  309. package/dist/domain/application/assistant/session-setup/assistant-takes-images.d.ts +7 -0
  310. package/dist/domain/application/assistant/session-setup/assistant-takes-images.js +1 -0
  311. package/dist/domain/application/assistant/session-setup/index.d.ts +1 -0
  312. package/dist/domain/application/assistant/session-setup/index.js +1 -1
  313. package/dist/domain/application/assistant-mutations.js +1 -1
  314. package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
  315. package/dist/domain/application/assistant-recipe-groups.js +1 -1
  316. package/dist/domain/application/configurator-builder.d.ts +2 -0
  317. package/dist/domain/application/configurator-builder.js +1 -1
  318. package/dist/domain/application/index.d.ts +2 -1
  319. package/dist/domain/application/index.js +1 -1
  320. package/dist/domain/application/standard-properties.d.ts +1 -1
  321. package/dist/domain/application/standard-properties.js +1 -1
  322. package/dist/domain/available-system-components/available-system-components.js +1 -1
  323. package/dist/domain/core/component/system-component-filter.d.ts +1 -0
  324. package/dist/domain/core/component/system-component-filter.js +1 -1
  325. package/dist/domain/core/component/view-state-component.d.ts +4 -3
  326. package/dist/domain/core/component/view-state-component.js +1 -1
  327. package/dist/domain/core/domain-factory.d.ts +6 -0
  328. package/dist/domain/core/domain-factory.js +1 -1
  329. package/dist/domain/core/fit-session-data.d.ts +16 -0
  330. package/dist/domain/core/fit-session-data.js +1 -0
  331. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
  332. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  333. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  334. package/dist/domain/domain-runtime/domain-context/actions.d.ts +4 -0
  335. package/dist/domain/domain-runtime/domain-context/actions.js +1 -1
  336. package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +8 -0
  337. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  338. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -0
  339. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  340. package/dist/domain/domain-runtime/domain-context/types.d.ts +8 -4
  341. package/dist/domain/domain-runtime/domain-runtime.d.ts +8 -0
  342. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +5 -4
  343. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
  344. package/dist/domain/extensions/index.d.ts +0 -1
  345. package/dist/domain/extensions/index.js +1 -1
  346. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +4 -0
  347. package/dist/domain/spec/sections/actions.d.ts +3 -2
  348. package/dist/domain/spec/sections/app-metadata.d.ts +12 -0
  349. package/dist/domain/spec/sections/assistant/assistant-features.d.ts +13 -0
  350. package/dist/domain/spec/sections/assistant/assistant-features.js +1 -0
  351. package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +17 -6
  352. package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +28 -5
  353. package/dist/domain/spec/sections/assistant/index.d.ts +1 -0
  354. package/dist/domain/system-components/index.d.ts +1 -0
  355. package/dist/domain/system-components/index.js +1 -1
  356. package/dist/domain/system-components/navigation/index.d.ts +1 -0
  357. package/dist/domain/system-components/navigation/index.js +1 -0
  358. package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
  359. package/dist/domain/system-components/navigation/view-controls.js +1 -0
  360. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  361. package/dist/extras/clerk/index.d.ts +6 -0
  362. package/dist/extras/cognito/AccountAvatar.d.ts +7 -0
  363. package/dist/extras/cognito/AccountAvatar.js +1 -0
  364. package/dist/extras/cognito/AccountControl.d.ts +14 -0
  365. package/dist/extras/cognito/AccountControl.js +1 -0
  366. package/dist/extras/cognito/AdminSignInPage.d.ts +26 -0
  367. package/dist/extras/cognito/AdminSignInPage.js +1 -0
  368. package/dist/extras/cognito/CognitoSignInPage.d.ts +8 -2
  369. package/dist/extras/cognito/CognitoSignInPage.js +1 -1
  370. package/dist/extras/cognito/ConfiguratorSignInPage.d.ts +19 -0
  371. package/dist/extras/cognito/ConfiguratorSignInPage.js +1 -0
  372. package/dist/extras/cognito/SignInFailurePage.d.ts +11 -0
  373. package/dist/extras/cognito/SignInFailurePage.js +1 -0
  374. package/dist/extras/cognito/SignInGateLayout.d.ts +25 -0
  375. package/dist/extras/cognito/SignInGateLayout.js +1 -0
  376. package/dist/extras/cognito/SignInNotice.d.ts +9 -0
  377. package/dist/extras/cognito/SignInNotice.js +1 -0
  378. package/dist/extras/cognito/index.d.ts +4 -0
  379. package/dist/extras/cognito/index.js +1 -1
  380. package/dist/globals/index.d.ts +5 -0
  381. package/dist/i18n/locales/cs/messages.js +1 -1
  382. package/dist/i18n/locales/da/messages.js +1 -1
  383. package/dist/i18n/locales/de/messages.js +1 -1
  384. package/dist/i18n/locales/de-AT/messages.js +1 -1
  385. package/dist/i18n/locales/en/messages.js +1 -1
  386. package/dist/i18n/locales/en-AU/messages.js +1 -1
  387. package/dist/i18n/locales/en-GB/messages.js +1 -1
  388. package/dist/i18n/locales/es/messages.js +1 -1
  389. package/dist/i18n/locales/fr/messages.js +1 -1
  390. package/dist/i18n/locales/hu/messages.js +1 -1
  391. package/dist/i18n/locales/it/messages.js +1 -1
  392. package/dist/i18n/locales/nl/messages.js +1 -1
  393. package/dist/i18n/locales/pl/messages.js +1 -1
  394. package/dist/i18n/locales/pt/messages.js +1 -1
  395. package/dist/i18n/locales/ro/messages.js +1 -1
  396. package/dist/i18n/locales/sk/messages.js +1 -1
  397. package/dist/i18n/locales/tr/messages.js +1 -1
  398. package/dist/legacy/deployment-cli/commands/create-environment.js +1 -1
  399. package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
  400. package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
  401. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +12 -3
  402. package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
  403. package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
  404. package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
  405. package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
  406. package/dist/phoenix/application-spec/index.d.ts +1 -1
  407. package/dist/phoenix/application-spec/index.js +1 -1
  408. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +10 -3
  409. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  410. package/dist/phoenix/cli.js +1 -1
  411. package/dist/phoenix/commands/account/whoami.d.ts +8 -2
  412. package/dist/phoenix/commands/account/whoami.js +4 -3
  413. package/dist/phoenix/commands/cleanup-environment.js +1 -1
  414. package/dist/phoenix/commands/deploy.d.ts +7 -2
  415. package/dist/phoenix/commands/deploy.js +9 -3
  416. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  417. package/dist/phoenix/commands/deps/deps.js +2 -2
  418. package/dist/phoenix/commands/feedback.d.ts +2 -2
  419. package/dist/phoenix/commands/feedback.js +1 -1
  420. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  421. package/dist/phoenix/commands/init-starter-spec.js +3 -4
  422. package/dist/phoenix/commands/init.d.ts +2 -2
  423. package/dist/phoenix/commands/init.js +1 -1
  424. package/dist/phoenix/commands/login.d.ts +1 -1
  425. package/dist/phoenix/commands/login.js +2 -2
  426. package/dist/phoenix/commands/logout.js +1 -1
  427. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  428. package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
  429. package/dist/phoenix/services/cli-credentials.d.ts +13 -2
  430. package/dist/phoenix/services/cli-credentials.js +2 -2
  431. package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
  432. package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
  433. package/dist/phoenix/services/cli-server/index.d.ts +2 -0
  434. package/dist/phoenix/services/cli-server/index.js +1 -0
  435. package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +25 -0
  436. package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
  437. package/dist/phoenix/services/development-credential.js +1 -1
  438. package/dist/phoenix/services/frontend-config.d.ts +2 -0
  439. package/dist/phoenix/services/index.d.ts +4 -2
  440. package/dist/phoenix/services/index.js +1 -1
  441. package/dist/phoenix/services/phoenix-regions.d.ts +15 -5
  442. package/dist/phoenix/services/phoenix-regions.js +1 -1
  443. package/dist/phoenix/services/prepare-development-environment.js +2 -2
  444. package/dist/phoenix/services/session/phoenix-application.js +1 -1
  445. package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
  446. package/dist/phoenix/services/signed-in-development-environment.js +1 -1
  447. package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
  448. package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
  449. package/dist/phoenix/services/spec-project/index.d.ts +3 -0
  450. package/dist/phoenix/services/spec-project/index.js +1 -0
  451. package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
  452. package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
  453. package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
  454. package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
  455. package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
  456. package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
  457. package/dist/phoenix/services/variant-file-session.js +1 -1
  458. package/dist/phoenix/services/vite-config.js +1 -1
  459. package/dist/phoenix/services/webhook-service/transport.js +1 -1
  460. package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
  461. package/dist/react-sdk/application-runtime/domain-application-context/configuration-persist-system.d.ts +6 -0
  462. package/dist/react-sdk/application-runtime/domain-application-context/configuration-persist-system.js +1 -1
  463. package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +2 -2
  464. package/dist/react-sdk/application-runtime/integration/integration-mode.d.ts +30 -0
  465. package/dist/react-sdk/application-runtime/integration/integration-mode.js +1 -1
  466. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +20 -6
  467. package/dist/react-sdk/application-runtime/session/actions.d.ts +2 -1
  468. package/dist/react-sdk/application-runtime/session/actions.js +1 -1
  469. package/dist/react-sdk/application-runtime/session/initialize.js +1 -1
  470. package/dist/react-sdk/application-runtime/session/selectors.d.ts +2 -0
  471. package/dist/react-sdk/application-runtime/session/selectors.js +1 -1
  472. package/dist/react-sdk/application-runtime/session/session-service.d.ts +64 -2
  473. package/dist/react-sdk/application-runtime/session/session-service.js +1 -1
  474. package/dist/react-sdk/application-runtime/session/session-token.d.ts +8 -0
  475. package/dist/react-sdk/application-runtime/session/session-token.js +1 -1
  476. package/dist/react-sdk/application-runtime/session/types.d.ts +6 -1
  477. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +1 -0
  478. package/dist/react-sdk/domain-context/index.d.ts +3 -2
  479. package/dist/react-sdk/domain-context/index.js +1 -1
  480. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +1 -5
  481. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -1
  482. package/dist/react-sdk/domain-context/system-hooks/generate-share-link.d.ts +25 -0
  483. package/dist/react-sdk/domain-context/system-hooks/generate-share-link.js +1 -0
  484. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
  485. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  486. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
  487. package/dist/react-sdk/session/AccessDeniedAdminPage.d.ts +13 -0
  488. package/dist/react-sdk/session/AccessDeniedAdminPage.js +1 -0
  489. package/dist/react-sdk/session/AccessDeniedPage.d.ts +20 -0
  490. package/dist/react-sdk/session/AccessDeniedPage.js +1 -0
  491. package/dist/react-sdk/session/ConfiguratorUnavailablePage.d.ts +5 -0
  492. package/dist/react-sdk/session/ConfiguratorUnavailablePage.js +1 -0
  493. package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
  494. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  495. package/dist/react-sdk/session/index.d.ts +3 -0
  496. package/dist/react-sdk/session/index.js +1 -1
  497. package/dist/react-sdk/session/server-sign-in-support.d.ts +16 -0
  498. package/dist/react-sdk/session/server-sign-in-support.js +1 -0
  499. package/dist/react-sdk/session/sign-in-address.d.ts +18 -0
  500. package/dist/react-sdk/session/sign-in-address.js +1 -0
  501. package/dist/react-sdk/session/studio-frame.d.ts +14 -0
  502. package/dist/react-sdk/session/studio-frame.js +1 -0
  503. package/dist/react-sdk/session/use-sign-in.d.ts +51 -0
  504. package/dist/react-sdk/session/use-sign-in.js +1 -0
  505. package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
  506. package/dist/ui-sdk/components/preview/Preview.js +2 -2
  507. package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +3 -2
  508. package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
  509. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
  510. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
  511. package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
  512. package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
  513. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
  514. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
  515. package/dist/webhook/builders/auth-handler-builder.d.ts +21 -1
  516. package/dist/webhook/builders/auth-handler-builder.js +1 -1
  517. package/dist/webhook/builders/common.d.ts +9 -0
  518. package/dist/webhook/builders/webhook-builder.d.ts +18 -0
  519. package/dist/webhook/builders/webhook-builder.js +1 -1
  520. package/package.json +5 -4
  521. package/schema/domain-spec.json +224 -65
  522. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/assistant.js +0 -43
  523. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +0 -32
  524. package/dist/application-spec/generate-application/code/templates/skills/processes/beta.d.ts +0 -14
  525. package/dist/application-spec/generate-application/code/templates/skills/processes/beta.js +0 -4
  526. package/dist/domain/extensions/view-controls.d.ts +0 -25
  527. package/dist/domain/extensions/view-controls.js +0 -1
@@ -16,7 +16,7 @@ To support project specific finalization workflows, authentication and custom in
16
16
  - **fetchBackendData** - server-side data for the configurator ([Backend Data Handler](#backend-data-handler))
17
17
  - **finalize** - configurator finalization ([Configurator Finalization](#configurator-finalization)) and Admin finalization when an admin publishes from Project Admin ([Admin Finalization](#admin-finalization))
18
18
  - **callback** - the result of a configurator finalization ([Callback Hook / Result](#callback-hook--result))
19
- - **assistantSetup** - the assistant's setup for a session, when the spec configures the assistant
19
+ - **assistantSetup** - the assistant's setup for a session, when the spec configures the assistant ([Per-session Setup](?path=/docs/phoenix-assistant-per-session-setup--docs))
20
20
 
21
21
  Under `phoenix dev` the webhook runs on the developer's machine, and the platform reaches it through the development webhook tunnel instead of the cloud function.
22
22
 
@@ -26,8 +26,8 @@ Phoenix provides domain-aware builders through the global `phx.webhooks` namespa
26
26
 
27
27
  **Available builders and factories:**
28
28
 
29
- - `phx.webhooks.authHandlerBuilder` - Authentication handler builder
30
- - `phx.webhooks.webhookBuilder` - Main webhook builder for composing handlers: `withAuthHook`, `withFetchBackendData`, `withConfiguratorFinalize` and `build()`
29
+ - `phx.webhooks.authHandlerBuilder` - Deprecated authentication handler builder (see [Auth Hook](#auth-hook))
30
+ - `phx.webhooks.webhookBuilder` - Main webhook builder for composing handlers: `withFetchBackendData`, `withConfiguratorFinalize`, `withConfigurationInsights`, the deprecated `withAuthHook`, and `build()`. The [Precision demo](https://github.com/salsita/configurator-phoenix/blob/develop/packages/demos/demo-precision/README.md#saved-configuration-insights) shows how to publish expressions with `withConfigurationInsights`.
31
31
  - `phx.webhooks.taskFactory` - Factory for creating finalization tasks
32
32
  - `phx.webhooks.finalizeHandlerBuilder` - Configurator finalization handler builder; pass its `build()` result to `withConfiguratorFinalize`
33
33
  - `phx.webhooks.callbackBuilder` - Builder for callback handlers
@@ -38,24 +38,24 @@ There is no builder for Admin finalization: the SDK builds it itself (see [Admin
38
38
 
39
39
  ### Webhook Entry Point
40
40
 
41
- Your webhook is the default export of `src/webhooks/index.ts`. With the application-spec pipeline (see [Current and legacy project tooling](?path=/docs/phoenix-phoenix-cli--docs#current-and-legacy-project-tooling)), the file is yours to create; sync does not write it. A project without it gets a built-in webhook, so it builds and deploys with no webhook code. Unless `useCognito` is enabled, the built-in webhook has one handler, an anonymous auth handler, which the platform calls only when `spec/application.yaml` sets `useAuthHook`. The legacy pipeline writes the file with that webhook on the first sync.
41
+ Your webhook is the default export of `src/webhooks/index.ts`. With the application-spec pipeline (see [Current and legacy project tooling](?path=/docs/phoenix-phoenix-cli--docs#current-and-legacy-project-tooling)), the file is yours to create; sync does not write it. A project without it gets a built-in webhook, so it builds and deploys with no webhook code. The legacy pipeline writes the file with an anonymous-only webhook on the first sync.
42
42
 
43
- Create `src/webhooks/index.ts` when the project needs its own handlers: finalization, backend data, or an auth handler that does more than start an anonymous session.
43
+ With or without the file, the `access` mode in `spec/application.yaml` builds the auth hook, so the project writes no sign-in code:
44
44
 
45
- If `useAuthHook` or `useClerk` is enabled without this file, sync, build, clean and dev report `AUTH_WITHOUT_PROJECT_WEBHOOK` and generation continues with the anonymous-only built-in webhook. This warning also applies when `useAuthHook: false` is explicit alongside `useClerk: true`. Add a default-exported webhook with the required Clerk or custom auth handlers, or disable the settings if they are unintended.
45
+ - `public`, `invited` and `public-with-sign-in` sign people in with Studio accounts. `invited` refuses visitors; the other two let them in.
46
+ - `legacy-clerk` signs people in with the built-in Clerk handlers and lets visitors in.
47
+ - `custom` has no built-in sign-in: the project's own code, refresh and anonymous handlers decide every role.
46
48
 
47
- The smallest file is the built-in webhook itself:
49
+ Files in `src/handlers/` customise that hook (see [Auth Hook](#auth-hook)): a chunk scopes handler in every mode, a visitor handler in `public` and `public-with-sign-in`, a signed-in handler in `invited` and `public-with-sign-in`, and code, refresh and anonymous handlers in `custom`. With `access: custom` and neither `src/webhooks/index.ts` nor one of those three handler files, sync, build, clean and dev report `AUTH_WITHOUT_PROJECT_WEBHOOK`, because every session would fail.
50
+
51
+ Create `src/webhooks/index.ts` when the project needs its own handlers: finalization, backend data or configuration insights. The smallest file is the built-in webhook itself:
48
52
 
49
53
  ```ts
50
54
  // src/webhooks/index.ts
51
- const authHandler = phx.webhooks.authHandlerBuilder
52
- .withAnonymousHandler(async () => ({ success: true, data: {}, role: 'anonymous' }))
53
- .build()
54
-
55
- export default phx.webhooks.webhookBuilder.withAuthHook(authHandler).build()
55
+ export default phx.webhooks.webhookBuilder.build()
56
56
  ```
57
57
 
58
- The next `phoenix sync` or `phoenix build`, or the rebuild of a running `phoenix dev`, uses the file; deleting it brings the built-in webhook back. A webhook needs at least one handler, and a project with any other file in `src/webhooks/` must have `index.ts`.
58
+ The next `phoenix sync` or `phoenix build`, or the rebuild of a running `phoenix dev`, uses the file; deleting it brings the built-in webhook back. A project with any other file in `src/webhooks/` must have `index.ts`.
59
59
 
60
60
  Only `src/webhooks/index.ts` is imported: other files in `src/webhooks/` run only when it imports them. Sync generates the rest: `.phoenix/webhook.ts` (the bundle's entry, which exports your webhook or the built-in one), `.phoenix/webhook-builders.ts` (the `phx.webhooks` builders) and `.phoenix/webhooks.config.ts` (the reader of [environment variables](#environment-variables)).
61
61
 
@@ -63,11 +63,9 @@ A webhook with more handlers:
63
63
 
64
64
  ```ts
65
65
  // src/webhooks/index.ts
66
- import { authHandler } from './handlers/auth-handler.js'
67
66
  import { configuratorFinalizeHandler } from './handlers/configurator-finalize-handler/configurator-finalize-handler.js'
68
67
 
69
68
  export default phx.webhooks.webhookBuilder
70
- .withAuthHook(authHandler)
71
69
  .withConfiguratorFinalize(configuratorFinalizeHandler)
72
70
  .withFetchBackendData(async ({ frontendData }, { logger }) => {
73
71
  logger.info('Fetching backend data')
@@ -130,7 +128,7 @@ const GOOGLE_SERVICE_ACCOUNT_JSON = phx.webhooksEnv.GOOGLE_SERVICE_ACCOUNT_JSON
130
128
  ```
131
129
 
132
130
  The values are inlined into the webhook bundle when it is built, so a changed value takes effect only after a restart of `phoenix dev`, or a new deploy on a deployed environment.
133
- Deployed builds take the values from the environment variables a workspace super admin sets in Studio (see [SDK Builder Workflow](?path=/docs/phoenix-sdk-builder-workflow--docs)); `phoenix dev` reads them from the project's `.env`.
131
+ Deployed builds take the values from the environment variables a workspace or project Superadmin sets in Studio (see [SDK Builder Workflow](?path=/docs/phoenix-sdk-builder-workflow--docs)); `phoenix dev` reads them from the project's `.env`.
134
132
 
135
133
  ## Configurator Finalization
136
134
 
@@ -1010,58 +1008,64 @@ Before the admin finalization runs, the `AdminConfiguration` data are first vali
1010
1008
 
1011
1009
  ## Auth Hook
1012
1010
 
1013
- Auth hook is triggered when a configurator session is created or refreshed and the deployment enables it. Enable it in a spec file such as `spec/application.yaml` (add `useClerk: true` as well for Clerk sign-in), then run `phoenix sync`:
1011
+ Auth hook is triggered when a configurator session is created or refreshed, in every access mode. The access mode in a spec file such as `spec/application.yaml` builds it, with or without `src/webhooks/index.ts`; run `phoenix sync` after changing it:
1014
1012
 
1015
1013
  ```yaml
1016
- useAuthHook: true
1014
+ access: custom
1017
1015
  ```
1018
1016
 
1019
- Auth hook can define different types of handlers.
1017
+ - `public` (the default), `invited` and `public-with-sign-in` sign people in with Studio accounts (see [Studio-account sign-in](#studio-account-sign-in)). Visitors are let in as anonymous sessions, except in `invited`, which refuses them. The server decides every other role from the person's grant in the project: it refuses a project's own code or refresh sign-in, and a visitor session with a role other than `anonymous`, with 403 "Access is not allowed.". The session data holds the identity fields `id`, `emailAddress`, `fullName`, `tags` and `accessToken` without the spec declaring them.
1018
+ - `legacy-clerk` signs people in with the built-in Clerk handlers (see [Clerk handlers](#clerk-handlers)) and lets visitors in.
1019
+ - `custom` has no built-in sign-in: the project's own code, refresh and anonymous handlers decide every role, admin included.
1020
+
1021
+ `useAuthHook`, `useClerk` and `useCognito` are deprecated and replaced by `access`; a spec that still sets them keeps working and parsing reports `ACCESS_FLAGS_DEPRECATED` with the mode it works as.
1020
1022
 
1021
- - For Clerk:
1022
- - CodeFlow Handler (`withClerkCodeHandler`)
1023
- - Session Handler (`withClerkSessionHandler`), for the inline Clerk sign-in
1024
- - RefreshFlow Handler (`withClerkRefreshHandler`)
1025
- - Custom handlers:
1026
- - CodeFlow Handler (`withCodeHandler`)
1027
- - RefreshFlow Handler (`withRefreshHandler`)
1028
- - AnonymousFlow Handler (`withAnonymousHandler`)
1023
+ The project customises the hook with handler files in `src/handlers/`, each default-exporting one `phx.access` handler. They are bundled into the webhook only, never into the configurator's browser code, so they may import server-only modules. A project has at most one file of each kind (`ACCESS_HANDLER_DUPLICATE`), a file that creates a handler without default-exporting it fails parsing with `ACCESS_HANDLER_NOT_EXPORTED`, a file that default-exports other handlers beside it fails with `ACCESS_HANDLER_NOT_ALONE`, and a kind its mode does not allow fails with `ACCESS_HANDLER_NOT_ALLOWED`.
1024
+
1025
+ | Handler | Modes | Decides |
1026
+ | ------------------------------------- | -------------------------------- | ---------------------------------------------------------------------------- |
1027
+ | `phx.access.createChunkScopesHandler` | every mode | the published-data chunk scopes a session may read; `public` is always added |
1028
+ | `phx.access.createVisitorHandler` | `public`, `public-with-sign-in` | the session data of a visitor; it cannot refuse a visitor or give one a role |
1029
+ | `phx.access.createSignedInHandler` | `invited`, `public-with-sign-in` | the session data of a person signed in with a Studio account, or a refusal |
1030
+ | `phx.access.createCodeHandler` | `custom` | the [CodeFlow](#codeflow-handler) |
1031
+ | `phx.access.createRefreshHandler` | `custom` | the [RefreshFlow](#refreshflow-handler) |
1032
+ | `phx.access.createAnonymousHandler` | `custom` | the [AnonymousFlow](#anonymousflow-handler) |
1029
1033
 
1030
1034
  ```ts
1031
- // src/webhooks/handlers/auth-handler.ts
1032
- export const authHandler = phx.webhooks.authHandlerBuilder
1033
- // To enable default authentication method with Clerk:
1034
- .withClerkCodeHandler()
1035
- .withClerkSessionHandler()
1036
- .withClerkRefreshHandler()
1037
-
1038
- // To implement custom auth handlers.
1039
- // For example to integrate with customer's auth.
1040
- .withCodeHandler(async payload => {
1041
- // ... CodeFlow implementation, see CodeFlow Handler below
1042
- return { success: false }
1043
- })
1044
- .withRefreshHandler(async payload => {
1045
- // .. RefreshFlow implementation, see RefreshFlow Handler below
1046
- return { success: false }
1047
- })
1035
+ // src/handlers/chunk-scopes.ts
1036
+ // Assign chunk scopes for chunked published data access control.
1037
+ // The system chunk scope ("public") is auto-injected — no need to include it.
1038
+ export default phx.access.createChunkScopesHandler(({ role }) => {
1039
+ if (role === 'admin') return ['dealer', 'admin']
1040
+ return []
1041
+ })
1042
+ ```
1048
1043
 
1049
- // Add to allow anonymous access.
1050
- .withAnonymousHandler(async () => {
1051
- return { success: true, data: {}, role: 'anonymous' }
1052
- })
1044
+ ```ts
1045
+ // src/handlers/visitor.ts
1046
+ export default phx.access.createVisitorHandler(async ({ data }) => ({
1047
+ data: {
1048
+ ...data,
1049
+ // custom session data for people who are not signed in - defined via the sessionData schema
1050
+ },
1051
+ }))
1052
+ ```
1053
1053
 
1054
- // Assign chunk scopes for chunked published data access control.
1055
- // The system chunk scope ("public") is auto-injected — no need to include it.
1056
- // See Publishing page for details.
1057
- .withPublishedChunkScopes(({ role }) => {
1058
- if (role === 'admin') return ['dealer', 'admin']
1059
- return []
1060
- })
1061
- .build()
1054
+ ```ts
1055
+ // src/handlers/signed-in.ts
1056
+ // Runs at every Studio-account sign-in and session refresh, so about every three hours per person.
1057
+ export default phx.access.createSignedInHandler(async ({ user, role, data }) => {
1058
+ const account = await findCrmAccount(user.email) // your own lookup
1059
+ if (!account && role === 'user') return { allow: false } // refused: 403 access-refused with the account's email
1060
+ return { data: { priceList: account?.priceList } } // wins over the value set in Studio
1061
+ })
1062
1062
  ```
1063
1063
 
1064
- For full details on `withPublishedChunkScopes()`, scope resolver patterns, and chunked publishing, see **[Publishing - Access Control](?path=/docs/phoenix-publishing--docs#access-control)**.
1064
+ The signed-in handler receives the person (`id`, `email`, and `name`, the name on their Studio account or `null`), their role and the session data with the values set in Studio. A returned property wins over the value set in Studio and is checked against `sessionData`: one that does not fit is left out with a warning in the logs. It fills properties marked `setInStudio: false`. `{ allow: false }` refuses the person whatever their role, so a refused admin is kept out of Project Admin too, until a deploy changes the handler. The server answers a refusal with `403` and `code: 'access-refused'` with the account's email address and name. A throw, an answer that is neither, or no answer within ten seconds fails the sign-in with `503` and `code: 'sign-in-unavailable'`, a try-again answer, and never lets the person in. It cannot change the identity fields or the role: a changed identity field makes the server refuse the sign-in.
1065
+
1066
+ For scope resolver patterns and chunked publishing, see **[Publishing - Access Control](?path=/docs/phoenix-publishing--docs#access-control)**.
1067
+
1068
+ `phx.webhooks.authHandlerBuilder` and `withAuthHook` are deprecated. A project that declares `public`, `invited` or `public-with-sign-in` and assembles an auth hook with them fails parsing with `AUTH_HOOK_NOT_ALLOWED`; any other project keeps its hook, which replaces the one the mode builds, and parsing reports `AUTH_HOOK_DEPRECATED`. A builder's own handlers win over the handler files: `withPublishedChunkScopes` over a chunk scopes handler, `withAnonymousHandler` over a visitor or anonymous handler. A hook written as a plain function, without `phx.webhooks.authHandlerBuilder`, answers on its own and applies no handler file. To migrate, remove `withAuthHook` and move `withPublishedChunkScopes` to a chunk scopes handler, and in `custom` move `withCodeHandler`, `withRefreshHandler` and `withAnonymousHandler` to the matching handler files: they take the same payloads and return the same answer, without the second `{ logger }` argument.
1065
1069
 
1066
1070
  A handler answers `{ success: false }` to refuse the session, or `{ success: true, data, role, refreshToken?, expirationTime?, scopes?, userId? }` to grant it. `role` is `anonymous`, `user`, `admin` or `superadmin`. `expirationTime` is an absolute Unix timestamp in seconds, not a duration, and defaults to 3 hours from now; keep the default, which session tracking assumes, unless the client needs other session lengths. `data` is validated against the spec's `sessionData` schema, which may not declare required properties: Admin and preset sessions carry no custom session data.
1067
1071
 
@@ -1120,7 +1124,7 @@ If you need to make tags available to your application in Studio, configure them
1120
1124
 
1121
1125
  #### Phoenix Session Data
1122
1126
 
1123
- Configure your Session Data. With `useClerk` enabled, the schema must declare the complete payload the Clerk handlers return — application-spec parsing rejects the spec with a `CLERK_SESSION_DATA_INCOMPATIBLE` diagnostic otherwise:
1127
+ Configure your Session Data. With `access: legacy-clerk`, the schema must declare the complete payload the Clerk handlers return — application-spec parsing rejects the spec with a `CLERK_SESSION_DATA_INCOMPATIBLE` diagnostic otherwise:
1124
1128
 
1125
1129
  ```yaml
1126
1130
  sessionData:
@@ -1155,7 +1159,8 @@ the code, retrieves the passed credentials from temporary storage and calls the
1155
1159
  The code handler receives `{ type: 'code', accessToken, refreshToken?, idToken? }`.
1156
1160
 
1157
1161
  ```ts
1158
- export const authHandler = phx.webhooks.authHandlerBuilder.withCodeHandler(async (payload, { logger }) => {
1162
+ // src/handlers/code.ts
1163
+ export default phx.access.createCodeHandler(async payload => {
1159
1164
  // refresh token may or may not be present based on what the 3rd party service sends
1160
1165
  const { accessToken, refreshToken } = payload
1161
1166
 
@@ -1165,7 +1170,7 @@ export const authHandler = phx.webhooks.authHandlerBuilder.withCodeHandler(async
1165
1170
  })
1166
1171
 
1167
1172
  if (!response.ok) {
1168
- logger.warn(`The CRM refused the access token with status ${response.status}.`)
1173
+ console.warn(`The CRM refused the access token with status ${response.status}.`)
1169
1174
  // refuse the session
1170
1175
  return { success: false }
1171
1176
  }
@@ -1197,7 +1202,8 @@ export const authHandler = phx.webhooks.authHandlerBuilder.withCodeHandler(async
1197
1202
  RefreshFlow is triggered when the session is authenticated via `refreshToken`. The handler is responsible for refreshing the session data and returning the new session data. It receives `{ type: 'refresh', refreshToken }`.
1198
1203
 
1199
1204
  ```ts
1200
- export const authHandler = phx.webhooks.authHandlerBuilder.withRefreshHandler(async payload => {
1205
+ // src/handlers/refresh.ts
1206
+ export default phx.access.createRefreshHandler(async payload => {
1201
1207
  // refresh token passed from code handler / client
1202
1208
  const { refreshToken } = payload
1203
1209
 
@@ -1234,26 +1240,26 @@ export const authHandler = phx.webhooks.authHandlerBuilder.withRefreshHandler(as
1234
1240
 
1235
1241
  ### AnonymousFlow Handler
1236
1242
 
1237
- AnonymousFlow is triggered when the session is being authenticated without any credentials or refreshToken.
1243
+ AnonymousFlow is triggered when the session is being authenticated without any credentials or refreshToken. In `custom` the anonymous handler decides about visitors; in the other modes the mode does (see [Auth Hook](#auth-hook)).
1238
1244
 
1239
1245
  ```ts
1240
- export const authHandler = phx.webhooks.authHandlerBuilder
1241
- // No payload is passed to the anonymous handler
1242
- .withAnonymousHandler(async () => {
1243
- // Do whatever you need to here, but it is probably not a good idea
1246
+ // src/handlers/anonymous.ts
1247
+ // The payload carries no credentials
1248
+ export default phx.access.createAnonymousHandler(async () => {
1249
+ // Do whatever you need to here, but it is probably not a good idea
1244
1250
 
1245
- return {
1246
- // return true/false based on the authentication result, if the handler throws, the webhook will return 500 and an error will be reported to the alerting system
1247
- success: true,
1248
- data: {
1249
- // custom session data that will be stored in the session - defined via the sessionData schema
1250
- },
1251
- // role of the session, can be 'superadmin', 'admin', 'user' or 'anonymous'
1252
- role: 'anonymous',
1253
- // optional: absolute Unix timestamp in seconds, not a duration; defaults to 3 hours from now
1254
- expirationTime: Math.floor(Date.now() / 1000) + 3 * 60 * 60,
1255
- }
1256
- })
1251
+ return {
1252
+ // return true/false based on the authentication result, if the handler throws, the webhook will return 500 and an error will be reported to the alerting system
1253
+ success: true,
1254
+ data: {
1255
+ // custom session data that will be stored in the session - defined via the sessionData schema
1256
+ },
1257
+ // role of the session, can be 'superadmin', 'admin', 'user' or 'anonymous'
1258
+ role: 'anonymous',
1259
+ // optional: absolute Unix timestamp in seconds, not a duration; defaults to 3 hours from now
1260
+ expirationTime: Math.floor(Date.now() / 1000) + 3 * 60 * 60,
1261
+ }
1262
+ })
1257
1263
  ```
1258
1264
 
1259
1265
  ## Advanced Features
@@ -1524,7 +1530,6 @@ Backend data handlers are defined inline in the webhook builder. The handler ret
1524
1530
  ```ts
1525
1531
  // src/webhooks/index.ts
1526
1532
  export default phx.webhooks.webhookBuilder
1527
- .withAuthHook(authHandler)
1528
1533
  .withConfiguratorFinalize(configuratorFinalizeHandler)
1529
1534
  .withFetchBackendData(async ({ sessionPayload }, { logger }) => {
1530
1535
  logger.info('Fetching backend data')
@@ -1684,54 +1689,26 @@ Now that you understand Phoenix's webhook system, explore these related topics:
1684
1689
 
1685
1690
  For hands-on practice, explore webhook examples in the **[demo projects](?path=/docs/phoenix-quickstart--docs)** and finalization workflows.
1686
1691
 
1687
- ## Cognito configurator sign-in
1692
+ ## Studio-account sign-in
1688
1693
 
1689
- Use shared Phoenix accounts when invited dealers should open a configurator and project administrators should edit its catalog. This path requires a Cognito SDK Builder workspace and the current application-spec pipeline. Standard customers and staff retain Clerk; existing `useClerk` and custom handlers keep their defaults.
1694
+ Use Salsita Studio accounts when invited dealers should open a configurator and project administrators should edit its catalog. This path requires a workspace with Studio accounts and the current application-spec pipeline. Workspaces Salsita set up with Clerk keep it as the legacy `legacy-clerk` mode; existing `legacy-clerk` and `custom` projects keep their handlers.
1690
1695
 
1691
1696
  Add this to `spec/application.yaml`, then run `phoenix sync` and deploy to your workspace:
1692
1697
 
1693
1698
  ```yaml
1694
- useCognito: true
1695
- sessionData:
1696
- type: object
1697
- properties:
1698
- id:
1699
- type: string
1700
- emailAddress:
1701
- type: string
1702
- fullName:
1703
- type:
1704
- - string
1705
- - 'null'
1706
- accessToken:
1707
- type: string
1708
- tags:
1709
- type: array
1710
- items:
1711
- type: string
1712
- required: []
1713
- additionalProperties: false
1699
+ access: invited # or public-with-sign-in, to let visitors in too
1714
1700
  ```
1715
1701
 
1716
- `useCognito` enables the auth hook, generated redirect sign-in pages, and the built-in Cognito handler. It cannot be combined with `useClerk: true` or `useAuthHook: false`. An incompatible session schema reports `COGNITO_SESSION_DATA_INCOMPATIBLE`. No custom webhook is needed for an invitation-only project: the built-in webhook refuses anonymous sessions.
1717
-
1718
- If the project already has a webhook, register its auth hook as usual. The generated auth builder accepts Cognito identities automatically; `withCognitoHandlers()` also enables the handler when assembling a builder manually. Anonymous, custom code and custom refresh handlers compose with it:
1702
+ `access: invited` and `access: public-with-sign-in` enable generated redirect sign-in pages and build the Studio-account sign-in into the webhook, with or without `src/webhooks/index.ts`; they replace the deprecated `useCognito: true`, which maps to `invited` without `src/webhooks/index.ts` and to `public-with-sign-in` with it. In `public`, the default, only the admin signs in with a Studio account, on `AdminSignInPage`, as in the other two; the configurator's own sign-in page, its access-denied pages and the account control of `public-with-sign-in` come from `@salsita-ai/sdk/extras/cognito`; see [Sessions and Access](?path=/docs/phoenix-sessions-and-access--docs). In a workspace without Studio accounts the deploy goes through with a warning, and Studio-account sign-in does not work there. The project writes no auth code: `invited` refuses anonymous sessions, and the other two let visitors in, with the session data of a visitor handler if the project has one (see [Auth Hook](#auth-hook)). Assembling an auth hook with `phx.webhooks.authHandlerBuilder` or `withAuthHook` in these modes fails parsing with `AUTH_HOOK_NOT_ALLOWED`.
1719
1703
 
1720
- ```typescript
1721
- const authHandler = phx.webhooks.authHandlerBuilder
1722
- .withCognitoHandlers()
1723
- .withAnonymousHandler(async () => ({ success: true, data: {}, role: 'anonymous' }))
1724
- .build()
1725
-
1726
- export default phx.webhooks.webhookBuilder.withAuthHook(authHandler).build()
1727
- ```
1704
+ The session data holds the identity fields `id`, `emailAddress`, `fullName`, `tags` and `accessToken` without the spec declaring them. A spec that declares one with another type reports `COGNITO_SESSION_DATA_INCOMPATIBLE`.
1728
1705
 
1729
- The server redirects through the shared pool's login and `/auth/callback`, then returns a one-use code to the exact allowed frontend origin, preserving its path and query. A signed-in Studio account may still need to authenticate. A missing project grant opens **Access denied**, with an explicit retry instead of a redirect loop. Project User grants open the configurator; Admin and Superadmin grants also open its admin. Workspace Superadmins inherit every project. Workspace User/Admin membership alone grants no project access and does not grant Builder management access.
1706
+ The server redirects through the shared Studio sign-in page, then returns a one-use code to the exact allowed frontend origin, preserving its path and query. A signed-in Studio account may still need to authenticate. A missing project grant opens **Access denied**, with an explicit retry instead of a redirect loop. Project User grants open the configurator; Admin and Superadmin grants also open its admin. Workspace Superadmins inherit every project. Workspace User/Admin membership alone grants no project access and does not grant Builder management access.
1730
1707
 
1731
- `id` is the stable Phoenix account UUID; the session subject is `phoenix-<id>`. `emailAddress` comes from verified native email, `tags` from the current workspace membership, and `fullName` is currently null. `accessToken` is an empty compatibility field: Cognito credentials never reach project code. Custom fields may be added to the schema, but the server protects identity, role and tags from changes by a webhook.
1708
+ `id` is the stable Phoenix account UUID; the session subject is `phoenix-<id>`. `emailAddress` comes from verified native email, `tags` from the current workspace membership, and `fullName` is the display name on the person's Studio account, or null when none is set. `accessToken` is an empty compatibility field: Cognito credentials never reach project code. Custom fields may be added to the schema, but the server protects identity, role and tags from changes by a webhook.
1732
1709
 
1733
- Sessions last at most five minutes and refresh through an opaque credential bounded to fifteen minutes from sign-in. Refresh does not renew that authentication deadline; sign in again afterwards. The server checks current account status, membership, project role and tags on each protected API request and refresh. Revocation takes effect on the next API request; changed tags or role require a refresh. This does not retract data already downloaded by the browser. Local sign-out clears the configurator session; the shared provider cookie can still make a later explicit sign-in silent.
1710
+ A sign-in lasts 30 days from sign-in, and its sessions last three hours, never past the sign-in's end. Refresh does not extend the sign-in. A sign-in ends when the project is deployed again (a new build, promotion or rollback); a person whose Studio session is still valid comes back without Studio's form, and so does a person already signed in to Salsita Studio in the browser. The server checks current account status, membership, project role and tags on each protected API request and refresh. Revocation takes effect on the next API request, which the server refuses with `403` and `accessChanged: true`, as it does for changed tags, role or session field values: the configurator refreshes its session once by itself, gets the new values, or, for a sign-in that ended, continues as a visitor where visitors may use it. This does not retract data already downloaded by the browser. Signing out of the configurator ends its sign-in on the server at once, without signing the person out of Studio; the next sign-in asks which account continues.
1734
1711
 
1735
1712
  Only the existing public `SERVER_URL` and `DEPLOYMENT_ID` are needed in generated projects. The server owns the pool/client configuration, login callback and credentials. There is no customer OAuth secret or per-customer Cognito client. The server sends resolved identities only over the existing IAM-authenticated Lambda transport or authenticated development tunnel; never expose a production webhook as an unauthenticated HTTP endpoint.
1736
1713
 
1737
- The Fold `demo-modular-layout` demonstrates Cognito admin sign-in alongside a public anonymous configurator. Its README describes workspace setup and the manual regression flow. Browser-local persistence cannot exercise real Cognito sign-in. Social sign-in/linking, MFA, public signup, custom branding and Standard-customer migration are separate work.
1714
+ The Fold `demo-modular-layout` demonstrates Cognito admin sign-in alongside a public anonymous configurator. Its README describes workspace setup and the manual regression flow. Browser-local persistence cannot exercise real Cognito sign-in. Public signup, custom branding and moving a Clerk workspace to Studio accounts are separate work.
@@ -9,7 +9,7 @@ Modes remove controls that do not apply to the user's current task. Treat each m
9
9
  | Footer | Only when edits affect price | Price only, when relevant | Finalization actions | Hidden |
10
10
  | Selection and scene FABs | Selection remains available | Disabled | Disabled | Disabled |
11
11
  | Tool controls | Hidden | Hidden | Hidden | Hidden |
12
- | View controls | Hidden | When relevant | When relevant | Desktop only |
12
+ | View controls | Hidden | When relevant | When relevant | Desktop; nested on mobile |
13
13
  | Undo and redo | Project-dependent | Hidden | Hidden | Hidden |
14
14
  | Exit | Explicit focus exit | Not applicable | Navigation-owned | Explicit full-screen exit |
15
15
 
@@ -35,6 +35,6 @@ Use [Choosing Navigation](?path=/docs/ux-guidelines-choosing-navigation--docs#su
35
35
  - The recommended full-screen toolbar contains exit, change measure, language, and reset camera when those actions apply. Do not include undo/redo or sharing.
36
36
  - Treat full-screen preview as view-only: filter project-defined preset navigation and footer content, selectable geometry, and scene FABs out of full-screen mode, including when the user enters with an active selection.
37
37
 
38
- On desktop, Phoenix hides its built-in header, sidebar, and tool controls in full-screen mode while keeping view controls available. On mobile, it also hides view controls. Both layouts keep the 3D model, camera interaction, and a reduced toolbar.
38
+ On desktop, Phoenix hides its built-in header, sidebar, and tool controls in full-screen mode while keeping view controls available. On mobile, fullscreen hides flat view controls and keeps nested view menus available. Both layouts keep the 3D model, camera interaction, and a reduced toolbar.
39
39
 
40
40
  “Full-screen preview” here means the in-configurator viewing mode, not the host integration's full-screen widget placement.
@@ -0,0 +1,19 @@
1
+ import type { AnonymousHandler } from './anonymous-handler.js';
2
+ import type { ChunkScopesResolver } from './chunk-scopes-handler.js';
3
+ import type { CodeHandler } from './code-handler.js';
4
+ import type { RefreshHandler } from './refresh-handler.js';
5
+ import type { SignedInHandler } from './signed-in-handler.js';
6
+ import type { VisitorHandler } from './visitor-handler.js';
7
+ /**
8
+ * The access handlers a project's `src/handlers/` files register, one per kind, as the webhook reads them. Parsing
9
+ * has already refused a kind the project's access mode does not allow, so the auth handler builder applies each one
10
+ * it finds.
11
+ */
12
+ export interface AccessHandlers<SESSION_DATA extends Record<string, unknown>> {
13
+ readonly chunkScopes: ChunkScopesResolver<SESSION_DATA> | undefined;
14
+ readonly visitor: VisitorHandler<SESSION_DATA> | undefined;
15
+ readonly signedIn: SignedInHandler<SESSION_DATA> | undefined;
16
+ readonly code: CodeHandler<SESSION_DATA> | undefined;
17
+ readonly refresh: RefreshHandler<SESSION_DATA> | undefined;
18
+ readonly anonymous: AnonymousHandler<SESSION_DATA> | undefined;
19
+ }
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,16 @@
1
+ import type { AnonymousPayload, AuthHandlerResponse } from '@salsita-ai/contracts/webhook';
2
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
3
+ /** Answers the anonymous flow of a `custom` project's own sign-in: a person who arrives with no code or refresh token. */
4
+ export type AnonymousHandler<SESSION_DATA extends Record<string, unknown>> = (payload: AnonymousPayload) => Promise<AuthHandlerResponse<SESSION_DATA>>;
5
+ /** The registration a `src/handlers/` file default-exports to answer the anonymous flow in `custom`. */
6
+ export type AnonymousHandlerRegistration<SESSION_DATA extends Record<string, unknown>> = SystemPhoenixAsyncHandlerRegistration<AnonymousPayload, AuthHandlerResponse<SESSION_DATA>>;
7
+ /** `phx.access.createAnonymousHandler`, typed with the project's session data. */
8
+ export type TypedCreateAnonymousHandler<SESSION_DATA extends Record<string, unknown>> = (handler: AnonymousHandler<SESSION_DATA>) => AnonymousHandlerRegistration<SESSION_DATA>;
9
+ /**
10
+ * Creates the handler that answers the anonymous flow of a `custom` project, replacing `withAnonymousHandler` of the
11
+ * deprecated auth handler builder. Its answer decides the session's role, admin included.
12
+ * Usage: `export default phx.access.createAnonymousHandler(async payload => ({ success: false }))` in `src/handlers/`.
13
+ * Note: parsing detects this call to bundle the file into the webhook.
14
+ */
15
+ export declare const createAnonymousHandler: <SESSION_DATA extends Record<string, unknown>>(handler: AnonymousHandler<SESSION_DATA>) => AnonymousHandlerRegistration<SESSION_DATA>;
16
+ export declare const isAnonymousHandler: <SESSION_DATA extends Record<string, unknown>>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is AnonymousHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessAnonymousHandler";export const createAnonymousHandler=n=>({type:"system-async",name:e,handler:()=>({handler:n})});export const isAnonymousHandler=n=>"system-async"===n.type&&n.name===e;
@@ -0,0 +1,27 @@
1
+ import type { SessionRole } from '@salsita-ai/contracts/api';
2
+ import type { HandlerRegistration, SystemPhoenixHandlerRegistration } from '../../spec/index.js';
3
+ /**
4
+ * What a chunk scopes handler decides from: the role the session was granted and its final session data, after
5
+ * every other handler of the sign-in ran.
6
+ */
7
+ export interface ChunkScopesHandlerProps<SESSION_DATA> {
8
+ readonly role: SessionRole;
9
+ readonly data: SESSION_DATA;
10
+ }
11
+ /**
12
+ * Decides which published-data chunk scopes a session may read. Each scope names the chunks a session with it
13
+ * reads; `public` is always added, whatever the handler returns.
14
+ */
15
+ export type ChunkScopesResolver<SESSION_DATA> = (props: ChunkScopesHandlerProps<SESSION_DATA>) => readonly string[];
16
+ /** The registration a `src/handlers/` file default-exports to decide a session's chunk scopes, in every access mode. */
17
+ export type ChunkScopesHandlerRegistration<SESSION_DATA> = SystemPhoenixHandlerRegistration<ChunkScopesHandlerProps<SESSION_DATA>, readonly string[]>;
18
+ /** `phx.access.createChunkScopesHandler`, typed with the project's session data. */
19
+ export type TypedCreateChunkScopesHandler<SESSION_DATA> = (resolver: ChunkScopesResolver<SESSION_DATA>) => ChunkScopesHandlerRegistration<SESSION_DATA>;
20
+ /**
21
+ * Creates the handler that decides which published-data chunk scopes a session may read, replacing
22
+ * `withPublishedChunkScopes` of the deprecated auth handler builder.
23
+ * Usage: `export default phx.access.createChunkScopesHandler(({ role, data }) => [...])` in `src/handlers/`.
24
+ * Note: parsing detects this call to bundle the file into the webhook.
25
+ */
26
+ export declare const createChunkScopesHandler: <SESSION_DATA>(resolver: ChunkScopesResolver<SESSION_DATA>) => ChunkScopesHandlerRegistration<SESSION_DATA>;
27
+ export declare const isChunkScopesHandler: <SESSION_DATA>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is ChunkScopesHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessChunkScopesHandler";export const createChunkScopesHandler=n=>({type:"system",name:e,handler:()=>({handler:n})});export const isChunkScopesHandler=n=>"system"===n.type&&n.name===e;
@@ -0,0 +1,16 @@
1
+ import type { AuthHandlerResponse, CodePayload } from '@salsita-ai/contracts/webhook';
2
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
3
+ /** Answers the code flow of a `custom` project's own sign-in: the tokens a host application deposited for a one-time code. */
4
+ export type CodeHandler<SESSION_DATA extends Record<string, unknown>> = (payload: CodePayload) => Promise<AuthHandlerResponse<SESSION_DATA>>;
5
+ /** The registration a `src/handlers/` file default-exports to answer the code flow in `custom`. */
6
+ export type CodeHandlerRegistration<SESSION_DATA extends Record<string, unknown>> = SystemPhoenixAsyncHandlerRegistration<CodePayload, AuthHandlerResponse<SESSION_DATA>>;
7
+ /** `phx.access.createCodeHandler`, typed with the project's session data. */
8
+ export type TypedCreateCodeHandler<SESSION_DATA extends Record<string, unknown>> = (handler: CodeHandler<SESSION_DATA>) => CodeHandlerRegistration<SESSION_DATA>;
9
+ /**
10
+ * Creates the handler that answers the code flow of a `custom` project, replacing `withCodeHandler` of the
11
+ * deprecated auth handler builder. Its answer decides the session's role, admin included.
12
+ * Usage: `export default phx.access.createCodeHandler(async payload => ({ success: false }))` in `src/handlers/`.
13
+ * Note: parsing detects this call to bundle the file into the webhook.
14
+ */
15
+ export declare const createCodeHandler: <SESSION_DATA extends Record<string, unknown>>(handler: CodeHandler<SESSION_DATA>) => CodeHandlerRegistration<SESSION_DATA>;
16
+ export declare const isCodeHandler: <SESSION_DATA extends Record<string, unknown>>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is CodeHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessCodeHandler";export const createCodeHandler=s=>({type:"system-async",name:e,handler:()=>({handler:s})});export const isCodeHandler=s=>"system-async"===s.type&&s.name===e;
@@ -0,0 +1,7 @@
1
+ export { type AccessHandlers } from './access-handlers.js';
2
+ export { type AnonymousHandler, type AnonymousHandlerRegistration, type TypedCreateAnonymousHandler, createAnonymousHandler, isAnonymousHandler, } from './anonymous-handler.js';
3
+ export { type ChunkScopesHandlerProps, type ChunkScopesHandlerRegistration, type ChunkScopesResolver, type TypedCreateChunkScopesHandler, createChunkScopesHandler, isChunkScopesHandler, } from './chunk-scopes-handler.js';
4
+ export { type CodeHandler, type CodeHandlerRegistration, type TypedCreateCodeHandler, createCodeHandler, isCodeHandler, } from './code-handler.js';
5
+ export { type RefreshHandler, type RefreshHandlerRegistration, type TypedCreateRefreshHandler, createRefreshHandler, isRefreshHandler, } from './refresh-handler.js';
6
+ export { type SignedInHandler, type SignedInHandlerProps, type SignedInHandlerRegistration, type SignedInHandlerResult, type SignedInUser, type TypedCreateSignedInHandler, createSignedInHandler, isSignedInHandler, } from './signed-in-handler.js';
7
+ export { type TypedCreateVisitorHandler, type VisitorHandler, type VisitorHandlerProps, type VisitorHandlerRegistration, type VisitorHandlerResult, createVisitorHandler, isVisitorHandler, } from './visitor-handler.js';
@@ -0,0 +1 @@
1
+ export{createAnonymousHandler,isAnonymousHandler}from"./anonymous-handler.js";export{createChunkScopesHandler,isChunkScopesHandler}from"./chunk-scopes-handler.js";export{createCodeHandler,isCodeHandler}from"./code-handler.js";export{createRefreshHandler,isRefreshHandler}from"./refresh-handler.js";export{createSignedInHandler,isSignedInHandler}from"./signed-in-handler.js";export{createVisitorHandler,isVisitorHandler}from"./visitor-handler.js";
@@ -0,0 +1,16 @@
1
+ import type { AuthHandlerResponse, RefreshPayload } from '@salsita-ai/contracts/webhook';
2
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
3
+ /** Answers the refresh flow of a `custom` project's own sign-in: a refresh token an earlier answer returned. */
4
+ export type RefreshHandler<SESSION_DATA extends Record<string, unknown>> = (payload: RefreshPayload) => Promise<AuthHandlerResponse<SESSION_DATA>>;
5
+ /** The registration a `src/handlers/` file default-exports to answer the refresh flow in `custom`. */
6
+ export type RefreshHandlerRegistration<SESSION_DATA extends Record<string, unknown>> = SystemPhoenixAsyncHandlerRegistration<RefreshPayload, AuthHandlerResponse<SESSION_DATA>>;
7
+ /** `phx.access.createRefreshHandler`, typed with the project's session data. */
8
+ export type TypedCreateRefreshHandler<SESSION_DATA extends Record<string, unknown>> = (handler: RefreshHandler<SESSION_DATA>) => RefreshHandlerRegistration<SESSION_DATA>;
9
+ /**
10
+ * Creates the handler that answers the refresh flow of a `custom` project, replacing `withRefreshHandler` of the
11
+ * deprecated auth handler builder. Its answer decides the session's role, admin included.
12
+ * Usage: `export default phx.access.createRefreshHandler(async payload => ({ success: false }))` in `src/handlers/`.
13
+ * Note: parsing detects this call to bundle the file into the webhook.
14
+ */
15
+ export declare const createRefreshHandler: <SESSION_DATA extends Record<string, unknown>>(handler: RefreshHandler<SESSION_DATA>) => RefreshHandlerRegistration<SESSION_DATA>;
16
+ export declare const isRefreshHandler: <SESSION_DATA extends Record<string, unknown>>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is RefreshHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessRefreshHandler";export const createRefreshHandler=s=>({type:"system-async",name:e,handler:()=>({handler:s})});export const isRefreshHandler=s=>"system-async"===s.type&&s.name===e;
@@ -0,0 +1,44 @@
1
+ import type { PhoenixAuthPayload } from '@salsita-ai/contracts/webhook';
2
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
3
+ /** The person a Studio account signed in, as their Studio account names them. */
4
+ export interface SignedInUser {
5
+ readonly id: string;
6
+ readonly email: string;
7
+ /** The name on their Studio account, or `null` when they have set none. */
8
+ readonly name: string | null;
9
+ }
10
+ /** What a signed-in handler starts from: the person, their role and the session data built so far. */
11
+ export interface SignedInHandlerProps<SESSION_DATA> {
12
+ readonly user: SignedInUser;
13
+ /** The person's role in the project: `user`, `admin` or `superadmin`. The handler cannot change it. */
14
+ readonly role: PhoenixAuthPayload['role'];
15
+ /** The identity fields, the values set in Studio that fit the build, and the defaults of the others. */
16
+ readonly data: SESSION_DATA;
17
+ }
18
+ /**
19
+ * What a signed-in handler answers: session data to merge over what it received, or a refusal. Each returned property
20
+ * wins over the value set in Studio; one that does not fit its schema is left out with a warning in the logs.
21
+ */
22
+ export type SignedInHandlerResult<SESSION_DATA> = {
23
+ readonly data: Partial<SESSION_DATA>;
24
+ } | {
25
+ readonly allow: false;
26
+ };
27
+ /** Adds session data for, or refuses, a person who signs in with a Studio account. */
28
+ export type SignedInHandler<SESSION_DATA> = (props: SignedInHandlerProps<SESSION_DATA>) => Promise<SignedInHandlerResult<SESSION_DATA>>;
29
+ /** The registration a `src/handlers/` file default-exports to customise the Studio-account sign-in. */
30
+ export type SignedInHandlerRegistration<SESSION_DATA> = SystemPhoenixAsyncHandlerRegistration<SignedInHandlerProps<SESSION_DATA>, SignedInHandlerResult<SESSION_DATA>>;
31
+ /** `phx.access.createSignedInHandler`, typed with the project's session data. */
32
+ export type TypedCreateSignedInHandler<SESSION_DATA> = (handler: SignedInHandler<SESSION_DATA>) => SignedInHandlerRegistration<SESSION_DATA>;
33
+ /**
34
+ * Creates the handler that runs whenever a person signs in with a Studio account, and at each session refresh, in
35
+ * `invited` and `public-with-sign-in`. It may add session data, for example from a CRM, override a value set in
36
+ * Studio, or refuse the person with `{ allow: false }`, also an admin, who is then kept out of the admin panel too.
37
+ * It cannot change who the person is or their role. A throw, an answer that is neither, or no answer within ten
38
+ * seconds fails the sign-in with a try-again answer.
39
+ * Usage: `export default phx.access.createSignedInHandler(async ({ user, role, data }) => ({ data: {} }))` in
40
+ * `src/handlers/`.
41
+ * Note: parsing detects this call to bundle the file into the webhook.
42
+ */
43
+ export declare const createSignedInHandler: <SESSION_DATA>(handler: SignedInHandler<SESSION_DATA>) => SignedInHandlerRegistration<SESSION_DATA>;
44
+ export declare const isSignedInHandler: <SESSION_DATA>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is SignedInHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessSignedInHandler";export const createSignedInHandler=n=>({type:"system-async",name:e,handler:()=>({handler:n})});export const isSignedInHandler=n=>"system-async"===n.type&&n.name===e;
@@ -0,0 +1,23 @@
1
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
2
+ /** What a visitor handler starts from: the session data of a person who is not signed in, before it adds any. */
3
+ export interface VisitorHandlerProps<SESSION_DATA> {
4
+ readonly data: SESSION_DATA;
5
+ }
6
+ /** What a visitor handler answers: the visitor's session data. A visitor is always let in, as an anonymous session. */
7
+ export interface VisitorHandlerResult<SESSION_DATA> {
8
+ readonly data: SESSION_DATA;
9
+ }
10
+ /** Adds session data for a person who opens the configurator without signing in. */
11
+ export type VisitorHandler<SESSION_DATA> = (props: VisitorHandlerProps<SESSION_DATA>) => Promise<VisitorHandlerResult<SESSION_DATA>>;
12
+ /** The registration a `src/handlers/` file default-exports to customise the visitors of Public and Public with sign-in. */
13
+ export type VisitorHandlerRegistration<SESSION_DATA> = SystemPhoenixAsyncHandlerRegistration<VisitorHandlerProps<SESSION_DATA>, VisitorHandlerResult<SESSION_DATA>>;
14
+ /** `phx.access.createVisitorHandler`, typed with the project's session data. */
15
+ export type TypedCreateVisitorHandler<SESSION_DATA> = (handler: VisitorHandler<SESSION_DATA>) => VisitorHandlerRegistration<SESSION_DATA>;
16
+ /**
17
+ * Creates the handler that adds session data for visitors, the people who open the configurator without signing in,
18
+ * in `public` and `public-with-sign-in`. It cannot refuse a visitor or give one a role.
19
+ * Usage: `export default phx.access.createVisitorHandler(async ({ data }) => ({ data: { ...data } }))` in `src/handlers/`.
20
+ * Note: parsing detects this call to bundle the file into the webhook.
21
+ */
22
+ export declare const createVisitorHandler: <SESSION_DATA>(handler: VisitorHandler<SESSION_DATA>) => VisitorHandlerRegistration<SESSION_DATA>;
23
+ export declare const isVisitorHandler: <SESSION_DATA>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is VisitorHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessVisitorHandler";export const createVisitorHandler=s=>({type:"system-async",name:e,handler:()=>({handler:s})});export const isVisitorHandler=s=>"system-async"===s.type&&s.name===e;