@salsita-ai/sdk 0.50.0-develop.1cc8da993f → 0.50.0-develop.231285e85a

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 (508) hide show
  1. package/README.md +5 -1
  2. package/dist/application-spec/core/enhanced-json-value.d.ts +2 -31
  3. package/dist/application-spec/core/enhanced-json-value.js +1 -1
  4. package/dist/application-spec/core/index.d.ts +1 -3
  5. package/dist/application-spec/core/index.js +1 -1
  6. package/dist/application-spec/core/json-schema.d.ts +2 -52
  7. package/dist/application-spec/core/markers/index.d.ts +1 -1
  8. package/dist/application-spec/core/markers/index.js +1 -1
  9. package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
  10. package/dist/application-spec/core/markers/msg-marker.js +1 -1
  11. package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
  12. package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
  13. package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
  14. package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -1
  15. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  16. package/dist/application-spec/errors/diagnostic-messages.d.ts +15 -1
  17. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  18. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  19. package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -6
  20. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  21. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
  22. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +7 -0
  23. package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
  24. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +1 -1
  25. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
  26. package/dist/application-spec/generate-application/implementations/phx-model.d.ts +1 -1
  27. package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +1 -2
  28. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +1 -2
  29. package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +1 -2
  30. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +1 -1
  31. package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -1
  32. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +1 -2
  33. package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -1
  34. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +1 -1
  35. package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +1 -1
  36. package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +1 -2
  37. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
  38. package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
  39. package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +1 -1
  40. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +1 -2
  41. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +1 -2
  42. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  43. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +1 -2
  44. package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
  45. package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +2 -3
  46. package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +1 -1
  47. package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +1 -1
  48. package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +96 -31
  49. package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +1 -1
  50. package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +13 -4
  51. package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
  52. package/dist/application-spec/parse-application-files/merge/merged-infra.d.ts +4 -11
  53. package/dist/application-spec/parse-application-files/merge/merged-transformers.d.ts +2 -4
  54. package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
  55. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.d.ts +2 -2
  56. package/dist/application-spec/parse-application-files/raw-spec/raw-acl.js +1 -1
  57. package/dist/application-spec/parse-application-files/raw-spec/raw-admin-pages.d.ts +3 -24
  58. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +25 -20
  59. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  60. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
  61. package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
  62. package/dist/application-spec/parse-application-files/raw-spec/raw-resources.d.ts +19 -64
  63. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-pages.d.ts +3 -20
  64. package/dist/application-spec/parse-application-files/spec/application/admin-spec/states.d.ts +3 -5
  65. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/states.d.ts +3 -8
  66. package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
  67. package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
  68. package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +4 -10
  69. package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
  70. package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
  71. package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
  72. package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
  73. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +2 -3
  74. package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
  75. package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +2 -3
  76. package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +2 -2
  77. package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -29
  78. package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
  79. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
  80. package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
  81. package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +2 -2
  82. package/dist/application-spec/parse-application-files/spec/invariants/invariant.d.ts +5 -21
  83. package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +4 -14
  84. package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
  85. package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
  86. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
  87. package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
  88. package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
  89. package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
  90. package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
  91. package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
  92. package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
  93. package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
  94. package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
  95. package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
  96. package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
  97. package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
  98. package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
  99. package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +6 -23
  100. package/dist/application-spec/parse-application-files/spec/sections/app-metadata.d.ts +3 -18
  101. package/dist/application-spec/parse-application-files/spec/sections/application-version.d.ts +3 -7
  102. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  103. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.js +1 -1
  104. package/dist/application-spec/parse-application-files/spec/sections/data-spec/chunks.d.ts +6 -23
  105. package/dist/application-spec/parse-application-files/spec/sections/data-spec/custom-data-spec.d.ts +1 -16
  106. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-entry-key.d.ts +3 -9
  107. package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-spec.d.ts +1 -10
  108. package/dist/application-spec/parse-application-files/spec/sections/data-spec/swatch-data-spec.d.ts +1 -14
  109. package/dist/application-spec/parse-application-files/spec/sections/state-value.d.ts +3 -7
  110. package/dist/application-spec/parse-application-files/spec/sections/theme.d.ts +3 -10
  111. package/dist/application-spec/parse-application-files/spec/sections/transformers.d.ts +4 -11
  112. package/dist/application-spec/parse-application-files/spec/sections/ui.d.ts +3 -12
  113. package/dist/client/authorized-client.js +1 -1
  114. package/dist/client/contract.d.ts +17 -5
  115. package/dist/client/contract.js +1 -1
  116. package/dist/client/phoenix-api.d.ts +32 -5
  117. package/dist/configurator/ConfiguratorApp.js +1 -1
  118. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +51 -6
  119. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  120. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +19 -3
  121. package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
  122. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +70 -56
  123. package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
  124. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +15 -0
  125. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  126. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
  127. package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
  128. package/dist/configurator/common/configurator-interface.d.ts +2 -2
  129. package/dist/configurator/common/configurator-interface.js +1 -1
  130. package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
  131. package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
  132. package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.js +1 -1
  133. package/dist/configurator/configurator-context/index.d.ts +0 -5
  134. package/dist/configurator/configurator-context/index.js +1 -1
  135. package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
  136. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  137. package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
  138. package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
  139. package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
  140. package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
  141. package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
  142. package/dist/configurator/ui/assistant/AssistantComposer.js +2 -1
  143. package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
  144. package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +11 -0
  145. package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -0
  146. package/dist/configurator/ui/assistant/attachments/index.d.ts +2 -0
  147. package/dist/configurator/ui/assistant/attachments/index.js +1 -0
  148. package/dist/configurator/ui/assistant/attachments/prepare-image.d.ts +19 -0
  149. package/dist/configurator/ui/assistant/attachments/prepare-image.js +1 -0
  150. package/dist/configurator/ui/assistant/screenshots/index.d.ts +1 -0
  151. package/dist/configurator/ui/assistant/screenshots/index.js +1 -1
  152. package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +4 -4
  153. package/dist/configurator/ui/assistant/thread-items.d.ts +2 -0
  154. package/dist/configurator/ui/assistant/thread-items.js +1 -1
  155. package/dist/configurator/ui/assistant/tool-chip.d.ts +19 -9
  156. package/dist/configurator/ui/assistant/tool-chip.js +1 -1
  157. package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
  158. package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
  159. package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
  160. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  161. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  162. package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
  163. package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
  164. package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
  165. package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
  166. package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
  167. package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
  168. package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
  169. package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
  170. package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
  171. package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
  172. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/use-basic-sidebar-footer.js +1 -1
  173. package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
  174. package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
  175. package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
  176. package/dist/docs/3d-scene/cameras/custom.mdx +4 -2
  177. package/dist/docs/drag-and-drop/room-planner.mdx +1 -1
  178. package/dist/docs/index.json +1 -1
  179. package/dist/docs/phoenix/configurator-interface.mdx +1 -1
  180. package/dist/docs/phoenix/domain-model.mdx +4 -1
  181. package/dist/docs/phoenix/layout-slots.mdx +21 -0
  182. package/dist/docs/phoenix/migration-guide.mdx +3 -3
  183. package/dist/docs/phoenix/phoenix-cli.mdx +40 -7
  184. package/dist/docs/phoenix/project-structure.mdx +23 -19
  185. package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
  186. package/dist/docs/phoenix/webhooks.mdx +5 -1
  187. package/dist/domain/application/application-config.d.ts +6 -24
  188. package/dist/domain/application/assistant/assistant-manifest.d.ts +13 -3
  189. package/dist/domain/application/assistant/assistant-manifest.js +1 -1
  190. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +5 -9
  191. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
  192. package/dist/domain/application/assistant/build-assistant-lenses.js +1 -1
  193. package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
  194. package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
  195. package/dist/domain/application/assistant/index.d.ts +3 -3
  196. package/dist/domain/application/assistant/index.js +1 -1
  197. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
  198. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -4
  199. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
  200. package/dist/domain/application/assistant-mutations.js +1 -1
  201. package/dist/domain/available-system-components/available-system-components.d.ts +11 -0
  202. package/dist/domain/available-system-components/available-system-components.js +1 -0
  203. package/dist/domain/available-system-components/index.d.ts +1 -0
  204. package/dist/domain/available-system-components/index.js +1 -0
  205. package/dist/domain/{domain-builder.d.ts → domain-builder/domain-builder.d.ts} +2 -2
  206. package/dist/domain/domain-builder/domain-builder.js +1 -0
  207. package/dist/domain/domain-builder/index.d.ts +1 -0
  208. package/dist/domain/domain-builder/index.js +1 -0
  209. package/dist/domain/extensions/export-images/agent-screenshot.d.ts +6 -0
  210. package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
  211. package/dist/domain/extensions/export-images/index.d.ts +1 -1
  212. package/dist/domain/extensions/export-images/index.js +1 -1
  213. package/dist/domain/extensions/index.d.ts +1 -1
  214. package/dist/domain/extensions/index.js +1 -1
  215. package/dist/domain/index.d.ts +3 -2
  216. package/dist/domain/index.js +1 -1
  217. package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
  218. package/dist/domain/spec/application/admin-pages.d.ts +26 -0
  219. package/dist/domain/spec/application/admin-states.d.ts +5 -0
  220. package/dist/domain/spec/application/configurator-states.d.ts +8 -0
  221. package/dist/domain/spec/application/configurator-states.js +1 -0
  222. package/dist/domain/spec/application/index.d.ts +5 -0
  223. package/dist/domain/spec/application/index.js +1 -0
  224. package/dist/domain/spec/components/bindings/index.d.ts +2 -0
  225. package/dist/domain/spec/components/bindings/index.js +1 -0
  226. package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
  227. package/dist/domain/spec/components/bindings/read-binding.js +1 -0
  228. package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
  229. package/dist/domain/spec/components/bindings/write-binding.js +1 -0
  230. package/dist/{application-spec/parse-application-files → domain}/spec/components/component-entry.d.ts +3 -3
  231. package/dist/domain/spec/components/component-entry.js +1 -0
  232. package/dist/{application-spec/core → domain/spec}/components/component-filter.d.ts +3 -2
  233. package/dist/domain/spec/components/component-filters.d.ts +10 -0
  234. package/dist/domain/spec/components/component-filters.js +1 -0
  235. package/dist/domain/spec/components/components.d.ts +4 -0
  236. package/dist/domain/spec/components/components.js +1 -0
  237. package/dist/domain/spec/components/index.d.ts +6 -0
  238. package/dist/domain/spec/enhanced-json/enhanced-json-value.d.ts +30 -0
  239. package/dist/domain/spec/enhanced-json/enhanced-json-value.js +1 -0
  240. package/dist/domain/spec/enhanced-json/index.d.ts +1 -0
  241. package/dist/domain/spec/enhanced-json/index.js +1 -0
  242. package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts +9 -3
  243. package/dist/domain/spec/expressions/expression.js +1 -0
  244. package/dist/domain/spec/expressions/expressions.d.ts +27 -0
  245. package/dist/domain/spec/expressions/expressions.js +1 -0
  246. package/dist/domain/spec/expressions/index.d.ts +5 -0
  247. package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
  248. package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
  249. package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
  250. package/dist/domain/spec/index.d.ts +9 -0
  251. package/dist/domain/spec/index.js +1 -0
  252. package/dist/domain/spec/invariants/index.d.ts +2 -0
  253. package/dist/domain/spec/invariants/index.js +1 -0
  254. package/dist/domain/spec/invariants/invariant.d.ts +24 -0
  255. package/dist/domain/spec/invariants/invariant.js +1 -0
  256. package/dist/domain/spec/invariants/invariants.d.ts +14 -0
  257. package/dist/domain/spec/invariants/invariants.js +1 -0
  258. package/dist/domain/spec/json-schema.d.ts +52 -0
  259. package/dist/domain/spec/json-schema.js +1 -0
  260. package/dist/domain/spec/markers/index.d.ts +3 -0
  261. package/dist/domain/spec/markers/index.js +1 -0
  262. package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
  263. package/dist/domain/spec/markers/msg-marker.js +1 -0
  264. package/dist/domain/spec/model/aliases.d.ts +9 -0
  265. package/dist/domain/spec/model/aliases.js +1 -0
  266. package/dist/domain/spec/model/common-types.d.ts +15 -0
  267. package/dist/domain/spec/model/common-types.js +1 -0
  268. package/dist/domain/spec/model/defaults.d.ts +33 -0
  269. package/dist/domain/spec/model/defaults.js +1 -0
  270. package/dist/domain/spec/model/entity-types.d.ts +8 -0
  271. package/dist/domain/spec/model/entity-types.js +1 -0
  272. package/dist/domain/spec/model/index.d.ts +7 -0
  273. package/dist/domain/spec/model/index.js +1 -0
  274. package/dist/domain/spec/model/model-version-key.d.ts +3 -0
  275. package/dist/domain/spec/model/model-version-key.js +1 -0
  276. package/dist/domain/spec/model/names/action-name.d.ts +7 -0
  277. package/dist/domain/spec/model/names/action-name.js +1 -0
  278. package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
  279. package/dist/domain/spec/model/names/alias-name.js +1 -0
  280. package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
  281. package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
  282. package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
  283. package/dist/domain/spec/model/names/entity-type-name.js +1 -0
  284. package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
  285. package/dist/domain/spec/model/names/expression-name.js +1 -0
  286. package/dist/domain/spec/model/names/index.d.ts +9 -0
  287. package/dist/domain/spec/model/names/index.js +1 -0
  288. package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
  289. package/dist/domain/spec/model/names/instance-name.js +1 -0
  290. package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
  291. package/dist/domain/spec/model/names/invariant-name.js +1 -0
  292. package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
  293. package/dist/domain/spec/model/names/shape-property-name.js +1 -0
  294. package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
  295. package/dist/domain/spec/model/names/violation-type-name.js +1 -0
  296. package/dist/domain/spec/model/presets.d.ts +30 -0
  297. package/dist/domain/spec/model/presets.js +1 -0
  298. package/dist/domain/spec/sections/actions.d.ts +23 -0
  299. package/dist/domain/spec/sections/actions.js +1 -0
  300. package/dist/domain/spec/sections/app-metadata.d.ts +18 -0
  301. package/dist/domain/spec/sections/app-metadata.js +1 -0
  302. package/dist/domain/spec/sections/application-version.d.ts +7 -0
  303. package/dist/domain/spec/sections/application-version.js +1 -0
  304. package/dist/domain/spec/sections/data-spec/chunks.d.ts +23 -0
  305. package/dist/domain/spec/sections/data-spec/chunks.js +1 -0
  306. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.d.ts +16 -0
  307. package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.js +1 -0
  308. package/dist/domain/spec/sections/data-spec/data-entry-key.d.ts +9 -0
  309. package/dist/domain/spec/sections/data-spec/data-entry-key.js +1 -0
  310. package/dist/domain/spec/sections/data-spec/index.d.ts +5 -0
  311. package/dist/domain/spec/sections/data-spec/index.js +1 -0
  312. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.d.ts +10 -0
  313. package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.js +1 -0
  314. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.d.ts +14 -0
  315. package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.js +1 -0
  316. package/dist/domain/spec/sections/index.d.ts +9 -0
  317. package/dist/domain/spec/sections/index.js +1 -0
  318. package/dist/domain/spec/sections/infra/acl.d.ts +12 -0
  319. package/dist/domain/spec/sections/infra/acl.js +1 -0
  320. package/dist/domain/spec/sections/infra/index.d.ts +3 -0
  321. package/dist/domain/spec/sections/infra/index.js +1 -0
  322. package/dist/domain/spec/sections/infra/resource-entry.d.ts +46 -0
  323. package/dist/domain/spec/sections/infra/resource-entry.js +1 -0
  324. package/dist/domain/spec/sections/infra/resources-config.d.ts +10 -0
  325. package/dist/domain/spec/sections/infra/resources-config.js +1 -0
  326. package/dist/domain/spec/sections/state-value.d.ts +7 -0
  327. package/dist/domain/spec/sections/state-value.js +1 -0
  328. package/dist/domain/spec/sections/theme.d.ts +10 -0
  329. package/dist/domain/spec/sections/theme.js +1 -0
  330. package/dist/domain/spec/sections/transformers.d.ts +15 -0
  331. package/dist/domain/spec/sections/transformers.js +1 -0
  332. package/dist/domain/spec/sections/ui.d.ts +12 -0
  333. package/dist/domain/spec/sections/ui.js +1 -0
  334. package/dist/domain/system-definitions.js +1 -1
  335. package/dist/domain/utils/index.d.ts +2 -0
  336. package/dist/domain/utils/index.js +1 -0
  337. package/dist/editor/graphql/GraphQLPanel.js +1 -1
  338. package/dist/i18n/locales/cs/messages.js +1 -1
  339. package/dist/i18n/locales/da/messages.js +1 -1
  340. package/dist/i18n/locales/de/messages.js +1 -1
  341. package/dist/i18n/locales/de-AT/messages.js +1 -1
  342. package/dist/i18n/locales/en/messages.js +1 -1
  343. package/dist/i18n/locales/en-AU/messages.js +1 -1
  344. package/dist/i18n/locales/en-GB/messages.js +1 -1
  345. package/dist/i18n/locales/es/messages.js +1 -1
  346. package/dist/i18n/locales/fr/messages.js +1 -1
  347. package/dist/i18n/locales/hu/messages.js +1 -1
  348. package/dist/i18n/locales/it/messages.js +1 -1
  349. package/dist/i18n/locales/nl/messages.js +1 -1
  350. package/dist/i18n/locales/pl/messages.js +1 -1
  351. package/dist/i18n/locales/pt/messages.js +1 -1
  352. package/dist/i18n/locales/ro/messages.js +1 -1
  353. package/dist/i18n/locales/sk/messages.js +1 -1
  354. package/dist/i18n/locales/tr/messages.js +1 -1
  355. package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +2 -2
  356. package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +1 -0
  357. package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
  358. package/dist/phoenix/application-spec/generate-project-files.d.ts +1 -0
  359. package/dist/phoenix/application-spec/index.d.ts +1 -0
  360. package/dist/phoenix/application-spec/index.js +1 -1
  361. package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +11 -0
  362. package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
  363. package/dist/phoenix/bin.js +1 -1
  364. package/dist/phoenix/cli.js +1 -1
  365. package/dist/phoenix/commands/activate-deployment.js +1 -1
  366. package/dist/phoenix/commands/build.js +1 -1
  367. package/dist/phoenix/commands/changelog.js +1 -1
  368. package/dist/phoenix/commands/check.js +1 -1
  369. package/dist/phoenix/commands/clean.js +1 -1
  370. package/dist/phoenix/commands/cleanup-environment.js +2 -2
  371. package/dist/phoenix/commands/create-environment.js +1 -1
  372. package/dist/phoenix/commands/data.js +1 -1
  373. package/dist/phoenix/commands/deploy.js +1 -1
  374. package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
  375. package/dist/phoenix/commands/dev.js +5 -5
  376. package/dist/phoenix/commands/docs.js +1 -1
  377. package/dist/phoenix/commands/finish-deployment-command.js +1 -1
  378. package/dist/phoenix/commands/fix.js +1 -1
  379. package/dist/phoenix/commands/generated-env-markers.d.ts +1 -0
  380. package/dist/phoenix/commands/generated-env-markers.js +1 -1
  381. package/dist/phoenix/commands/index.d.ts +1 -1
  382. package/dist/phoenix/commands/index.js +1 -1
  383. package/dist/phoenix/commands/inspect-assets.js +1 -1
  384. package/dist/phoenix/commands/list-environments.js +1 -1
  385. package/dist/phoenix/commands/login.d.ts +4 -1
  386. package/dist/phoenix/commands/login.js +2 -2
  387. package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
  388. package/dist/phoenix/commands/register-deployment.js +1 -1
  389. package/dist/phoenix/commands/scene.js +1 -1
  390. package/dist/phoenix/commands/screenshot.js +1 -1
  391. package/dist/phoenix/commands/state.js +1 -1
  392. package/dist/phoenix/commands/story-build.js +3 -3
  393. package/dist/phoenix/commands/story-create.js +1 -1
  394. package/dist/phoenix/commands/sync.js +1 -1
  395. package/dist/phoenix/commands/variants.js +1 -1
  396. package/dist/phoenix/lingui/index.d.ts +1 -0
  397. package/dist/phoenix/lingui/index.js +1 -0
  398. package/dist/phoenix/lingui/lingui.d.ts +18 -0
  399. package/dist/phoenix/lingui/lingui.js +1 -0
  400. package/dist/phoenix/services/application-spec-project-watcher.d.ts +3 -1
  401. package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
  402. package/dist/phoenix/services/cli-credentials.d.ts +3 -0
  403. package/dist/phoenix/services/cli-credentials.js +1 -1
  404. package/dist/phoenix/services/cli-exit.d.ts +5 -0
  405. package/dist/phoenix/services/cli-exit.js +1 -0
  406. package/dist/phoenix/services/index.d.ts +3 -0
  407. package/dist/phoenix/services/index.js +1 -1
  408. package/dist/phoenix/services/lingui-watcher.js +1 -1
  409. package/dist/phoenix/services/prepare-development-environment.js +1 -1
  410. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.d.ts +9 -0
  411. package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.js +1 -0
  412. package/dist/phoenix/services/telemetry/index.d.ts +3 -0
  413. package/dist/phoenix/services/telemetry/index.js +1 -0
  414. package/dist/phoenix/services/telemetry/telemetry-client.d.ts +25 -0
  415. package/dist/phoenix/services/telemetry/telemetry-client.js +1 -0
  416. package/dist/phoenix/services/telemetry/telemetry-command.d.ts +2 -0
  417. package/dist/phoenix/services/telemetry/telemetry-command.js +1 -0
  418. package/dist/phoenix/services/telemetry/telemetry-event.d.ts +44 -0
  419. package/dist/phoenix/services/telemetry/telemetry-event.js +1 -0
  420. package/dist/phoenix/services/telemetry/telemetry-state.d.ts +25 -0
  421. package/dist/phoenix/services/telemetry/telemetry-state.js +2 -0
  422. package/dist/phoenix/services/vite-config.js +1 -1
  423. package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
  424. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/ConfiguratorRoutingProvider.d.ts +1 -1
  425. package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
  426. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/OnGoToIndexHandler.d.ts +1 -2
  427. package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
  428. package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
  429. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/index.js +1 -1
  430. package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/use-power-routing-lifecycle.d.ts +2 -0
  431. package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
  432. package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
  433. package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
  434. package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
  435. package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
  436. package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
  437. package/dist/react-sdk/domain-application-context/index.js +1 -1
  438. package/dist/react-sdk/index.d.ts +5 -0
  439. package/dist/react-sdk/index.js +1 -1
  440. package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
  441. package/dist/react-sdk/integration/index.d.ts +1 -0
  442. package/dist/react-sdk/integration/index.js +1 -0
  443. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
  444. package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
  445. package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
  446. package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
  447. package/dist/react-sdk/lifecycle-providers/index.js +1 -0
  448. package/dist/react-sdk/notifications/index.d.ts +1 -0
  449. package/dist/react-sdk/notifications/index.js +1 -0
  450. package/dist/react-sdk/notifications/snackbar-action-button.d.ts +30 -0
  451. package/dist/react-sdk/notifications/snackbar-action-button.js +1 -0
  452. package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -0
  453. package/dist/react-sdk/preset-selection/index.d.ts +1 -0
  454. package/dist/react-sdk/preset-selection/index.js +1 -0
  455. package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
  456. package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
  457. package/dist/ui-sdk/icons/__generated/Paperclip.d.ts +3 -0
  458. package/dist/ui-sdk/icons/__generated/Paperclip.js +1 -0
  459. package/dist/ui-sdk/icons/__generated/index.d.ts +2 -0
  460. package/dist/ui-sdk/icons/__generated/index.js +1 -1
  461. package/dist/ui-sdk/icons/icons-registry.js +1 -1
  462. package/dist/ui-sdk/theme/types.d.ts +1 -1
  463. package/dist/watch/glob-matcher.d.ts +4 -4
  464. package/dist/watch/glob-matcher.js +1 -1
  465. package/dist/watch/watch.d.ts +4 -4
  466. package/dist/watch/watch.js +1 -1
  467. package/package.json +3 -3
  468. package/schema/domain-spec.json +22 -4
  469. package/dist/application-spec/core/components/index.d.ts +0 -2
  470. package/dist/application-spec/core/expressions/index.d.ts +0 -2
  471. package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
  472. package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
  473. package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
  474. package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
  475. package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
  476. package/dist/configurator/configurator-context/PresetSelectionProvider.js +0 -1
  477. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
  478. package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
  479. package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
  480. package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
  481. package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
  482. package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
  483. package/dist/domain/available-system-components.d.ts +0 -11
  484. package/dist/domain/available-system-components.js +0 -1
  485. package/dist/domain/domain-builder.js +0 -1
  486. package/dist/phoenix/services/lingui.d.ts +0 -15
  487. package/dist/phoenix/services/lingui.js +0 -1
  488. /package/dist/{application-spec/core/expressions/relation-expression-params.js → domain/spec/application/admin-pages-section.js} +0 -0
  489. /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/application/admin-pages.js} +0 -0
  490. /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/application/admin-states.js} +0 -0
  491. /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
  492. /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
  493. /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
  494. /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
  495. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
  496. /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
  497. /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
  498. /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.d.ts +0 -0
  499. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
  500. /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
  501. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
  502. /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
  503. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
  504. /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
  505. /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
  506. /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
  507. /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
  508. /package/dist/{configurator/configurator-context → react-sdk/preset-selection}/PresetSelectionProvider.d.ts +0 -0
