@salsita-ai/sdk 0.50.0-develop.c33986dc44 → 0.50.0-develop.c402728d10

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 (558) hide show
  1. package/README.md +5 -1
  2. package/dist/admin/AdminShell.js +1 -1
  3. package/dist/admin/legacy-admin/Application.js +1 -1
  4. package/dist/application-spec/core/enhanced-json-value.d.ts +2 -31
  5. package/dist/application-spec/core/enhanced-json-value.js +1 -1
  6. package/dist/application-spec/core/index.d.ts +1 -3
  7. package/dist/application-spec/core/index.js +1 -1
  8. package/dist/application-spec/core/json-schema.d.ts +2 -52
  9. package/dist/application-spec/core/markers/index.d.ts +1 -1
  10. package/dist/application-spec/core/markers/index.js +1 -1
  11. package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
  12. package/dist/application-spec/core/markers/msg-marker.js +1 -1
  13. package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
  14. package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
  15. package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
  16. package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -1
  17. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  18. package/dist/application-spec/errors/diagnostic-messages.d.ts +15 -1
  19. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  20. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  21. package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -6
  22. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  23. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
  24. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +7 -0
  25. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  26. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +1 -1
  27. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
  28. package/dist/application-spec/generate-application/code/templates/story/wrapper.js +2 -4
  29. package/dist/application-spec/generate-application/implementations/phx-model.d.ts +1 -1
  30. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +1 -2
  31. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +1 -2
  32. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +1 -2
  33. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +1 -1
  34. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -1
  35. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +1 -2
  36. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -1
  37. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +1 -1
  38. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +1 -1
  39. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +1 -2
  40. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
  41. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  42. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +1 -1
  43. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +1 -2
  44. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +1 -2
  45. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  46. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +1 -2
  47. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
  48. package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +2 -3
  49. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +1 -1
  50. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +1 -1
  51. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +96 -31
  52. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +1 -1
  53. package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +13 -4
  54. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  55. package/dist/application-spec/parse-application-files/merge/merged-infra.d.ts +4 -11
  56. package/dist/application-spec/parse-application-files/merge/merged-transformers.d.ts +2 -4
  57. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  58. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.d.ts +2 -2
  59. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.js +1 -1
  60. package/dist/application-spec/parse-application-files/raw-spec/raw-admin-pages.d.ts +3 -24
  61. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +25 -20
  62. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  63. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
  64. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
  65. package/dist/application-spec/parse-application-files/raw-spec/raw-resources.d.ts +19 -64
  66. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-pages.d.ts +3 -20
  67. package/dist/application-spec/parse-application-files/spec/application/admin-spec/states.d.ts +3 -5
  68. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/states.d.ts +3 -8
  69. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
  70. package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
  71. package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +4 -10
  72. package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
  73. package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
  74. package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
  75. package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
  76. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +2 -3
  77. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  78. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +2 -3
  79. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +2 -2
  80. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -29
  81. package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
  82. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
  83. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
  84. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +2 -2
  85. package/dist/application-spec/parse-application-files/spec/invariants/invariant.d.ts +5 -21
  86. package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +4 -14
  87. package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
  88. package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
  89. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
  90. package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
  91. package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
  92. package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
  93. package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
  94. package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
  95. package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
  96. package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
  97. package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
  98. package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
  99. package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
  100. package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
  101. package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
  102. package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +6 -23
  103. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.d.ts +3 -18
  104. package/dist/application-spec/parse-application-files/spec/sections/application-version.d.ts +3 -7
  105. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  106. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.js +1 -1
  107. package/dist/application-spec/parse-application-files/spec/sections/data-spec/chunks.d.ts +6 -23
  108. package/dist/application-spec/parse-application-files/spec/sections/data-spec/custom-data-spec.d.ts +1 -16
  109. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-entry-key.d.ts +3 -9
  110. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-spec.d.ts +1 -10
  111. package/dist/application-spec/parse-application-files/spec/sections/data-spec/swatch-data-spec.d.ts +1 -14
  112. package/dist/application-spec/parse-application-files/spec/sections/state-value.d.ts +3 -7
  113. package/dist/application-spec/parse-application-files/spec/sections/theme.d.ts +3 -10
  114. package/dist/application-spec/parse-application-files/spec/sections/transformers.d.ts +4 -11
  115. package/dist/application-spec/parse-application-files/spec/sections/ui.d.ts +3 -12
  116. package/dist/client/authorized-client.d.ts +3 -1
  117. package/dist/client/authorized-client.js +1 -1
  118. package/dist/client/contract.d.ts +30 -1
  119. package/dist/client/contract.js +1 -1
  120. package/dist/client/index.d.ts +1 -1
  121. package/dist/client/local-authorized-client.d.ts +3 -1
  122. package/dist/client/local-authorized-client.js +1 -1
  123. package/dist/client/memory-authorized-client.d.ts +4 -1
  124. package/dist/client/memory-authorized-client.js +1 -1
  125. package/dist/client/phoenix-api.d.ts +259 -1
  126. package/dist/configurator/ConfiguratorApp.js +1 -1
  127. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  128. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +64 -6
  129. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  130. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +21 -4
  131. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  132. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +70 -56
  133. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  134. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +30 -9
  135. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  136. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
  137. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
  138. package/dist/configurator/common/configurator-interface.d.ts +2 -2
  139. package/dist/configurator/common/configurator-interface.js +1 -1
  140. package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
  141. package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
  142. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.js +1 -1
  143. package/dist/configurator/configurator-context/index.d.ts +0 -5
  144. package/dist/configurator/configurator-context/index.js +1 -1
  145. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  146. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  147. package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
  148. package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
  149. package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
  150. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  151. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
  152. package/dist/configurator/ui/assistant/AssistantComposer.js +2 -1
  153. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  154. package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +11 -0
  155. package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -0
  156. package/dist/configurator/ui/assistant/attachments/index.d.ts +2 -0
  157. package/dist/configurator/ui/assistant/attachments/index.js +1 -0
  158. package/dist/configurator/ui/assistant/attachments/prepare-image.d.ts +19 -0
  159. package/dist/configurator/ui/assistant/attachments/prepare-image.js +1 -0
  160. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +1 -1
  161. package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
  162. package/dist/configurator/ui/assistant/screenshots/index.d.ts +1 -0
  163. package/dist/configurator/ui/assistant/screenshots/index.js +1 -1
  164. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +12 -4
  165. package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
  166. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
  167. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
  168. package/dist/configurator/ui/assistant/thread-items.d.ts +2 -0
  169. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  170. package/dist/configurator/ui/assistant/tool-chip.d.ts +19 -9
  171. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  172. package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
  173. package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
  174. package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
  175. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  176. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  177. package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
  178. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  179. package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
  180. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  181. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  182. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  183. package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
  184. package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
  185. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  186. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  187. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/use-basic-sidebar-footer.js +1 -1
  188. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  189. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  190. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
  191. package/dist/docs/3d-scene/cameras/custom.mdx +4 -2
  192. package/dist/docs/drag-and-drop/room-planner.mdx +1 -1
  193. package/dist/docs/index.json +1 -1
  194. package/dist/docs/phoenix/configurator-interface.mdx +1 -1
  195. package/dist/docs/phoenix/domain-model.mdx +4 -1
  196. package/dist/docs/phoenix/layout-slots.mdx +21 -0
  197. package/dist/docs/phoenix/migration-guide.mdx +3 -3
  198. package/dist/docs/phoenix/phoenix-cli.mdx +40 -7
  199. package/dist/docs/phoenix/project-structure.mdx +23 -19
  200. package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
  201. package/dist/docs/phoenix/webhooks.mdx +9 -1
  202. package/dist/domain/application/application-config.d.ts +6 -24
  203. package/dist/domain/application/assistant/assistant-manifest.d.ts +13 -3
  204. package/dist/domain/application/assistant/assistant-manifest.js +1 -1
  205. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +5 -9
  206. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
  207. package/dist/domain/application/assistant/build-assistant-lenses.js +1 -1
  208. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  209. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  210. package/dist/domain/application/assistant/index.d.ts +3 -3
  211. package/dist/domain/application/assistant/index.js +1 -1
  212. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  213. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -4
  214. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  215. package/dist/domain/application/assistant-mutations.js +1 -1
  216. package/dist/domain/available-system-components/available-system-components.d.ts +11 -0
  217. package/dist/domain/available-system-components/available-system-components.js +1 -0
  218. package/dist/domain/available-system-components/index.d.ts +1 -0
  219. package/dist/domain/available-system-components/index.js +1 -0
  220. package/dist/domain/{domain-builder.d.ts → domain-builder/domain-builder.d.ts} +2 -2
  221. package/dist/domain/domain-builder/domain-builder.js +1 -0
  222. package/dist/domain/domain-builder/index.d.ts +1 -0
  223. package/dist/domain/domain-builder/index.js +1 -0
  224. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +6 -0
  225. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
  226. package/dist/domain/extensions/export-images/index.d.ts +1 -1
  227. package/dist/domain/extensions/export-images/index.js +1 -1
  228. package/dist/domain/extensions/index.d.ts +1 -1
  229. package/dist/domain/extensions/index.js +1 -1
  230. package/dist/domain/index.d.ts +3 -2
  231. package/dist/domain/index.js +1 -1
  232. package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
  233. package/dist/domain/spec/application/admin-pages.d.ts +26 -0
  234. package/dist/domain/spec/application/admin-states.d.ts +5 -0
  235. package/dist/domain/spec/application/configurator-states.d.ts +8 -0
  236. package/dist/domain/spec/application/configurator-states.js +1 -0
  237. package/dist/domain/spec/application/index.d.ts +5 -0
  238. package/dist/domain/spec/application/index.js +1 -0
  239. package/dist/domain/spec/components/bindings/index.d.ts +2 -0
  240. package/dist/domain/spec/components/bindings/index.js +1 -0
  241. package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
  242. package/dist/domain/spec/components/bindings/read-binding.js +1 -0
  243. package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
  244. package/dist/domain/spec/components/bindings/write-binding.js +1 -0
  245. package/dist/{application-spec/parse-application-files → domain}/spec/components/component-entry.d.ts +3 -3
  246. package/dist/domain/spec/components/component-entry.js +1 -0
  247. package/dist/{application-spec/core → domain/spec}/components/component-filter.d.ts +3 -2
  248. package/dist/domain/spec/components/component-filters.d.ts +10 -0
  249. package/dist/domain/spec/components/component-filters.js +1 -0
  250. package/dist/domain/spec/components/components.d.ts +4 -0
  251. package/dist/domain/spec/components/components.js +1 -0
  252. package/dist/domain/spec/components/index.d.ts +6 -0
  253. package/dist/domain/spec/enhanced-json/enhanced-json-value.d.ts +30 -0
  254. package/dist/domain/spec/enhanced-json/enhanced-json-value.js +1 -0
  255. package/dist/domain/spec/enhanced-json/index.d.ts +1 -0
  256. package/dist/domain/spec/enhanced-json/index.js +1 -0
  257. package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts +9 -3
  258. package/dist/domain/spec/expressions/expression.js +1 -0
  259. package/dist/domain/spec/expressions/expressions.d.ts +27 -0
  260. package/dist/domain/spec/expressions/expressions.js +1 -0
  261. package/dist/domain/spec/expressions/index.d.ts +5 -0
  262. package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
  263. package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
  264. package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
  265. package/dist/domain/spec/index.d.ts +9 -0
  266. package/dist/domain/spec/index.js +1 -0
  267. package/dist/domain/spec/invariants/index.d.ts +2 -0
  268. package/dist/domain/spec/invariants/index.js +1 -0
  269. package/dist/domain/spec/invariants/invariant.d.ts +24 -0
  270. package/dist/domain/spec/invariants/invariant.js +1 -0
  271. package/dist/domain/spec/invariants/invariants.d.ts +14 -0
  272. package/dist/domain/spec/invariants/invariants.js +1 -0
  273. package/dist/domain/spec/json-schema.d.ts +52 -0
  274. package/dist/domain/spec/json-schema.js +1 -0
  275. package/dist/domain/spec/markers/index.d.ts +3 -0
  276. package/dist/domain/spec/markers/index.js +1 -0
  277. package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
  278. package/dist/domain/spec/markers/msg-marker.js +1 -0
  279. package/dist/domain/spec/model/aliases.d.ts +9 -0
  280. package/dist/domain/spec/model/aliases.js +1 -0
  281. package/dist/domain/spec/model/common-types.d.ts +15 -0
  282. package/dist/domain/spec/model/common-types.js +1 -0
  283. package/dist/domain/spec/model/defaults.d.ts +33 -0
  284. package/dist/domain/spec/model/defaults.js +1 -0
  285. package/dist/domain/spec/model/entity-types.d.ts +8 -0
  286. package/dist/domain/spec/model/entity-types.js +1 -0
  287. package/dist/domain/spec/model/index.d.ts +7 -0
  288. package/dist/domain/spec/model/index.js +1 -0
  289. package/dist/domain/spec/model/model-version-key.d.ts +3 -0
  290. package/dist/domain/spec/model/model-version-key.js +1 -0
  291. package/dist/domain/spec/model/names/action-name.d.ts +7 -0
  292. package/dist/domain/spec/model/names/action-name.js +1 -0
  293. package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
  294. package/dist/domain/spec/model/names/alias-name.js +1 -0
  295. package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
  296. package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
  297. package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
  298. package/dist/domain/spec/model/names/entity-type-name.js +1 -0
  299. package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
  300. package/dist/domain/spec/model/names/expression-name.js +1 -0
  301. package/dist/domain/spec/model/names/index.d.ts +9 -0
  302. package/dist/domain/spec/model/names/index.js +1 -0
  303. package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
  304. package/dist/domain/spec/model/names/instance-name.js +1 -0
  305. package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
  306. package/dist/domain/spec/model/names/invariant-name.js +1 -0
  307. package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
  308. package/dist/domain/spec/model/names/shape-property-name.js +1 -0
  309. package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
  310. package/dist/domain/spec/model/names/violation-type-name.js +1 -0
  311. package/dist/domain/spec/model/presets.d.ts +30 -0
  312. package/dist/domain/spec/model/presets.js +1 -0
  313. package/dist/domain/spec/sections/actions.d.ts +23 -0
  314. package/dist/domain/spec/sections/actions.js +1 -0
  315. package/dist/domain/spec/sections/app-metadata.d.ts +18 -0
  316. package/dist/domain/spec/sections/app-metadata.js +1 -0
  317. package/dist/domain/spec/sections/application-version.d.ts +7 -0
  318. package/dist/domain/spec/sections/application-version.js +1 -0
  319. package/dist/domain/spec/sections/data-spec/chunks.d.ts +23 -0
  320. package/dist/domain/spec/sections/data-spec/chunks.js +1 -0
  321. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.d.ts +16 -0
  322. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.js +1 -0
  323. package/dist/domain/spec/sections/data-spec/data-entry-key.d.ts +9 -0
  324. package/dist/domain/spec/sections/data-spec/data-entry-key.js +1 -0
  325. package/dist/domain/spec/sections/data-spec/index.d.ts +5 -0
  326. package/dist/domain/spec/sections/data-spec/index.js +1 -0
  327. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.d.ts +10 -0
  328. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.js +1 -0
  329. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.d.ts +14 -0
  330. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.js +1 -0
  331. package/dist/domain/spec/sections/index.d.ts +9 -0
  332. package/dist/domain/spec/sections/index.js +1 -0
  333. package/dist/domain/spec/sections/infra/acl.d.ts +12 -0
  334. package/dist/domain/spec/sections/infra/acl.js +1 -0
  335. package/dist/domain/spec/sections/infra/index.d.ts +3 -0
  336. package/dist/domain/spec/sections/infra/index.js +1 -0
  337. package/dist/domain/spec/sections/infra/resource-entry.d.ts +46 -0
  338. package/dist/domain/spec/sections/infra/resource-entry.js +1 -0
  339. package/dist/domain/spec/sections/infra/resources-config.d.ts +10 -0
  340. package/dist/domain/spec/sections/infra/resources-config.js +1 -0
  341. package/dist/domain/spec/sections/state-value.d.ts +7 -0
  342. package/dist/domain/spec/sections/state-value.js +1 -0
  343. package/dist/domain/spec/sections/theme.d.ts +10 -0
  344. package/dist/domain/spec/sections/theme.js +1 -0
  345. package/dist/domain/spec/sections/transformers.d.ts +15 -0
  346. package/dist/domain/spec/sections/transformers.js +1 -0
  347. package/dist/domain/spec/sections/ui.d.ts +12 -0
  348. package/dist/domain/spec/sections/ui.js +1 -0
  349. package/dist/domain/system-definitions.js +1 -1
  350. package/dist/domain/utils/index.d.ts +2 -0
  351. package/dist/domain/utils/index.js +1 -0
  352. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  353. package/dist/i18n/locales/cs/messages.js +1 -1
  354. package/dist/i18n/locales/da/messages.js +1 -1
  355. package/dist/i18n/locales/de/messages.js +1 -1
  356. package/dist/i18n/locales/de-AT/messages.js +1 -1
  357. package/dist/i18n/locales/en/messages.js +1 -1
  358. package/dist/i18n/locales/en-AU/messages.js +1 -1
  359. package/dist/i18n/locales/en-GB/messages.js +1 -1
  360. package/dist/i18n/locales/es/messages.js +1 -1
  361. package/dist/i18n/locales/fr/messages.js +1 -1
  362. package/dist/i18n/locales/hu/messages.js +1 -1
  363. package/dist/i18n/locales/it/messages.js +1 -1
  364. package/dist/i18n/locales/nl/messages.js +1 -1
  365. package/dist/i18n/locales/pl/messages.js +1 -1
  366. package/dist/i18n/locales/pt/messages.js +1 -1
  367. package/dist/i18n/locales/ro/messages.js +1 -1
  368. package/dist/i18n/locales/sk/messages.js +1 -1
  369. package/dist/i18n/locales/tr/messages.js +1 -1
  370. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +2 -2
  371. package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
  372. package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.d.ts +1 -0
  373. package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.js +1 -1
  374. package/dist/legacy/webhook-cli/lambda-local/index.js +1 -1
  375. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +1 -0
  376. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  377. package/dist/phoenix/application-spec/generate-project-files.d.ts +1 -0
  378. package/dist/phoenix/application-spec/index.d.ts +1 -0
  379. package/dist/phoenix/application-spec/index.js +1 -1
  380. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +11 -0
  381. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  382. package/dist/phoenix/bin.js +1 -1
  383. package/dist/phoenix/cli.js +1 -1
  384. package/dist/phoenix/commands/activate-deployment.js +1 -1
  385. package/dist/phoenix/commands/build.js +1 -1
  386. package/dist/phoenix/commands/changelog.js +1 -1
  387. package/dist/phoenix/commands/check.js +1 -1
  388. package/dist/phoenix/commands/clean.js +1 -1
  389. package/dist/phoenix/commands/cleanup-environment.js +2 -2
  390. package/dist/phoenix/commands/create-environment.js +1 -1
  391. package/dist/phoenix/commands/data.js +1 -1
  392. package/dist/phoenix/commands/deploy.js +1 -1
  393. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  394. package/dist/phoenix/commands/dev.js +4 -5
  395. package/dist/phoenix/commands/docs.js +1 -1
  396. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  397. package/dist/phoenix/commands/fix.js +1 -1
  398. package/dist/phoenix/commands/index.d.ts +1 -1
  399. package/dist/phoenix/commands/index.js +1 -1
  400. package/dist/phoenix/commands/inspect-assets.js +1 -1
  401. package/dist/phoenix/commands/list-environments.js +1 -1
  402. package/dist/phoenix/commands/login.d.ts +4 -1
  403. package/dist/phoenix/commands/login.js +2 -2
  404. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  405. package/dist/phoenix/commands/register-deployment.js +1 -1
  406. package/dist/phoenix/commands/scene.js +1 -1
  407. package/dist/phoenix/commands/screenshot.js +1 -1
  408. package/dist/phoenix/commands/state.js +1 -1
  409. package/dist/phoenix/commands/story-build.js +3 -3
  410. package/dist/phoenix/commands/story-create.js +1 -1
  411. package/dist/phoenix/commands/story-dev.js +2 -2
  412. package/dist/phoenix/commands/sync.js +1 -1
  413. package/dist/phoenix/commands/variants.js +1 -1
  414. package/dist/phoenix/editor-server/commands-router.js +1 -1
  415. package/dist/phoenix/editor-server/editor-server.d.ts +2 -13
  416. package/dist/phoenix/editor-server/editor-server.js +1 -1
  417. package/dist/phoenix/editor-server/spec-router.js +1 -1
  418. package/dist/phoenix/editor-server/trpc.d.ts +2 -12
  419. package/dist/phoenix/lingui/index.d.ts +1 -0
  420. package/dist/phoenix/lingui/index.js +1 -0
  421. package/dist/phoenix/lingui/lingui.d.ts +18 -0
  422. package/dist/phoenix/lingui/lingui.js +1 -0
  423. package/dist/phoenix/services/application-spec-project-watcher.d.ts +11 -6
  424. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  425. package/dist/phoenix/services/cli-credentials.d.ts +3 -0
  426. package/dist/phoenix/services/cli-credentials.js +1 -1
  427. package/dist/phoenix/services/cli-exit.d.ts +5 -0
  428. package/dist/phoenix/services/cli-exit.js +1 -0
  429. package/dist/phoenix/services/deployment/deployment-preparation-service.d.ts +28 -0
  430. package/dist/phoenix/services/deployment/deployment-preparation-service.js +1 -0
  431. package/dist/phoenix/{commands → services/deployment}/generated-env-markers.d.ts +1 -0
  432. package/dist/phoenix/services/deployment/generated-env-markers.js +1 -0
  433. package/dist/phoenix/services/deployment/index.d.ts +2 -0
  434. package/dist/phoenix/services/deployment/index.js +1 -0
  435. package/dist/phoenix/services/index.d.ts +5 -1
  436. package/dist/phoenix/services/index.js +1 -1
  437. package/dist/phoenix/services/lingui-watcher.js +1 -1
  438. package/dist/phoenix/services/phoenix-store.d.ts +3 -0
  439. package/dist/phoenix/services/phoenix-store.js +1 -1
  440. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  441. package/dist/phoenix/services/session/editor-server-handle.d.ts +5 -0
  442. package/dist/phoenix/services/session/editor-server-handle.js +1 -0
  443. package/dist/phoenix/services/session/index.d.ts +2 -0
  444. package/dist/phoenix/services/session/index.js +1 -0
  445. package/dist/phoenix/services/session/phoenix-application.d.ts +82 -0
  446. package/dist/phoenix/services/session/phoenix-application.js +2 -0
  447. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.d.ts +9 -0
  448. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.js +1 -0
  449. package/dist/phoenix/services/telemetry/index.d.ts +3 -0
  450. package/dist/phoenix/services/telemetry/index.js +1 -0
  451. package/dist/phoenix/services/telemetry/telemetry-client.d.ts +25 -0
  452. package/dist/phoenix/services/telemetry/telemetry-client.js +1 -0
  453. package/dist/phoenix/services/telemetry/telemetry-command.d.ts +2 -0
  454. package/dist/phoenix/services/telemetry/telemetry-command.js +1 -0
  455. package/dist/phoenix/services/telemetry/telemetry-event.d.ts +44 -0
  456. package/dist/phoenix/services/telemetry/telemetry-event.js +1 -0
  457. package/dist/phoenix/services/telemetry/telemetry-state.d.ts +25 -0
  458. package/dist/phoenix/services/telemetry/telemetry-state.js +2 -0
  459. package/dist/phoenix/services/vite-config.js +1 -1
  460. package/dist/phoenix/services/webhook-service/transport.js +1 -1
  461. package/dist/phoenix/services/webhook-service/tunnel.d.ts +1 -0
  462. package/dist/phoenix/services/webhook-service/tunnel.js +1 -1
  463. package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
  464. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/ConfiguratorRoutingProvider.d.ts +1 -1
  465. package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
  466. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/OnGoToIndexHandler.d.ts +1 -2
  467. package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
  468. package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
  469. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/index.js +1 -1
  470. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/use-power-routing-lifecycle.d.ts +2 -0
  471. package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
  472. package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
  473. package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
  474. package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
  475. package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
  476. package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
  477. package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
  478. package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
  479. package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
  480. package/dist/react-sdk/domain-application-context/index.js +1 -1
  481. package/dist/react-sdk/elements/PhoenixEntityElement.js +1 -1
  482. package/dist/react-sdk/elements/PhoenixLayoutElement.js +1 -1
  483. package/dist/react-sdk/index.d.ts +5 -0
  484. package/dist/react-sdk/index.js +1 -1
  485. package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
  486. package/dist/react-sdk/integration/index.d.ts +1 -0
  487. package/dist/react-sdk/integration/index.js +1 -0
  488. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
  489. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
  490. package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
  491. package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
  492. package/dist/react-sdk/lifecycle-providers/index.js +1 -0
  493. package/dist/react-sdk/notifications/index.d.ts +1 -0
  494. package/dist/react-sdk/notifications/index.js +1 -0
  495. package/dist/react-sdk/notifications/snackbar-action-button.d.ts +30 -0
  496. package/dist/react-sdk/notifications/snackbar-action-button.js +1 -0
  497. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -0
  498. package/dist/react-sdk/preset-selection/index.d.ts +1 -0
  499. package/dist/react-sdk/preset-selection/index.js +1 -0
  500. package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
  501. package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
  502. package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
  503. package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
  504. package/dist/ui-sdk/icons/__generated/Paperclip.d.ts +3 -0
  505. package/dist/ui-sdk/icons/__generated/Paperclip.js +1 -0
  506. package/dist/ui-sdk/icons/__generated/index.d.ts +2 -0
  507. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  508. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  509. package/dist/ui-sdk/theme/types.d.ts +1 -1
  510. package/dist/watch/glob-matcher.d.ts +4 -4
  511. package/dist/watch/glob-matcher.js +1 -1
  512. package/dist/watch/watch.d.ts +4 -4
  513. package/dist/watch/watch.js +1 -1
  514. package/package.json +3 -3
  515. package/schema/domain-spec.json +22 -4
  516. package/dist/application-spec/core/components/index.d.ts +0 -2
  517. package/dist/application-spec/core/expressions/index.d.ts +0 -2
  518. package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
  519. package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
  520. package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
  521. package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
  522. package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
  523. package/dist/configurator/configurator-context/PresetSelectionProvider.js +0 -1
  524. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
  525. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
  526. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
  527. package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
  528. package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
  529. package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
  530. package/dist/domain/available-system-components.d.ts +0 -11
  531. package/dist/domain/available-system-components.js +0 -1
  532. package/dist/domain/domain-builder.js +0 -1
  533. package/dist/phoenix/commands/generated-env-markers.js +0 -1
  534. package/dist/phoenix/services/lingui.d.ts +0 -15
  535. package/dist/phoenix/services/lingui.js +0 -1
  536. package/dist/phoenix/services/phoenix-application.d.ts +0 -21
  537. package/dist/phoenix/services/phoenix-application.js +0 -1
  538. /package/dist/{application-spec/core/expressions/relation-expression-params.js → domain/spec/application/admin-pages-section.js} +0 -0
  539. /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/application/admin-pages.js} +0 -0
  540. /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/application/admin-states.js} +0 -0
  541. /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
  542. /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
  543. /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
  544. /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
  545. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
  546. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
  547. /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
  548. /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.d.ts +0 -0
  549. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
  550. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
  551. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
  552. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
  553. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
  554. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
  555. /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
  556. /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
  557. /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
  558. /package/dist/{configurator/configurator-context → react-sdk/preset-selection}/PresetSelectionProvider.d.ts +0 -0
