@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
package/README.md CHANGED
@@ -42,17 +42,25 @@ Generated code exposes the `phx` global in project files: `phx.domain` for the m
42
42
 
43
43
  Run the CLI through the project's package manager so its version matches the installed SDK.
44
44
 
45
- | Command | What it does |
46
- | ------------------------------ | ---------------------------------------------------------------------------- |
47
- | `phoenix init [folder]` | Starts a project: `package.json` when missing, and a starter spec. |
48
- | `phoenix sync` | Regenerates project files and aligns dependencies and scripts. |
49
- | `phoenix dev` | Development server with hot reload, webhook tunnel and the editor. |
50
- | `phoenix build` | Production build of the frontend and the webhooks. |
51
- | `phoenix check` / `fix` | Type check, lint and format; `fix` applies the automatic fixes. |
52
- | `phoenix login <workspace>` | Signs in through Studio; the token is kept in `~/.phoenix/credentials.json`. |
53
- | `phoenix deploy` | Uploads the project sources for a platform build. |
54
- | `phoenix docs` | Searches and reads the SDK documentation bundled with the package. |
55
- | `phoenix feedback "<message>"` | Sends feedback about the SDK, CLI, documentation or Studio to Salsita. |
45
+ | Command | What it does |
46
+ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
47
+ | `phoenix init [folder]` | Starts a project: `package.json` when missing, and a starter spec. |
48
+ | `phoenix sync` | Regenerates project files and aligns dependencies and scripts. |
49
+ | `phoenix dev` | Development server with hot reload, webhook tunnel and the editor. |
50
+ | `phoenix build` | Production build of the frontend and the webhooks. |
51
+ | `phoenix check` / `fix` | Type check, lint and format; `fix` applies the automatic fixes. |
52
+ | `phoenix login <workspace>` | Signs in through Studio; the token is kept in `~/.phoenix/credentials.json`. |
53
+ | `phoenix deploy` | Uploads the project sources for a platform build. |
54
+ | `phoenix docs` | Searches and reads the SDK documentation bundled with the package. |
55
+ | `phoenix feedback "<message>"` | Sends feedback about the SDK, CLI, documentation or Studio to Salsita; `--file <path>` sends a text file instead. |
56
+
57
+ Every frontend `.js` file `phoenix build` emits starts with a comment naming the application version from `spec/application.yaml`, the git commit when the build runs in a checkout, and the SDK version. `--banner <text>` replaces the application line with your own text. The line is public in every bundle:
58
+
59
+ ```sh
60
+ pnpm phoenix build --banner "Release: ${RELEASE_NAME}; Commit: ${COMMIT_SHA}"
61
+ ```
62
+
63
+ The same build writes `.phoenix/dist/frontend/THIRD-PARTY-LICENSES.txt`, the third-party packages bundled into the frontend with their licence texts. Deploy it together with the bundles.
56
64
 
57
65
  `phoenix dev` works against your own development environment once you are signed in. Alternatively paste the development-environment block of a Studio project (`SERVER_URL`, `PROJECT_SLUG`, `ENVIRONMENT_SLUG`, `DEVELOPMENT_KEY`) into `.env`. Never commit credentials.
58
66
 
@@ -1,12 +1,13 @@
1
- import type { AssistantSpec } from '#package/application-spec';
1
+ import type { AssistantManifest } from '#package/domain';
2
2
  /**
3
3
  * The part of the assistant's system prompt that explains how to read the generated GraphQL schema.
4
4
  * It is generated here, by the SDK that also runs in the browser, and stored with the deployment,
5
5
  * because the conventions it describes belong to this SDK version and not to the server. The part
6
6
  * about changes is left out when the schema has no `Mutation` type, the part about adding
7
7
  * entities when it has no `addChild` mutation, the part about replacing them when it has no
8
- * `replaceEntity` mutation, and the part about the choices of a field when it has
9
- * no options edge. The last section explains the
10
- * `query` and `apply` tools, which every run registers whatever the schema holds.
8
+ * `replaceEntity` mutation, the part about the choices of a field when it has
9
+ * no options edge, and the part about custom changes when the manifest exposes no action. The last two sections explain the
10
+ * `query` and `apply` tools, which every run registers whatever the schema holds, and the change
11
+ * record the `AssistantSystem` attaches to every user message.
11
12
  */