@@ -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,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})};
@@ -1,4 +1,4 @@
1
- import { type ComponentEntry, type 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,7 +1,6 @@
1
1
  import { Branded } from '@salsita-ai/common/utils';
2
- import { type DomainComponentOptic, type SystemComponentTypeConstraint } from '#package/domain';
2
+ import { type ComponentEntry, type DomainComponentOptic, type SystemComponentTypeConstraint } from '#package/domain';
3
3
  import type { RuntimeReferenceStore } from '../../../caching/index.js';
4
- import type { ComponentEntry } from '../../../parse-application-files/spec/index.js';
5
4
  import type { AdminModelRuntime } from '../admin-runtime/admin-model-runtime.js';
6
5
  import type { ConfiguratorModelRuntime } from '../configurator-runtime/configurator-model-runtime.js';
7
6
  import type { SpecCodeMap } from '../spec-code/index.js';
@@ -1,7 +1,6 @@
1
1
  import { Branded } from '@salsita-ai/common/utils';
2
- import type { DomainEntity, Expression as DomainExpression, Invariant as DomainInvariant, ImplementationErrorCollector, ProjectModule } from '#package/domain';
2
+ import { type DomainEntity, type Expression as DomainExpression, type Invariant as DomainInvariant, type Expressions, type ImplementationErrorCollector, type ProjectModule } 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 RuntimeModelVersion } from '../../runtime-spec/index.js';
6
5
  import type { SpecCodeMap } from '../spec-code/index.js';
