@salsita-ai/sdk 0.50.0-develop.b5d443db78 → 0.50.0-develop.b65a5a9c66

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 (980) hide show
  1. package/README.md +10 -3
  2. package/dist/admin/common/admin-interface.d.ts +13 -3
  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 +22 -0
  18. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  19. package/dist/application-spec/errors/diagnostic-messages.d.ts +23 -1
  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/index.d.ts +1 -0
  24. package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +4 -15
  25. package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
  26. package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +5 -1
  27. package/dist/application-spec/generate-application/code/templates/admin-config.js +4 -3
  28. package/dist/application-spec/generate-application/code/templates/application-types.js +5 -5
  29. package/dist/application-spec/generate-application/code/templates/configurator-config.js +8 -6
  30. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +0 -1
  31. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +6 -8
  32. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -0
  33. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +8 -6
  34. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +6 -8
  35. package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +3 -3
  36. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-base-configurator-builder.js +2 -1
  37. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +1 -1
  38. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +38 -41
  39. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.d.ts +1 -1
  40. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +19 -3
  41. package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
  42. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  43. package/dist/application-spec/generate-application/code/templates/editor.d.ts +1 -1
  44. package/dist/application-spec/generate-application/code/templates/editor.js +16 -3
  45. package/dist/application-spec/generate-application/code/templates/frontend-config.js +7 -3
  46. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +3 -3
  47. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +3 -3
  48. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +10 -6
  49. package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -7
  50. package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +12 -13
  51. package/dist/application-spec/generate-application/code/templates/globals.js +21 -12
  52. package/dist/application-spec/generate-application/code/templates/html-index.d.ts +12 -1
  53. package/dist/application-spec/generate-application/code/templates/html-index.js +9 -10
  54. package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
  55. package/dist/application-spec/generate-application/code/templates/sign-in-page-options.d.ts +5 -0
  56. package/dist/application-spec/generate-application/code/templates/sign-in-page-options.js +1 -0
  57. package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
  58. package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +8 -36
  59. package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +15 -11
  60. package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
  61. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
  62. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
  63. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.d.ts +3 -0
  64. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +42 -0
  65. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
  66. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +55 -0
  67. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.d.ts +3 -0
  68. package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +16 -0
  69. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +3 -3
  70. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +1 -1
  71. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +1 -1
  72. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/sign-in.d.ts +3 -0
  73. package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/sign-in.js +19 -0
  74. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +1 -1
  75. package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +4 -2
  76. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +3 -3
  77. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.js +2 -2
  78. package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +1 -1
  79. package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
  80. package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +2 -2
  81. package/dist/application-spec/generate-application/code/templates/skills/features/variants.js +1 -1
  82. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.d.ts +3 -0
  83. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +48 -0
  84. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.d.ts +3 -0
  85. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.js +45 -0
  86. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.d.ts +3 -0
  87. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +36 -0
  88. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.d.ts +3 -0
  89. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.js +92 -0
  90. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.d.ts +1 -0
  91. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.js +1 -0
  92. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.d.ts +3 -0
  93. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.js +1 -0
  94. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/session-fields.d.ts +3 -0
  95. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/session-fields.js +1 -0
  96. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.d.ts +3 -0
  97. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.js +26 -0
  98. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.d.ts +3 -0
  99. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.js +51 -0
  100. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.d.ts +3 -0
  101. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.js +38 -0
  102. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.d.ts +1 -0
  103. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.js +1 -0
  104. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.d.ts +3 -0
  105. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.js +88 -0
  106. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.d.ts +3 -0
  107. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.js +68 -0
  108. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.d.ts +3 -0
  109. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.js +1 -0
  110. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.d.ts +3 -0
  111. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -0
  112. package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +2 -2
  113. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
  114. package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.js +1 -1
  115. package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
  116. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
  117. package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +3 -0
  118. package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +29 -1
  119. package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -2
  120. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +29 -15
  121. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +17 -14
  122. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +2 -2
  123. package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +3 -3
  124. package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -0
  125. package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
  126. package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
  127. package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +2 -2
  128. package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
  129. package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -1
  130. package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +1 -1
  131. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
  132. package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
  133. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +2 -0
  134. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -1
  135. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.d.ts +2 -0
  136. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.js +28 -0
  137. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +0 -7
  138. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
  139. package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -1
  140. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +8 -6
  141. package/dist/application-spec/generate-application/code/templates/webhook-index.js +2 -6
  142. package/dist/application-spec/generate-application/code/webhook-safe-files.d.ts +3 -1
  143. package/dist/application-spec/generate-application/code/webhook-safe-files.js +1 -1
  144. package/dist/application-spec/parse-application-files/access/access-handler-kinds.d.ts +18 -0
  145. package/dist/application-spec/parse-application-files/access/access-handler-kinds.js +1 -0
  146. package/dist/application-spec/parse-application-files/access/analyzed-file.d.ts +7 -0
  147. package/dist/application-spec/parse-application-files/access/check-access-handler-files.d.ts +20 -0
  148. package/dist/application-spec/parse-application-files/access/check-access-handler-files.js +1 -0
  149. package/dist/application-spec/parse-application-files/access/check-auth-hook-files.d.ts +17 -0
  150. package/dist/application-spec/parse-application-files/access/check-auth-hook-files.js +1 -0
  151. package/dist/application-spec/parse-application-files/access/index.d.ts +5 -0
  152. package/dist/application-spec/parse-application-files/access/index.js +1 -0
  153. package/dist/application-spec/parse-application-files/access/sign-in-control.d.ts +7 -0
  154. package/dist/application-spec/parse-application-files/access/sign-in-control.js +1 -0
  155. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +2 -1
  156. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  157. package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +30 -4
  158. package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
  159. package/dist/application-spec/parse-application-files/categorize/webhook-safety.js +1 -1
  160. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +17 -1
  161. package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
  162. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  163. package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +7 -1
  164. package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
  165. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  166. package/dist/application-spec/parse-application-files/parse-common-admin-spec.js +1 -1
  167. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +3 -2
  168. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -1
  169. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +67 -8
  170. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  171. package/dist/application-spec/parse-application-files/raw-spec/raw-components.js +1 -1
  172. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +12 -3
  173. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  174. package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
  175. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +6 -0
  176. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  177. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
  178. package/dist/application-spec/parse-application-files/spec/model/index.d.ts +2 -1
  179. package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
  180. package/dist/application-spec/parse-application-files/spec/model/session-data-schema.d.ts +5 -2
  181. package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
  182. package/dist/application-spec/parse-application-files/spec/model/session-fields/index.d.ts +1 -0
  183. package/dist/application-spec/parse-application-files/spec/model/session-fields/index.js +1 -0
  184. package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.d.ts +15 -0
  185. package/dist/application-spec/parse-application-files/spec/model/session-fields/session-fields.js +1 -0
  186. package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
  187. package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -1
  188. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
  189. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +14 -2
  190. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -1
  191. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +7 -10
  192. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  193. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +5 -6
  194. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.js +1 -1
  195. package/dist/application-spec/parse-application-files/spec/sections/assistant/index.d.ts +0 -1
  196. package/dist/application-spec/webhook-boundary.js +1 -1
  197. package/dist/client/authenticated-client.d.ts +5 -1
  198. package/dist/client/authenticated-client.js +1 -1
  199. package/dist/client/authorized-client.d.ts +4 -1
  200. package/dist/client/authorized-client.js +1 -1
  201. package/dist/client/base-client.d.ts +15 -1
  202. package/dist/client/base-client.js +1 -1
  203. package/dist/client/cli-client/cli-api-client.d.ts +17 -0
  204. package/dist/client/cli-client/cli-api-client.js +1 -0
  205. package/dist/client/cli-client/index.d.ts +2 -0
  206. package/dist/client/cli-client/index.js +1 -0
  207. package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
  208. package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
  209. package/dist/client/contract.d.ts +53 -10
  210. package/dist/client/contract.js +1 -1
  211. package/dist/client/index.d.ts +2 -1
  212. package/dist/client/index.js +1 -1
  213. package/dist/client/local-authorized-client.d.ts +1 -0
  214. package/dist/client/local-authorized-client.js +1 -1
  215. package/dist/client/memory-authorized-client.d.ts +1 -0
  216. package/dist/client/memory-authorized-client.js +1 -1
  217. package/dist/client/phoenix-api.d.ts +8470 -2127
  218. package/dist/client/unauthenticated-client.d.ts +1 -0
  219. package/dist/client/unauthenticated-client.js +1 -1
  220. package/dist/configurator/ConfiguratorApp.js +1 -1
  221. package/dist/configurator/agent-at-work/AgentAtWorkFallback.d.ts +7 -0
  222. package/dist/configurator/agent-at-work/AgentAtWorkFallback.js +1 -0
  223. package/dist/configurator/agent-at-work/AgentAtWorkPage.d.ts +20 -0
  224. package/dist/configurator/agent-at-work/AgentAtWorkPage.js +1 -0
  225. package/dist/configurator/agent-at-work/AgentModeBadge.d.ts +11 -0
  226. package/dist/configurator/agent-at-work/AgentModeBadge.js +1 -0
  227. package/dist/configurator/agent-at-work/StudioMark.d.ts +8 -0
  228. package/dist/configurator/agent-at-work/StudioMark.js +1 -0
  229. package/dist/configurator/agent-at-work/agent-at-work-copy.d.ts +17 -0
  230. package/dist/configurator/agent-at-work/agent-at-work-copy.js +1 -0
  231. package/dist/configurator/agent-at-work/agent-at-work-styles.d.ts +23 -0
  232. package/dist/configurator/agent-at-work/agent-at-work-styles.js +374 -0
  233. package/dist/configurator/agent-at-work/index.d.ts +3 -0
  234. package/dist/configurator/agent-at-work/index.js +1 -0
  235. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +5 -4
  236. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
  237. package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
  238. package/dist/configurator/application-runtime/extensions/selectors.d.ts +4 -2
  239. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  240. package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.d.ts +14 -0
  241. package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.js +1 -0
  242. package/dist/configurator/application-runtime/extensions/systems/action-system/action-factory.d.ts +13 -0
  243. package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.d.ts +55 -0
  244. package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.js +1 -0
  245. package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +56 -0
  246. package/dist/configurator/application-runtime/extensions/systems/action-system/action.js +1 -0
  247. package/dist/configurator/application-runtime/extensions/systems/action-system/index.d.ts +6 -0
  248. package/dist/configurator/application-runtime/extensions/systems/action-system/index.js +1 -0
  249. package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.d.ts +4 -3
  250. package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.js +2 -2
  251. package/dist/{domain/spec/modules → configurator/application-runtime/extensions/systems/action-system}/resolve-action-modules.d.ts +2 -2
  252. package/dist/configurator/application-runtime/extensions/systems/action-system/resolve-action-modules.js +1 -0
  253. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +14 -8
  254. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.d.ts +18 -0
  255. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.js +1 -0
  256. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.d.ts +69 -0
  257. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.js +1 -0
  258. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +252 -22
  259. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  260. package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +63 -0
  261. package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -0
  262. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +52 -36
  263. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  264. package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.d.ts +13 -0
  265. package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.js +1 -0
  266. package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.d.ts +7 -0
  267. package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.js +1 -0
  268. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +3 -0
  269. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -0
  270. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +33 -0
  271. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +6 -0
  272. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.d.ts +14 -0
  273. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.js +2 -0
  274. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.d.ts +10 -0
  275. package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.js +1 -0
  276. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
  277. package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
  278. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +18 -5
  279. package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
  280. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +8 -1
  281. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  282. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +46 -12
  283. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  284. package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.d.ts +16 -0
  285. package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.js +1 -0
  286. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +26 -0
  287. package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -0
  288. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +25 -8
  289. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -1
  290. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.d.ts +15 -4
  291. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.js +3 -3
  292. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +15 -7
  293. package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
  294. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +8 -3
  295. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  296. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +11 -0
  297. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  298. package/dist/configurator/application-runtime/extensions/systems/sketching-system/sketching-system.d.ts +5 -5
  299. package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
  300. package/dist/configurator/common/configurator-interface.d.ts +21 -9
  301. package/dist/configurator/common/configurator-interface.js +1 -1
  302. package/dist/configurator/index.d.ts +1 -0
  303. package/dist/configurator/index.js +1 -1
  304. package/dist/configurator/{ui/configurator-layout/universal → pages}/ExportingOverlay.d.ts +3 -2
  305. package/dist/configurator/pages/ExportingOverlay.js +1 -0
  306. package/dist/configurator/pages/InertRoot.d.ts +10 -0
  307. package/dist/configurator/pages/InertRoot.js +1 -0
  308. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  309. package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
  310. package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
  311. package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.d.ts +8 -0
  312. package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.js +1 -0
  313. package/dist/configurator/pages/error-boundaries/DevContextFallback.d.ts +4 -2
  314. package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
  315. package/dist/configurator/pages/error-boundaries/DevLoadingFallback.d.ts +6 -4
  316. package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
  317. package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
  318. package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
  319. package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
  320. package/dist/configurator/scene/resources/use-phx-gltf.js +1 -1
  321. package/dist/configurator/scene/scene-entity/materials/LocalCreatedMaterial.js +1 -1
  322. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.d.ts +5 -0
  323. package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
  324. package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.d.ts +27 -0
  325. package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.js +1 -0
  326. package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -1
  327. package/dist/configurator/ui/assistant/AssistantChips.d.ts +78 -6
  328. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  329. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +99 -1
  330. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
  331. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +37 -3
  332. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
  333. package/dist/configurator/ui/assistant/AssistantPanel.d.ts +51 -4
  334. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  335. package/dist/configurator/ui/assistant/AssistantThread.d.ts +85 -2
  336. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  337. package/dist/configurator/ui/assistant/AssistantThreadItemView.d.ts +83 -6
  338. package/dist/configurator/ui/assistant/AssistantThreadItemView.js +1 -1
  339. package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +35 -1
  340. package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -1
  341. package/dist/configurator/ui/assistant/alert/index.d.ts +1 -1
  342. package/dist/configurator/ui/assistant/annotation/AnnotationBadge.d.ts +34 -0
  343. package/dist/configurator/ui/assistant/annotation/AnnotationBadge.js +1 -1
  344. package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.d.ts +2 -3
  345. package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -1
  346. package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -1
  347. package/dist/configurator/ui/assistant/annotation/annotation-layout.d.ts +59 -5
  348. package/dist/configurator/ui/assistant/annotation/annotation-layout.js +1 -1
  349. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +40 -5
  350. package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
  351. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +6 -5
  352. package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
  353. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
  354. package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
  355. package/dist/configurator/ui/assistant/annotation/editor/index.d.ts +1 -0
  356. package/dist/configurator/ui/assistant/annotation/index.d.ts +3 -2
  357. package/dist/configurator/ui/assistant/annotation/index.js +1 -1
  358. package/dist/configurator/ui/assistant/assistant-failure.d.ts +9 -4
  359. package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
  360. package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +49 -5
  361. package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -1
  362. package/dist/configurator/ui/assistant/attachments/index.d.ts +1 -1
  363. package/dist/configurator/ui/assistant/composer/composer-frame.d.ts +7 -2
  364. package/dist/configurator/ui/assistant/composer/composer-frame.js +1 -1
  365. package/dist/configurator/ui/assistant/composer/index.d.ts +1 -1
  366. package/dist/configurator/ui/assistant/composer/index.js +1 -1
  367. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.d.ts +10 -0
  368. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.js +1 -0
  369. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.d.ts +10 -0
  370. package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.js +1 -0
  371. package/dist/configurator/ui/assistant/disclaimer/index.d.ts +2 -0
  372. package/dist/configurator/ui/assistant/disclaimer/index.js +1 -0
  373. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +58 -0
  374. package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -0
  375. package/dist/configurator/ui/assistant/drawing/index.d.ts +2 -0
  376. package/dist/configurator/ui/assistant/drawing/index.js +1 -0
  377. package/dist/configurator/ui/assistant/drawing/parse-drawing.d.ts +18 -0
  378. package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -0
  379. package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +8 -0
  380. package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -0
  381. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +35 -1
  382. package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
  383. package/dist/configurator/ui/assistant/entity-link/index.d.ts +1 -1
  384. package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +59 -2
  385. package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
  386. package/dist/configurator/ui/assistant/form/built-in-form-slots.d.ts +16 -0
  387. package/dist/configurator/ui/assistant/form/built-in-form-slots.js +1 -0
  388. package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
  389. package/dist/configurator/ui/assistant/form/index.d.ts +2 -1
  390. package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +6 -5
  391. package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
  392. package/dist/configurator/ui/assistant/form/read-form-tile.d.ts +8 -0
  393. package/dist/configurator/ui/assistant/form/read-form-tile.js +1 -0
  394. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +6 -3
  395. package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -1
  396. package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +11 -7
  397. package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +1 -1
  398. package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -1
  399. package/dist/configurator/ui/assistant/form/registry/index.d.ts +1 -1
  400. package/dist/configurator/ui/assistant/form/split-form-rows.d.ts +7 -0
  401. package/dist/configurator/ui/assistant/form/split-form-rows.js +1 -0
  402. package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +51 -0
  403. package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -1
  404. package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +47 -0
  405. package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -1
  406. package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +43 -0
  407. package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -1
  408. package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +56 -2
  409. package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -1
  410. package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +43 -0
  411. package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
  412. package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +47 -0
  413. package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
  414. package/dist/configurator/ui/assistant/form-elements/FormTile.d.ts +72 -0
  415. package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -0
  416. package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +27 -0
  417. package/dist/configurator/ui/assistant/form-elements/index.d.ts +8 -9
  418. package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
  419. package/dist/configurator/ui/assistant/image-view/ImageView.d.ts +66 -0
  420. package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -0
  421. package/dist/configurator/ui/assistant/image-view/index.d.ts +1 -0
  422. package/dist/configurator/ui/assistant/image-view/index.js +1 -0
  423. package/dist/configurator/ui/assistant/image-view/use-image-blob.d.ts +7 -0
  424. package/dist/configurator/ui/assistant/image-view/use-image-blob.js +1 -0
  425. package/dist/configurator/ui/assistant/index.d.ts +21 -10
  426. package/dist/configurator/ui/assistant/index.js +1 -1
  427. package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.d.ts +57 -0
  428. package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -0
  429. package/dist/configurator/ui/assistant/panel/index.d.ts +1 -0
  430. package/dist/configurator/ui/assistant/panel/index.js +1 -0
  431. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +43 -1
  432. package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -1
  433. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +4 -1
  434. package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -1
  435. package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -2
  436. package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
  437. package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +49 -2
  438. package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -1
  439. package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
  440. package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
  441. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +34 -0
  442. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
  443. package/dist/configurator/ui/assistant/screenshots/index.d.ts +1 -1
  444. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +2 -6
  445. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
  446. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +5 -6
  447. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
  448. package/dist/configurator/ui/assistant/thread-items.d.ts +17 -3
  449. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  450. package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +32 -7
  451. package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
  452. package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +15 -1
  453. package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -1
  454. package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +3 -3
  455. package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -1
  456. package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts} +1 -1
  457. package/dist/configurator/ui/assistant/use-on-unmount.js +1 -0
  458. package/dist/configurator/ui/assistant/voice/RecordingBar.d.ts +21 -0
  459. package/dist/configurator/ui/assistant/voice/RecordingBar.js +1 -0
  460. package/dist/configurator/ui/assistant/voice/ReplyPlayButton.d.ts +43 -0
  461. package/dist/configurator/ui/assistant/voice/ReplyPlayButton.js +1 -0
  462. package/dist/configurator/ui/assistant/voice/index.d.ts +4 -0
  463. package/dist/configurator/ui/assistant/voice/index.js +1 -0
  464. package/dist/configurator/ui/assistant/voice/use-voice-recording.d.ts +39 -0
  465. package/dist/configurator/ui/assistant/voice/use-voice-recording.js +1 -0
  466. package/dist/configurator/ui/assistant/voice/voice-capture.d.ts +22 -0
  467. package/dist/configurator/ui/assistant/voice/voice-capture.js +1 -0
  468. package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
  469. package/dist/configurator/ui/configurator-layout/index.js +1 -1
  470. package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
  471. package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
  472. package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
  473. package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
  474. package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
  475. package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
  476. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
  477. package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
  478. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
  479. package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
  480. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  481. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  482. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
  483. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  484. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
  485. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
  486. package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
  487. package/dist/configurator/ui/index.d.ts +1 -1
  488. package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
  489. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  490. package/dist/docs/index.json +130 -5
  491. package/dist/docs/integrations/woocommerce/overview.mdx +4 -2
  492. package/dist/docs/layouts/nested-view-controls.mdx +223 -0
  493. package/dist/docs/layouts/presets/custom.mdx +1 -0
  494. package/dist/docs/layouts/preview/always.mdx +22 -0
  495. package/dist/docs/layouts/view-controls.mdx +2 -0
  496. package/dist/docs/other-features/domain-actions.mdx +82 -55
  497. package/dist/docs/other-features/violation-messages.mdx +3 -1
  498. package/dist/docs/phoenix/admin.mdx +25 -64
  499. package/dist/docs/phoenix/application-states.mdx +1 -1
  500. package/dist/docs/phoenix/assistant/actions.mdx +183 -0
  501. package/dist/docs/phoenix/assistant/changing-the-configuration.mdx +333 -0
  502. package/dist/docs/phoenix/assistant/instructions-and-ai-settings.mdx +221 -0
  503. package/dist/docs/phoenix/assistant/overview.mdx +137 -0
  504. package/dist/docs/phoenix/assistant/per-session-setup.mdx +166 -0
  505. package/dist/docs/phoenix/assistant/reading-the-configuration.mdx +349 -0
  506. package/dist/docs/phoenix/assistant/screenshots.mdx +135 -0
  507. package/dist/docs/phoenix/assistant/security-and-limits.mdx +151 -0
  508. package/dist/docs/phoenix/assistant/the-panel.mdx +298 -0
  509. package/dist/docs/phoenix/blender-rendering.mdx +3 -1
  510. package/dist/docs/phoenix/clerk-sign-in.mdx +9 -5
  511. package/dist/docs/phoenix/configurator-interface.mdx +105 -10
  512. package/dist/docs/phoenix/data-sources.mdx +71 -51
  513. package/dist/docs/phoenix/deployments.mdx +3 -3
  514. package/dist/docs/phoenix/finalization.mdx +2 -2
  515. package/dist/docs/phoenix/getting-started.mdx +1 -1
  516. package/dist/docs/phoenix/integration/authentication-external.mdx +5 -5
  517. package/dist/docs/phoenix/integration/authentication-internal.mdx +3 -3
  518. package/dist/docs/phoenix/integration/finalization-internal.mdx +2 -5
  519. package/dist/docs/phoenix/integration/integration-modes-internal.mdx +9 -0
  520. package/dist/docs/phoenix/layout-slots.mdx +2 -2
  521. package/dist/docs/phoenix/localization.mdx +2 -1
  522. package/dist/docs/phoenix/migrations.mdx +1 -1
  523. package/dist/docs/phoenix/phoenix-cli.mdx +100 -60
  524. package/dist/docs/phoenix/project-structure.mdx +30 -15
  525. package/dist/docs/phoenix/publishing.mdx +21 -28
  526. package/dist/docs/phoenix/sdk-builder-workflow.mdx +61 -30
  527. package/dist/docs/phoenix/sessions-and-access.mdx +180 -153
  528. package/dist/docs/phoenix/sharing.mdx +1 -1
  529. package/dist/docs/phoenix/theming.mdx +5 -9
  530. package/dist/docs/phoenix/webhook-membership.mdx +4 -1
  531. package/dist/docs/phoenix/webhooks.mdx +449 -296
  532. package/dist/docs/ux-guidelines/choosing-navigation.mdx +2 -0
  533. package/dist/docs/ux-guidelines/designing-the-configuration-journey.mdx +43 -0
  534. package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
  535. package/dist/docs/ux-guidelines/overview.mdx +11 -9
  536. package/dist/domain/admin-domain/index.d.ts +2 -2
  537. package/dist/domain/application/access/access-handlers.d.ts +19 -0
  538. package/dist/domain/application/access/access-handlers.js +1 -0
  539. package/dist/domain/application/access/anonymous-handler.d.ts +16 -0
  540. package/dist/domain/application/access/anonymous-handler.js +1 -0
  541. package/dist/domain/application/access/chunk-scopes-handler.d.ts +27 -0
  542. package/dist/domain/application/access/chunk-scopes-handler.js +1 -0
  543. package/dist/domain/application/access/code-handler.d.ts +16 -0
  544. package/dist/domain/application/access/code-handler.js +1 -0
  545. package/dist/domain/application/access/index.d.ts +7 -0
  546. package/dist/domain/application/access/index.js +1 -0
  547. package/dist/domain/application/access/refresh-handler.d.ts +16 -0
  548. package/dist/domain/application/access/refresh-handler.js +1 -0
  549. package/dist/domain/application/access/signed-in-handler.d.ts +44 -0
  550. package/dist/domain/application/access/signed-in-handler.js +1 -0
  551. package/dist/domain/application/access/visitor-handler.d.ts +23 -0
  552. package/dist/domain/application/access/visitor-handler.js +1 -0
  553. package/dist/domain/application/application-config.d.ts +37 -1
  554. package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
  555. package/dist/domain/application/assistant/assistant-exposure.js +1 -0
  556. package/dist/domain/application/assistant/assistant-selection.d.ts +30 -0
  557. package/dist/domain/application/assistant/assistant-selection.js +1 -0
  558. package/dist/domain/application/assistant/build-assistant-lenses.js +4 -4
  559. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +2 -2
  560. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  561. package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +18 -2
  562. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  563. package/dist/domain/application/assistant/index.d.ts +5 -1
  564. package/dist/domain/application/assistant/index.js +1 -1
  565. package/dist/domain/application/assistant/prepare-assistant-navigation-updates.d.ts +16 -0
  566. package/dist/domain/application/assistant/prepare-assistant-navigation-updates.js +1 -0
  567. package/dist/domain/application/assistant/read-assistant-navigation.d.ts +40 -0
  568. package/dist/domain/application/assistant/read-assistant-navigation.js +1 -0
  569. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  570. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +30 -2
  571. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  572. package/dist/domain/application/assistant/session-setup/assistant-takes-images.d.ts +7 -0
  573. package/dist/domain/application/assistant/session-setup/assistant-takes-images.js +1 -0
  574. package/dist/domain/application/assistant/session-setup/index.d.ts +1 -0
  575. package/dist/domain/application/assistant/session-setup/index.js +1 -1
  576. package/dist/domain/application/assistant-field-options.d.ts +2 -0
  577. package/dist/domain/application/assistant-field-options.js +1 -1
  578. package/dist/domain/application/assistant-mutations.d.ts +17 -11
  579. package/dist/domain/application/assistant-mutations.js +1 -1
  580. package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
  581. package/dist/domain/application/assistant-recipe-groups.js +1 -1
  582. package/dist/domain/application/configurator-builder.d.ts +47 -37
  583. package/dist/domain/application/configurator-builder.js +1 -1
  584. package/dist/domain/application/index.d.ts +2 -1
  585. package/dist/domain/application/index.js +1 -1
  586. package/dist/domain/application/standard-properties.d.ts +1 -1
  587. package/dist/domain/application/standard-properties.js +1 -1
  588. package/dist/domain/available-system-components/available-system-components.d.ts +1 -1
  589. package/dist/domain/available-system-components/available-system-components.js +1 -1
  590. package/dist/domain/core/action/action.d.ts +0 -49
  591. package/dist/domain/core/action/index.d.ts +0 -1
  592. package/dist/domain/core/action/index.js +1 -1
  593. package/dist/domain/core/component/system-component-filter.d.ts +1 -0
  594. package/dist/domain/core/component/system-component-filter.js +1 -1
  595. package/dist/domain/core/component/view-state-component.d.ts +4 -3
  596. package/dist/domain/core/component/view-state-component.js +1 -1
  597. package/dist/domain/core/domain-factory.d.ts +8 -3
  598. package/dist/domain/core/domain-factory.js +1 -1
  599. package/dist/domain/core/fit-session-data.d.ts +16 -0
  600. package/dist/domain/core/fit-session-data.js +1 -0
  601. package/dist/domain/core/index.d.ts +1 -1
  602. package/dist/domain/core/index.js +1 -1
  603. package/dist/domain/core/invariant/control-violation-hints.d.ts +37 -0
  604. package/dist/domain/core/invariant/control-violation-hints.js +1 -0
  605. package/dist/domain/core/invariant/index.d.ts +1 -0
  606. package/dist/domain/core/invariant/index.js +1 -1
  607. package/dist/domain/domain-builder/domain-builder.d.ts +1 -6
  608. package/dist/domain/domain-builder/domain-builder.js +1 -1
  609. package/dist/domain/domain-context/domain-context-systems.d.ts +3 -5
  610. package/dist/domain/domain-context/index.d.ts +0 -1
  611. package/dist/domain/domain-context/index.js +1 -1
  612. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
  613. package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
  614. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  615. package/dist/domain/domain-runtime/domain-context/actions.d.ts +4 -0
  616. package/dist/domain/domain-runtime/domain-context/actions.js +1 -1
  617. package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +9 -1
  618. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  619. package/dist/domain/domain-runtime/domain-context/index.d.ts +0 -1
  620. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +6 -4
  621. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  622. package/dist/domain/domain-runtime/domain-context/types.d.ts +8 -4
  623. package/dist/domain/domain-runtime/domain-runtime.d.ts +27 -13
  624. package/dist/domain/domain-runtime/domain-runtime.js +1 -1
  625. package/dist/domain/domain-runtime/environment/actions.d.ts +1 -0
  626. package/dist/domain/domain-runtime/environment/actions.js +1 -1
  627. package/dist/domain/domain-runtime/environment/initialize.js +1 -1
  628. package/dist/domain/domain-runtime/environment/selectors.d.ts +2 -0
  629. package/dist/domain/domain-runtime/environment/selectors.js +1 -1
  630. package/dist/domain/domain-runtime/environment/types.d.ts +6 -0
  631. package/dist/domain/domain-runtime/spec/index.d.ts +0 -1
  632. package/dist/domain/domain-runtime/spec/index.js +1 -1
  633. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  634. package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
  635. package/dist/domain/domain-runtime/spec/types.d.ts +12 -10
  636. package/dist/domain/extensions/assistant/assistant-greeting.d.ts +30 -0
  637. package/dist/domain/extensions/assistant/assistant-greeting.js +1 -0
  638. package/dist/domain/extensions/assistant/index.d.ts +1 -0
  639. package/dist/domain/extensions/assistant/index.js +1 -0
  640. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +5 -4
  641. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
  642. package/dist/domain/extensions/index.d.ts +1 -1
  643. package/dist/domain/extensions/index.js +1 -1
  644. package/dist/domain/index.d.ts +1 -1
  645. package/dist/domain/index.js +1 -1
  646. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +13 -6
  647. package/dist/domain/spec/expressions/relation-expression-params.d.ts +1 -1
  648. package/dist/domain/spec/modules/index.d.ts +0 -1
  649. package/dist/domain/spec/modules/index.js +1 -1
  650. package/dist/domain/spec/phx/phx-domain.d.ts +0 -1
  651. package/dist/domain/spec/phx/phx-domain.js +1 -1
  652. package/dist/domain/spec/runtime/application-spec-slice.d.ts +5 -5
  653. package/dist/domain/spec/runtime/application-spec-slice.js +1 -1
  654. package/dist/domain/spec/runtime/create-application.d.ts +5 -2
  655. package/dist/domain/spec/runtime/create-application.js +1 -1
  656. package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +2 -2
  657. package/dist/domain/spec/sections/actions.d.ts +3 -2
  658. package/dist/domain/spec/sections/app-metadata.d.ts +13 -0
  659. package/dist/domain/spec/sections/assistant/assistant-features.d.ts +13 -0
  660. package/dist/domain/spec/sections/assistant/assistant-features.js +1 -0
  661. package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +35 -2
  662. package/dist/domain/spec/sections/assistant/assistant-navigation.d.ts +21 -0
  663. package/dist/domain/spec/sections/assistant/assistant-navigation.js +1 -0
  664. package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +55 -13
  665. package/dist/domain/spec/sections/assistant/assistant-select.d.ts +12 -0
  666. package/dist/domain/spec/sections/assistant/assistant-select.js +1 -0
  667. package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +10 -26
  668. package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -1
  669. package/dist/domain/spec/sections/assistant/index.d.ts +5 -2
  670. package/dist/domain/system-components/index.d.ts +1 -0
  671. package/dist/domain/system-components/index.js +1 -1
  672. package/dist/domain/system-components/navigation/index.d.ts +1 -0
  673. package/dist/domain/system-components/navigation/index.js +1 -0
  674. package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
  675. package/dist/domain/system-components/navigation/view-controls.js +1 -0
  676. package/dist/editor/Editor.d.ts +5 -0
  677. package/dist/editor/Editor.js +1 -1
  678. package/dist/editor/EditorMode.d.ts +2 -0
  679. package/dist/editor/EditorMode.js +1 -1
  680. package/dist/editor/agent-mode/AgentModeBridge.d.ts +10 -0
  681. package/dist/editor/agent-mode/AgentModeBridge.js +1 -0
  682. package/dist/editor/agent-mode/agent-at-work-fonts.d.ts +2 -0
  683. package/dist/editor/agent-mode/agent-at-work-fonts.js +1 -0
  684. package/dist/editor/console-reporter/BrowserConsoleReporter.js +1 -1
  685. package/dist/editor/console-reporter/console-capture.d.ts +20 -0
  686. package/dist/editor/console-reporter/console-capture.js +1 -0
  687. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  688. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  689. package/dist/editor/domain-editors/use-implementation-files.d.ts +4 -3
  690. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  691. package/dist/editor/index.d.ts +1 -0
  692. package/dist/editor/index.js +1 -1
  693. package/dist/editor/variants/VariantAnswerFooter.d.ts +8 -1
  694. package/dist/editor/variants/VariantAnswerFooter.js +1 -1
  695. package/dist/editor/variants/VariantPageUnavailable.d.ts +5 -0
  696. package/dist/editor/variants/VariantPageUnavailable.js +1 -0
  697. package/dist/editor/variants/VariantPreviewHandler.js +1 -1
  698. package/dist/editor/variants/variant-preview-fonts.d.ts +2 -0
  699. package/dist/editor/variants/variant-preview-fonts.js +1 -0
  700. package/dist/editor/variants/variant-preview-styles.d.ts +40 -48
  701. package/dist/editor/variants/variant-preview-styles.js +493 -1
  702. package/dist/extras/clerk/index.d.ts +6 -0
  703. package/dist/extras/cognito/AccountAvatar.d.ts +7 -0
  704. package/dist/extras/cognito/AccountAvatar.js +1 -0
  705. package/dist/extras/cognito/AccountControl.d.ts +13 -0
  706. package/dist/extras/cognito/AccountControl.js +1 -0
  707. package/dist/extras/cognito/AdminSignInPage.d.ts +26 -0
  708. package/dist/extras/cognito/AdminSignInPage.js +1 -0
  709. package/dist/extras/cognito/CognitoSignInPage.d.ts +8 -0
  710. package/dist/extras/cognito/CognitoSignInPage.js +1 -0
  711. package/dist/extras/cognito/ConfiguratorSignInPage.d.ts +19 -0
  712. package/dist/extras/cognito/ConfiguratorSignInPage.js +1 -0
  713. package/dist/extras/cognito/SignInFailurePage.d.ts +11 -0
  714. package/dist/extras/cognito/SignInFailurePage.js +1 -0
  715. package/dist/extras/cognito/SignInGateLayout.d.ts +25 -0
  716. package/dist/extras/cognito/SignInGateLayout.js +1 -0
  717. package/dist/extras/cognito/SignInNotice.d.ts +8 -0
  718. package/dist/extras/cognito/SignInNotice.js +1 -0
  719. package/dist/extras/cognito/index.d.ts +5 -0
  720. package/dist/extras/cognito/index.js +1 -0
  721. package/dist/globals/index.d.ts +5 -0
  722. package/dist/i18n/locales/cs/messages.js +1 -1
  723. package/dist/i18n/locales/da/messages.js +1 -1
  724. package/dist/i18n/locales/de/messages.js +1 -1
  725. package/dist/i18n/locales/de-AT/messages.js +1 -1
  726. package/dist/i18n/locales/en/messages.js +1 -1
  727. package/dist/i18n/locales/en-AU/messages.js +1 -1
  728. package/dist/i18n/locales/en-GB/messages.js +1 -1
  729. package/dist/i18n/locales/es/messages.js +1 -1
  730. package/dist/i18n/locales/fr/messages.js +1 -1
  731. package/dist/i18n/locales/hu/messages.js +1 -1
  732. package/dist/i18n/locales/it/messages.js +1 -1
  733. package/dist/i18n/locales/nl/messages.js +1 -1
  734. package/dist/i18n/locales/pl/messages.js +1 -1
  735. package/dist/i18n/locales/pt/messages.js +1 -1
  736. package/dist/i18n/locales/ro/messages.js +1 -1
  737. package/dist/i18n/locales/sk/messages.js +1 -1
  738. package/dist/i18n/locales/tr/messages.js +1 -1
  739. package/dist/legacy/deployment-cli/commands/create-environment.js +1 -1
  740. package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
  741. package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
  742. package/dist/legacy/domain-cli/gen/configurator-builder.js +5 -4
  743. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  744. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  745. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +25 -3
  746. package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
  747. package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
  748. package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
  749. package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
  750. package/dist/legacy/webhook-cli/lib/webhook-boundary.js +1 -1
  751. package/dist/phoenix/application-spec/application-spec-builder.d.ts +2 -2
  752. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  753. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +2 -1
  754. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  755. package/dist/phoenix/application-spec/generate-project-files.d.ts +4 -3
  756. package/dist/phoenix/application-spec/generate-project-files.js +1 -1
  757. package/dist/phoenix/application-spec/index.d.ts +2 -1
  758. package/dist/phoenix/application-spec/index.js +1 -1
  759. package/dist/phoenix/application-spec/read-spec-project.d.ts +1 -2
  760. package/dist/phoenix/application-spec/read-spec-project.js +1 -1
  761. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +10 -2
  762. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  763. package/dist/phoenix/cli.js +1 -1
  764. package/dist/phoenix/commands/account/index.d.ts +1 -0
  765. package/dist/phoenix/commands/account/index.js +1 -0
  766. package/dist/phoenix/commands/account/whoami.d.ts +10 -0
  767. package/dist/phoenix/commands/account/whoami.js +4 -0
  768. package/dist/phoenix/commands/build.d.ts +2 -1
  769. package/dist/phoenix/commands/build.js +1 -1
  770. package/dist/phoenix/commands/clean.d.ts +2 -1
  771. package/dist/phoenix/commands/clean.js +1 -1
  772. package/dist/phoenix/commands/cleanup-environment.js +1 -1
  773. package/dist/phoenix/commands/deploy.d.ts +7 -2
  774. package/dist/phoenix/commands/deploy.js +9 -3
  775. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  776. package/dist/phoenix/commands/deps/deps.js +2 -2
  777. package/dist/phoenix/commands/dev.d.ts +2 -1
  778. package/dist/phoenix/commands/dev.js +4 -4
  779. package/dist/phoenix/commands/feedback.d.ts +2 -2
  780. package/dist/phoenix/commands/feedback.js +1 -1
  781. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  782. package/dist/phoenix/commands/index.d.ts +1 -0
  783. package/dist/phoenix/commands/index.js +1 -1
  784. package/dist/phoenix/commands/init-starter-spec.js +3 -4
  785. package/dist/phoenix/commands/init.d.ts +2 -2
  786. package/dist/phoenix/commands/init.js +1 -1
  787. package/dist/phoenix/commands/login.d.ts +6 -3
  788. package/dist/phoenix/commands/login.js +3 -3
  789. package/dist/phoenix/commands/logout.js +1 -1
  790. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  791. package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
  792. package/dist/phoenix/commands/sync.d.ts +2 -1
  793. package/dist/phoenix/commands/sync.js +1 -1
  794. package/dist/phoenix/services/application-spec-project-watcher.d.ts +3 -1
  795. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  796. package/dist/phoenix/services/cli-credentials.d.ts +26 -7
  797. package/dist/phoenix/services/cli-credentials.js +2 -2
  798. package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
  799. package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
  800. package/dist/phoenix/services/cli-server/index.d.ts +2 -0
  801. package/dist/phoenix/services/cli-server/index.js +1 -0
  802. package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +19 -0
  803. package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
  804. package/dist/phoenix/services/dev-experience/dev-experience.d.ts +31 -0
  805. package/dist/phoenix/services/dev-experience/dev-experience.js +1 -0
  806. package/dist/phoenix/services/dev-experience/index.d.ts +3 -0
  807. package/dist/phoenix/services/dev-experience/index.js +1 -0
  808. package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.d.ts +7 -0
  809. package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.js +1 -0
  810. package/dist/phoenix/services/dev-experience/regenerated-page-experience.d.ts +24 -0
  811. package/dist/phoenix/services/dev-experience/regenerated-page-experience.js +1 -0
  812. package/dist/phoenix/services/development-credential.js +1 -1
  813. package/dist/phoenix/services/frontend-config.d.ts +2 -0
  814. package/dist/phoenix/services/index.d.ts +6 -3
  815. package/dist/phoenix/services/index.js +1 -1
  816. package/dist/phoenix/services/phoenix-pubsub.d.ts +4 -0
  817. package/dist/phoenix/services/phoenix-regions.d.ts +6 -1
  818. package/dist/phoenix/services/phoenix-regions.js +1 -1
  819. package/dist/phoenix/services/prepare-development-environment.js +2 -2
  820. package/dist/phoenix/services/session/phoenix-application.d.ts +2 -1
  821. package/dist/phoenix/services/session/phoenix-application.js +2 -2
  822. package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
  823. package/dist/phoenix/services/signed-in-development-environment.js +1 -1
  824. package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
  825. package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
  826. package/dist/phoenix/services/spec-project/index.d.ts +3 -0
  827. package/dist/phoenix/services/spec-project/index.js +1 -0
  828. package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
  829. package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
  830. package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
  831. package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
  832. package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
  833. package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
  834. package/dist/phoenix/services/telemetry/telemetry-event.js +1 -1
  835. package/dist/phoenix/services/telemetry/telemetry-state.d.ts +1 -1
  836. package/dist/phoenix/services/telemetry/telemetry-state.js +1 -1
  837. package/dist/phoenix/services/variant-file-session.js +1 -1
  838. package/dist/phoenix/services/vite-config.d.ts +2 -1
  839. package/dist/phoenix/services/vite-config.js +1 -1
  840. package/dist/phoenix/services/webhook-service/transport.js +1 -1
  841. package/dist/react-sdk/application-runtime/common-services/index.d.ts +1 -0
  842. package/dist/react-sdk/application-runtime/common-services/index.js +1 -1
  843. package/dist/react-sdk/application-runtime/common-services/selectors.d.ts +2 -0
  844. package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
  845. package/dist/react-sdk/application-runtime/common-services/webmcp/index.d.ts +3 -0
  846. package/dist/react-sdk/application-runtime/common-services/webmcp/index.js +1 -0
  847. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.d.ts +35 -0
  848. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.js +1 -0
  849. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.d.ts +44 -0
  850. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.js +1 -0
  851. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.d.ts +24 -0
  852. package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.js +1 -0
  853. package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.d.ts +7 -1
  854. package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.js +1 -1
  855. package/dist/react-sdk/application-runtime/domain-application-context/configuration-persist-system.d.ts +6 -0
  856. package/dist/react-sdk/application-runtime/domain-application-context/configuration-persist-system.js +1 -1
  857. package/dist/react-sdk/application-runtime/domain-application-context/domain-application-systems.d.ts +2 -2
  858. package/dist/react-sdk/application-runtime/domain-application-context/selectors.d.ts +1 -3
  859. package/dist/react-sdk/application-runtime/domain-application-context/selectors.js +1 -1
  860. package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
  861. package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
  862. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +2 -0
  863. package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -1
  864. package/dist/react-sdk/application-runtime/hooks/use-environment.d.ts +7 -0
  865. package/dist/react-sdk/application-runtime/hooks/use-environment.js +1 -1
  866. package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
  867. package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.d.ts +7 -0
  868. package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.js +1 -0
  869. package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +2 -2
  870. package/dist/react-sdk/application-runtime/integration/integration-mode.d.ts +30 -0
  871. package/dist/react-sdk/application-runtime/integration/integration-mode.js +1 -1
  872. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  873. package/dist/react-sdk/application-runtime/responsive/actions.d.ts +6 -0
  874. package/dist/react-sdk/application-runtime/responsive/actions.js +1 -1
  875. package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -1
  876. package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -1
  877. package/dist/react-sdk/application-runtime/responsive/types.d.ts +9 -0
  878. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +48 -18
  879. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  880. package/dist/react-sdk/application-runtime/session/actions.d.ts +2 -1
  881. package/dist/react-sdk/application-runtime/session/actions.js +1 -1
  882. package/dist/react-sdk/application-runtime/session/initialize.js +1 -1
  883. package/dist/react-sdk/application-runtime/session/selectors.d.ts +2 -0
  884. package/dist/react-sdk/application-runtime/session/selectors.js +1 -1
  885. package/dist/react-sdk/application-runtime/session/session-service.d.ts +34 -1
  886. package/dist/react-sdk/application-runtime/session/session-service.js +1 -1
  887. package/dist/react-sdk/application-runtime/session/session-token.d.ts +8 -0
  888. package/dist/react-sdk/application-runtime/session/session-token.js +1 -1
  889. package/dist/react-sdk/application-runtime/session/types.d.ts +6 -1
  890. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -2
  891. package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +1 -1
  892. package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
  893. package/dist/react-sdk/domain-context/index.d.ts +3 -2
  894. package/dist/react-sdk/domain-context/index.js +1 -1
  895. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +1 -5
  896. package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -1
  897. package/dist/react-sdk/domain-context/system-hooks/generate-share-link.d.ts +25 -0
  898. package/dist/react-sdk/domain-context/system-hooks/generate-share-link.js +1 -0
  899. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
  900. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  901. package/dist/react-sdk/preset-selection/PresetSelectionProvider.d.ts +11 -0
  902. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
  903. package/dist/react-sdk/preset-selection/PresetWebMcpTools.d.ts +14 -0
  904. package/dist/react-sdk/preset-selection/PresetWebMcpTools.js +1 -0
  905. package/dist/react-sdk/preset-selection/index.d.ts +2 -1
  906. package/dist/react-sdk/preset-selection/index.js +1 -1
  907. package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.d.ts +31 -0
  908. package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.js +1 -0
  909. package/dist/react-sdk/session/AccessDeniedAdminPage.d.ts +13 -0
  910. package/dist/react-sdk/session/AccessDeniedAdminPage.js +1 -0
  911. package/dist/react-sdk/session/AccessDeniedPage.d.ts +20 -0
  912. package/dist/react-sdk/session/AccessDeniedPage.js +1 -0
  913. package/dist/react-sdk/session/ConfiguratorUnavailablePage.d.ts +5 -0
  914. package/dist/react-sdk/session/ConfiguratorUnavailablePage.js +1 -0
  915. package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
  916. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  917. package/dist/react-sdk/session/index.d.ts +3 -0
  918. package/dist/react-sdk/session/index.js +1 -1
  919. package/dist/react-sdk/session/sign-in-address.d.ts +13 -0
  920. package/dist/react-sdk/session/sign-in-address.js +1 -0
  921. package/dist/react-sdk/session/studio-frame.d.ts +7 -0
  922. package/dist/react-sdk/session/studio-frame.js +1 -0
  923. package/dist/react-sdk/session/use-sign-in.d.ts +50 -0
  924. package/dist/react-sdk/session/use-sign-in.js +1 -0
  925. package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
  926. package/dist/ui-sdk/components/preview/Preview.js +2 -2
  927. package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +3 -2
  928. package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
  929. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
  930. package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
  931. package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
  932. package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
  933. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
  934. package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
  935. package/dist/ui-sdk/icons/__generated/Microphone.d.ts +3 -0
  936. package/dist/ui-sdk/icons/__generated/Microphone.js +1 -0
  937. package/dist/ui-sdk/icons/__generated/MicrophoneSlash.d.ts +3 -0
  938. package/dist/ui-sdk/icons/__generated/MicrophoneSlash.js +1 -0
  939. package/dist/ui-sdk/icons/__generated/SpeakerHigh.d.ts +3 -0
  940. package/dist/ui-sdk/icons/__generated/SpeakerHigh.js +1 -0
  941. package/dist/ui-sdk/icons/__generated/SpeakerSlash.d.ts +3 -0
  942. package/dist/ui-sdk/icons/__generated/SpeakerSlash.js +1 -0
  943. package/dist/ui-sdk/icons/__generated/Stop.d.ts +3 -0
  944. package/dist/ui-sdk/icons/__generated/Stop.js +1 -0
  945. package/dist/ui-sdk/icons/__generated/index.d.ts +10 -0
  946. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  947. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  948. package/dist/ui-sdk/theme/types.d.ts +0 -4
  949. package/dist/webhook/builders/auth-handler-builder.d.ts +24 -1
  950. package/dist/webhook/builders/auth-handler-builder.js +1 -1
  951. package/dist/webhook/builders/common.d.ts +14 -3
  952. package/dist/webhook/builders/webhook-builder.d.ts +18 -0
  953. package/dist/webhook/builders/webhook-builder.js +1 -1
  954. package/package.json +11 -4
  955. package/schema/domain-spec.json +444 -65
  956. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.d.ts +0 -2
  957. package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.js +0 -1
  958. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +0 -2
  959. package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +0 -25
  960. package/dist/configurator/ui/assistant/annotation/annotation-host-context.d.ts +0 -5
  961. package/dist/configurator/ui/assistant/annotation/annotation-host-context.js +0 -1
  962. package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +0 -1
  963. package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -9
  964. package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
  965. package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -10
  966. package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
  967. package/dist/configurator/ui/assistant/theme.d.ts +0 -2
  968. package/dist/configurator/ui/assistant/theme.js +0 -1
  969. package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +0 -1
  970. package/dist/domain/core/action/action-factory.d.ts +0 -11
  971. package/dist/domain/domain-context/action-system/action-system.d.ts +0 -38
  972. package/dist/domain/domain-context/action-system/action-system.js +0 -1
  973. package/dist/domain/domain-context/action-system/index.d.ts +0 -1
  974. package/dist/domain/domain-context/action-system/index.js +0 -1
  975. package/dist/domain/domain-runtime/domain-context/action-context.d.ts +0 -11
  976. package/dist/domain/extensions/view-controls.d.ts +0 -25
  977. package/dist/domain/extensions/view-controls.js +0 -1
  978. package/dist/domain/spec/modules/resolve-action-modules.js +0 -1
  979. /package/dist/{domain/domain-runtime/domain-context/action-context.js → application-spec/parse-application-files/access/analyzed-file.js} +0 -0
  980. /package/dist/{domain/core/action → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
@@ -2,6 +2,8 @@
2
2
 
3
3
  Choose navigation from the structure of the user's decisions, not from the desired visual treatment.
4
4
 
5
+ First establish how buyers construct and modify the product with [Designing the configuration journey](?path=/docs/ux-guidelines-designing-the-configuration-journey--docs). Navigation supports that approach.
6
+
5
7
  ## Compare navigation patterns
6
8
 
7
9
  | Pattern | Use when |
@@ -0,0 +1,43 @@
1
+ # Designing the configuration journey
2
+
3
+ Help buyers understand and configure the product: determine how it is structured, the order in which users make decisions, how those decisions are displayed and how users interact with the configurator.
4
+
5
+ ## Identify the decisions that shape the product
6
+
7
+ Identify the product structure: what it is composed of; which parts are required, optional or repeatable; how they fit spatially; their relationships; and the constraints that affect the experience.
8
+
9
+ ## Establish the flow
10
+
11
+ Establish what users can directly configure, then a logical order for their choices. Each product is unique, but the following is a useful starting point:
12
+
13
+ 1. **The space the product will occupy.** When relevant, this tends to be a hard constraint: cabinets for an alcove need to fit. Many products do not need this.
14
+ 2. **Structural choices.** Anything that changes the overall structure: modules, dimensions and structural components.
15
+ 3. **Accessories, extras and attachments with visual impact.** Users need to understand where these are located and how they look.
16
+ 4. **Aesthetics.** Finishes, colors, materials and fabrics.
17
+ 5. **Other extras without visual impact.** Add-ons for which placement is not relevant, such as items ordered separately.
18
+
19
+ These do not always need separate steps or tabs. Split them only when it makes sense, and combine or reorder them when appropriate. For example, users might add a module and configure all its relevant properties, including color and accessories, at that point.
20
+
21
+ For products composed of multiple parts, also consider how users add, place, select, modify and remove them. Make clear whether a change affects one part or the whole product. When a constraint prevents a choice or causes an automatic adjustment, users need to understand what happened and what they can do next.
22
+
23
+ ## Consider where interactions and information belong
24
+
25
+ ### Scene versus controls
26
+
27
+ For each main action, choose the place where buyers can most clearly understand its target and effect. Configurators have a 3D scene and a 2D interface; selecting a part in the scene does not by itself make construction spatial. For actions tied to a position, prefer a control at that position: adding a neighboring module at an exposed edge, or stacking one above a column. This makes the destination visible before the action. Drag-and-drop can be useful for moving components when the task benefits from direct placement. The scene also helps communicate positional or dimensional information, such as dimensions and the location of specific components.
28
+
29
+ Choosing a destination and choosing an option can be separate interactions. For example, an add control above a column can open a menu of compatible module sizes; selecting one adds it at that location and makes it the editing target. Several size choices do not by themselves require moving the construction action into a permanent panel.
30
+
31
+ The 2D interface suits properties that do not belong to a specific position in the scene, more complex choices such as swatches or cards with many options, and information about what has been selected, such as a list of modules. It can also provide controls for editing a selected part. A panel or list may work better for obscured targets, dense arrangements or actions that need more explanation. Evaluate that tradeoff against the task rather than inheriting the placement from the existing layout.
32
+
33
+ ### Context
34
+
35
+ Context is especially important for complex configurators with many options. Display the information users need for what they are doing. Some information may be relevant only on a specific step or tab, or when a particular part is selected.
36
+
37
+ Consider navigation and selection together, so users have the information they need without being overwhelmed. Keep scene actions contextual so they do not obscure the product or compete with camera gestures. Check that targets remain discoverable and usable on a phone; a complementary list can help without moving every construction action out of the scene.
38
+
39
+ Different arrangements of panels can support the same interactions. When considering alternative ways to configure a product, look at how they change the task itself: the actions users take, the clarity of placement and how easily they can correct a choice. Trying a typical task through the controls, including a constraint case, reveals problems that screenshots or product-rule tests alone cannot show. Consider both desktop and phone use.
40
+
41
+ ## Related reading
42
+
43
+ Use [Choosing Navigation](?path=/docs/ux-guidelines-choosing-navigation--docs) to group and order decisions, [Choosing a Control](?path=/docs/ux-guidelines-choosing-a-control--docs) for individual inputs, and [Canvas and Feedback](?path=/docs/ux-guidelines-canvas-and-feedback--docs) for selection and scene behavior. [Presets](?path=/docs/ux-guidelines-presets--docs) covers starting arrangements.
@@ -9,7 +9,7 @@ Modes remove controls that do not apply to the user's current task. Treat each m
9
9
  | Footer | Only when edits affect price | Price only, when relevant | Finalization actions | Hidden |
10
10
  | Selection and scene FABs | Selection remains available | Disabled | Disabled | Disabled |
11
11
  | Tool controls | Hidden | Hidden | Hidden | Hidden |
12
- | View controls | Hidden | When relevant | When relevant | Desktop only |
12
+ | View controls | Hidden | When relevant | When relevant | Desktop; nested on mobile |
13
13
  | Undo and redo | Project-dependent | Hidden | Hidden | Hidden |
14
14
  | Exit | Explicit focus exit | Not applicable | Navigation-owned | Explicit full-screen exit |
15
15
 
@@ -35,6 +35,6 @@ Use [Choosing Navigation](?path=/docs/ux-guidelines-choosing-navigation--docs#su
35
35
  - The recommended full-screen toolbar contains exit, change measure, language, and reset camera when those actions apply. Do not include undo/redo or sharing.
36
36
  - Treat full-screen preview as view-only: filter project-defined preset navigation and footer content, selectable geometry, and scene FABs out of full-screen mode, including when the user enters with an active selection.
37
37
 
38
- On desktop, Phoenix hides its built-in header, sidebar, and tool controls in full-screen mode while keeping view controls available. On mobile, it also hides view controls. Both layouts keep the 3D model, camera interaction, and a reduced toolbar.
38
+ On desktop, Phoenix hides its built-in header, sidebar, and tool controls in full-screen mode while keeping view controls available. On mobile, fullscreen hides flat view controls and keeps nested view menus available. Both layouts keep the 3D model, camera interaction, and a reduced toolbar.
39
39
 
40
40
  “Full-screen preview” here means the in-configurator viewing mode, not the host integration's full-screen widget placement.
@@ -6,24 +6,26 @@ The guidelines describe decisions and behavior that a project can apply. Built-i
6
6
 
7
7
  ## How to use the guidelines
8
8
 
9
- 1. Choose the project's navigation, interaction modes, controls, and finalization flow before implementing individual screens.
9
+ 1. Establish the configuration journey, then choose navigation, interaction modes, controls and any finalization flow that serves its outcome.
10
10
  2. Read the relevant pattern pages and linked component examples.
11
11
  3. Reference the applicable guideline page or section in acceptance criteria and reviews. Mark guidance that does not apply rather than silently skipping it.
12
12
  4. Record intentional project-specific deviations with their reason.
13
13
 
14
14
  ## Find the right guidance
15
15
 
16
- | Designing | Start with |
17
- | --------------------------------------------------- | -------------------------------------------------------------------------- |
18
- | The preset entry screen | [Presets](?path=/docs/ux-guidelines-presets--docs) |
19
- | Simple navigation, tabs, or an ordered flow | [Choosing Navigation](?path=/docs/ux-guidelines-choosing-navigation--docs) |
20
- | Focus, view-only, summary, or full-screen behavior | [Interaction Modes](?path=/docs/ux-guidelines-interaction-modes--docs) |
21
- | A selector or dimension input | [Choosing a Control](?path=/docs/ux-guidelines-choosing-a-control--docs) |
22
- | Canvas appearance, camera behavior, or selection | [Canvas and Feedback](?path=/docs/ux-guidelines-canvas-and-feedback--docs) |
23
- | Submission, add-to-cart, or another completion flow | [Finalization](?path=/docs/phoenix-finalization--docs) |
16
+ | Designing | Start with |
17
+ | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
18
+ | How buyers construct and modify the product | [Designing the configuration journey](?path=/docs/ux-guidelines-designing-the-configuration-journey--docs) |
19
+ | The preset entry screen | [Presets](?path=/docs/ux-guidelines-presets--docs) |
20
+ | Simple navigation, tabs, or an ordered flow | [Choosing Navigation](?path=/docs/ux-guidelines-choosing-navigation--docs) |
21
+ | Focus, view-only, summary, or full-screen behavior | [Interaction Modes](?path=/docs/ux-guidelines-interaction-modes--docs) |
22
+ | A selector or dimension input | [Choosing a Control](?path=/docs/ux-guidelines-choosing-a-control--docs) |
23
+ | Canvas appearance, camera behavior, or selection | [Canvas and Feedback](?path=/docs/ux-guidelines-canvas-and-feedback--docs) |
24
+ | Submission, add-to-cart, or another completion flow | [Finalization](?path=/docs/phoenix-finalization--docs) |
24
25
 
25
26
  ## Review checklist
26
27
 
28
+ - Users can complete typical tasks and understand how to resolve invalid choices.
27
29
  - The chosen navigation matches whether groups are independent or ordered.
28
30
  - Every active mode has an explicit entry, exit, and visibility contract.
29
31
  - Project-defined loading, empty, error, and success states give users a clear next action.
@@ -1,5 +1,5 @@
1
1
  import type { ConfiguratorBuilder } from '../application/configurator-builder.js';
2
- import { type $DomainEntity, DomainComponentOpticBuilder, type DomainEntity } from '../core/index.js';
2
+ import { type $DomainEntity, type ActionTypes, DomainComponentOpticBuilder, type DomainEntity } from '../core/index.js';
3
3
  import type { FinalizeData, FinalizeResult, FrontendData, NavigationState, PublishedData, SessionData, ViewState } from './__generated/application-types.js';
4
4
  import type { $Map } from './__generated/enhanced-model.js';
5
5
  import type { Aliases, CommonAdminEntity, RootEntity } from './__generated/model/index.js';
@@ -28,5 +28,5 @@ export declare const commonAdminComponents: import("../index.js").DomainComponen
28
28
  * work at runtime anyway. The null cast is the whole point — it makes "this value has no runtime
29
29
  * behavior" explicit instead of building dead machinery to carry the same types.
30
30
  */
31
- export declare const configuratorBuilder: ConfiguratorBuilder<DomainEntity<string>, DomainEntity<string>, Record<string, $DomainEntity<DomainEntity<string>>>, never, never, never, never, PublishedData, SessionData, FrontendData, AnyDomainEntity, RootEntity, $Map, NavigationState, ViewState, FinalizeData, FinalizeResult, SessionData>;
31
+ export declare const configuratorBuilder: ConfiguratorBuilder<DomainEntity<string>, DomainEntity<string>, Record<string, $DomainEntity<DomainEntity<string>>>, never, never, never, never, PublishedData, SessionData, FrontendData, ActionTypes, AnyDomainEntity, RootEntity, $Map, NavigationState, ViewState, FinalizeData, FinalizeResult, SessionData>;
32
32
  export type CommondAdminEntities = Omit<CommonAdminEntity['type'], 'Admin' | 'DummyDoNotUse'>;
@@ -0,0 +1,19 @@
1
+ import type { AnonymousHandler } from './anonymous-handler.js';
2
+ import type { ChunkScopesResolver } from './chunk-scopes-handler.js';
3
+ import type { CodeHandler } from './code-handler.js';
4
+ import type { RefreshHandler } from './refresh-handler.js';
5
+ import type { SignedInHandler } from './signed-in-handler.js';
6
+ import type { VisitorHandler } from './visitor-handler.js';
7
+ /**
8
+ * The access handlers a project's `src/handlers/` files register, one per kind, as the webhook reads them. Parsing
9
+ * has already refused a kind the project's access mode does not allow, so the auth handler builder applies each one
10
+ * it finds.
11
+ */
12
+ export interface AccessHandlers<SESSION_DATA extends Record<string, unknown>> {
13
+ readonly chunkScopes: ChunkScopesResolver<SESSION_DATA> | undefined;
14
+ readonly visitor: VisitorHandler<SESSION_DATA> | undefined;
15
+ readonly signedIn: SignedInHandler<SESSION_DATA> | undefined;
16
+ readonly code: CodeHandler<SESSION_DATA> | undefined;
17
+ readonly refresh: RefreshHandler<SESSION_DATA> | undefined;
18
+ readonly anonymous: AnonymousHandler<SESSION_DATA> | undefined;
19
+ }
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,16 @@
1
+ import type { AnonymousPayload, AuthHandlerResponse } from '@salsita-ai/contracts/webhook';
2
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
3
+ /** Answers the anonymous flow of a `custom` project's own sign-in: a person who arrives with no code or refresh token. */
4
+ export type AnonymousHandler<SESSION_DATA extends Record<string, unknown>> = (payload: AnonymousPayload) => Promise<AuthHandlerResponse<SESSION_DATA>>;
5
+ /** The registration a `src/handlers/` file default-exports to answer the anonymous flow in `custom`. */
6
+ export type AnonymousHandlerRegistration<SESSION_DATA extends Record<string, unknown>> = SystemPhoenixAsyncHandlerRegistration<AnonymousPayload, AuthHandlerResponse<SESSION_DATA>>;
7
+ /** `phx.access.createAnonymousHandler`, typed with the project's session data. */
8
+ export type TypedCreateAnonymousHandler<SESSION_DATA extends Record<string, unknown>> = (handler: AnonymousHandler<SESSION_DATA>) => AnonymousHandlerRegistration<SESSION_DATA>;
9
+ /**
10
+ * Creates the handler that answers the anonymous flow of a `custom` project, replacing `withAnonymousHandler` of the
11
+ * deprecated auth handler builder. Its answer decides the session's role, admin included.
12
+ * Usage: `export default phx.access.createAnonymousHandler(async payload => ({ success: false }))` in `src/handlers/`.
13
+ * Note: parsing detects this call to bundle the file into the webhook.
14
+ */
15
+ export declare const createAnonymousHandler: <SESSION_DATA extends Record<string, unknown>>(handler: AnonymousHandler<SESSION_DATA>) => AnonymousHandlerRegistration<SESSION_DATA>;
16
+ export declare const isAnonymousHandler: <SESSION_DATA extends Record<string, unknown>>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is AnonymousHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessAnonymousHandler";export const createAnonymousHandler=n=>({type:"system-async",name:e,handler:()=>({handler:n})});export const isAnonymousHandler=n=>"system-async"===n.type&&n.name===e;
@@ -0,0 +1,27 @@
1
+ import type { SessionRole } from '@salsita-ai/contracts/api';
2
+ import type { HandlerRegistration, SystemPhoenixHandlerRegistration } from '../../spec/index.js';
3
+ /**
4
+ * What a chunk scopes handler decides from: the role the session was granted and its final session data, after
5
+ * every other handler of the sign-in ran.
6
+ */
7
+ export interface ChunkScopesHandlerProps<SESSION_DATA> {
8
+ readonly role: SessionRole;
9
+ readonly data: SESSION_DATA;
10
+ }
11
+ /**
12
+ * Decides which published-data chunk scopes a session may read. Each scope names the chunks a session with it
13
+ * reads; `public` is always added, whatever the handler returns.
14
+ */
15
+ export type ChunkScopesResolver<SESSION_DATA> = (props: ChunkScopesHandlerProps<SESSION_DATA>) => readonly string[];
16
+ /** The registration a `src/handlers/` file default-exports to decide a session's chunk scopes, in every access mode. */
17
+ export type ChunkScopesHandlerRegistration<SESSION_DATA> = SystemPhoenixHandlerRegistration<ChunkScopesHandlerProps<SESSION_DATA>, readonly string[]>;
18
+ /** `phx.access.createChunkScopesHandler`, typed with the project's session data. */
19
+ export type TypedCreateChunkScopesHandler<SESSION_DATA> = (resolver: ChunkScopesResolver<SESSION_DATA>) => ChunkScopesHandlerRegistration<SESSION_DATA>;
20
+ /**
21
+ * Creates the handler that decides which published-data chunk scopes a session may read, replacing
22
+ * `withPublishedChunkScopes` of the deprecated auth handler builder.
23
+ * Usage: `export default phx.access.createChunkScopesHandler(({ role, data }) => [...])` in `src/handlers/`.
24
+ * Note: parsing detects this call to bundle the file into the webhook.
25
+ */
26
+ export declare const createChunkScopesHandler: <SESSION_DATA>(resolver: ChunkScopesResolver<SESSION_DATA>) => ChunkScopesHandlerRegistration<SESSION_DATA>;
27
+ export declare const isChunkScopesHandler: <SESSION_DATA>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is ChunkScopesHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessChunkScopesHandler";export const createChunkScopesHandler=n=>({type:"system",name:e,handler:()=>({handler:n})});export const isChunkScopesHandler=n=>"system"===n.type&&n.name===e;
@@ -0,0 +1,16 @@
1
+ import type { AuthHandlerResponse, CodePayload } from '@salsita-ai/contracts/webhook';
2
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
3
+ /** Answers the code flow of a `custom` project's own sign-in: the tokens a host application deposited for a one-time code. */
4
+ export type CodeHandler<SESSION_DATA extends Record<string, unknown>> = (payload: CodePayload) => Promise<AuthHandlerResponse<SESSION_DATA>>;
5
+ /** The registration a `src/handlers/` file default-exports to answer the code flow in `custom`. */
6
+ export type CodeHandlerRegistration<SESSION_DATA extends Record<string, unknown>> = SystemPhoenixAsyncHandlerRegistration<CodePayload, AuthHandlerResponse<SESSION_DATA>>;
7
+ /** `phx.access.createCodeHandler`, typed with the project's session data. */
8
+ export type TypedCreateCodeHandler<SESSION_DATA extends Record<string, unknown>> = (handler: CodeHandler<SESSION_DATA>) => CodeHandlerRegistration<SESSION_DATA>;
9
+ /**
10
+ * Creates the handler that answers the code flow of a `custom` project, replacing `withCodeHandler` of the
11
+ * deprecated auth handler builder. Its answer decides the session's role, admin included.
12
+ * Usage: `export default phx.access.createCodeHandler(async payload => ({ success: false }))` in `src/handlers/`.
13
+ * Note: parsing detects this call to bundle the file into the webhook.
14
+ */
15
+ export declare const createCodeHandler: <SESSION_DATA extends Record<string, unknown>>(handler: CodeHandler<SESSION_DATA>) => CodeHandlerRegistration<SESSION_DATA>;
16
+ export declare const isCodeHandler: <SESSION_DATA extends Record<string, unknown>>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is CodeHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessCodeHandler";export const createCodeHandler=s=>({type:"system-async",name:e,handler:()=>({handler:s})});export const isCodeHandler=s=>"system-async"===s.type&&s.name===e;
@@ -0,0 +1,7 @@
1
+ export { type AccessHandlers } from './access-handlers.js';
2
+ export { type AnonymousHandler, type AnonymousHandlerRegistration, type TypedCreateAnonymousHandler, createAnonymousHandler, isAnonymousHandler, } from './anonymous-handler.js';
3
+ export { type ChunkScopesHandlerProps, type ChunkScopesHandlerRegistration, type ChunkScopesResolver, type TypedCreateChunkScopesHandler, createChunkScopesHandler, isChunkScopesHandler, } from './chunk-scopes-handler.js';
4
+ export { type CodeHandler, type CodeHandlerRegistration, type TypedCreateCodeHandler, createCodeHandler, isCodeHandler, } from './code-handler.js';
5
+ export { type RefreshHandler, type RefreshHandlerRegistration, type TypedCreateRefreshHandler, createRefreshHandler, isRefreshHandler, } from './refresh-handler.js';
6
+ export { type SignedInHandler, type SignedInHandlerProps, type SignedInHandlerRegistration, type SignedInHandlerResult, type SignedInUser, type TypedCreateSignedInHandler, createSignedInHandler, isSignedInHandler, } from './signed-in-handler.js';
7
+ export { type TypedCreateVisitorHandler, type VisitorHandler, type VisitorHandlerProps, type VisitorHandlerRegistration, type VisitorHandlerResult, createVisitorHandler, isVisitorHandler, } from './visitor-handler.js';
@@ -0,0 +1 @@
1
+ export{createAnonymousHandler,isAnonymousHandler}from"./anonymous-handler.js";export{createChunkScopesHandler,isChunkScopesHandler}from"./chunk-scopes-handler.js";export{createCodeHandler,isCodeHandler}from"./code-handler.js";export{createRefreshHandler,isRefreshHandler}from"./refresh-handler.js";export{createSignedInHandler,isSignedInHandler}from"./signed-in-handler.js";export{createVisitorHandler,isVisitorHandler}from"./visitor-handler.js";
@@ -0,0 +1,16 @@
1
+ import type { AuthHandlerResponse, RefreshPayload } from '@salsita-ai/contracts/webhook';
2
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
3
+ /** Answers the refresh flow of a `custom` project's own sign-in: a refresh token an earlier answer returned. */
4
+ export type RefreshHandler<SESSION_DATA extends Record<string, unknown>> = (payload: RefreshPayload) => Promise<AuthHandlerResponse<SESSION_DATA>>;
5
+ /** The registration a `src/handlers/` file default-exports to answer the refresh flow in `custom`. */
6
+ export type RefreshHandlerRegistration<SESSION_DATA extends Record<string, unknown>> = SystemPhoenixAsyncHandlerRegistration<RefreshPayload, AuthHandlerResponse<SESSION_DATA>>;
7
+ /** `phx.access.createRefreshHandler`, typed with the project's session data. */
8
+ export type TypedCreateRefreshHandler<SESSION_DATA extends Record<string, unknown>> = (handler: RefreshHandler<SESSION_DATA>) => RefreshHandlerRegistration<SESSION_DATA>;
9
+ /**
10
+ * Creates the handler that answers the refresh flow of a `custom` project, replacing `withRefreshHandler` of the
11
+ * deprecated auth handler builder. Its answer decides the session's role, admin included.
12
+ * Usage: `export default phx.access.createRefreshHandler(async payload => ({ success: false }))` in `src/handlers/`.
13
+ * Note: parsing detects this call to bundle the file into the webhook.
14
+ */
15
+ export declare const createRefreshHandler: <SESSION_DATA extends Record<string, unknown>>(handler: RefreshHandler<SESSION_DATA>) => RefreshHandlerRegistration<SESSION_DATA>;
16
+ export declare const isRefreshHandler: <SESSION_DATA extends Record<string, unknown>>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is RefreshHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessRefreshHandler";export const createRefreshHandler=s=>({type:"system-async",name:e,handler:()=>({handler:s})});export const isRefreshHandler=s=>"system-async"===s.type&&s.name===e;
@@ -0,0 +1,44 @@
1
+ import type { PhoenixAuthPayload } from '@salsita-ai/contracts/webhook';
2
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
3
+ /** The person a Studio account signed in, as their Studio account names them. */
4
+ export interface SignedInUser {
5
+ readonly id: string;
6
+ readonly email: string;
7
+ /** The name on their Studio account, or `null` when they have set none. */
8
+ readonly name: string | null;
9
+ }
10
+ /** What a signed-in handler starts from: the person, their role and the session data built so far. */
11
+ export interface SignedInHandlerProps<SESSION_DATA> {
12
+ readonly user: SignedInUser;
13
+ /** The person's role in the project: `user`, `admin` or `superadmin`. The handler cannot change it. */
14
+ readonly role: PhoenixAuthPayload['role'];
15
+ /** The identity fields, the values set in Studio that fit the build, and the defaults of the others. */
16
+ readonly data: SESSION_DATA;
17
+ }
18
+ /**
19
+ * What a signed-in handler answers: session data to merge over what it received, or a refusal. Each returned property
20
+ * wins over the value set in Studio; one that does not fit its schema is left out with a warning in the logs.
21
+ */
22
+ export type SignedInHandlerResult<SESSION_DATA> = {
23
+ readonly data: Partial<SESSION_DATA>;
24
+ } | {
25
+ readonly allow: false;
26
+ };
27
+ /** Adds session data for, or refuses, a person who signs in with a Studio account. */
28
+ export type SignedInHandler<SESSION_DATA> = (props: SignedInHandlerProps<SESSION_DATA>) => Promise<SignedInHandlerResult<SESSION_DATA>>;
29
+ /** The registration a `src/handlers/` file default-exports to customise the Studio-account sign-in. */
30
+ export type SignedInHandlerRegistration<SESSION_DATA> = SystemPhoenixAsyncHandlerRegistration<SignedInHandlerProps<SESSION_DATA>, SignedInHandlerResult<SESSION_DATA>>;
31
+ /** `phx.access.createSignedInHandler`, typed with the project's session data. */
32
+ export type TypedCreateSignedInHandler<SESSION_DATA> = (handler: SignedInHandler<SESSION_DATA>) => SignedInHandlerRegistration<SESSION_DATA>;
33
+ /**
34
+ * Creates the handler that runs whenever a person signs in with a Studio account, and at each session refresh, in
35
+ * `invited` and `public-with-sign-in`. It may add session data, for example from a CRM, override a value set in
36
+ * Studio, or refuse the person with `{ allow: false }`, also an admin, who is then kept out of the admin panel too.
37
+ * It cannot change who the person is or their role. A throw, an answer that is neither, or no answer within ten
38
+ * seconds fails the sign-in with a try-again answer.
39
+ * Usage: `export default phx.access.createSignedInHandler(async ({ user, role, data }) => ({ data: {} }))` in
40
+ * `src/handlers/`.
41
+ * Note: parsing detects this call to bundle the file into the webhook.
42
+ */
43
+ export declare const createSignedInHandler: <SESSION_DATA>(handler: SignedInHandler<SESSION_DATA>) => SignedInHandlerRegistration<SESSION_DATA>;
44
+ export declare const isSignedInHandler: <SESSION_DATA>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is SignedInHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessSignedInHandler";export const createSignedInHandler=n=>({type:"system-async",name:e,handler:()=>({handler:n})});export const isSignedInHandler=n=>"system-async"===n.type&&n.name===e;
@@ -0,0 +1,23 @@
1
+ import type { HandlerRegistration, SystemPhoenixAsyncHandlerRegistration } from '../../spec/index.js';
2
+ /** What a visitor handler starts from: the session data of a person who is not signed in, before it adds any. */
3
+ export interface VisitorHandlerProps<SESSION_DATA> {
4
+ readonly data: SESSION_DATA;
5
+ }
6
+ /** What a visitor handler answers: the visitor's session data. A visitor is always let in, as an anonymous session. */
7
+ export interface VisitorHandlerResult<SESSION_DATA> {
8
+ readonly data: SESSION_DATA;
9
+ }
10
+ /** Adds session data for a person who opens the configurator without signing in. */
11
+ export type VisitorHandler<SESSION_DATA> = (props: VisitorHandlerProps<SESSION_DATA>) => Promise<VisitorHandlerResult<SESSION_DATA>>;
12
+ /** The registration a `src/handlers/` file default-exports to customise the visitors of Public and Public with sign-in. */
13
+ export type VisitorHandlerRegistration<SESSION_DATA> = SystemPhoenixAsyncHandlerRegistration<VisitorHandlerProps<SESSION_DATA>, VisitorHandlerResult<SESSION_DATA>>;
14
+ /** `phx.access.createVisitorHandler`, typed with the project's session data. */
15
+ export type TypedCreateVisitorHandler<SESSION_DATA> = (handler: VisitorHandler<SESSION_DATA>) => VisitorHandlerRegistration<SESSION_DATA>;
16
+ /**
17
+ * Creates the handler that adds session data for visitors, the people who open the configurator without signing in,
18
+ * in `public` and `public-with-sign-in`. It cannot refuse a visitor or give one a role.
19
+ * Usage: `export default phx.access.createVisitorHandler(async ({ data }) => ({ data: { ...data } }))` in `src/handlers/`.
20
+ * Note: parsing detects this call to bundle the file into the webhook.
21
+ */
22
+ export declare const createVisitorHandler: <SESSION_DATA>(handler: VisitorHandler<SESSION_DATA>) => VisitorHandlerRegistration<SESSION_DATA>;
23
+ export declare const isVisitorHandler: <SESSION_DATA>(handler: Pick<HandlerRegistration<never, unknown>, 'type' | 'name'>) => handler is VisitorHandlerRegistration<SESSION_DATA>;
@@ -0,0 +1 @@
1
+ let e="AccessVisitorHandler";export const createVisitorHandler=s=>({type:"system-async",name:e,handler:()=>({handler:s})});export const isVisitorHandler=s=>"system-async"===s.type&&s.name===e;
@@ -143,8 +143,39 @@ export interface ResourcesConfig {
143
143
  * `authenticated` is 'error'. 'authorization-code-rejected' means the attempt consumed a supplied
144
144
  * authorization code — sign-in pages must not automatically mint and retry a new one, otherwise a
145
145
  * persistently failing auth webhook turns the silent sign-in into an unbounded retry loop.
146
+ * 'configurator-unavailable' means the server starts no session of this configurator now, for a reason
147
+ * the buyer is not told; the configurator shows its "unavailable" page instead of a sign-in.
146
148
  */
147
- export type AuthenticationErrorCode = 'authorization-code-rejected' | 'authentication-failed';
149
+ export type AuthenticationErrorCode = 'authorization-code-rejected' | 'authentication-failed' | 'configurator-unavailable';
150
+ /** The Studio account a sign-in names. `name` is the account's display name, null when it has none. */
151
+ export interface SignInAccount {
152
+ readonly email: string;
153
+ readonly name: string | null;
154
+ }
155
+ /**
156
+ * Outcome of the latest Studio-account sign-in on this page, kept beside the session it led to:
157
+ *
158
+ * - `idle` — nothing to report: no sign-in started, or the last one completed.
159
+ * - `signing-in` — the page is on its way to the sign-in form, or redeeming the code it came back with.
160
+ * - `refused` — the account is not invited, or the project's signed-in handler refused it. `account` is null only when
161
+ * the server did not name it.
162
+ * - `failed` — the sign-in did not finish: the code was already used or expired (`not-completed`), or the server could
163
+ * not complete it right now and trying again may help (`unavailable`). `message` is the technical detail.
164
+ *
165
+ * A refused or failed sign-in leaves the page a visitor where visitors may use the configurator.
166
+ */
167
+ export type SignInOutcome = {
168
+ readonly state: 'idle';
169
+ } | {
170
+ readonly state: 'signing-in';
171
+ } | {
172
+ readonly state: 'refused';
173
+ readonly account: SignInAccount | null;
174
+ } | {
175
+ readonly state: 'failed';
176
+ readonly reason: 'not-completed' | 'unavailable';
177
+ readonly message: string;
178
+ };
148
179
  export interface Session<SESSION_DATA extends Record<string, unknown>> {
149
180
  readonly rawSessionToken: string | null;
150
181
  readonly rawAdminSessionToken: string | null;
@@ -272,6 +303,11 @@ export interface ApplicationConfig<ENTITIES extends DomainEntity<string>, ALLOWE
272
303
  /** The `src/handlers/` and `src/elements/` files as project modules; the runtime spec validates and flattens both. */
273
304
  readonly handlers: readonly ProjectModule[];
274
305
  readonly elements: readonly ProjectModule[];
306
+ /**
307
+ * The `src/actions/` files as project modules, carried to the runtime spec unresolved. Only the
308
+ * browser assembly sets them; the configurator's action system resolves and validates them.
309
+ */
310
+ readonly actions: readonly ProjectModule[];
275
311
  /** The SDK's default element registrations; a project element with the same name replaces one. */
276
312
  readonly defaultElements?: readonly ElementRegistration[];
277
313
  readonly mount: MountConfig<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, CHAT_CONTEXT, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES>;
@@ -0,0 +1,22 @@
1
+ import type { AssistantManifest, AssistantResolvedManifest } from '../../spec/index.js';
2
+ /**
3
+ * The assistant object type that stands for every entity of a type the manifest does not expose:
4
+ * it implements only `AnyDomainEntity`, and its `type` field names the entity's real type.
5
+ */
6
+ export declare const ASSISTANT_OTHER_ENTITY = "OtherEntity";
7
+ /**
8
+ * The entity types the assistant schema gives their own object type, in model order: the root types,
9
+ * and every type an assistant section names, directly or through an alias. Naming `AnyDomainEntity`
10
+ * exposes every type. `names` are the keys of the `entities`, `writable`, `deletable`, `childRecipes`,
11
+ * `replaceRecipes`, `screenshots` and `navigation.select` sections. The resolver computes them from
12
+ * the spec and the session setup again from its narrowed sections.
13
+ */
14
+ export declare const assistantExposedTypes: (names: Iterable<string>, { entityTypes, aliases }: Pick<AssistantResolvedManifest, 'entityTypes' | 'aliases'>) => readonly string[];
15
+ /**
16
+ * Whether the assistant sees an entity of this type in detail: its type has its own object type,
17
+ * which its entry in the manifest's field table says. Change results and the change record list
18
+ * only such entities.
19
+ */
20
+ export declare const isAssistantVisible: ({ type }: {
21
+ readonly type: string;
22
+ }, { fields }: Pick<AssistantManifest, 'fields'>) => boolean;
@@ -0,0 +1 @@
1
+ export const ASSISTANT_OTHER_ENTITY="OtherEntity";export const assistantExposedTypes=(t,{entityTypes:s,aliases:e})=>{let n=[...t,"RootEntity"];return s.filter(t=>n.some(s=>s===t||Object.entries(e).some(([e,n])=>e===s&&n.includes(t))))};export const isAssistantVisible=({type:t},{fields:s})=>Object.hasOwn(s,t);
@@ -0,0 +1,30 @@
1
+ import type { DomainEntity, DomainEntityId, DomainState, StateUpdate } from '../../core/index.js';
2
+ import type { AnyNavigationSystem } from '../../domain-context/index.js';
3
+ import type { AssistantSelectTarget } from '../../spec/index.js';
4
+ type AnyDomainState = DomainState<DomainEntity<string>>;
5
+ type AnyStateUpdate = StateUpdate<DomainEntity<string>, DomainEntity<string>>;
6
+ /**
7
+ * What the assistant reads and changes the selection through: the navigation system for the
8
+ * selected entity and the updates that change it, and whether the UI lets the user select an entity
9
+ * in a state. The latter is read from the UI components, which the domain does not know, so the
10
+ * configurator runtime hands it in.
11
+ */
12
+ export interface AssistantSelectionContext {
13
+ readonly navigationSystem: Pick<AnyNavigationSystem, 'getActiveSelectionState' | 'getSelectUpdate' | 'getDeselectUpdate'>;
14
+ readonly isOfferedForSelection: (entityId: DomainEntityId<string>, state: AnyDomainState) => boolean;
15
+ }
16
+ /**
17
+ * Whether the agent can select `entity` in `state`: its type is exposed for selection, and the UI
18
+ * lets the user select it there, by a `selectable` component or a select hotspot on it.
19
+ */
20
+ export declare const isAssistantSelectable: (entity: DomainEntity<string>, state: AnyDomainState, { isOfferedForSelection }: Pick<AssistantSelectionContext, 'isOfferedForSelection'>, select: readonly AssistantSelectTarget[]) => boolean;
21
+ /**
22
+ * What `select` changes: the update that selects the entity `entityId` the way the UI selects it;
23
+ * none when it is selected already. Throws, saying which, for an unknown id, an entity of a type the
24
+ * manifest does not expose for selection, and an entity the UI does not let the user select in
25
+ * `state`.
26
+ */
27
+ export declare const prepareSelectUpdates: (entityId: string, state: AnyDomainState, { navigationSystem, isOfferedForSelection }: AssistantSelectionContext, select: readonly AssistantSelectTarget[]) => readonly AnyStateUpdate[];
28
+ /** What `deselect` changes: the update that clears the selection back to the root; none when the root is selected already. */
29
+ export declare const prepareDeselectUpdates: (state: AnyDomainState, { navigationSystem }: Pick<AssistantSelectionContext, 'navigationSystem'>) => readonly AnyStateUpdate[];
30
+ export {};
@@ -0,0 +1 @@
1
+ let e=e=>[...new Set(e.flatMap(({entityTypes:e})=>e))];export const isAssistantSelectable=(t,n,{isOfferedForSelection:i},o)=>e(o).includes(t.type)&&i(t.id,n);export const prepareSelectUpdates=(t,n,{navigationSystem:i,isOfferedForSelection:o},r)=>{let s=n.entities.find(e=>e.id===t);if(!s)throw Error(`Entity "${t}" does not exist, so it cannot be selected. It may have been deleted by an earlier operation or field. Query the current entities and use an id they return.`);let a=e(r);if(!a.includes(s.type))throw Error(`Entity "${t}" is a ${s.type}, which cannot be selected. Only entities of these types can be selected: ${a.join(", ")}. Select an entity of one of them instead.`);if(s.id===i.getActiveSelectionState(n))return[];if(!o(s.id,n))throw Error(`Entity "${t}" cannot be selected right now, so nothing was changed. Read meta { selectable } to see which entities can be selected now.`);return[i.getSelectUpdate(s.id)]};export const prepareDeselectUpdates=(e,{navigationSystem:t})=>t.getActiveSelectionState(e)===e.rootEntityId?[]:[t.getDeselectUpdate()];
@@ -1,5 +1,5 @@
1
- import{NoUnusedFragmentsRule as e,parse as t,specifiedRules as i,validate as n}from"graphql";let s="AnyDomainEntity",r=[{name:"RecipeGroup",description:"A recipe group with its recipes, without their dry-runs.",selections:["groupId","name","description","recipes { ...Recipe }"]},{name:"Recipe",description:"A recipe without its dry-run.",selections:["key","name","description","imageUrl"]},{name:"FieldOption",description:"A value a field accepts, without its dry-run.",selections:["value","name","description","imageUrl","color"]},{name:"DryRun",description:"What a dry-run would do, with the ids of the entities it would change instead of the entities.",selections:["ok","deletedEntityIds","sideEffects","warnings","errors { type entityId message }","changedEntities { id }"]}],a=(e,t)=>0===t?e:`${e}__${t}`,l=e=>e.split("\n").map(e=>`# ${e}`.trimEnd()).join("\n"),o=(e,t,i)=>[`fragment ${e} on ${t} {`,...i.map(e=>` ${e}`),"}"].join("\n"),p=(e,t,i)=>{let n=e=>"edge"===e.type.kind?`${e.name} { ${i} }`:e.name;return o(e,s,["id",...t.flatMap(({typeName:e,fields:t})=>e===s?t.map(n):[`... on ${e} {`,...t.map(e=>` ${n(e)}`),"}"])])};export const buildAssistantLenses=(d,m)=>{let c=Object.entries(d.lenses).flatMap(([e,t])=>{let i=[s,...Object.keys(d.aliases).filter(e=>e!==s),...d.entityTypes].flatMap(t=>{let i=(d.fields[t]??[]).filter(t=>t.lenses?.includes(e));return i.length>0?[{typeName:t,fields:i}]:[]});return i.length>0?[{name:e,...t,conditions:i}]:[]}),$=r.filter(({name:e})=>void 0!==m.getType(e)),h=[...c.map(({name:e,description:t,maxDepth:i,conditions:n})=>{let s=n.some(({fields:e})=>e.some(e=>"edge"===e.type.kind));return`${l(s?`${t} ${`Nested relations carry the same selection up to ${i} ${1===i?"level":"levels"}, below that only \`id\`.`}`:t)}
2
- ${p(e,n,`...${e}`)}`}),...$.map(({name:e,description:t,selections:i})=>`${l(t)}
3
- ${o(e,e,i)}`)].join("\n\n"),u=[...c.flatMap(({name:e,maxDepth:t,conditions:i})=>Array.from({length:t+1},(n,s)=>p(a(e,s),i,s<t?`...${a(e,s+1)}`:"id"))),...$.map(({name:e,selections:t})=>o(e,e,t))].join("\n\n");if(""!==u){let s=c.length>0?`entities { ${c.map(({name:e})=>`...${e}`).join(" ")} }`:"__typename",r=n(m,t(`${u}
1
+ import{NoUnusedFragmentsRule as e,parse as t,specifiedRules as i,validate as n}from"graphql";let r="AnyDomainEntity",s=[{name:"RecipeGroup",description:"A recipe group with its recipes, without their dry-runs.",selections:["groupId","name","description","recipes { ...Recipe }"]},{name:"Recipe",description:"A recipe without its dry-run.",selections:["key","name","description","imageUrl"]},{name:"FieldOption",description:"A value a field accepts, without its dry-run.",selections:["value","name","description","imageUrl","color"]},{name:"DryRun",description:"What a dry-run would do, with the ids of the entities it would change instead of the entities.",selections:["ok","deletedEntityIds","sideEffects","warnings","errors","changedEntities { id }"]}],a=(e,t)=>0===t?e:`${e}__${t}`,o=e=>e.split("\n").map(e=>`# ${e}`.trimEnd()).join("\n"),l=(e,t,i)=>[`fragment ${e} on ${t} {`,...i.map(e=>` ${e}`),"}"].join("\n"),p=(e,t,i)=>{let n=e=>"edge"===e.type.kind?`${e.name} { ${i} }`:e.name;return l(e,r,["id",...t.flatMap(({typeName:e,fields:t})=>e===r?t.map(n):[`... on ${e} {`,...t.map(e=>` ${n(e)}`),"}"])])};export const buildAssistantLenses=(d,m)=>{let c=Object.entries(d.lenses).flatMap(([e,t])=>{let i=[r,...Object.keys(d.aliases).filter(e=>e!==r),...d.entityTypes].flatMap(t=>{let i=(d.fields[t]??[]).filter(t=>t.lenses?.includes(e));return i.length>0&&void 0!==m.getType(t)?[{typeName:t,fields:i}]:[]});return i.length>0?[{name:e,...t,conditions:i}]:[]}),$=s.filter(({name:e})=>void 0!==m.getType(e)),h=[...c.map(({name:e,description:t,maxDepth:i,conditions:n})=>{let r=n.some(({fields:e})=>e.some(e=>"edge"===e.type.kind));return`${o(r?`${t} ${`Nested relations carry the same selection up to ${i} ${1===i?"level":"levels"}, below that only \`id\`.`}`:t)}
2
+ ${p(e,n,`...${e}`)}`}),...$.map(({name:e,description:t,selections:i})=>`${o(t)}
3
+ ${l(e,e,i)}`)].join("\n\n"),u=[...c.flatMap(({name:e,maxDepth:t,conditions:i})=>Array.from({length:t+1},(n,r)=>p(a(e,r),i,r<t?`...${a(e,r+1)}`:"id"))),...$.map(({name:e,selections:t})=>l(e,e,t))].join("\n\n");if(""!==u){let r=c.length>0?`entities { ${c.map(({name:e})=>`...${e}`).join(" ")} }`:"__typename",s=n(m,t(`${u}
4
4
 
5
- { ${s} }`),i.filter(t=>t!==e));if(r.length>0)throw Error(`The lens fragments generated from "assistant.lenses" are not valid GraphQL: ${[...new Set(r.map(e=>e.message))].join(" ")}`)}return{declarations:h,definitions:u}};
5
+ { ${r} }`),i.filter(t=>t!==e));if(s.length>0)throw Error(`The lens fragments generated from "assistant.lenses" are not valid GraphQL: ${[...new Set(s.map(e=>e.message))].join(" ")}`)}return{declarations:h,definitions:u}};
@@ -1,3 +1,3 @@
1
- import type { AssistantManifest, AssistantResolvedManifest } from '../../spec/index.js';
1
+ import type { AssistantResolvedManifest, BuiltAssistantManifest } from '../../spec/index.js';
2
2
  /** Constructs the schema and runtime sources exclusively from serializable resolved data. */
3
- export declare const buildAssistantManifest: (resolved: AssistantResolvedManifest) => Required<AssistantManifest>;
3
+ export declare const buildAssistantManifest: (resolved: AssistantResolvedManifest) => BuiltAssistantManifest;
@@ -1 +1 @@
1
- import{GraphQLBoolean as e,GraphQLEnumType as t,GraphQLID as n,GraphQLInputObjectType as i,GraphQLInterfaceType as s,GraphQLList as r,GraphQLNonNull as o,GraphQLObjectType as a,GraphQLSchema as p,GraphQLString as d,printSchema as c,validateSchema as l}from"graphql";import{GraphQLJSON as h,createAssistantValueType as w}from"./assistant-value-type.js";import{buildAssistantLenses as y}from"./build-assistant-lenses.js";import{createAssistantExecutionSchema as u}from"./create-assistant-execution-schema.js";let g="AnyDomainEntity",f="RootEntity",m=[["navigationState","Active navigation state.","navigationStates"],["viewState","Active view state.","viewStates"],["toolState","Active tool state.","toolStates"]],b={section:"childRecipes",mutation:"addChild",typeSuffix:"ChildRecipes"},v={section:"replaceRecipes",mutation:"replaceEntity",typeSuffix:"ReplaceRecipes"},$=(e,t)=>Object.entries(e).find(([e])=>e===t)?.[1],j=(e,t)=>{if(!t||0===t.length)return e;let n=`One of: ${t.map(e=>`"${e}"`).join(", ")}.`;return e?/[.!?]$/.test(e)?`${e} ${n}`:`${e}. ${n}`:n},O=({target:e,cardinality:t},n)=>{let i=n(e);switch(t){case"1-1":return new o(i);case"0-1":return i;case"0-N":case"1-N":return new o(new r(new o(i)))}},E=(e,t,i)=>{let s={id:{type:new o(n),description:i?`Unique id of the entity, assigned by the configurator, e.g. "${i}-1".`:void 0},type:{type:new o(d),description:i?`Entity type name, e.g. "${i}".`:void 0}};for(let n of e)s[n.name]={type:"edge"===n.type.kind?O(n.type,t):w(n.type.type),description:n.description};return s},R=e=>Object.fromEntries(e.map(({name:e,source:t,localized:n})=>[e,n?{source:t,localized:!0}:{source:t}])),k=new o(new r(new o(h))),T=' Each is { type, severity, entityId, message }: severity is "warning" or "notice", entityId the entity it is on or null, message the warning as the user would be told it or null.',I={sameForAllInstances:e=>`Same recipes for every ${e}.`,constantDuringSession:()=>"Fixed for the session."},N={sameForAllInstances:e=>`Same for every ${e}.`,constantDuringSession:()=>"Fixed for the session."},S=(e,t,n)=>e.map(e=>` ${t[e](n)}`).join(""),A=({section:e,typeSuffix:t},n,{entityType:i,purpose:s,recipeGroup:r})=>0===n.length?{}:{[e]:{type:new o(new a({name:`${i}${t}`,fields:Object.fromEntries(n.map(({groupId:e,description:t,dryRuns:n,hints:s})=>{let o;return[e,{type:r,description:`${!(o=t?.trim())?"":/[.!?]$/.test(o)?`${o} `:`${o}. `}Null while the configurator does not offer it on the entity.${n?"":" Cannot be dry-run."}${S(s,I,i)}`}]}))})),description:`The recipe groups for ${s} this ${i}, one field each.`}},M=({entityType:e,childRecipes:n,replaceRecipes:i,optionsEdges:s,screenshots:p,hasInvariants:d},{recipeGroup:c,fieldOption:l,screenshot:w})=>new a({name:`${e}Meta`,fields:Object.assign(A(b,n,{entityType:e,purpose:"adding children to",recipeGroup:c}),A(v,i,{entityType:e,purpose:"replacing",recipeGroup:c}),...s.map(({options:{edgeName:t,field:n,validate:i,dryRuns:s},hints:a})=>({[t]:{type:new r(new o(l)),args:{values:{type:new r(new o(h)),description:"Only the options with these values; values not listed are ignored."}},description:`Values "${n}" accepts on this ${e}. Null when there is no choice to make.${i?"":" Not checked on write."}${s?"":" Cannot be dry-run."}${S(a,N,e)}`}})),0===p.length?{}:{screenshot:{type:w,args:{view:{type:new o(new t({name:`${e}ScreenshotView`,values:Object.fromEntries(p.map(({view:e,description:t})=>[e,{description:t}]))}))}},description:"Renders this entity from a predefined view. The picture follows the tool result as an image labelled with `image`. Null when the view does not apply to this entity right now."}},d?{warnings:{type:k,description:`The warnings and notices this ${e} has right now.${T}`}}:{})}),D=(e,t)=>t?e?"What can be done to this entity right now, and its warnings.":"The warnings of this entity right now.":"What can be done to this entity right now.",W=e=>Object.entries(e).map(([e,t])=>`${e} (${t.map(({groupId:e})=>e).join(", ")})`);export const buildAssistantManifest=t=>{var O,I,N,S,A;let x,C,F,q,{entityTypes:G,aliases:U,exampleType:K,fields:P,states:V,deletableTypes:z,writableTypes:L,actionFields:Q,optionsEdges:B,invariantTypes:H}=t,{childRecipes:J,replaceRecipes:X}=t,Y=new Map,Z=new Map,_=new Map,ee=e=>{let[t,...n]=Object.entries(U).find(([t])=>t===e)?.[1]??[];return(t&&0===n.length?Z.get(t):void 0)??_.get(e)??en},et=e=>Z.get(e)??ee(e),en=new s({name:g,description:"Every entity of the configuration.",fields:()=>E(P[g]??[],et,K)});for(let e of(_.set(g,en),Object.keys(U)))e!==g&&_.set(e,new s({name:e,interfaces:[en],fields:()=>E(P[e]??[],et)}));let ei={};for(let e of G){let t=[g,...Object.entries(U).filter(([t,n])=>t!==g&&n.includes(e)).map(([e])=>e)],n=P[e]??[];ei[e]=R(n),Z.set(e,new a({name:e,interfaces:t.flatMap(e=>_.get(e)??[]),fields:()=>{let t=Y.get(e);return{...E(n,et),...t?{meta:{type:new o(t.type),description:t.description}}:{}}}}))}let es=(O=()=>ee(_.has(f)?f:g),I=()=>ee(g),x=new a({name:"DryRunError",description:"One reason a change cannot be made right now.",fields:{type:{type:new o(d),description:"Kind of the problem."},entityId:{type:n,description:"The entity the problem is on, when it is on one."},message:{type:d,description:"The problem as the user would be told it."}}}),new a({name:"DryRun",description:"What using a recipe or writing an option would do, tried out on the configuration the query reads. Nothing is changed.",fields:()=>({ok:{type:new o(e),description:"Whether the change would succeed on the configuration the query reads."},root:{type:O(),description:"The root entity of the configuration as it would be after the change; null when ok is false. Everything selected under it reads that configuration."},changedEntities:{type:new o(new r(new o(I()))),description:"Entities the change would add or modify; empty when ok is false. One whose id is not in the configuration would be added, and its real id may differ. An entity written to is listed even when its values stay the same."},deletedEntityIds:{type:new o(new r(new o(n))),description:"The ids of the entities the change would remove; empty when ok is false."},sideEffects:{type:new o(new r(new o(d))),description:"The major or unexpected things the configurator would change along with it; empty when ok is false."},warnings:{type:k,description:`The warnings and notices the change would newly cause, which do not stop it; empty when ok is false.${T}`},errors:{type:new o(new r(new o(x))),description:"Why the change cannot be made; empty when ok is true."}})})),er={recipeGroup:(N=[...Object.keys(J).length>0?[b.mutation]:[],...Object.keys(X).length>0?[v.mutation]:[]],C=N.join(" or "),F=new a({name:"Recipe",description:`${N.includes("addChild")?"One thing that can be added to the entity (under childRecipes)":"One thing the entity can be replaced with (under replaceRecipes)"}${N.length>1?" or that it can be replaced with (under replaceRecipes)":""}.`,fields:{key:{type:new o(d),description:`Pass to ${C} as recipeKey, or to recipes(keys:) to read this recipe again.`},name:{type:new o(d),description:"Name shown to the user."},description:{type:d},imageUrl:{type:d,description:"Thumbnail shown to the user."},dryRun:{type:es,description:"What using this recipe would do. Null when it cannot be tried."}}}),new a({name:"RecipeGroup",description:"A group of recipes for this entity.",fields:{groupId:{type:new o(d),description:`Pass to ${C} as recipeGroupId.`},name:{type:new o(d),description:"Name shown to the user."},description:{type:d},recipes:{type:new o(new r(new o(F))),args:{keys:{type:new r(new o(d)),description:"Only the recipes with these keys; keys not in the group are ignored."}}}}})),fieldOption:new a({name:"FieldOption",description:"One value a field accepts. Writing a value outside the list is rejected unless the field description says it is not checked.",fields:{value:{type:new o(h),description:"The value to write to the field."},name:{type:d,description:"Name shown to the user."},description:{type:d},imageUrl:{type:d,description:"Image shown to the user."},color:{type:d,description:'Color shown to the user, as "#rrggbb".'},dryRun:{type:es,description:"What writing this value would do. Null when it cannot be tried."}}}),screenshot:new a({name:"Screenshot",description:"A screenshot of an entity. The picture itself follows the tool result.",fields:{image:{type:new o(n),description:"Label of the image that follows the tool result."}}})};for(let e of G){let n=$(J,e)??[],i=$(X,e)??[],s=$(B,e)??[],r=$(t.screenshots,e)??[],o=H.includes(e),a=n.length>0||i.length>0||s.length>0||r.length>0;(a||o)&&Y.set(e,{description:D(a,o),type:M({entityType:e,childRecipes:n,replaceRecipes:i,optionsEdges:s,screenshots:r,hasInvariants:o},er)})}let eo=new p({query:(S=ee(_.has(f)?f:g),A=ee(g),q=(e=>{let t={};for(let[n,i,s]of m){let r=e[s];r.length>1&&(t[n]={type:new o(d),description:j(i,r)})}if(0!==Object.keys(t).length)return new a({name:"Navigation",description:"The active UI states of the configurator.",fields:t})})(V),new a({name:"Query",fields:{root:{type:new o(S),description:"The root entity of the configuration."},entities:{type:new o(new r(A)),args:{ids:{type:new r(new o(n))}},description:"Every entity, or the given ids in order with null for an unknown id."},selectedEntity:{type:new o(A),description:"The selected entity, or the root entity when nothing is selected."},...q?{navigation:{type:new o(q)}}:{},warnings:{type:k,description:`Every warning and notice of the configuration the query reads.${T}`}}})),mutation:(({deletableTypes:e,writableTypes:t,childRecipes:s,replaceRecipes:p,actionFields:c,objectTypes:l,anyDomainEntity:h,targetOutputType:y})=>{let u,g;if(0!==e.length||0!==t.length||0!==Object.keys(s).length||0!==Object.keys(p).length||0!==c.length)return new a({name:"Mutation",fields:Object.assign(0===e.length?{}:{deleteEntity:{type:new o(new r(new o(n))),args:{id:{type:new o(n)}},description:`Deletes the entity and everything composed into it. Deletable types: ${e.join(", ")}. Returns the ids removed, the given one first.`}},0===(u=W(s)).length?{}:{addChild:{type:new o(new r(new o(h))),args:{parentId:{type:new o(n)},recipeGroupId:{type:new o(d)},recipeKey:{type:new o(d)}},description:`Adds a child to the entity parentId from a recipe listed under its meta { childRecipes }. Types with child recipes: ${u.join("; ")}. Returns the entities added, the recipe's own first; empty when they were removed again.`}},0===(g=W(p)).length?{}:{replaceEntity:{type:new o(new r(new o(h))),args:{entityId:{type:new o(n)},recipeGroupId:{type:new o(d)},recipeKey:{type:new o(d)}},description:`Replaces the entity entityId from a recipe listed under its meta { replaceRecipes }. Types with replace recipes: ${g.join("; ")}. The replacement is a new entity: it has a new id and the field values of its recipe, and entityId no longer exists. Returns the entities added, the replacement first; empty when they were removed again.`}},...t.flatMap(e=>{let t=l.get(e.entityType);return t?[(({entityType:e,fields:t},s)=>{let r=Object.fromEntries(t.map(({name:e,type:t,description:n})=>[e,{type:w(t),description:n}]));return{[`modify${e}`]:{type:s,args:{id:{type:new o(n)},delta:{type:new o(new i({name:`${e}Delta`,fields:r}))}},description:`Sets the fields named in delta on one ${e}. Returns the entity after the change, or null when the change removed it.`}}})(e,t)]:[]}),Object.fromEntries(c.map(e=>{var t;return[e.fieldName,{type:new o(new a({name:(t=e.fieldName,`${t.charAt(0).toUpperCase()+t.slice(1)}Result`),description:`What ${e.fieldName} returns, read from the configuration after the change.`,fields:()=>Object.fromEntries(Object.entries(e.result).map(([e,t])=>[e,{type:"edge"===t.kind?(({target:e,list:t,nullable:n},i)=>{let s=t?new r(new o(i(e))):i(e);return n?s:new o(s)})(t,y):w(t.type),description:t.description}]))})),args:Object.fromEntries(Object.entries(e.args).map(([e,t])=>[e,{type:w(t.type),description:t.description}])),description:e.description}]})))})})({deletableTypes:z,writableTypes:L,childRecipes:J,replaceRecipes:X,actionFields:Q,objectTypes:Z,anyDomainEntity:ee(g),targetOutputType:et}),types:[..._.values(),...Z.values()]}),ea=l(eo);if(ea.length>0)throw Error(ea.map(e=>e.message).join(" "));let ep=c(eo);return{sdl:ep,navigationFields:m.filter(([,,e])=>V[e].length>1).map(([e])=>e),fields:ei,deletableTypes:z,writableFields:Object.fromEntries(L.map(({entityType:e,fields:t})=>[e,Object.fromEntries(t.map(({name:e,property:t})=>[e,t]))])),childRecipes:J,replaceRecipes:X,fieldOptions:Object.fromEntries(G.flatMap(e=>{let t=$(B,e);return t?[[e,t.map(({options:e})=>e)]]:[]})),screenshots:Object.fromEntries(G.flatMap(e=>{let n=$(t.screenshots,e);return n?[[e,n]]:[]})),actions:Object.fromEntries(Q.map(({fieldName:e,actionName:t})=>[e,t])),lenses:y(t,u(ep)),formElements:t.formElements}};
1
+ import{GraphQLBoolean as e,GraphQLEnumType as t,GraphQLID as n,GraphQLInputObjectType as i,GraphQLInterfaceType as s,GraphQLList as o,GraphQLNonNull as a,GraphQLObjectType as r,GraphQLSchema as d,GraphQLString as h,printSchema as l,validateSchema as c}from"graphql";import{ASSISTANT_OTHER_ENTITY as p}from"./assistant-exposure.js";import{GraphQLJSON as y,createAssistantValueType as w}from"./assistant-value-type.js";import{buildAssistantLenses as g}from"./build-assistant-lenses.js";import{createAssistantExecutionSchema as u}from"./create-assistant-execution-schema.js";let f="AnyDomainEntity",m="RootEntity",v={section:"childRecipes",mutation:"addChild",typeSuffix:"ChildRecipes"},b={section:"replaceRecipes",mutation:"replaceEntity",typeSuffix:"ReplaceRecipes"},$=(e,t)=>Object.entries(e).find(([e])=>e===t)?.[1],S=({target:e,list:t,nullableItems:n,nullable:i},s)=>{let r=s(e),d=t?new o(n?r:new a(r)):r;return i?d:new a(d)},j=()=>void 0,O=(e,t)=>{if(void 0===t)return e;let n=`Accepts the values listed under meta { ${t} }.`;return e?`${e}${/[.!?]$/.test(e)?"":"."} ${n}`:n},E=(e,t)=>{let n=e.map(e=>$(t,e)??[]);return e=>{let[t,...i]=n.map(t=>t.find(t=>t.options.field===e)?.options.edgeName);return void 0!==t&&i.every(e=>e===t)?t:void 0}},R=(e,t,{exampleType:i,optionsEdgeOf:s=j}={})=>{let o={id:{type:new a(n),description:i?`Unique id of the entity, assigned by the configurator, e.g. "${i}-1".`:void 0},type:{type:new a(h),description:i?`Entity type name, e.g. "${i}".`:void 0}};for(let n of e)o[n.name]="edge"===n.type.kind?{type:S(n.type,t),description:n.description}:{type:w(n.type.type),description:O(n.description,s(n.name))};return o},k=e=>Object.fromEntries(e.map(({name:e,source:t,localized:n})=>[e,n?{source:t,localized:!0}:{source:t}])),T=(e,n)=>n.length>0?new t({name:e,values:Object.fromEntries(n.map(({name:e,description:t})=>[e,{description:t}]))}):void 0,A=e=>({type:new a(new o(new a(e)))}),I=new a(new o(new a(y))),N=' Each is { type, severity, entityId, message }: severity is "warning" or "notice", entityId the entity it is on or null, message the warning as the user would be told it or null.',M={sameForAllInstances:e=>`Same recipes for every ${e}.`,constantDuringSession:()=>"Fixed for the session."},x={sameForAllInstances:e=>`Same for every ${e}.`,constantDuringSession:()=>"Fixed for the session."},W=(e,t,n)=>e.map(e=>` ${t[e](n)}`).join(""),C=({section:e,typeSuffix:t},n,{entityType:i,purpose:s,recipeGroup:o})=>0===n.length?{}:{[e]:{type:new a(new r({name:`${i}${t}`,fields:Object.fromEntries(n.map(({groupId:e,description:t,dryRuns:n,hints:s})=>{let a;return[e,{type:o,description:`${!(a=t?.trim())?"":/[.!?]$/.test(a)?`${a} `:`${a}. `}Null while the configurator does not offer it on the entity.${n?"":" Cannot be dry-run."}${W(s,M,i)}`}]}))})),description:`The recipe groups for ${s} this ${i}, one field each.`}},D=({entityType:n,childRecipes:i,replaceRecipes:s,optionsEdges:d,screenshots:h,selectable:l,hasInvariants:c},{recipeGroup:p,fieldOption:w,screenshot:g})=>new r({name:`${n}Meta`,fields:Object.assign(C(v,i,{entityType:n,purpose:"adding children to",recipeGroup:p}),C(b,s,{entityType:n,purpose:"replacing",recipeGroup:p}),...d.map(({options:{edgeName:e,field:t,validate:i,dryRuns:s},hints:r})=>({[e]:{type:new o(new a(w)),args:{values:{type:new o(new a(y)),description:"Only the options with these values; values not listed are ignored."}},description:`Values "${t}" accepts on this ${n}. Null when there is no choice to make.${i?"":" Not checked on write."}${s?"":" Cannot be dry-run."}${W(r,x,n)}`}})),0===h.length?{}:{screenshot:{type:g,args:{view:{type:new a(new t({name:`${n}ScreenshotView`,values:Object.fromEntries(h.map(({view:e,description:t})=>[e,{description:t}]))}))}},description:"Renders this entity from a predefined view. The picture follows the tool result as an image labelled with `image`. Null when the view does not apply to this entity right now."}},l?{selectable:{type:new a(e),description:`Whether the user can select this ${n} right now, so select(id:) can select it.`}}:{},c?{warnings:{type:I,description:`The warnings and notices this ${n} has right now.${N}`}}:{})}),F=(e,t)=>t?e?"What can be done to this entity right now, and its warnings.":"The warnings of this entity right now.":"What can be done to this entity right now.",q=e=>Object.entries(e).map(([e,t])=>`${e} (${t.map(({groupId:e})=>e).join(", ")})`);export const buildAssistantManifest=t=>{var M;let x,W,C,U,V,K,{entityTypes:G,aliases:P,exampleType:z,fields:B,states:L,deletableTypes:Q,writableTypes:H,actionFields:J,navigation:X,optionsEdges:Y,invariantTypes:Z}=t,{childRecipes:_,replaceRecipes:ee}=t,et=t.exposedTypes??G,en=new Map,ei=new Map,es=new Map,eo=e=>{let[t,...n]=Object.entries(P).find(([t])=>t===e)?.[1]??[];return(t&&0===n.length?ei.get(t):void 0)??es.get(e)??er},ea=e=>ei.get(e)??eo(e),er=new s({name:f,description:"Every entity of the configuration.",fields:()=>R(B[f]??[],ea,{exampleType:z,optionsEdgeOf:et.length===G.length?E(G,Y):j})});for(let[e,t]of(es.set(f,er),Object.entries(P)))e!==f&&t.every(e=>et.includes(e))&&es.set(e,new s({name:e,interfaces:[er],fields:()=>R(B[e]??[],ea,{optionsEdgeOf:E(t,Y)})}));let ed={};for(let e of et){let t=[f,...Object.entries(P).filter(([t,n])=>t!==f&&n.includes(e)).map(([e])=>e)],n=B[e]??[];ed[e]=k(n),ei.set(e,new r({name:e,interfaces:t.flatMap(e=>es.get(e)??[]),fields:()=>{let t=en.get(e);return{...R(n,ea,{optionsEdgeOf:E([e],Y)}),...t?{meta:{type:new a(t.type),description:t.description}}:{}}}}))}let eh=et.length<G.length?new r({name:p,description:"An entity of a type this schema does not describe in detail: `type` names its type, and only the fields of AnyDomainEntity can be read.",interfaces:[er],fields:()=>R(B[f]??[],ea,{exampleType:z})}):void 0;eh&&(ed[p]=k(B[f]??[]));let el=(x=()=>eo(es.has(m)?m:f),W=()=>eo(f),new r({name:"DryRun",description:"What using a recipe or writing an option would do, tried out on the configuration the query reads. Nothing is changed.",fields:()=>({ok:{type:new a(e),description:"Whether the change would succeed on the configuration the query reads."},root:{type:x(),description:"The root entity of the configuration as it would be after the change; null when ok is false. Everything selected under it reads that configuration."},changedEntities:{type:new a(new o(new a(W()))),description:"Entities the change would add or modify: the ones it changes itself, whatever their type, and the others of the types this schema describes in detail; empty when ok is false. One whose id is not in the configuration would be added, and its real id may differ. An entity written to is listed even when its values stay the same."},deletedEntityIds:{type:new a(new o(new a(n))),description:"The ids of the entities the change would remove: the ones it removes itself, whatever their type, and the others of the types this schema describes in detail; empty when ok is false."},sideEffects:{type:new a(new o(new a(h))),description:"The major or unexpected things the configurator would change along with it; empty when ok is false."},warnings:{type:I,description:`The warnings and notices the change would newly cause, which do not stop it; empty when ok is false.${N}`},errors:{type:I,description:"Why the change cannot be made; empty when ok is true. Each is { type, entityId, message, details? }: type the kind of problem, entityId the entity it is on or null, message the problem as the user would be told it, and details what this change in particular would do, only when it says more than message."}})})),ec={recipeGroup:(M=[...Object.keys(_).length>0?[v.mutation]:[],...Object.keys(ee).length>0?[b.mutation]:[]],C=M.join(" or "),U=new r({name:"Recipe",description:`${M.includes("addChild")?"One thing that can be added to the entity (under childRecipes)":"One thing the entity can be replaced with (under replaceRecipes)"}${M.length>1?" or that it can be replaced with (under replaceRecipes)":""}.`,fields:{key:{type:new a(h),description:`Pass to ${C} as recipeKey, or to recipes(keys:) to read this recipe again.`},name:{type:new a(h),description:"Name shown to the user."},description:{type:h},imageUrl:{type:h,description:"Thumbnail shown to the user."},dryRun:{type:el,description:"What using this recipe would do. Null when it cannot be tried."}}}),new r({name:"RecipeGroup",description:"A group of recipes for this entity.",fields:{groupId:{type:new a(h),description:`Pass to ${C} as groupId.`},name:{type:new a(h),description:"Name shown to the user."},description:{type:h},recipes:{type:new a(new o(new a(U))),args:{keys:{type:new o(new a(h)),description:"Only the recipes with these keys; keys not in the group are ignored."}}}}})),fieldOption:new r({name:"FieldOption",description:"One value a field accepts. Writing a value outside the list is rejected unless the field description says it is not checked.",fields:{value:{type:new a(y),description:"The value to write to the field."},name:{type:h,description:"Name shown to the user."},description:{type:h},imageUrl:{type:h,description:"Image shown to the user."},color:{type:h,description:'Color shown to the user, as "#rrggbb".'},dryRun:{type:el,description:"What writing this value would do. Null when it cannot be tried."}}}),screenshot:new r({name:"Screenshot",description:"A screenshot of an entity. The picture itself follows the tool result.",fields:{image:{type:new a(n),description:"Label of the image that follows the tool result."}}})};for(let e of et){let n=$(_,e)??[],i=$(ee,e)??[],s=$(Y,e)??[],o=$(t.screenshots,e)??[],a=Z.includes(e),r=t.select.some(t=>t.entityTypes.includes(e)),d=n.length>0||i.length>0||s.length>0||o.length>0||r;(d||a)&&en.set(e,{description:F(d,a),type:D({entityType:e,childRecipes:n,replaceRecipes:i,optionsEdges:s,screenshots:o,selectable:r,hasInvariants:a},ec)})}let ep={navigationState:T("NavigationState",X.navigationStates),viewState:T("ViewState",X.viewStates),toolState:T("ToolState",X.toolStates)},ey=((e,t)=>{let n={...e.navigationStates.length>1?{navigationState:{type:new a(h),description:t.navigationState?"Active navigation state; it may be one `NavigationState` does not list.":"Active navigation state."}}:{},...e.viewStates.length>1?{viewState:{type:new a(h),description:t.viewState?"Active view state; it may be one `ViewState` does not list.":"Active view state."}}:{},...e.toolStates.length>1?{toolState:{type:new a(h),description:t.toolState?"Active tool state; it may be one `ToolState` does not list.":"Active tool state."}}:{},...(({navigationState:e,viewState:t,toolState:n})=>e||t||n?{available:{type:new a(new r({name:"AvailableNavigation",description:"The states the user can be moved to right now, besides the active ones.",fields:{...e?{navigationStates:A(e)}:{},...t?{viewStates:A(t)}:{},...n?{toolStates:A(n)}:{}}}))}}:{})(t)};if(0!==Object.keys(n).length)return new r({name:"Navigation",description:"The active UI states of the configurator.",fields:n})})(L,ep),ew=new d({query:(V=eo(es.has(m)?m:f),K=eo(f),new r({name:"Query",fields:{root:{type:new a(V),description:"The root entity of the configuration."},entities:{type:new a(new o(K)),args:{ids:{type:new o(new a(n))}},description:"Every entity, or the given ids in order with null for an unknown id."},selectedEntity:{type:new a(K),description:"The selected entity, or the root entity when nothing is selected."},...ey?{navigation:{type:new a(ey)}}:{},warnings:{type:I,description:`Every warning and notice of the configuration the query reads.${N}`}}})),mutation:(({deletableTypes:t,writableTypes:s,childRecipes:d,replaceRecipes:l,actionFields:c,navigationMutations:p,selectionMutations:y,objectTypes:g,optionsEdges:u,anyDomainEntity:f,targetOutputType:m})=>{let v,b;if(0!==t.length||0!==s.length||0!==Object.keys(d).length||0!==Object.keys(l).length||0!==c.length||0!==Object.keys(p).length||0!==Object.keys(y).length)return new r({name:"Mutation",fields:Object.assign(0===t.length?{}:{deleteEntity:{type:new a(new o(new a(n))),args:{id:{type:new a(n)}},description:`Deletes the entity and everything composed into it. Deletable types: ${t.join(", ")}. Returns the ids removed, the given one first, then the others of the types this schema describes in detail.`}},0===(v=q(d)).length?{}:{addChild:{type:new a(new o(new a(f))),args:{parentId:{type:new a(n)},groupId:{type:new a(h)},recipeKey:{type:new a(h)}},description:`Adds a child to the entity parentId from a recipe listed under its meta { childRecipes }. Types with child recipes: ${v.join("; ")}. Returns the entities added, the recipe's own first, then the others of the types this schema describes in detail; empty when they were removed again.`}},0===(b=q(l)).length?{}:{replaceEntity:{type:new a(new o(new a(f))),args:{entityId:{type:new a(n)},groupId:{type:new a(h)},recipeKey:{type:new a(h)}},description:`Replaces the entity entityId from a recipe listed under its meta { replaceRecipes }. Types with replace recipes: ${b.join("; ")}. The replacement is a new entity: it has a new id and the field values of its recipe, and entityId no longer exists. Returns the entities added, the replacement first, then the others of the types this schema describes in detail; empty when they were removed again.`}},...s.flatMap(e=>{let t=g.get(e.entityType);return t?[(({entityType:e,fields:t},s,o)=>{let r=Object.fromEntries(t.map(({name:e,type:t,description:n})=>[e,{type:w(t),description:O(n,o(e))}]));return{[`modify${e}`]:{type:s,args:{id:{type:new a(n)},delta:{type:new a(new i({name:`${e}Delta`,fields:r}))}},description:`Sets the fields named in delta on one ${e}. Returns the entity after the change, or null when the change removed it.`}}})(e,t,E([e.entityType],u))]:[]}),Object.fromEntries(c.map(t=>{var n,i;return[t.fieldName,{type:new a(t.result?(n=t.fieldName,i=t.result,new r({name:`${n.charAt(0).toUpperCase()+n.slice(1)}Result`,description:`What ${n} returns, read from the configuration after the change.`,fields:()=>Object.fromEntries(Object.entries(i).map(([e,t])=>[e,{type:"edge"===t.kind?S(t,m):w(t.type),description:t.description}]))})):e),args:Object.fromEntries(Object.entries(t.args).map(([e,t])=>[e,{type:w(t.type),description:t.description}])),description:t.result?t.description:[t.description,"Returns true once the change is applied."].filter(Boolean).join("\n\n")}]})),p,y)})})({deletableTypes:Q,writableTypes:H,childRecipes:_,replaceRecipes:ee,actionFields:J,navigationMutations:(({navigationState:e,viewState:t,toolState:n},i)=>i?{...e?{navigate:{type:new a(i),args:{to:{type:new a(e)}},description:"Switches the page the user is on to one listed under navigation { available { navigationStates } }; setting the active one changes nothing. Returns the navigation after the switch."}}:{},...t?{setView:{type:new a(i),args:{to:{type:new a(t)}},description:"Switches the view the user sees to one listed under navigation { available { viewStates } }; setting the active one changes nothing. Returns the navigation after the switch."}}:{},...n?{setTool:{type:new a(i),args:{to:{type:new a(n)}},description:"Switches the tool the user works with to one listed under navigation { available { toolStates } }; setting the active one changes nothing. Returns the navigation after the switch."}}:{}}:{})(ep,ey),selectionMutations:((e,t)=>{if(0===e.length)return{};let i=e.map(({name:e,description:t})=>void 0===t?e:`${e}: ${t}`);return{select:{type:new a(t),args:{id:{type:new a(n)}},description:`Selects the entity id, as the user does by clicking it, when its meta { selectable } is true; selecting the selected entity changes nothing. Types that can be selected: ${i.join("; ")}. Returns the selected entity.`},deselect:{type:new a(t),description:"Clears the selection, so the root entity is selected. Returns the selected entity."}}})(t.select,eo(f)),objectTypes:ei,optionsEdges:Y,anyDomainEntity:eo(f),targetOutputType:ea}),types:[...es.values(),...ei.values(),...eh?[eh]:[]]}),eg=c(ew);if(eg.length>0)throw Error(eg.map(e=>e.message).join(" "));let eu=l(ew);return{sdl:eu,navigationFields:[...L.navigationStates.length>1?["navigationState"]:[],...L.viewStates.length>1?["viewState"]:[],...L.toolStates.length>1?["toolState"]:[]],navigation:X,select:t.select,fields:ed,deletableTypes:Q,writableFields:Object.fromEntries(H.map(({entityType:e,fields:t})=>[e,Object.fromEntries(t.map(({name:e,property:t})=>[e,t]))])),childRecipes:_,replaceRecipes:ee,fieldOptions:Object.fromEntries(G.flatMap(e=>{let t=$(Y,e);return t?[[e,t.map(({options:e})=>e)]]:[]})),screenshots:Object.fromEntries(G.flatMap(e=>{let n=$(t.screenshots,e);return n?[[e,n]]:[]})),actions:Object.fromEntries(J.map(({fieldName:e,actionName:t})=>[e,t])),lenses:g(t,u(eu)),formElements:t.formElements,...void 0!==t.instructions&&{instructions:t.instructions},webmcp:!1!==t.webmcp,features:t.features}};