12
- export declare const generateAssistantPrompt: (assistant: NonNullable<AssistantSpec>) => string;
13
+ export declare const generateAssistantPrompt: (assistant: AssistantManifest) => string;
@@ -0,0 +1 @@
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, the `sideEffects` the configurator says it would have, 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."],o=["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, the `sideEffects` the configurator says it would have, 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."],i=["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."],h=["- 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.","- `sideEffects` in the result lists what the configurator did beyond what the operations asked for, such as parts it added or replaced to keep the configuration valid, in its own words. Tell the user about them when the changes were kept. When they were not, or in `query`, it lists what the mutations that succeeded would do. `dryRun` has the same list for a single recipe or option."],d=["How to read the change record:","- Every user message starts with a change record of the configuration since your previous action. It is the complete list of the entities that were added or deleted, of the stored fields of this schema that changed, and of the selection and navigation changes, so update your picture from it and do not query those again when it does not mention them.","- Fields whose name starts with `_` are computed and are never listed. Read them again when the record lists a change they may depend on.","- `[changes: none]`: nothing changed. Do not query again what you already know.","- `[changes]` is followed by one line per change. `selected`, `navigationState`, `viewState` and `toolState` lines show `<old> -> <new>` of what `selectedEntity` and `navigation` return, with `none` for an empty value. `A <id>` is an added entity and `D <id>` a deleted one. `M <id>` is a modified entity, followed by one `<field>: <old> -> <new>` line per changed field, under the name the field has in this schema. A `reset: undo/redo` line says the user undid or redid changes.","- The `#` comment at the end of a line names the control, the transformer or the explanation of the last change to that line.","- `[changes: unavailable]`: the page was loaded since your previous action, so earlier values may be stale. `[changes: too many (n)]`: n entities changed and are not listed. In both cases query what you need."],c=["- Changes you applied are not in the record, except those that were waiting for the approval of the user: they appear in it once approved."];export const generateAssistantPrompt=l=>{let u=/^type Mutation\b/m.test(l.sdl);return[e,...u?[t]:[],.../^\s+addChild\(/m.test(l.sdl)?[a]:[],.../^\s+replaceEntity\(/m.test(l.sdl)?[n]:[],.../^type FieldOption\b/m.test(l.sdl)?[o]:[],...Object.keys(l.actions??{}).length>0?[i]:[],[...s,...u?r:h],[...d,...u?c:[]]].map(e=>e.join("\n")).join("\n\n")};
@@ -0,0 +1 @@
1
+ export { generateAssistantPrompt } from './generate-assistant-prompt.js';
@@ -0,0 +1 @@
1
+ export{generateAssistantPrompt}from"./generate-assistant-prompt.js";
@@ -53,6 +53,9 @@ export declare enum DiagnosticCode {
53
53
  PRESET_ENTITY_NOT_IN_COMPOSITION_TREE = "PRESET_ENTITY_NOT_IN_COMPOSITION_TREE",
54
54
  ADMIN_PRESET_MULTIPLE_PER_FILE = "ADMIN_PRESET_MULTIPLE_PER_FILE",
55
55
  ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN = "ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN",
56
+ ACTIONS_IN_ADMIN_FILE = "ACTIONS_IN_ADMIN_FILE",
57
+ INVALID_ACTION_NAME = "INVALID_ACTION_NAME",
58
+ ACTION_UNKNOWN_REFERENCE_TARGET = "ACTION_UNKNOWN_REFERENCE_TARGET",
56
59
  EXPRESSION_UNKNOWN_ENTITY_KEY = "EXPRESSION_UNKNOWN_ENTITY_KEY",
57
60
  INVALID_EXPRESSION_NAME = "INVALID_EXPRESSION_NAME",
58
61
  DUPLICATE_EXPRESSION = "DUPLICATE_EXPRESSION",
@@ -112,6 +115,9 @@ export declare enum DiagnosticCode {
112
115
  ASSISTANT_FIELD_NAME_CONFLICT = "ASSISTANT_FIELD_NAME_CONFLICT",
113
116
  ASSISTANT_RESERVED_TYPE_NAME = "ASSISTANT_RESERVED_TYPE_NAME",
114
117
  ASSISTANT_INVALID_SCHEMA = "ASSISTANT_INVALID_SCHEMA",
118
+ ASSISTANT_UNKNOWN_ACTION = "ASSISTANT_UNKNOWN_ACTION",
119
+ ASSISTANT_MUTATION_NAME_CONFLICT = "ASSISTANT_MUTATION_NAME_CONFLICT",
120
+ ASSISTANT_ACTION_RESULT_TYPE_CONFLICT = "ASSISTANT_ACTION_RESULT_TYPE_CONFLICT",
115
121
  INVALID_CHUNK_KEY = "INVALID_CHUNK_KEY",
116
122
  RESERVED_CHUNK_KEY = "RESERVED_CHUNK_KEY",
117
123
  CONFLICTING_DATA_ENTRY = "CONFLICTING_DATA_ENTRY",
@@ -1 +1 @@
1
- var E;export var DiagnosticCode=((E={}).EMPTY_SPEC_FILE="EMPTY_SPEC_FILE",E.YAML_PARSE_ERROR="YAML_PARSE_ERROR",E.SCHEMA_PARSE_ERROR="SCHEMA_PARSE_ERROR",E.IMPORT_MODULE_NOT_FOUND="IMPORT_MODULE_NOT_FOUND",E.IMPORT_MODULE_OUTSIDE_PROJECT="IMPORT_MODULE_OUTSIDE_PROJECT",E.MERGE_CONFLICT="MERGE_CONFLICT",E.MISSING_MODEL="MISSING_MODEL",E.MISSING_LATEST="MISSING_LATEST",E.INVALID_VERSION_KEY="INVALID_VERSION_KEY",E.MISSING_VERSION="MISSING_VERSION",E.NAME_CLASH="NAME_CLASH",E.INVALID_ENTITY_TYPE_NAME="INVALID_ENTITY_TYPE_NAME",E.DUPLICATE_ENTITY_TYPE="DUPLICATE_ENTITY_TYPE",E.INVALID_ALIAS_NAME="INVALID_ALIAS_NAME",E.RESERVED_ALIAS_NAME="RESERVED_ALIAS_NAME",E.MISSING_ROOT_ENTITY="MISSING_ROOT_ENTITY",E.CIRCULAR_ALIAS="CIRCULAR_ALIAS",E.UNKNOWN_ALIAS_MEMBER="UNKNOWN_ALIAS_MEMBER",E.UNKNOWN_SHAPE_KEY="UNKNOWN_SHAPE_KEY",E.UNKNOWN_REFERENCE_TARGET="UNKNOWN_REFERENCE_TARGET",E.RESERVED_PROPERTY="RESERVED_PROPERTY",E.INVALID_SHAPE_PROPERTY_NAME="INVALID_SHAPE_PROPERTY_NAME",E.UNKNOWN_PHX_DEFINITION="UNKNOWN_PHX_DEFINITION",E.UNKNOWN_COMMON_TYPE_REF="UNKNOWN_COMMON_TYPE_REF",E.INVALID_REF="INVALID_REF",E.MISSING_MIGRATION="MISSING_MIGRATION",E.MIGRATION_INVALID_START="MIGRATION_INVALID_START",E.UNKNOWN_MIGRATION="UNKNOWN_MIGRATION",E.PROTECTED_SHAPE="PROTECTED_SHAPE",E.PROTECTED_ALIAS="PROTECTED_ALIAS",E.RESERVED_ALIAS="RESERVED_ALIAS",E.ALIAS_INCLUDES_COMMON="ALIAS_INCLUDES_COMMON",E.PROTECTED_INVARIANT="PROTECTED_INVARIANT",E.PROTECTED_RELATION="PROTECTED_RELATION",E.PROTECTED_EXPRESSION="PROTECTED_EXPRESSION",E.PROTECTED_COMMON_TYPE="PROTECTED_COMMON_TYPE",E.PROTECTED_ENTITY_TYPE="PROTECTED_ENTITY_TYPE",E.PRESET_UNKNOWN_ROOT_ENTITY_TYPE="PRESET_UNKNOWN_ROOT_ENTITY_TYPE",E.PRESET_UNKNOWN_ENTITY_TYPE="PRESET_UNKNOWN_ENTITY_TYPE",E.PRESET_INVALID_ENTITY_ID_FORMAT="PRESET_INVALID_ENTITY_ID_FORMAT",E.PRESET_MISSING_ROOT_ENTITY="PRESET_MISSING_ROOT_ENTITY",E.PRESET_MULTIPLE_ROOT_ENTITIES="PRESET_MULTIPLE_ROOT_ENTITIES",E.PRESET_ENTITY_SCHEMA_VIOLATION="PRESET_ENTITY_SCHEMA_VIOLATION",E.PRESET_DUPLICATE_ENTITY_ID="PRESET_DUPLICATE_ENTITY_ID",E.PRESET_ENTITY_ID_TYPE_MISMATCH="PRESET_ENTITY_ID_TYPE_MISMATCH",E.PRESET_UNKNOWN_REFERENCE="PRESET_UNKNOWN_REFERENCE",E.PRESET_REFERENCE_TYPE_MISMATCH="PRESET_REFERENCE_TYPE_MISMATCH",E.PRESET_RELATION_CARDINALITY_VIOLATION="PRESET_RELATION_CARDINALITY_VIOLATION",E.PRESET_COMPOSITION_MULTIPLE_PARENTS="PRESET_COMPOSITION_MULTIPLE_PARENTS",E.PRESET_COMPOSITION_CYCLE="PRESET_COMPOSITION_CYCLE",E.PRESET_ENTITY_NOT_IN_COMPOSITION_TREE="PRESET_ENTITY_NOT_IN_COMPOSITION_TREE",E.ADMIN_PRESET_MULTIPLE_PER_FILE="ADMIN_PRESET_MULTIPLE_PER_FILE",E.ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN="ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN",E.EXPRESSION_UNKNOWN_ENTITY_KEY="EXPRESSION_UNKNOWN_ENTITY_KEY",E.INVALID_EXPRESSION_NAME="INVALID_EXPRESSION_NAME",E.DUPLICATE_EXPRESSION="DUPLICATE_EXPRESSION",E.EXPRESSION_RELATION_CONFLICT="EXPRESSION_RELATION_CONFLICT",E.CONSTANTS_EXPRESSION_CONFLICT="CONSTANTS_EXPRESSION_CONFLICT",E.COMPONENT_RELATION_CONFLICT="COMPONENT_RELATION_CONFLICT",E.COMPONENT_ALIAS_CONFLICT="COMPONENT_ALIAS_CONFLICT",E.INVALID_INVARIANT_NAME="INVALID_INVARIANT_NAME",E.INVALID_VIOLATION_TYPE_NAME="INVALID_VIOLATION_TYPE_NAME",E.INVARIANT_UNKNOWN_ENTITY_KEY="INVARIANT_UNKNOWN_ENTITY_KEY",E.INVARIANT_MANUAL_VIOLATIONS_COMPONENT="INVARIANT_MANUAL_VIOLATIONS_COMPONENT",E.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT="INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT",E.INVALID_RELATION_NAME="INVALID_RELATION_NAME",E.RELATION_UNKNOWN_ENTITY_KEY="RELATION_UNKNOWN_ENTITY_KEY",E.RELATION_UNKNOWN_TARGET="RELATION_UNKNOWN_TARGET",E.RELATION_UNKNOWN_FIELD_DIRECT="RELATION_UNKNOWN_FIELD_DIRECT",E.RELATION_UNKNOWN_FIELD_INDIRECT="RELATION_UNKNOWN_FIELD_INDIRECT",E.RELATION_IMMUTABLE_FIELD="RELATION_IMMUTABLE_FIELD",E.RELATION_MISSING_COUNTERPART="RELATION_MISSING_COUNTERPART",E.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH="RELATION_COUNTERPART_COMPOSED_OF_MISMATCH",E.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE="RELATION_ENTITY_NOT_IN_COMPOSITION_TREE",E.DUPLICATE_DATA_SCHEMA="DUPLICATE_DATA_SCHEMA",E.ADMIN_DATA_SCHEMA="ADMIN_DATA_SCHEMA",E.SESSION_DATA_REQUIRED_PROPERTIES="SESSION_DATA_REQUIRED_PROPERTIES",E.CLERK_SESSION_DATA_INCOMPATIBLE="CLERK_SESSION_DATA_INCOMPATIBLE",E.RESERVED_PUBLISHED_DATA_KEY="RESERVED_PUBLISHED_DATA_KEY",E.DUPLICATE_STATE_FIELD="DUPLICATE_STATE_FIELD",E.INVALID_STATE_KEY="INVALID_STATE_KEY",E.DUPLICATE_STATE_VALUE="DUPLICATE_STATE_VALUE",E.DUPLICATE_THEME_FIELD="DUPLICATE_THEME_FIELD",E.DUPLICATE_UI_FIELD="DUPLICATE_UI_FIELD",E.CONFLICTING_TRANSFORMERS="CONFLICTING_TRANSFORMERS",E.DUPLICATE_TRANSFORMER="DUPLICATE_TRANSFORMER",E.DUPLICATE_TRANSFORMER_FILE="DUPLICATE_TRANSFORMER_FILE",E.UNMATCHED_TRANSFORMER="UNMATCHED_TRANSFORMER",E.DUPLICATE_APP_METADATA_FIELD="DUPLICATE_APP_METADATA_FIELD",E.DUPLICATE_INFRA_FIELD="DUPLICATE_INFRA_FIELD",E.INVALID_APPLICATION_VERSION="INVALID_APPLICATION_VERSION",E.INVALID_ENV_VAR_KEY="INVALID_ENV_VAR_KEY",E.DUPLICATE_ADMIN_PAGES="DUPLICATE_ADMIN_PAGES",E.ADMIN_PAGES_NAV_STATE_CONFLICT="ADMIN_PAGES_NAV_STATE_CONFLICT",E.ADMIN_PAGE_DATA_ENTRY_CONFLICT="ADMIN_PAGE_DATA_ENTRY_CONFLICT",E.CONFLICTING_BUDGETS="CONFLICTING_BUDGETS",E.CONFLICTING_CHUNKS="CONFLICTING_CHUNKS",E.CONFLICTING_ASSISTANT="CONFLICTING_ASSISTANT",E.ASSISTANT_UNKNOWN_TYPE="ASSISTANT_UNKNOWN_TYPE",E.ASSISTANT_UNKNOWN_FIELD="ASSISTANT_UNKNOWN_FIELD",E.ASSISTANT_UNSUPPORTED_EXPRESSION="ASSISTANT_UNSUPPORTED_EXPRESSION",E.ASSISTANT_NOT_WRITABLE="ASSISTANT_NOT_WRITABLE",E.ASSISTANT_UNKNOWN_RECIPE_GROUP="ASSISTANT_UNKNOWN_RECIPE_GROUP",E.ASSISTANT_DUPLICATE_RECIPE_GROUP="ASSISTANT_DUPLICATE_RECIPE_GROUP",E.ASSISTANT_META_TYPE_NAME_CONFLICT="ASSISTANT_META_TYPE_NAME_CONFLICT",E.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT="ASSISTANT_UNKNOWN_OPTIONS_COMPONENT",E.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME="ASSISTANT_RESERVED_OPTIONS_EDGE_NAME",E.ASSISTANT_DUPLICATE_OPTIONS_EDGE="ASSISTANT_DUPLICATE_OPTIONS_EDGE",E.ASSISTANT_RESERVED_FIELD_NAME="ASSISTANT_RESERVED_FIELD_NAME",E.ASSISTANT_FIELD_NAME_CONFLICT="ASSISTANT_FIELD_NAME_CONFLICT",E.ASSISTANT_RESERVED_TYPE_NAME="ASSISTANT_RESERVED_TYPE_NAME",E.ASSISTANT_INVALID_SCHEMA="ASSISTANT_INVALID_SCHEMA",E.INVALID_CHUNK_KEY="INVALID_CHUNK_KEY",E.RESERVED_CHUNK_KEY="RESERVED_CHUNK_KEY",E.CONFLICTING_DATA_ENTRY="CONFLICTING_DATA_ENTRY",E.INVALID_DATA_ENTRY_KEY="INVALID_DATA_ENTRY_KEY",E.INVALID_DATA_DEFINITION_FIELD_KEY="INVALID_DATA_DEFINITION_FIELD_KEY",E.UNKNOWN_DATA_CHUNK="UNKNOWN_DATA_CHUNK",E.INVALID_DATA_VALUE="INVALID_DATA_VALUE",E.DEFAULTS_UNKNOWN_ENTITY_KEY="DEFAULTS_UNKNOWN_ENTITY_KEY",E.DEFAULTS_UNKNOWN_PROPERTY="DEFAULTS_UNKNOWN_PROPERTY",E.DEFAULTS_SCHEMA_VIOLATION="DEFAULTS_SCHEMA_VIOLATION",E.DEFAULTS_DEPRECATED="DEFAULTS_DEPRECATED",E.COMPONENT_INVALID_INSTANCE_NAME="COMPONENT_INVALID_INSTANCE_NAME",E.COMPONENT_MERGE_CONFLICT="COMPONENT_MERGE_CONFLICT",E.COMPONENT_UNKNOWN_ENTITY_KEY="COMPONENT_UNKNOWN_ENTITY_KEY",E.COMPONENT_IMPORT_REF_UNSUPPORTED="COMPONENT_IMPORT_REF_UNSUPPORTED",E.COMPONENT_DATA_REF_UNSUPPORTED="COMPONENT_DATA_REF_UNSUPPORTED",E.READ_BINDING_UNKNOWN_FIELD="READ_BINDING_UNKNOWN_FIELD",E.WRITE_BINDING_UNKNOWN_FIELD="WRITE_BINDING_UNKNOWN_FIELD",E.WRITE_BINDING_IMMUTABLE_FIELD="WRITE_BINDING_IMMUTABLE_FIELD",E.WRITE_BINDING_EXPRESSION_TARGET="WRITE_BINDING_EXPRESSION_TARGET",E.WRITE_BINDING_DUPLICATE_TARGET="WRITE_BINDING_DUPLICATE_TARGET",E.UNKNOWN_SRC_PATH="UNKNOWN_SRC_PATH",E.INVALID_SUBDIRECTORY="INVALID_SUBDIRECTORY",E.MISSING_WEBHOOK_INDEX="MISSING_WEBHOOK_INDEX",E.MODULE_ANALYSIS_FAILED="MODULE_ANALYSIS_FAILED",E.WEBHOOK_UNSAFE_IMPORT="WEBHOOK_UNSAFE_IMPORT",E.MOCK_TEMPLATE_PARSE_ERROR="MOCK_TEMPLATE_PARSE_ERROR",E.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED="ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED",E.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED="ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED",E.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE="ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE",E.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED="ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED",E);
1
+ var E;export var DiagnosticCode=((E={}).EMPTY_SPEC_FILE="EMPTY_SPEC_FILE",E.YAML_PARSE_ERROR="YAML_PARSE_ERROR",E.SCHEMA_PARSE_ERROR="SCHEMA_PARSE_ERROR",E.IMPORT_MODULE_NOT_FOUND="IMPORT_MODULE_NOT_FOUND",E.IMPORT_MODULE_OUTSIDE_PROJECT="IMPORT_MODULE_OUTSIDE_PROJECT",E.MERGE_CONFLICT="MERGE_CONFLICT",E.MISSING_MODEL="MISSING_MODEL",E.MISSING_LATEST="MISSING_LATEST",E.INVALID_VERSION_KEY="INVALID_VERSION_KEY",E.MISSING_VERSION="MISSING_VERSION",E.NAME_CLASH="NAME_CLASH",E.INVALID_ENTITY_TYPE_NAME="INVALID_ENTITY_TYPE_NAME",E.DUPLICATE_ENTITY_TYPE="DUPLICATE_ENTITY_TYPE",E.INVALID_ALIAS_NAME="INVALID_ALIAS_NAME",E.RESERVED_ALIAS_NAME="RESERVED_ALIAS_NAME",E.MISSING_ROOT_ENTITY="MISSING_ROOT_ENTITY",E.CIRCULAR_ALIAS="CIRCULAR_ALIAS",E.UNKNOWN_ALIAS_MEMBER="UNKNOWN_ALIAS_MEMBER",E.UNKNOWN_SHAPE_KEY="UNKNOWN_SHAPE_KEY",E.UNKNOWN_REFERENCE_TARGET="UNKNOWN_REFERENCE_TARGET",E.RESERVED_PROPERTY="RESERVED_PROPERTY",E.INVALID_SHAPE_PROPERTY_NAME="INVALID_SHAPE_PROPERTY_NAME",E.UNKNOWN_PHX_DEFINITION="UNKNOWN_PHX_DEFINITION",E.UNKNOWN_COMMON_TYPE_REF="UNKNOWN_COMMON_TYPE_REF",E.INVALID_REF="INVALID_REF",E.MISSING_MIGRATION="MISSING_MIGRATION",E.MIGRATION_INVALID_START="MIGRATION_INVALID_START",E.UNKNOWN_MIGRATION="UNKNOWN_MIGRATION",E.PROTECTED_SHAPE="PROTECTED_SHAPE",E.PROTECTED_ALIAS="PROTECTED_ALIAS",E.RESERVED_ALIAS="RESERVED_ALIAS",E.ALIAS_INCLUDES_COMMON="ALIAS_INCLUDES_COMMON",E.PROTECTED_INVARIANT="PROTECTED_INVARIANT",E.PROTECTED_RELATION="PROTECTED_RELATION",E.PROTECTED_EXPRESSION="PROTECTED_EXPRESSION",E.PROTECTED_COMMON_TYPE="PROTECTED_COMMON_TYPE",E.PROTECTED_ENTITY_TYPE="PROTECTED_ENTITY_TYPE",E.PRESET_UNKNOWN_ROOT_ENTITY_TYPE="PRESET_UNKNOWN_ROOT_ENTITY_TYPE",E.PRESET_UNKNOWN_ENTITY_TYPE="PRESET_UNKNOWN_ENTITY_TYPE",E.PRESET_INVALID_ENTITY_ID_FORMAT="PRESET_INVALID_ENTITY_ID_FORMAT",E.PRESET_MISSING_ROOT_ENTITY="PRESET_MISSING_ROOT_ENTITY",E.PRESET_MULTIPLE_ROOT_ENTITIES="PRESET_MULTIPLE_ROOT_ENTITIES",E.PRESET_ENTITY_SCHEMA_VIOLATION="PRESET_ENTITY_SCHEMA_VIOLATION",E.PRESET_DUPLICATE_ENTITY_ID="PRESET_DUPLICATE_ENTITY_ID",E.PRESET_ENTITY_ID_TYPE_MISMATCH="PRESET_ENTITY_ID_TYPE_MISMATCH",E.PRESET_UNKNOWN_REFERENCE="PRESET_UNKNOWN_REFERENCE",E.PRESET_REFERENCE_TYPE_MISMATCH="PRESET_REFERENCE_TYPE_MISMATCH",E.PRESET_RELATION_CARDINALITY_VIOLATION="PRESET_RELATION_CARDINALITY_VIOLATION",E.PRESET_COMPOSITION_MULTIPLE_PARENTS="PRESET_COMPOSITION_MULTIPLE_PARENTS",E.PRESET_COMPOSITION_CYCLE="PRESET_COMPOSITION_CYCLE",E.PRESET_ENTITY_NOT_IN_COMPOSITION_TREE="PRESET_ENTITY_NOT_IN_COMPOSITION_TREE",E.ADMIN_PRESET_MULTIPLE_PER_FILE="ADMIN_PRESET_MULTIPLE_PER_FILE",E.ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN="ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN",E.ACTIONS_IN_ADMIN_FILE="ACTIONS_IN_ADMIN_FILE",E.INVALID_ACTION_NAME="INVALID_ACTION_NAME",E.ACTION_UNKNOWN_REFERENCE_TARGET="ACTION_UNKNOWN_REFERENCE_TARGET",E.EXPRESSION_UNKNOWN_ENTITY_KEY="EXPRESSION_UNKNOWN_ENTITY_KEY",E.INVALID_EXPRESSION_NAME="INVALID_EXPRESSION_NAME",E.DUPLICATE_EXPRESSION="DUPLICATE_EXPRESSION",E.EXPRESSION_RELATION_CONFLICT="EXPRESSION_RELATION_CONFLICT",E.CONSTANTS_EXPRESSION_CONFLICT="CONSTANTS_EXPRESSION_CONFLICT",E.COMPONENT_RELATION_CONFLICT="COMPONENT_RELATION_CONFLICT",E.COMPONENT_ALIAS_CONFLICT="COMPONENT_ALIAS_CONFLICT",E.INVALID_INVARIANT_NAME="INVALID_INVARIANT_NAME",E.INVALID_VIOLATION_TYPE_NAME="INVALID_VIOLATION_TYPE_NAME",E.INVARIANT_UNKNOWN_ENTITY_KEY="INVARIANT_UNKNOWN_ENTITY_KEY",E.INVARIANT_MANUAL_VIOLATIONS_COMPONENT="INVARIANT_MANUAL_VIOLATIONS_COMPONENT",E.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT="INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT",E.INVALID_RELATION_NAME="INVALID_RELATION_NAME",E.RELATION_UNKNOWN_ENTITY_KEY="RELATION_UNKNOWN_ENTITY_KEY",E.RELATION_UNKNOWN_TARGET="RELATION_UNKNOWN_TARGET",E.RELATION_UNKNOWN_FIELD_DIRECT="RELATION_UNKNOWN_FIELD_DIRECT",E.RELATION_UNKNOWN_FIELD_INDIRECT="RELATION_UNKNOWN_FIELD_INDIRECT",E.RELATION_IMMUTABLE_FIELD="RELATION_IMMUTABLE_FIELD",E.RELATION_MISSING_COUNTERPART="RELATION_MISSING_COUNTERPART",E.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH="RELATION_COUNTERPART_COMPOSED_OF_MISMATCH",E.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE="RELATION_ENTITY_NOT_IN_COMPOSITION_TREE",E.DUPLICATE_DATA_SCHEMA="DUPLICATE_DATA_SCHEMA",E.ADMIN_DATA_SCHEMA="ADMIN_DATA_SCHEMA",E.SESSION_DATA_REQUIRED_PROPERTIES="SESSION_DATA_REQUIRED_PROPERTIES",E.CLERK_SESSION_DATA_INCOMPATIBLE="CLERK_SESSION_DATA_INCOMPATIBLE",E.RESERVED_PUBLISHED_DATA_KEY="RESERVED_PUBLISHED_DATA_KEY",E.DUPLICATE_STATE_FIELD="DUPLICATE_STATE_FIELD",E.INVALID_STATE_KEY="INVALID_STATE_KEY",E.DUPLICATE_STATE_VALUE="DUPLICATE_STATE_VALUE",E.DUPLICATE_THEME_FIELD="DUPLICATE_THEME_FIELD",E.DUPLICATE_UI_FIELD="DUPLICATE_UI_FIELD",E.CONFLICTING_TRANSFORMERS="CONFLICTING_TRANSFORMERS",E.DUPLICATE_TRANSFORMER="DUPLICATE_TRANSFORMER",E.DUPLICATE_TRANSFORMER_FILE="DUPLICATE_TRANSFORMER_FILE",E.UNMATCHED_TRANSFORMER="UNMATCHED_TRANSFORMER",E.DUPLICATE_APP_METADATA_FIELD="DUPLICATE_APP_METADATA_FIELD",E.DUPLICATE_INFRA_FIELD="DUPLICATE_INFRA_FIELD",E.INVALID_APPLICATION_VERSION="INVALID_APPLICATION_VERSION",E.INVALID_ENV_VAR_KEY="INVALID_ENV_VAR_KEY",E.DUPLICATE_ADMIN_PAGES="DUPLICATE_ADMIN_PAGES",E.ADMIN_PAGES_NAV_STATE_CONFLICT="ADMIN_PAGES_NAV_STATE_CONFLICT",E.ADMIN_PAGE_DATA_ENTRY_CONFLICT="ADMIN_PAGE_DATA_ENTRY_CONFLICT",E.CONFLICTING_BUDGETS="CONFLICTING_BUDGETS",E.CONFLICTING_CHUNKS="CONFLICTING_CHUNKS",E.CONFLICTING_ASSISTANT="CONFLICTING_ASSISTANT",E.ASSISTANT_UNKNOWN_TYPE="ASSISTANT_UNKNOWN_TYPE",E.ASSISTANT_UNKNOWN_FIELD="ASSISTANT_UNKNOWN_FIELD",E.ASSISTANT_UNSUPPORTED_EXPRESSION="ASSISTANT_UNSUPPORTED_EXPRESSION",E.ASSISTANT_NOT_WRITABLE="ASSISTANT_NOT_WRITABLE",E.ASSISTANT_UNKNOWN_RECIPE_GROUP="ASSISTANT_UNKNOWN_RECIPE_GROUP",E.ASSISTANT_DUPLICATE_RECIPE_GROUP="ASSISTANT_DUPLICATE_RECIPE_GROUP",E.ASSISTANT_META_TYPE_NAME_CONFLICT="ASSISTANT_META_TYPE_NAME_CONFLICT",E.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT="ASSISTANT_UNKNOWN_OPTIONS_COMPONENT",E.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME="ASSISTANT_RESERVED_OPTIONS_EDGE_NAME",E.ASSISTANT_DUPLICATE_OPTIONS_EDGE="ASSISTANT_DUPLICATE_OPTIONS_EDGE",E.ASSISTANT_RESERVED_FIELD_NAME="ASSISTANT_RESERVED_FIELD_NAME",E.ASSISTANT_FIELD_NAME_CONFLICT="ASSISTANT_FIELD_NAME_CONFLICT",E.ASSISTANT_RESERVED_TYPE_NAME="ASSISTANT_RESERVED_TYPE_NAME",E.ASSISTANT_INVALID_SCHEMA="ASSISTANT_INVALID_SCHEMA",E.ASSISTANT_UNKNOWN_ACTION="ASSISTANT_UNKNOWN_ACTION",E.ASSISTANT_MUTATION_NAME_CONFLICT="ASSISTANT_MUTATION_NAME_CONFLICT",E.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT="ASSISTANT_ACTION_RESULT_TYPE_CONFLICT",E.INVALID_CHUNK_KEY="INVALID_CHUNK_KEY",E.RESERVED_CHUNK_KEY="RESERVED_CHUNK_KEY",E.CONFLICTING_DATA_ENTRY="CONFLICTING_DATA_ENTRY",E.INVALID_DATA_ENTRY_KEY="INVALID_DATA_ENTRY_KEY",E.INVALID_DATA_DEFINITION_FIELD_KEY="INVALID_DATA_DEFINITION_FIELD_KEY",E.UNKNOWN_DATA_CHUNK="UNKNOWN_DATA_CHUNK",E.INVALID_DATA_VALUE="INVALID_DATA_VALUE",E.DEFAULTS_UNKNOWN_ENTITY_KEY="DEFAULTS_UNKNOWN_ENTITY_KEY",E.DEFAULTS_UNKNOWN_PROPERTY="DEFAULTS_UNKNOWN_PROPERTY",E.DEFAULTS_SCHEMA_VIOLATION="DEFAULTS_SCHEMA_VIOLATION",E.DEFAULTS_DEPRECATED="DEFAULTS_DEPRECATED",E.COMPONENT_INVALID_INSTANCE_NAME="COMPONENT_INVALID_INSTANCE_NAME",E.COMPONENT_MERGE_CONFLICT="COMPONENT_MERGE_CONFLICT",E.COMPONENT_UNKNOWN_ENTITY_KEY="COMPONENT_UNKNOWN_ENTITY_KEY",E.COMPONENT_IMPORT_REF_UNSUPPORTED="COMPONENT_IMPORT_REF_UNSUPPORTED",E.COMPONENT_DATA_REF_UNSUPPORTED="COMPONENT_DATA_REF_UNSUPPORTED",E.READ_BINDING_UNKNOWN_FIELD="READ_BINDING_UNKNOWN_FIELD",E.WRITE_BINDING_UNKNOWN_FIELD="WRITE_BINDING_UNKNOWN_FIELD",E.WRITE_BINDING_IMMUTABLE_FIELD="WRITE_BINDING_IMMUTABLE_FIELD",E.WRITE_BINDING_EXPRESSION_TARGET="WRITE_BINDING_EXPRESSION_TARGET",E.WRITE_BINDING_DUPLICATE_TARGET="WRITE_BINDING_DUPLICATE_TARGET",E.UNKNOWN_SRC_PATH="UNKNOWN_SRC_PATH",E.INVALID_SUBDIRECTORY="INVALID_SUBDIRECTORY",E.MISSING_WEBHOOK_INDEX="MISSING_WEBHOOK_INDEX",E.MODULE_ANALYSIS_FAILED="MODULE_ANALYSIS_FAILED",E.WEBHOOK_UNSAFE_IMPORT="WEBHOOK_UNSAFE_IMPORT",E.MOCK_TEMPLATE_PARSE_ERROR="MOCK_TEMPLATE_PARSE_ERROR",E.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED="ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED",E.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED="ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED",E.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE="ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE",E.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED="ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED",E);
@@ -57,6 +57,9 @@ export declare const diagnosticMessages: {
57
57
  PRESET_ENTITY_NOT_IN_COMPOSITION_TREE: (entityId: string, rootEntityId: string) => string;
58
58
  ADMIN_PRESET_MULTIPLE_PER_FILE: (fileName: string, count: number) => string;
59
59
  ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN: (fileName: string, rootEntityType: string) => string;
60
+ ACTIONS_IN_ADMIN_FILE: (file: string) => string;
61
+ INVALID_ACTION_NAME: (name: string) => string;
62
+ ACTION_UNKNOWN_REFERENCE_TARGET: (path: string, member: string, ref: string) => string;
60
63
  EXPRESSION_UNKNOWN_ENTITY_KEY: (key: string, knownNames: readonly string[]) => string;
61
64
  INVALID_EXPRESSION_NAME: (name: string) => string;
62
65
  DUPLICATE_EXPRESSION: (entityType: string, expressionName: string, firstEntityKey: string, secondEntityKey: string) => string;
@@ -127,6 +130,9 @@ export declare const diagnosticMessages: {
127
130
  } | {
128
131
  readonly field: string;
129
132
  }, entries: readonly string[]) => string;
133
+ ASSISTANT_UNKNOWN_ACTION: (name: string, declared: readonly string[]) => string;
134
+ ASSISTANT_MUTATION_NAME_CONFLICT: (entry: string, fieldName: string, takenBy: string) => string;
135
+ ASSISTANT_ACTION_RESULT_TYPE_CONFLICT: (entry: string, fieldName: string, typeName: string) => string;
130
136
  ASSISTANT_RESERVED_FIELD_NAME: (typeName: string, field: string, graphQLName: string) => string;
131
137
  ASSISTANT_FIELD_NAME_CONFLICT: (typeName: string, graphQLName: string, sources: readonly string[], writableEntry?: string) => string;
132
138
  ASSISTANT_RESERVED_TYPE_NAME: (name: string, reservedNames: readonly string[]) => string;
@@ -1 +1 @@
1
- import{DiagnosticCode as e}from"./diagnostic-codes.js";export const diagnosticMessages={[e.EMPTY_SPEC_FILE]:()=>'Spec file is empty. Every spec file must define at least one section ("model:", "components:", or "presets:"). Add content or remove the file.',[e.YAML_PARSE_ERROR]:e=>`YAML parse error: ${e}. Check for indentation issues, missing colons, or unquoted special characters.`,[e.SCHEMA_PARSE_ERROR]:(e,t)=>`Invalid value at "${e}": ${t}. Refer to the spec documentation for the expected structure at this path.`,[e.IMPORT_MODULE_NOT_FOUND]:(e,t)=>`Import module "${e}" resolves to "${t}", but no matching project source file exists. Add the source file or update import.module to a path relative to this spec file.`,[e.IMPORT_MODULE_OUTSIDE_PROJECT]:(e,t)=>`Import module "${e}" resolves outside the project root as "${t}", so its target cannot be verified. Confirm that the external file exists and that the path is intentional.`,[e.MOCK_TEMPLATE_PARSE_ERROR]:e=>`Mock template parse warning: ${e}. The mock template was skipped. Fix the YAML or remove the file.`,[e.MERGE_CONFLICT]:(e,t,n,a)=>`"model.${e}.${t}" is defined in both "${n}" and "${a}". Each subsection (entityTypes, aliases, shapes, commonTypes) can only appear once per version. Move all "${t}" for "${e}" into one file.`,[e.MISSING_MODEL]:e=>`No "${e}" section found. Every application must define at least "${e}.latest" with entity types and aliases. Add a "${e}:" section to a spec file.`,[e.MISSING_LATEST]:e=>`"${e}.latest" is missing. The "latest" version defines the current working model and is always required. Add "latest:" under "${e}:".`,[e.INVALID_VERSION_KEY]:e=>`"${e}" is not a valid version key. Version keys must be "latest" or "v1", "v2", etc. Rename "${e}".`,[e.MISSING_VERSION]:e=>`Model version "v${e}" is missing. Versions must be contiguous (v1, v2, …, latest) with no gaps. Add "v${e}:" or remove higher versions.`,[e.NAME_CLASH]:(e,t,n)=>`Name "${t}" is used as both a ${e} and a ${n}. Names must be unique across entity types, aliases, and commonTypes within a version. Rename one of them.`,[e.INVALID_ENTITY_TYPE_NAME]:e=>`"${e}" is not a valid entity type name. Entity types must be PascalCase (e.g. "Product", "KitchenRange"). Rename it.`,[e.DUPLICATE_ENTITY_TYPE]:e=>`Entity type "${e}" is declared more than once. Entity types must be unique. Remove the duplicate.`,[e.INVALID_ALIAS_NAME]:e=>`"${e}" is not a valid alias name. Aliases must be PascalCase (e.g. "RootEntity", "EditableItems"). Rename it.`,[e.RESERVED_ALIAS_NAME]:e=>`"${e}" is a reserved alias. "AnyDomainEntity" is auto-generated from all entity types and cannot be user-defined. Choose a different name.`,[e.MISSING_ROOT_ENTITY]:()=>'"RootEntity" alias is not defined. Every model must have a "RootEntity" alias that identifies which entity types can be used as configuration roots. Add "RootEntity: [YourType]" to your aliases.',[e.CIRCULAR_ALIAS]:e=>`Circular alias reference: ${e}. An alias cannot reference itself, directly or through other aliases. Remove one reference in the cycle.`,[e.UNKNOWN_ALIAS_MEMBER]:(e,t)=>`Alias "${e}" references "${t}", which is not a declared entity type or alias. Check the spelling or add "${t}" to entityTypes.`,[e.UNKNOWN_SHAPE_KEY]:e=>`Shape "${e}" does not match any declared entity type or alias. Shapes can only be defined for names that appear in entityTypes or aliases. Check the spelling or add "${e}" to entityTypes.`,[e.UNKNOWN_REFERENCE_TARGET]:(e,t,n)=>`"${e}.${t}" references "${n}", which is not a declared entity type or alias. Check the spelling or add "${n}" to entityTypes.`,[e.RESERVED_PROPERTY]:(e,t)=>`Property "${e}" on "${t}" is reserved. "id" and "type" are injected automatically and cannot appear in shapes. Remove "${e}" from the shape.`,[e.INVALID_SHAPE_PROPERTY_NAME]:e=>`"${e}" is not a valid shape property name. Property names must match /^[a-z]\\w*$/ — start with a lowercase letter, then word characters only (e.g. "height", "positionX", "hoodId"). Rename the property.`,[e.UNKNOWN_PHX_DEFINITION]:(e,t)=>`$ref "${e}" references unknown phoenix type "${t}". Available built-in types include DomainEntityId, Localizable, MultilingualString. Check the spelling.`,[e.UNKNOWN_COMMON_TYPE_REF]:(e,t)=>`$ref "${e}" references unknown commonType "${t}". The target must be declared in commonTypes of the same model version. Check the spelling or add "${t}" to commonTypes.`,[e.INVALID_REF]:e=>`$ref "${e}" is not a recognized reference format. Use "phx:TypeName" for built-in types, "common:TypeName" for commonTypes, or "#/model/{version}/commonTypes/{name}" for explicit version refs.`,[e.MISSING_MIGRATION]:e=>`No migration file for v${e}. Every version from v2 onward needs a migration (src/migrations/v${e}.ts) that transforms state from the previous version. Create the file.`,[e.MIGRATION_INVALID_START]:e=>`Migration "${e}" starts below v2. v1 is the initial version with no predecessor to migrate from. Remove this file.`,[e.UNKNOWN_MIGRATION]:(e,t,n)=>`Migration "${e}" targets v${t}, but the latest model version is v${n}. There is no model version for this migration to apply to. Remove the file or add model version v${t}.`,[e.PROTECTED_SHAPE]:e=>`Shape "${e}" cannot be user-defined. This entity type is part of the built-in admin model and its shape is managed by the system. Remove this shape.`,[e.PROTECTED_ALIAS]:e=>`Alias "${e}" cannot be user-defined in admin files. "RootEntity" and "CommonAdminEntity" are managed by the built-in admin model. Choose a different name.`,[e.RESERVED_ALIAS]:e=>`Alias "${e}" is auto-generated and cannot be user-defined. Remove this alias definition.`,[e.ALIAS_INCLUDES_COMMON]:(e,t)=>`Alias "${e}" includes "${t}", which is a built-in admin entity type. User aliases cannot include built-in admin types. Remove "${t}" from the alias.`,[e.PROTECTED_INVARIANT]:(e,t)=>`Invariant "${e}.${t}" is a built-in common admin invariant and cannot be overridden. Remove this declaration; the built-in implementation is always applied.`,[e.PROTECTED_RELATION]:(e,t)=>`Relation "${e}.${t}" is a built-in common admin relation and cannot be overridden. Remove this declaration; the built-in relation is always applied.`,[e.PROTECTED_EXPRESSION]:(e,t)=>`Expression "${e}.${t}" is reserved for the built-in common admin spec and cannot be user-defined. Rename this expression.`,[e.PROTECTED_COMMON_TYPE]:e=>`Common type "${e}" is part of the built-in admin model and cannot be user-defined. Choose a different name.`,[e.PROTECTED_ENTITY_TYPE]:e=>`Entity type "${e}" is part of the built-in admin model and cannot be re-declared. Remove it from entityTypes.`,[e.PRESET_UNKNOWN_ROOT_ENTITY_TYPE]:(e,t)=>`Preset rootEntityType "${e}" is not allowed. Allowed root types: ${t.join(", ")}. Use one of these or update the RootEntity alias.`,[e.PRESET_UNKNOWN_ENTITY_TYPE]:(e,t,n)=>`Preset entity "${e}" has type "${t}", which is not a declared entity type. Declared types: ${n.join(", ")}. Fix the type or add "${t}" to entityTypes.`,[e.PRESET_INVALID_ENTITY_ID_FORMAT]:e=>`Entity ID "${e}" does not follow the required format. IDs must match "TypeName-N" (e.g. "Product-1", "Hood-42"). Rename it.`,[e.PRESET_MISSING_ROOT_ENTITY]:e=>`Preset declares rootEntityType "${e}" but no entity of that type exists in initialDomainEntities. Add an entity with type "${e}".`,[e.PRESET_MULTIPLE_ROOT_ENTITIES]:(e,t)=>`Preset has ${t} entities of type "${e}", but exactly one root entity is required. Remove the extra "${e}" entities.`,[e.PRESET_ENTITY_SCHEMA_VIOLATION]:(e,t,n,a)=>`Preset entity "${e}" (${t}) has invalid data at ${n}: ${a}. Fix the value to match the entity schema.`,[e.PRESET_DUPLICATE_ENTITY_ID]:e=>`Preset entity ID "${e}" is used more than once. Entity IDs must be unique in a preset. Rename or remove the duplicate entity.`,[e.PRESET_ENTITY_ID_TYPE_MISMATCH]:(e,t,n)=>`Preset entity "${e}" has type "${t}", but its ID starts with "${n}". IDs must use the entity type prefix. Rename the ID to start with "${t}-" or change the entity type.`,[e.PRESET_UNKNOWN_REFERENCE]:(e,t,n)=>`Preset entity "${e}" references "${n}" from "${t}", but no entity with that ID exists in the preset. Add the referenced entity or update the reference.`,[e.PRESET_REFERENCE_TYPE_MISMATCH]:(e,t,n,a,i)=>`Preset entity "${e}" references "${n}" from "${t}", but the referenced entity has type "${a}". Allowed target types: ${i.join(", ")}. Use a matching entity ID.`,[e.PRESET_RELATION_CARDINALITY_VIOLATION]:(e,t,n,a)=>`Preset entity "${e}" violates relation "${t}" cardinality "${n}". The relation resolves ${a} entities. Add or remove referenced entities so the relation matches its cardinality.`,[e.PRESET_COMPOSITION_MULTIPLE_PARENTS]:(e,t,n)=>`Preset entity "${e}" is composed by both "${t}" and "${n}". Composition must form one tree. Remove one parent reference.`,[e.PRESET_COMPOSITION_CYCLE]:e=>`Preset composition contains a cycle at "${e}". Composition must form a tree from the root entity. Remove the cyclic reference.`,[e.PRESET_ENTITY_NOT_IN_COMPOSITION_TREE]:(e,t)=>`Preset entity "${e}" is not reachable from root entity "${t}" through composedOf relations. Add a composition relation path from the root or remove the entity.`,[e.ADMIN_PRESET_MULTIPLE_PER_FILE]:(e,t)=>`Admin file "${e}" has ${t} presets. Only 1 preset per admin file is allowed. Split into separate files or merge into one preset.`,[e.ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN]:(e,t)=>`Admin preset in "${e}" has rootEntityType "${t}". Admin presets must always use rootEntityType "Admin". Change it to "Admin".`,[e.EXPRESSION_UNKNOWN_ENTITY_KEY]:(e,t)=>`Expression key "${e}" is not a declared entity type or alias. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.INVALID_EXPRESSION_NAME]:e=>`"${e}" is not a valid expression name. Expression names must start with "$" followed by camelCase (e.g. "$price", "$isValid"). Rename it.`,[e.DUPLICATE_EXPRESSION]:(e,t,n,a)=>`Expression "${e}.${t}" is produced by both "${n}" and "${a}" after alias expansion. Expression names must be unique for each concrete entity type. Remove one declaration or rename it.`,[e.EXPRESSION_RELATION_CONFLICT]:(e,t)=>`Expression "${e}.${t}" is declared in both "expressions:" and generated by a relation. User expressions cannot shadow relation-derived expressions. Remove the user declaration or rename the relation.`,[e.CONSTANTS_EXPRESSION_CONFLICT]:(e,t)=>`Expression "${e}.${t}" is declared in both "constants:" and "expressions:" in the same file. Use only one source of truth and migrate the legacy constant into "expressions:".`,[e.COMPONENT_RELATION_CONFLICT]:(e,t)=>`Component "${e}::${t}" is declared in both "components:" and generated by a relation. User components cannot shadow relation-derived components. Remove the user declaration or rename the relation.`,[e.COMPONENT_ALIAS_CONFLICT]:(e,t,n,a,i)=>`Component instance "${e}.${t}.${n}" is produced by both "${a}" and "${i}". Component instance names must be unique after alias expansion. Rename one instance or move the shared properties to one declaration.`,[e.COMPONENT_IMPORT_REF_UNSUPPORTED]:(e,t,n,a,i,s)=>`Component prop "${e}.${t}.${n}.${a}" uses unsupported $importRef "${i}#${s}". Application-spec component values are part of the webhook-included domain and cannot reference frontend modules. Fix: remove $importRef from the spec and attach the component from a frontend-only file in src/components.`,[e.COMPONENT_DATA_REF_UNSUPPORTED]:(e,t,n,a,i,s)=>`Component prop "${e}.${t}.${n}.${a}" combines "$read: ${i}" with the legacy "$data: ${s}" marker. Application-spec components resolve "$read" against entity fields and declared expressions only, so the combined marker never becomes a binding. Fix: remove "$data" and implement "${i}" with createDataSwatchMap('${s.split(".").at(-1)??s}') in the project's custom expressions.`,[e.INVALID_INVARIANT_NAME]:e=>`"${e}" is not a valid invariant name. Invariant names must start with a lowercase letter and contain only word characters (e.g. "nameNotEmpty"). Rename it.`,[e.INVALID_VIOLATION_TYPE_NAME]:e=>`"${e}" is not a valid violation type. Violation types must start with a lowercase letter and contain only letters, digits, underscores, or hyphens (e.g. "name-empty"). Rename it.`,[e.INVARIANT_UNKNOWN_ENTITY_KEY]:(e,t)=>`Invariants are declared for "${e}", which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.INVARIANT_MANUAL_VIOLATIONS_COMPONENT]:e=>`Component "violations" on "${e}" cannot be declared manually because invariant parsing generates it automatically. Remove the manual component declaration.`,[e.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT]:(e,t)=>`Expression "${e}.$violations" is declared in "${t}:" but invariant parsing generates it automatically for the same entity type. Remove the declaration or rename it.`,[e.INVALID_RELATION_NAME]:e=>`"${e}" is not a valid relation name. Relation names must start with "$" followed by camelCase (e.g. "$top", "$legs"). Rename it.`,[e.RELATION_UNKNOWN_ENTITY_KEY]:(e,t)=>`Relations declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.RELATION_UNKNOWN_TARGET]:(e,t,n,a)=>`Relation "${e}.${t}" targets "${n}" which is not an entity type or alias in the model. Known names: ${a.join(", ")}. Check the spelling or add "${n}" to entityTypes.`,[e.RELATION_UNKNOWN_FIELD_DIRECT]:(e,t,n)=>`Relation "${e}.${t}" references field "${n}" which does not exist in the shape of "${e}". Add "${n}" to the "${e}" schema or pick a different field.`,[e.RELATION_UNKNOWN_FIELD_INDIRECT]:(e,t,n,a)=>`Relation "${e}.${t}" references field "${n}" which does not exist in the shape of target "${a}". Add "${n}" to the "${a}" schema or pick a different field.`,[e.RELATION_IMMUTABLE_FIELD]:(e,t,n,a)=>`Relation "${e}.${t}" uses implicit field "${n}" on "${a}" as a relation reference holder. Implicit fields "id" and "type" are immutable and cannot hold relation references. Choose a writable shape field on "${a}".`,[e.RELATION_MISSING_COUNTERPART]:(e,t,n,a,i,s)=>{let o=void 0!==i?` with field "${i}"`:"",r=s?`Set "composedOf: false" on the counterpart because "${e}.${t}" already owns the composition.`:'Set "composedOf: false" on the counterpart for a cross-reference, or "composedOf: true" if the counterpart should own the composition.';return`Relation "${e}.${t}" (${n} → "${a}"${void 0!==i?`, field "${i}"`:""}) has no counterpart on "${a}". Every relation must be declared from both sides — add a "${"allOfType"===n?"allOfType":"direct"===n?"indirect":"direct"}" relation on "${a}" targeting "${e}"${o}. ${r}`},[e.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH]:(e,t,n,a)=>`Relation "${e}.${t}" and its counterpart "${n}.${a}" both use "composedOf: true". A relation pair can have at most one composition owner — set "composedOf: false" on one side.`,[e.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE]:(e,t)=>`Entity "${e}" is not reachable from any root entity type (${t.join(", ")}) via "composedOf: true" relations. Every declared entity must be part of the composition tree, otherwise instances of it can never appear in a valid domain state. Add a relation with "composedOf: true" from a reachable parent, or include "${e}" in the RootEntity alias.`,[e.DUPLICATE_DATA_SCHEMA]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each data schema can only be declared in one file. Remove the duplicate.`,[e.ADMIN_DATA_SCHEMA]:(e,t)=>`"${e}" is declared in admin spec "${t}". Data schemas are configurator-only. Move "${e}" to a non-admin spec file.`,[e.SESSION_DATA_REQUIRED_PROPERTIES]:(e,t)=>`sessionData in "${t}" declares required properties (${e.map(e=>`"${e}"`).join(", ")}), but admin and preset sessions do not carry custom session data. Remove these properties from required or set required to an empty array.`,[e.CLERK_SESSION_DATA_INCOMPATIBLE]:e=>`sessionData is not compatible with the built-in Clerk session payload: ${e.join("; ")}. When "useClerk" is true, the SDK's Clerk auth handlers return { id: string, accessToken: string, tags: string[], emailAddress: string, fullName: string | null }, and runtime session parsing rejects any payload the schema does not accept. Declare all five properties with these exact types (the "type" keyword is compared literally, so $ref, anyOf, and oneOf forms are not recognized) and keep them out of "required" so anonymous sessions stay valid. Extra project-defined properties are allowed.`,[e.RESERVED_PUBLISHED_DATA_KEY]:e=>`publishedData property "${e}" is reserved by the admin system. Properties like "presetCategories" and "recipes" are auto-injected. Remove "${e}" from your publishedData properties.`,[e.DUPLICATE_STATE_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each state field can only be declared in one file. Remove the duplicate.`,[e.INVALID_STATE_KEY]:(e,t)=>`State key "${t}" in "${e}" is not a valid identifier. State keys must start with a letter and contain only letters, digits, or underscores (e.g. "overview", "detailView"). Rename it.`,[e.DUPLICATE_STATE_VALUE]:(e,t)=>`State value "${t}" appears more than once in "${e}". Each value within a state array must be unique. Remove the duplicate.`,[e.DUPLICATE_THEME_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each theme field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_UI_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each UI field can only be declared in one file. Remove the duplicate.`,[e.CONFLICTING_TRANSFORMERS]:(e,t)=>`Transformers are declared in both "${e}" and "${t}". The "transformers" section can only appear in one spec file. Move all transformers into a single file.`,[e.DUPLICATE_TRANSFORMER]:(e,t)=>`Transformer "${e}" is declared twice in "${t}". Transformer names must be unique within the file. Remove the duplicate entry.`,[e.DUPLICATE_TRANSFORMER_FILE]:(e,t)=>`Transformer files "${e}" and "${t}" resolve to the same transformer name. Transformers are matched by file name, ignoring folders, letter case, and dashes. Rename one of the files so every transformer file name is unique.`,[e.UNMATCHED_TRANSFORMER]:(e,t)=>`Transformer "${e}" has no matching file in "src/transformers/". Every name listed under "transformers:" must correspond to a transformer module. ${t.length>0?`Available transformers: ${t.map(e=>`"${e}"`).join(", ")}. Check the spelling or add "src/transformers/${e}.ts".`:`No transformer files were found in "src/transformers/". Add "src/transformers/${e}.ts" or remove the entry.`}`,[e.DUPLICATE_APP_METADATA_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each metadata field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_INFRA_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each infrastructure field can only be declared in one file. Remove the duplicate.`,[e.INVALID_APPLICATION_VERSION]:e=>`"${e}" is not a valid applicationVersion. Version must be semver (x.y.z) using three numeric segments (e.g. "1.0.0", "2.3.12"). Update "applicationVersion" to match.`,[e.INVALID_ENV_VAR_KEY]:(e,t)=>`"${t}" is not a valid env.${e} variable name. Env var names must match /^[A-Z_][A-Z0-9_]*$/ — uppercase letters, digits, and underscores; must not start with a digit (e.g. "API_URL", "_PRIVATE_FLAG"). Rename the variable.`,[e.DUPLICATE_ADMIN_PAGES]:(e,t)=>`"$adminPages" is defined in both "${e}" and "${t}". Admin pages can only be declared in one admin spec file. Move all "$adminPages" settings into one admin file.`,[e.ADMIN_PAGES_NAV_STATE_CONFLICT]:e=>`Admin navigation states [${e.join(", ")}] are declared manually and generated from "$adminPages". Remove the manual entries from "navigationStates" in the admin spec or change the "$adminPages" navigationState values.`,[e.ADMIN_PAGE_DATA_ENTRY_CONFLICT]:(e,t)=>`"$adminPages.pages.${e}.connectedDataEntry" references data entry "${t}". This data entry already creates an inferred admin data page. Remove the explicit admin page connection or change the data entry kind.`,[e.CONFLICTING_BUDGETS]:(e,t)=>`"budgets" is declared in both "${e}" and "${t}". The "budgets" section can only appear in one spec file. Move all bundle-size budgets into a single file.`,[e.CONFLICTING_CHUNKS]:(e,t)=>`"chunks" is declared in both "${e}" and "${t}". The "chunks" section can only appear in one spec file. Move all chunk definitions into a single file.`,[e.CONFLICTING_ASSISTANT]:(e,t)=>`"assistant" is declared in both "${e}" and "${t}". The "assistant" manifest can only appear in one spec file. Move the whole "assistant" section into a single file.`,[e.ASSISTANT_UNKNOWN_TYPE]:(e,t)=>`"assistant.${e}.${t}" does not name an entity type or alias of the latest model, so it has nothing to ${({entities:"expose",deletable:"make deletable",writable:"make writable",childRecipes:"add children to",replaceRecipes:"replace"})[e]}. Use an entity type or alias name from "model.latest", or remove the entry.`,[e.ASSISTANT_UNKNOWN_FIELD]:(e,t,n)=>n.startsWith("$")?`"assistant.entities.${t}.${n}" is not an expression declared on "${t}". The assistant schema exposes expressions declared in "expressions", "constants" or "relations" on the entity type or alias itself, and on an entity type also those of its aliases; an expression only inferred from a component "$read" is not declared. Declare "${n}" in "expressions", "constants" or "relations" on "${t}" (for an entity type, an alias containing it also works), or remove the entry.`:`"assistant.${e}.${t}.${n}" is not a stored field of "${t}". The assistant schema ${"entities"===e?"exposes":"writes"} shape properties of the entity type or alias, including fields every alias member has. Use a property from the "${t}" shape, or remove the entry.`,[e.ASSISTANT_UNSUPPORTED_EXPRESSION]:(e,t)=>`"assistant.entities.${e}.${t}" whitelists the "$violations" expression, which the assistant schema does not expose yet: violations get their own typed edge in CON-2869. Remove the entry.`,[e.ASSISTANT_NOT_WRITABLE]:(e,t)=>`"assistant.writable.${e}.${t}" cannot be written: ${t.startsWith("$")?"an expression is computed from the state, not stored":`"${t}" identifies the entity and never changes`}. Only stored shape properties other than "id" and "type" can be writable. Remove the entry${t.startsWith("$")?", or make the stored fields the expression reads writable instead":""}.`,[e.ASSISTANT_UNKNOWN_RECIPE_GROUP]:({section:e,component:t},n,a,i,s)=>`"assistant.${e}.${n}.groups.${a}" does not name a "${t}" component instance on "${i}", so there are no recipes to expose. ${s.length>0?`"${i}" has these "${t}" instances: ${s.join(", ")}.`:`"${i}" has no "${t}" component.`} Use the instance name of a "${t}" component attached to the entity type or to an alias containing it, or remove the entry.`,[e.ASSISTANT_DUPLICATE_RECIPE_GROUP]:({section:e,mutation:t},n,a,i)=>`"${n}" gets the recipe group id "${a}" from both "assistant.${e}.${i.join(`" and "assistant.${e}.`)}", but "${t}" finds a group of an entity by its id. The entries may come from "${n}" itself or from aliases containing it. Give one of them another id with "as".`,[e.ASSISTANT_META_TYPE_NAME_CONFLICT]:(e,t)=>`This entry exposes a recipe group or the options of a field on "${e}", so the assistant schema generates the type "${t}" for them, but the model already has an entity type or alias named "${t}". Rename that entity type or alias, or remove every "assistant.childRecipes" and "assistant.replaceRecipes" group and every "options" of a writable field of "${e}".`,[e.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT]:(e,{componentType:t,instanceName:n},a,i)=>`"assistant.writable.${e}.options" names the "${t}" instance "${n}", which "${a}" does not have, so there are no choices to list. ${i.length>0?`"${a}" has these "${t}" instances: ${i.join(", ")}.`:`"${a}" has no "${t}" component.`} Use the name of a "${t}" instance attached to the entity type or to an alias containing it, correct "componentType", or remove "options".`,[e.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME]:(e,t,n)=>`"assistant.writable.${e}.options" would add the edge "${t}" to the meta type, but that name is taken by a recipe groups edge. Name the edge differently with "as", e.g. "as: ${n}Choices".`,[e.ASSISTANT_DUPLICATE_OPTIONS_EDGE]:(e,t,n)=>`"${e}" gets ${"edgeName"in t?`the options edge "${t.edgeName}"`:`options for the field "${t.field}"`} from both "assistant.writable.${n.join('.options" and "assistant.writable.')}.options", but ${"edgeName"in t?"one edge lists the choices of one field":"a written value is checked against one list of choices"}. The entries may come from "${e}" itself or from aliases containing it. ${"edgeName"in t?'Give one of them another name with "as", or remove':"Remove"} "options" from one of them.`,[e.ASSISTANT_RESERVED_FIELD_NAME]:(e,t,n)=>`"assistant.entities.${e}.${t}" is exposed as "${n}", which the assistant schema reserves ("id", "type" and "meta" are reserved on every type). Expose it under another name with "as", e.g. "as: ${t}Value".`,[e.ASSISTANT_FIELD_NAME_CONFLICT]:(e,t,n,a)=>void 0===a?`"${t}" on "${e}" in the assistant schema maps to both "${n.join('" and "')}", but one GraphQL field can read only one stored field or expression. The entries may come from "${e}" itself or from aliases containing it. Rename one of them with "as".`:`"assistant.writable.${a}" makes "${t}" writable on "${e}" without exposing it, so its delta field would be named "${t}", but "assistant.entities" already exposes "${n[0]}" on "${e}" under that name. One name cannot read one stored field or expression and write another. Expose "${t}" in "assistant.entities" under another name with "as", or rename the entry that exposes "${n[0]}".`,[e.ASSISTANT_RESERVED_TYPE_NAME]:(e,t)=>`"${e}" is an entity type or alias name that the assistant GraphQL schema reserves for its own types (${t.join(", ")}), so the schema cannot be generated. Rename the entity type or alias, or remove the "assistant" section.`,[e.ASSISTANT_INVALID_SCHEMA]:e=>`The GraphQL schema generated from the "assistant" manifest is invalid: ${e.join(" ")} This usually means aliases sharing an entity whitelist the same field with different types. Whitelist the field on one alias only, or rename one entry with "as".`,[e.INVALID_CHUNK_KEY]:e=>`"${e}" is not a valid chunk key. Chunk keys must be lowercase kebab-case matching /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/ (e.g. "main", "swatch-data"). Rename the chunk.`,[e.RESERVED_CHUNK_KEY]:()=>'"system" is a reserved chunk key used for presets and recipes. It cannot be user-defined and is auto-injected after validation. Please use a different key name.',[e.CONFLICTING_DATA_ENTRY]:(e,t,n,a)=>`"$data.${e}.${t}" is defined in both "${n}" and "${a}". Each data entry key can only be declared once per section. Move the entry into one file, delete the duplicate, or rename one entry.`,[e.INVALID_DATA_ENTRY_KEY]:(e,t)=>`"$data.${e}.${t}" is not a valid data entry key. Data entry keys must start with a letter, followed by letters, digits, or underscores (/^[A-Za-z]\\w*$/, e.g. "colorOptions" or "ColorOptions"). Rename the entry.`,[e.INVALID_DATA_DEFINITION_FIELD_KEY]:(e,t)=>`"$data.custom.${e}.definition.${t}" is not a valid field key. Definition field keys must match /^\\$?[a-z][\\w.-]*$/ — start with lowercase or "$", then letters, digits, "_", ".", or "-". Rename the field.`,[e.UNKNOWN_DATA_CHUNK]:(e,t,n)=>`"$data.${e}.${t}" references unknown chunk "${n}". The chunk reference must match a key declared under "chunks:". Add the chunk or update the entry chunk.`,[e.INVALID_DATA_VALUE]:(e,t,n,a)=>`"$data.custom.${e}.values[${t}].${n}" has an invalid value. Expected ${a}. Fix the value or update the field definition.`,[e.DEFAULTS_UNKNOWN_ENTITY_KEY]:(e,t)=>`Defaults declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.DEFAULTS_UNKNOWN_PROPERTY]:(e,t,n,a)=>{let i=n.length>0?n.join(", "):"(none)",s=a&&a.length>0?` Alias member(s) missing "${t}": ${a.join(", ")}.`:"";return`Default "${e}.${t}" refers to a property that does not exist on the shape of "${e}". Known properties: ${i}.${s} Remove the default or add "${t}" to the shape.`},[e.DEFAULTS_SCHEMA_VIOLATION]:(e,t,n,a,i)=>{let s=i?` (alias member "${i}")`:"",o=n&&"(root)"!==n?` at "${n}"`:"";return`Default "${e}.${t}"${s} does not match the entity shape${o}: ${a}. Defaults must be assignable to their shape property. Fix the value or update the shape.`},[e.DEFAULTS_DEPRECATED]:()=>'The "defaults:" section is deprecated. Defaults remain supported for legacy parity, but new specs should model initial values as "$data" entries — see spec/application-specification/parsing/data-chunks.md. Defaults are planned for removal once the $data migration path is documented.',[e.COMPONENT_INVALID_INSTANCE_NAME]:(e,t,n)=>`Component instance name "${n}" in "${e}.${t}" is not a valid identifier. Instance names must start with a letter and contain only letters, digits, or underscores (e.g. "default", "body", "main"). Rename it.`,[e.COMPONENT_MERGE_CONFLICT]:(e,t,n,a,i)=>`Component instance "${e}.${t}.${n}" is defined in both "${a}" and "${i}". Each component instance can only appear in one file. Remove the duplicate.`,[e.COMPONENT_UNKNOWN_ENTITY_KEY]:(e,t)=>`Components declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.READ_BINDING_UNKNOWN_FIELD]:(e,t,n,a,i)=>`$read binding "${a}" in "${e}.${t}.${n}" references field "${i}" which does not exist in the shape of "${e}". Add "${i}" to the shape or fix the $read target.`,[e.WRITE_BINDING_UNKNOWN_FIELD]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets field "${i}" which does not exist in the shape of "${e}". Add "${i}" to the shape or fix the target.`,[e.WRITE_BINDING_IMMUTABLE_FIELD]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets implicit field "${i}". Implicit fields "id" and "type" are immutable and cannot be changed. Use $read to consume the field or choose a writable shape field.`,[e.WRITE_BINDING_EXPRESSION_TARGET]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets "${i}" which is an expression. Write targets must be entity shape fields, not expressions. Use $read for expression bindings, $write/$bind for shape fields.`,[e.WRITE_BINDING_DUPLICATE_TARGET]:(e,t,n,a,i,s)=>`Entity field "${a}" is written by both "${i}" and "${s}" in "${e}.${t}.${n}". Each entity field can only be written by one component property. Remove one of the bindings.`,[e.UNKNOWN_SRC_PATH]:e=>`File "${e}" is in an unknown src/ folder. Only known folders (expressions, invariants, components, transformers, handlers, elements, webhooks, locales, admin/*, migrations) or _-prefixed shared folders are allowed. Move the file or rename the folder with a "_" prefix.`,[e.INVALID_SUBDIRECTORY]:(e,t)=>`File "${e}" is nested inside "${t}", but migrations must be flat. Move the migration file directly into "${t}" or prefix the folder with "_".`,[e.MISSING_WEBHOOK_INDEX]:()=>"Files found in src/webhooks/ but src/webhooks/index.ts is missing. The webhook entry point requires a default export from src/webhooks/index.ts. Create the file with a default export of your webhook handler.",[e.MODULE_ANALYSIS_FAILED]:(e,t)=>`Cannot analyze module "${e}": ${t}. Fix the file's syntax so its imports and webhook membership can be determined.`,[e.WEBHOOK_UNSAFE_IMPORT]:(e,t,n,a)=>`Webhook-included file "${e}" is not server-safe: it is included because ${t}, but "${n}" imports client-only "${a}". Fix: remove or isolate the client-only import, or remove the file's webhook membership.`,[e.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED]:()=>'"$eval" is not allowed in this position. "$eval" requires "self", which is only available inside expressions and component props — it is not available in static slots such as defaults. Replace the "$eval" with a literal value, "$msg", or move the dynamic logic into an "expressions:" entry.',[e.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED]:()=>'"$msg" is not allowed in this position. This slot does not accept localized messages (e.g. component props, which are resolved without an i18n context). Replace "$msg" with a plain string, or move the message into a slot that supports i18n such as defaults or expressions.',[e.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE]:e=>`Could not infer a schema from "$eval: ${e}" because the expression is not statically foldable. Add explicit schema keys to the expression entry, or use only literals, constant operators, and deterministic Math members.`,[e.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED]:()=>'"$codeRef" with an inline "code" block is no longer supported by the application spec parser. It was never evaluated — the value was carried through as plain data. Use "$eval" instead, for example "$eval: \'4 * 25.4\'". "$eval" folds literals, constant operators, and deterministic Math members at parse time; anything else needs explicit schema keys.'};
1
+ import{DiagnosticCode as e}from"./diagnostic-codes.js";export const diagnosticMessages={[e.EMPTY_SPEC_FILE]:()=>'Spec file is empty. Every spec file must define at least one section ("model:", "components:", or "presets:"). Add content or remove the file.',[e.YAML_PARSE_ERROR]:e=>`YAML parse error: ${e}. Check for indentation issues, missing colons, or unquoted special characters.`,[e.SCHEMA_PARSE_ERROR]:(e,t)=>`Invalid value at "${e}": ${t}. Refer to the spec documentation for the expected structure at this path.`,[e.IMPORT_MODULE_NOT_FOUND]:(e,t)=>`Import module "${e}" resolves to "${t}", but no matching project source file exists. Add the source file or update import.module to a path relative to this spec file.`,[e.IMPORT_MODULE_OUTSIDE_PROJECT]:(e,t)=>`Import module "${e}" resolves outside the project root as "${t}", so its target cannot be verified. Confirm that the external file exists and that the path is intentional.`,[e.MOCK_TEMPLATE_PARSE_ERROR]:e=>`Mock template parse warning: ${e}. The mock template was skipped. Fix the YAML or remove the file.`,[e.MERGE_CONFLICT]:(e,t,n,a)=>`"model.${e}.${t}" is defined in both "${n}" and "${a}". Each subsection (entityTypes, aliases, shapes, commonTypes) can only appear once per version. Move all "${t}" for "${e}" into one file.`,[e.MISSING_MODEL]:e=>`No "${e}" section found. Every application must define at least "${e}.latest" with entity types and aliases. Add a "${e}:" section to a spec file.`,[e.MISSING_LATEST]:e=>`"${e}.latest" is missing. The "latest" version defines the current working model and is always required. Add "latest:" under "${e}:".`,[e.INVALID_VERSION_KEY]:e=>`"${e}" is not a valid version key. Version keys must be "latest" or "v1", "v2", etc. Rename "${e}".`,[e.MISSING_VERSION]:e=>`Model version "v${e}" is missing. Versions must be contiguous (v1, v2, …, latest) with no gaps. Add "v${e}:" or remove higher versions.`,[e.NAME_CLASH]:(e,t,n)=>`Name "${t}" is used as both a ${e} and a ${n}. Names must be unique across entity types, aliases, and commonTypes within a version. Rename one of them.`,[e.INVALID_ENTITY_TYPE_NAME]:e=>`"${e}" is not a valid entity type name. Entity types must be PascalCase (e.g. "Product", "KitchenRange"). Rename it.`,[e.DUPLICATE_ENTITY_TYPE]:e=>`Entity type "${e}" is declared more than once. Entity types must be unique. Remove the duplicate.`,[e.INVALID_ALIAS_NAME]:e=>`"${e}" is not a valid alias name. Aliases must be PascalCase (e.g. "RootEntity", "EditableItems"). Rename it.`,[e.RESERVED_ALIAS_NAME]:e=>`"${e}" is a reserved alias. "AnyDomainEntity" is auto-generated from all entity types and cannot be user-defined. Choose a different name.`,[e.MISSING_ROOT_ENTITY]:()=>'"RootEntity" alias is not defined. Every model must have a "RootEntity" alias that identifies which entity types can be used as configuration roots. Add "RootEntity: [YourType]" to your aliases.',[e.CIRCULAR_ALIAS]:e=>`Circular alias reference: ${e}. An alias cannot reference itself, directly or through other aliases. Remove one reference in the cycle.`,[e.UNKNOWN_ALIAS_MEMBER]:(e,t)=>`Alias "${e}" references "${t}", which is not a declared entity type or alias. Check the spelling or add "${t}" to entityTypes.`,[e.UNKNOWN_SHAPE_KEY]:e=>`Shape "${e}" does not match any declared entity type or alias. Shapes can only be defined for names that appear in entityTypes or aliases. Check the spelling or add "${e}" to entityTypes.`,[e.UNKNOWN_REFERENCE_TARGET]:(e,t,n)=>`"${e}.${t}" references "${n}", which is not a declared entity type or alias. Check the spelling or add "${n}" to entityTypes.`,[e.RESERVED_PROPERTY]:(e,t)=>`Property "${e}" on "${t}" is reserved. "id" and "type" are injected automatically and cannot appear in shapes. Remove "${e}" from the shape.`,[e.INVALID_SHAPE_PROPERTY_NAME]:e=>`"${e}" is not a valid shape property name. Property names must match /^[a-z]\\w*$/ — start with a lowercase letter, then word characters only (e.g. "height", "positionX", "hoodId"). Rename the property.`,[e.UNKNOWN_PHX_DEFINITION]:(e,t)=>`$ref "${e}" references unknown phoenix type "${t}". Available built-in types include DomainEntityId, Localizable, MultilingualString. Check the spelling.`,[e.UNKNOWN_COMMON_TYPE_REF]:(e,t)=>`$ref "${e}" references unknown commonType "${t}". The target must be declared in commonTypes of the same model version. Check the spelling or add "${t}" to commonTypes.`,[e.INVALID_REF]:e=>`$ref "${e}" is not a recognized reference format. Use "phx:TypeName" for built-in types, "common:TypeName" for commonTypes, or "#/model/{version}/commonTypes/{name}" for explicit version refs.`,[e.MISSING_MIGRATION]:e=>`No migration file for v${e}. Every version from v2 onward needs a migration (src/migrations/v${e}.ts) that transforms state from the previous version. Create the file.`,[e.MIGRATION_INVALID_START]:e=>`Migration "${e}" starts below v2. v1 is the initial version with no predecessor to migrate from. Remove this file.`,[e.UNKNOWN_MIGRATION]:(e,t,n)=>`Migration "${e}" targets v${t}, but the latest model version is v${n}. There is no model version for this migration to apply to. Remove the file or add model version v${t}.`,[e.PROTECTED_SHAPE]:e=>`Shape "${e}" cannot be user-defined. This entity type is part of the built-in admin model and its shape is managed by the system. Remove this shape.`,[e.PROTECTED_ALIAS]:e=>`Alias "${e}" cannot be user-defined in admin files. "RootEntity" and "CommonAdminEntity" are managed by the built-in admin model. Choose a different name.`,[e.RESERVED_ALIAS]:e=>`Alias "${e}" is auto-generated and cannot be user-defined. Remove this alias definition.`,[e.ALIAS_INCLUDES_COMMON]:(e,t)=>`Alias "${e}" includes "${t}", which is a built-in admin entity type. User aliases cannot include built-in admin types. Remove "${t}" from the alias.`,[e.PROTECTED_INVARIANT]:(e,t)=>`Invariant "${e}.${t}" is a built-in common admin invariant and cannot be overridden. Remove this declaration; the built-in implementation is always applied.`,[e.PROTECTED_RELATION]:(e,t)=>`Relation "${e}.${t}" is a built-in common admin relation and cannot be overridden. Remove this declaration; the built-in relation is always applied.`,[e.PROTECTED_EXPRESSION]:(e,t)=>`Expression "${e}.${t}" is reserved for the built-in common admin spec and cannot be user-defined. Rename this expression.`,[e.PROTECTED_COMMON_TYPE]:e=>`Common type "${e}" is part of the built-in admin model and cannot be user-defined. Choose a different name.`,[e.PROTECTED_ENTITY_TYPE]:e=>`Entity type "${e}" is part of the built-in admin model and cannot be re-declared. Remove it from entityTypes.`,[e.PRESET_UNKNOWN_ROOT_ENTITY_TYPE]:(e,t)=>`Preset rootEntityType "${e}" is not allowed. Allowed root types: ${t.join(", ")}. Use one of these or update the RootEntity alias.`,[e.PRESET_UNKNOWN_ENTITY_TYPE]:(e,t,n)=>`Preset entity "${e}" has type "${t}", which is not a declared entity type. Declared types: ${n.join(", ")}. Fix the type or add "${t}" to entityTypes.`,[e.PRESET_INVALID_ENTITY_ID_FORMAT]:e=>`Entity ID "${e}" does not follow the required format. IDs must match "TypeName-N" (e.g. "Product-1", "Hood-42"). Rename it.`,[e.PRESET_MISSING_ROOT_ENTITY]:e=>`Preset declares rootEntityType "${e}" but no entity of that type exists in initialDomainEntities. Add an entity with type "${e}".`,[e.PRESET_MULTIPLE_ROOT_ENTITIES]:(e,t)=>`Preset has ${t} entities of type "${e}", but exactly one root entity is required. Remove the extra "${e}" entities.`,[e.PRESET_ENTITY_SCHEMA_VIOLATION]:(e,t,n,a)=>`Preset entity "${e}" (${t}) has invalid data at ${n}: ${a}. Fix the value to match the entity schema.`,[e.PRESET_DUPLICATE_ENTITY_ID]:e=>`Preset entity ID "${e}" is used more than once. Entity IDs must be unique in a preset. Rename or remove the duplicate entity.`,[e.PRESET_ENTITY_ID_TYPE_MISMATCH]:(e,t,n)=>`Preset entity "${e}" has type "${t}", but its ID starts with "${n}". IDs must use the entity type prefix. Rename the ID to start with "${t}-" or change the entity type.`,[e.PRESET_UNKNOWN_REFERENCE]:(e,t,n)=>`Preset entity "${e}" references "${n}" from "${t}", but no entity with that ID exists in the preset. Add the referenced entity or update the reference.`,[e.PRESET_REFERENCE_TYPE_MISMATCH]:(e,t,n,a,i)=>`Preset entity "${e}" references "${n}" from "${t}", but the referenced entity has type "${a}". Allowed target types: ${i.join(", ")}. Use a matching entity ID.`,[e.PRESET_RELATION_CARDINALITY_VIOLATION]:(e,t,n,a)=>`Preset entity "${e}" violates relation "${t}" cardinality "${n}". The relation resolves ${a} entities. Add or remove referenced entities so the relation matches its cardinality.`,[e.PRESET_COMPOSITION_MULTIPLE_PARENTS]:(e,t,n)=>`Preset entity "${e}" is composed by both "${t}" and "${n}". Composition must form one tree. Remove one parent reference.`,[e.PRESET_COMPOSITION_CYCLE]:e=>`Preset composition contains a cycle at "${e}". Composition must form a tree from the root entity. Remove the cyclic reference.`,[e.PRESET_ENTITY_NOT_IN_COMPOSITION_TREE]:(e,t)=>`Preset entity "${e}" is not reachable from root entity "${t}" through composedOf relations. Add a composition relation path from the root or remove the entity.`,[e.ADMIN_PRESET_MULTIPLE_PER_FILE]:(e,t)=>`Admin file "${e}" has ${t} presets. Only 1 preset per admin file is allowed. Split into separate files or merge into one preset.`,[e.ADMIN_PRESET_ROOT_TYPE_NOT_ADMIN]:(e,t)=>`Admin preset in "${e}" has rootEntityType "${t}". Admin presets must always use rootEntityType "Admin". Change it to "Admin".`,[e.ACTIONS_IN_ADMIN_FILE]:e=>`"${e}" is an admin spec file ("$admin: true") but declares "actions". Actions run in the configurator domain only; the admin domain has none. Move the "actions" block to a configurator spec file, or remove it.`,[e.INVALID_ACTION_NAME]:e=>`"${e}" is not a valid action name. Action names are camelCase identifiers without a prefix (e.g. "movePartBy", "swapCabinets"), since they also name the implementation, the generated types and the assistant mutation. Rename it.`,[e.ACTION_UNKNOWN_REFERENCE_TARGET]:(e,t,n)=>`"${e}.${t}" references "${n}", which is not an entity type or alias of the latest model. A "references" target types the entity id or entity the param or result member holds. Check the spelling or add "${n}" to entityTypes.`,[e.EXPRESSION_UNKNOWN_ENTITY_KEY]:(e,t)=>`Expression key "${e}" is not a declared entity type or alias. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.INVALID_EXPRESSION_NAME]:e=>`"${e}" is not a valid expression name. Expression names must start with "$" followed by camelCase (e.g. "$price", "$isValid"). Rename it.`,[e.DUPLICATE_EXPRESSION]:(e,t,n,a)=>`Expression "${e}.${t}" is produced by both "${n}" and "${a}" after alias expansion. Expression names must be unique for each concrete entity type. Remove one declaration or rename it.`,[e.EXPRESSION_RELATION_CONFLICT]:(e,t)=>`Expression "${e}.${t}" is declared in both "expressions:" and generated by a relation. User expressions cannot shadow relation-derived expressions. Remove the user declaration or rename the relation.`,[e.CONSTANTS_EXPRESSION_CONFLICT]:(e,t)=>`Expression "${e}.${t}" is declared in both "constants:" and "expressions:" in the same file. Use only one source of truth and migrate the legacy constant into "expressions:".`,[e.COMPONENT_RELATION_CONFLICT]:(e,t)=>`Component "${e}::${t}" is declared in both "components:" and generated by a relation. User components cannot shadow relation-derived components. Remove the user declaration or rename the relation.`,[e.COMPONENT_ALIAS_CONFLICT]:(e,t,n,a,i)=>`Component instance "${e}.${t}.${n}" is produced by both "${a}" and "${i}". Component instance names must be unique after alias expansion. Rename one instance or move the shared properties to one declaration.`,[e.COMPONENT_IMPORT_REF_UNSUPPORTED]:(e,t,n,a,i,s)=>`Component prop "${e}.${t}.${n}.${a}" uses unsupported $importRef "${i}#${s}". Application-spec component values are part of the webhook-included domain and cannot reference frontend modules. Fix: remove $importRef from the spec and attach the component from a frontend-only file in src/components.`,[e.COMPONENT_DATA_REF_UNSUPPORTED]:(e,t,n,a,i,s)=>`Component prop "${e}.${t}.${n}.${a}" combines "$read: ${i}" with the legacy "$data: ${s}" marker. Application-spec components resolve "$read" against entity fields and declared expressions only, so the combined marker never becomes a binding. Fix: remove "$data" and implement "${i}" with createDataSwatchMap('${s.split(".").at(-1)??s}') in the project's custom expressions.`,[e.INVALID_INVARIANT_NAME]:e=>`"${e}" is not a valid invariant name. Invariant names must start with a lowercase letter and contain only word characters (e.g. "nameNotEmpty"). Rename it.`,[e.INVALID_VIOLATION_TYPE_NAME]:e=>`"${e}" is not a valid violation type. Violation types must start with a lowercase letter and contain only letters, digits, underscores, or hyphens (e.g. "name-empty"). Rename it.`,[e.INVARIANT_UNKNOWN_ENTITY_KEY]:(e,t)=>`Invariants are declared for "${e}", which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.INVARIANT_MANUAL_VIOLATIONS_COMPONENT]:e=>`Component "violations" on "${e}" cannot be declared manually because invariant parsing generates it automatically. Remove the manual component declaration.`,[e.INVARIANT_VIOLATIONS_EXPRESSION_CONFLICT]:(e,t)=>`Expression "${e}.$violations" is declared in "${t}:" but invariant parsing generates it automatically for the same entity type. Remove the declaration or rename it.`,[e.INVALID_RELATION_NAME]:e=>`"${e}" is not a valid relation name. Relation names must start with "$" followed by camelCase (e.g. "$top", "$legs"). Rename it.`,[e.RELATION_UNKNOWN_ENTITY_KEY]:(e,t)=>`Relations declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.RELATION_UNKNOWN_TARGET]:(e,t,n,a)=>`Relation "${e}.${t}" targets "${n}" which is not an entity type or alias in the model. Known names: ${a.join(", ")}. Check the spelling or add "${n}" to entityTypes.`,[e.RELATION_UNKNOWN_FIELD_DIRECT]:(e,t,n)=>`Relation "${e}.${t}" references field "${n}" which does not exist in the shape of "${e}". Add "${n}" to the "${e}" schema or pick a different field.`,[e.RELATION_UNKNOWN_FIELD_INDIRECT]:(e,t,n,a)=>`Relation "${e}.${t}" references field "${n}" which does not exist in the shape of target "${a}". Add "${n}" to the "${a}" schema or pick a different field.`,[e.RELATION_IMMUTABLE_FIELD]:(e,t,n,a)=>`Relation "${e}.${t}" uses implicit field "${n}" on "${a}" as a relation reference holder. Implicit fields "id" and "type" are immutable and cannot hold relation references. Choose a writable shape field on "${a}".`,[e.RELATION_MISSING_COUNTERPART]:(e,t,n,a,i,s)=>{let o=void 0!==i?` with field "${i}"`:"",r=s?`Set "composedOf: false" on the counterpart because "${e}.${t}" already owns the composition.`:'Set "composedOf: false" on the counterpart for a cross-reference, or "composedOf: true" if the counterpart should own the composition.';return`Relation "${e}.${t}" (${n} → "${a}"${void 0!==i?`, field "${i}"`:""}) has no counterpart on "${a}". Every relation must be declared from both sides — add a "${"allOfType"===n?"allOfType":"direct"===n?"indirect":"direct"}" relation on "${a}" targeting "${e}"${o}. ${r}`},[e.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH]:(e,t,n,a)=>`Relation "${e}.${t}" and its counterpart "${n}.${a}" both use "composedOf: true". A relation pair can have at most one composition owner — set "composedOf: false" on one side.`,[e.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE]:(e,t)=>`Entity "${e}" is not reachable from any root entity type (${t.join(", ")}) via "composedOf: true" relations. Every declared entity must be part of the composition tree, otherwise instances of it can never appear in a valid domain state. Add a relation with "composedOf: true" from a reachable parent, or include "${e}" in the RootEntity alias.`,[e.DUPLICATE_DATA_SCHEMA]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each data schema can only be declared in one file. Remove the duplicate.`,[e.ADMIN_DATA_SCHEMA]:(e,t)=>`"${e}" is declared in admin spec "${t}". Data schemas are configurator-only. Move "${e}" to a non-admin spec file.`,[e.SESSION_DATA_REQUIRED_PROPERTIES]:(e,t)=>`sessionData in "${t}" declares required properties (${e.map(e=>`"${e}"`).join(", ")}), but admin and preset sessions do not carry custom session data. Remove these properties from required or set required to an empty array.`,[e.CLERK_SESSION_DATA_INCOMPATIBLE]:e=>`sessionData is not compatible with the built-in Clerk session payload: ${e.join("; ")}. When "useClerk" is true, the SDK's Clerk auth handlers return { id: string, accessToken: string, tags: string[], emailAddress: string, fullName: string | null }, and runtime session parsing rejects any payload the schema does not accept. Declare all five properties with these exact types (the "type" keyword is compared literally, so $ref, anyOf, and oneOf forms are not recognized) and keep them out of "required" so anonymous sessions stay valid. Extra project-defined properties are allowed.`,[e.RESERVED_PUBLISHED_DATA_KEY]:e=>`publishedData property "${e}" is reserved by the admin system. Properties like "presetCategories" and "recipes" are auto-injected. Remove "${e}" from your publishedData properties.`,[e.DUPLICATE_STATE_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each state field can only be declared in one file. Remove the duplicate.`,[e.INVALID_STATE_KEY]:(e,t)=>`State key "${t}" in "${e}" is not a valid identifier. State keys must start with a letter and contain only letters, digits, or underscores (e.g. "overview", "detailView"). Rename it.`,[e.DUPLICATE_STATE_VALUE]:(e,t)=>`State value "${t}" appears more than once in "${e}". Each value within a state array must be unique. Remove the duplicate.`,[e.DUPLICATE_THEME_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each theme field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_UI_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each UI field can only be declared in one file. Remove the duplicate.`,[e.CONFLICTING_TRANSFORMERS]:(e,t)=>`Transformers are declared in both "${e}" and "${t}". The "transformers" section can only appear in one spec file. Move all transformers into a single file.`,[e.DUPLICATE_TRANSFORMER]:(e,t)=>`Transformer "${e}" is declared twice in "${t}". Transformer names must be unique within the file. Remove the duplicate entry.`,[e.DUPLICATE_TRANSFORMER_FILE]:(e,t)=>`Transformer files "${e}" and "${t}" resolve to the same transformer name. Transformers are matched by file name, ignoring folders, letter case, and dashes. Rename one of the files so every transformer file name is unique.`,[e.UNMATCHED_TRANSFORMER]:(e,t)=>`Transformer "${e}" has no matching file in "src/transformers/". Every name listed under "transformers:" must correspond to a transformer module. ${t.length>0?`Available transformers: ${t.map(e=>`"${e}"`).join(", ")}. Check the spelling or add "src/transformers/${e}.ts".`:`No transformer files were found in "src/transformers/". Add "src/transformers/${e}.ts" or remove the entry.`}`,[e.DUPLICATE_APP_METADATA_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each metadata field can only be declared in one file. Remove the duplicate.`,[e.DUPLICATE_INFRA_FIELD]:(e,t,n)=>`"${e}" is defined in both "${t}" and "${n}". Each infrastructure field can only be declared in one file. Remove the duplicate.`,[e.INVALID_APPLICATION_VERSION]:e=>`"${e}" is not a valid applicationVersion. Version must be semver (x.y.z) using three numeric segments (e.g. "1.0.0", "2.3.12"). Update "applicationVersion" to match.`,[e.INVALID_ENV_VAR_KEY]:(e,t)=>`"${t}" is not a valid env.${e} variable name. Env var names must match /^[A-Z_][A-Z0-9_]*$/ — uppercase letters, digits, and underscores; must not start with a digit (e.g. "API_URL", "_PRIVATE_FLAG"). Rename the variable.`,[e.DUPLICATE_ADMIN_PAGES]:(e,t)=>`"$adminPages" is defined in both "${e}" and "${t}". Admin pages can only be declared in one admin spec file. Move all "$adminPages" settings into one admin file.`,[e.ADMIN_PAGES_NAV_STATE_CONFLICT]:e=>`Admin navigation states [${e.join(", ")}] are declared manually and generated from "$adminPages". Remove the manual entries from "navigationStates" in the admin spec or change the "$adminPages" navigationState values.`,[e.ADMIN_PAGE_DATA_ENTRY_CONFLICT]:(e,t)=>`"$adminPages.pages.${e}.connectedDataEntry" references data entry "${t}". This data entry already creates an inferred admin data page. Remove the explicit admin page connection or change the data entry kind.`,[e.CONFLICTING_BUDGETS]:(e,t)=>`"budgets" is declared in both "${e}" and "${t}". The "budgets" section can only appear in one spec file. Move all bundle-size budgets into a single file.`,[e.CONFLICTING_CHUNKS]:(e,t)=>`"chunks" is declared in both "${e}" and "${t}". The "chunks" section can only appear in one spec file. Move all chunk definitions into a single file.`,[e.CONFLICTING_ASSISTANT]:(e,t)=>`"assistant" is declared in both "${e}" and "${t}". The "assistant" manifest can only appear in one spec file. Move the whole "assistant" section into a single file.`,[e.ASSISTANT_UNKNOWN_TYPE]:(e,t)=>`"assistant.${e}.${t}" does not name an entity type or alias of the latest model, so it has nothing to ${({entities:"expose",deletable:"make deletable",writable:"make writable",childRecipes:"add children to",replaceRecipes:"replace"})[e]}. Use an entity type or alias name from "model.latest", or remove the entry.`,[e.ASSISTANT_UNKNOWN_FIELD]:(e,t,n)=>n.startsWith("$")?`"assistant.entities.${t}.${n}" is not an expression declared on "${t}". The assistant schema exposes expressions declared in "expressions", "constants" or "relations" on the entity type or alias itself, and on an entity type also those of its aliases; an expression only inferred from a component "$read" is not declared. Declare "${n}" in "expressions", "constants" or "relations" on "${t}" (for an entity type, an alias containing it also works), or remove the entry.`:`"assistant.${e}.${t}.${n}" is not a stored field of "${t}". The assistant schema ${"entities"===e?"exposes":"writes"} shape properties of the entity type or alias, including fields every alias member has. Use a property from the "${t}" shape, or remove the entry.`,[e.ASSISTANT_UNSUPPORTED_EXPRESSION]:(e,t)=>`"assistant.entities.${e}.${t}" whitelists the "$violations" expression, which the assistant schema does not expose yet: violations get their own typed edge in CON-2869. Remove the entry.`,[e.ASSISTANT_NOT_WRITABLE]:(e,t)=>`"assistant.writable.${e}.${t}" cannot be written: ${t.startsWith("$")?"an expression is computed from the state, not stored":`"${t}" identifies the entity and never changes`}. Only stored shape properties other than "id" and "type" can be writable. Remove the entry${t.startsWith("$")?", or make the stored fields the expression reads writable instead":""}.`,[e.ASSISTANT_UNKNOWN_RECIPE_GROUP]:({section:e,component:t},n,a,i,s)=>`"assistant.${e}.${n}.groups.${a}" does not name a "${t}" component instance on "${i}", so there are no recipes to expose. ${s.length>0?`"${i}" has these "${t}" instances: ${s.join(", ")}.`:`"${i}" has no "${t}" component.`} Use the instance name of a "${t}" component attached to the entity type or to an alias containing it, or remove the entry.`,[e.ASSISTANT_DUPLICATE_RECIPE_GROUP]:({section:e,mutation:t},n,a,i)=>`"${n}" gets the recipe group id "${a}" from both "assistant.${e}.${i.join(`" and "assistant.${e}.`)}", but "${t}" finds a group of an entity by its id. The entries may come from "${n}" itself or from aliases containing it. Give one of them another id with "as".`,[e.ASSISTANT_META_TYPE_NAME_CONFLICT]:(e,t)=>`This entry exposes a recipe group or the options of a field on "${e}", so the assistant schema generates the type "${t}" for them, but the model already has an entity type or alias named "${t}". Rename that entity type or alias, or remove every "assistant.childRecipes" and "assistant.replaceRecipes" group and every "options" of a writable field of "${e}".`,[e.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT]:(e,{componentType:t,instanceName:n},a,i)=>`"assistant.writable.${e}.options" names the "${t}" instance "${n}", which "${a}" does not have, so there are no choices to list. ${i.length>0?`"${a}" has these "${t}" instances: ${i.join(", ")}.`:`"${a}" has no "${t}" component.`} Use the name of a "${t}" instance attached to the entity type or to an alias containing it, correct "componentType", or remove "options".`,[e.ASSISTANT_RESERVED_OPTIONS_EDGE_NAME]:(e,t,n)=>`"assistant.writable.${e}.options" would add the edge "${t}" to the meta type, but that name is taken by a recipe groups edge. Name the edge differently with "as", e.g. "as: ${n}Choices".`,[e.ASSISTANT_DUPLICATE_OPTIONS_EDGE]:(e,t,n)=>`"${e}" gets ${"edgeName"in t?`the options edge "${t.edgeName}"`:`options for the field "${t.field}"`} from both "assistant.writable.${n.join('.options" and "assistant.writable.')}.options", but ${"edgeName"in t?"one edge lists the choices of one field":"a written value is checked against one list of choices"}. The entries may come from "${e}" itself or from aliases containing it. ${"edgeName"in t?'Give one of them another name with "as", or remove':"Remove"} "options" from one of them.`,[e.ASSISTANT_UNKNOWN_ACTION]:(e,t)=>`"assistant.actions.${e}" does not name an action declared under "actions"${t.length>0?`; the declared actions are: ${t.join(", ")}`:"; the spec declares no actions"}. Declare the action in an "actions" block of a spec file and implement it in src/actions/, or remove the entry.`,[e.ASSISTANT_MUTATION_NAME_CONFLICT]:(e,t,n)=>`"assistant.actions.${e}" exposes the mutation "${t}", which ${n}. One Mutation field runs one change. Expose the action under another name with "as", e.g. "as: ${t}Action".`,[e.ASSISTANT_ACTION_RESULT_TYPE_CONFLICT]:(e,t,n)=>`"assistant.actions.${e}" exposes the mutation "${t}", so the assistant schema generates the type "${n}" for its result, but that name is taken by an entity type, alias, generated meta type, built-in type or another action's result. Expose the action under another name with "as", or rename the conflicting type.`,[e.ASSISTANT_RESERVED_FIELD_NAME]:(e,t,n)=>`"assistant.entities.${e}.${t}" is exposed as "${n}", which the assistant schema reserves ("id", "type" and "meta" are reserved on every type). Expose it under another name with "as", e.g. "as: ${t}Value".`,[e.ASSISTANT_FIELD_NAME_CONFLICT]:(e,t,n,a)=>void 0===a?`"${t}" on "${e}" in the assistant schema maps to both "${n.join('" and "')}", but one GraphQL field can read only one stored field or expression. The entries may come from "${e}" itself or from aliases containing it. Rename one of them with "as".`:`"assistant.writable.${a}" makes "${t}" writable on "${e}" without exposing it, so its delta field would be named "${t}", but "assistant.entities" already exposes "${n[0]}" on "${e}" under that name. One name cannot read one stored field or expression and write another. Expose "${t}" in "assistant.entities" under another name with "as", or rename the entry that exposes "${n[0]}".`,[e.ASSISTANT_RESERVED_TYPE_NAME]:(e,t)=>`"${e}" is an entity type or alias name that the assistant GraphQL schema reserves for its own types (${t.join(", ")}), so the schema cannot be generated. Rename the entity type or alias, or remove the "assistant" section.`,[e.ASSISTANT_INVALID_SCHEMA]:e=>`The GraphQL schema generated from the "assistant" manifest is invalid: ${e.join(" ")} This usually means aliases sharing an entity whitelist the same field with different types. Whitelist the field on one alias only, or rename one entry with "as".`,[e.INVALID_CHUNK_KEY]:e=>`"${e}" is not a valid chunk key. Chunk keys must be lowercase kebab-case matching /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/ (e.g. "main", "swatch-data"). Rename the chunk.`,[e.RESERVED_CHUNK_KEY]:()=>'"system" is a reserved chunk key used for presets and recipes. It cannot be user-defined and is auto-injected after validation. Please use a different key name.',[e.CONFLICTING_DATA_ENTRY]:(e,t,n,a)=>`"$data.${e}.${t}" is defined in both "${n}" and "${a}". Each data entry key can only be declared once per section. Move the entry into one file, delete the duplicate, or rename one entry.`,[e.INVALID_DATA_ENTRY_KEY]:(e,t)=>`"$data.${e}.${t}" is not a valid data entry key. Data entry keys must start with a letter, followed by letters, digits, or underscores (/^[A-Za-z]\\w*$/, e.g. "colorOptions" or "ColorOptions"). Rename the entry.`,[e.INVALID_DATA_DEFINITION_FIELD_KEY]:(e,t)=>`"$data.custom.${e}.definition.${t}" is not a valid field key. Definition field keys must match /^\\$?[a-z][\\w.-]*$/ — start with lowercase or "$", then letters, digits, "_", ".", or "-". Rename the field.`,[e.UNKNOWN_DATA_CHUNK]:(e,t,n)=>`"$data.${e}.${t}" references unknown chunk "${n}". The chunk reference must match a key declared under "chunks:". Add the chunk or update the entry chunk.`,[e.INVALID_DATA_VALUE]:(e,t,n,a)=>`"$data.custom.${e}.values[${t}].${n}" has an invalid value. Expected ${a}. Fix the value or update the field definition.`,[e.DEFAULTS_UNKNOWN_ENTITY_KEY]:(e,t)=>`Defaults declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.DEFAULTS_UNKNOWN_PROPERTY]:(e,t,n,a)=>{let i=n.length>0?n.join(", "):"(none)",s=a&&a.length>0?` Alias member(s) missing "${t}": ${a.join(", ")}.`:"";return`Default "${e}.${t}" refers to a property that does not exist on the shape of "${e}". Known properties: ${i}.${s} Remove the default or add "${t}" to the shape.`},[e.DEFAULTS_SCHEMA_VIOLATION]:(e,t,n,a,i)=>{let s=i?` (alias member "${i}")`:"",o=n&&"(root)"!==n?` at "${n}"`:"";return`Default "${e}.${t}"${s} does not match the entity shape${o}: ${a}. Defaults must be assignable to their shape property. Fix the value or update the shape.`},[e.DEFAULTS_DEPRECATED]:()=>'The "defaults:" section is deprecated. Defaults remain supported for legacy parity, but new specs should model initial values as "$data" entries — see spec/application-specification/parsing/data-chunks.md. Defaults are planned for removal once the $data migration path is documented.',[e.COMPONENT_INVALID_INSTANCE_NAME]:(e,t,n)=>`Component instance name "${n}" in "${e}.${t}" is not a valid identifier. Instance names must start with a letter and contain only letters, digits, or underscores (e.g. "default", "body", "main"). Rename it.`,[e.COMPONENT_MERGE_CONFLICT]:(e,t,n,a,i)=>`Component instance "${e}.${t}.${n}" is defined in both "${a}" and "${i}". Each component instance can only appear in one file. Remove the duplicate.`,[e.COMPONENT_UNKNOWN_ENTITY_KEY]:(e,t)=>`Components declared for "${e}" which is not an entity type or alias in the model. Known names: ${t.join(", ")}. Check the spelling or add "${e}" to entityTypes.`,[e.READ_BINDING_UNKNOWN_FIELD]:(e,t,n,a,i)=>`$read binding "${a}" in "${e}.${t}.${n}" references field "${i}" which does not exist in the shape of "${e}". Add "${i}" to the shape or fix the $read target.`,[e.WRITE_BINDING_UNKNOWN_FIELD]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets field "${i}" which does not exist in the shape of "${e}". Add "${i}" to the shape or fix the target.`,[e.WRITE_BINDING_IMMUTABLE_FIELD]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets implicit field "${i}". Implicit fields "id" and "type" are immutable and cannot be changed. Use $read to consume the field or choose a writable shape field.`,[e.WRITE_BINDING_EXPRESSION_TARGET]:(e,t,n,a,i)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets "${i}" which is an expression. Write targets must be entity shape fields, not expressions. Use $read for expression bindings, $write/$bind for shape fields.`,[e.WRITE_BINDING_DUPLICATE_TARGET]:(e,t,n,a,i,s)=>`Entity field "${a}" is written by both "${i}" and "${s}" in "${e}.${t}.${n}". Each entity field can only be written by one component property. Remove one of the bindings.`,[e.UNKNOWN_SRC_PATH]:e=>`File "${e}" is in an unknown src/ folder. Only known folders (expressions, actions, invariants, components, transformers, handlers, elements, webhooks, locales, admin/*, migrations) or _-prefixed shared folders are allowed. Move the file or rename the folder with a "_" prefix.`,[e.INVALID_SUBDIRECTORY]:(e,t)=>`File "${e}" is nested inside "${t}", but migrations must be flat. Move the migration file directly into "${t}" or prefix the folder with "_".`,[e.MISSING_WEBHOOK_INDEX]:()=>"Files found in src/webhooks/ but src/webhooks/index.ts is missing. The webhook entry point requires a default export from src/webhooks/index.ts. Create the file with a default export of your webhook handler.",[e.MODULE_ANALYSIS_FAILED]:(e,t)=>`Cannot analyze module "${e}": ${t}. Fix the file's syntax so its imports and webhook membership can be determined.`,[e.WEBHOOK_UNSAFE_IMPORT]:(e,t,n,a)=>`Webhook-included file "${e}" is not server-safe: it is included because ${t}, but "${n}" imports client-only "${a}". Fix: remove or isolate the client-only import, or remove the file's webhook membership.`,[e.ENHANCED_JSON_VALUE_EVAL_NOT_ALLOWED]:()=>'"$eval" is not allowed in this position. "$eval" requires "self", which is only available inside expressions and component props — it is not available in static slots such as defaults. Replace the "$eval" with a literal value, "$msg", or move the dynamic logic into an "expressions:" entry.',[e.ENHANCED_JSON_VALUE_MSG_NOT_ALLOWED]:()=>'"$msg" is not allowed in this position. This slot does not accept localized messages (e.g. component props, which are resolved without an i18n context). Replace "$msg" with a plain string, or move the message into a slot that supports i18n such as defaults or expressions.',[e.ENHANCED_JSON_VALUE_EVAL_NOT_STATICALLY_INFERABLE]:e=>`Could not infer a schema from "$eval: ${e}" because the expression is not statically foldable. Add explicit schema keys to the expression entry, or use only literals, constant operators, and deterministic Math members.`,[e.ENHANCED_JSON_VALUE_CODE_REF_NOT_SUPPORTED]:()=>'"$codeRef" with an inline "code" block is no longer supported by the application spec parser. It was never evaluated — the value was carried through as plain data. Use "$eval" instead, for example "$eval: \'4 * 25.4\'". "$eval" folds literals, constant operators, and deterministic Math members at parse time; anything else needs explicit schema keys.'};
@@ -1 +1 @@
1
- import{GeneratedApplicationFile as n}from"../../core/index.js";import{createApplicationTypeImportRegistrar as e}from"./common/index.js";import{generateAdminGlobalBindingBlock as i,generateApplicationSpecAdminCode as o,generateApplicationSpecAdminFrontendCode as t,generateApplicationSpecAdminGlobals as r,generateApplicationSpecConfiguratorCode as a,generateApplicationSpecConfiguratorConfig as s,generateApplicationSpecConfiguratorFrontendCode as d,generateApplicationSpecConfiguratorGlobals as c,generateApplicationSpecDomainFile as g,generateApplicationSpecDomainSpecFile as m,generateApplicationSpecGlobals as p,generateApplicationSpecTypesModule as l,generateConfiguratorGlobalBindingBlock as f,generateImportedStateConstants as B,generatePhxExportsBlock as u,generatePhxGlobalsBlock as x,generateStateConstants as h}from"./templates/index.js";import{splitWebhookMembership as k}from"./webhook-safe-files.js";let y=()=>"";export const globalPhxBindingStrategy={generateApplicationTypesFile:(e,i)=>n("globals.d.ts",p(e,i)),generateDomainBindingBlock:x,generateStateConstants:h,generateConfiguratorBindingBlock:f,configuratorBindingDescription:"Creates the configurator interface and sets phx.frontend — must run before any user code imports.",generateAdminBindingBlock:i,adminBindingDescription:"Creates the admin interface and sets phx.frontend.admin — must run before admin user code imports."};export const modulePhxBindingStrategy={applicationTypeImportSource:"./application-types.js",generateApplicationTypesFile:(e,i)=>n("application-types.ts",l(e,i)),generateDomainBindingBlock:u,generateStateConstants:B,generateConfiguratorBindingBlock:y,configuratorBindingDescription:"Creates and exports the configurator interface for a module-scoped phx binding.",generateAdminBindingBlock:y,adminBindingDescription:"Creates and exports the admin interface for a module-scoped phx binding."};let C=n=>n.map(n=>n.file.name);export const generateDomainRuntimeFiles=(i,p)=>{let{applicationSpec:l,categorizedFiles:f,phxDefinitions:B,includeDefaultEnvs:u}=i,x=e(p.applicationTypeImportSource),h=C(f.expressions),y=C(f.handlers),b=C(f.elements),D=C(f.transformers),S=C(f.invariants),A=C(f.adminInvariants),F=C(f.adminExpressions),j=C(f.adminElements),I=k(f.components),T=C(I.webhookIncluded),w=C(I.frontendOnly),v=k(f.adminComponents),E=C(v.webhookIncluded),O=C(v.frontendOnly);return[n("domain-spec.ts",m(l,{generateBindingBlock:p.generateDomainBindingBlock,generateStateConstants:p.generateStateConstants,registerApplicationTypeImports:x})),n("configurator-globals.ts",c(p.generateConfiguratorBindingBlock,p.configuratorBindingDescription)),n("configurator-domain-code.ts",a({expressionFiles:h,invariantFiles:S,componentFiles:T},x)),n("configurator-frontend-code.ts",d({transformerFiles:D,handlerFiles:y,elementFiles:b,componentFiles:w},x)),n("admin-domain-code.ts",o({adminExpressionFiles:F,adminInvariantFiles:A,adminComponentFiles:E},x)),n("admin-frontend-code.ts",t({adminElementFiles:j,adminComponentFiles:O},x)),n("domain.ts",g(l)),n("configurator-config.ts",s(l,{includeDefaultEnvs:u})),p.generateApplicationTypesFile(l,B),n("admin-globals.ts",r(p.generateAdminBindingBlock,p.adminBindingDescription))]};
1
+ import{GeneratedApplicationFile as n}from"../../core/index.js";import{createApplicationTypeImportRegistrar as e}from"./common/index.js";import{generateAdminGlobalBindingBlock as i,generateApplicationSpecAdminCode as o,generateApplicationSpecAdminFrontendCode as t,generateApplicationSpecAdminGlobals as a,generateApplicationSpecConfiguratorCode as r,generateApplicationSpecConfiguratorConfig as s,generateApplicationSpecConfiguratorFrontendCode as d,generateApplicationSpecConfiguratorGlobals as c,generateApplicationSpecDomainFile as g,generateApplicationSpecDomainSpecFile as m,generateApplicationSpecGlobals as p,generateApplicationSpecTypesModule as l,generateConfiguratorGlobalBindingBlock as f,generateImportedStateConstants as B,generatePhxExportsBlock as u,generatePhxGlobalsBlock as x,generateStateConstants as h}from"./templates/index.js";import{splitWebhookMembership as k}from"./webhook-safe-files.js";let y=()=>"";export const globalPhxBindingStrategy={generateApplicationTypesFile:(e,i)=>n("globals.d.ts",p(e,i)),generateDomainBindingBlock:x,generateStateConstants:h,generateConfiguratorBindingBlock:f,configuratorBindingDescription:"Creates the configurator interface and sets phx.frontend — must run before any user code imports.",generateAdminBindingBlock:i,adminBindingDescription:"Creates the admin interface and sets phx.frontend.admin — must run before admin user code imports."};export const modulePhxBindingStrategy={applicationTypeImportSource:"./application-types.js",generateApplicationTypesFile:(e,i)=>n("application-types.ts",l(e,i)),generateDomainBindingBlock:u,generateStateConstants:B,generateConfiguratorBindingBlock:y,configuratorBindingDescription:"Creates and exports the configurator interface for a module-scoped phx binding.",generateAdminBindingBlock:y,adminBindingDescription:"Creates and exports the admin interface for a module-scoped phx binding."};let C=n=>n.map(n=>n.file.name);export const generateDomainRuntimeFiles=(i,p)=>{let{applicationSpec:l,categorizedFiles:f,phxDefinitions:B,includeDefaultEnvs:u}=i,x=e(p.applicationTypeImportSource),h=C(f.expressions),y=C(f.actions),b=C(f.handlers),D=C(f.elements),S=C(f.transformers),A=C(f.invariants),F=C(f.adminInvariants),j=C(f.adminExpressions),I=C(f.adminElements),T=k(f.components),w=C(T.webhookIncluded),v=C(T.frontendOnly),E=k(f.adminComponents),O=C(E.webhookIncluded),P=C(E.frontendOnly);return[n("domain-spec.ts",m(l,{generateBindingBlock:p.generateDomainBindingBlock,generateStateConstants:p.generateStateConstants,registerApplicationTypeImports:x})),n("configurator-globals.ts",c(p.generateConfiguratorBindingBlock,p.configuratorBindingDescription)),n("configurator-domain-code.ts",r({expressionFiles:h,actionFiles:y,invariantFiles:A,componentFiles:w},x)),n("configurator-frontend-code.ts",d({transformerFiles:S,handlerFiles:b,elementFiles:D,componentFiles:v},x)),n("admin-domain-code.ts",o({adminExpressionFiles:j,adminInvariantFiles:F,adminComponentFiles:O},x)),n("admin-frontend-code.ts",t({adminElementFiles:I,adminComponentFiles:P},x)),n("domain.ts",g(l)),n("configurator-config.ts",s(l,{includeDefaultEnvs:u})),p.generateApplicationTypesFile(l,B),n("admin-globals.ts",a(p.generateAdminBindingBlock,p.adminBindingDescription))]};
@@ -1,6 +1,6 @@
1
- import{GeneratedApplicationFile as e}from"../../core/index.js";import{followsCanaryBuilds as t,generateAgentsMd as n,generateApplicationSpecEnvCi as r,generateApplicationSpecEnvExample as o,generateApplicationSpecEslintConfig as i,generateApplicationSpecFavicon as a,generateApplicationSpecGitignore as s,generateApplicationSpecNvmrc as c,generateApplicationSpecPackageJson as l,generateApplicationSpecPrettierConfig as p,generateApplicationSpecPrettierIgnore as m,generateApplicationSpecPrivateAssetsReadme as f,generateApplicationSpecPublicAssetsReadme as d,generateApplicationSpecReadme as g,generateApplicationSpecRobotsTxt as u,generateApplicationSpecTsconfig as x,generateApplicationSpecWebhookImplementation as h,generateLinguiRcFile as v,generatePhoenixCliSkill as j,generatePhoenixCreateConfiguratorSkill as k,generatePhoenixCreateConfiguratorSkillReferences as b,generatePhoenixFeedbackSkill as E,generatePhoenixReviewSkill as F,generatePhoenixSkill as M,stripSdkMarkerContent as P}from"./templates/index.js";export const agentSkillRoots=[".claude/skills",".agents/skills"];let w=[{path:"CLAUDE.md",generatedPrefix:""},{path:".cursor/rules/phoenix.mdc",generatedPrefix:`---
1
+ import{GeneratedApplicationFile as e}from"../../core/index.js";import{followsCanaryBuilds as t,generateAgentsMd as n,generateApplicationSpecEnvCi as r,generateApplicationSpecEnvExample as o,generateApplicationSpecEslintConfig as i,generateApplicationSpecFavicon as a,generateApplicationSpecGitignore as s,generateApplicationSpecNvmrc as c,generateApplicationSpecPackageJson as l,generateApplicationSpecPrettierConfig as p,generateApplicationSpecPrettierIgnore as m,generateApplicationSpecPrivateAssetsReadme as f,generateApplicationSpecPublicAssetsReadme as d,generateApplicationSpecReadme as g,generateApplicationSpecRobotsTxt as u,generateApplicationSpecTsconfig as x,generateApplicationSpecWebhookImplementation as h,generateLinguiRcFile as v,generatePhoenixCliSkill as j,generatePhoenixCreateConfiguratorSkill as k,generatePhoenixCreateConfiguratorSkillReferences as b,generatePhoenixFeedbackSkill as E,generatePhoenixReviewSkill as F,generatePhoenixSkill as M,generatePhoenixVariantsSkill as P,stripSdkMarkerContent as w}from"./templates/index.js";export const agentSkillRoots=[".claude/skills",".agents/skills"];let A=[{path:"CLAUDE.md",generatedPrefix:""},{path:".cursor/rules/phoenix.mdc",generatedPrefix:`---
2
2
  description: Phoenix SDK project rules
3
3
  globs:
4
4
  alwaysApply: true
5
5
  ---
6
- `}],A=[".claude/commands/review.md",".cursor/commands/review.md"],S=(e,t)=>e.projectFiles.find(e=>e.file.name===t)?.file.content;export const generateProjectScaffolding=C=>{let D,{applicationSpec:L,categorizedFiles:R,sdkVersion:$,cliUseWorkspace:y,name:K,description:G}=C,I=S(R,"package.json"),N=S(R,".gitignore"),T=void 0!==y?y:L.appMetadata.workspace,U=(t=>{let n=[],r=[...A];for(let{path:o,generatedPrefix:i}of w){let a=S(t,o);if(void 0===a)continue;let s=P(a,i);void 0===s?r.push(o):s!==a&&n.push(e(o,s,{format:!1}))}return{strippedFiles:n,removedFiles:r}})(R);return{generatedProjectFiles:[e("package.json",l({sdkVersion:$,useWorkspace:T,useClerk:L.appMetadata.useClerk??!1,name:K,description:G,existingContent:I})),e(".nvmrc",c(),{format:!1}),e(".linguirc",v(L.configurator.ui.availableLocales),{format:!1}),e("tsconfig.json",x()),e("eslint.config.js",i()),e(".gitignore",s(N)),...(D=[{name:"phoenix",content:M({checkLatestCanary:t({useWorkspace:T,sdkVersion:$})}),references:[]},{name:"phoenix-cli",content:j(),references:[]},{name:"phoenix-create-configurator",content:k(),references:b()},{name:"phoenix-feedback",content:E(),references:[]},{name:"phoenix-review",content:F(),references:[]}],agentSkillRoots.flatMap(t=>D.flatMap(n=>[e(`${t}/${n.name}/SKILL.md`,n.content),...n.references.map(r=>e(`${t}/${n.name}/${r.path}`,r.content))]))),...U.strippedFiles],initialProjectFiles:[e("README.md",g(K)),e("AGENTS.md",n()),e(".env.ci",r()),e(".env.example",o()),e("public/favicon.ico",a(),{binary:!0}),e("public/robots.txt",u(),{format:!1}),e("assets/public/README.md",d()),e("assets/private/README.md",f()),e("src/webhooks/index.ts",h())],prettierFiles:[e("prettier.config.js",p()),e(".prettierignore",m(),{format:!1})],removedProjectFiles:U.removedFiles}};
6
+ `}],S=[".claude/commands/review.md",".cursor/commands/review.md"],C=(e,t)=>e.projectFiles.find(e=>e.file.name===t)?.file.content;export const generateProjectScaffolding=D=>{let L,{applicationSpec:R,categorizedFiles:$,sdkVersion:y,cliUseWorkspace:K,name:G,description:I}=D,N=C($,"package.json"),T=C($,".gitignore"),U=void 0!==K?K:R.appMetadata.workspace,q=(t=>{let n=[],r=[...S];for(let{path:o,generatedPrefix:i}of A){let a=C(t,o);if(void 0===a)continue;let s=w(a,i);void 0===s?r.push(o):s!==a&&n.push(e(o,s,{format:!1}))}return{strippedFiles:n,removedFiles:r}})($);return{generatedProjectFiles:[e("package.json",l({sdkVersion:y,useWorkspace:U,useClerk:R.appMetadata.useClerk??!1,name:G,description:I,existingContent:N})),e(".nvmrc",c(),{format:!1}),e(".linguirc",v(R.configurator.ui.availableLocales),{format:!1}),e("tsconfig.json",x()),e("eslint.config.js",i()),e(".gitignore",s(T)),...(L=[{name:"phoenix",content:M({checkLatestCanary:t({useWorkspace:U,sdkVersion:y})}),references:[]},{name:"phoenix-cli",content:j(),references:[]},{name:"phoenix-create-configurator",content:k(),references:b()},{name:"phoenix-feedback",content:E(),references:[]},{name:"phoenix-review",content:F(),references:[]},{name:"phoenix-variants",content:P(),references:[]}],agentSkillRoots.flatMap(t=>L.flatMap(n=>[e(`${t}/${n.name}/SKILL.md`,n.content),...n.references.map(r=>e(`${t}/${n.name}/${r.path}`,r.content))]))),...q.strippedFiles],initialProjectFiles:[e("README.md",g(G)),e("AGENTS.md",n()),e(".env.ci",r()),e(".env.example",o()),e("public/favicon.ico",a(),{binary:!0}),e("public/robots.txt",u(),{format:!1}),e("assets/public/README.md",d()),e("assets/private/README.md",f()),e("src/webhooks/index.ts",h())],prettierFiles:[e("prettier.config.js",p()),e(".prettierignore",m(),{format:!1})],removedProjectFiles:q.removedFiles}};
@@ -1,9 +1,9 @@
1
- import{CodeImports as e}from"../common/code-imports.js";import{autoHeader as o}from"../common/file-headers.js";import{generateStateTypeDecls as t}from"./domain-spec/index.js";import{generateDataSchemaTypeDecls as n,generateEntityExpressionComposites as i,generateExpressionTypeDecls as a,generateModelTypeDecls as s}from"./global-definition/index.js";export const generateApplicationSpecTypeDeclarations=(o,r,p)=>{let l=new e,d=p+2,m=" ".repeat(p),c=s(o.configurator.latestModel,r,l,p),f=[];for(let e of o.configurator.resolvedVersions.versionedModels){let o=`ModelV${e.version}`,t=s(e.modelVersion,r,l,d);f.push(`${m}namespace ${o} {
2
- ${t}${m}}`)}let $=s(o.admin.latestModel,r,l,d),g=`${m}namespace Admin {
3
- ${$}${m}}`,u=[];for(let e of o.admin.resolvedVersions.versionedModels){let o=`AdminV${e.version}`,t=s(e.modelVersion,r,l,d);u.push(`${m}namespace ${o} {
4
- ${t}${m}}`)}let y=a(o.configurator.expressions,r,l,p),x=i(o.configurator.latestModel,o.configurator.expressions,l,p,""),M=[a(o.admin.expressions,r,l,d),i(o.admin.latestModel,o.admin.expressions,l,d,"Admin")].filter(Boolean).join("\n\n"),v=M?`${m}namespace Admin {
5
- ${M}
6
- ${m}}`:"",A=n(o,r,l,p),S=t({configuratorStates:o.configurator.states,adminStates:o.admin.states},p);return l.addTypeImport("@salsita-ai/sdk/domain","DomainEntityId"),{imports:l,declarations:[c,y,x,A,S,...f,g,v,...u].filter(Boolean).join("\n\n")}};export const generateApplicationSpecTypesModule=(e,t)=>{let{declarations:n,imports:i}=generateApplicationSpecTypeDeclarations(e,t,0);return`${o("application-types.ts","Story-local application, model and state types derived from the spec.")}
1
+ import{CodeImports as e}from"../common/code-imports.js";import{autoHeader as o}from"../common/file-headers.js";import{generateStateTypeDecls as t}from"./domain-spec/index.js";import{generateActionTypeDecls as n,generateDataSchemaTypeDecls as i,generateEntityExpressionComposites as a,generateExpressionTypeDecls as s,generateModelTypeDecls as r}from"./global-definition/index.js";export const generateApplicationSpecTypeDeclarations=(o,p,l)=>{let d=new e,m=l+2,c=" ".repeat(l),f=r(o.configurator.latestModel,p,d,l),$=[];for(let e of o.configurator.resolvedVersions.versionedModels){let o=`ModelV${e.version}`,t=r(e.modelVersion,p,d,m);$.push(`${c}namespace ${o} {
2
+ ${t}${c}}`)}let g=r(o.admin.latestModel,p,d,m),u=`${c}namespace Admin {
3
+ ${g}${c}}`,y=[];for(let e of o.admin.resolvedVersions.versionedModels){let o=`AdminV${e.version}`,t=r(e.modelVersion,p,d,m);y.push(`${c}namespace ${o} {
4
+ ${t}${c}}`)}let x=s(o.configurator.expressions,p,d,l),M=a(o.configurator.latestModel,o.configurator.expressions,d,l,""),v=[s(o.admin.expressions,p,d,m),a(o.admin.latestModel,o.admin.expressions,d,m,"Admin")].filter(Boolean).join("\n\n"),A=v?`${c}namespace Admin {
5
+ ${v}
6
+ ${c}}`:"",S=n(o.configurator.actions,o.configurator.latestModel,p,d,l),j=i(o,p,d,l),V=t({configuratorStates:o.configurator.states,adminStates:o.admin.states},l);return d.addTypeImport("@salsita-ai/sdk/domain","DomainEntityId"),{imports:d,declarations:[f,x,M,S,j,V,...$,u,A,...y].filter(Boolean).join("\n\n")}};export const generateApplicationSpecTypesModule=(e,t)=>{let{declarations:n,imports:i}=generateApplicationSpecTypeDeclarations(e,t,0);return`${o("application-types.ts","Story-local application, model and state types derived from the spec.")}
7
7
  ${i.toTypeOnlyString(".phoenix/application-types.ts")}
8
8
 
9
9
  ${n.replace(/^(\s*)(type|interface|namespace) /gm,"$1export $2 ")}
@@ -1,6 +1,7 @@
1
1
  import { type ApplicationTypeImportRegistrar } from '../common/index.js';
2
2
  interface GenerateConfiguratorCodeOptions {
3
3
  readonly expressionFiles: readonly string[];
4
+ readonly actionFiles: readonly string[];
4
5
  readonly invariantFiles: readonly string[];
5
6
  readonly componentFiles: readonly string[];
6
7
  }
@@ -1,17 +1,20 @@
1
- import{autoHeader as n}from"../common/file-headers.js";import{CodeImports as t,skipApplicationTypeImports as e}from"../common/index.js";let o=(n,t)=>n.map((n,e)=>{let o=`../${n.replace(/\.tsx?$/,".js")}`;return`import ${t}${e} from '${o}'`}),s=(n,t="\n")=>n.length>0?"\n"+n.join(t)+"\n":"";export const generateApplicationSpecConfiguratorCode=(a,i=e)=>{let{expressionFiles:r,invariantFiles:p,componentFiles:m}=a,d=new t;for(let n of["AliasedExpressions","AliasedInvariants","DomainComponentOptic","SystemComponentTypeConstraint"])d.addTypeImport("@salsita-ai/sdk/domain",n);i(d,["Aliases","AnyDomainEntity","FrontendData","PublishedData","RootEntity","SessionData"]);let c=[...o(r,"expressions"),...o(p,"invariants"),...o(m,"components")],y=r.map((n,t)=>`for (const [type, exprs] of Object.entries(expressions${t})) {
1
+ import{autoHeader as t}from"../common/file-headers.js";import{CodeImports as n,skipApplicationTypeImports as e}from"../common/index.js";let o=(t,n)=>t.map((t,e)=>{let o=`../${t.replace(/\.tsx?$/,".js")}`;return`import ${n}${e} from '${o}'`}),a=(t,n="\n")=>t.length>0?"\n"+t.join(n)+"\n":"";export const generateApplicationSpecConfiguratorCode=(i,s=e)=>{let{expressionFiles:r,actionFiles:p,invariantFiles:m,componentFiles:d}=i,c=new n;for(let t of["ActionImplementations","AliasedExpressions","AliasedInvariants","DomainComponentOptic","SystemComponentTypeConstraint"])c.addTypeImport("@salsita-ai/sdk/domain",t);s(c,["$Map","ActionTypes","Aliases","AnyDomainEntity","ExportState","FrontendData","NavigationState","PublishedData","RootEntity","SessionData","ToolState","ViewState"]);let l=[...o(r,"expressions"),...o(p,"actions"),...o(m,"invariants"),...o(d,"components")],y=p.map((t,n)=>`...actions${n}`),D=r.map((t,n)=>`for (const [type, exprs] of Object.entries(expressions${n})) {
2
2
  mergedExpressions[type] = { ...mergedExpressions[type], ...exprs }
3
- }`),l=p.map((n,t)=>`for (const [type, invs] of Object.entries(invariants${t})) {
3
+ }`),x=m.map((t,n)=>`for (const [type, invs] of Object.entries(invariants${n})) {
4
4
  mergedInvariants[type] = [...(mergedInvariants[type] ?? []), ...invs]
5
- }`),x=m.map((n,t)=>`components${t}`);return`${n("configurator-domain-code.ts","Barrel file for user-authored domain code — expressions, invariants and components. Needs only phx.domain.")}
6
- ${d.toString()}
7
- ${s(c)}
5
+ }`),A=d.map((t,n)=>`components${n}`);return`${t("configurator-domain-code.ts","Barrel file for user-authored domain code — expressions, actions, invariants and components. Needs only phx.domain.")}
6
+ ${c.toString()}
7
+ ${a(l)}
8
8
  const mergedExpressions: Record<string, Record<string, unknown>> = {}
9
- ${s(y,"\n\n")}
9
+ ${a(D,"\n\n")}
10
10
  export const customExpressions = mergedExpressions as AliasedExpressions<AnyDomainEntity, RootEntity, PublishedData, SessionData, FrontendData, Aliases>
11
11
 
12
+ // A declared action without an implementation fails here; an implementation of an undeclared action fails in its own file.
13
+ export const customActions: ActionImplementations<AnyDomainEntity, RootEntity, $Map, PublishedData, SessionData, FrontendData, NavigationState, ViewState, ToolState, ExportState, ActionTypes> = { ${y.join(", ")} }
14
+
12
15
  const mergedInvariants: Record<string, ReadonlyArray<unknown>> = {}
13
- ${s(l,"\n\n")}
16
+ ${a(x,"\n\n")}
14
17
  export const customInvariants = mergedInvariants as AliasedInvariants<AnyDomainEntity, RootEntity, PublishedData, SessionData, FrontendData, Aliases, string>
15
18
 
16
- export const customComponentOptics: ReadonlyArray<DomainComponentOptic<AnyDomainEntity, RootEntity, PublishedData, SessionData, FrontendData, AnyDomainEntity, SystemComponentTypeConstraint>> = [${x.join(", ")}].flat()
19
+ export const customComponentOptics: ReadonlyArray<DomainComponentOptic<AnyDomainEntity, RootEntity, PublishedData, SessionData, FrontendData, AnyDomainEntity, SystemComponentTypeConstraint>> = [${A.join(", ")}].flat()
17
20
  `};
@@ -1,6 +1,6 @@
1
1
  import type { AssistantSpec } from '../../../../parse-application-files/index.js';
2
2
  /**
3
- * Emits the `$assistant` constant handed to `baseConfiguratorBuilder.withAssistant()`: the parse-time
4
- * assistant manifest with its GraphQL SDL, or `null` when the spec declares no `assistant` section.
3
+ * Emits the `$assistant` constant handed to `baseConfiguratorBuilder.withAssistant()`: the resolved
4
+ * JSON manifest, or `null` when the spec declares no `assistant` section.
5
5
  */
6
6
  export declare const generateAssistantBlock: (assistant: AssistantSpec) => string;
@@ -1 +1 @@
1
- export const generateAssistantBlock=s=>`const $assistant: AssistantManifest | null = ${JSON.stringify(s,null,2)}`;
1
+ export const generateAssistantBlock=s=>`const $assistant: AssistantResolvedManifest | null = ${JSON.stringify(s?.resolved??null,null,2)}`;
@@ -1,4 +1,4 @@
1
- import type { Components, Defaults, Expressions, Invariants, ModelVersion, Presets, ResolvedVersions } from '../../../../parse-application-files/index.js';
1
+ import type { Actions, Components, Defaults, Expressions, Invariants, ModelVersion, Presets, ResolvedVersions } from '../../../../parse-application-files/index.js';
2
2
  import type { ApplicationTypeImportRegistrar, CodeImports } from '../../common/index.js';
3
3
  interface DomainBlockSpec {
4
4
  readonly components: Components;
@@ -11,6 +11,8 @@ interface DomainBlockSpec {
11
11
  export interface DomainBlockOptions {
12
12
  readonly domainSpec: DomainBlockSpec;
13
13
  readonly invariants: Invariants;
14
+ /** The declared actions of the configurator domain; `undefined` for the admin domain, which has none. */
15
+ readonly actions: Actions | undefined;
14
16
  readonly typePrefix: string;
15
17
  readonly versionNsPrefix: string;
16
18
  readonly isAdmin: boolean;