@salsita-ai/sdk 0.50.0-develop.be40f0cee8 → 0.50.0-develop.d6ed5efd42

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 (543) hide show
  1. package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
  2. package/dist/application-spec/generate-application/code/common/index.js +1 -1
  3. package/dist/application-spec/generate-application/code/common/project-module-list.d.ts +8 -0
  4. package/dist/application-spec/generate-application/code/common/project-module-list.js +3 -0
  5. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  6. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  7. package/dist/application-spec/generate-application/code/templates/admin-domain-code.d.ts +1 -2
  8. package/dist/application-spec/generate-application/code/templates/admin-domain-code.js +6 -14
  9. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.d.ts +1 -2
  10. package/dist/application-spec/generate-application/code/templates/admin-frontend-code.js +4 -4
  11. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -2
  12. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +7 -16
  13. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -2
  14. package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +7 -9
  15. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.d.ts +2 -2
  16. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.js +1 -1
  17. package/dist/application-spec/generate-application/code/templates/domain-spec.js +4 -4
  18. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  19. package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -0
  20. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  21. package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +1 -1
  22. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -1
  23. package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +41 -13
  24. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +1 -1
  25. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +2 -2
  26. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  27. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +1 -0
  28. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +6 -0
  29. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +30 -3
  30. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +19 -5
  31. package/dist/application-spec/generate-application/code/templates/webhook-builders.js +8 -4
  32. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +4 -3
  33. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +1 -1
  34. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +3 -8
  35. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
  36. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +9 -43
  37. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  38. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +2 -2
  39. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -21
  40. package/dist/client/phoenix-api.d.ts +58 -30
  41. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  42. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +158 -13
  43. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  44. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.d.ts +85 -0
  45. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.js +1 -0
  46. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +8 -3
  47. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  48. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +4 -0
  49. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  50. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +16 -1
  51. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  52. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.d.ts +9 -0
  53. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.js +1 -0
  54. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
  55. package/dist/configurator/common/frontend-analytics.d.ts +21 -21
  56. package/dist/configurator/index.d.ts +0 -1
  57. package/dist/configurator/index.js +1 -1
  58. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  59. package/dist/configurator/scene/scene-analytics/scene-analytics.d.ts +2 -2
  60. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  61. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +1 -6
  62. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
  63. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
  64. package/dist/configurator/ui/assistant/AssistantThread.d.ts +1 -6
  65. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  66. package/dist/configurator/ui/assistant/index.d.ts +1 -1
  67. package/dist/configurator/ui/assistant/index.js +1 -1
  68. package/dist/configurator/ui/assistant/thread-items.d.ts +1 -1
  69. package/dist/configurator/ui/assistant/tool-chip.d.ts +8 -1
  70. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  71. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.d.ts +5 -0
  72. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.js +1 -0
  73. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +2 -2
  74. package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
  75. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  76. package/dist/configurator/ui/legacy/mobile-controls/MobileControls.d.ts +1 -1
  77. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.d.ts +2 -2
  78. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
  79. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +84 -98
  80. package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
  81. package/dist/docs/index.json +1 -1
  82. package/dist/docs/layouts/custom-price.mdx +14 -16
  83. package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
  84. package/dist/docs/layouts/toolbar.mdx +3 -1
  85. package/dist/docs/other-features/domain-actions.mdx +1 -1
  86. package/dist/docs/other-features/side-effects.mdx +68 -34
  87. package/dist/docs/other-features/transformers.mdx +1 -1
  88. package/dist/docs/phoenix/admin.mdx +9 -24
  89. package/dist/docs/phoenix/localization.mdx +3 -22
  90. package/dist/docs/phoenix/phoenix-cli.mdx +81 -2
  91. package/dist/docs/phoenix/project-structure.mdx +9 -2
  92. package/dist/docs/phoenix/sdk-builder-workflow.mdx +4 -3
  93. package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
  94. package/dist/docs/relations/hierarchy.mdx +13 -2
  95. package/dist/domain/actions/action-factory.d.ts +4 -4
  96. package/dist/domain/admin-domain/__generated/enhanced-model.d.ts +1 -1
  97. package/dist/domain/admin-domain/__generated/model/versions/v1.d.ts +1 -1
  98. package/dist/domain/admin-domain/__generated/model/versions/v2.d.ts +1 -1
  99. package/dist/domain/admin-domain/__generated/model/versions/v3.d.ts +1 -1
  100. package/dist/domain/admin-domain/__generated/model/versions/v4.d.ts +1 -1
  101. package/dist/domain/admin-domain/__generated/model/versions/v5.d.ts +1 -1
  102. package/dist/domain/admin-domain/__generated/model/versions/v6.d.ts +2 -2
  103. package/dist/domain/admin-domain/__generated/model/versions/v6.js +1 -1
  104. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +1 -3
  105. package/dist/domain/admin-domain/implementation/common-admin-migrations.d.ts +1 -1
  106. package/dist/domain/admin-domain/index.d.ts +1 -1
  107. package/dist/domain/application/admin-page-factories.d.ts +1 -1
  108. package/dist/domain/application/application-config.d.ts +25 -75
  109. package/dist/domain/application/assistant/assistant-manifest.d.ts +61 -0
  110. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +95 -0
  111. package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
  112. package/dist/domain/application/assistant/assistant-value-type.js +1 -0
  113. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +4 -0
  114. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -0
  115. package/dist/{phoenix/application-spec → domain/application/assistant}/generate-assistant-prompt.d.ts +6 -5
  116. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -0
  117. package/dist/domain/application/assistant/index.d.ts +4 -0
  118. package/dist/domain/application/assistant/index.js +1 -0
  119. package/dist/domain/application/assistant-field-options.d.ts +2 -3
  120. package/dist/domain/application/assistant-mutations.d.ts +2 -4
  121. package/dist/domain/application/assistant-mutations.js +1 -1
  122. package/dist/domain/application/assistant-recipe-groups.d.ts +2 -4
  123. package/dist/domain/application/configurator-builder.d.ts +33 -18
  124. package/dist/domain/application/configurator-builder.js +1 -1
  125. package/dist/domain/application/element-registration.d.ts +5 -0
  126. package/dist/domain/application/element-registration.js +1 -1
  127. package/dist/domain/application/handler-registration.d.ts +5 -0
  128. package/dist/domain/application/handler-registration.js +1 -1
  129. package/dist/domain/application/index.d.ts +5 -4
  130. package/dist/domain/application/index.js +1 -1
  131. package/dist/domain/application/published-data/create-finalize-admin-domain.d.ts +1 -2
  132. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
  133. package/dist/domain/application/published-data/map-published-data.d.ts +1 -2
  134. package/dist/domain/application/resolve-imported-transformers.d.ts +12 -2
  135. package/dist/domain/application/resolve-imported-transformers.js +1 -1
  136. package/dist/domain/components/component-reader-types.d.ts +1 -2
  137. package/dist/domain/components/debug-state-component.d.ts +1 -1
  138. package/dist/domain/components/debug-state-component.js +1 -1
  139. package/dist/domain/components/domain-component-optic.d.ts +4 -6
  140. package/dist/domain/components/domain-component-optic.js +2 -2
  141. package/dist/domain/components/drag-state-component.d.ts +1 -1
  142. package/dist/domain/components/drag-state-component.js +1 -1
  143. package/dist/domain/components/export-state-component.d.ts +1 -1
  144. package/dist/domain/components/export-state-component.js +1 -1
  145. package/dist/domain/components/fullscreen-state-component.d.ts +1 -1
  146. package/dist/domain/components/fullscreen-state-component.js +1 -1
  147. package/dist/domain/components/group-components-by-entity-id-and-name.d.ts +1 -2
  148. package/dist/domain/components/group-components-by-entity-id-and-name.js +1 -1
  149. package/dist/domain/components/hover-state-component.d.ts +1 -1
  150. package/dist/domain/components/hover-state-component.js +1 -1
  151. package/dist/domain/components/legacy-filter.d.ts +1 -2
  152. package/dist/domain/components/navigation-state-component.d.ts +1 -1
  153. package/dist/domain/components/navigation-state-component.js +1 -1
  154. package/dist/domain/components/selection-state-component.d.ts +1 -1
  155. package/dist/domain/components/selection-state-component.js +1 -1
  156. package/dist/domain/components/system-component-builder.d.ts +1 -2
  157. package/dist/domain/components/system-component-builder.js +1 -1
  158. package/dist/domain/components/system-component-filter.d.ts +1 -3
  159. package/dist/domain/components/system-virtual-entity.js +1 -1
  160. package/dist/domain/components/tool-state-component.d.ts +1 -1
  161. package/dist/domain/components/tool-state-component.js +1 -1
  162. package/dist/domain/components/updates.d.ts +17 -2
  163. package/dist/domain/components/view-state-component.d.ts +1 -1
  164. package/dist/domain/components/view-state-component.js +1 -1
  165. package/dist/domain/components/viewport-state-component.d.ts +1 -1
  166. package/dist/domain/components/viewport-state-component.js +1 -1
  167. package/dist/domain/core/action.d.ts +4 -5
  168. package/dist/domain/core/decoder/create-decoder.d.ts +6 -0
  169. package/dist/domain/core/decoder/create-decoder.js +1 -0
  170. package/dist/domain/core/decoder/decoder.d.ts +6 -0
  171. package/dist/domain/core/decoder/index.d.ts +2 -0
  172. package/dist/domain/core/decoder/index.js +1 -0
  173. package/dist/domain/core/domain-factory.d.ts +3 -4
  174. package/dist/domain/core/domain-factory.js +1 -1
  175. package/dist/domain/core/domain.d.ts +3 -4
  176. package/dist/domain/core/domain.js +1 -1
  177. package/dist/domain/{expressions → core/expression}/constant-expressions.d.ts +2 -3
  178. package/dist/domain/core/expression/constant-expressions.js +1 -0
  179. package/dist/domain/{expressions → core/expression}/custom-expression.d.ts +4 -5
  180. package/dist/domain/core/expression/custom-expression.js +1 -0
  181. package/dist/domain/core/{expression.d.ts → expression/expression.d.ts} +6 -8
  182. package/dist/domain/core/expression/expression.js +1 -0
  183. package/dist/domain/core/expression/index.d.ts +5 -0
  184. package/dist/domain/core/expression/index.js +1 -0
  185. package/dist/domain/{expressions → core/expression}/memoize-expression.d.ts +2 -2
  186. package/dist/domain/{expressions → core/expression}/prepare-domain-expressions.d.ts +1 -1
  187. package/dist/domain/core/index.d.ts +7 -17
  188. package/dist/domain/core/index.js +1 -1
  189. package/dist/domain/core/{component.d.ts → model/component.d.ts} +1 -1
  190. package/dist/domain/core/model/index.d.ts +6 -0
  191. package/dist/domain/core/model/index.js +1 -0
  192. package/dist/domain/core/{reflection.d.ts → model/reflection.d.ts} +1 -1
  193. package/dist/domain/core/model/reflection.js +1 -0
  194. package/dist/domain/core/schema/enhanced-json-schema.js +1 -0
  195. package/dist/domain/core/schema/extended-schema-validator.js +1 -0
  196. package/dist/domain/core/schema/index.d.ts +3 -0
  197. package/dist/domain/core/schema/index.js +1 -0
  198. package/dist/domain/core/schema/schema-validator.js +1 -0
  199. package/dist/domain/core/state/id-sequence.d.ts +15 -0
  200. package/dist/domain/core/state/id-sequence.js +1 -0
  201. package/dist/domain/core/state/index.d.ts +3 -0
  202. package/dist/domain/core/state/index.js +1 -0
  203. package/dist/domain/core/{migrations.d.ts → state/migrations.d.ts} +1 -2
  204. package/dist/domain/core/{state.d.ts → state/state.d.ts} +1 -2
  205. package/dist/domain/domain-builder.d.ts +11 -8
  206. package/dist/domain/domain-builder.js +1 -1
  207. package/dist/domain/domain-context/action-system/action-system.d.ts +1 -3
  208. package/dist/domain/domain-context/action-system/action-system.js +1 -1
  209. package/dist/domain/domain-context/create-transformer.d.ts +1 -1
  210. package/dist/domain/domain-context/domain-context-systems.d.ts +1 -3
  211. package/dist/domain/domain-context/index.d.ts +2 -2
  212. package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +1 -2
  213. package/dist/domain/domain-context/navigation-system/navigation-updates.d.ts +1 -1
  214. package/dist/domain/domain-context/navigation-system/selection-transformers.d.ts +1 -1
  215. package/dist/domain/domain-context/navigation-system/selection-transformers.js +1 -1
  216. package/dist/domain/domain-context/recipe-system/recipes.d.ts +1 -3
  217. package/dist/domain/domain-context/recipe-system/recipes.js +1 -1
  218. package/dist/domain/domain-context/relation-transformers/cascade-deletes.d.ts +1 -1
  219. package/dist/domain/domain-context/relation-transformers/cascade-deletes.js +1 -1
  220. package/dist/domain/domain-context/relation-transformers/cascade-ref-pruning.d.ts +1 -1
  221. package/dist/domain/domain-context/relation-transformers/create-entity-refs.d.ts +1 -1
  222. package/dist/domain/domain-context/relation-transformers/replace-refs.d.ts +1 -1
  223. package/dist/domain/domain-context/store-system/apply-updates.d.ts +1 -2
  224. package/dist/domain/domain-context/store-system/apply-updates.js +1 -1
  225. package/dist/domain/domain-context/store-system/next-domain-entity-id.d.ts +1 -12
  226. package/dist/domain/domain-context/store-system/next-domain-entity-id.js +1 -1
  227. package/dist/domain/domain-context/store-system/reconcile-projected-entities.d.ts +1 -1
  228. package/dist/domain/domain-context/store-system/store-system.d.ts +1 -3
  229. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  230. package/dist/domain/domain-context/store-system/system-state.d.ts +1 -3
  231. package/dist/domain/domain-context/transformers/actions-builder.d.ts +1 -1
  232. package/dist/domain/domain-context/transformers/actions-builder.js +1 -1
  233. package/dist/domain/domain-context/transformers/auto-snap-transformer.d.ts +1 -2
  234. package/dist/domain/domain-context/transformers/chain-builder.d.ts +2 -2
  235. package/dist/domain/domain-context/transformers/context.d.ts +1 -3
  236. package/dist/domain/domain-context/transformers/entity-builder.d.ts +1 -1
  237. package/dist/domain/domain-context/transformers/entity-builder.js +1 -1
  238. package/dist/domain/domain-context/transformers/then-builder.d.ts +1 -1
  239. package/dist/domain/domain-context/transformers/then-builder.js +1 -1
  240. package/dist/domain/domain-context/transformers/when-builder.d.ts +1 -2
  241. package/dist/domain/domain-context/transformers/when-builder.js +1 -1
  242. package/dist/domain/domain-context/undo-system.d.ts +1 -1
  243. package/dist/domain/domain-runtime/domain-context/component-reader.d.ts +1 -3
  244. package/dist/domain/domain-runtime/domain-context/component-reader.js +1 -1
  245. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +1 -2
  246. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  247. package/dist/domain/domain-runtime/domain-runtime.d.ts +4 -4
  248. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  249. package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
  250. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  251. package/dist/domain/domain-runtime/spec/types.d.ts +3 -3
  252. package/dist/domain/index.d.ts +3 -4
  253. package/dist/domain/index.js +1 -1
  254. package/dist/domain/invariants/builtin-invariant.d.ts +1 -2
  255. package/dist/domain/invariants/custom-invariants.d.ts +1 -3
  256. package/dist/domain/invariants/invariants.d.ts +10 -4
  257. package/dist/domain/invariants/invariants.js +1 -1
  258. package/dist/domain/invariants/violation.d.ts +1 -1
  259. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +3 -3
  260. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  261. package/dist/domain/project-modules/index.d.ts +1 -0
  262. package/dist/domain/project-modules/index.js +1 -0
  263. package/dist/domain/project-modules/project-modules.d.ts +41 -0
  264. package/dist/domain/project-modules/project-modules.js +1 -0
  265. package/dist/domain/projections/projected-entities-projections.d.ts +1 -2
  266. package/dist/domain/projections/snap-matching.d.ts +1 -2
  267. package/dist/domain/projections/snap-utils.d.ts +1 -2
  268. package/dist/domain/relations/all-of-type-relation.d.ts +1 -4
  269. package/dist/domain/relations/all-of-type-relation.js +1 -1
  270. package/dist/domain/relations/component-factories.d.ts +1 -2
  271. package/dist/domain/relations/composed-of.d.ts +1 -1
  272. package/dist/domain/relations/composed-of.js +1 -1
  273. package/dist/domain/relations/direct-relation.d.ts +1 -3
  274. package/dist/domain/relations/indirect-relation.d.ts +1 -4
  275. package/dist/domain/relations/indirect-relation.js +1 -1
  276. package/dist/domain/relations/reference-component.d.ts +1 -2
  277. package/dist/domain/relations/reference-component.js +1 -1
  278. package/dist/domain/relations/reference-field.d.ts +1 -1
  279. package/dist/domain/relations/relation-factory.d.ts +1 -3
  280. package/dist/domain/relations/relation-implementation.d.ts +1 -4
  281. package/dist/domain/system-components/admin-sidebar.d.ts +1 -1
  282. package/dist/domain/system-components/admin-sidebar.js +1 -1
  283. package/dist/domain/system-components/angle-indicator.d.ts +1 -1
  284. package/dist/domain/system-components/angle-indicator.js +1 -1
  285. package/dist/domain/system-components/application-config.d.ts +1 -1
  286. package/dist/domain/system-components/application-config.js +1 -1
  287. package/dist/domain/system-components/attribute-selection.js +1 -1
  288. package/dist/domain/system-components/autorotate-camera-component.d.ts +1 -1
  289. package/dist/domain/system-components/basic-sidebar-footer.d.ts +1 -1
  290. package/dist/domain/system-components/basic-sidebar-footer.js +1 -1
  291. package/dist/domain/system-components/bounding-box-component.d.ts +1 -1
  292. package/dist/domain/system-components/bounding-sphere-component.d.ts +1 -1
  293. package/dist/domain/system-components/camera-based-hidden-entity-object.js +1 -1
  294. package/dist/domain/system-components/camera-based-hidden-entity.js +1 -1
  295. package/dist/domain/system-components/canvas-config.d.ts +1 -1
  296. package/dist/domain/system-components/canvas-config.js +1 -1
  297. package/dist/domain/system-components/canvas-padding.d.ts +1 -1
  298. package/dist/domain/system-components/canvas-padding.js +1 -1
  299. package/dist/domain/system-components/canvas-preset-environment.d.ts +1 -1
  300. package/dist/domain/system-components/canvas-preset-environment.js +1 -1
  301. package/dist/domain/system-components/child-entity-selection.d.ts +1 -1
  302. package/dist/domain/system-components/client-side-image.js +1 -1
  303. package/dist/domain/system-components/collision-box-geometry.d.ts +1 -1
  304. package/dist/domain/system-components/collision-geometries.d.ts +1 -1
  305. package/dist/domain/system-components/collision-geometry.d.ts +1 -1
  306. package/dist/domain/system-components/collision-point-geometry.d.ts +1 -1
  307. package/dist/domain/system-components/common/dimension-indicator-schema.d.ts +1 -1
  308. package/dist/domain/system-components/common/dimension-indicator-schema.js +1 -1
  309. package/dist/domain/system-components/constraint.d.ts +1 -1
  310. package/dist/domain/system-components/create-blueprint.d.ts +1 -1
  311. package/dist/domain/system-components/custom-header.d.ts +1 -1
  312. package/dist/domain/system-components/custom-header.js +1 -1
  313. package/dist/domain/system-components/custom-scene-entity.d.ts +1 -1
  314. package/dist/domain/system-components/custom-scene-entity.js +1 -1
  315. package/dist/domain/system-components/custom-sidebar-footer.d.ts +1 -1
  316. package/dist/domain/system-components/custom-sidebar-footer.js +1 -1
  317. package/dist/domain/system-components/dimension-indicator.d.ts +1 -1
  318. package/dist/domain/system-components/dimension-indicator.js +1 -1
  319. package/dist/domain/system-components/distance-dimension-select.d.ts +1 -1
  320. package/dist/domain/system-components/distance-dimension-select.js +1 -1
  321. package/dist/domain/system-components/distance-dimension.d.ts +1 -1
  322. package/dist/domain/system-components/distance-dimension.js +1 -1
  323. package/dist/domain/system-components/drag-handle.d.ts +1 -1
  324. package/dist/domain/system-components/drag-handle.js +1 -1
  325. package/dist/domain/system-components/editable-angle-indicator.d.ts +1 -1
  326. package/dist/domain/system-components/editable-angle-indicator.js +1 -1
  327. package/dist/domain/system-components/editable-distance-dimension-indicator.d.ts +1 -1
  328. package/dist/domain/system-components/editable-distance-dimension-indicator.js +1 -1
  329. package/dist/domain/system-components/editable-offset-indicator.d.ts +1 -1
  330. package/dist/domain/system-components/editable-offset-indicator.js +1 -1
  331. package/dist/domain/system-components/editable-size-indicator.d.ts +1 -1
  332. package/dist/domain/system-components/editable-size-indicator.js +1 -1
  333. package/dist/domain/system-components/exit-tool-mode-fab.d.ts +1 -1
  334. package/dist/domain/system-components/exit-tool-mode-fab.js +1 -1
  335. package/dist/domain/system-components/finalize-action.d.ts +1 -1
  336. package/dist/domain/system-components/finalize-action.js +1 -1
  337. package/dist/domain/system-components/fixed-header.d.ts +1 -1
  338. package/dist/domain/system-components/fixed-header.js +1 -1
  339. package/dist/domain/system-components/floating-header.d.ts +1 -1
  340. package/dist/domain/system-components/floating-header.js +1 -1
  341. package/dist/domain/system-components/generic-dimension.d.ts +1 -1
  342. package/dist/domain/system-components/generic-dimension.js +1 -1
  343. package/dist/domain/system-components/hidden-header.d.ts +1 -1
  344. package/dist/domain/system-components/hidden-header.js +1 -1
  345. package/dist/domain/system-components/hidden-sidebar-footer.d.ts +1 -1
  346. package/dist/domain/system-components/hidden-sidebar-footer.js +1 -1
  347. package/dist/domain/system-components/horizontal-tabs.d.ts +1 -1
  348. package/dist/domain/system-components/horizontal-tabs.js +1 -1
  349. package/dist/domain/system-components/hotspot-drag-handle.d.ts +1 -1
  350. package/dist/domain/system-components/hotspot-drag-handle.js +1 -1
  351. package/dist/domain/system-components/list-selector-dimension-indicator.d.ts +1 -1
  352. package/dist/domain/system-components/list-selector-dimension-indicator.js +1 -1
  353. package/dist/domain/system-components/material-swatch.js +1 -1
  354. package/dist/domain/system-components/offset-anchors.d.ts +1 -1
  355. package/dist/domain/system-components/offset-anchors.js +1 -1
  356. package/dist/domain/system-components/offset-indicator.d.ts +1 -2
  357. package/dist/domain/system-components/offset-indicator.js +1 -1
  358. package/dist/domain/system-components/offset.d.ts +1 -1
  359. package/dist/domain/system-components/offset.js +1 -1
  360. package/dist/domain/system-components/other-action.d.ts +1 -1
  361. package/dist/domain/system-components/other-action.js +1 -1
  362. package/dist/domain/system-components/pivot-point.d.ts +1 -1
  363. package/dist/domain/system-components/pivot-point.js +1 -1
  364. package/dist/domain/system-components/price.js +1 -1
  365. package/dist/domain/system-components/projected-entities.d.ts +1 -1
  366. package/dist/domain/system-components/projected-entities.js +1 -1
  367. package/dist/domain/system-components/property-page.d.ts +1 -1
  368. package/dist/domain/system-components/property-page.js +1 -1
  369. package/dist/domain/system-components/read-sidebar-footer.d.ts +1 -1
  370. package/dist/domain/system-components/read-sidebar-footer.js +1 -1
  371. package/dist/domain/system-components/save-template-thumbnail.js +1 -1
  372. package/dist/domain/system-components/scene-entity-add-fab.js +1 -1
  373. package/dist/domain/system-components/scene-entity-delete-fab.js +1 -1
  374. package/dist/domain/system-components/scene-entity-local-material-override.js +1 -1
  375. package/dist/domain/system-components/scene-entity-material-override.js +1 -1
  376. package/dist/domain/system-components/scene-entity-navigation-hotspot.js +1 -1
  377. package/dist/domain/system-components/scene-entity-object-local-material-override.js +1 -1
  378. package/dist/domain/system-components/scene-entity-object-material-override.js +1 -1
  379. package/dist/domain/system-components/scene-entity-object-remote-material-override.js +1 -1
  380. package/dist/domain/system-components/scene-entity-object-transimissive-material-override.js +1 -1
  381. package/dist/domain/system-components/scene-entity-remote-material-override.js +1 -1
  382. package/dist/domain/system-components/scene-entity-select-hotspot.js +1 -1
  383. package/dist/domain/system-components/scene-entity-transimissive-material-override.js +1 -1
  384. package/dist/domain/system-components/sidebar-tabs.d.ts +1 -1
  385. package/dist/domain/system-components/sidebar-tabs.js +1 -1
  386. package/dist/domain/system-components/simple-summary.js +1 -1
  387. package/dist/domain/system-components/size.d.ts +1 -1
  388. package/dist/domain/system-components/size.js +1 -1
  389. package/dist/domain/system-components/sketching-draw.d.ts +1 -1
  390. package/dist/domain/system-components/sketching-draw.js +1 -1
  391. package/dist/domain/system-components/sketching-edit.d.ts +1 -1
  392. package/dist/domain/system-components/sketching-edit.js +1 -1
  393. package/dist/domain/system-components/sketching-line.d.ts +1 -1
  394. package/dist/domain/system-components/sketching-line.js +1 -1
  395. package/dist/domain/system-components/sketching-rectangle.d.ts +1 -1
  396. package/dist/domain/system-components/sketching-rectangle.js +1 -1
  397. package/dist/domain/system-components/sketching.d.ts +1 -1
  398. package/dist/domain/system-components/sketching.js +1 -1
  399. package/dist/domain/system-components/snap-axis.d.ts +1 -1
  400. package/dist/domain/system-components/snap-axis.js +1 -1
  401. package/dist/domain/system-components/snap-edge.d.ts +1 -1
  402. package/dist/domain/system-components/snap-edge.js +1 -1
  403. package/dist/domain/system-components/snap-plane.d.ts +1 -1
  404. package/dist/domain/system-components/snap-plane.js +1 -1
  405. package/dist/domain/system-components/snap-point.d.ts +1 -1
  406. package/dist/domain/system-components/snap-point.js +1 -1
  407. package/dist/domain/system-components/summary-component.js +1 -1
  408. package/dist/domain/system-components/tool-menu-fab.d.ts +1 -1
  409. package/dist/domain/system-components/tool-menu-fab.js +1 -1
  410. package/dist/domain/system-components/toolbar.d.ts +1 -1
  411. package/dist/domain/system-components/toolbar.js +1 -1
  412. package/dist/domain/system-components/universal-sidebar-footer.d.ts +1 -1
  413. package/dist/domain/system-components/universal-sidebar-footer.js +1 -1
  414. package/dist/domain/utils/eval-cache.d.ts +1 -2
  415. package/dist/domain/utils/memo-eval.d.ts +1 -3
  416. package/dist/editor/Editor.js +1 -1
  417. package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -6
  418. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  419. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  420. package/dist/editor/variants/VariantAnswerFooter.d.ts +17 -0
  421. package/dist/editor/variants/VariantAnswerFooter.js +1 -0
  422. package/dist/editor/variants/VariantPreviewHandler.d.ts +6 -0
  423. package/dist/editor/variants/VariantPreviewHandler.js +1 -0
  424. package/dist/editor/variants/variant-preview-styles.d.ts +49 -0
  425. package/dist/editor/variants/variant-preview-styles.js +1 -0
  426. package/dist/i18n/locales/cs/messages.js +1 -1
  427. package/dist/i18n/locales/da/messages.js +1 -1
  428. package/dist/i18n/locales/de/messages.js +1 -1
  429. package/dist/i18n/locales/de-AT/messages.js +1 -1
  430. package/dist/i18n/locales/en/messages.js +1 -1
  431. package/dist/i18n/locales/en-AU/messages.js +1 -1
  432. package/dist/i18n/locales/en-GB/messages.js +1 -1
  433. package/dist/i18n/locales/es/messages.js +1 -1
  434. package/dist/i18n/locales/fr/messages.js +1 -1
  435. package/dist/i18n/locales/hu/messages.js +1 -1
  436. package/dist/i18n/locales/it/messages.js +1 -1
  437. package/dist/i18n/locales/nl/messages.js +1 -1
  438. package/dist/i18n/locales/pl/messages.js +1 -1
  439. package/dist/i18n/locales/pt/messages.js +1 -1
  440. package/dist/i18n/locales/ro/messages.js +1 -1
  441. package/dist/i18n/locales/sk/messages.js +1 -1
  442. package/dist/i18n/locales/tr/messages.js +1 -1
  443. package/dist/legacy/domain-cli/gen/configurator-builder.js +21 -8
  444. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  445. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  446. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -19
  447. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +15 -16
  448. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +22 -23
  449. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +15 -16
  450. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.d.ts +7 -2
  451. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.js +8 -12
  452. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.d.ts +1 -1
  453. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.js +1 -1
  454. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/webhook-builders.js +7 -7
  455. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  456. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +4 -3
  457. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  458. package/dist/phoenix/cli.js +1 -1
  459. package/dist/phoenix/commands/deploy.js +2 -2
  460. package/dist/phoenix/commands/dev.js +5 -5
  461. package/dist/phoenix/commands/index.d.ts +1 -0
  462. package/dist/phoenix/commands/index.js +1 -1
  463. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  464. package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
  465. package/dist/phoenix/commands/story-dev.js +2 -2
  466. package/dist/phoenix/commands/variants.d.ts +35 -0
  467. package/dist/phoenix/commands/variants.js +1 -0
  468. package/dist/phoenix/editor-server/commands-router.d.ts +68 -1
  469. package/dist/phoenix/editor-server/commands-router.js +1 -1
  470. package/dist/phoenix/editor-server/editor-router.d.ts +65 -0
  471. package/dist/phoenix/editor-server/editor-server.d.ts +3 -3
  472. package/dist/phoenix/editor-server/editor-server.js +1 -1
  473. package/dist/phoenix/editor-server/protocol.d.ts +1 -0
  474. package/dist/phoenix/editor-server/spec-router.js +1 -1
  475. package/dist/phoenix/editor-server/trpc.d.ts +3 -0
  476. package/dist/phoenix/scripts/build-admin.js +1 -1
  477. package/dist/phoenix/services/application-spec-project-watcher.d.ts +13 -2
  478. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  479. package/dist/phoenix/services/index.d.ts +4 -0
  480. package/dist/phoenix/services/index.js +1 -1
  481. package/dist/phoenix/services/phoenix-application.d.ts +21 -0
  482. package/dist/phoenix/services/phoenix-application.js +1 -0
  483. package/dist/phoenix/services/phoenix-store.d.ts +48 -0
  484. package/dist/phoenix/services/phoenix-store.js +1 -0
  485. package/dist/phoenix/services/phx-variant-previews-plugin.d.ts +9 -0
  486. package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
  487. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  488. package/dist/phoenix/services/variant-file-session.d.ts +36 -0
  489. package/dist/phoenix/services/variant-file-session.js +1 -0
  490. package/dist/phoenix/services/variant-preview-service.d.ts +80 -0
  491. package/dist/phoenix/services/variant-preview-service.js +1 -0
  492. package/dist/phoenix/services/vite-config.js +1 -1
  493. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +2 -2
  494. package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts +21 -21
  495. package/dist/react-sdk/application-runtime/hooks/data/use-published-data.d.ts +1 -1
  496. package/dist/react-sdk/application-runtime/hooks/use-domain-application-props.d.ts +5 -2
  497. package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
  498. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.d.ts +1 -1
  499. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  500. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +4 -4
  501. package/dist/ui-sdk/common/use-viewport-size.d.ts +4 -1
  502. package/dist/ui-sdk/common/use-viewport-size.js +1 -1
  503. package/dist/ui-sdk/components/mobile-controls/index.d.ts +1 -1
  504. package/dist/webhook/builders/common.d.ts +3 -0
  505. package/dist/webhook/builders/webhook-builder.d.ts +1 -1
  506. package/dist/webhook/builders/webhook-builder.js +1 -1
  507. package/package.json +4 -4
  508. package/dist/configurator/assistant/index.d.ts +0 -1
  509. package/dist/configurator/assistant/index.js +0 -1
  510. package/dist/configurator/assistant/use-assistant-chat.d.ts +0 -30
  511. package/dist/configurator/assistant/use-assistant-chat.js +0 -1
  512. package/dist/configurator/ui/assistant/AssistantPanelProvider.d.ts +0 -42
  513. package/dist/configurator/ui/assistant/AssistantPanelProvider.js +0 -1
  514. package/dist/domain/core/json-schema.js +0 -1
  515. package/dist/domain/core/reflection.js +0 -1
  516. package/dist/domain/expressions/constant-expressions.js +0 -1
  517. package/dist/domain/expressions/custom-expression.js +0 -1
  518. package/dist/domain/expressions/index.d.ts +0 -1
  519. package/dist/domain/expressions/index.js +0 -1
  520. package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
  521. /package/dist/domain/{core/enhanced-json-schema.js → application/assistant/assistant-manifest.js} +0 -0
  522. /package/dist/domain/{core/expression.js → application/assistant/assistant-resolved-manifest.js} +0 -0
  523. /package/dist/domain/core/{schema-validator.js → decoder/decoder.js} +0 -0
  524. /package/dist/domain/{expressions → core/expression}/memoize-expression.js +0 -0
  525. /package/dist/domain/{expressions → core/expression}/prepare-domain-expressions.js +0 -0
  526. /package/dist/domain/core/{alias.d.ts → model/alias.d.ts} +0 -0
  527. /package/dist/domain/core/{alias.js → model/alias.js} +0 -0
  528. /package/dist/domain/core/{common-definitions.d.ts → model/common-definitions.d.ts} +0 -0
  529. /package/dist/domain/core/{common-definitions.js → model/common-definitions.js} +0 -0
  530. /package/dist/domain/core/{component.js → model/component.js} +0 -0
  531. /package/dist/domain/core/{model.d.ts → model/model.d.ts} +0 -0
  532. /package/dist/domain/core/{model.js → model/model.js} +0 -0
  533. /package/dist/domain/core/{preset.d.ts → model/preset.d.ts} +0 -0
  534. /package/dist/domain/core/{preset.js → model/preset.js} +0 -0
  535. /package/dist/domain/core/{schema-validator-ajv.d.ts → schema/create-ajv-schema-validator.d.ts} +0 -0
  536. /package/dist/domain/core/{schema-validator-ajv.js → schema/create-ajv-schema-validator.js} +0 -0
  537. /package/dist/domain/core/{schema-validator-csp.d.ts → schema/create-csp-schema-validator.d.ts} +0 -0
  538. /package/dist/domain/core/{schema-validator-csp.js → schema/create-csp-schema-validator.js} +0 -0
  539. /package/dist/domain/core/{enhanced-json-schema.d.ts → schema/enhanced-json-schema.d.ts} +0 -0
  540. /package/dist/domain/core/{json-schema.d.ts → schema/extended-schema-validator.d.ts} +0 -0
  541. /package/dist/domain/core/{schema-validator.d.ts → schema/schema-validator.d.ts} +0 -0
  542. /package/dist/domain/core/{migrations.js → state/migrations.js} +0 -0
  543. /package/dist/domain/core/{state.js → state/state.js} +0 -0
