@salsita-ai/sdk 0.50.0-develop.da8d27f5d7 → 0.50.0-develop.dbf0122072

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 (327) hide show
  1. package/README.md +19 -11
  2. package/dist/{phoenix/application-spec → application-spec/assistant}/generate-assistant-prompt.d.ts +6 -5
  3. package/dist/application-spec/assistant/generate-assistant-prompt.js +1 -0
  4. package/dist/application-spec/assistant/index.d.ts +1 -0
  5. package/dist/application-spec/assistant/index.js +1 -0
  6. package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
  7. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  8. package/dist/application-spec/errors/diagnostic-messages.d.ts +6 -0
  9. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  10. package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
  11. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  12. package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
  13. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -0
  14. package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +11 -8
  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/generate-domain-block.d.ts +3 -1
  18. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +70 -66
  19. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
  20. package/dist/application-spec/generate-application/code/templates/domain-spec.js +7 -7
  21. package/dist/application-spec/generate-application/code/templates/domain.js +2 -2
  22. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +11 -0
  23. package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +8 -0
  24. package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
  25. package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
  26. package/dist/application-spec/generate-application/code/templates/globals.js +1 -0
  27. package/dist/application-spec/generate-application/code/templates/index.d.ts +7 -6
  28. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  29. package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +2 -0
  30. package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -0
  31. package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.d.ts → skills/phoenix-create-configurator-skill.d.ts} +1 -1
  32. package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.js → skills/phoenix-create-configurator-skill.js} +43 -13
  33. package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +54 -0
  34. package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.js → skills/phoenix-review-skill.js} +7 -5
  35. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -0
  36. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +1 -0
  37. package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +6 -0
  38. package/dist/application-spec/generate-application/code/templates/{common → skills}/sdk-content.d.ts +52 -3
  39. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +82 -0
  40. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +2 -0
  41. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
  42. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +14 -0
  43. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.js +1 -0
  44. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +4 -3
  45. package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +1 -1
  46. package/dist/application-spec/generate-application/runtime/sections/index.d.ts +1 -0
  47. package/dist/application-spec/generate-application/runtime/sections/index.js +1 -1
  48. package/dist/application-spec/index.d.ts +1 -0
  49. package/dist/application-spec/index.js +1 -1
  50. package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +3 -1
  51. package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
  52. package/dist/application-spec/parse-application-files/merge/index.d.ts +1 -0
  53. package/dist/application-spec/parse-application-files/merge/index.js +1 -1
  54. package/dist/application-spec/parse-application-files/merge/merged-actions.d.ts +11 -0
  55. package/dist/application-spec/parse-application-files/merge/merged-actions.js +1 -0
  56. package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +2 -0
  57. package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
  58. package/dist/application-spec/parse-application-files/raw-spec/index.d.ts +1 -0
  59. package/dist/application-spec/parse-application-files/raw-spec/index.js +1 -1
  60. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +18 -0
  61. package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -0
  62. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +14 -2
  63. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  64. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +2 -0
  65. package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
  66. package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
  67. package/dist/application-spec/parse-application-files/spec/application/application-spec.js +1 -1
  68. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +4 -2
  69. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  70. package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
  71. package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
  72. package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.d.ts +23 -0
  73. package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.js +1 -0
  74. package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +10 -0
  75. package/dist/application-spec/parse-application-files/spec/model/names/action-name.js +1 -0
  76. package/dist/application-spec/parse-application-files/spec/model/names/index.d.ts +1 -0
  77. package/dist/application-spec/parse-application-files/spec/model/names/index.js +1 -1
  78. package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +35 -0
  79. package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -0
  80. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +5 -21
  81. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
  82. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +14 -39
  83. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  84. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.d.ts +1 -1
  85. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -19
  86. package/dist/application-spec/parse-application-files/spec/sections/index.d.ts +1 -0
  87. package/dist/application-spec/parse-application-files/spec/sections/index.js +1 -1
  88. package/dist/client/phoenix-api.d.ts +5 -1
  89. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +2 -1
  90. package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
  91. package/dist/configurator/application-runtime/extensions/selectors.d.ts +2 -1
  92. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  93. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +180 -0
  94. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -0
  95. package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/browser-details.d.ts +1 -1
  96. package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +1 -0
  97. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.d.ts +85 -0
  98. package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.js +1 -0
  99. package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/graphql-tools.d.ts +20 -16
  100. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -0
  101. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +4 -0
  102. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  103. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +16 -1
  104. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  105. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.d.ts +9 -0
  106. package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.js +1 -0
  107. package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -0
  108. package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
  109. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -0
  110. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  111. package/dist/configurator/common/frontend-analytics.d.ts +21 -21
  112. package/dist/configurator/index.d.ts +0 -1
  113. package/dist/configurator/index.js +1 -1
  114. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  115. package/dist/configurator/scene/scene-analytics/scene-analytics.d.ts +2 -2
  116. package/dist/configurator/ui/assistant/AssistantChips.d.ts +11 -0
  117. package/dist/configurator/ui/assistant/AssistantChips.js +1 -0
  118. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
  119. package/dist/configurator/ui/assistant/AssistantComposer.js +1 -0
  120. package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -0
  121. package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -0
  122. package/dist/configurator/ui/assistant/AssistantPanel.d.ts +11 -0
  123. package/dist/configurator/ui/assistant/AssistantPanel.js +1 -0
  124. package/dist/configurator/ui/assistant/AssistantThread.d.ts +6 -0
  125. package/dist/configurator/ui/assistant/AssistantThread.js +1 -0
  126. package/dist/configurator/ui/assistant/assistant-failure.d.ts +18 -0
  127. package/dist/configurator/ui/assistant/assistant-failure.js +1 -0
  128. package/dist/configurator/ui/assistant/index.d.ts +2 -0
  129. package/dist/configurator/ui/assistant/index.js +1 -0
  130. package/dist/configurator/ui/assistant/streamed-markdown.d.ts +6 -0
  131. package/dist/configurator/ui/assistant/streamed-markdown.js +2 -0
  132. package/dist/configurator/ui/assistant/theme.d.ts +2 -0
  133. package/dist/configurator/ui/assistant/theme.js +1 -0
  134. package/dist/configurator/ui/assistant/thread-items.d.ts +37 -0
  135. package/dist/configurator/ui/assistant/thread-items.js +1 -0
  136. package/dist/configurator/ui/assistant/tool-chip.d.ts +44 -0
  137. package/dist/configurator/ui/assistant/tool-chip.js +1 -0
  138. package/dist/configurator/ui/assistant/use-follow-stream.d.ts +17 -0
  139. package/dist/configurator/ui/assistant/use-follow-stream.js +1 -0
  140. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.d.ts +5 -0
  141. package/dist/configurator/ui/assistant/use-is-assistant-panel-open.js +1 -0
  142. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -5
  143. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.d.ts +2 -0
  144. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  145. package/dist/configurator/ui/legacy/mobile-controls/MobileControls.d.ts +1 -1
  146. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.d.ts +10 -0
  147. package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -0
  148. package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +1 -0
  149. package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
  150. package/dist/docs/index.json +12 -2
  151. package/dist/docs/layouts/toolbar.mdx +6 -0
  152. package/dist/docs/other-features/domain-actions.mdx +418 -0
  153. package/dist/docs/other-features/side-effects.mdx +26 -0
  154. package/dist/docs/phoenix/admin.mdx +2 -2
  155. package/dist/docs/phoenix/best-practices.mdx +1 -0
  156. package/dist/docs/phoenix/finalization.mdx +1 -1
  157. package/dist/docs/phoenix/integration/headless-mode-external.mdx +5 -5
  158. package/dist/docs/phoenix/integration/widget-mode-external.mdx +5 -5
  159. package/dist/docs/phoenix/migrations.mdx +45 -5
  160. package/dist/docs/phoenix/phoenix-cli.mdx +139 -20
  161. package/dist/docs/phoenix/project-structure.mdx +7 -3
  162. package/dist/docs/phoenix/sdk-builder-workflow.mdx +12 -8
  163. package/dist/domain/actions/action-factory.d.ts +10 -0
  164. package/dist/domain/actions/action-factory.js +1 -0
  165. package/dist/domain/actions/prepare-action-implementations.d.ts +15 -0
  166. package/dist/domain/actions/prepare-action-implementations.js +5 -0
  167. package/dist/domain/application/application-config.d.ts +2 -60
  168. package/dist/domain/application/assistant/assistant-manifest.d.ts +61 -0
  169. package/dist/domain/application/assistant/assistant-manifest.js +1 -0
  170. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +95 -0
  171. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -0
  172. package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
  173. package/dist/domain/application/assistant/assistant-value-type.js +1 -0
  174. package/dist/domain/application/assistant/build-assistant-manifest.d.ts +4 -0
  175. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -0
  176. package/dist/domain/application/assistant/index.d.ts +3 -0
  177. package/dist/domain/application/assistant/index.js +1 -0
  178. package/dist/domain/application/assistant-field-options.d.ts +1 -1
  179. package/dist/domain/application/assistant-mutations.d.ts +16 -15
  180. package/dist/domain/application/assistant-mutations.js +1 -1
  181. package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
  182. package/dist/domain/application/configurator-builder.d.ts +4 -3
  183. package/dist/domain/application/index.d.ts +2 -1
  184. package/dist/domain/application/index.js +1 -1
  185. package/dist/domain/components/updates.d.ts +16 -0
  186. package/dist/domain/core/action.d.ts +67 -0
  187. package/dist/domain/core/action.js +1 -0
  188. package/dist/domain/core/domain-factory.d.ts +4 -0
  189. package/dist/domain/core/index.d.ts +1 -0
  190. package/dist/domain/domain-builder.d.ts +7 -0
  191. package/dist/domain/domain-builder.js +1 -1
  192. package/dist/domain/domain-context/action-system/action-system.d.ts +40 -0
  193. package/dist/domain/domain-context/action-system/action-system.js +1 -0
  194. package/dist/domain/domain-context/domain-context-systems.d.ts +5 -2
  195. package/dist/domain/domain-context/index.d.ts +2 -1
  196. package/dist/domain/domain-context/index.js +1 -1
  197. package/dist/domain/domain-context/store-system/store-system.js +1 -1
  198. package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
  199. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +4 -0
  200. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  201. package/dist/domain/domain-runtime/domain-runtime.d.ts +16 -4
  202. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  203. package/dist/domain/domain-runtime/spec/selectors.d.ts +2 -2
  204. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  205. package/dist/domain/domain-runtime/spec/types.d.ts +18 -4
  206. package/dist/domain/index.d.ts +2 -0
  207. package/dist/domain/index.js +1 -1
  208. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +8 -2
  209. package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.d.ts +44 -0
  210. package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.js +1 -0
  211. package/dist/domain/system-components/phoenix-layout-elements/index.d.ts +1 -0
  212. package/dist/domain/system-components/phoenix-layout-elements/index.js +1 -1
  213. package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.d.ts +2 -1
  214. package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.js +1 -1
  215. package/dist/editor/Editor.js +1 -1
  216. package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
  217. package/dist/editor/domain-editors/apply-spec-update.js +1 -1
  218. package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -3
  219. package/dist/editor/domain-editors/use-implementation-files.js +1 -1
  220. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  221. package/dist/editor/variants/VariantAnswerFooter.d.ts +17 -0
  222. package/dist/editor/variants/VariantAnswerFooter.js +1 -0
  223. package/dist/editor/variants/VariantPreviewHandler.d.ts +6 -0
  224. package/dist/editor/variants/VariantPreviewHandler.js +1 -0
  225. package/dist/editor/variants/variant-preview-styles.d.ts +49 -0
  226. package/dist/editor/variants/variant-preview-styles.js +1 -0
  227. package/dist/i18n/locales/cs/messages.js +1 -1
  228. package/dist/i18n/locales/da/messages.js +1 -1
  229. package/dist/i18n/locales/de/messages.js +1 -1
  230. package/dist/i18n/locales/de-AT/messages.js +1 -1
  231. package/dist/i18n/locales/en/messages.js +1 -1
  232. package/dist/i18n/locales/en-AU/messages.js +1 -1
  233. package/dist/i18n/locales/en-GB/messages.js +1 -1
  234. package/dist/i18n/locales/es/messages.js +1 -1
  235. package/dist/i18n/locales/fr/messages.js +1 -1
  236. package/dist/i18n/locales/hu/messages.js +1 -1
  237. package/dist/i18n/locales/it/messages.js +1 -1
  238. package/dist/i18n/locales/nl/messages.js +1 -1
  239. package/dist/i18n/locales/pl/messages.js +1 -1
  240. package/dist/i18n/locales/pt/messages.js +1 -1
  241. package/dist/i18n/locales/ro/messages.js +1 -1
  242. package/dist/i18n/locales/sk/messages.js +1 -1
  243. package/dist/i18n/locales/tr/messages.js +1 -1
  244. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +6 -0
  245. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  246. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  247. package/dist/phoenix/cli.js +1 -1
  248. package/dist/phoenix/commands/build.d.ts +5 -0
  249. package/dist/phoenix/commands/build.js +1 -1
  250. package/dist/phoenix/commands/deploy.js +2 -2
  251. package/dist/phoenix/commands/dev.js +5 -5
  252. package/dist/phoenix/commands/feedback.d.ts +2 -1
  253. package/dist/phoenix/commands/feedback.js +1 -1
  254. package/dist/phoenix/commands/index.d.ts +1 -0
  255. package/dist/phoenix/commands/index.js +1 -1
  256. package/dist/phoenix/commands/login.d.ts +24 -6
  257. package/dist/phoenix/commands/login.js +2 -2
  258. package/dist/phoenix/commands/story-dev.js +2 -2
  259. package/dist/phoenix/commands/variants.d.ts +35 -0
  260. package/dist/phoenix/commands/variants.js +1 -0
  261. package/dist/phoenix/editor-server/commands-router.d.ts +68 -1
  262. package/dist/phoenix/editor-server/commands-router.js +1 -1
  263. package/dist/phoenix/editor-server/editor-router.d.ts +65 -0
  264. package/dist/phoenix/editor-server/editor-server.d.ts +3 -3
  265. package/dist/phoenix/editor-server/editor-server.js +1 -1
  266. package/dist/phoenix/editor-server/protocol.d.ts +1 -0
  267. package/dist/phoenix/editor-server/spec-router.js +1 -1
  268. package/dist/phoenix/editor-server/trpc.d.ts +3 -0
  269. package/dist/phoenix/services/application-spec-project-watcher.d.ts +13 -2
  270. package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
  271. package/dist/phoenix/services/index.d.ts +5 -0
  272. package/dist/phoenix/services/index.js +1 -1
  273. package/dist/phoenix/services/phoenix-application.d.ts +21 -0
  274. package/dist/phoenix/services/phoenix-application.js +1 -0
  275. package/dist/phoenix/services/phoenix-store.d.ts +48 -0
  276. package/dist/phoenix/services/phoenix-store.js +1 -0
  277. package/dist/phoenix/services/phx-banner-plugin.d.ts +32 -0
  278. package/dist/phoenix/services/phx-banner-plugin.js +1 -0
  279. package/dist/phoenix/services/phx-licenses-plugin.d.ts +55 -0
  280. package/dist/phoenix/services/phx-licenses-plugin.js +8 -0
  281. package/dist/phoenix/services/phx-variant-previews-plugin.d.ts +9 -0
  282. package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
  283. package/dist/phoenix/services/variant-file-session.d.ts +36 -0
  284. package/dist/phoenix/services/variant-file-session.js +1 -0
  285. package/dist/phoenix/services/variant-preview-service.d.ts +80 -0
  286. package/dist/phoenix/services/variant-preview-service.js +1 -0
  287. package/dist/phoenix/services/vite-config.d.ts +2 -0
  288. package/dist/phoenix/services/vite-config.js +1 -1
  289. package/dist/phoenix/utils/index.d.ts +1 -0
  290. package/dist/phoenix/utils/index.js +1 -1
  291. package/dist/phoenix/utils/read-git-commit.d.ts +14 -0
  292. package/dist/phoenix/utils/read-git-commit.js +1 -0
  293. package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +2 -2
  294. package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts +21 -21
  295. package/dist/react-sdk/application-runtime/hooks/data/use-published-data.d.ts +1 -1
  296. package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
  297. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +16 -4
  298. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -0
  299. package/dist/ui-sdk/common/use-viewport-size.d.ts +4 -1
  300. package/dist/ui-sdk/common/use-viewport-size.js +1 -1
  301. package/dist/ui-sdk/components/mobile-controls/index.d.ts +1 -1
  302. package/dist/ui-sdk/theme/types.d.ts +4 -0
  303. package/package.json +5 -8
  304. package/schema/domain-spec.json +24 -0
  305. package/dist/application-spec/generate-application/code/templates/agents-md.js +0 -2
  306. package/dist/application-spec/generate-application/code/templates/common/sdk-content.js +0 -67
  307. package/dist/application-spec/generate-application/code/templates/phoenix-cli-skill.js +0 -1
  308. package/dist/application-spec/generate-application/code/templates/phoenix-feedback-skill.js +0 -31
  309. package/dist/application-spec/generate-application/code/templates/phoenix-skill.js +0 -1
  310. package/dist/configurator/assistant/browser-details.js +0 -1
  311. package/dist/configurator/assistant/graphql-tools.js +0 -1
  312. package/dist/configurator/assistant/index.d.ts +0 -1
  313. package/dist/configurator/assistant/index.js +0 -1
  314. package/dist/configurator/assistant/use-assistant-chat.d.ts +0 -20
  315. package/dist/configurator/assistant/use-assistant-chat.js +0 -1
  316. package/dist/extras/assistant/AssistantChat.d.ts +0 -6
  317. package/dist/extras/assistant/AssistantChat.js +0 -1
  318. package/dist/extras/assistant/index.d.ts +0 -1
  319. package/dist/extras/assistant/index.js +0 -1
  320. package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
  321. /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.d.ts +0 -0
  322. /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.js +0 -0
  323. /package/dist/application-spec/generate-application/code/templates/{agents-md.d.ts → skills/agents-md.d.ts} +0 -0
  324. /package/dist/application-spec/generate-application/code/templates/{phoenix-cli-skill.d.ts → skills/phoenix-cli-skill.d.ts} +0 -0
  325. /package/dist/application-spec/generate-application/code/templates/{phoenix-feedback-skill.d.ts → skills/phoenix-feedback-skill.d.ts} +0 -0
  326. /package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.d.ts → skills/phoenix-review-skill.d.ts} +0 -0
  327. /package/dist/application-spec/generate-application/code/templates/{phoenix-skill.d.ts → skills/phoenix-skill.d.ts} +0 -0