7
6
  type RuntimeData = Record<string, unknown>;
@@ -1 +1 @@
1
- import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{ImplementationError as i,createRelationFactory as n,mergeExpressionModules as a}from"#package/domain";import{canonicalEnhancedJsonValueKey as r,isSdkExpressionImplementation as o}from"../../../core/index.js";import{specCodeExpressionKey as l}from"../../runtime-spec/index.js";import{generateMemoEvalPlanRuntime as s}from"./generate-memo-eval-plan-runtime.js";let p={},m=["0-1","1-1","0-N","1-N"],d={relation:(e,t)=>{let i=t[0];if(!("object"==typeof i&&null!==i&&"kind"in i&&"target"in i&&"string"==typeof i.target&&"cardinality"in i&&m.includes(i.cardinality)&&("allOfType"===i.kind||("direct"===i.kind||"indirect"===i.kind)&&"field"in i&&"string"==typeof i.field)))throw Error("Cannot create the relation expression because its parameter is not a relation declaration. The application spec is inconsistent; rebuild it from a valid relations declaration.");return n(e.aliasMap)(i)},violations:(e,t)=>{let i=t[0];if("object"!=typeof i||null===i||!("entityType"in i)||"string"!=typeof i.entityType)throw Error("Cannot create the violations expression because its entityType parameter is missing. The application spec is inconsistent; rebuild it from a valid invariants declaration.");let n=i.entityType,a=Object.entries(e.invariantImplementations).flatMap(([t,i])=>{let a=e.aliasMap[t];return t===n||a?.includes(n)?i:[]});return{origin:{name:"$violations",typeOrAlias:n},evaluate:(e,t,i)=>a.flatMap(n=>n.evaluate(e,t,i)),meta:{}}}},f=e=>{let t=s(e.plan,l(e.entityOrAlias,e.name),e.code);return{origin:{name:e.name,typeOrAlias:e.entityOrAlias},evaluate:(e,i,n)=>t(n.domain.get$Entity(e,i),i,n),meta:{}}},u=e=>({...(0,d[e.kind])({aliasMap:e.aliasMap,invariantImplementations:e.invariantImplementations},e.params),origin:{name:e.name,typeOrAlias:e.entityOrAlias}});export const ExpressionRuntime=(n,l,s,m,d=p,c,g,y={})=>{let v={};for(let[e,t]of n.latestModel.aliases)v[String(e)]=t.map(String);let x={...y};for(let[e,t]of Object.entries(a(s,v,g,((e,t,i)=>{let n=new Map,a=(e,t)=>{n.set(e,(n.get(e)??new Set).add(t))};for(let[i,n]of e.expressions.expressions)for(let[e,r]of n)if("user"!==r.implementation.kind)for(let n of t[String(i)]??[String(i)])a(n,String(e));for(let[e,t]of Object.entries(i))for(let i of Object.keys(t))a(e,i);return n})(n,v,y))))x[e]={...x[e],...t};let S=l.createBuilder(`${m}/sdk`,{build:u,getKey:e=>`sdk::${e.entityOrAlias}::${e.name}`,compare:(t,i)=>t.kind===i.kind&&e(t.params,i.params)&&e(t.aliasMap,i.aliasMap)&&("violations"!==i.kind||t.invariantImplementations===i.invariantImplementations)}),h=l.createBuilder(`${m}/user`,{build:e=>e.impl,getKey:e=>`user::${e.entityType}::${e.name}`,compare:(e,t)=>{let i,n;return(i=e.impl)===(n=t.impl)||i.evaluate===n.evaluate&&i.meta===n.meta&&i.origin.name===n.origin.name&&i.origin.typeOrAlias===n.origin.typeOrAlias}}),O=l.createBuilder(`${m}/value`,{build:f,getKey:e=>`value::${e.entityOrAlias}::${e.name}`,compare:(e,t)=>e.valueKey===t.valueKey&&e.code===t.code}),b={},k=!1,$=new Set,M=new Set,j=new Set;for(let[e,t]of n.expressions.expressions)for(let[,i]of t){let t=v[String(e)]??[String(e)];if(o(i.implementation)){let n={entityOrAlias:String(e),name:String(i.name),kind:i.implementation.kind,params:i.implementation.params,aliasMap:v,invariantImplementations:d},a=S.build(n);for(let e of(a.changed&&(k=!0),$.add(S.getKey(n)),t))b[e]||(b[e]={}),b[e][String(i.name)]=a.output;continue}if("value"===i.implementation.kind){let n=i.implementation.value,a={entityOrAlias:String(e),name:String(i.name),valueKey:r(n),plan:i.implementation.plan,code:c},o=O.build(a);for(let e of(o.changed&&(k=!0),j.add(O.getKey(a)),t))b[e]||(b[e]={}),b[e][String(i.name)]=o.output;continue}}for(let[e,t]of Object.entries(x))for(let[i,n]of Object.entries(t)){let t={entityType:e,name:i,impl:n},a=h.build(t);a.changed&&(k=!0),M.add(h.getKey(t)),b[e]||(b[e]={}),b[e][i]=a.output}S.cleanup($)&&(k=!0),h.cleanup(M)&&(k=!0),O.cleanup(j)&&(k=!0);let A=[];for(let[e,t]of n.expressions.entityExpressions)for(let i of t.shapeGroups){let t=n.expressions.expressions.get(i);if(t)for(let[i]of t)b[String(e)]?.[String(i)]||A.push({entityType:String(e),exprName:String(i)})}return A.length>0?(A.forEach(e=>g.add(new i({code:"MISSING_IMPLEMENTATION",origin:null,problem:`Missing implementation of expression ${e.entityType}.${e.exprName}`,fix:"The spec declares it without a value of its own ($eval, $msg or a read), so a project file implements it: a default export of phx.domain.implementCustomExpressions({ ... }) in src/expressions/, or of phx.domain.admin.implementCustomExpressions({ ... }) in src/admin/expressions/ for an admin entity type. Implement it, or remove the declaration from the spec."}))),{ok:!1,missing:A}):{ok:!0,runtime:t({merged:b,changed:k})}};
1
+ import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{ImplementationError as i,canonicalEnhancedJsonValueKey as n,createRelationFactory as a,isSdkExpressionImplementation as r,mergeExpressionModules as o}from"#package/domain";import{specCodeExpressionKey as l}from"../../runtime-spec/index.js";import{generateMemoEvalPlanRuntime as s}from"./generate-memo-eval-plan-runtime.js";let p={},m=["0-1","1-1","0-N","1-N"],d={relation:(e,t)=>{let i=t[0];if(!("object"==typeof i&&null!==i&&"kind"in i&&"target"in i&&"string"==typeof i.target&&"cardinality"in i&&m.includes(i.cardinality)&&("allOfType"===i.kind||("direct"===i.kind||"indirect"===i.kind)&&"field"in i&&"string"==typeof i.field)))throw Error("Cannot create the relation expression because its parameter is not a relation declaration. The application spec is inconsistent; rebuild it from a valid relations declaration.");return a(e.aliasMap)(i)},violations:(e,t)=>{let i=t[0];if("object"!=typeof i||null===i||!("entityType"in i)||"string"!=typeof i.entityType)throw Error("Cannot create the violations expression because its entityType parameter is missing. The application spec is inconsistent; rebuild it from a valid invariants declaration.");let n=i.entityType,a=Object.entries(e.invariantImplementations).flatMap(([t,i])=>{let a=e.aliasMap[t];return t===n||a?.includes(n)?i:[]});return{origin:{name:"$violations",typeOrAlias:n},evaluate:(e,t,i)=>a.flatMap(n=>n.evaluate(e,t,i)),meta:{}}}},f=e=>{let t=s(e.plan,l(e.entityOrAlias,e.name),e.code);return{origin:{name:e.name,typeOrAlias:e.entityOrAlias},evaluate:(e,i,n)=>t(n.domain.get$Entity(e,i),i,n),meta:{}}},u=e=>({...(0,d[e.kind])({aliasMap:e.aliasMap,invariantImplementations:e.invariantImplementations},e.params),origin:{name:e.name,typeOrAlias:e.entityOrAlias}});export const ExpressionRuntime=(a,l,s,m,d=p,c,g,y={})=>{let v={};for(let[e,t]of a.latestModel.aliases)v[String(e)]=t.map(String);let x={...y};for(let[e,t]of Object.entries(o(s,v,g,((e,t,i)=>{let n=new Map,a=(e,t)=>{n.set(e,(n.get(e)??new Set).add(t))};for(let[i,n]of e.expressions.expressions)for(let[e,r]of n)if("user"!==r.implementation.kind)for(let n of t[String(i)]??[String(i)])a(n,String(e));for(let[e,t]of Object.entries(i))for(let i of Object.keys(t))a(e,i);return n})(a,v,y))))x[e]={...x[e],...t};let S=l.createBuilder(`${m}/sdk`,{build:u,getKey:e=>`sdk::${e.entityOrAlias}::${e.name}`,compare:(t,i)=>t.kind===i.kind&&e(t.params,i.params)&&e(t.aliasMap,i.aliasMap)&&("violations"!==i.kind||t.invariantImplementations===i.invariantImplementations)}),h=l.createBuilder(`${m}/user`,{build:e=>e.impl,getKey:e=>`user::${e.entityType}::${e.name}`,compare:(e,t)=>{let i,n;return(i=e.impl)===(n=t.impl)||i.evaluate===n.evaluate&&i.meta===n.meta&&i.origin.name===n.origin.name&&i.origin.typeOrAlias===n.origin.typeOrAlias}}),O=l.createBuilder(`${m}/value`,{build:f,getKey:e=>`value::${e.entityOrAlias}::${e.name}`,compare:(e,t)=>e.valueKey===t.valueKey&&e.code===t.code}),b={},k=!1,$=new Set,M=new Set,A=new Set;for(let[e,t]of a.expressions.expressions)for(let[,i]of t){let t=v[String(e)]??[String(e)];if(r(i.implementation)){let n={entityOrAlias:String(e),name:String(i.name),kind:i.implementation.kind,params:i.implementation.params,aliasMap:v,invariantImplementations:d},a=S.build(n);for(let e of(a.changed&&(k=!0),$.add(S.getKey(n)),t))b[e]||(b[e]={}),b[e][String(i.name)]=a.output;continue}if("value"===i.implementation.kind){let a=i.implementation.value,r={entityOrAlias:String(e),name:String(i.name),valueKey:n(a),plan:i.implementation.plan,code:c},o=O.build(r);for(let e of(o.changed&&(k=!0),A.add(O.getKey(r)),t))b[e]||(b[e]={}),b[e][String(i.name)]=o.output;continue}}for(let[e,t]of Object.entries(x))for(let[i,n]of Object.entries(t)){let t={entityType:e,name:i,impl:n},a=h.build(t);a.changed&&(k=!0),M.add(h.getKey(t)),b[e]||(b[e]={}),b[e][i]=a.output}S.cleanup($)&&(k=!0),h.cleanup(M)&&(k=!0),O.cleanup(A)&&(k=!0);let T=[];for(let[e,t]of a.expressions.entityExpressions)for(let i of t.shapeGroups){let t=a.expressions.expressions.get(i);if(t)for(let[i]of t)b[String(e)]?.[String(i)]||T.push({entityType:String(e),exprName:String(i)})}return T.length>0?(T.forEach(e=>g.add(new i({code:"MISSING_IMPLEMENTATION",origin:null,problem:`Missing implementation of expression ${e.entityType}.${e.exprName}`,fix:"The spec declares it without a value of its own ($eval, $msg or a read), so a project file implements it: a default export of phx.domain.implementCustomExpressions({ ... }) in src/expressions/, or of phx.domain.admin.implementCustomExpressions({ ... }) in src/admin/expressions/ for an admin entity type. Implement it, or remove the declaration from the spec."}))),{ok:!1,missing:T}):{ok:!0,runtime:t({merged:b,changed:k})}};
@@ -1,5 +1,4 @@
1
- import type { SelfAccessor } from '../../../core/index.js';
2
- import type { MemoEvalPlan } from '../../../parse-application-files/spec/index.js';
1
+ import { type MemoEvalPlan, type SelfAccessor } from '#package/domain';
3
2
  import { type SpecCodeMap } from '../spec-code/index.js';