@@ -1,26 +1,26 @@
1
1
  import type { MultilingualString } from '@salsita-ai/common/utils';
2
2
  import { type DomainEntity, type DomainEntityId, type EntityId, type EntityRecipe } from '#package/domain';
3
- declare const EntityChildrenListActionButtonClicked: (id: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
4
- declare const EntityChildrenListItemClicked: (id: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
5
- declare const AngleDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
6
- declare const AngleDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
7
- declare const GenericDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
8
- declare const GenericDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
9
- declare const DistanceDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
10
- declare const DistanceDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
11
- declare const SizeDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
12
- declare const OffsetDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
13
- declare const AttributeSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: string | number | boolean) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
14
- declare const DimensionSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: number) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
15
- declare const SwatchSelected: (instanceName: string, id: EntityId, value: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
16
- declare const ColorPickerChanged: (instanceName: string, id: EntityId, value: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
17
- declare const TextValueChanged: (instanceName: string, id: EntityId, value: string) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
18
- declare const MultilingualTextValueChanged: (instanceName: string, id: EntityId, value: MultilingualString) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
19
- declare const RecipesSelected: (recipes: ReadonlyArray<DomainEntity<string>>) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
20
- declare const RecipeReplacementSelected: (oldId: DomainEntityId<string>, recipes: ReadonlyArray<DomainEntity<string>>) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
21
- declare const ChildEntitySelected: (selectorType: string) => (id: EntityId, recipes: ReadonlyArray<EntityRecipe<DomainEntity<string>>>) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
22
- declare const EntityChildrenListDeleteButtonClicked: (id: EntityId) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
23
- declare const EntityDeleteButtonClicked: (id: EntityId) => import("../../../../domain/domain-context/analytics-system/analytics-contracts").UserActionEvent;
3
+ declare const EntityChildrenListActionButtonClicked: (id: string) => import("#package/domain").UserActionEvent;
4
+ declare const EntityChildrenListItemClicked: (id: string) => import("#package/domain").UserActionEvent;
5
+ declare const AngleDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
6
+ declare const AngleDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
7
+ declare const GenericDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
8
+ declare const GenericDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
9
+ declare const DistanceDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
10
+ declare const DistanceDimensionSliderDragged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
11
+ declare const SizeDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
12
+ declare const OffsetDimensionInputChanged: (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
13
+ declare const AttributeSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: string | number | boolean) => import("#package/domain").UserActionEvent;
14
+ declare const DimensionSelected: (selectorType: string) => (instanceName: string, id: EntityId, value: number) => import("#package/domain").UserActionEvent;
15
+ declare const SwatchSelected: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
16
+ declare const ColorPickerChanged: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
17
+ declare const TextValueChanged: (instanceName: string, id: EntityId, value: string) => import("#package/domain").UserActionEvent;
18
+ declare const MultilingualTextValueChanged: (instanceName: string, id: EntityId, value: MultilingualString) => import("#package/domain").UserActionEvent;
19
+ declare const RecipesSelected: (recipes: ReadonlyArray<DomainEntity<string>>) => import("#package/domain").UserActionEvent;
20
+ declare const RecipeReplacementSelected: (oldId: DomainEntityId<string>, recipes: ReadonlyArray<DomainEntity<string>>) => import("#package/domain").UserActionEvent;
21
+ declare const ChildEntitySelected: (selectorType: string) => (id: EntityId, recipes: ReadonlyArray<EntityRecipe<DomainEntity<string>>>) => import("#package/domain").UserActionEvent;
22
+ declare const EntityChildrenListDeleteButtonClicked: (id: EntityId) => import("#package/domain").UserActionEvent;
23
+ declare const EntityDeleteButtonClicked: (id: EntityId) => import("#package/domain").UserActionEvent;
24
24
  export declare const DomainControlsAnalytics: {
25
25
  ColorPickerChanged: typeof ColorPickerChanged;
26
26
  EntityChildrenListActionButtonClicked: typeof EntityChildrenListActionButtonClicked;
@@ -9,6 +9,6 @@ interface PublishedDataValueProviderProps extends PublishedDataValue {
9
9
  }
10
10
  export declare const PublishedDataValueProvider: (props: PublishedDataValueProviderProps) => import("react/jsx-runtime").JSX.Element;
11
11
  export declare const useProvidedPublishedData: () => PublishedDataValue;
12
- export declare const usePublishedData: () => Record<string, unknown> & import("../../../../domain/admin-domain/__generated/application-types").PublishedData;
12
+ export declare const usePublishedData: () => PublishedDataValue['publishedData'];
13
13
  export type UsePublishedData<PUBLISHED_DATA extends CommonAdminPublishedData> = () => PUBLISHED_DATA;
14
14
  export {};
@@ -1,8 +1,11 @@
1
- import type { AclConfig, DomainConfig, PersistenceConfig } from '#package/domain';
1
+ import type { AclConfig, AnyDomainComponentOptic, DomainConfig, PersistenceConfig } from '#package/domain';
2
2
  interface DomainApplicationProps {
3
3
  readonly deploymentId: string;
4
4
  readonly persistenceConfig: PersistenceConfig;
5
- readonly domainConfig: DomainConfig<any, any, any, any, any, any>;
5
+ /** The domain config as the runtime spec holds it: component optics already validated, never project modules. */
6
+ readonly domainConfig: Omit<DomainConfig<any, any, any, any, any, any>, 'componentOptics'> & {
7
+ readonly componentOptics: readonly AnyDomainComponentOptic[];
8
+ };
6
9
  readonly canCreate: AclConfig['canCreate'];
7
10
  readonly enableAdminRelease: boolean;
8
11
  }
@@ -1,6 +1,6 @@
1
1
  export declare const useConfiguratorSpec: () => import("../../../domain/index.js").ApplicationConfiguratorSpec;
2
2
  /** The application spec's `assistant` manifest, or nothing when the spec has no `assistant` section. */
3
- export declare const useSpecAssistant: () => import("../../../domain/index.js").AssistantManifest | null;
3
+ export declare const useSpecAssistant: () => Required<import("../../../domain/index.js").AssistantManifest> | null;
4
4
  export declare const useSpecTextLanguages: () => readonly string[];
5
5
  export declare const useSpecHandlerHashes: () => Record<string, string>;
6
6
  export declare const useSpecHandlers: () => readonly import("../../../domain/index.js").HandlerRegistration<any, any>[];
@@ -1,7 +1,7 @@
1
1
  import type { $DomainEntity, ApplicationConfig, DomainEntity, RegistrableTransformer, WebComponentOptions } from '#package/domain';
2
2
  import type { ApplicationRuntime } from '../runtime/react-runtime.js';
3
3
  import { type WebComponentApi } from '../web-component/index.js';
4
- export declare const createMockApplicationRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(_cfg: ApplicationConfig<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>, mocks: {
4
+ export declare const createMockApplicationRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(config: ApplicationConfig<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>, mocks: {
5
5
  frontendData: FRONTEND_DATA;
6
6
  publishedData: PUBLISHED_DATA;
7
7
  sessionData: SESSION_DATA;
@@ -1 +1 @@
1
- import{memoOnce as e}from"@salsita-ai/common/utils";import{createDomainRuntime as t,createMockDomainRuntimeServices as o,createMockSessionContext as n}from"#package/domain";import{createCommonServicesSelectors as s}from"../common-services/index.js";import{createDomainApplicationContextSelectors as i}from"../domain-application-context/index.js";import{createIntegrationActions as a,createIntegrationSelectors as r,initializeIntegration as c}from"../integration/index.js";import{createRoutingActions as m,createRoutingSelectors as d,initializeRouting as l}from"../routing/index.js";import{SessionService as p,createSessionRuntimeActions as S,createSessionRuntimeSelectors as g,initializeSessionRuntime as v}from"../session/index.js";import{createMockWebComponentApi as u}from"../web-component/index.js";export const createMockApplicationRuntime=(C,x)=>{var f;let b,y,w,A,D,k,E,I,h,j,R,T,O,L,F,{sessionData:M,mode:U,role:V}=x,z={...C,createTransformers:e=>x.transformers.map(t=>t.transformer.register(e,t.priority??1/0))},q=o(),B=(f={webComponentOptions:x.webComponentOptions??z.mount.options,webComponentApi:x.webComponentApi??u()},w=v(),A=t({config:z,services:q,getExtensionSystems:e=>F[e].getInitializableSystems()}),D=new Set,k=()=>{D.forEach(e=>{e()})},b=c({actions:E=a({setIntegration:e=>{b=e(b),k()}})}),I=r({getState:()=>({integration:b})}),h=m({setRouting:e=>{y=e(y),k()}}),y=l(),j=d({getState:()=>({...A.getState(),routing:y}),actions:h,accessActions:A.actions.access,loadedDataActions:A.actions.loadedData,domainServicesSelectors:A.selectors.domainServices,overridesSelectors:A.selectors.overrides}),R=s({getState:()=>({...A.getState(),session:w}),environmentSelectors:A.selectors.environment,specSelectors:A.selectors.spec,accessSelectors:A.selectors.access,domainServicesSelectors:A.selectors.domainServices,webComponentOptions:f.webComponentOptions,webComponentApi:f.webComponentApi,getSessionService:()=>L(),routingSelectors:j}),T=S({setSessionRuntime:e=>{w=e(w),k()}}),O=g({getState:()=>({...A.getState(),session:w}),sessionContextSelectors:A.selectors.sessionContext}),L=e(()=>new p({getLogger:()=>A.selectors.domainServices.getLogger(),getAnalyticsService:()=>A.selectors.domainServices.getAnalyticsService(),getUnauthenticatedClient:R.getUnauthenticatedClient,environmentSelectors:A.selectors.environment,sessionActions:T,setSessionContext:A.actions.sessionContext.setSessionContext,sessionSelectors:O,specSelectors:A.selectors.spec})),F={configurator:i({applicationType:"configurator",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.configurator,getApplicationRuntimeExtensions:()=>[]}),admin:i({applicationType:"admin",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})},{subscribe:e=>{D.add(e);let t=A.subscribe(e);return()=>{D.delete(e),t()}},getState:()=>({...A.getState(),integration:b,routing:y,session:w}),selectors:{...A.selectors,commonServices:R,integration:I,routing:j,session:O,domainApplicationContext:F},actions:{...A.actions,integration:E,routing:h,session:T}});return B.actions.sessionContext.setSessionContext(n(V,M)),B.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",viewMode:"read"===U,revisionId:void 0,configurationId:"mock"}),B.actions.domainData.setDomainData({publishedData:x.publishedData,frontendData:x.frontendData,backendData:x.backendData}),B.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:x.entities,modelVersion:z.domain.domainFactory.modelVersion,rootEntityType:x.rootEntityType,schemaIdentity:z.domain.domainFactory}),B};
1
+ import{memoOnce as e}from"@salsita-ai/common/utils";import{createDomainRuntime as t,createMockDomainRuntimeServices as o,createMockSessionContext as n}from"#package/domain";import{createCommonServicesSelectors as s}from"../common-services/index.js";import{createDomainApplicationContextSelectors as i}from"../domain-application-context/index.js";import{createIntegrationActions as a,createIntegrationSelectors as r,initializeIntegration as c}from"../integration/index.js";import{createRoutingActions as m,createRoutingSelectors as d,initializeRouting as p}from"../routing/index.js";import{SessionService as l,createSessionRuntimeActions as S,createSessionRuntimeSelectors as g,initializeSessionRuntime as v}from"../session/index.js";import{createMockWebComponentApi as u}from"../web-component/index.js";export const createMockApplicationRuntime=(f,C)=>{var x;let b,y,w,A,D,k,E,I,h,j,R,T,O,L,F,{sessionData:M,mode:U,role:V}=C,z=o(),q=(x={webComponentOptions:C.webComponentOptions??f.mount.options,webComponentApi:C.webComponentApi??u()},w=v(),A=t({config:f,services:z,getExtensionSystems:e=>F[e].getInitializableSystems()}),D=new Set,k=()=>{D.forEach(e=>{e()})},b=c({actions:E=a({setIntegration:e=>{b=e(b),k()}})}),I=r({getState:()=>({integration:b})}),h=m({setRouting:e=>{y=e(y),k()}}),y=p(),j=d({getState:()=>({...A.getState(),routing:y}),actions:h,accessActions:A.actions.access,loadedDataActions:A.actions.loadedData,domainServicesSelectors:A.selectors.domainServices,overridesSelectors:A.selectors.overrides}),R=s({getState:()=>({...A.getState(),session:w}),environmentSelectors:A.selectors.environment,specSelectors:A.selectors.spec,accessSelectors:A.selectors.access,domainServicesSelectors:A.selectors.domainServices,webComponentOptions:x.webComponentOptions,webComponentApi:x.webComponentApi,getSessionService:()=>L(),routingSelectors:j}),T=S({setSessionRuntime:e=>{w=e(w),k()}}),O=g({getState:()=>({...A.getState(),session:w}),sessionContextSelectors:A.selectors.sessionContext}),L=e(()=>new l({getLogger:()=>A.selectors.domainServices.getLogger(),getAnalyticsService:()=>A.selectors.domainServices.getAnalyticsService(),getUnauthenticatedClient:R.getUnauthenticatedClient,environmentSelectors:A.selectors.environment,sessionActions:T,setSessionContext:A.actions.sessionContext.setSessionContext,sessionSelectors:O,specSelectors:A.selectors.spec})),F={configurator:i({applicationType:"configurator",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.configurator,getApplicationRuntimeExtensions:()=>[]}),admin:i({applicationType:"admin",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})},{subscribe:e=>{D.add(e);let t=A.subscribe(e);return()=>{D.delete(e),t()}},getState:()=>({...A.getState(),integration:b,routing:y,session:w}),selectors:{...A.selectors,commonServices:R,integration:I,routing:j,session:O,domainApplicationContext:F},actions:{...A.actions,integration:E,routing:h,session:T}}),B=q.getState().spec;return q.actions.spec.updateSpec({...B,configurator:{...B.configurator,createTransformers:e=>C.transformers.map(t=>t.transformer.register(e,t.priority??1/0))}}),q.actions.sessionContext.setSessionContext(n(V,M)),q.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",viewMode:"read"===U,revisionId:void 0,configurationId:"mock"}),q.actions.domainData.setDomainData({publishedData:C.publishedData,frontendData:C.frontendData,backendData:C.backendData}),q.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:C.entities,modelVersion:f.domain.domainFactory.modelVersion,rootEntityType:C.rootEntityType,schemaIdentity:f.domain.domainFactory}),q};
@@ -67,7 +67,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
67
67
  selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyProductPreset>;
68
68
  selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, number>;
69
69
  selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("@mui/material").ThemeOptions>;
70
- selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AssistantManifest | null>;
70
+ selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, Required<import("#package/domain").AssistantManifest> | null>;
71
71
  selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
72
72
  selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
73
73
  selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, readonly import("#package/domain").AnyDomainComponentOptic[]>;
@@ -110,7 +110,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
110
110
  getAdminPreset: () => import("#package/domain").AnyProductPreset;
111
111
  getAdminModelVersion: () => number;
112
112
  getThemeOptions: () => import("@mui/material").ThemeOptions;
113
- getAssistant: () => import("#package/domain").AssistantManifest | null;
113
+ getAssistant: () => Required<import("#package/domain").AssistantManifest> | null;
114
114
  getConfiguratorFactory: () => import("#package/domain").AnyDomainFactory;
115
115
  getAdminFactory: () => import("#package/domain").AnyDomainFactory;
116
116
  getConfiguratorComponentOptics: () => readonly import("#package/domain").AnyDomainComponentOptic[];
@@ -727,7 +727,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
727
727
  selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyProductPreset>;
728
728
  selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, number>;
729
729
  selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("@mui/material").ThemeOptions>;
730
- selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AssistantManifest | null>;
730
+ selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, Required<import("#package/domain").AssistantManifest> | null>;
731
731
  selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
732
732
  selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
733
733
  selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, readonly import("#package/domain").AnyDomainComponentOptic[]>;
@@ -770,7 +770,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
770
770
  getAdminPreset: () => import("#package/domain").AnyProductPreset;
771
771
  getAdminModelVersion: () => number;
772
772
  getThemeOptions: () => import("@mui/material").ThemeOptions;
773
- getAssistant: () => import("#package/domain").AssistantManifest | null;
773
+ getAssistant: () => Required<import("#package/domain").AssistantManifest> | null;
774
774
  getConfiguratorFactory: () => import("#package/domain").AnyDomainFactory;
775
775
  getAdminFactory: () => import("#package/domain").AnyDomainFactory;
776
776
  getConfiguratorComponentOptics: () => readonly import("#package/domain").AnyDomainComponentOptic[];
@@ -13,8 +13,11 @@ export declare const getViewportSize: () => Size;
13
13
  * Returns the viewport size. This can also be used as a dependency in a
14
14
  * useEffect to trigger an update when the browser resizes.
15
15
  *
16
+ * @param subscriptionActive if `false`, the viewport is neither measured nor followed, and the size
17
+ * returned is the last one measured, if any (useful for optimization)
18
+ *
16
19
  * @see https://martijnhols.nl/gists/how-to-get-document-height-ios-safari-osk
17
20
  * @todo: investigate if this can use `viewport$`
18
21
  */
19
- export declare const useViewportSize: () => Size | undefined;
22
+ export declare const useViewportSize: (subscriptionActive?: boolean) => Size | undefined;
20
23
  export {};
@@ -1 +1 @@
1
- import{useCallback as e,useEffect as i,useLayoutEffect as t,useState as n}from"react";let o="u">typeof window?t:()=>{};export const getViewportSize=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight];export const useViewportSize=()=>{let[t,r]=n(),w=e(()=>{let e=getViewportSize();r(i=>i&&i[0]===e[0]&&i[1]===e[1]?i:e)},[]);return o(w,[w]),i(()=>{let e=()=>{w(),setTimeout(w,1e3)};return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),window.visualViewport?.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),window.visualViewport?.removeEventListener("resize",e)}},[w]),t};
1
+ import{useCallback as e,useEffect as i,useLayoutEffect as t,useState as n}from"react";let r="u">typeof window?t:()=>{};export const getViewportSize=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight];export const useViewportSize=(t=!0)=>{let[o,w]=n(),d=e(()=>{let e=getViewportSize();w(i=>i&&i[0]===e[0]&&i[1]===e[1]?i:e)},[]);return r(()=>{t&&d()},[t,d]),i(()=>{if(!t)return;let e=()=>{d(),setTimeout(d,1e3)};return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),window.visualViewport?.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),window.visualViewport?.removeEventListener("resize",e)}},[t,d]),o};
@@ -1 +1 @@
1
- export { MobileControls, type MobileControlsLayoutProps, type MobileControlsThemeableProps } from './MobileControls.js';
1
+ export { MobileControls, type MobileControlsLayoutProps, type MobileControlsThemeableProps, type ViewOnlyModeProps, } from './MobileControls.js';
@@ -1,4 +1,5 @@
1
1
  import type { I18n } from '@lingui/core';
2
+ import type { DeploymentAssistant } from '@salsita-ai/contracts/assistant';
2
3
  import type { $DomainEntity, ConfiguratorBuilder, DomainEntity } from '#package/domain';
3
4
  export interface ClerkConfig {
4
5
  apiKey: string;
@@ -11,6 +12,8 @@ export interface ClerkConfig {
11
12
  }
12
13
  export interface BuilderDomainContext<ENTITIES extends DomainEntity<string> = never, ALLOWED_ROOT_ENTITIES extends ENTITIES = never, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>> = never, NAVIGATION_STATES extends string = never, VIEW_STATES extends string = never, TOOL_STATES extends string = never, EXPORT_STATES extends string = never, PUBLISHED_DATA extends Record<string, unknown> = never, SESSION_DATA extends Record<string, unknown> = never, FRONTEND_DATA extends Record<string, unknown> = never, ADMIN_ENTITIES extends DomainEntity<string> = never, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES = never, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>> = never, ADMIN_NAVIGATION_STATES extends string = never, ADMIN_VIEW_STATES extends string = never, FINALIZE_DATA extends Record<string, unknown> = never, PREFETCHED_FINALIZE_DATA extends Record<string, unknown> = never, FINALIZE_RESULT extends Record<string, unknown> = never, CALLBACK_DATA extends Record<string, unknown> = never, RESOURCE extends string = never> {
13
14
  configuratorBuilder: ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
15
+ /** Server-only settings supplied by the generated webhook bundle. */
16
+ assistantServerSettings?: Pick<DeploymentAssistant, 'instructions' | 'ai'> | null;
14
17
  createI18n: () => I18n;
15
18
  clerk?: ClerkConfig;
16
19
  }
@@ -1,4 +1,4 @@
1
- import type { $DomainEntity, DomainEntity } from '#package/domain';
1
+ import { type $DomainEntity, type DomainEntity } from '#package/domain';
2
2
  import type { FetchBackendDataHandler } from '../backend-data-handler.js';
3
3
  import { type AuthHandler, AuthHandlerBuilder } from './auth-handler-builder.js';
4
4
  import { CallbackBuilder } from './callback-builder.js';
@@ -1 +1 @@
1
- import{initConsoleLogger as e}from"@salsita-ai/common/utils";import{routeWebhookRequests as n}from"@salsita-ai/contracts/webhook";import{AdminFinalizeHandlerBuilder as o}from"./admin-finalize-handler-builder.js";import{AuthHandlerBuilder as t}from"./auth-handler-builder.js";import{CallbackBuilder as i}from"./callback-builder.js";import{ConfiguratorFinalizeHandlerBuilder as a}from"./configurator-finalize-handler-builder.js";import{DynamicResourcesFactory as r}from"./dynamic-resources-factory.js";import{PrefetchBuilder as s}from"./prefetch-builder.js";import{TaskFactory as l}from"./task-factory.js";export class WebhookBuilder{_context;_handlers;constructor(e,n){this._context=e,this._handlers=n}withAuthHook(e){return new WebhookBuilder(this._context,{...this._handlers,onAuth:e})}withConfiguratorFinalize(e){return new WebhookBuilder(this._context,{...this._handlers,...e})}withFetchBackendData(e){return new WebhookBuilder(this._context,{...this._handlers,onFetchBackendData:e})}build(){if(!this._handlers)throw Error("Can not build webhook without any handlers! It would be very dumb!");let t=e(),i=new o(this._context).build();return n({onAuth:void 0!==this._handlers.onAuth?(e,n)=>this._handlers.onAuth(e,{logger:t},n):void 0,admin:{onFinalize:(e,n)=>i(e,{logger:t},n)},configurator:{onFetchBackendData:this._handlers.onFetchBackendData?(e,n)=>this._handlers.onFetchBackendData(e,{logger:t},n):void 0,onFinalize:this._handlers.onFinalize?async(e,n)=>{let o=await this._handlers?.onFetchBackendData?.({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls},{logger:t},n);return this._handlers.onFinalize({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls,data:e.data,locale:e.locale,configurationId:e.configurationId,entities:e.entities,modelVersion:e.modelVersion,revisionId:e.revisionId,rootEntityType:e.rootEntityType,backendData:o?.backendData},{logger:t},n)}:void 0,onCallback:this._handlers.onCallback?(e,n)=>this._handlers.onCallback(e,{logger:t},n):void 0}},t)}}export const createDomainWebhook=e=>{let n=new t(e),o=new WebhookBuilder(e),d=new l(e),h=new r(e),u=new a(e,[]);return{authHandlerBuilder:n,webhookBuilder:o,taskFactory:d,finalizeHandlerBuilder:u,callbackBuilder:new i(e),dynamicResourcesFactory:h,prefetchBuilder:new s(e)}};
1
+ import{initConsoleLogger as e}from"@salsita-ai/common/utils";import{routeWebhookRequests as t}from"@salsita-ai/contracts/webhook";import{buildAssistantManifest as n,generateAssistantPrompt as o}from"#package/domain";import{AdminFinalizeHandlerBuilder as i}from"./admin-finalize-handler-builder.js";import{AuthHandlerBuilder as s}from"./auth-handler-builder.js";import{CallbackBuilder as a}from"./callback-builder.js";import{ConfiguratorFinalizeHandlerBuilder as r}from"./configurator-finalize-handler-builder.js";import{DynamicResourcesFactory as d}from"./dynamic-resources-factory.js";import{PrefetchBuilder as l}from"./prefetch-builder.js";import{TaskFactory as h}from"./task-factory.js";export class WebhookBuilder{_context;_handlers;constructor(e,t){this._context=e,this._handlers=t}withAuthHook(e){return new WebhookBuilder(this._context,{...this._handlers,onAuth:e})}withConfiguratorFinalize(e){return new WebhookBuilder(this._context,{...this._handlers,...e})}withFetchBackendData(e){return new WebhookBuilder(this._context,{...this._handlers,onFetchBackendData:e})}build(){if(!this._handlers&&!this._context.assistantServerSettings)throw Error("Can not build webhook without any handlers! It would be very dumb!");let s=e(),a=new i(this._context).build();return t({onAuth:this._handlers?.onAuth!==void 0?(e,t)=>this._handlers.onAuth(e,{logger:s},t):void 0,admin:{onFinalize:(e,t)=>a(e,{logger:s},t)},configurator:{onAssistantSetup:this._context.assistantServerSettings?async()=>{let e=this._context.configuratorBuilder.buildConfig().assistant;if(!e)throw Error("Assistant setup operation is not configured for this webhook!");let t=n(e),i=this._context.assistantServerSettings;return{setup:{sdl:t.sdl,prompt:o(t),...i}}}:void 0,onFetchBackendData:this._handlers?.onFetchBackendData?(e,t)=>this._handlers.onFetchBackendData(e,{logger:s},t):void 0,onFinalize:this._handlers?.onFinalize?async(e,t)=>{let n=await this._handlers?.onFetchBackendData?.({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls},{logger:s},t);return this._handlers.onFinalize({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls,data:e.data,locale:e.locale,configurationId:e.configurationId,entities:e.entities,modelVersion:e.modelVersion,revisionId:e.revisionId,rootEntityType:e.rootEntityType,backendData:n?.backendData},{logger:s},t)}:void 0,onCallback:this._handlers?.onCallback?(e,t)=>this._handlers.onCallback(e,{logger:s},t):void 0}},s)}}export const createDomainWebhook=e=>{let t=new s(e),n=new WebhookBuilder(e),o=new h(e),i=new d(e),u=new r(e,[]);return{authHandlerBuilder:t,webhookBuilder:n,taskFactory:o,finalizeHandlerBuilder:u,callbackBuilder:new a(e),dynamicResourcesFactory:i,prefetchBuilder:new l(e)}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salsita-ai/sdk",
3
- "version": "0.50.0-develop.be40f0cee8",
3
+ "version": "0.50.0-develop.d6ed5efd42",
4
4
  "description": "TypeScript SDK and CLI for building, running, and deploying Phoenix configurator applications.",
5
5
  "keywords": [
6
6
  "salsita",
@@ -221,7 +221,7 @@
221
221
  "@swc/core": "1.15.40",
222
222
  "@swc/wasm-web": "1.15.40",
223
223
  "@tanstack/ai": "0.64.0",
224
- "@tanstack/ai-react": "0.29.4",
224
+ "@tanstack/ai-client": "0.36.1",
225
225
  "@trpc/client": "11.17.0",
226
226
  "@trpc/react-query": "11.17.0",
227
227
  "@trpc/server": "11.17.0",
@@ -292,8 +292,8 @@
292
292
  "yaml": "2.9.0",
293
293
  "yargs": "17.7.2",
294
294
  "zod": "3.25.76",
295
- "@salsita-ai/common": "0.50.0-develop.be40f0cee8",
296
- "@salsita-ai/contracts": "0.50.0-develop.be40f0cee8"
295
+ "@salsita-ai/contracts": "0.50.0-develop.d6ed5efd42",
296
+ "@salsita-ai/common": "0.50.0-develop.d6ed5efd42"
297
297
  },
298
298
  "devDependencies": {
299
299
  "@clerk/clerk-react": "5.61.8",
@@ -1 +0,0 @@
1
- export { useAssistantChat, type AssistantChatState } from './use-assistant-chat.js';
@@ -1 +0,0 @@
1
- export{useAssistantChat}from"./use-assistant-chat.js";
@@ -1,30 +0,0 @@
1
- import { type UIMessage } from '@tanstack/ai-react';
2
- /** Assistant chat state and actions of the current configuration. */
3
- export interface AssistantChatState {
4
- /** The thread as painted: hydrated from the server, then streamed. */
5
- readonly messages: ReadonlyArray<UIMessage>;
6
- /** True while a reply streams or a browser tool runs. */
7
- readonly isLoading: boolean;
8
- readonly error: Error | undefined;
9
- /**
10
- * HTTP status of the latest request the server answered with a failure, for telling a refusal from
11
- * a dropped connection when `error` is set. Nothing when the latest answered request succeeded or
12
- * the server was never reached.
13
- */
14
- readonly failedStatus: number | undefined;
15
- /** False when the server said this session may read the thread but not add to it. */
16
- readonly isContinuable: boolean;
17
- /** False until the first request of the chat, the thread read, was answered or failed. */
18
- readonly isLoaded: boolean;
19
- /** Sends a user message stamped with its send time. */
20
- readonly send: (content: string) => Promise<void>;
21
- /** Stops the current reply in the browser and on the server. */
22
- readonly stop: () => Promise<void>;
23
- }
24
- /**
25
- * The conversational assistant of the current configuration. The server owns the thread — the chat
26
- * hydrates from it on mount and rejoins a reply still streaming — so the hook keeps nothing in
27
- * browser storage. Each message carries its send time for the model. The model's `query` and
28
- * `apply` calls run here, in the browser, against the configurator this hook is rendered in.
29
- */
30
- export declare const useAssistantChat: () => AssistantChatState;
@@ -1 +0,0 @@
1
- import{fetchServerSentEvents as t,useChat as e}from"@tanstack/ai-react";import{useCallback as a,useMemo as n,useState as r}from"react";import{useApplicationRuntimeSelector as s,useAuthorizedClient as o,useConfigurationId as i,useLogger as c}from"#package/react-sdk";import{useConfigurator as l}from"../application-runtime/index.js";export const useAssistantChat=()=>{let u=i(),h=o(),d=c(),[p,m]=r(),[f,w]=r(!0),[y,g]=r(!1),C=a(()=>h.getAssistantChatConnection(u),[h,u]),k=n(()=>{let e=async(t,e)=>{let a=await fetch(t,e).finally(()=>g(!0)),n=a.headers.get("x-assistant-thread-continuable");return m(a.ok?void 0:a.status),null!=n&&w("false"!==n),a},a=async()=>({headers:await C().headers(),fetchClient:e}),n=t(()=>C().url,a),r=t(()=>`${C().url}/runs`,a);return{...n,joinRun:r.joinRun}},[C]),{assistantSystem:S}=l(),{messages:$,isLoading:j,error:x,sendMessage:A,stop:I,runId:R}=e({threadId:`assistant:${u}`,connection:k,persistence:!0,history:{pageSize:50},tools:s(S.getTools)}),v=a(async t=>{let e={sentAt:new Date().toISOString()};await A({content:t,metadata:e})},[A]),O=a(async()=>{if(I(),null!=R)try{let t=C();await fetch(`${t.url}/runs/${encodeURIComponent(R)}/cancel`,{method:"POST",headers:await t.headers()})}catch(t){d.warn("Could not cancel the assistant run on the server",{error:t})}},[C,d,R,I]);return n(()=>({messages:$,isLoading:j,error:x,failedStatus:p,isContinuable:f,isLoaded:y,send:v,stop:O}),[$,j,x,p,f,y,v,O])};
@@ -1,42 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type AssistantChatState } from '../../assistant/index.js';
3
- /**
4
- * The built-in assistant panel of a universal layout as the layout and the toolbar button see it:
5
- * whether it is open, and the few facts about it they render. It changes only when one of those does.
6
- */
7
- export interface AssistantPanelState {
8
- readonly open: boolean;
9
- readonly setOpen: (open: boolean) => void;
10
- /** True when a reply finished while the panel was closed and the panel was not opened since. */
11
- readonly hasUnreadReply: boolean;
12
- /** True while the message input has focus; a phone layout gives the panel the whole screen then. */
13
- readonly isInputFocused: boolean;
14
- readonly setInputFocused: (isInputFocused: boolean) => void;
15
- }
16
- /** The conversation of the assistant panel. It changes with every chunk of a streaming reply. */
17
- export interface AssistantPanelConversation {
18
- /** Nothing until the chat of the current attempt has mounted. */
19
- readonly chat: AssistantChatState | undefined;
20
- /**
21
- * Loads the thread from the server again, rejoining a reply that is still running there. It never
22
- * sends a message again, because the server may already hold it; a message that did not reach the
23
- * server is therefore gone from the thread and has to be written again.
24
- */
25
- readonly reloadThread: () => void;
26
- }
27
- /**
28
- * The assistant panel of the layout this is rendered in, or nothing when the application spec has no
29
- * `assistant` section or the layout does not carry the panel.
30
- */
31
- export declare const useAssistantPanel: () => AssistantPanelState | undefined;
32
- /** The conversation of the assistant panel, under the same conditions as {@link useAssistantPanel}. */
33
- export declare const useAssistantPanelConversation: () => AssistantPanelConversation | undefined;
34
- export interface AssistantPanelProviderProps {
35
- readonly children: ReactNode;
36
- }
37
- /**
38
- * Owns the open state of the assistant panel and the single chat of the layout below it. The chat
39
- * lives here and not in the panel, so a reply keeps streaming while the panel is closed. Without an
40
- * `assistant` section in the application spec no chat is mounted and no request reaches the server.
41
- */
42
- export declare const AssistantPanelProvider: ({ children }: AssistantPanelProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{createContext as t,useCallback as s,useContext as o,useEffect as n,useMemo as a,useRef as i,useState as l}from"react";import{useLogger as d,useSpecAssistant as u}from"#package/react-sdk";import{useAssistantChat as c}from"../../assistant/index.js";let v=t(void 0),m=t(void 0);export const useAssistantPanel=()=>o(v);export const useAssistantPanelConversation=()=>o(m);let p=({onChange:e})=>{let r=c();return n(()=>{e(r)},[r,e]),n(()=>()=>{e(void 0)},[e]),null};export const AssistantPanelProvider=({children:t})=>{let o=u(),[c,x]=l(),[f,P]=l(!1),[h,j]=l(!1),[g,A]=l(0),[k,C]=l(!1),q=d(),L=s(e=>{P(e),e?j(!1):C(!1)},[]),S=c?.isLoading??!1,T=i(!1),b=s(()=>{T.current=!1,A(e=>e+1)},[]);n(()=>{!T.current||S||f||null==c||j(!0),T.current=S},[c,S,f]);let w=c?.error,y=c?.failedStatus;n(()=>{w&&q.error("The assistant request failed",{status:y},w)},[w,y,q]);let z=a(()=>o?{open:f,setOpen:L,hasUnreadReply:h,isInputFocused:k,setInputFocused:C}:void 0,[o,f,L,h,k]),B=a(()=>o?{chat:c,reloadThread:b}:void 0,[o,c,b]);return e(v.Provider,{value:z,children:r(m.Provider,{value:B,children:[o&&e(p,{onChange:x},g),t]})})};
@@ -1 +0,0 @@
1
- import{createAjvSchemaValidator as e}from"./schema-validator-ajv.js";import{createCspSchemaValidator as a}from"./schema-validator-csp.js";let d="csp-compatible"===globalThis.PHX_SCHEMA_VALIDATOR?a:e;export const getExtendedSchemaValidator=()=>{let e=d();return e.addKeyword("tsType"),e.addKeyword("import"),e.addKeyword("declared"),e};export const extendedSchemaValidator=getExtendedSchemaValidator();
@@ -1 +0,0 @@
1
- import{extendedSchemaValidator as t}from"./json-schema.js";import{domainEntityTypeFromId as e,isDomainEntityId as s}from"./model.js";export class SchemaReflection{_meta;constructor(e,s){this._meta={name:e,schema:s,validator:t.compile(s)}}is=t=>this._meta.validator(t);assert(t){if(!this._meta.validator(t))throw Error(`Expected value to match schema of '${this._meta.name}' but got ${t}`)}}export class EnumReflection extends SchemaReflection{constructor(t,e){for(let s of(super(t,e),e.enum))Object.defineProperty(this,s,{value:s,writable:!1,enumerable:!0,configurable:!1})}values=()=>this._meta.schema.enum}let o=class BaseDomainEntityReflection{type;constructor(t){this.type=t}is=t=>t.type===this.type;assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be of type ${this.type} but got ${t.type}`)}isId=t=>s(t)&&e(t)===this.type;assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of type ${this.type} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class DomainEntityReflection extends o{_meta;constructor(e,s){super(e);let o=s.reduce((t,e)=>{let s=e.$defs;return"object"==typeof s&&null!==s&&Object.assign(t,s),t},{}),r={type:"object",properties:{id:{type:"string",pattern:`^${e}-[0-9]+$`},type:{type:"string",const:e},...s.reduce((t,e)=>({...t,...e.properties}),{})},required:["id","type",...s.flatMap(t=>t.required??[])],additionalProperties:!1},i={...r,$defs:o};this._meta={name:e,schema:r,validator:t.compile(i)}}}let r=class $DomainEntityReflectionClass extends o{expressions;constructor(t,e,s){super(t),this.expressions=e,Object.assign(this,s)}};export const $DomainEntityReflection=r;let i=class BaseAliasReflection{name;types;typeSet;constructor(t,e){this.name=t,this.types=e,this.typeSet=new Set(e)}is=t=>this.typeSet.has(t.type);assert(t){if(!this.is(t))throw Error(`Expected entity #${t.id} to be a member of alias ${this.name} but got ${t.type}`)}isId=t=>s(t)&&this.typeSet.has(e(t));assertId(t){if(!this.isId(t))throw Error(`Expected entity id to be of a member of alias ${this.name} but got ${t}`)}assertIds(t){t.forEach(t=>{this.assertId(t)})}};export class RawAliasReflection extends i{reflections;constructor(t,e){super(t,e.map(t=>t.type)),this.reflections=e}}let a=class EnhancedAliasReflectionClass extends i{constructor(t,e,s){super(t,e),Object.assign(this,s)}};export const EnhancedAliasReflection=a;export function assertString(t){if("string"!=typeof t)throw Error(`Expected value to be a string but got ${t}`)}export function assertNumber(t){if("number"!=typeof t)throw Error(`Expected value to be a number but got ${t}`)}export function assertBoolean(t){if("boolean"!=typeof t)throw Error(`Expected value to be a boolean but got ${t}`)}
@@ -1 +0,0 @@
1
- import{mapNestedObject as t}from"../utils/map-nested-object.js";export const createConstantExpressionFactory=e=>o=>t()(o,([t,o,a])=>[[t,o,{meta:e[t]?.[o]??{},evaluate:()=>a}]]);
@@ -1 +0,0 @@
1
- import{mapNestedObject as e}from"../utils/map-nested-object.js";export const createCustomExpressionFactory=t=>o=>e()(o,([e,o,r])=>{if(!r)throw Error(`Custom expression for ${e}.${o} is of type undefined`);return[[e,o,createCustomExpression(r,t[e]?.[o]??{})]]});export const createCustomExpression=(e,t)=>({evaluate:(t,o,r)=>e(r.domain.get$Entity(t,o),o,r),meta:t});
@@ -1 +0,0 @@
1
- export { prepareDomainExpressions } from './prepare-domain-expressions.js';
@@ -1 +0,0 @@
1
- export{prepareDomainExpressions}from"./prepare-domain-expressions.js";
@@ -1 +0,0 @@
1
- let e=["How to read the GraphQL schema of this configurator:","- A configuration is a set of entities. `root` is the root entity, `entities` lists every entity or the ones with the given ids, and `selectedEntity` is the entity the user has selected, or the root entity when nothing is selected.","- Every entity has an `id` of the form `<Type>-<number>`, for example `Table-1`, and a `type` with its entity type name. Ids are assigned by the configurator: read them from the configuration and never make one up.","- A field whose name starts with `_` is computed by the configurator from other values. It can be read like any other field and never written.","- Numbers are in the units the configuration stores them in. A field description names the unit when the product defines one.",'- A text field that only takes fixed values lists them in its description as "One of: ...". Use exactly those values.',"- A field typed as another entity type or as a list of one is a relation: select fields on it to read the related entities.","- Field and type descriptions come from the team that built the configurator and say what a value means for the product."],t=["How changes work:","- Every field of the `Mutation` type is one change. Its description says what it changes and what it returns.","- The configurator checks the whole configuration after each change. A change that would leave it invalid fails with an error that names the entities at fault, and it is not applied. Later changes of the same request are then not run.","- The configurator may adjust other values in response to a change, so read what a mutation returns instead of assuming the values you sent."],a=["How to add entities:","- Entities are added from recipes, the same ones the configurator offers the user. An entity type that can take children has a `meta` field; `meta { childRecipes }` lists its recipe groups and their recipes.","- List the recipes of the group first, pick one by its `key`, then call `addChild` with the id of the parent, the `groupId` and the `key`. Keys change with the configuration and the language, so never reuse one from memory.","- `dryRun` on a recipe shows what adding it would do without adding it: whether it is `ok`, the `changedEntities` it would add or modify, the `deletedEntityIds` it would remove, and the `errors` when it cannot be added. An entity whose id the configuration does not have yet is new. It is costly, so select it only on the recipes you are deciding between.","- Put each `addChild` in its own operation. The recipes of a group and what they add depend on the configuration before them, so after adding something, list the group again before adding from it once more."],n=["How to replace entities:","- An entity is replaced from recipes, the same ones the configurator offers the user. An entity type that can be replaced has a `meta` field; `meta { replaceRecipes }` lists its replace recipe groups and what the entity can be replaced with.","- List the recipes of the group first, pick one by its `key`, then call `replaceEntity` with the id of the entity, the `groupId` and the `key`. `dryRun` on a replace recipe shows what replacing would do without doing it: the replacement and everything else that changes are under `changedEntities`, and the replaced entity is among the `deletedEntityIds`.","- The replacement is a new entity with a new id, and its field values come from the recipe, so they can differ from those of the entity it replaces. Read the ids and values `replaceEntity` returns, and never use the old id again.","- Put each `replaceEntity` in its own operation. The recipes of a group and what they do depend on the configuration before them, so after replacing something, list the group of the replacement again before replacing once more."],i=["How to find the values a field can take:","- Some fields store a key whose choices the configurator holds elsewhere. Such a field has an edge under `meta` named after it: `meta { <field>Options }` lists its choices, each with the `value` to write and the `name` the user sees.","- Read the choices before you write such a field or name a choice to the user, and write the `value`, not the `name`. A value outside the list is rejected unless the edge description says the field is not checked.","- `dryRun` on an option shows what writing its value would do without writing it: whether it is `ok`, the `changedEntities` it would add or modify, the `deletedEntityIds` it would remove, and the `errors` when the value cannot be written. It is costly, so select it only on the options you are deciding between. It is null when the edge description says the options cannot be dry-run.","- The choices can depend on the entity and on its current state. Read them again after a change, unless the edge description says they are the same for all instances or do not change."],o=["How the custom changes of this configurator work:","- Besides the generic changes, the `Mutation` type has fields the team built for this product. Each runs one domain operation the configurator itself uses, so prefer it over composing the same change from generic mutations. Its description says what it does and what its arguments mean.","- Its arguments are checked against what the operation declares; an argument that does not fit, or a change the product does not allow, fails the field with a message that says what to send instead.","- It returns an object whose fields the description names; a field typed as an entity reads that entity after the change."],s=["How to use the `query` and `apply` tools:","- Both take `operations`, a list of GraphQL documents that run in order. Each document holds exactly one operation. To do several things, send several items in one call instead of several calls.","- Write values into the document as literals. Use `variables` only for a value that cannot be written as a literal.","- Select only the fields you need: results are returned whole.","- The result has one GraphQL result per operation, in the order sent. When an operation fails, its `errors` say why and the operations after it are not run.","- `query` reads the configuration the user has open and never changes it. Call it before you say anything about the configuration."],r=["- This configurator exposes no changes, so there is nothing for `apply` to run. Say so when the user asks you to change the configuration."],h=['- Mutations inside `query` answer "what if" questions. Each operation sees the changes of the ones before it, so a mutation followed by a query shows the configuration as it would be. Nothing is kept and the user sees no change.',"- `apply` makes the changes the user asked for. It is all or nothing: when any operation fails, nothing is changed; when all succeed, the user gets them as one undo step.","- `committed` in the result says whether the changes were kept. When it is false although no operation failed, `message` says why: the changes may be waiting for the approval of the user, the user may have changed the configuration meanwhile, or this session may not change the configuration at all. Without a `message`, the operations changed nothing. Never tell the user a change was made unless `committed` is true."];export const generateAssistantPrompt=d=>{let c=/^type Mutation\b/m.test(d.sdl);return[e,...c?[t]:[],.../^\s+addChild\(/m.test(d.sdl)?[a]:[],.../^\s+replaceEntity\(/m.test(d.sdl)?[n]:[],.../^type FieldOption\b/m.test(d.sdl)?[i]:[],...Object.keys(d.actions).length>0?[o]:[],[...s,...c?h:r]].map(e=>e.join("\n")).join("\n\n")};
File without changes
File without changes
File without changes
File without changes