@@ -1,31 +0,0 @@
1
- import{renderAgentSkill as e}from"./common/agent-skill.js";let t=`## When to Raise Feedback
2
- Draft feedback for the Phoenix team when one of these happens while you work in this project:
3
- - **Bug** — the SDK, the \`phoenix\` CLI or generated code crashes, produces wrong output or behaves differently from its documentation, and the cause is not in this project's own code.
4
- - **Misleading guidance** — a doc page, a Phoenix skill or an error message sent you the wrong way, or did not say what you needed.
5
- - **Missing feature** — something the SDK does not support forced a workaround, or a routine task took far more steps than it should.
6
-
7
- Do not draft feedback for problems in this project's own specs or code, for a suspicion you have not checked, or twice for the same problem. Write one draft per distinct problem.`,o=`## Ask Before You Send
8
- Never send feedback on your own. Show the user a draft and send it only after they approve it.
9
-
10
- When to ask is your judgement:
11
- - **Right away** — the problem is crucial: it blocks the task or forces a workaround the user should know about now. Interrupt the work, show the draft, and continue once the user has answered.
12
- - **At the end of the task** — everything else. Collect the details while you work and show all drafts together in your final message.
13
- - **When the user asks** you to send feedback — draft it and show it before sending.
14
-
15
- The draft is exactly what would be sent: the type, the message, the project if you name one with \`--projectSlug\`, and the contact if the user gave one. Send it unchanged after a yes; if the user edits it, send their version. If they decline, drop it and do not raise that problem again.`,a=`## Ask for a Rating After a Deploy
16
- When \`phoenix deploy\` reports that the configurator is live, tell the user the live URL first, then ask them to rate building with Phoenix so far:
17
- - Ask for a score from 0 to 10, where 10 is the best, and one optional sentence on what would have made it better. Say in the same question that the answer is sent to the Phoenix team as feedback.
18
- - Ask once per conversation, after the first deploy that goes live. Do not ask again after later deploys, and do not ask after a deploy that failed.
19
- - Never choose or guess the score yourself. If the user skips the question or declines, send nothing and do not ask again.
20
-
21
- A rating is feedback like any other, so the rules of this skill apply. Write the comment from the user's words, and take out anything the last section forbids: replace this project's product, customer and people names with generic words. Then show the user the three lines below exactly as they would be sent and send them only after a yes; if they edit the text, send their version. Use \`none\` when they gave no comment:
22
- \`\`\`bash
23
- pnpm phoenix feedback 'Rating: <score>/10
24
- Comment: <their comment, or none>
25
- Stage: after a deploy' --type other --agent '<your agent name>'
26
- \`\`\`
27
- Keep the three labels and their order, so the ratings can be read out of the feedback list. A rating is not a bug report: when the comment names a concrete problem, offer to draft it as its own feedback as the sections above describe.`,n=`## What Never Goes Into Feedback
28
- The message leaves this project and is read by the Phoenix team. Never include:
29
- - secrets: API tokens, keys, passwords or \`.env\` values;
30
- - customer or end-user data, or personal data such as names and email addresses, other than a contact the user asked you to add;
31
- - this project's source code, specs or business rules. Describe the shape of the problem in words, or reduce it to a generic example that contains nothing of the project.`;export const generatePhoenixFeedbackSkill=()=>e({name:"phoenix-feedback",description:"Drafting feedback about the Phoenix SDK, CLI, documentation or Studio for the Phoenix team and sending it with the phoenix feedback command once the user approves the draft, covering when to raise it, how to write it, the rating asked for after a deploy and what must never be included. Use when the SDK or CLI misbehaves, a doc or skill misled you, a missing feature forced a workaround, the user asks to send feedback, or phoenix deploy has just gone live and the user should be asked to rate the experience from 0 to 10.",sections:[t,o,"## How to Send It\n```bash\npnpm phoenix feedback '<message>' --type bug --agent '<your agent name>'\n```\n- Put the message in single quotes, so the shell passes backticks, `$` and double quotes through unchanged. In bash or zsh, write a single quote inside the message as `'\\''`; in PowerShell, double it instead.\n- `--type` is `bug`, `idea` or `other` (default `other`). Use `idea` for a missing feature or an improvement.\n- `--agent` names you, the coding agent, so the team can tell agent feedback from a person's.\n- `--contact '<email>'` only when the user wants a reply and gave you the contact to use.\n- The workspace, user, SDK version and the spec's `project` are attached automatically. `--projectSlug <slug>` names another project of the workspace.\n- A message holds at most 5000 characters.\n\nWrite the message for someone who cannot see this project: what you ran or called, what you expected, what happened instead with the error text, and the workaround if you found one. Before quoting an error, replace this project's names, file paths and values in it with generic placeholders, as the list below requires.\n\nThe command needs `phoenix login`. If it answers that you are not signed in, tell the user once and continue; do not sign in yourself, because the sign-in is approved in a browser.\n\nAfter sending, confirm it to the user in one line.",a,n]});
@@ -1 +0,0 @@
1
- import{renderAgentSkill as e}from"./common/agent-skill.js";import{sdkGuidanceSections as t}from"./common/sdk-content.js";export const followsCanaryBuilds=e=>!e.useWorkspace&&e.sdkVersion.includes("-develop.");export const generatePhoenixSkill=({checkLatestCanary:n})=>e({name:"phoenix",description:`Phoenix SDK project conventions, covering project structure, architecture principles, key patterns, file and export rules, webhook membership, showing the user the dev preview and the build of a deploy, and how to search the SDK documentation${n?", and the internal-beta check for the latest canary SDK build":""}. Use before writing or changing specs or source code in this Phoenix configurator project.`,sections:[...n?["## Stay on the Latest Canary\nDuring the internal beta this project uses the `canary` build of the SDK, which is published from every change to the platform. Once per conversation, before you change anything, compare the installed version with the newest canary:\n```bash\npnpm list @salsita-ai/sdk --depth 0\nnpm view @salsita-ai/sdk@canary version\n```\nWhen they differ, tell the user which version you are moving to, then update the project and regenerate its files:\n```bash\npnpm add @salsita-ai/sdk@canary\npnpm phoenix sync\n```\n`sync` rewrites the Phoenix skills, so read the ones you use again after it. When the user runs a globally installed `phoenix`, update that too with `npm install -g @salsita-ai/sdk@canary`. If the project no longer builds after the update, stop and tell the user; the `phoenix-feedback` skill covers reporting it."]:[],t.projectStructure,t.architecturePrinciples,t.keyPatterns,t.fileConventions,t.exportRules,t.webhookMembership,t.doNotEdit,"## Show the Preview While You Work\nThe user should see the configurator change as you build it. Before your first change in a conversation, make sure `pnpm phoenix dev` is running (start it in the background when it is not) and open the address it prints as `Preview: <url>` (also written to `.phoenix/phoenix-dev.log`) in the user's browser: `open '<url>'` on macOS, `xdg-open '<url>'` on Linux, `Start-Process '<url>'` in PowerShell, `start \"\" \"<url>\"` in cmd. Keep the quotes, the shell would otherwise read a `?` in the address as a pattern. The log keeps the lines of earlier runs, so when you have just started dev, wait for the `Preview:` line written after your start and use the last one. Open it once; the preview reloads on every change, so tell the user to keep that tab open instead of opening it again.","## Show the Build After a Deploy\n`pnpm phoenix deploy` starts a build on the server and waits for it to go live. Right after `Build <id> started` it prints `Follow the build in Studio: <url>`. Run the deploy so that you can read its output while it runs, and open that link in the user's browser, quoted as above, as soon as it appears, so they can follow the build they just triggered. When the line is missing, the sign-in is older than the link: tell the user the build is listed under Deployments in Studio, and that `pnpm phoenix login <workspace>` brings the link back.","## Code Review\nUse the `phoenix-review` skill to review code changes before committing.",t.sdkDocumentation]});
@@ -1 +0,0 @@
1
- import{browserDetailsTool as e}from"@salsita-ai/contracts/assistant";let t=e=>{let t=[];for(let i=0;i<e.length;i+=64)t.push(e.slice(i,i+64));return t};export const browserDetailsClientTool=e.client(()=>{let e=(()=>{let e=[`User agent: ${navigator.userAgent}`,`Viewport: ${window.innerWidth} x ${window.innerHeight} px`,`Screen: ${window.screen.width} x ${window.screen.height} px`,`Device pixel ratio: ${window.devicePixelRatio}`,`Language: ${navigator.language}`,`Time zone: ${Intl.DateTimeFormat().resolvedOptions().timeZone}`].flatMap(t),i=document.createElement("canvas");i.width=720,i.height=48+26*e.length;let n=i.getContext("2d");if(!n)throw Error("The browser details capture failed because the canvas has no 2D context. Retry in another browser.");return n.fillStyle="#ffffff",n.fillRect(0,0,i.width,i.height),n.fillStyle="#111111",n.font="16px monospace",n.textBaseline="top",e.forEach((e,t)=>n.fillText(e,24,24+26*t)),i.toDataURL("image/png")})();return[{type:"image",source:{type:"data",value:e.slice(e.indexOf(",")+1),mimeType:"image/png"}}]});
@@ -1 +0,0 @@
1
- import{AssistantGraphQLToolInput as e,applyTool as t,queryTool as o}from"@salsita-ai/contracts/assistant";let a=e=>({results:[],committed:!1,message:e}),s=e=>JSON.parse(JSON.stringify(e)),i=t=>{let o=e.safeParse(t);if(!o.success){let e=o.error.issues.map(e=>`${e.path.join(".")}: ${e.message}`).join("; ");return{ok:!1,refusal:a(`Nothing was run, because the tool input is not a list of operations (${e}). Send { "operations": [{ "query": "<one GraphQL operation>" }] } with at least one item.`)}}return{ok:!0,operations:o.data.operations.map(({query:e,variables:t,operationName:o})=>({document:e,variables:t??void 0,operationName:o??void 0}))}};export const queryClientTool=o.client(async(e,{context:t})=>{let o=i(e);return o.ok?t.storeSystem.isInitialized?s({results:(await t.graphQLSystem.prepare(t.storeSystem.stateSlices.committed.value.state,o.operations)).map(({result:e})=>e),committed:!1}):a("Nothing was run, because the configuration is not loaded yet, so there is no state to query. Call the tool again once the configurator has finished loading."):o.refusal});export const applyClientTool=t.client(async(e,{context:t})=>{if("owner"!==t.getActiveMode())return a("Nothing was run, because changes cannot be applied in this session: the user may view this configuration but not change it. The query tool still works here, including mutations, to show what a change would do without keeping it.");let o=i(e);return o.ok?s(await t.graphQLSystem.execute(o.operations)):o.refusal});
@@ -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,20 +0,0 @@
1
- import { type UIMessage } from '@tanstack/ai-react';
2
- /** Experimental 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
- /** Sends a user message stamped with its send time. */
10
- readonly send: (content: string) => Promise<void>;
11
- /** Stops the current reply in the browser and on the server. */
12
- readonly stop: () => Promise<void>;
13
- }
14
- /**
15
- * Experimental: the conversational assistant of the current configuration. The server owns the
16
- * thread — the chat hydrates from it on mount and rejoins a reply still streaming — so the hook
17
- * keeps nothing in browser storage. Each message carries its send time for the model. The model's
18
- * `query` and `apply` calls run here, in the browser, against the configurator this hook is rendered in.
19
- */
20
- 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 r}from"react";import{useAuthorizedClient as s,useConfigurationId as n,useDomain as o}from"#package/react-sdk";import{useConfigurator as i}from"../application-runtime/index.js";import{browserDetailsClientTool as c}from"./browser-details.js";import{applyClientTool as p,queryClientTool as l}from"./graphql-tools.js";let m=[c,l,p];export const useAssistantChat=()=>{let c=n(),p=s(),l=r(()=>p.getAssistantChatConnection(c),[p,c]),d=r(()=>{let e=async()=>({headers:await l.headers()}),a=t(l.url,e),r=t(`${l.url}/runs`,e);return{...a,joinRun:r.joinRun}},[l]),{graphQLSystem:u}=i(),{storeSystem:h,domainContextSelectors:f}=o(),{getActiveMode:w}=f,{messages:g,isLoading:j,error:y,sendMessage:C,stop:S,runId:$}=e({threadId:`assistant:${c}`,connection:d,persistence:!0,history:{pageSize:50},tools:m,context:r(()=>({graphQLSystem:u,storeSystem:h,getActiveMode:w}),[u,h,w])});return{messages:g,isLoading:j,error:y,send:a(async t=>{let e={sentAt:new Date().toISOString()};await C({content:t,metadata:e})},[C]),stop:a(async()=>{S(),null!=$&&await fetch(`${l.url}/runs/${encodeURIComponent($)}/cancel`,{method:"POST",headers:await l.headers()})},[l,$,S])}};
@@ -1,6 +0,0 @@
1
- /**
2
- * Experimental, unstyled assistant chat for the current configuration: streamed replies, reasoning
3
- * summaries, tool calls with their payloads, a pending indicator and a stop button. It renders
4
- * nothing, and contacts no server, when the application spec has no `assistant` section.
5
- */
6
- export declare const AssistantChat: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Alert as r,Box as a,Button as i,LinearProgress as n,Stack as o,TextField as l,Typography as s}from"@mui/material";import{useState as c}from"react";import{useAssistantChat as p}from"#package/configurator";import{useSpecAssistant as m}from"#package/react-sdk";let d=({part:t})=>{switch(t.type){case"text":return e(s,{sx:{whiteSpace:"pre-wrap"},children:t.content});case"thinking":return e(s,{variant:"body2",color:"text.secondary",sx:{fontStyle:"italic",whiteSpace:"pre-wrap"},children:t.content});case"tool-call":return e(s,{variant:"caption",component:"pre",sx:{m:0,whiteSpace:"pre-wrap"},children:`${t.name}(${JSON.stringify(t.input??t.arguments)}) \xb7 ${t.state}`});case"tool-result":{let r=(e=>{if("string"!=typeof e){for(let t of e)if("image"===t.type&&"data"===t.source.type)return`data:${t.source.mimeType};base64,${t.source.value}`}})(t.content);return r?e(a,{component:"img",src:r,alt:"Tool result",sx:{maxWidth:"100%",border:1}}):e(s,{variant:"caption",children:`Tool result \xb7 ${t.state}`})}default:return null}},u=()=>{let{messages:m,send:u,stop:h,isLoading:f,error:x}=p(),[g,v]=c("");return t(o,{spacing:1.5,sx:{p:2},children:[m.map(r=>t(a,{component:"div",sx:{alignSelf:"user"===r.role?"flex-end":"flex-start",maxWidth:"85%"},children:[e(s,{variant:"overline",children:r.role}),r.parts.map((t,r)=>e(d,{part:t},r))]},r.id)),f&&e(n,{"aria-label":"Assistant is responding"}),x&&e(r,{severity:"warning",children:x.message}),e("form",{onSubmit:e=>{e.preventDefault();let t=g.trim();t&&(v(""),u(t))},children:t(o,{direction:"row",spacing:1,children:[e(l,{size:"small",fullWidth:!0,placeholder:"Ask the assistant…",value:g,onChange:e=>v(e.target.value)}),f?e(i,{onClick:()=>void h(),children:"Stop"}):e(i,{type:"submit",variant:"contained",disabled:!g.trim(),children:"Send"})]})})]})};export const AssistantChat=()=>m()?e(u,{}):null;
@@ -1 +0,0 @@
1
- export { AssistantChat } from './AssistantChat.js';
@@ -1 +0,0 @@
1
- export{AssistantChat}from"./AssistantChat.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."],n=["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."],a=["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 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."],s=["- This configurator exposes no changes, so there is nothing for `apply` to run. Say so when the user asks you to change the configuration."],r=['- 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=h=>{let d=/^type Mutation\b/m.test(h.sdl);return[e,...d?[t]:[],.../^\s+addChild\(/m.test(h.sdl)?[n]:[],.../^\s+replaceEntity\(/m.test(h.sdl)?[a]:[],.../^type FieldOption\b/m.test(h.sdl)?[i]:[],[...o,...d?r:s]].map(e=>e.join("\n")).join("\n\n")};