4
3
  /**
5
4
  * Runtime counterpart to
@@ -1 +1 @@
1
- import{memoEval as e}from"#package/domain";import{createMessageDescriptor as t}from"../../../core/index.js";import{specCodeEvalIds as r}from"../../runtime-spec/index.js";import{resolveSpecCode as a}from"../spec-code/index.js";let n=(e,r)=>{if("literal"===e.kind)return e.value;if("slot"===e.kind)return r[e.depIndex];if("msg"===e.kind)return t(e.marker);if("array"===e.kind)return e.items.map(e=>n(e,r));let a={};for(let[t,l]of e.entries)a[t]=n(l,r);return a};export const generateMemoEvalPlanRuntime=(t,l,i)=>{if(0===t.deps.length){let e=n(t.template,[]);return()=>e}let o=r(t,l),s=t.deps.map((e,t)=>{let r=o[t];return"eval"===e.kind&&void 0!==r?a(i,r,e.code):void 0});return e(e=>t.deps.map((t,r)=>"eval"===t.kind?s[r](e):Reflect.get(e,t.target)),(...e)=>n(t.template,e))};export const evaluateStaticMemoEvalPlan=(e,t,l)=>{if(e.usesSelf)throw Error("Cannot evaluate a plan that uses self as a static value. Filter self-dependent plans before evaluating constants.");let i=r(e,t),o=e.deps.map((e,t)=>{if("read"===e.kind)throw Error(`Cannot evaluate the self-dependent read "${e.target}" as a static value. Filter self-dependent plans before evaluating constants.`);return a(l,i[t],e.code)()});return n(e.template,o)};
1
+ import{createMessageDescriptor as e,memoEval as t}from"#package/domain";import{specCodeEvalIds as a}from"../../runtime-spec/index.js";import{resolveSpecCode as r}from"../spec-code/index.js";let n=(t,a)=>{if("literal"===t.kind)return t.value;if("slot"===t.kind)return a[t.depIndex];if("msg"===t.kind)return e(t.marker);if("array"===t.kind)return t.items.map(e=>n(e,a));let r={};for(let[e,l]of t.entries)r[e]=n(l,a);return r};export const generateMemoEvalPlanRuntime=(e,l,i)=>{if(0===e.deps.length){let t=n(e.template,[]);return()=>t}let s=a(e,l),o=e.deps.map((e,t)=>{let a=s[t];return"eval"===e.kind&&void 0!==a?r(i,a,e.code):void 0});return t(t=>e.deps.map((e,a)=>"eval"===e.kind?o[a](t):Reflect.get(t,e.target)),(...t)=>n(e.template,t))};export const evaluateStaticMemoEvalPlan=(e,t,l)=>{if(e.usesSelf)throw Error("Cannot evaluate a plan that uses self as a static value. Filter self-dependent plans before evaluating constants.");let i=a(e,t),s=e.deps.map((e,t)=>{if("read"===e.kind)throw Error(`Cannot evaluate the self-dependent read "${e.target}" as a static value. Filter self-dependent plans before evaluating constants.`);return r(l,i[t],e.code)()});return n(e.template,s)};
@@ -1,7 +1,6 @@
1
1
  import { Branded } from '@salsita-ai/common/utils';
2
- import type { DomainEntity, ProductPreset } from '#package/domain';
2
+ import type { DomainEntity, ProductPreset, SpecPreset } from '#package/domain';
3
3
  import type { RuntimeReferenceStore } from '../../../caching/index.js';
4
- import type { Preset } from '../../../parse-application-files/index.js';
5
4
  type AnyProductPreset = ProductPreset<DomainEntity<string>, DomainEntity<string>>;
6
5
  /** Collection of runtime presets with change tracking. */
