@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
@@ -0,0 +1,298 @@
1
+ # The Panel
2
+
3
+ The panel is the chat the user sees. It works without any setup: a spec with an `assistant` section gets a button in the toolbar, and the button opens the panel. This chapter covers what you can shape in it: where it shows, how it greets, how the assistant asks its questions, how pictures and voice come in, and how it looks.
4
+
5
+ - [Where the panel shows](#where-the-panel-shows)
6
+ - [Greeting and starters](#greeting-and-starters)
7
+ - [Questions the user answers with a click](#questions-the-user-answers-with-a-click)
8
+ - [Pictures: photos, annotations and drawings](#pictures-photos-annotations-and-drawings)
9
+ - [Voice](#voice)
10
+ - [The look of the panel](#the-look-of-the-panel)
11
+ - [Leaving parts of the panel out](#leaving-parts-of-the-panel-out)
12
+
13
+ ## Where the panel shows
14
+
15
+ In the built-in layout the panel opens in the sidebar, on a desktop and on a phone. It covers the sidebar's tabs and property pages and leaves the sidebar's footer usable below it. The user closes it to get back to the controls.
16
+
17
+ A layout of your own gets the panel in one of two ways:
18
+
19
+ - **Place the built-in sidebar.** `LayoutSlots.DesktopSidebar` carries the panel with it. See [Layout Slots](?path=/docs/phoenix-layout-slots--docs).
20
+ - **Build the chat yourself.** A layout without that slot has no panel. Its own thread and message box read the same conversation through `useAssistantThread` and `useAssistantComposer`, and `useAssistantPanel` tells whether an assistant is there at all. See [Configurator Interface](?path=/docs/phoenix-configurator-interface--docs).
21
+
22
+ #### Configure
23
+
24
+ The default toolbar already has the assistant button. A project that declares its own toolbar adds it:
25
+
26
+ ```yaml
27
+ components:
28
+ KitchenRange:
29
+ toolbar:
30
+ default:
31
+ desktop:
32
+ - kind: toolbarButtonGroup
33
+ children:
34
+ - kind: assistantToolbarButton
35
+ props: { showTitle: true }
36
+ ```
37
+
38
+ - **`assistantToolbarButton`** opens and closes the panel. It marks a reply that arrived while the panel was closed.
39
+ - **`showTitle`** shows the button's label next to its icon. It is `true` by default, and the label shows on a desktop-sized layout only.
40
+
41
+ A layout of your own that shows the toolbar but has no panel declares a toolbar without this button. See [Toolbar](?path=/docs/layouts-toolbar--docs).
42
+
43
+ <details>
44
+ <summary>What the agent sees</summary>
45
+
46
+ Nothing. The agent is not told where the panel sits or what it covers. If that matters for how it should guide the user, say it in the `instructions`. A typical sentence: the chat covers the sidebar controls, and closing the chat brings them back.
47
+
48
+ </details>
49
+
50
+ ## Greeting and starters
51
+
52
+ An empty conversation opens with a greeting. The built-in one is generic. Write your own to say, in one or two sentences, what the assistant can do in this configurator.
53
+
54
+ Starters are chips under the greeting. Each one sends a ready-made first message. They show a new user what kind of request works, which a blank message box does not. Pick requests that are typical for the product and that the assistant does well.
55
+
56
+ #### Configure
57
+
58
+ ```yaml
59
+ components:
60
+ KitchenRange:
61
+ assistantGreeting:
62
+ main:
63
+ message:
64
+ $msg: Hi! I can change this range with you.
65
+ starters:
66
+ - title:
67
+ $msg: Add a griddle
68
+ - title:
69
+ $msg: Show me the colours
70
+ reply:
71
+ $msg: Which colours can the range have?
72
+ ```
73
+
74
+ - **`assistantGreeting`** is a component on the root entity type. `main` is its instance name.
75
+ - **`message`** is the greeting.
76
+ - **`starters`** lists the chips. `title` is the text on the chip. `reply` is the message the chip sends. Without `reply`, the chip sends its `title`.
77
+ - **Every text can be translated**, as `$msg` shows.
78
+ - **Any of it can be read from an expression** with `$read`, like any other component state. The greeting and the starters can then follow the configuration.
79
+
80
+ The first active instance counts. With a `$filter` on each, a project can greet differently by step or by role.
81
+
82
+ <details>
83
+ <summary>What the agent sees</summary>
84
+
85
+ The agent never reads the greeting. A starter reaches it as an ordinary first message from the user, here "Which colours can the range have?".
86
+
87
+ So keep the greeting a statement of what the assistant can do. A question in the greeting gets an answer the agent cannot place, because it does not know what was asked.
88
+
89
+ </details>
90
+
91
+ ## Questions the user answers with a click
92
+
93
+ When the assistant needs a decision, it can ask with a form in its reply: buttons to pick from, tiles with pictures, a number with a slider, a yes or no. The user clicks, and the answer goes back as their next message. This is faster than typing, most of all on a phone.
94
+
95
+ The built-in elements cover most questions, with nothing to configure:
96
+
97
+ - **A choice of one or of several**, shown as buttons.
98
+ - **Tiles** for recipes and for the choices of a field. A tile shows the name and the picture or color the configurator already has for it.
99
+ - **A line of text, a number, a yes or no.**
100
+
101
+ A product with no question worth a form can leave forms out: see [Leaving parts of the panel out](#leaving-parts-of-the-panel-out).
102
+
103
+ Add an element of your own when the product has a way of choosing that none of these fit: a searchable palette of several hundred colors, a picker on a floor plan, a date.
104
+
105
+ #### Configure
106
+
107
+ ```yaml
108
+ assistant:
109
+ formElements:
110
+ ralcolor:
111
+ description: >-
112
+ A searchable palette of every RAL body colour of the range, from which the user picks one.
113
+ Offer it when the user wants a RAL colour, instead of listing RAL colours as options.
114
+ It answers with the colour's name.
115
+ role: input
116
+ state:
117
+ type: string
118
+ ```
119
+
120
+ - **`formElements`** takes the name of the element, which is also the tag the agent writes. The name is lowercase.
121
+ - **`description`** tells the agent what the element is, when to offer it and what the answer looks like.
122
+ - **`state`** declares the type of the value an `input` element holds, as a JSON schema. The palette holds the key of a color, a string.
123
+ - **`role`** says what the element collects. `input` is a free value, as here. `option` is one thing to pick inside a choice. `group`, `choice` and `choices` are containers for other elements.
124
+
125
+ The element is drawn by a component of the project:
126
+
127
+ ```tsx
128
+ // src/elements/RalColor.tsx
129
+ export default phx.frontend.createAssistantFormElement('ralcolor', ({ state, disabled, onChange }) => {
130
+ const range = phx.frontend.useRootEntityState()
131
+ const colors = range.$catalog.Colors.filter(color => color.family.startsWith('RAL'))
132
+
133
+ return (
134
+ <SwatchSelector.Root swatchName={colors.find(color => color.key === state)?.label}>
135
+ {colors.map(color => (
136
+ <SwatchSelector.Item
137
+ key={color.key}
138
+ of="color"
139
+ swatchKey={color.key}
140
+ swatchName={color.label}
141
+ color={color.swatchColor}
142
+ selected={color.key === state}
143
+ disabled={disabled}
144
+ onClick={() => onChange(color.key, color.label)}
145
+ />
146
+ ))}
147
+ </SwatchSelector.Root>
148
+ )
149
+ })
150
+ ```
151
+
152
+ - **`createAssistantFormElement`** registers the component under the name from the spec, in a file in `src/elements/`. The name types the props, `state` included, so the component needs no annotations.
153
+ - **`state`** is the value picked so far. Pass `disabled` on to the controls.
154
+ - **`onChange`** takes the value to keep and the words the answer shows to the user.
155
+
156
+ An element can also take attributes of its own, declared under `attributes` with a type each, and `required` names the ones the agent must write. The agent writes every element with an optional `label`.
157
+
158
+ <details>
159
+ <summary>What the agent sees</summary>
160
+
161
+ The guide lists the built-in elements and then yours, each with its description:
162
+
163
+ ```
164
+ - `<ralcolor label />`: A searchable palette of every RAL body colour of the range, from which
165
+ the user picks one. Offer it when the user wants a RAL colour, instead of listing RAL colours
166
+ as options. It answers with the colour's name.
167
+ ```
168
+
169
+ To ask, the agent ends its reply with a form:
170
+
171
+ ````
172
+ ```form
173
+ <ralcolor label="Body colour" />
174
+ ```
175
+ ````
176
+
177
+ The user picks a color, and the agent receives `Body colour: RAL 5010` as their next message. The chat shows that line as the user's own message, so the answer is written in words the user would use, never as a key. The agent maps the name back to the value it writes.
178
+
179
+ </details>
180
+
181
+ ## Pictures: photos, annotations and drawings
182
+
183
+ Pictures go both ways in the panel. All of it is on by default.
184
+
185
+ - **The user attaches images**, up to four per message: a photo of the room, a sketch, a design they like. The agent reads them. It is told that sizes it reads from a photo are estimates, and to confirm them before it applies them.
186
+ - **The user annotates.** The Annotate button takes the current view of the configurator. The user draws on it and drops numbered pins, each with a comment. "Remove this one" with a stroke across a part is faster and clearer than a description. An attached image and a drawing of the assistant can be annotated the same way.
187
+ - **The assistant draws.** It can add a simple schematic to its reply: a layout seen from above, a dimension, a comparison of two options. It draws to plan or to explain, before a change. It does not draw the product itself, because the user sees that in the scene.
188
+
189
+ #### Configure
190
+
191
+ Nothing to declare. All three are on. To get more drawings, or particular ones, ask for them in the `instructions`. For example: "After reading a photo, draw the layout you deduced and ask the user to confirm it."
192
+
193
+ To leave one of them out, see [Leaving parts of the panel out](#leaving-parts-of-the-panel-out).
194
+
195
+ A drawing costs much more than text, so the agent is told to draw at most one per reply.
196
+
197
+ <details>
198
+ <summary>What the agent sees</summary>
199
+
200
+ An attached image arrives with the user's message. An annotation arrives as an image too, with the user's strokes and numbered pins in red, and the comments listed by number before the message. The agent is told that an annotation of the configurator shows the user's own current view, not one of the [screenshot views](?path=/docs/phoenix-assistant-screenshots--docs).
201
+
202
+ A drawing is SVG that the agent writes into its reply. The panel shows it as a picture, so nothing in it can run or load anything. The user can open it larger beside the chat.
203
+
204
+ </details>
205
+
206
+ ## Voice
207
+
208
+ With voice on, the user can speak a message, and the panel reads replies aloud. It suits a user whose hands are busy or who is on a phone.
209
+
210
+ - **Speaking.** A mic takes the place of the Send button while the message box is empty. The recording is sent as the message, and the server turns it into text. The recording itself is never stored. A recording ends on its own at two minutes.
211
+ - **Listening.** A reply gets a play button when its text, without code, tables and images, is at most 1,500 characters. The reply to a spoken message reads itself aloud, unless the user muted that in the panel's header. Where the browser does not let a page start sound on its own, as Safari does after a long wait, the play button is highlighted instead.
212
+
213
+ Voice counts toward the same [hourly limits](?path=/docs/phoenix-assistant-instructions-and-ai-settings--docs#hourly-limits) as text.
214
+
215
+ #### Configure
216
+
217
+ ```yaml
218
+ assistant:
219
+ ai:
220
+ provider: openai
221
+ model: balanced
222
+ reasoning: medium
223
+ voice: true
224
+ ```
225
+
226
+ - **`voice`** turns on both the mic and the reading aloud. It is off by default. A [setup handler](?path=/docs/phoenix-assistant-per-session-setup--docs#settings-for-the-session) can turn it off per session, never on, so declare `voice: true` here to offer it to anyone.
227
+
228
+ Three things to know:
229
+
230
+ - **The browser asks the user for the microphone** the first time they record. A configurator embedded as a web component needs nothing more. Only a page that puts the configurator into an iframe has to allow it there: `<iframe allow="microphone" …>`.
231
+ - **The server makes the speech of a reply once**, the first time it is played, and keeps it with the conversation.
232
+ - **Under `phoenix dev`, reload the page after changing `voice`.** The change reaches the server, but not the page that is already open.
233
+
234
+ <details>
235
+ <summary>What the agent sees</summary>
236
+
237
+ The agent gets the spoken message as text, like a typed one. It is told to write the reply to a spoken message so that it can be heard: brief, in a few plain sentences, without lists or tables. A form or a drawing is still shown, and the agent says in the text that it is there. While voice is off, the agent is told nothing about spoken messages.
238
+
239
+ </details>
240
+
241
+ ## The look of the panel
242
+
243
+ The panel follows the theme of the configurator, so it matches the rest of the UI from the start. Every part of it also has a theme name of its own, for the cases where the chat should look like the brand's own: the shape of the message box, the user's bubble, the buttons of a form.
244
+
245
+ #### Configure
246
+
247
+ ```tsx
248
+ export default phx.frontend.createGetThemeHandler(
249
+ () =>
250
+ ({
251
+ components: {
252
+ PhxAssistantComposer: { styleOverrides: { inputFrame: { borderRadius: 4 } } },
253
+ },
254
+ }) satisfies ThemeOptions
255
+ )
256
+ ```
257
+
258
+ - **`PhxAssistantComposer`** is the theme name of the message box, and `inputFrame` is one of its parts.
259
+ - **`styleOverrides`** restyles a part. A theme name also takes `slots`, which replace a part with a component of your own.
260
+
261
+ The full list of names and their parts is in [Configurator Interface](?path=/docs/phoenix-configurator-interface--docs), under "Assistant theme names and slots".
262
+
263
+ <details>
264
+ <summary>What the agent sees</summary>
265
+
266
+ Nothing. The look of the panel does not change what the agent reads or writes.
267
+
268
+ </details>
269
+
270
+ ## Leaving parts of the panel out
271
+
272
+ Every part of the panel is on by default. A configurator that has no use for one can leave it out: its control goes, and the assistant stops offering it.
273
+
274
+ #### Configure
275
+
276
+ ```yaml
277
+ assistant:
278
+ features:
279
+ drawings: false
280
+ forms: false
281
+ images: false
282
+ annotations: false
283
+ ```
284
+
285
+ - **`drawings: false`**: the assistant explains in words only. Use it when a schematic of the product would mislead more than help. A drawing it writes anyway is still shown.
286
+ - **`forms: false`**: the assistant asks in words, and the user types the answer. Use it when the product has no question worth a form. A form it writes anyway is still shown.
287
+ - **`images: false`**: the user cannot attach images. The Attach button goes, and with it Annotate on an attached image.
288
+ - **`annotations: false`**: the user cannot mark up the view or an image. Annotate goes everywhere it appears.
289
+ - **With `images` and `annotations` both off**, and no [screenshot views](?path=/docs/phoenix-assistant-screenshots--docs), the server takes no images at all for the configurator and refuses any upload.
290
+
291
+ A flag left out is on. A [setup handler](?path=/docs/phoenix-assistant-per-session-setup--docs#taking-abilities-away) can turn a part off for one session, never on.
292
+
293
+ <details>
294
+ <summary>What the agent sees</summary>
295
+
296
+ A part that is off drops out of what the agent is told: the rules for drawings without `drawings`, the form elements without `forms`, and the lines about annotations without `annotations`. With `images` and `annotations` both off, the agent is told nothing about images from the user. Its instructions are shorter, which costs less on every message.
297
+
298
+ </details>
@@ -1,26 +1,30 @@
1
1
  # Clerk Sign-In
2
2
 
3
- Phoenix projects that use Clerk can replace the redirect-only OAuth entry point with an inline sign-in page for the Configurator, Admin, or both. The integration is opt-in through `@salsita-ai/sdk/extras/clerk`; projects without `useClerk` do not install or bundle Clerk React.
3
+ > **Legacy.** Clerk sign-in is the `legacy-clerk` access mode, for workspaces Salsita set up with Clerk. A workspace with Studio accounts signs people in with `invited` or `public-with-sign-in` (see [Webhooks — Studio-account sign-in](?path=/docs/phoenix-webhooks--docs#studio-account-sign-in)).
4
+
5
+ Phoenix projects that use Clerk can replace the redirect-only OAuth entry point with an inline sign-in page for the Configurator, Admin, or both. The integration is opt-in through `@salsita-ai/sdk/extras/clerk`; projects in another access mode than `legacy-clerk` do not install or bundle Clerk React.
4
6
 
5
7
  The page supports email and password (including password reset), Google OAuth, and discoverable passkeys. Methods render in the order supplied. After Clerk authenticates the browser, Phoenix exchanges the short-lived Clerk session token for the normal one-time authorization code and session without reloading the application. The existing server OAuth redirect remains the fallback if the in-place exchange cannot complete.
6
8
 
7
9
  ## Enable Clerk
8
10
 
9
- Set `useClerk` in the application spec:
11
+ Set the Legacy Clerk access mode in the application spec:
10
12
 
11
13
  ```yaml
12
14
  # spec/application.yaml
13
- useAuthHook: true
14
- useClerk: true
15
+ access: legacy-clerk
15
16
  ```
16
17
 
17
18
  `@clerk/clerk-react` then becomes a dependency the project declares: run `phoenix deps` through your package manager (for example `pnpm phoenix deps`) and install to add it, because `phoenix sync`, `dev` and `build` stop while it is missing. `phoenix sync` generates typed Clerk environment readers. In a project on the legacy pipeline (see [Current and legacy project tooling](?path=/docs/phoenix-phoenix-cli--docs#current-and-legacy-project-tooling)), `phoenix sync` adds the dependency itself. `phoenix deployment:prepare-local` writes the deployment's public `CLERK_PUBLISHABLE_KEY` to `.env.generated`; application source should read it from `phx.frontendEnv`, not hardcode a key.
18
19
 
19
20
  ## Configure the auth webhook
20
21
 
21
- Add the Clerk session handler alongside the existing code and refresh handlers:
22
+ With `access: legacy-clerk` the webhook's auth hook already has the Clerk session, code and refresh handlers and lets visitors in, with or without `src/webhooks/index.ts`, so there is nothing to write.
23
+
24
+ A project that must refuse visitors, or add its own handlers beside Clerk, still assembles the hook with the deprecated builder, for which parsing reports `AUTH_HOOK_DEPRECATED`:
22
25
 
23
26
  ```typescript
27
+ // src/webhooks/index.ts
24
28
  const authHandler = phx.webhooks.authHandlerBuilder
25
29
  .withClerkSessionHandler()
26
30
  .withClerkCodeHandler()
@@ -159,6 +159,7 @@ The hooks that return an entity or its id of one type take the enhanced reflecti
159
159
  // Active states
160
160
  const navigationState = phx.frontend.useActiveNavigationState()
161
161
  const viewState = phx.frontend.useActiveViewState()
162
+ const viewChildState = phx.frontend.useActiveViewChildState() // Runtime choice within the view, or undefined
162
163
  const toolState = phx.frontend.useActiveToolState()
163
164
 
164
165
  // Navigation actions
@@ -436,6 +437,7 @@ The helper types the page's props as `ConfigurationNotFoundPageProps` from `@sal
436
437
  - The page receives one optional prop, `onBack`, which returns to the start of the configurator. It is set when a configuration fails to load or is opened without a valid access key. It is not set on the start page itself, so a page that offers a way back shows it only when `onBack` is set.
437
438
  - The configurator renders the element in four cases: a configuration fails to load, for example because its ID does not exist or the server rejects its access key; a configuration is opened without an access key for it; a signed-in user whose role may not create configurations (`acl.canCreate`) opens the start page; the preset screen has no preset category to show, for example because the host's `presetTags` match no preset. The last case happens inside the built-in preset screen, so a project that replaces it with `createPresetUi` decides what to show itself.
438
439
  - The not-authenticated page, shown when session authentication fails or to an anonymous visitor who may not create a configuration, is its own element, which `createNotAuthenticatedPage` replaces. Its default, the `NotAuthenticatedPage` registration in `defaultConfiguratorElements`, renders the `ConfigurationNotFoundPage` element, so a project's not-found page shows there too.
440
+ - When the server starts no session of the configurator now, because its workspace is frozen or a limit refuses new sessions, the configurator shows a neutral "This configurator is temporarily unavailable." page in place of the not-authenticated page, hosted and embedded alike. It never says why, and it is not an element a project replaces.
439
441
  - The admin's not-authorized page still shows the built-in page directly, not the element.
440
442
 
441
443
  ### Configurator Error Page
@@ -607,8 +609,8 @@ Texts from the spec, such as option titles and the `detail` fields, are `Localiz
607
609
  | `phx.frontend.useCloseAction()` | The host's close action, `() => Promise<void>`, or `null` when the integration mode offers none. It dispatches the web component's `close` event and, depending on the integration mode, first leaves for the go-back URL of the page's query or puts the configurator on standby. Besides `phx.frontend`, `@salsita-ai/sdk/configurator` exports it, not `@salsita-ai/sdk/react`. |
608
610
  | `phx.frontend.useActiveNavigationState()` | The active navigation state, one of the spec's `navigationStates`. |
609
611
  | `phx.frontend.usePushNavigate()` and `phx.frontend.usePopNavigate()` | `(state) => void`, which enters a state and remembers the active one, and `() => void`, which returns to the remembered state and does nothing when there is none. `phx.frontend.useNavigate()` returns `(state) => void`, which enters a state and forgets the history. |
610
- | `phx.frontend.useActiveViewState()` and `phx.frontend.useActiveToolState()` | The active view state and tool state. |
611
- | `phx.frontend.useSetViewState()` | `(state) => void`, which makes the given view state, one of the spec's `viewStates`, the active one; setting the active state again keeps it. Cameras and components filtered by `viewStates` follow the change. |
612
+ | `phx.frontend.useActiveViewState()` and `phx.frontend.useActiveToolState()` | The active view state and tool state. `phx.frontend.useActiveViewChildState()` reads the runtime choice within the view, or `undefined`. |
613
+ | `phx.frontend.useSetViewState()` | `(state, viewChildState?) => void` activates a declared view and its optional runtime child. Omitting the child clears it. Cameras and components filtered by `viewStates` follow the declared view. |
612
614
  | `phx.frontend.useResetCamera()` | `() => void`, which moves the camera back to the framing of the active camera configuration, undoing the user's orbit, pan and zoom, as the toolbar's reset button does. Besides `phx.frontend`, `@salsita-ai/sdk/configurator` exports it, not `@salsita-ai/sdk/react`. |
613
615
  | `phx.frontend.useUndoRedo()` | `{ canUndo, canRedo, undo, redo }`: whether the undo history has a change to undo or to redo, and two `() => void` functions that undo or redo it, as the toolbar's undo and redo buttons do, pushing the same analytics events; each does nothing while there is nothing to undo or redo. Besides `phx.frontend`, `@salsita-ai/sdk/react` exports it. |
614
616
  | `phx.frontend.useTabNavigation(options?)` | `{ source, tabs, activeTab, select }` for the spec's tabs: `source` is `'sidebarTabs'` (every active `sidebarTabs` of the selected entity, in spec order) or `'horizontalTabs'` (the first active `horizontalTabs`), or `null` without tabs. Each tab is `{ index, label, icon, iconNode, navigationStates, state, isActive }`, with the label resolved, `icon` a PhxIcon name and `iconNode` a React node given by TypeScript spec code; `activeTab` is the first active tab or `null`. `select(index or navigation state)` enters the tab's first navigation state, as the built-in tabs do, pushing the same analytics event for `horizontalTabs`. `options.source` (`'auto'`, `'sidebarTabs'` or `'horizontalTabs'`) chooses the kind; `'auto'` prefers `sidebarTabs` when both are active, with a warning in development. `options.entityId` reads another entity's `sidebarTabs`. A tab without navigation states is left out, with a warning in development. It does not check read mode. Besides `phx.frontend`, `@salsita-ai/sdk/react` exports it. |
@@ -664,46 +666,29 @@ A layout builds its toolbar from `phx.frontend.useToolbarActions()`, which retur
664
666
  The assistant panel renders only inside `LayoutSlots.DesktopSidebar`. A project element that shows the conversation or takes a message itself, such as a thread in the layout's own drawer, reads the same state as the panel through two hooks, exported from `@salsita-ai/sdk/configurator` besides `phx.frontend`. They are separate so that a composer does not render again with every chunk of a reply.
665
667
 
666
668
  | Hook | Returns |
667
- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
668
- | `phx.frontend.useAssistantThread()` | `{ items, earlierItems, isLoaded, isLoadingThread, isEmpty, greeting, starters, isReplying, isThinking, isResuming, failure, retry, hasOlderMessages, isLoadingOlderMessages, loadOlderMessages, canLoadEarlierThread, isLoadingEarlierThread, loadEarlierThread, undoableToolCallId, undo, newestMessageKey, firstMessageId }`. `items` is the current thread in reading order, each a `user` message with its `text`, `imageIds`, `annotations` and `voice` (`'transcribing'` while the transcript of a voice message is on its way, `'spoken'` once its text is the transcript, `null` for a typed message), a stretch of assistant `text` with its `markdown` and `playableReplyId` (the id of the reply it ends, when the panel can read that reply aloud, else `null`), a row of `tools` calls in a row, or a `separator`; `earlierItems` are the closed threads loaded above it, oldest first, each ended by a separator, whose replies are never playable. `isLoadingThread` is set while the thread is read and `isEmpty` when there is nothing to show, where the panel greets the user. `greeting` and `starters` come from the spec's root `assistantGreeting` component, in the current language, for an empty thread: `greeting` is its `message`, `undefined` without one, where the panel greets with its own words, and each starter is `{ title, reply }`, `reply` being the `title` when the spec gives none. A project thread sends a starter with `phx.frontend.useConfigurator().assistantSystem.send(starter.reply)`, as the panel's chips do. `isThinking` is set while a reply runs and nothing in the thread shows it yet. `failure` is `{ kind, canRetry }` with `kind` `'notAvailable'`, `'busy'`, `'resting'` (with `minutes` to wait), `'exhausted'`, `'locked'`, `'networkLocked'`, `'unheard'` (nothing was heard in a voice message, which was dropped), `'providerBusy'` (the AI service behind the assistant was overloaded and failed the reply) or `'unavailable'`, and `retry()`, where `canRetry` is set, regenerates the reply on the user's message when the reply's run failed, also one the thread read reports, and otherwise reads the thread again. `'locked'` means the assistant banned the user on this configuration, or on several of the customer's, and `'networkLocked'` that it is paused for the user's network address because of how it was used from there: both are failures even when the thread read succeeded, and neither offers a retry. `loadOlderMessages()` loads the previous page of the thread, which the panel does when its top scrolls into view, and `loadEarlierThread()` the closed thread before the loaded ones, offered by `canLoadEarlierThread` once the thread is loaded whole. `undoableToolCallId` is the tool call whose change a row may take back, never while a reply runs, and `undo(toolCallIds)` takes back a row's changes. A thread that scrolls follows two values: `newestMessageKey`, an opaque value compared by identity that changes with the newest message, also with every chunk of a reply, but not when an older page loads above it; and `firstMessageId`, which changes when one does, so the thread can keep the reader's place. It renders again with every chunk of a reply. | | `phx.frontend.useAssistantComposer()` | `{ draft, setDraft, attachments, addFiles, annotate, annotateAttachment, removeAttachment, isPreparing, notice, maxAttachments, isBusy, isLocked, isReplying, canSend, send, stop, inputFocusHandlers, canRecord, recording, startRecording, sendRecording, cancelRecording }` for one message being written. `attachments` are `{ id, previewUrl, isAnnotation, pinCount }`; `addFiles(files)` prepares and attaches images up to `maxAttachments` (four) per message, annotations included, and `removeAttachment(id)` takes one off. `notice` is `'limit'` for a file or annotation too many and `'unreadable'` for a file that is not an image the browser can read, until the attachments change. `annotate()` opens the annotation editor over the configurator, in every layout, and attaches the annotation; it calls `assistantSystem.annotate({ type: 'view' })`, which attaches what the user made itself and resolves with the attachment's id, or `null`, and whose `AssistantAnnotationTarget` argument takes `{ type: 'image', image, background }` to annotate an image instead of the view, as the Annotate of an opened image does. `annotateAttachment(id)` opens the editor on an attached image that is not an annotation, as the Annotate of the built-in composer's thumbnail does, and the annotation takes that image's place, so it needs no free slot; it calls `assistantSystem.annotate({ type: 'attachment', attachmentId, background })`. `isBusy` is set while a send waits for the thread to be resumed or the images to upload, when the input should be read-only. `isLocked` is set while the assistant has banned the user on this configuration, or is paused for the user's network; `canSend` is false then, and nothing should be written or attached. `send()` sends the message when `canSend`, clears it once the chat takes it, and puts it back, after what was written meanwhile, when the chat gives it back; `stop()` ends a reply. Spread `inputFocusHandlers` onto the message input so a phone layout makes room for it. The text of the message lives as long as the component that calls the hook; its attachments live in the assistant system (`assistantSystem.composerAttachments$`), so an annotation made outside the composer is attached too, and a configuration load takes them off. Enter-to-send, pasting and dropping images, Enter sending and Escape dropping a recording, and the cursor put in the input when the panel opens on a desktop are the built-in composer's own: a project composer calls `send` and `addFiles` from its handlers. `canRecord` is set when the user may speak the message instead: the session takes voice messages (see below), the browser can record and no ban refuses the user; the built-in composer then shows a mic in place of Send while the text is empty and nothing is attached; to send a voice message with attachments, attach while recording. `recording` is `{ status, elapsedMs, level }`, with `status` `'idle'`, `'requesting'` while the browser asks for the microphone, `'recording'`, `'recorded'` for a recording the server refused, which waits to be sent again or dropped, `'refused'` while the microphone is blocked for the page, or `'unavailable'` where the browser cannot record; `level` is the loudness of the microphone from 0 to 1. `startRecording()` starts a recording, asking for the microphone, also again after a refusal; `sendRecording()` stops it and sends it, with the attachments, as the message; `cancelRecording()` drops it. A recording that reaches two minutes is sent on its own. |
669
+ | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
670
+ | `phx.frontend.useAssistantThread()` | `{ items, earlierItems, isLoaded, isLoadingThread, isEmpty, greeting, starters, isReplying, isThinking, isResuming, failure, retry, hasOlderMessages, isLoadingOlderMessages, loadOlderMessages, canLoadEarlierThread, isLoadingEarlierThread, loadEarlierThread, undoableToolCallId, undo, newestMessageKey, firstMessageId }`. `items` is the current thread in reading order, each a `user` message with its `text`, `imageIds`, `annotations` and `voice` (`'transcribing'` while the transcript of a voice message is on its way, `'spoken'` once its text is the transcript, `null` for a typed message), a stretch of assistant `text` with its `markdown` and `playableReplyId` (the id of the reply it ends, when the panel can read that reply aloud, else `null`), a row of `tools` calls in a row, or a `separator`; `earlierItems` are the closed threads loaded above it, oldest first, each ended by a separator, whose replies are never playable. `isLoadingThread` is set while the thread is read and `isEmpty` when there is nothing to show, where the panel greets the user. `greeting` and `starters` come from the spec's root `assistantGreeting` component, in the current language, for an empty thread: `greeting` is its `message`, `undefined` without one, where the panel greets with its own words, and each starter is `{ title, reply }`, `reply` being the `title` when the spec gives none. A project thread sends a starter with `phx.frontend.useConfigurator().assistantSystem.send(starter.reply)`, as the panel's chips do. `isThinking` is set while a reply runs and nothing in the thread shows it yet. `failure` is `{ kind, canRetry }` with `kind` `'notAvailable'`, `'busy'`, `'resting'` (with `minutes` to wait), `'exhausted'`, `'locked'`, `'networkLocked'`, `'unheard'` (nothing was heard in a voice message, which was dropped), `'providerBusy'` (the AI service behind the assistant was overloaded and failed the reply) or `'unavailable'`, and `retry()`, where `canRetry` is set, regenerates the reply on the user's message when the reply's run failed, also one the thread read reports, and otherwise reads the thread again. `'locked'` means the assistant banned the user on this configuration, or on several of the customer's, and `'networkLocked'` that it is paused for the user's network address because of how it was used from there: both are failures even when the thread read succeeded, and neither offers a retry. `loadOlderMessages()` loads the previous page of the thread, which the panel does when its top scrolls into view, and `loadEarlierThread()` the closed thread before the loaded ones, offered by `canLoadEarlierThread` once the thread is loaded whole. `undoableToolCallId` is the tool call whose change a row may take back, never while a reply runs, and `undo(toolCallIds)` takes back a row's changes. A thread that scrolls follows two values: `newestMessageKey`, an opaque value compared by identity that changes with the newest message, also with every chunk of a reply, but not when an older page loads above it; and `firstMessageId`, which changes when one does, so the thread can keep the reader's place. It renders again with every chunk of a reply. | | `phx.frontend.useAssistantComposer()` | `{ draft, setDraft, attachments, addFiles, annotate, annotateAttachment, removeAttachment, isPreparing, notice, maxAttachments, isBusy, isLocked, isReplying, canSend, send, stop, inputFocusHandlers, canAttach, canAnnotate, canRecord, recording, startRecording, sendRecording, cancelRecording }` for one message being written. `attachments` are `{ id, previewUrl, isAnnotation, pinCount }`; `addFiles(files)` prepares and attaches images up to `maxAttachments` (four) per message, annotations included, and `removeAttachment(id)` takes one off. `notice` is `'limit'` for a file or annotation too many and `'unreadable'` for a file that is not an image the browser can read, until the attachments change. `annotate()` opens the annotation editor over the configurator, in every layout, and attaches the annotation; it calls `assistantSystem.annotate({ type: 'view' })`, which attaches what the user made itself and resolves with the attachment's id, or `null`, and whose `AssistantAnnotationTarget` argument takes `{ type: 'image', image, background }` to annotate an image instead of the view, as the Annotate of an opened image does. `annotateAttachment(id)` opens the editor on an attached image that is not an annotation, as the Annotate of the built-in composer's thumbnail does, and the annotation takes that image's place, so it needs no free slot; it calls `assistantSystem.annotate({ type: 'attachment', attachmentId, background })`. `isBusy` is set while a send waits for the thread to be resumed or the images to upload, when the input should be read-only. `isLocked` is set while the assistant has banned the user on this configuration, or is paused for the user's network; `canSend` is false then, and nothing should be written or attached. `send()` sends the message when `canSend`, clears it once the chat takes it, and puts it back, after what was written meanwhile, when the chat gives it back; `stop()` ends a reply. Spread `inputFocusHandlers` onto the message input so a phone layout makes room for it. The text of the message lives as long as the component that calls the hook; its attachments live in the assistant system (`assistantSystem.composerAttachments$`), so an annotation made outside the composer is attached too, and a configuration load takes them off. Enter-to-send, pasting and dropping images, Enter sending and Escape dropping a recording, and the cursor put in the input when the panel opens on a desktop are the built-in composer's own: a project composer calls `send` and `addFiles` from its handlers. `canAttach` and `canAnnotate` follow the session's `assistant.features`: `images` and `annotations`. Without them `addFiles`, `annotate()` and `annotateAttachment(id)` do nothing, and the built-in composer hides its Attach and Annotate controls; annotating an attached image needs both. `canRecord` is set when the user may speak the message instead: the session takes voice messages (see below), the browser can record and no ban refuses the user; the built-in composer then shows a mic in place of Send while the text is empty and nothing is attached; to send a voice message with attachments, attach while recording. `recording` is `{ status, elapsedMs, level }`, with `status` `'idle'`, `'requesting'` while the browser asks for the microphone, `'recording'`, `'recorded'` for a recording the server refused, which waits to be sent again or dropped, `'refused'` while the microphone is blocked for the page, or `'unavailable'` where the browser cannot record; `level` is the loudness of the microphone from 0 to 1. `startRecording()` starts a recording, asking for the microphone, also again after a refusal; `sendRecording()` stops it and sends it, with the attachments, as the message; `cancelRecording()` drops it. A recording that reaches two minutes is sent on its own. |
669
671
 
670
- The panel renders `useAssistantThread`'s items with components that `@salsita-ai/sdk/configurator` exports too. `AssistantThreadItemView({ item, isActive, undoableToolCallId, onUndo })` renders any item as the panel does; `isActive` is set for the newest item while a reply runs, and `undoableToolCallId` and `onUndo` take the hook's `undoableToolCallId` and `undo`. It dispatches to `AssistantUserMessage({ text, imageIds, annotations, voice })`, `AssistantMarkdown({ markdown, isStreaming, forms })` followed by the reply's play button when `playableReplyId` is set, `AssistantToolChips({ tools, isActive, canUndo, onUndo })` and `AssistantSeparator()`, which a project thread can use one by one. `AssistantMarkdown` renders the project's assistant form elements, entity and reference links, alerts, pictures and drawings wherever it is inside the configurator, without further wiring. A drawing is SVG the model wrote in a fenced code block with the language `svg`; it shows framed in the thread as an image, so nothing in it runs or loads, and a click opens it larger beside the panel, as it does a picture of a reply and an image of a sent message. The assistant's prompt lets the model draw when a schematic explains better than words or when it is asked to; a project asks for more drawings, or for particular ones, in its `assistant.instructions`, for example "After reading a photo, draw the layout you deduced and ask the user to confirm it." A spoken message shows a placeholder until its transcript arrives, then the transcript in italics with a mic mark. An entity link selects its entity; inside `EntityLinkSelectionProvider`, given the selection `useCreateEntityLinkSelection()` creates, the thread can call that selection's `release()` on a click elsewhere in the thread to deselect what a link selected, as the panel does.
672
+ The panel renders `useAssistantThread`'s items with components that `@salsita-ai/sdk/configurator` exports too. `AssistantThreadItemView({ item, isActive, undoableToolCallId, onUndo })` renders any item as the panel does; `isActive` is set for the newest item while a reply runs, and `undoableToolCallId` and `onUndo` take the hook's `undoableToolCallId` and `undo`. It dispatches to `AssistantUserMessage({ text, imageIds, annotations, voice })`, `AssistantMarkdown({ markdown, isStreaming, forms })` followed by the reply's play button when `playableReplyId` is set, `AssistantToolChips({ tools, isActive, canUndo, onUndo })` and `AssistantSeparator()`, which a project thread can use one by one. `AssistantMarkdown` renders the project's assistant form elements, entity and reference links, alerts, pictures and drawings wherever it is inside the configurator, without further wiring. Drawings, attached images and annotations are covered in [The Panel](?path=/docs/phoenix-assistant-the-panel--docs#pictures-photos-annotations-and-drawings). A spoken message shows a placeholder until its transcript arrives, then the transcript in italics with a mic mark. An entity link selects its entity; inside `EntityLinkSelectionProvider`, given the selection `useCreateEntityLinkSelection()` creates, the thread can call that selection's `release()` on a click elsewhere in the thread to deselect what a link selected, as the panel does.
671
673
 
672
- Voice messages are off unless the spec's `assistant.ai.voice` is `true`; the assistant setup handler can return `ai.voice` to turn them on or off per session, and the composer follows what the server resolved for the session, which the thread read reports. Under `phoenix dev`, an edit of `assistant.ai` reaches the server but not the open page: reload the page to see the mic come or go. A recording is sent as the message, and the server transcribes it once the ban, the monthly caps and the hourly limits accept the message, counting the transcription in the same usage; the transcript becomes the message's text, and the recording is never stored. The browser asks the user for the microphone the first time they record. A configurator embedded in an iframe can record only when the iframe allows it: `<iframe allow="microphone" …>`.
673
-
674
- With voice on, the panel also reads replies aloud. Every reply that has something to say, in at most 1,500 characters once its code blocks, tables and images are dropped, has a play button under its text, which reads it aloud and stops it; starting one reply stops the other. The reply to a voice message reads itself aloud once it has ended, unless the user muted that with the speaker button in the panel's header; the browser remembers the choice, and the play buttons work either way. A browser that does not let the page start audio on its own, such as Safari when the reply took long, leaves the reply's play button highlighted instead. The server synthesizes a reply's speech once, from its stored text, the first time it is asked for, holding it to the same ban, monthly caps and hourly limits as a message, and keeps it with the thread. A voice message also asks the model for a short reply written to be heard.
674
+ Voice messages and replies read aloud are covered in [The Panel](?path=/docs/phoenix-assistant-the-panel--docs#voice).
675
675
 
676
676
  A project thread or composer of its own drives the reading through `phx.frontend.useConfigurator().assistantSystem`: `playReply(messageId)` reads the reply with that id aloud, or stops it while it is read, `stopPlayback()` stops it, `playback$` holds `{ messageId, status }` with `status` `'idle'`, `'loading'`, `'playing'` or `'blocked'` (the browser did not start the reply on its own), and `muted$` and `setMuted(muted)` hold and change the user's choice to mute the replies that read themselves aloud. `isSpeakableReply(message)`, exported from `@salsita-ai/sdk/configurator`, tells whether the server reads a message aloud. A composer of its own calls `unlockPlayback()` on the tap that records or sends a voice message, so Safari lets the reply read itself aloud later, and `stopPlayback()` when the user starts to speak.
677
677
 
678
- The panel greets an empty thread with its own words. A root `assistantGreeting` component greets in the project's instead, and offers starters: chips under the greeting that send a ready-made first message, `reply`, or `title` without one. Every text is localisable, and the first active instance counts, so `$filter` can switch between greetings. The greeting is shown only: the model never reads it, and both leave the thread with its first message, so keep it a statement of what the assistant can do and put concrete asks in the starters.
679
-
680
- ```yaml
681
- components:
682
- KitchenRange:
683
- assistantGreeting:
684
- main:
685
- message:
686
- $msg: Hi! I can change this range with you.
687
- starters:
688
- - title:
689
- $msg: Add a griddle
690
- - title:
691
- $msg: Show me the colours
692
- reply:
693
- $msg: Which colours can the range have?
694
- ```
678
+ The greeting and its starters are covered in [The Panel](?path=/docs/phoenix-assistant-the-panel--docs#greeting-and-starters).
695
679
 
696
680
  **Assistant tools for agents in the browser (WebMCP)**
697
681
 
698
682
  A configurator whose spec has an `assistant` section also offers the assistant's tools to AI agents in the visitor's browser through [WebMCP](https://webmachinelearning.github.io/webmcp/), such as a chatbot that opens the page in its own browser on the user's behalf. The agent reads and changes the configuration through the same GraphQL schema as the panel's assistant, instead of clicking through the UI, and brings its own model: nothing runs on the server, so the deployment's assistant switches, hourly limits and monthly caps do not apply, and the chat panel need not be used.
699
683
 
700
- The page registers three tools on `document.modelContext` once a configuration is loaded, and unregisters them when the configuration is left or another one is loaded:
684
+ The page registers four tools on `document.modelContext` once a configuration is loaded, and unregisters them when the configuration is left or another one is loaded:
701
685
 
702
- | Tool | What the agent gets |
703
- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
704
- | `configurator_guide` | Read-only. How to use the other two tools, the GraphQL schema of the session and the spec's `instructions`, after the setup handler narrowed them. |
705
- | `configurator_query` | Read-only. The panel's `query`: runs GraphQL operations, mutations on a copy that is discarded, and returns the results as MCP content, with the pictures of screenshots inline. |
706
- | `configurator_apply` | The panel's `apply`: commits the operations' changes as one step of the configurator's undo, refused like the panel's in a finalize run and while the configuration is read-only. The edit gets no row in the panel and looks to the panel's assistant like the user's own. |
686
+ | Tool | What the agent gets |
687
+ | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
688
+ | `configurator_guide` | Read-only. How to use the other tools, the GraphQL schema of the session and the spec's `instructions`, after the setup handler narrowed them. |
689
+ | `configurator_query` | Read-only. The panel's `query`: runs GraphQL operations, mutations on a copy that is discarded, and returns the results as MCP content, with the pictures of screenshots inline. |
690
+ | `configurator_apply` | The panel's `apply`: commits the operations' changes as one step of the configurator's undo, refused like the panel's in a finalize run and while the configuration is read-only. The edit gets no row in the panel and looks to the panel's assistant like the user's own. |
691
+ | `configurator_share_link` | Takes `access`, `edit` or `view`, saves the configuration and returns a link that shares it, as the Share dialog does: with `applicationConfig.shareStrategy`, and expiring after `shareExpiration` hours or never. A view link points to the revision just saved; anyone who holds an edit link can change the configuration. Refused while sharing or the requested kind of link is turned off (`shareDisabled`, `shareOwnerLinkDisabled`, `shareReadRevisionLinkDisabled`) and while the configuration is read-only. |
707
692
 
708
693
  Screenshots taken for an agent stay in the browser; they are never uploaded. The spec's `instructions` are part of the application bundle, so a visitor and their agent can read them.
709
694
 
@@ -714,12 +699,12 @@ Two more tools let the agent start a configuration from a preset, as a visitor d
714
699
  | `configurator_list_presets` | Read-only. The categories and presets the preset screen shows, filtered by `presetTags`, as JSON: ids, names, descriptions and image URLs, in the current locale. |
715
700
  | `configurator_create_from_preset` | Takes a preset's `id` and starts a configuration from it as a click on its card does: analytics, the `onPresetLoaded` handler and the navigation included. Called inside a configuration, it leaves that one as it is and opens the new one. It returns once the new configuration is loaded and says whether `configurator_guide` is there; after 60 seconds it returns anyway and tells the agent to try the guide later. |
716
701
 
717
- They are offered when the spec has an `assistant` section without `webmcp: false`, the visitor's role is in the spec's `canCreate` and the browser supports WebMCP. The setup handler does not take part, because it needs a loaded configuration, which the preset screen does not have, so it cannot turn these two off; it still decides whether the new configuration offers its own three tools. A project's own preset screen does not change what the two tools list or do.
702
+ They are offered when the spec has an `assistant` section without `webmcp: false`, the visitor's role is in the spec's `canCreate` and the browser supports WebMCP. The setup handler does not take part, because it needs a loaded configuration, which the preset screen does not have, so it cannot turn these two off; it still decides whether the new configuration offers its own tools. A project's own preset screen does not change what the two tools list or do.
718
703
 
719
704
  WebMCP is on by default and needs the browser to support it:
720
705
 
721
706
  - The ChatGPT desktop app's built-in browser (site tools) supports it and needs nothing from the site. Chrome and Edge expose it only on origins that serve their origin-trial token, which the integrator's site registers itself. Other browsers have no `document.modelContext`, and nothing is registered there.
722
- - `webmcp: false` in the `assistant` section turns it off. The assistant setup handler can turn it off per session by returning `webmcp: false`, for example for a role, or by switching the assistant off; it cannot turn it back on.
707
+ - `webmcp: false` in the `assistant` section turns it off; `webmcp: true` says the default. The assistant setup handler can turn it off per session by returning `webmcp: false`, for example for a role, or by switching the assistant off; it cannot turn it back on.
723
708
  - `Permissions-Policy: tools=()` turns it off for a whole origin. An embedded configurator needs the `tools` feature allowed by its iframe, as in `<iframe allow="tools">`.
724
709
 
725
710
  **Assistant theme names and slots**
@@ -151,7 +151,9 @@ Host must pass the nonce into the web component:
151
151
 
152
152
  ### Starting Policy from Studio
153
153
 
154
- The **CSP** tab of an environment in Studio generates a starting `<meta http-equiv="Content-Security-Policy">` tag with that environment's configurator, server and S3 bucket origins filled in. Its `script-src` and `style-src` carry the `'nonce-YOUR_REQUEST_NONCE'` placeholder: the host still has to replace it with a cryptographically random nonce generated for every request and pass the same value to `<salsita-configurator nonce="…">`. Extend the policy with any origins the host page itself needs.
154
+ The **CSP** tab of an environment in Studio generates a starting `<meta http-equiv="Content-Security-Policy">` tag with that environment's configurator, server and S3 bucket origins filled in. Its `script-src` and `style-src` carry the `'nonce-YOUR_REQUEST_NONCE'` placeholder: the host still has to replace it with a cryptographically random nonce generated for every request and pass the same value to `<salsita-configurator nonce="…">`. Extend the policy with any origins the host page itself needs. The builder Embed page shows the same policy for each environment, as a header value.
155
+
156
+ A policy written by hand also needs `https://raw.githack.com` in `connect-src` when the scene uses a preset canvas environment, the default one included: the environment's HDR lighting loads from there. A scene with its own environment files, loaded from the project's public files, does not need it.
155
157
 
156
158
  ## What Phoenix Does Not Configure
157
159