@@ -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.NON_FINITE_NUMBER]:(e,t)=>`Invalid number at "${e}": ${t} is not a finite number. JSON, the schemas and the stored configuration have no infinite or not-a-number value, so it cannot be checked or saved. Write a finite number, or leave the key out if it sets no limit.`,[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_FIELD_NOT_REFERENCE]:(e,t,n,a)=>`Relation "${e}.${t}" uses field "${n}" of "${a}", which is not a reference field. A relation reads the ids of its related entities from the field, so the field must be a "phx:DomainEntityId" with "references", such a reference or null, or an array of such references. Declare "${n}" that way in the shape of "${a}" or pick a different field.`,[e.RELATION_FIELD_REFERENCES_OTHER_TYPES]:(e,t,n,a,i,s,o)=>{let r=1===o.length&&o[0]===s?"":` (${o.join(", ")})`;return`Relation "${e}.${t}" uses field "${n}" of "${a}", which references ${i.join(", ")}, but the relation relates to "${s}"${r}. The field of a direct relation must reference exactly the entity types of its target, and the field of an indirect relation exactly the entity types the relation is declared on. Make "${a}.${n}" reference "${s}" or pick a different field.`},[e.RELATION_FIELD_CARDINALITY_MISMATCH]:(e,t,n,a,i,s)=>{let o={single:"one reference that is never null",nullableSingle:"one reference or null",array:"an array of references"};return`Relation "${e}.${t}" has cardinality "${a}", which needs a field that holds ${o[s]}, but "${e}.${n}" holds ${o[i]}. A direct relation with cardinality "1-1" reads one reference that is never null, "0-1" one reference or null, and "0-N" or "1-N" an array of references. Change the cardinality or the schema of "${n}".`},[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.DUPLICATE_RESOURCE_NAME]:(e,t,n)=>`Resource name "${e}" is used by the entries at index ${t} and ${n} of "resources". A resource name identifies one resource. Rename one of the two entries or 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",screenshots:"take screenshots of"})[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, the options of a field or a screenshot view 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, every "options" of a writable field and every "assistant.screenshots" view 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 built-in of the meta type: the recipe groups edges or the screenshot field. 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_SCREENSHOT_VIEW]:(e,t,n,a)=>`"assistant.screenshots.${e}.${t}" does not name an "agentScreenshot" component instance on "${n}", so there is no view to take a screenshot from. ${a.length>0?`"${n}" has these "agentScreenshot" instances: ${a.join(", ")}.`:`"${n}" has no "agentScreenshot" component.`} Use the instance name of an "agentScreenshot" component attached to the entity type or to an alias containing it, or remove the entry.`,[e.ASSISTANT_UNKNOWN_SCREENSHOT_EXPORT_STATE]:(e,t,n,a)=>`"assistant.screenshots.${e}.${t}" exposes the view "${t}", whose "agentScreenshot" component renders in the export state "${n}", but the spec declares no such export state, so the screenshot could never be taken. The declared export states are: ${a.join(", ")}. Set "exportState" of the component to one of them, or declare "${n}" under "exportStates".`,[e.ASSISTANT_DUPLICATE_SCREENSHOT_VIEW]:(e,t,n)=>`"${e}" gets the screenshot view "${t}" from both "assistant.screenshots.${n.join('" and "assistant.screenshots.')}", but the agent asks for a view of an entity by its name. The entries may come from "${e}" itself or from aliases containing it. Give one of them another name with "as", or remove it.`,[e.ASSISTANT_INVALID_SCREENSHOT_VIEW_NAME]:(e,t,n)=>`"assistant.screenshots.${e}.${t}" exposes the view "${n}", but the agent asks for a view by a GraphQL enum value, which is letters, digits and "_", does not start with a digit and is not "true", "false" or "null". Give the view a valid name with "as".`,[e.ASSISTANT_SCREENSHOT_VIEW_TYPE_NAME_CONFLICT]:(e,t)=>`This entry exposes a screenshot view on "${e}", so the assistant schema generates the enum "${t}" of its views, but the model already has an entity type or alias named "${t}". Rename that entity type or alias, or remove every "assistant.screenshots" view of "${e}".`,[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_UNKNOWN_LENS]:(e,t,n)=>`"assistant.entities.${e}" is tagged with the lens "${t}", which is not declared under "assistant.lenses"${n.length>0?`; the declared lenses are: ${n.join(", ")}`:"; the manifest declares no lenses"}. Declare "${t}" under "assistant.lenses" with a "description", or remove the tag.`,[e.ASSISTANT_EMPTY_LENS]:e=>`"assistant.lenses.${e}" is declared, but no entry under "assistant.entities" is tagged with it, so the agent would be offered a lens that selects nothing. Tag the fields and expressions of the lens with "lenses: [${e}]", or remove the lens.`,[e.ASSISTANT_RESERVED_LENS_NAME]:(e,t)=>`"assistant.lenses.${e}" has the name of a built-in lens (${t.join(", ")}), which the assistant schema defines itself. Rename the lens and the tags that name it.`,[e.ASSISTANT_FORM_ELEMENT_BUILT_IN_NAME]:(e,t)=>`"assistant.formElements.${e}" has the name of a built-in form element (${t.join(", ")}), and a project element cannot replace one; restyle a built-in through the theme instead. Rename the element and the name its implementation registers.`,[e.ASSISTANT_FORM_ELEMENT_HTML_NAME]:e=>`"assistant.formElements.${e}" has the name of an HTML element, so form markup that uses it could be read as HTML. Rename the element and the name its implementation registers, e.g. "${e}-field".`,[e.ASSISTANT_FORM_ATTRIBUTE_RESERVED_NAME]:(e,t)=>`"assistant.formElements.${e}.attributes.${t}" declares the built-in attribute "${t}", which every form element takes already as the text the user sees and the name of its answer. Remove the declaration, or rename the attribute if it means something else.`,[e.ASSISTANT_FORM_ELEMENT_UNKNOWN_REQUIRED]:(e,t,n)=>`"assistant.formElements.${e}.required" lists "${t}", which is not one of its declared attributes${n.length>0?` (${n.join(", ")})`:"; the element declares none"}. Declare the attribute under "attributes", or remove it from "required".`,[e.ASSISTANT_FIELD_SHAPE_CONFLICT]:(e,t)=>`The assistant schema exposes "${e}" in shapes that cannot be read together: ${t.map(({typeName:e,type:t})=>`${t} on "${e}"`).join(", ")}. A query that reaches entities of several types, such as "entities" or a lens, selects the field on all of them at once, and in GraphQL a single entity, a list of entities and a plain value cannot share a name. One name meaning different kinds of thing is an unusual model and confuses the assistant as well. Expose one of the entries under another name with "as".`,[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_INCOMPLETE]:(e,t,n)=>{let a=n.some(t=>t!==e)?` (declared under ${n.map(e=>`"${e}"`).join(", ")})`:"";return`Defaults for "${e}"${a} are incomplete: missing ${t.join(", ")}. Defaults for an entity type must state every property of its shape, because the recipe factory validates them as a whole entity when the application loads. Add the missing properties under "${e}" or under an alias that contains it, or remove the defaults for "${e}".`},[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.COMPONENT_BINDING_TYPE_MISMATCH]:(e,t,n,a)=>`"${t}" at "${e}" reads a value of type ${n}, but the component expects ${a} there, so the generated code would not type-check. Read a field whose type fits, change the field's type, or compute the value in an expression.`,[e.COMPONENT_STATIC_ENTITY_ID]:(e,t,n)=>`"${e}" holds the value ${t} written in the spec, but the component expects ${n} there. An entity id is a branded type, so no value written in YAML is one and the generated code would not type-check. Read the id from the domain state with "$read" or "$bind" of a field or expression that holds it.`,[e.EXPRESSION_READ_TYPE_CONFLICT]:(e,t,n,a)=>`Expression "${t}" of "${e}" ${void 0===n?"":`is declared as ${n} and `}is read where components expect ${a.join(", and ")}. No value is of all these types, so its implementation cannot type-check. Read the expression only where its type fits, declare the type the components expect, or read another expression there.`,[e.EXPRESSION_VALUE_TYPE_MISMATCH]:(e,t,n)=>`Expression "${e}" holds a value of type ${t}, but its schema declares ${n}, so the generated code would not type-check. A "$msg" is a message descriptor: declare the expression as "$ref: phx:Localizable" or "$ref: phx:MessageDescriptor", or change the value.`,[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
+ import{ASSISTANT_AI_PROVIDERS as e,ASSISTANT_MODEL_TIERS as t,ASSISTANT_REASONING_LEVELS as n}from"@salsita-ai/contracts/assistant";import{DiagnosticCode as a}from"./diagnostic-codes.js";export const diagnosticMessages={[a.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.',[a.YAML_PARSE_ERROR]:e=>`YAML parse error: ${e}. Check for indentation issues, missing colons, or unquoted special characters.`,[a.NON_FINITE_NUMBER]:(e,t)=>`Invalid number at "${e}": ${t} is not a finite number. JSON, the schemas and the stored configuration have no infinite or not-a-number value, so it cannot be checked or saved. Write a finite number, or leave the key out if it sets no limit.`,[a.SCHEMA_PARSE_ERROR]:(e,t)=>`Invalid value at "${e}": ${t}. Refer to the spec documentation for the expected structure at this path.`,[a.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.`,[a.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.`,[a.MOCK_TEMPLATE_PARSE_ERROR]:e=>`Mock template parse warning: ${e}. The mock template was skipped. Fix the YAML or remove the file.`,[a.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.`,[a.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.`,[a.MISSING_LATEST]:e=>`"${e}.latest" is missing. The "latest" version defines the current working model and is always required. Add "latest:" under "${e}:".`,[a.INVALID_VERSION_KEY]:e=>`"${e}" is not a valid version key. Version keys must be "latest" or "v1", "v2", etc. Rename "${e}".`,[a.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.`,[a.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.`,[a.INVALID_ENTITY_TYPE_NAME]:e=>`"${e}" is not a valid entity type name. Entity types must be PascalCase (e.g. "Product", "KitchenRange"). Rename it.`,[a.DUPLICATE_ENTITY_TYPE]:e=>`Entity type "${e}" is declared more than once. Entity types must be unique. Remove the duplicate.`,[a.INVALID_ALIAS_NAME]:e=>`"${e}" is not a valid alias name. Aliases must be PascalCase (e.g. "RootEntity", "EditableItems"). Rename it.`,[a.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.`,[a.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.',[a.CIRCULAR_ALIAS]:e=>`Circular alias reference: ${e}. An alias cannot reference itself, directly or through other aliases. Remove one reference in the cycle.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.UNKNOWN_PHX_DEFINITION]:(e,t)=>`$ref "${e}" references unknown phoenix type "${t}". Available built-in types include DomainEntityId, Localizable, MultilingualString. Check the spelling.`,[a.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.`,[a.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.`,[a.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.`,[a.MIGRATION_INVALID_START]:e=>`Migration "${e}" starts below v2. v1 is the initial version with no predecessor to migrate from. Remove this file.`,[a.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}.`,[a.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.`,[a.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.`,[a.RESERVED_ALIAS]:e=>`Alias "${e}" is auto-generated and cannot be user-defined. Remove this alias definition.`,[a.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.`,[a.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.`,[a.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.`,[a.PROTECTED_EXPRESSION]:(e,t)=>`Expression "${e}.${t}" is reserved for the built-in common admin spec and cannot be user-defined. Rename this expression.`,[a.PROTECTED_COMMON_TYPE]:e=>`Common type "${e}" is part of the built-in admin model and cannot be user-defined. Choose a different name.`,[a.PROTECTED_ENTITY_TYPE]:e=>`Entity type "${e}" is part of the built-in admin model and cannot be re-declared. Remove it from entityTypes.`,[a.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.`,[a.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.`,[a.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.`,[a.PRESET_MISSING_ROOT_ENTITY]:e=>`Preset declares rootEntityType "${e}" but no entity of that type exists in initialDomainEntities. Add an entity with type "${e}".`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.PRESET_REFERENCE_TYPE_MISMATCH]:(e,t,n,a,s)=>`Preset entity "${e}" references "${n}" from "${t}", but the referenced entity has type "${a}". Allowed target types: ${s.join(", ")}. Use a matching entity ID.`,[a.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.`,[a.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.`,[a.PRESET_COMPOSITION_CYCLE]:e=>`Preset composition contains a cycle at "${e}". Composition must form a tree from the root entity. Remove the cyclic reference.`,[a.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.`,[a.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.`,[a.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".`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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:".`,[a.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.`,[a.COMPONENT_ALIAS_CONFLICT]:(e,t,n,a,s)=>`Component instance "${e}.${t}.${n}" is produced by both "${a}" and "${s}". Component instance names must be unique after alias expansion. Rename one instance or move the shared properties to one declaration.`,[a.COMPONENT_IMPORT_REF_UNSUPPORTED]:(e,t,n,a,s,i)=>`Component prop "${e}.${t}.${n}.${a}" uses unsupported $importRef "${s}#${i}". 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.`,[a.COMPONENT_DATA_REF_UNSUPPORTED]:(e,t,n,a,s,i)=>`Component prop "${e}.${t}.${n}.${a}" combines "$read: ${s}" with the legacy "$data: ${i}" 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 "${s}" with createDataSwatchMap('${i.split(".").at(-1)??i}') in the project's custom expressions.`,[a.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.`,[a.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.`,[a.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.`,[a.INVARIANT_MANUAL_VIOLATIONS_COMPONENT]:e=>`Component "violations" on "${e}" cannot be declared manually because invariant parsing generates it automatically. Remove the manual component declaration.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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}".`,[a.RELATION_FIELD_NOT_REFERENCE]:(e,t,n,a)=>`Relation "${e}.${t}" uses field "${n}" of "${a}", which is not a reference field. A relation reads the ids of its related entities from the field, so the field must be a "phx:DomainEntityId" with "references", such a reference or null, or an array of such references. Declare "${n}" that way in the shape of "${a}" or pick a different field.`,[a.RELATION_FIELD_REFERENCES_OTHER_TYPES]:(e,t,n,a,s,i,o)=>{let r=1===o.length&&o[0]===i?"":` (${o.join(", ")})`;return`Relation "${e}.${t}" uses field "${n}" of "${a}", which references ${s.join(", ")}, but the relation relates to "${i}"${r}. The field of a direct relation must reference exactly the entity types of its target, and the field of an indirect relation exactly the entity types the relation is declared on. Make "${a}.${n}" reference "${i}" or pick a different field.`},[a.RELATION_FIELD_CARDINALITY_MISMATCH]:(e,t,n,a,s,i)=>{let o={single:"one reference that is never null",nullableSingle:"one reference or null",array:"an array of references"};return`Relation "${e}.${t}" has cardinality "${a}", which needs a field that holds ${o[i]}, but "${e}.${n}" holds ${o[s]}. A direct relation with cardinality "1-1" reads one reference that is never null, "0-1" one reference or null, and "0-N" or "1-N" an array of references. Change the cardinality or the schema of "${n}".`},[a.RELATION_MISSING_COUNTERPART]:(e,t,n,a,s,i)=>{let o=void 0!==s?` with field "${s}"`:"",r=i?`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!==s?`, field "${s}"`:""}) 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}`},[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.DUPLICATE_TRANSFORMER]:(e,t)=>`Transformer "${e}" is declared twice in "${t}". Transformer names must be unique within the file. Remove the duplicate entry.`,[a.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.`,[a.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.`}`,[a.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.`,[a.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.`,[a.DUPLICATE_RESOURCE_NAME]:(e,t,n)=>`Resource name "${e}" is used by the entries at index ${t} and ${n} of "resources". A resource name identifies one resource. Rename one of the two entries or remove the duplicate.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.ASSISTANT_MERGE_CONFLICT]:(e,t,n,a)=>`"assistant.${e}.${t}" is declared in both "${n}" and "${a}". The assistant manifest merges across spec files per key, and each key of "assistant.${e}" is taken whole from one file. Move the whole "${t}" entry into one of the files.`,[a.DUPLICATE_ASSISTANT_FIELD]:(e,t,n)=>`"assistant.${e}" is declared in both "${t}" and "${n}". The assistant manifest merges across spec files, but "${e}" can only be declared in one of them. Remove the duplicate.`,[a.ASSISTANT_MISSING_AI]:()=>`"assistant.ai" is required: declare provider (${e.join(", ")}), model (${t.join(", ")}) and reasoning (${n.join(", ")}). The spec declares an "assistant" manifest, but none of its "assistant" blocks says which AI the assistant runs with. Add "ai" to one of them.`,[a.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",screenshots:"take screenshots of"})[e]}. Use an entity type or alias name from "model.latest", or remove the entry.`,[a.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.`,[a.ASSISTANT_UNSUPPORTED_EXPRESSION]:(e,t)=>`"assistant.entities.${e}.${t}" whitelists the "$violations" expression, which the assistant schema does not expose: the agent reads the warnings and notices of every entity type with invariants under its built-in "meta { warnings }", and the violations that make a change fail as its errors. Remove the entry.`,[a.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":""}.`,[a.ASSISTANT_UNKNOWN_RECIPE_GROUP]:({section:e,component:t},n,a,s,i)=>`"assistant.${e}.${n}.${a}" does not name a "${t}" component instance on "${s}", so there are no recipes to expose. ${i.length>0?`"${s}" has these "${t}" instances: ${i.join(", ")}.`:`"${s}" 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.`,[a.ASSISTANT_DUPLICATE_RECIPE_GROUP]:({section:e,mutation:t},n,a,s)=>`"${n}" gets the recipe group id "${a}" from both "assistant.${e}.${s.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".`,[a.ASSISTANT_INVALID_RECIPE_GROUP_ID]:({section:e},t,n,a)=>`"assistant.${e}.${t}.${n}" exposes the recipe group "${a}", but the group id names a field of the assistant schema, which is letters, digits and "_", not starting with a digit or "__". Give the group a valid id with "as".`,[a.ASSISTANT_RECIPE_GROUPS_TYPE_NAME_CONFLICT]:({section:e},t,n)=>`This entry exposes a recipe group on "${t}", so the assistant schema generates the type "${n}" with one field per group, but the model already has an entity type or alias named "${n}". Rename that entity type or alias, or remove every "assistant.${e}" group of "${t}".`,[a.ASSISTANT_META_TYPE_NAME_CONFLICT]:(e,t)=>`This entry exposes a recipe group, the options of a field or a screenshot view 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, every "options" of a writable field and every "assistant.screenshots" view of "${e}".`,[a.ASSISTANT_UNKNOWN_OPTIONS_COMPONENT]:(e,{componentType:t,instanceName:n},a,s)=>`"assistant.writable.${e}.options" names the "${t}" instance "${n}", which "${a}" does not have, so there are no choices to list. ${s.length>0?`"${a}" has these "${t}" instances: ${s.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".`,[a.ASSISTANT_AMBIGUOUS_OPTIONS_COMPONENT]:(e,t,n)=>`"assistant.writable.${e}" takes the choices of the field from the one option component instance that writes it, but several write it on "${t}": ${n.map(({componentType:e,instanceName:t})=>`${e}.${t}`).join(", ")}. The instances may sit on "${t}" itself or on aliases containing it. Name the one whose choices the agent gets with "componentType" and "instanceName" under "options", or set "options: null" to give the field no options.`,[a.ASSISTANT_MISSING_OPTIONS_COMPONENT]:(e,t,n)=>`"assistant.writable.${e}.options" names no component, so it takes the choices of "${n}" from the option component instance that writes the field, but no materialSwatch, attributeSelection or distanceDimensionSelect instance on "${t}" or on an alias containing it writes "${n}" with "$bind" or "$write". Name the component that holds the choices with "componentType" and "instanceName", or remove "options".`,[a.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 built-in of the meta type: the recipe groups edges or the screenshot field. Name the edge differently with "as", e.g. "as: ${n}Choices".`,[a.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.`,[a.ASSISTANT_UNKNOWN_SCREENSHOT_VIEW]:(e,t,n,a)=>`"assistant.screenshots.${e}.${t}" does not name an "agentScreenshot" component instance on "${n}", so there is no view to take a screenshot from. ${a.length>0?`"${n}" has these "agentScreenshot" instances: ${a.join(", ")}.`:`"${n}" has no "agentScreenshot" component.`} Use the instance name of an "agentScreenshot" component attached to the entity type or to an alias containing it, or remove the entry.`,[a.ASSISTANT_UNKNOWN_SCREENSHOT_EXPORT_STATE]:(e,t,n,a)=>`"assistant.screenshots.${e}.${t}" exposes the view "${t}", whose "agentScreenshot" component renders in the export state "${n}", but the spec declares no such export state, so the screenshot could never be taken. The declared export states are: ${a.join(", ")}. Set "exportState" of the component to one of them, or declare "${n}" under "exportStates".`,[a.ASSISTANT_DUPLICATE_SCREENSHOT_VIEW]:(e,t,n)=>`"${e}" gets the screenshot view "${t}" from both "assistant.screenshots.${n.join('" and "assistant.screenshots.')}", but the agent asks for a view of an entity by its name. The entries may come from "${e}" itself or from aliases containing it. Give one of them another name with "as", or remove it.`,[a.ASSISTANT_INVALID_SCREENSHOT_VIEW_NAME]:(e,t,n)=>`"assistant.screenshots.${e}.${t}" exposes the view "${n}", but the agent asks for a view by a GraphQL enum value, which is letters, digits and "_", does not start with a digit and is not "true", "false" or "null". Give the view a valid name with "as".`,[a.ASSISTANT_SCREENSHOT_VIEW_TYPE_NAME_CONFLICT]:(e,t)=>`This entry exposes a screenshot view on "${e}", so the assistant schema generates the enum "${t}" of its views, but the model already has an entity type or alias named "${t}". Rename that entity type or alias, or remove every "assistant.screenshots" view of "${e}".`,[a.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.`,[a.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".`,[a.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.`,[a.ASSISTANT_UNKNOWN_LENS]:(e,t,n)=>`"assistant.entities.${e}" is tagged with the lens "${t}", which is not declared under "assistant.lenses"${n.length>0?`; the declared lenses are: ${n.join(", ")}`:"; the manifest declares no lenses"}. Declare "${t}" under "assistant.lenses" with a "description", or remove the tag.`,[a.ASSISTANT_EMPTY_LENS]:e=>`"assistant.lenses.${e}" is declared, but no entry under "assistant.entities" is tagged with it, so the agent would be offered a lens that selects nothing. Tag the fields and expressions of the lens with "lenses: [${e}]", or remove the lens.`,[a.ASSISTANT_RESERVED_LENS_NAME]:(e,t)=>`"assistant.lenses.${e}" has the name of a built-in lens (${t.join(", ")}), which the assistant schema defines itself. Rename the lens and the tags that name it.`,[a.ASSISTANT_FORM_ELEMENT_BUILT_IN_NAME]:(e,t)=>`"assistant.formElements.${e}" has the name of a built-in form element (${t.join(", ")}), and a project element cannot replace one; restyle a built-in through the theme instead. Rename the element and the name its implementation registers.`,[a.ASSISTANT_FORM_ELEMENT_HTML_NAME]:e=>`"assistant.formElements.${e}" has the name of an HTML element, so form markup that uses it could be read as HTML. Rename the element and the name its implementation registers, e.g. "${e}-field".`,[a.ASSISTANT_FORM_ATTRIBUTE_RESERVED_NAME]:(e,t)=>`"assistant.formElements.${e}.attributes.${t}" declares the built-in attribute "${t}", which every form element takes already as the text the user sees and the name of its answer. Remove the declaration, or rename the attribute if it means something else.`,[a.ASSISTANT_FORM_ELEMENT_UNKNOWN_REQUIRED]:(e,t,n)=>`"assistant.formElements.${e}.required" lists "${t}", which is not one of its declared attributes${n.length>0?` (${n.join(", ")})`:"; the element declares none"}. Declare the attribute under "attributes", or remove it from "required".`,[a.ASSISTANT_FIELD_SHAPE_CONFLICT]:(e,t)=>`The assistant schema exposes "${e}" in shapes that cannot be read together: ${t.map(({typeName:e,type:t})=>`${t} on "${e}"`).join(", ")}. A query that reaches entities of several types, such as "entities" or a lens, selects the field on all of them at once, and in GraphQL a single entity, a list of entities and a plain value cannot share a name. One name meaning different kinds of thing is an unusual model and confuses the assistant as well. Expose one of the entries under another name with "as".`,[a.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".`,[a.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]}".`,[a.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.`,[a.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".`,[a.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.`,[a.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.',[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.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.`,[a.DEFAULTS_UNKNOWN_PROPERTY]:(e,t,n,a)=>{let s=n.length>0?n.join(", "):"(none)",i=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: ${s}.${i} Remove the default or add "${t}" to the shape.`},[a.DEFAULTS_SCHEMA_VIOLATION]:(e,t,n,a,s)=>{let i=s?` (alias member "${s}")`:"",o=n&&"(root)"!==n?` at "${n}"`:"";return`Default "${e}.${t}"${i} does not match the entity shape${o}: ${a}. Defaults must be assignable to their shape property. Fix the value or update the shape.`},[a.DEFAULTS_INCOMPLETE]:(e,t,n)=>{let a=n.some(t=>t!==e)?` (declared under ${n.map(e=>`"${e}"`).join(", ")})`:"";return`Defaults for "${e}"${a} are incomplete: missing ${t.join(", ")}. Defaults for an entity type must state every property of its shape, because the recipe factory validates them as a whole entity when the application loads. Add the missing properties under "${e}" or under an alias that contains it, or remove the defaults for "${e}".`},[a.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.',[a.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.`,[a.COMPONENT_MERGE_CONFLICT]:(e,t,n,a,s)=>`Component instance "${e}.${t}.${n}" is defined in both "${a}" and "${s}". Each component instance can only appear in one file. Remove the duplicate.`,[a.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.`,[a.READ_BINDING_UNKNOWN_FIELD]:(e,t,n,a,s)=>`$read binding "${a}" in "${e}.${t}.${n}" references field "${s}" which does not exist in the shape of "${e}". Add "${s}" to the shape or fix the $read target.`,[a.COMPONENT_BINDING_TYPE_MISMATCH]:(e,t,n,a)=>`"${t}" at "${e}" reads a value of type ${n}, but the component expects ${a} there, so the generated code would not type-check. Read a field whose type fits, change the field's type, or compute the value in an expression.`,[a.COMPONENT_STATIC_ENTITY_ID]:(e,t,n)=>`"${e}" holds the value ${t} written in the spec, but the component expects ${n} there. An entity id is a branded type, so no value written in YAML is one and the generated code would not type-check. Read the id from the domain state with "$read" or "$bind" of a field or expression that holds it.`,[a.EXPRESSION_READ_TYPE_CONFLICT]:(e,t,n,a)=>`Expression "${t}" of "${e}" ${void 0===n?"":`is declared as ${n} and `}is read where components expect ${a.join(", and ")}. No value is of all these types, so its implementation cannot type-check. Read the expression only where its type fits, declare the type the components expect, or read another expression there.`,[a.EXPRESSION_VALUE_TYPE_MISMATCH]:(e,t,n)=>`Expression "${e}" holds a value of type ${t}, but its schema declares ${n}, so the generated code would not type-check. A "$msg" is a message descriptor: declare the expression as "$ref: phx:Localizable" or "$ref: phx:MessageDescriptor", or change the value.`,[a.WRITE_BINDING_UNKNOWN_FIELD]:(e,t,n,a,s)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets field "${s}" which does not exist in the shape of "${e}". Add "${s}" to the shape or fix the target.`,[a.WRITE_BINDING_IMMUTABLE_FIELD]:(e,t,n,a,s)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets implicit field "${s}". Implicit fields "id" and "type" are immutable and cannot be changed. Use $read to consume the field or choose a writable shape field.`,[a.WRITE_BINDING_EXPRESSION_TARGET]:(e,t,n,a,s)=>`$write/$bind "${a}" in "${e}.${t}.${n}" targets "${s}" which is an expression. Write targets must be entity shape fields, not expressions. Use $read for expression bindings, $write/$bind for shape fields.`,[a.WRITE_BINDING_DUPLICATE_TARGET]:(e,t,n,a,s,i)=>`Entity field "${a}" is written by both "${s}" and "${i}" in "${e}.${t}.${n}". Each entity field can only be written by one component property. Remove one of the bindings.`,[a.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.`,[a.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 "_".`,[a.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.",[a.AUTH_WITHOUT_PROJECT_WEBHOOK]:()=>'Authentication is enabled through "useAuthHook" or "useClerk", but src/webhooks/index.ts is missing. The built-in webhook handles anonymous authentication only; it does not provide Clerk or custom auth handlers. Create src/webhooks/index.ts with a default export of your webhook handler and the required auth handlers, or disable the auth settings if they are unintended.',[a.MODULE_ANALYSIS_FAILED]:(e,t)=>`Cannot analyze module "${e}": ${t}. Fix the file's syntax so its imports and webhook membership can be determined.`,[a.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.`,[a.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.',[a.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.',[a.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.`,[a.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,6 +1,6 @@
1
- import{GeneratedApplicationFile as e}from"../../core/index.js";import{followsCanaryBuilds as r,generateApplicationSpecEslintConfig as t,generateApplicationSpecFavicon as i,generateApplicationSpecGitignore as n,generateApplicationSpecPrettierConfig as a,generateApplicationSpecRobotsTxt as o,generateApplicationSpecRootTsconfig as l,generateApplicationSpecTsconfig as s,generateLinguiRcFile as c,generatePhoenixCliSkill as f,generatePhoenixCreateConfiguratorSkill as p,generatePhoenixCreateConfiguratorSkillReferences as d,generatePhoenixFeedbackSkill as m,generatePhoenixReviewSkill as g,generatePhoenixSkill as h,generatePhoenixVariantsSkill as u,stripSdkMarkerContent as j}from"./templates/index.js";export const agentSkillRoots=[".claude/skills",".agents/skills"];let x=[{path:"CLAUDE.md",generatedPrefix:""},{path:".cursor/rules/phoenix.mdc",generatedPrefix:`---
1
+ import{GeneratedApplicationFile as e}from"../../core/index.js";import{followsCanaryBuilds as i,generateApplicationSpecEslintConfig as r,generateApplicationSpecFavicon as t,generateApplicationSpecGitignore as a,generateApplicationSpecPrettierConfig as o,generateApplicationSpecRobotsTxt as n,generateApplicationSpecRootTsconfig as l,generateApplicationSpecTsconfig as s,generateLinguiRcFile as c,generatePhoenixSkillBundle as d,stripSdkMarkerContent as f}from"./templates/index.js";export const agentSkillRoots=[".claude/skills",".agents/skills"];let p=[{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
- `}],P=[".claude/commands/review.md",".cursor/commands/review.md"],v=(e,r)=>e.projectFiles.find(e=>e.file.name===r)?.file.content;export const generateProjectScaffolding=F=>{let E,G,{applicationSpec:b,categorizedFiles:k,sdkVersion:w,projectInGitRepository:L=!0,cliUseWorkspace:S}=F,$=v(k,".gitignore"),y=void 0!==S?S:b.appMetadata.workspace,C=(r=>{let t=[],i=[...P];for(let{path:n,generatedPrefix:a}of x){let o=v(r,n);if(void 0===o)continue;let l=j(o,a);void 0===l?i.push(n):l!==o&&t.push(e(n,l,{format:!1}))}return{strippedFiles:t,removedFiles:i}})(k),M={generatedProjectFiles:(E=[{file:e("tsconfig.json",l()),hasEarlierGenerated:k.hasEarlierGeneratedTsconfig},{file:e("eslint.config.js",t()),hasEarlierGenerated:k.hasEarlierGeneratedEslintConfig},{file:e("prettier.config.js",a()),hasEarlierGenerated:k.hasEarlierGeneratedPrettierConfig}]).filter(e=>e.hasEarlierGenerated).map(e=>e.file),initialProjectFiles:E.filter(e=>!e.hasEarlierGenerated).map(e=>e.file)};return{phoenixFiles:[e("tsconfig.json",s()),e(".linguirc",c(b.configurator.ui.availableLocales),{format:!1})],generatedProjectFiles:[...M.generatedProjectFiles,...L?[e(".gitignore",n($))]:[],...(G=[{name:"phoenix",content:h({checkLatestCanary:r({useWorkspace:y,sdkVersion:w})}),references:[]},{name:"phoenix-cli",content:f(),references:[]},{name:"phoenix-create-configurator",content:p(),references:d()},{name:"phoenix-feedback",content:m(),references:[]},{name:"phoenix-review",content:g(),references:[]},{name:"phoenix-variants",content:u(),references:[]}],agentSkillRoots.flatMap(r=>G.flatMap(t=>[e(`${r}/${t.name}/SKILL.md`,t.content),...t.references.map(i=>e(`${r}/${t.name}/${i.path}`,i.content))]))),...C.strippedFiles],initialProjectFiles:[...M.initialProjectFiles,e("public/favicon.ico",i(),{binary:!0}),e("public/robots.txt",o(),{format:!1})],removedProjectFiles:C.removedFiles}};
6
+ `}],g=[".claude/commands/review.md",".cursor/commands/review.md"],m=(e,i)=>e.projectFiles.find(e=>e.file.name===i)?.file.content;export const generateProjectScaffolding=h=>{let u,j,{applicationSpec:x,categorizedFiles:P,sdkVersion:F,projectInGitRepository:E=!0,cliUseWorkspace:v}=h,G=m(P,".gitignore"),b=void 0!==v?v:x.appMetadata.workspace,k=(i=>{let r=[],t=[...g];for(let{path:a,generatedPrefix:o}of p){let n=m(i,a);if(void 0===n)continue;let l=f(n,o);void 0===l?t.push(a):l!==n&&r.push(e(a,l,{format:!1}))}return{strippedFiles:r,removedFiles:t}})(P),L={generatedProjectFiles:(u=[{file:e("tsconfig.json",l()),hasEarlierGenerated:P.hasEarlierGeneratedTsconfig},{file:e("eslint.config.js",r()),hasEarlierGenerated:P.hasEarlierGeneratedEslintConfig},{file:e("prettier.config.js",o()),hasEarlierGenerated:P.hasEarlierGeneratedPrettierConfig}]).filter(e=>e.hasEarlierGenerated).map(e=>e.file),initialProjectFiles:u.filter(e=>!e.hasEarlierGenerated).map(e=>e.file)};return{phoenixFiles:[e("tsconfig.json",s()),e(".linguirc",c(x.configurator.ui.availableLocales),{format:!1})],generatedProjectFiles:[...L.generatedProjectFiles,...E?[e(".gitignore",a(G))]:[],...(j=d({checkLatestCanary:i({useWorkspace:b,sdkVersion:F})}),agentSkillRoots.flatMap(i=>[e(`${i}/phoenix/SKILL.md`,j.content),...j.references.map(r=>e(`${i}/phoenix/${r.path}`,r.content))])),...k.strippedFiles],initialProjectFiles:[...L.initialProjectFiles,e("public/favicon.ico",t(),{binary:!0}),e("public/robots.txt",n(),{format:!1})],removedProjectFiles:k.removedFiles}};
@@ -37,12 +37,8 @@ export { generateApplicationSpecGlobals } from './globals.js';
37
37
  export { generateApplicationSpecHtmlAdminIndex } from './html-admin-index.js';
38
38
  export { generateApplicationSpecHtmlIndex } from './html-index.js';
39
39
  export { generateLinguiRcFile } from './lingui-rc.js';
40
- export { generatePhoenixCliSkill } from './skills/phoenix-cli-skill.js';
41
- export { generatePhoenixCreateConfiguratorSkill, generatePhoenixCreateConfiguratorSkillReferences, } from './skills/phoenix-create-configurator-skill.js';
42
- export { generatePhoenixFeedbackSkill } from './skills/phoenix-feedback-skill.js';
43
- export { generatePhoenixReviewSkill } from './skills/phoenix-review-skill.js';
44
- export { type PhoenixSkillOptions, followsCanaryBuilds, generatePhoenixSkill } from './skills/phoenix-skill.js';
45
- export { generatePhoenixVariantsSkill } from './skills/phoenix-variants-skill.js';
40
+ export { generatePhoenixSkillBundle } from './skills/phoenix-skill-bundle.js';
41
+ export { type PhoenixSkillOptions, followsCanaryBuilds } from './skills/phoenix-skill.js';
46
42
  export { generateApplicationSpecPrettierConfig } from './prettier-config.js';
47
43
  export { generateApplicationSpecRobotsTxt } from './robots-txt.js';
48
44
  export { generateApplicationSpecRootTsconfig } from './root-tsconfig.js';
@@ -1 +1 @@
1
- export{stripSdkMarkerContent}from"./common/strip-sdk-marker-content.js";export{generateApplicationSpecAdminConfig}from"./admin-config.js";export{generateApplicationSpecAdminCode}from"./admin-domain-code.js";export{generateApplicationSpecAdminFrontendCode}from"./admin-frontend-code.js";export{generateAdminGlobalBindingBlock,generateApplicationSpecAdminGlobals}from"./admin-globals.js";export{generateApplicationSpecTypesModule}from"./application-types.js";export{generateApplicationSpecAdminFile}from"./admin.js";export{generateApplicationSpecConfiguratorConfig}from"./configurator-config.js";export{generateApplicationSpecConfiguratorCode}from"./configurator-domain-code.js";export{generateApplicationSpecConfiguratorFrontendCode}from"./configurator-frontend-code.js";export{generateApplicationSpecConfiguratorGlobals,generateConfiguratorGlobalBindingBlock}from"./configurator-globals.js";export{generateApplicationSpecConfiguratorFile}from"./configurator.js";export{generateApplicationSpecDomainSpecFile}from"./domain-spec.js";export{generateImportedStateConstants,generatePhxExportsBlock,generatePhxGlobalsBlock,generateStateConstants}from"./domain-spec/index.js";export{generateApplicationSpecDomainFile}from"./domain.js";export{generateApplicationSpecEditorFile}from"./editor.js";export{generateApplicationSpecEmbeddedAdmin}from"./embedded-admin.js";export{generateApplicationSpecEmbeddedConfigurator}from"./embedded-configurator.js";export{generateApplicationSpecEslintConfig}from"./eslint-config.js";export{generateApplicationSpecFavicon}from"./favicon.js";export{generateApplicationSpecFrontendConfig}from"./frontend-config.js";export{generateApplicationSpecGitignore}from"./gitignore.js";export{generateApplicationSpecGlobals}from"./globals.js";export{generateApplicationSpecHtmlAdminIndex}from"./html-admin-index.js";export{generateApplicationSpecHtmlIndex}from"./html-index.js";export{generateLinguiRcFile}from"./lingui-rc.js";export{generatePhoenixCliSkill}from"./skills/phoenix-cli-skill.js";export{generatePhoenixCreateConfiguratorSkill,generatePhoenixCreateConfiguratorSkillReferences}from"./skills/phoenix-create-configurator-skill.js";export{generatePhoenixFeedbackSkill}from"./skills/phoenix-feedback-skill.js";export{generatePhoenixReviewSkill}from"./skills/phoenix-review-skill.js";export{followsCanaryBuilds,generatePhoenixSkill}from"./skills/phoenix-skill.js";export{generatePhoenixVariantsSkill}from"./skills/phoenix-variants-skill.js";export{generateApplicationSpecPrettierConfig}from"./prettier-config.js";export{generateApplicationSpecRobotsTxt}from"./robots-txt.js";export{generateApplicationSpecRootTsconfig}from"./root-tsconfig.js";export{generateApplicationSpecStoryDevDeclaration,generateApplicationSpecStoryPhxModule,generateApplicationSpecStoryRawProjectFiles,generateApplicationSpecStoryWrapper}from"./story/index.js";export{generateApplicationSpecCodeFile}from"./spec-code/index.js";export{generateApplicationSpecMessagesFile}from"./spec-messages/index.js";export{generateApplicationSpecTsconfig}from"./tsconfig.js";export{generateApplicationSpecWebhookBuilders}from"./webhook-builders.js";export{generateApplicationSpecWebhookIndex}from"./webhook-index.js";export{generateApplicationSpecWebhooksConfig}from"./webhooks-config.js";
1
+ export{stripSdkMarkerContent}from"./common/strip-sdk-marker-content.js";export{generateApplicationSpecAdminConfig}from"./admin-config.js";export{generateApplicationSpecAdminCode}from"./admin-domain-code.js";export{generateApplicationSpecAdminFrontendCode}from"./admin-frontend-code.js";export{generateAdminGlobalBindingBlock,generateApplicationSpecAdminGlobals}from"./admin-globals.js";export{generateApplicationSpecTypesModule}from"./application-types.js";export{generateApplicationSpecAdminFile}from"./admin.js";export{generateApplicationSpecConfiguratorConfig}from"./configurator-config.js";export{generateApplicationSpecConfiguratorCode}from"./configurator-domain-code.js";export{generateApplicationSpecConfiguratorFrontendCode}from"./configurator-frontend-code.js";export{generateApplicationSpecConfiguratorGlobals,generateConfiguratorGlobalBindingBlock}from"./configurator-globals.js";export{generateApplicationSpecConfiguratorFile}from"./configurator.js";export{generateApplicationSpecDomainSpecFile}from"./domain-spec.js";export{generateImportedStateConstants,generatePhxExportsBlock,generatePhxGlobalsBlock,generateStateConstants}from"./domain-spec/index.js";export{generateApplicationSpecDomainFile}from"./domain.js";export{generateApplicationSpecEditorFile}from"./editor.js";export{generateApplicationSpecEmbeddedAdmin}from"./embedded-admin.js";export{generateApplicationSpecEmbeddedConfigurator}from"./embedded-configurator.js";export{generateApplicationSpecEslintConfig}from"./eslint-config.js";export{generateApplicationSpecFavicon}from"./favicon.js";export{generateApplicationSpecFrontendConfig}from"./frontend-config.js";export{generateApplicationSpecGitignore}from"./gitignore.js";export{generateApplicationSpecGlobals}from"./globals.js";export{generateApplicationSpecHtmlAdminIndex}from"./html-admin-index.js";export{generateApplicationSpecHtmlIndex}from"./html-index.js";export{generateLinguiRcFile}from"./lingui-rc.js";export{generatePhoenixSkillBundle}from"./skills/phoenix-skill-bundle.js";export{followsCanaryBuilds}from"./skills/phoenix-skill.js";export{generateApplicationSpecPrettierConfig}from"./prettier-config.js";export{generateApplicationSpecRobotsTxt}from"./robots-txt.js";export{generateApplicationSpecRootTsconfig}from"./root-tsconfig.js";export{generateApplicationSpecStoryDevDeclaration,generateApplicationSpecStoryPhxModule,generateApplicationSpecStoryRawProjectFiles,generateApplicationSpecStoryWrapper}from"./story/index.js";export{generateApplicationSpecCodeFile}from"./spec-code/index.js";export{generateApplicationSpecMessagesFile}from"./spec-messages/index.js";export{generateApplicationSpecTsconfig}from"./tsconfig.js";export{generateApplicationSpecWebhookBuilders}from"./webhook-builders.js";export{generateApplicationSpecWebhookIndex}from"./webhook-index.js";export{generateApplicationSpecWebhooksConfig}from"./webhooks-config.js";
@@ -0,0 +1,10 @@
1
+ import { type AgentSkillReference } from './agent-skill.js';
2
+ import { type PhoenixSkillOptions } from './phoenix-skill.js';
3
+ /** The discoverable entry point and the documents it ships beside it. */
4
+ interface PhoenixSkillBundle {
5
+ readonly content: string;
6
+ readonly references: readonly AgentSkillReference[];
7
+ }
8
+ /** Keeps the existing generators as content owners while changing only discovery and relative routing. */
9
+ export declare const generatePhoenixSkillBundle: (options: PhoenixSkillOptions) => PhoenixSkillBundle;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import{renderAgentSkill as e}from"./agent-skill.js";import{generatePhoenixCliSkill as t}from"./phoenix-cli-skill.js";import{generatePhoenixCreateConfiguratorSkill as n,generatePhoenixCreateConfiguratorSkillReferences as r}from"./phoenix-create-configurator-skill.js";import{generatePhoenixFeedbackSkill as i}from"./phoenix-feedback-skill.js";import{generatePhoenixReviewSkill as o}from"./phoenix-review-skill.js";import{generatePhoenixSkill as a}from"./phoenix-skill.js";import{generatePhoenixVariantsSkill as s}from"./phoenix-variants-skill.js";let l=(e,t,n)=>n.reduce((e,n)=>{let r="../".repeat(t.split("/").length-2),i=`[${n.title}](${r}${n.path.slice(11)})`;return e.replaceAll(`\`${n.name}\` skill`,i).replaceAll(`${n.name} skill`,i)},e),c=e=>{let t="\n---\n\n",n=e.content.indexOf(t),r=e.content.slice(0,n).split("\n").find(e=>e.startsWith("description: "));if(-1===n||void 0===r)throw Error(`Cannot emit the ${e.name} guide: its skill frontmatter is missing. Render it with renderAgentSkill.`);return{description:r.slice(13),body:e.content.slice(n+t.length)}};export const generatePhoenixSkillBundle=h=>{let p=[{name:"phoenix",title:"Project guidance",path:"references/project.md",content:a(h),references:[]},{name:"phoenix-create-configurator",title:"Configurator workflow",path:"references/create-configurator/guide.md",content:n(),references:r()},{name:"phoenix-cli",title:"CLI guide",path:"references/cli.md",content:t(),references:[]},{name:"phoenix-review",title:"Code review guide",path:"references/review.md",content:o(),references:[]},{name:"phoenix-variants",title:"Variants guide",path:"references/variants.md",content:s(),references:[]},{name:"phoenix-feedback",title:"Feedback guide",path:"references/feedback.md",content:i(),references:[]}];return{content:e({name:"phoenix",description:"Build, change, inspect, deploy or review a Phoenix configurator project. Use for Phoenix project work, visual alternatives, and platform feedback.",sections:[`# Phoenix
2
+
3
+ Load the guides for the work in hand before doing that work. Several may apply. Follow their existing instructions; this entry point only routes to them. Reuse guidance already read in the conversation unless sync or an SDK update changed it.`,`## Choose the relevant guidance
4
+
5
+ | When | Read |
6
+ | --- | --- |
7
+ ${p.map(e=>`| ${c(e).description} | [${e.title}](${e.path}) |`).join("\n")}`,"The workflow guide links to product discovery, asset conversion, UX guidance and appearance review at the stages that use them. An isolated code fix needs project guidance and the applicable CLI/review guides; it does not restart the configurator workflow.\n\nEarlier Phoenix skill names refer to these guides: ask for the same task through `phoenix`. Read linked documents when their task applies, not the whole reference tree."]}),references:p.flatMap(e=>[{path:e.path,content:l(c(e).body,e.path,p)},...e.references.map(t=>{let n=`${e.path.slice(0,e.path.lastIndexOf("/")+1)}${t.path}`;return{path:n,content:l(t.content,n,p)}})])}};
@@ -1 +1 @@
1
- import{renderAgentSkill as e}from"./agent-skill.js";import{sdkGuidanceSections as t}from"./sdk-content.js";export const followsCanaryBuilds=e=>!e.useWorkspace&&e.sdkVersion.includes("-develop.");export const generatePhoenixSkill=({checkLatestCanary:n})=>e({name:"phoenix",description:`Phoenix SDK project conventions, covering project structure, architecture principles, key patterns, file and export rules, webhook membership, versioning the domain model once it is deployed, showing the user the dev preview and the build of a deploy, the run evaluation that follows a live deploy, inspecting the rendered result, and how to search the SDK documentation${n?", and the internal-beta check for the latest canary SDK build":""}. Use before writing or changing specs or source code, or deploying this Phoenix configurator project.`,sections:[t.packageManager,...n?["## Stay on the Latest Canary\nDuring the internal beta this project uses the `canary` build of the SDK, which is published from every change to the platform. Once per conversation, before you change anything, compare the installed version, the `version` in `node_modules/@salsita-ai/sdk/package.json`, with the newest canary:\n```bash\nnpm view @salsita-ai/sdk@canary version\n```\nWhen they differ, tell the user which version you are moving to, then update the SDK, bring the packages it needs next to it in line, and regenerate the project's files:\n```bash\npnpm add @salsita-ai/sdk@canary && pnpm phoenix deps && pnpm install && pnpm phoenix sync\n```\n`sync` rewrites the Phoenix skills, so read the ones you use again after it. When the user runs a globally installed `phoenix`, update that too with `npm install -g @salsita-ai/sdk@canary`. If the project no longer builds after the update, stop and tell the user; the `phoenix-feedback` skill covers reporting it."]:[],t.projectStructure,t.architecturePrinciples,t.keyPatterns,t.fileConventions,t.exportRules,t.webhookMembership,t.doNotEdit,t.modelVersioning,"## Show the Preview While You Work\nThe user should see the configurator change as you build it. Before your first change in a conversation, make sure `pnpm phoenix dev` is running (start it in the background when it is not) and open the address it prints as `Preview: <url>` (also written to `.phoenix/phoenix-dev.log`) in the user's browser: `open '<url>'` on macOS, `xdg-open '<url>'` on Linux, `Start-Process '<url>'` in PowerShell, `start \"\" \"<url>\"` in cmd. Keep the quotes, the shell would otherwise read a `?` in the address as a pattern. The log keeps the lines of earlier runs, so when you have just started dev, wait for the `Preview:` line written after your start and use the last one. Open it once; the preview reloads on every change, so tell the user to keep that tab open instead of opening it again.",t.visualInspection,"## Show the Build After a Deploy\nImmediately before invoking `pnpm phoenix deploy`, refresh `conversation.log` in the project root with the current conversation. Prefer the agent application's native session export when available; do not invent an export command or scan unrelated sessions. Otherwise write the messages still available in context and label the log `reconstructed; incomplete`. Never present a compaction summary as verbatim earlier messages.\n\nUse UTF-8 text with a header naming the agent, export time, source (native export or reconstructed), covered session and known omissions. Preserve user and assistant messages in chronological order, plus tool names, arguments and results when available. Keep each tool result to at most 16 KiB of text, marking truncation explicitly; describe image attachments by reference rather than embedding binary/base64 data, and mark references whose files are not uploaded. Exclude internal instructions, hidden reasoning, credentials and unrelated sensitive content; mark redactions without repeating the removed content. Refresh the current session's log rather than appending duplicate copies or silently carrying over a previous session.\n\nShow the user the exact file to review or redact and obtain approval to include it before deploying; do not ask again when they have already approved that file. If they decline, move it out of the project root before deployment so it cannot be collected. Deploy includes the file in the build's private source archive, downloadable by those authorized to download that build's sources, and leaves it out when extracting build inputs. A missing log warns but does not block deployment. The CLI does not export, redact or validate the transcript's completeness for you.\n\n`pnpm phoenix deploy` starts a build on the server and waits for it to go live. Right after `Build <id> started` it prints `Follow the build in Studio: <url>`. Run the deploy so that you can read its output while it runs, and open that link in the user's browser, quoted as above, as soon as it appears, so they can follow the build they just triggered. When the line is missing, the sign-in is older than the link: tell the user the build is listed under Deployments in Studio, and that `pnpm phoenix login <workspace>` brings the link back.\n\nWhen the deploy reports the configurator live, load the `phoenix-feedback` skill before you write your final message and follow its \"Evaluate the Run\" section, so the user is asked about the run while they are still there. It is asked once per conversation, and only once the user has nothing more to build.","## Code Review\nUse the `phoenix-review` skill to review code changes before committing.",t.sdkDocumentation]});
1
+ import{renderAgentSkill as e}from"./agent-skill.js";import{sdkGuidanceSections as t}from"./sdk-content.js";export const followsCanaryBuilds=e=>!e.useWorkspace&&e.sdkVersion.includes("-develop.");export const generatePhoenixSkill=({checkLatestCanary:n})=>e({name:"phoenix",description:`Phoenix SDK project conventions, covering project structure, architecture principles, key patterns, file and export rules, webhook membership, versioning the domain model once it is deployed, showing the user the dev preview and the build of a deploy, the run evaluation that follows a live deploy, inspecting the rendered result, and how to search the SDK documentation${n?", and the internal-beta check for the latest canary SDK build":""}. Use before writing or changing specs or source code, or deploying this Phoenix configurator project.`,sections:[t.packageManager,...n?["## Stay on the Latest Canary\nDuring the internal beta this project uses the `canary` build of the SDK, which is published from every change to the platform. Once per conversation, before you change anything, compare the installed version, the `version` in `node_modules/@salsita-ai/sdk/package.json`, with the newest canary:\n```bash\nnpm view @salsita-ai/sdk@canary version\n```\nWhen they differ, tell the user which version you are moving to, then update the SDK, bring the packages it needs next to it in line, and regenerate the project's files:\n```bash\npnpm add @salsita-ai/sdk@canary && pnpm phoenix deps && pnpm install && pnpm phoenix sync\n```\n`sync` rewrites the Phoenix skills, so read the ones you use again after it. When the user runs a globally installed `phoenix`, update that too with `npm install -g @salsita-ai/sdk@canary`. If the project no longer builds after the update, stop and tell the user; the `phoenix-feedback` skill covers reporting it."]:[],t.projectStructure,t.architecturePrinciples,t.keyPatterns,t.fileConventions,t.exportRules,t.webhookMembership,t.doNotEdit,t.modelVersioning,"## Show the Preview While You Work\nThe user should see the configurator change as you build it. Before your first change in a conversation, make sure `pnpm phoenix dev` is running (start it in the background when it is not) and open the address it prints as `Preview: <url>` (also written to `.phoenix/phoenix-dev.log`) in the user's browser: `open '<url>'` on macOS, `xdg-open '<url>'` on Linux, `Start-Process '<url>'` in PowerShell, `start \"\" \"<url>\"` in cmd. Keep the quotes, the shell would otherwise read a `?` in the address as a pattern. The log keeps the lines of earlier runs, so when you have just started dev, wait for the `Preview:` line written after your start and use the last one. Open it once; the preview reloads on every change, so tell the user to keep that tab open instead of opening it again. A domain model change is the exception: `pnpm phoenix dev` registers the model with the server only when it starts, and after the change it logs an error that asks for a restart. Restart it, wait for the new `Preview:` line and open that address in place of the old tab, whose address carries the `?cid=` of a configuration saved with the earlier model, which the new model rejects.",t.visualInspection,"## Show the Build After a Deploy\nImmediately before invoking `pnpm phoenix deploy`, refresh `conversation.log` in the project root with the current conversation. Prefer the agent application's native session export when available; do not invent an export command or scan unrelated sessions. Otherwise write the messages still available in context and label the log `reconstructed; incomplete`. Never present a compaction summary as verbatim earlier messages.\n\nUse UTF-8 text with a header naming the agent, export time, source (native export or reconstructed), covered session and known omissions. Preserve user and assistant messages in chronological order, plus tool names, arguments and results when available. Keep each tool result to at most 16 KiB of text, marking truncation explicitly; describe image attachments by reference rather than embedding binary/base64 data, and mark references whose files are not uploaded. Exclude internal instructions, hidden reasoning, credentials and unrelated sensitive content; mark redactions without repeating the removed content. Refresh the current session's log rather than appending duplicate copies or silently carrying over a previous session.\n\nShow the user the exact file to review or redact and obtain approval to include it before deploying; do not ask again when they have already approved that file. If they decline, move it out of the project root before deployment so it cannot be collected. Deploy includes the file in the build's private source archive, downloadable by those authorized to download that build's sources, and leaves it out when extracting build inputs. A missing log warns but does not block deployment. The CLI does not export, redact or validate the transcript's completeness for you.\n\n`pnpm phoenix deploy` starts a build on the server and waits for it to go live. Right after `Build <id> started` it prints `Follow the build in Studio: <url>`. Run the deploy so that you can read its output while it runs, and open that link in the user's browser, quoted as above, as soon as it appears, so they can follow the build they just triggered. When the line is missing, the sign-in is older than the link: tell the user the build is listed under Deployments in Studio, and that `pnpm phoenix login <workspace>` brings the link back.\n\nWhen the deploy reports the configurator live, load the `phoenix-feedback` skill before you write your final message and follow its \"Evaluate the Run\" section, so the user is asked about the run while they are still there. It is asked once per conversation, and only once the user has nothing more to build.","## Code Review\nUse the `phoenix-review` skill to review code changes before committing.",t.sdkDocumentation]});
@@ -54,7 +54,7 @@ Without a lockfile, use the package manager the \`packageManager\` field of \`pa
54
54
  - \`AppLoaderContent\`: \`phx.frontend.createAppLoader(({ phases }) => …)\` replaces what the loading overlay shows (each phase \`{ id, label?, progress? }\`, the list possibly empty); Phoenix keeps the overlay itself
55
55
  - Assistant form elements: an element declared under \`assistant.formElements\` (\`description\`, \`role\`, scalar \`attributes\` beside the built-in \`label\`, a \`value\` included, \`required\`) is the default export \`phx.frontend.createAssistantFormElement('name', Component)\` of one file; the name types the component's props by its role (\`AssistantFormElementProps<'name'>\`): an option reports its answer with \`onSelect(answer)\`, an input with \`onChange(state, answer)\`; and the application does not start while a declared element has no registration or a registration no declaration
56
56
  - \`src/handlers/\` — Event & lifecycle handlers
57
- - \`src/webhooks/\` — Server-side webhook handlers (\`phx.webhooks.*Builder\`); the webhook is the default export of \`src/webhooks/index.ts\`, which you create when the project needs its own handlers — without it the build uses a built-in inert webhook that answers only anonymous auth, so create the file before setting \`useAuthHook\` or \`useClerk\`
57
+ - \`src/webhooks/\` — Server-side webhook handlers (\`phx.webhooks.*Builder\`); the webhook is the default export of \`src/webhooks/index.ts\`, which you create when the project needs its own handlers. Without it, generation continues with a built-in webhook that answers only anonymous auth; enabling \`useAuthHook\` or \`useClerk\` reports \`AUTH_WITHOUT_PROJECT_WEBHOOK\`. Add the entry with the required Clerk or custom auth handlers, or disable unintended auth settings
58
58
  - \`src/migrations/\` — Schema version migrations (v*.ts)
59
59
  - \`src/locales/\` — Locale catalogs (authored .po sources; compiled .ts, do not edit)
60
60
  - \`src/admin/\` — Admin interface (mirrors main src/ structure)
@@ -1,4 +1,4 @@
1
- export const sdkGuidanceSections={packageManager:"## Package Manager\nThe project installs with its own package manager, and the commands in this skill are written for pnpm. Run them through the package manager the project uses, which the lockfile in the project root names:\n- `pnpm-lock.yaml`: `pnpm phoenix <command>`, `pnpm install`, `pnpm add <package>`\n- `package-lock.json`: `npx phoenix <command>`, `npm install`, `npm install <package>`\n- `yarn.lock`: `yarn phoenix <command>`, `yarn install`, `yarn add <package>`\n- `bun.lock` or `bun.lockb`: `bunx phoenix <command>`, `bun install`, `bun add <package>`\n\nWithout a lockfile, use the package manager the `packageManager` field of `package.json` names, or ask the user.",buildCommands:"## Build Commands\n- `pnpm phoenix build` — Full production build\n- `pnpm phoenix dev` — Development mode with hot reload\n- `pnpm phoenix sync` — Sync generated files without full build\n- `pnpm phoenix deps` — Add the SDK's missing peer dependencies to `package.json` and move out-of-range ones into the SDK's range; it installs nothing, so install after it",devLogs:"## Dev Logs\n- `pnpm phoenix dev` writes all logs to `.phoenix/phoenix-dev.log`\n- Contains: spec parse errors, build errors, browser runtime errors, file watcher events\n- After making changes, always check the log for errors: `tail -50 .phoenix/phoenix-dev.log` or `grep ERROR .phoenix/phoenix-dev.log`\n- Rotated automatically at 10MB (`.log.1`, `.log.2` are older rotations)",projectStructure:"## Project Structure\n- `spec/` — Domain YAML specs (entities, relations, expressions, invariants, components, application config)\n- `src/expressions/` — Computed/derived entity properties (`phx.domain.implementCustomExpressions()`)\n- `src/actions/` — Domain operations declared under `actions:` in the spec (`phx.domain.implementActions()`), run by controls and exposed to the assistant\n- `src/invariants/` — Business rule constraints (`phx.domain.implementCustomInvariants()`)\n- `src/transformers/` — Automatic state fixers (`phx.frontend.transformerBuilder`)\n- `src/components/` — ECS system components (`phx.domain.attachComponent.withEntity()`)\n- `src/elements/` — Page-level React components (`phx.frontend.createCustomPhoenixLayoutElement()`)\n - `ConfiguratorLayout`: a layout element with this name replaces everything the built-in layout renders for a loaded configuration, in owner and read mode, finalization included. Prefer arranging the spec's layout components; write one for shell-level changes, such as moving the sidebar or adding an area the built-in layout has no place for\n - Mount `LayoutSlots.SharedCanvas` (from `@salsita-ai/sdk/configurator`) in a positioned root covering the page; put the UI above it, positioned and after it in the markup. With the canvas mounted the app loader waits until the scene has loaded; a layout without a canvas is not held by the loader. Call `phx.frontend.useSceneSafeArea()` and put `containerRef` on the element covering the whole canvas and `safeAreaRef` on the region the UI leaves free, with `pointerEvents: 'none'`, so the camera frames the scene there\n - Sidebar moved, contents as the spec configures them: mount `LayoutSlots.DesktopSidebar` in a positioned container that sets its size, with `side=\"start\"` on the left; `docs/layouts/sidebar/in-a-custom-layout.mdx` is the whole layout\n - Your own UI: \"Hooks for a Project Layout\" in `docs/phoenix/configurator-interface.mdx` lists the hooks with what each returns (`pnpm phoenix docs -r docs/phoenix/configurator-interface.mdx`), `docs/phoenix/layout-slots.mdx` the built-in pieces you can still mount, and `docs/layouts/custom-layout.mdx` is a worked example. Call the hooks as `phx.frontend.useX()`; besides those below, these are often needed: `usePreview()` (`isPreview` while the preview start screen shows), `useCloseAction()` (the host's close action or `null`), `useActiveViewports()` (the container's breakpoints, `null` until measured, `desktop` above 768 px: the desktop/phone switch), `useResolveLocalizable()` and `useLocalizable(text)` (spec texts to strings), `useIsCloningAllowed()` (a read-mode \"edit a copy\" action with `LayoutSlots.CloneToEditDialog`)\n - Undo and redo: `phx.frontend.useUndoRedo()` returns `{ canUndo, canRedo, undo, redo }`; disable each button from `canUndo`/`canRedo`\n - Tabs: `phx.frontend.useTabNavigation()` returns `{ source, tabs, activeTab, select }` for the spec's `sidebarTabs` (of the selected entity) or `horizontalTabs`; render `tabs` (each `{ index, label, icon, state, isActive }`, `icon` a PhxIcon name) and call `select(tab.index)` on click. Pass `{ source: 'sidebarTabs' }` or `{ source: 'horizontalTabs' }` when the layout shows one kind only. Not `LayoutSlots.useSidebarTabs()`: it serves the built-in sidebar and returns no tabs while its summary shows\n - Steps: `phx.frontend.useStepNavigation()` returns `{ steps, activeStep, activeIndex, isFirst, isLast, canGoNext, canGoPrevious, next, previous, goTo }` for the spec's `navigationSteps`; render `steps` (each `{ index, label, state, status }`, `status` `'complete' | 'active' | 'upcoming'`), call `next()`/`previous()` for Back and Next and `goTo(step.index)` from a stepper. It enforces no order and no validity: enable only `'complete'` steps for an \"earlier steps only\" stepper, and to block moving on while the configuration has a problem, require `phx.frontend.useStateValidity().severity !== 'warning'` besides `canGoNext`: a change with a `fixable` or `fatal` violation is rejected, so the configuration is never invalid, and a `warning` is the problem that stays (it blocks finalizing too). `useSteps` and `useHasSteps` from `@salsita-ai/sdk/configurator` are deprecated\n - Messages: mount `LayoutSlots.Services` for the built-in snackbars, or show violations, side-effect hints, errors and failed saves yourself with `phx.frontend.useConfiguratorMessages(onMessage)`, not both. A failed save arrives as `saveError`, the next successful save as `saveRecovery`; a layout that mounts neither shows no sign of a failed save. Either way mount a snackbar root (`LayoutSlots.DesktopSnackbarsRoot` or `LayoutSlots.MobileSnackbarsRoot`): errors of the built-in actions are always snackbars\n - Finalize over the spec's `finalizeAction` components, each naming a handler registered with `phx.frontend.createPhoenixHandler`: `phx.frontend.useFinalizeActions()` returns `{ actions, primary, secondary, disabled, hints }`; render `primary` (and `secondary` in a menu or list) in a loop, each action `{ key, label, title, icon, run, isPending, error, disabled }`, and call `action.run()` on click (its promise never rejects; show `action.error` on failure). The configurator runs the handlers itself, outside the layout, so a handler must not rely on a provider the layout adds. For one known handler, `phx.frontend.useFinalizeAction(handler)` in a component wrapped in `PhoenixHandlerBoundary` (from `@salsita-ai/sdk/react`) works too; `FinalizeActions` (from `@salsita-ai/sdk/configurator`) mounts the built-in buttons. `finalizePage` and `finalizeButton` are legacy\n - Read mode and fullscreen are the layout's job, no hook enforces them (`useUndoRedo`, `useFinalizeActions` and `useStepNavigation` included): hide undo, redo, finalization and whatever else a viewer must not change while `phx.frontend.useAccessService().accessInfo.viewMode` is `true` (tabs are navigation, so a viewer may switch them), and remove panels while `phx.frontend.useIsFullscreenActive()` is set; `phx.frontend.useSetFullscreen()` returns its setter\n - `ConfigurationNotFoundPage`: `phx.frontend.createConfigurationNotFoundPage(({ onBack }) => …)` replaces the \"configuration not accessible\" page; show a way back only when the optional `onBack` is set. The not-authenticated page's default renders it too; only the admin's not-authorized page keeps the built-in page\n - `ConfiguratorErrorPage`: `phx.frontend.createConfiguratorErrorPage(({ reason, onRetry }) => …)` replaces the production error page; `reason` is `uncaughtError` or `presetCreationFailed`. A page that throws falls back to the built-in one, and development keeps the detailed error pages, so the project page shows only in a production build. Register both pages with these helpers: `createCustomPhoenixLayoutElement` with the name works too, but types the component as taking only `children`, so the typed props do not compile there in a strict project\n - `AppLoaderContent`: `phx.frontend.createAppLoader(({ phases }) => …)` replaces what the loading overlay shows (each phase `{ id, label?, progress? }`, the list possibly empty); Phoenix keeps the overlay itself\n - Assistant form elements: an element declared under `assistant.formElements` (`description`, `role`, scalar `attributes` beside the built-in `label`, a `value` included, `required`) is the default export `phx.frontend.createAssistantFormElement('name', Component)` of one file; the name types the component's props by its role (`AssistantFormElementProps<'name'>`): an option reports its answer with `onSelect(answer)`, an input with `onChange(state, answer)`; and the application does not start while a declared element has no registration or a registration no declaration\n- `src/handlers/` — Event & lifecycle handlers\n- `src/webhooks/` — Server-side webhook handlers (`phx.webhooks.*Builder`); the webhook is the default export of `src/webhooks/index.ts`, which you create when the project needs its own handlers — without it the build uses a built-in inert webhook that answers only anonymous auth, so create the file before setting `useAuthHook` or `useClerk`\n- `src/migrations/` — Schema version migrations (v*.ts)\n- `src/locales/` — Locale catalogs (authored .po sources; compiled .ts, do not edit)\n- `src/admin/` — Admin interface (mirrors main src/ structure)\n- `src/_shared/` — Shared utilities (NOT auto-imported, requires explicit imports)\n- `.phoenix/` — Auto-generated files (DO NOT EDIT, except the option files in `.phoenix/variants/`)\n- `public/` — Static assets (3D models, textures, images, HDRI maps, fonts)\n- `assets/` — Uploadable resources (PDF templates, email assets)",architecturePrinciples:"## Architecture Principles\n- YAML-first: 99% of configuration in spec/*.yaml, custom code is last resort\n- ECS pattern: entities (domain objects) + components (behavior/UI) + systems (SDK runtime)\n- Reactive state: immutable domain state flows through RxJS pipelines\n- Data binding: `$read` (read-only), `$write` (write-only), `$bind` (bidirectional) connect components to domain\n- memoEval: all component implementations must use memoEval for stable object references",keyPatterns:"## Key Patterns\n- Expressions = computed properties on entities (prefix: `$`), implemented per-entity in src/expressions/\n- Actions = named domain operations (`actions:` in YAML with `params` and `result` schemas), implemented in src/actions/, prepared through `actionSystem.prepareAction()` and exposed as assistant mutations through `assistant.actions`\n- Invariants = validation rules returning violations, static or dynamic\n- Transformers = auto-fixers maintaining consistency after state changes\n- Components defined in YAML with `$read`/`$bind` bindings, or custom in src/components/ using attachComponent builder\n- Webhooks = server-side finalization tasks (PDF, email, CSV, image rendering)\n- Filters = contextual component activation via navigationStates, viewStates, modes, selectedEntityIds",fileConventions:`## File Conventions
1
+ export const sdkGuidanceSections={packageManager:"## Package Manager\nThe project installs with its own package manager, and the commands in this skill are written for pnpm. Run them through the package manager the project uses, which the lockfile in the project root names:\n- `pnpm-lock.yaml`: `pnpm phoenix <command>`, `pnpm install`, `pnpm add <package>`\n- `package-lock.json`: `npx phoenix <command>`, `npm install`, `npm install <package>`\n- `yarn.lock`: `yarn phoenix <command>`, `yarn install`, `yarn add <package>`\n- `bun.lock` or `bun.lockb`: `bunx phoenix <command>`, `bun install`, `bun add <package>`\n\nWithout a lockfile, use the package manager the `packageManager` field of `package.json` names, or ask the user.",buildCommands:"## Build Commands\n- `pnpm phoenix build` — Full production build\n- `pnpm phoenix dev` — Development mode with hot reload\n- `pnpm phoenix sync` — Sync generated files without full build\n- `pnpm phoenix deps` — Add the SDK's missing peer dependencies to `package.json` and move out-of-range ones into the SDK's range; it installs nothing, so install after it",devLogs:"## Dev Logs\n- `pnpm phoenix dev` writes all logs to `.phoenix/phoenix-dev.log`\n- Contains: spec parse errors, build errors, browser runtime errors, file watcher events\n- After making changes, always check the log for errors: `tail -50 .phoenix/phoenix-dev.log` or `grep ERROR .phoenix/phoenix-dev.log`\n- Rotated automatically at 10MB (`.log.1`, `.log.2` are older rotations)",projectStructure:"## Project Structure\n- `spec/` — Domain YAML specs (entities, relations, expressions, invariants, components, application config)\n- `src/expressions/` — Computed/derived entity properties (`phx.domain.implementCustomExpressions()`)\n- `src/actions/` — Domain operations declared under `actions:` in the spec (`phx.domain.implementActions()`), run by controls and exposed to the assistant\n- `src/invariants/` — Business rule constraints (`phx.domain.implementCustomInvariants()`)\n- `src/transformers/` — Automatic state fixers (`phx.frontend.transformerBuilder`)\n- `src/components/` — ECS system components (`phx.domain.attachComponent.withEntity()`)\n- `src/elements/` — Page-level React components (`phx.frontend.createCustomPhoenixLayoutElement()`)\n - `ConfiguratorLayout`: a layout element with this name replaces everything the built-in layout renders for a loaded configuration, in owner and read mode, finalization included. Prefer arranging the spec's layout components; write one for shell-level changes, such as moving the sidebar or adding an area the built-in layout has no place for\n - Mount `LayoutSlots.SharedCanvas` (from `@salsita-ai/sdk/configurator`) in a positioned root covering the page; put the UI above it, positioned and after it in the markup. With the canvas mounted the app loader waits until the scene has loaded; a layout without a canvas is not held by the loader. Call `phx.frontend.useSceneSafeArea()` and put `containerRef` on the element covering the whole canvas and `safeAreaRef` on the region the UI leaves free, with `pointerEvents: 'none'`, so the camera frames the scene there\n - Sidebar moved, contents as the spec configures them: mount `LayoutSlots.DesktopSidebar` in a positioned container that sets its size, with `side=\"start\"` on the left; `docs/layouts/sidebar/in-a-custom-layout.mdx` is the whole layout\n - Your own UI: \"Hooks for a Project Layout\" in `docs/phoenix/configurator-interface.mdx` lists the hooks with what each returns (`pnpm phoenix docs -r docs/phoenix/configurator-interface.mdx`), `docs/phoenix/layout-slots.mdx` the built-in pieces you can still mount, and `docs/layouts/custom-layout.mdx` is a worked example. Call the hooks as `phx.frontend.useX()`; besides those below, these are often needed: `usePreview()` (`isPreview` while the preview start screen shows), `useCloseAction()` (the host's close action or `null`), `useActiveViewports()` (the container's breakpoints, `null` until measured, `desktop` above 768 px: the desktop/phone switch), `useResolveLocalizable()` and `useLocalizable(text)` (spec texts to strings), `useIsCloningAllowed()` (a read-mode \"edit a copy\" action with `LayoutSlots.CloneToEditDialog`)\n - Undo and redo: `phx.frontend.useUndoRedo()` returns `{ canUndo, canRedo, undo, redo }`; disable each button from `canUndo`/`canRedo`\n - Tabs: `phx.frontend.useTabNavigation()` returns `{ source, tabs, activeTab, select }` for the spec's `sidebarTabs` (of the selected entity) or `horizontalTabs`; render `tabs` (each `{ index, label, icon, state, isActive }`, `icon` a PhxIcon name) and call `select(tab.index)` on click. Pass `{ source: 'sidebarTabs' }` or `{ source: 'horizontalTabs' }` when the layout shows one kind only. Not `LayoutSlots.useSidebarTabs()`: it serves the built-in sidebar and returns no tabs while its summary shows\n - Steps: `phx.frontend.useStepNavigation()` returns `{ steps, activeStep, activeIndex, isFirst, isLast, canGoNext, canGoPrevious, next, previous, goTo }` for the spec's `navigationSteps`; render `steps` (each `{ index, label, state, status }`, `status` `'complete' | 'active' | 'upcoming'`), call `next()`/`previous()` for Back and Next and `goTo(step.index)` from a stepper. It enforces no order and no validity: enable only `'complete'` steps for an \"earlier steps only\" stepper, and to block moving on while the configuration has a problem, require `phx.frontend.useStateValidity().severity !== 'warning'` besides `canGoNext`: a change with a `fixable` or `fatal` violation is rejected, so the configuration is never invalid, and a `warning` is the problem that stays (it blocks finalizing too). `useSteps` and `useHasSteps` from `@salsita-ai/sdk/configurator` are deprecated\n - Messages: mount `LayoutSlots.Services` for the built-in snackbars, or show violations, side-effect hints, errors and failed saves yourself with `phx.frontend.useConfiguratorMessages(onMessage)`, not both. A failed save arrives as `saveError`, the next successful save as `saveRecovery`; a layout that mounts neither shows no sign of a failed save. Either way mount a snackbar root (`LayoutSlots.DesktopSnackbarsRoot` or `LayoutSlots.MobileSnackbarsRoot`): errors of the built-in actions are always snackbars\n - Finalize over the spec's `finalizeAction` components, each naming a handler registered with `phx.frontend.createPhoenixHandler`: `phx.frontend.useFinalizeActions()` returns `{ actions, primary, secondary, disabled, hints }`; render `primary` (and `secondary` in a menu or list) in a loop, each action `{ key, label, title, icon, run, isPending, error, disabled }`, and call `action.run()` on click (its promise never rejects; show `action.error` on failure). The configurator runs the handlers itself, outside the layout, so a handler must not rely on a provider the layout adds. For one known handler, `phx.frontend.useFinalizeAction(handler)` in a component wrapped in `PhoenixHandlerBoundary` (from `@salsita-ai/sdk/react`) works too; `FinalizeActions` (from `@salsita-ai/sdk/configurator`) mounts the built-in buttons. `finalizePage` and `finalizeButton` are legacy\n - Read mode and fullscreen are the layout's job, no hook enforces them (`useUndoRedo`, `useFinalizeActions` and `useStepNavigation` included): hide undo, redo, finalization and whatever else a viewer must not change while `phx.frontend.useAccessService().accessInfo.viewMode` is `true` (tabs are navigation, so a viewer may switch them), and remove panels while `phx.frontend.useIsFullscreenActive()` is set; `phx.frontend.useSetFullscreen()` returns its setter\n - `ConfigurationNotFoundPage`: `phx.frontend.createConfigurationNotFoundPage(({ onBack }) => …)` replaces the \"configuration not accessible\" page; show a way back only when the optional `onBack` is set. The not-authenticated page's default renders it too; only the admin's not-authorized page keeps the built-in page\n - `ConfiguratorErrorPage`: `phx.frontend.createConfiguratorErrorPage(({ reason, onRetry }) => …)` replaces the production error page; `reason` is `uncaughtError` or `presetCreationFailed`. A page that throws falls back to the built-in one, and development keeps the detailed error pages, so the project page shows only in a production build. Register both pages with these helpers: `createCustomPhoenixLayoutElement` with the name works too, but types the component as taking only `children`, so the typed props do not compile there in a strict project\n - `AppLoaderContent`: `phx.frontend.createAppLoader(({ phases }) => …)` replaces what the loading overlay shows (each phase `{ id, label?, progress? }`, the list possibly empty); Phoenix keeps the overlay itself\n - Assistant form elements: an element declared under `assistant.formElements` (`description`, `role`, scalar `attributes` beside the built-in `label`, a `value` included, `required`) is the default export `phx.frontend.createAssistantFormElement('name', Component)` of one file; the name types the component's props by its role (`AssistantFormElementProps<'name'>`): an option reports its answer with `onSelect(answer)`, an input with `onChange(state, answer)`; and the application does not start while a declared element has no registration or a registration no declaration\n- `src/handlers/` — Event & lifecycle handlers\n- `src/webhooks/` — Server-side webhook handlers (`phx.webhooks.*Builder`); the webhook is the default export of `src/webhooks/index.ts`, which you create when the project needs its own handlers. Without it, generation continues with a built-in webhook that answers only anonymous auth; enabling `useAuthHook` or `useClerk` reports `AUTH_WITHOUT_PROJECT_WEBHOOK`. Add the entry with the required Clerk or custom auth handlers, or disable unintended auth settings\n- `src/migrations/` — Schema version migrations (v*.ts)\n- `src/locales/` — Locale catalogs (authored .po sources; compiled .ts, do not edit)\n- `src/admin/` — Admin interface (mirrors main src/ structure)\n- `src/_shared/` — Shared utilities (NOT auto-imported, requires explicit imports)\n- `.phoenix/` — Auto-generated files (DO NOT EDIT, except the option files in `.phoenix/variants/`)\n- `public/` — Static assets (3D models, textures, images, HDRI maps, fonts)\n- `assets/` — Uploadable resources (PDF templates, email assets)",architecturePrinciples:"## Architecture Principles\n- YAML-first: 99% of configuration in spec/*.yaml, custom code is last resort\n- ECS pattern: entities (domain objects) + components (behavior/UI) + systems (SDK runtime)\n- Reactive state: immutable domain state flows through RxJS pipelines\n- Data binding: `$read` (read-only), `$write` (write-only), `$bind` (bidirectional) connect components to domain\n- memoEval: all component implementations must use memoEval for stable object references",keyPatterns:"## Key Patterns\n- Expressions = computed properties on entities (prefix: `$`), implemented per-entity in src/expressions/\n- Actions = named domain operations (`actions:` in YAML with `params` and `result` schemas), implemented in src/actions/, prepared through `actionSystem.prepareAction()` and exposed as assistant mutations through `assistant.actions`\n- Invariants = validation rules returning violations, static or dynamic\n- Transformers = auto-fixers maintaining consistency after state changes\n- Components defined in YAML with `$read`/`$bind` bindings, or custom in src/components/ using attachComponent builder\n- Webhooks = server-side finalization tasks (PDF, email, CSV, image rendering)\n- Filters = contextual component activation via navigationStates, viewStates, modes, selectedEntityIds",fileConventions:`## File Conventions
2
2
  - Components: PascalCase (.tsx)
3
3
  - Utilities: kebab-case (.ts)
4
4
  - Expressions: entity-name.ts
@@ -1,6 +1,4 @@
1
- import{getStoryDevVirtualModuleId as o}from"./common.js";export const generateApplicationSpecStoryWrapper=(t,i)=>`import { v4 } from 'uuid'
2
-
3
- import { mountConfiguratorApplication } from '@salsita-ai/sdk/application'
1
+ import{getStoryDevVirtualModuleId as o}from"./common.js";export const generateApplicationSpecStoryWrapper=(t,i)=>`import { mountConfiguratorApplication } from '@salsita-ai/sdk/application'
4
2
  import { Editor } from '@salsita-ai/sdk/editor'
5
3
  import type { MockTemplateDefinition } from '@salsita-ai/sdk/editor'
6
4
  import { active, wsUrl } from ${o(t)}
@@ -9,7 +7,7 @@ import { configuratorConfig } from './configurator-config.js'
9
7
  import { rawProjectFiles } from './raw-project-files.js'
10
8
 
11
9
  const mockTemplates: MockTemplateDefinition[] = ${JSON.stringify(i,null,2)}
12
- const tagName = \`component-\${v4()}\`
10
+ const tagName = \`component-\${crypto.randomUUID()}\`
13
11
  const config = configuratorConfig.withWebComponentTag(tagName).buildConfig()
14
12
 
15
13
  mountConfiguratorApplication(config)
@@ -1,4 +1,4 @@
1
- import type { Expressions } from '../../parse-application-files/index.js';
1
+ import { type Expressions } from '#package/domain';
2
2
  import type { RuntimeLatestModelVersion } from '../runtime-spec/index.js';
3
3
  import type { AdminModelRuntime, ConfiguratorModelRuntime, SpecCodeMap } from '../runtime/index.js';
4
4
  /**
@@ -1,7 +1,6 @@
1
1
  import { Branded } from '@salsita-ai/common/utils';
2
- import { type $DomainEntity, $DomainEntityReflection, DomainBuilder, type DomainEntity, DomainEntityReflection, RawAliasReflection, SchemaReflection } from '#package/domain';
2
+ import { type $DomainEntity, $DomainEntityReflection, DomainBuilder, type DomainEntity, DomainEntityReflection, type Expressions, RawAliasReflection, SchemaReflection } from '#package/domain';
3
3
  import type { RuntimeReferenceStore } from '../../../caching/index.js';
4
- import type { Expressions } from '../../../parse-application-files/index.js';
5
4
  import type { RuntimeDataSchemas, RuntimeModelVersion, RuntimeResolvedVersions } from '../../runtime-spec/index.js';
6
5
  import type { SpecCodeMap } from '../spec-code/index.js';
7
6
  type AnyEntity = DomainEntity<string>;
@@ -1,7 +1,6 @@
1
1
  import { Branded } from '@salsita-ai/common/utils';
2
- import { type $DomainEntity, $DomainEntityReflection, DomainBuilder, type DomainEntity, DomainEntityReflection, RawAliasReflection, SchemaReflection } from '#package/domain';
2
+ import { type $DomainEntity, $DomainEntityReflection, DomainBuilder, type DomainEntity, DomainEntityReflection, type Expressions, RawAliasReflection, SchemaReflection } from '#package/domain';
3
3
  import type { RuntimeReferenceStore } from '../../../caching/index.js';
4
- import type { Expressions } from '../../../parse-application-files/index.js';
5
4
  import type { RuntimeDataSchemas, RuntimeModelVersion, RuntimeResolvedVersions } from '../../runtime-spec/index.js';
6
5
  import type { SpecCodeMap } from '../spec-code/index.js';
7
6
  type AnyEntity = DomainEntity<string>;
@@ -1,7 +1,6 @@
1
1
  import { Branded } from '@salsita-ai/common/utils';
2
- import type { AnyEntityReflections, DomainEntity, DomainEntityReflection } from '#package/domain';
2
+ import type { AnyEntityReflections, Defaults, DomainEntity, DomainEntityReflection, Invariants } from '#package/domain';
3
3
  import type { RuntimeReferenceStore } from '../../../caching/index.js';
4
- import type { Defaults, Invariants } from '../../../parse-application-files/index.js';
5
4
  import { type RecipeDefaults } from './recipe-defaults.js';
6
5
  import { type StaticViolations } from './static-violations.js';
7
6
  interface FactoryDataRuntimeFields {
@@ -1,4 +1,4 @@
1
- import type { Defaults } from '../../../parse-application-files/index.js';
1
+ import { type Defaults } from '#package/domain';
2
2
  /**
3
3
  * The default property values of each entity type, keyed by entity type: what
4
4
  * `phx.domain.createRecipe` puts into a new recipe before the caller's overrides. Alias entries are
@@ -1 +1 @@
1
- import{createMessageDescriptor as e,isEvalMarker as t,isMsgMarker as r}from"../../../core/index.js";let s=(a,i)=>{if(null===a||"object"!=typeof a)return a;if(r(a))return e(a);if(t(a))throw Error(`The default at ${i} is an $eval expression. Defaults are static values; the parser rejects $eval in them, so the spec given to the runtime was not produced by it. Parse the spec again and pass the result.`);return Array.isArray(a)?a.map((e,t)=>s(e,`${i}[${t}]`)):Object.fromEntries(Object.entries(a).map(([e,t])=>[e,s(t,`${i}.${e}`)]))};export const createRecipeDefaults=e=>Object.fromEntries(Object.entries(e.entries).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([t,r])=>[t,s(r,`${e}.${t}`)]))]));
1
+ import{createMessageDescriptor as e,isEvalMarker as t,isMsgMarker as r}from"#package/domain";let a=(s,i)=>{if(null===s||"object"!=typeof s)return s;if(r(s))return e(s);if(t(s))throw Error(`The default at ${i} is an $eval expression. Defaults are static values; the parser rejects $eval in them, so the spec given to the runtime was not produced by it. Parse the spec again and pass the result.`);return Array.isArray(s)?s.map((e,t)=>a(e,`${i}[${t}]`)):Object.fromEntries(Object.entries(s).map(([e,t])=>[e,a(t,`${i}.${e}`)]))};export const createRecipeDefaults=e=>Object.fromEntries(Object.entries(e.entries).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([t,r])=>[t,a(r,`${e}.${t}`)]))]));
@@ -1,5 +1,4 @@
1
- import type { Violation } from '#package/domain';
2
- import type { Invariants } from '../../../parse-application-files/index.js';
1
+ import { type Invariants, type Violation } from '#package/domain';
3
2
  /**
4
3
  * The violation each static invariant of a domain reports when its implementation returns `false`,
5
4
  * by entity type or alias and by invariant name. `phx.domain.implementCustomInvariants` closes over
@@ -1 +1 @@
1
- import{createMessageDescriptor as t}from"../../../core/index.js";export const createStaticViolations=e=>{let i={};for(let[o,r]of Object.entries(e.entries))for(let e of Object.values(r)){if("static"!==e.kind)continue;let r={type:String(e.violationType),severity:e.severity,message:"string"==typeof e.message?e.message:t(e.message),...void 0===e.controlViolationPriority?{}:{controlViolationPriority:e.controlViolationPriority}};i[o]={...i[o],[String(e.name)]:r}}return i};
1
+ import{createMessageDescriptor as t}from"#package/domain";export const createStaticViolations=e=>{let i={};for(let[o,r]of Object.entries(e.entries))for(let e of Object.values(r)){if("static"!==e.kind)continue;let r={type:String(e.violationType),severity:e.severity,message:"string"==typeof e.message?e.message:t(e.message),...void 0===e.controlViolationPriority?{}:{controlViolationPriority:e.controlViolationPriority}};i[o]={...i[o],[String(e.name)]:r}}return i};
@@ -1,2 +1,2 @@
1
- import { ApplicationInstance } from '../../core/index.js';
1
+ import { ApplicationInstance } from '#package/domain';
2
2
  export declare const generateRuntimeInstance: (applicationInstance: ApplicationInstance) => ApplicationInstance;
@@ -1 +1 @@
1
- import{ApplicationInstance as e}from"../../core/index.js";export const generateRuntimeInstance=n=>e(n.applicationVersion);
1
+ import{ApplicationInstance as e}from"#package/domain";export const generateRuntimeInstance=n=>e(n.applicationVersion);
@@ -1,7 +1,6 @@
1
1
  import { Branded } from '@salsita-ai/common/utils';
2
- import type { ActionDefinitions } from '#package/domain';
2
+ import type { ActionDefinitions, Actions } from '#package/domain';
3
3
  import type { RuntimeReferenceStore } from '../../../caching/index.js';
4
- import type { Actions } from '../../../parse-application-files/index.js';
5
4
  /**
6
5
  * The declared actions as the runtime spec slice holds them, with change tracking: the definitions
7
6
  * are rebuilt only when their declaration changes, so a hot reload of an unrelated section keeps
@@ -1,4 +1,4 @@
1
- import type { ComponentEntry, ComponentImplementation } from '../../../parse-application-files/spec/index.js';
1
+ import { type ComponentEntry, type ComponentImplementation } from '#package/domain';
2
2
  import type { AdminModelRuntime } from '../admin-runtime/admin-model-runtime.js';
3
3
  import type { ConfiguratorModelRuntime } from '../configurator-runtime/configurator-model-runtime.js';
4
4
  import { type SpecCodeMap } from '../spec-code/index.js';
@@ -1 +1 @@
1
- import{Branded as e}from"@salsita-ai/common/utils";import{DomainComponentOpticBuilder as t,adminSidebarComponent as a,attributeSelectionComponent as i,componentsByName as r,composedOfComponent as n,navigationPageComponent as o,navigationPanelListComponent as d,referenceComponent as c}from"#package/domain";import*as m from"#package/domain";import{FILTER_CRITERION_KEYS as s,isSdkCodeRef as l}from"../../../core/index.js";import{specCodeComponentKey as g,specCodeFilterId as p}from"../../runtime-spec/index.js";import{resolveSpecCode as R}from"../spec-code/index.js";let A=new Map([["reference",c],["composedOf",n],["adminSidebar",a],["attributeSelection",i],["navigationPage",o],["navigationPanelList",d]]),f={createAdminCustomPageRead:m.createAdminCustomPageRead,createAdminCustomSidebarRead:m.createAdminCustomSidebarRead,createAdminDataPageRead:m.createAdminDataPageRead,createAdminDataTableSidebarRead:m.createAdminDataTableSidebarRead,createAdminNavigationPanelRead:m.createAdminNavigationPanelRead,createAdminPresetCategoryPageRead:m.createAdminPresetCategoryPageRead,createAdminPresetCategorySelectionRead:m.createAdminPresetCategorySelectionRead,createAdminPresetCategorySelectionWrite:m.createAdminPresetCategorySelectionWrite,createAdminPresetCategorySidebarRead:m.createAdminPresetCategorySidebarRead,createAdminPresetListPageRead:m.createAdminPresetListPageRead,createAdminPresetSidebarRead:m.createAdminPresetSidebarRead,createAdminRecipeCollectionPageRead:m.createAdminRecipeCollectionPageRead,createAdminRecipeSidebarRead:m.createAdminRecipeSidebarRead},u=(e,t)=>{let a=f[e.sdkFunction]??m[e.sdkFunction];if("function"!=typeof a)throw Error(`SDK factory function "${e.sdkFunction}" not found. Make sure it is exported from the package.`);return a(...e.params.map(e=>{if(l(e)){let a=t.entities[e.$codeRef]??t.aliasReflections[e.$codeRef];if(!a)throw Error(`Reflection "${e.$codeRef}" not found in ModelRuntime. This is a bug — the target was validated at parse time.`);return a}return e}))};export const buildSdkOptic=(a,i,n,o,d)=>{let c=t.from(n),m=r.get(a.componentName)??A.get(a.componentName);if(!m)throw Error(`SDK component "${a.componentName}" not found. This is a bug — the component was validated at parse time.`);let l=c.withComponent(m,a.instanceName,!0),f=a.isAlias?l.withAlias(String(a.typeOrAlias)):l.withEntity(String(a.typeOrAlias)),P=g(String(a.typeOrAlias),String(a.instanceName),a.componentName);for(let[e,t]of i.filters.items.entries()){if("root"===t.kind){let e=t.target,a=t=>t[e];f=f.withFilter(a);continue}let a={};for(let i of s){let r=t[i];void 0!==r&&("dynamic"===r.kind?a[i]=e=>e[r.target]:"eval"===r.kind?a[i]=R(d,p(P,e,i,r.code),r.code):a[i]=r.value)}f=f.withGradualFilter(a)}let S=u(i.readFactory,o),y=u(i.writeFactory,o),b=f.attach(S,y);return e({typeOrAlias:String(a.typeOrAlias),componentName:a.componentName,instanceName:String(a.instanceName),optic:b})};
1
+ import{Branded as t}from"@salsita-ai/common/utils";import{DomainComponentOpticBuilder as e,FILTER_CRITERION_KEYS as i,adminSidebarComponent as o,attributeSelectionComponent as n,componentsByName as a,composedOfComponent as r,createAdminCustomPageRead as s,createAdminCustomSidebarRead as c,createAdminDataPageRead as m,createAdminDataTableSidebarRead as l,createAdminNavigationPanelRead as d,createAdminPresetCategoryPageRead as p,createAdminPresetCategorySelectionRead as f,createAdminPresetCategorySelectionWrite as u,createAdminPresetCategorySidebarRead as h,createAdminPresetListPageRead as g,createAdminPresetSidebarRead as y,createAdminRecipeCollectionPageRead as w,createAdminRecipeSidebarRead as S,createEmptyWrite as N,createMultipleCompositionRead as k,createMultipleReferenceRead as A,createMultipleReferenceWrite as v,createSingleCompositionRead as O,createSingleReferenceRead as b,createSingleReferenceWrite as F,isSdkCodeRef as R,navigationPageComponent as $,navigationPanelListComponent as E,referenceComponent as x}from"#package/domain";import{specCodeComponentKey as T,specCodeFilterId as j}from"../../runtime-spec/index.js";import{resolveSpecCode as D}from"../spec-code/index.js";let K=new Map([["reference",x],["composedOf",r],["adminSidebar",o],["attributeSelection",n],["navigationPage",$],["navigationPanelList",E]]),M={createAdminCustomPageRead:s,createAdminCustomSidebarRead:c,createAdminDataPageRead:m,createAdminDataTableSidebarRead:l,createAdminNavigationPanelRead:d,createAdminPresetCategoryPageRead:p,createAdminPresetCategorySelectionRead:f,createAdminPresetCategorySelectionWrite:u,createAdminPresetCategorySidebarRead:h,createAdminPresetListPageRead:g,createAdminPresetSidebarRead:y,createAdminRecipeCollectionPageRead:w,createAdminRecipeSidebarRead:S,createEmptyWrite:N,createMultipleCompositionRead:k,createMultipleReferenceRead:A,createMultipleReferenceWrite:v,createSingleCompositionRead:O,createSingleReferenceRead:b,createSingleReferenceWrite:F},P=(t,e)=>{let i=M[t.sdkFunction];if("function"!=typeof i)throw Error(`SDK factory function "${t.sdkFunction}" not found. The spec names a factory that the factory map of build-sdk-optic.ts does not list. Add the factory to that map.`);return i(...t.params.map(t=>{if(R(t)){let i=e.entities[t.$codeRef]??e.aliasReflections[t.$codeRef];if(!i)throw Error(`Reflection "${t.$codeRef}" not found in ModelRuntime. This is a bug — the target was validated at parse time.`);return i}return t}))};export const buildSdkOptic=(o,n,r,s,c)=>{let m=e.from(r),l=a.get(o.componentName)??K.get(o.componentName);if(!l)throw Error(`SDK component "${o.componentName}" not found. This is a bug — the component was validated at parse time.`);let d=m.withComponent(l,o.instanceName,!0),p=o.isAlias?d.withAlias(String(o.typeOrAlias)):d.withEntity(String(o.typeOrAlias)),f=T(String(o.typeOrAlias),String(o.instanceName),o.componentName);for(let[t,e]of n.filters.items.entries()){if("root"===e.kind){let t=e.target,i=e=>e[t];p=p.withFilter(i);continue}let o={};for(let n of i){let i=e[n];void 0!==i&&("dynamic"===i.kind?o[n]=t=>t[i.target]:"eval"===i.kind?o[n]=D(c,j(f,t,n,i.code),i.code):o[n]=i.value)}p=p.withGradualFilter(o)}let u=P(n.readFactory,s),h=P(n.writeFactory,s),g=p.attach(u,h);return t({typeOrAlias:String(o.typeOrAlias),componentName:o.componentName,instanceName:String(o.instanceName),optic:g})};