7
6
  export type PresetRuntime = Branded<'PresetRuntime', {
@@ -10,7 +9,7 @@ export type PresetRuntime = Branded<'PresetRuntime', {
10
9
  }>;
11
10
  interface PresetRuntimeProps {
12
11
  readonly referenceScope: string;
13
- readonly presets: readonly Preset[];
12
+ readonly presets: readonly SpecPreset[];
14
13
  }
15
14
  /**
16
15
  * Builds preset runtime objects with per-item reference stability.
@@ -1,4 +1,4 @@
1
- import type { ExpressionName, Expressions, MemoEvalPlan } from '../../../parse-application-files/index.js';
1
+ import type { ExpressionName, Expressions, MemoEvalPlan } from '#package/domain';
2
2
  import type { SpecCodeMap } from '../spec-code/index.js';
3
3
  /** The self-free `constants:` plans declared on one entity or alias, or `undefined` when it has none. */
4
4
  export declare const findReflectionConstants: (expressions: Expressions, entityOrAlias: string) => ReadonlyMap<ExpressionName, MemoEvalPlan> | undefined;
@@ -1,4 +1,4 @@
1
- import type { SelfAccessor } from '../../../core/index.js';
1
+ import type { SelfAccessor } from '#package/domain';
2
2
  import type { SpecCodeId } from '../../runtime-spec/index.js';
3
3
  import type { SpecCodeMap } from './spec-code-module.js';
4
4
  /**