@salsita-ai/sdk 0.50.0-develop.8f6deac646 → 0.50.0-develop.9267bdc12e

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 (273) hide show
  1. package/README.md +2 -2
  2. package/dist/application-spec/errors/diagnostic-codes.d.ts +5 -0
  3. package/dist/application-spec/errors/diagnostic-codes.js +1 -1
  4. package/dist/application-spec/errors/diagnostic-messages.d.ts +5 -0
  5. package/dist/application-spec/errors/diagnostic-messages.js +1 -1
  6. package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +8 -1
  7. package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
  8. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-defaults.d.ts +4 -2
  9. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +48 -48
  10. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
  11. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-relation-expressions.js +1 -1
  12. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.d.ts +6 -8
  13. package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +11 -11
  14. package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +1 -1
  15. package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
  16. package/dist/application-spec/generate-application/code/templates/domain-spec.js +12 -12
  17. package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
  18. package/dist/application-spec/generate-application/code/templates/globals.js +5 -4
  19. package/dist/application-spec/generate-application/code/templates/index.d.ts +0 -7
  20. package/dist/application-spec/generate-application/code/templates/index.js +1 -1
  21. package/dist/application-spec/generate-application/code/templates/package-json.js +1 -1
  22. package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +8 -2
  23. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +9 -10
  24. package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -4
  25. package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +1 -3
  26. package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +1 -3
  27. package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +2 -1
  28. package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
  29. package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +2 -4
  30. package/dist/application-spec/parse-application-files/categorize/module-analysis.d.ts +1 -1
  31. package/dist/application-spec/parse-application-files/categorize/module-analysis.js +1 -1
  32. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +1 -1
  33. package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
  34. package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
  35. package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
  36. package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +7 -2
  37. package/dist/application-spec/parse-application-files/spec/model/defaults.js +1 -1
  38. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.d.ts +25 -0
  39. package/dist/application-spec/parse-application-files/spec/relations/reference-field-type.js +1 -0
  40. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.d.ts +46 -0
  41. package/dist/application-spec/parse-application-files/spec/relations/relation-field-mismatch.js +1 -0
  42. package/dist/application-spec/parse-application-files/spec/relations/relations.d.ts +4 -3
  43. package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
  44. package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
  45. package/dist/application-spec/parse-application-files/spec/sections/infra.d.ts +2 -0
  46. package/dist/application-spec/parse-application-files/spec/sections/infra.js +1 -1
  47. package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
  48. package/dist/configurator/application-runtime/extensions/selectors.d.ts +3 -1
  49. package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
  50. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +3 -1
  51. package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
  52. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +3 -1
  53. package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
  54. package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
  55. package/dist/configurator/common/configurator-interface.d.ts +5 -1
  56. package/dist/configurator/common/configurator-interface.js +1 -1
  57. package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +6 -0
  58. package/dist/configurator/pages/DefaultConfiguratorLayout.js +1 -0
  59. package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
  60. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.d.ts +1 -75
  61. package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -20
  62. package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
  63. package/dist/configurator/ui/configurator-layout/universal/DesktopSidebar.d.ts +92 -0
  64. package/dist/configurator/ui/configurator-layout/universal/DesktopSidebar.js +16 -0
  65. package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
  66. package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
  67. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +47 -0
  68. package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -0
  69. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +11 -26
  70. package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.js +1 -1
  71. package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +16 -19
  72. package/dist/docs/complex-use-cases/sketching.mdx +0 -38
  73. package/dist/docs/controls/select-attribute/cardselect.mdx +9 -13
  74. package/dist/docs/index.json +11 -1
  75. package/dist/docs/integrations/woocommerce/local-development.mdx +1 -1
  76. package/dist/docs/layouts/custom-layout.mdx +981 -0
  77. package/dist/docs/other-features/side-effects.mdx +8 -11
  78. package/dist/docs/other-features/violation-messages.mdx +52 -56
  79. package/dist/docs/phoenix/configurator-interface.mdx +105 -65
  80. package/dist/docs/phoenix/domain-model.mdx +4 -0
  81. package/dist/docs/phoenix/getting-started.mdx +1 -1
  82. package/dist/docs/phoenix/phoenix-cli.mdx +19 -26
  83. package/dist/docs/phoenix/project-structure.mdx +16 -10
  84. package/dist/docs/phoenix/quickstart.mdx +2 -2
  85. package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
  86. package/dist/docs/phoenix/webhook-membership.mdx +10 -9
  87. package/dist/docs/phoenix/webhooks.mdx +2 -2
  88. package/dist/domain/admin-domain/implementation/common-admin-expressions.d.ts +26 -11
  89. package/dist/domain/admin-domain/implementation/common-admin-publish.d.ts +1 -2
  90. package/dist/domain/admin-domain/index.js +1 -1
  91. package/dist/domain/application/GetApplicationWrapperHandler.d.ts +2 -2
  92. package/dist/domain/application/GetThemeHandler.d.ts +1 -1
  93. package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
  94. package/dist/domain/application/application-config.d.ts +5 -3
  95. package/dist/domain/application/assistant/assistant-fields.d.ts +5 -0
  96. package/dist/domain/application/assistant/assistant-fields.js +1 -0
  97. package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +27 -1
  98. package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
  99. package/dist/domain/application/assistant/index.d.ts +4 -1
  100. package/dist/domain/application/assistant/index.js +1 -1
  101. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +20 -0
  102. package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.js +1 -0
  103. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +10 -0
  104. package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -0
  105. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +48 -0
  106. package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -0
  107. package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +15 -0
  108. package/dist/domain/application/assistant/session-setup/create-session-assistant.js +1 -0
  109. package/dist/domain/application/assistant/session-setup/index.d.ts +4 -0
  110. package/dist/domain/application/assistant/session-setup/index.js +1 -0
  111. package/dist/domain/application/configurator-builder.d.ts +2 -2
  112. package/dist/domain/application/configurator-builder.js +1 -1
  113. package/dist/domain/application/create-initial-published-data.d.ts +6 -7
  114. package/dist/domain/application/index.d.ts +0 -4
  115. package/dist/domain/application/index.js +1 -1
  116. package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
  117. package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
  118. package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
  119. package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
  120. package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
  121. package/dist/domain/application/published-data/map-published-chunked-data.d.ts +1 -1
  122. package/dist/domain/application/published-data/map-published-data.d.ts +7 -3
  123. package/dist/domain/core/component/domain-component-optic.d.ts +11 -19
  124. package/dist/domain/core/component/domain-component-optic.js +2 -2
  125. package/dist/domain/core/component/legacy-filter.d.ts +2 -17
  126. package/dist/domain/core/component/system-component-filter.d.ts +36 -18
  127. package/dist/domain/core/expression/constant-expressions.d.ts +16 -8
  128. package/dist/domain/core/expression/constant-expressions.js +1 -1
  129. package/dist/domain/core/expression/custom-expression.d.ts +17 -4
  130. package/dist/domain/core/expression/custom-expression.js +1 -1
  131. package/dist/domain/core/expression/expression.d.ts +1 -2
  132. package/dist/domain/core/invariant/custom-invariants.d.ts +6 -14
  133. package/dist/domain/core/invariant/invariants.d.ts +1 -4
  134. package/dist/domain/core/recipe/recipes.d.ts +18 -50
  135. package/dist/domain/core/recipe/recipes.js +1 -1
  136. package/dist/domain/core/relation/all-of-type-relation.d.ts +8 -21
  137. package/dist/domain/core/relation/all-of-type-relation.js +1 -1
  138. package/dist/domain/core/relation/direct-relation.d.ts +13 -24
  139. package/dist/domain/core/relation/index.d.ts +0 -1
  140. package/dist/domain/core/relation/indirect-relation.d.ts +12 -67
  141. package/dist/domain/core/relation/indirect-relation.js +1 -1
  142. package/dist/domain/core/relation/relation-factory.d.ts +19 -15
  143. package/dist/domain/core/relation/relation-factory.js +1 -1
  144. package/dist/domain/core/state/migrations.d.ts +14 -45
  145. package/dist/domain/core/state/migrations.js +1 -1
  146. package/dist/domain/core/state/state.d.ts +1 -1
  147. package/dist/domain/domain-builder.d.ts +1 -1
  148. package/dist/domain/domain-builder.js +1 -1
  149. package/dist/domain/domain-runtime/access/selectors.d.ts +9 -0
  150. package/dist/domain/domain-runtime/access/selectors.js +1 -1
  151. package/dist/domain/domain-runtime/access/types.d.ts +2 -0
  152. package/dist/domain/domain-runtime/access/types.js +1 -1
  153. package/dist/domain/domain-runtime/domain-context/selectors.d.ts +14 -13
  154. package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
  155. package/dist/domain/domain-runtime/domain-context/types.d.ts +4 -1
  156. package/dist/domain/domain-runtime/domain-runtime.d.ts +56 -40
  157. package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +19 -0
  158. package/dist/domain/domain-runtime/errors/implementation-error-collector.js +1 -0
  159. package/dist/domain/domain-runtime/errors/implementation-error.d.ts +46 -0
  160. package/dist/domain/domain-runtime/errors/implementation-error.js +1 -0
  161. package/dist/domain/domain-runtime/errors/implementation-errors.d.ts +13 -0
  162. package/dist/domain/domain-runtime/errors/implementation-errors.js +1 -0
  163. package/dist/domain/domain-runtime/errors/index.d.ts +4 -0
  164. package/dist/domain/domain-runtime/errors/index.js +1 -0
  165. package/dist/domain/domain-runtime/errors/to-implementation-errors.d.ts +10 -0
  166. package/dist/domain/domain-runtime/errors/to-implementation-errors.js +1 -0
  167. package/dist/domain/domain-runtime/index.d.ts +1 -0
  168. package/dist/domain/domain-runtime/index.js +1 -1
  169. package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +24 -0
  170. package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -0
  171. package/dist/domain/domain-runtime/spec/index.d.ts +2 -5
  172. package/dist/domain/domain-runtime/spec/index.js +1 -1
  173. package/dist/domain/domain-runtime/spec/initialize.js +1 -1
  174. package/dist/domain/{application → domain-runtime/spec/module-checks}/element-registration.d.ts +2 -2
  175. package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +1 -0
  176. package/dist/domain/{application → domain-runtime/spec/module-checks}/handler-registration.d.ts +1 -1
  177. package/dist/domain/domain-runtime/spec/module-checks/handler-registration.js +1 -0
  178. package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +8 -0
  179. package/dist/domain/domain-runtime/spec/module-checks/index.js +1 -0
  180. package/dist/domain/{project-modules → domain-runtime/spec/module-checks}/project-modules.d.ts +8 -1
  181. package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +1 -0
  182. package/dist/domain/domain-runtime/spec/{resolve-action-modules.d.ts → module-checks/resolve-action-modules.d.ts} +2 -2
  183. package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.js +1 -0
  184. package/dist/domain/domain-runtime/spec/{resolve-component-optic-modules.d.ts → module-checks/resolve-component-optic-modules.d.ts} +2 -2
  185. package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.js +1 -0
  186. package/dist/domain/domain-runtime/spec/{resolve-expression-modules.d.ts → module-checks/resolve-expression-modules.d.ts} +2 -2
  187. package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +1 -0
  188. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +22 -0
  189. package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +1 -0
  190. package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.d.ts +6 -0
  191. package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.js +1 -0
  192. package/dist/domain/domain-runtime/spec/selectors.d.ts +5 -6
  193. package/dist/domain/domain-runtime/spec/selectors.js +1 -1
  194. package/dist/domain/domain-runtime/spec/types.d.ts +2 -1
  195. package/dist/domain/index.d.ts +0 -1
  196. package/dist/domain/mocks/create-mock-domain-context.d.ts +1 -1
  197. package/dist/domain/mocks/create-mock-domain-runtime.d.ts +18 -9
  198. package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
  199. package/dist/domain/mocks/create-mock-domain.d.ts +1 -1
  200. package/dist/domain/mocks/create-mock-domain.js +1 -1
  201. package/dist/domain/mocks/create-mock-state.d.ts +2 -2
  202. package/dist/domain/projections/blender-projections/camera.d.ts +1 -1
  203. package/dist/domain/utils/eval-cache.d.ts +1 -1
  204. package/dist/domain/utils/map-nested-object.d.ts +1 -1
  205. package/dist/editor/domain-editors/use-implementation-files.d.ts +1 -2
  206. package/dist/editor/mocks/EditorMockContext.js +1 -1
  207. package/dist/legacy/domain-cli/gen/configurator-builder.js +13 -12
  208. package/dist/legacy/domain-cli/gen/constant-expressions.js +1 -3
  209. package/dist/legacy/domain-cli/gen/defaults.js +1 -7
  210. package/dist/legacy/domain-cli/gen/implementation.js +7 -11
  211. package/dist/legacy/domain-cli/gen/invariants.js +3 -4
  212. package/dist/legacy/domain-cli/gen/relations.js +1 -1
  213. package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
  214. package/dist/legacy/domain-cli/utils/cache.js +1 -1
  215. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
  216. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
  217. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
  218. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +1 -0
  219. package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/domain-index.js +17 -15
  220. package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
  221. package/dist/phoenix/commands/init.d.ts +4 -4
  222. package/dist/phoenix/commands/init.js +1 -1
  223. package/dist/phoenix/commands/prettier.js +1 -1
  224. package/dist/phoenix/utils/git/index.d.ts +1 -0
  225. package/dist/phoenix/utils/git/index.js +1 -0
  226. package/dist/phoenix/utils/git/is-inside-git-repository.d.ts +6 -0
  227. package/dist/phoenix/utils/git/is-inside-git-repository.js +1 -0
  228. package/dist/phoenix/utils/index.d.ts +1 -0
  229. package/dist/phoenix/utils/index.js +1 -1
  230. package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +2 -0
  231. package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
  232. package/dist/react-sdk/application-runtime/routing/access-service.d.ts +1 -0
  233. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +33 -16
  234. package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
  235. package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +4 -4
  236. package/dist/react-sdk/domain-context/index.d.ts +1 -1
  237. package/dist/react-sdk/domain-context/index.js +1 -1
  238. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +6 -0
  239. package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
  240. package/dist/webhook/builders/webhook-builder.js +1 -1
  241. package/package.json +3 -3
  242. package/dist/application-spec/generate-application/code/templates/env-ci.d.ts +0 -1
  243. package/dist/application-spec/generate-application/code/templates/env-ci.js +0 -25
  244. package/dist/application-spec/generate-application/code/templates/env-example.d.ts +0 -1
  245. package/dist/application-spec/generate-application/code/templates/env-example.js +0 -94
  246. package/dist/application-spec/generate-application/code/templates/prettier-ignore.d.ts +0 -1
  247. package/dist/application-spec/generate-application/code/templates/prettier-ignore.js +0 -6
  248. package/dist/application-spec/generate-application/code/templates/private-assets-readme.d.ts +0 -1
  249. package/dist/application-spec/generate-application/code/templates/private-assets-readme.js +0 -24
  250. package/dist/application-spec/generate-application/code/templates/public-assets-readme.d.ts +0 -1
  251. package/dist/application-spec/generate-application/code/templates/public-assets-readme.js +0 -24
  252. package/dist/application-spec/generate-application/code/templates/readme.d.ts +0 -1
  253. package/dist/application-spec/generate-application/code/templates/readme.js +0 -23
  254. package/dist/application-spec/generate-application/code/templates/skills/agents-md.d.ts +0 -1
  255. package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +0 -2
  256. package/dist/domain/application/element-registration.js +0 -1
  257. package/dist/domain/application/handler-registration.js +0 -1
  258. package/dist/domain/application/resolve-imported-transformers.d.ts +0 -22
  259. package/dist/domain/application/resolve-imported-transformers.js +0 -1
  260. package/dist/domain/application/resource-builder.d.ts +0 -13
  261. package/dist/domain/application/resource-builder.js +0 -1
  262. package/dist/domain/core/relation/relation-implementation.d.ts +0 -7
  263. package/dist/domain/core/relation/relation-implementation.js +0 -1
  264. package/dist/domain/domain-runtime/spec/invariant-builder.d.ts +0 -26
  265. package/dist/domain/domain-runtime/spec/invariant-builder.js +0 -1
  266. package/dist/domain/domain-runtime/spec/resolve-action-modules.js +0 -1
  267. package/dist/domain/domain-runtime/spec/resolve-component-optic-modules.js +0 -1
  268. package/dist/domain/domain-runtime/spec/resolve-expression-modules.js +0 -1
  269. package/dist/domain/domain-runtime/spec/resolve-invariant-modules.d.ts +0 -6
  270. package/dist/domain/domain-runtime/spec/resolve-invariant-modules.js +0 -1
  271. package/dist/domain/project-modules/index.d.ts +0 -1
  272. package/dist/domain/project-modules/index.js +0 -1
  273. package/dist/domain/project-modules/project-modules.js +0 -1
@@ -1,20 +1,18 @@
1
1
  import type { ApplicationSpec } from '../../../../parse-application-files/index.js';
2
2
  import type { RawResourceEntry } from '../../../../parse-application-files/raw-spec/raw-resources.js';
3
3
  /**
4
- * Emits a `new ResourceBuilder().addX({...})...build()` chain mirroring the
5
- * declared resources. The builder's `const` generics carry every resource name
6
- * as a string literal, so `typeof generatedResources` infers the full typed
7
- * union that the downstream `ConfiguratorBuilder.withResources(...)` call
8
- * propagates into webhook handlers and frontend code.
4
+ * Emits the declared resources as an array literal with `as const`. The assertion
5
+ * keeps every resource name as a string literal, so `typeof generatedResources`
6
+ * carries the union of names that the downstream `ConfiguratorBuilder.withResources(...)`
7
+ * call propagates into webhook handlers and frontend code. That call is also what
8
+ * checks each entry against the resource types.
9
9
  */
10
- export declare const generateResourceBuilderChain: (resources: readonly RawResourceEntry[]) => string;
10
+ export declare const generateResourcesLiteral: (resources: readonly RawResourceEntry[]) => string;
11
11
  export interface ResourcesCodegen {
12
12
  /** Block to inject before the `baseConfiguratorBuilder` declaration — empty when no resources. */
13
13
  readonly preBlock: string;
14
14
  /** Chain call to append to the builder — empty when no resources. */
15
15
  readonly builderCall: string;
16
- /** True when the spec declares at least one resource and `ResourceBuilder` must be imported. */
17
- readonly hasResources: boolean;
18
16
  }
19
17
  /**
20
18
  * Builds the full resources codegen surface: the `export const generatedResources`
@@ -1,34 +1,34 @@
1
- import{P as e,match as t}from"ts-pattern";export const generateResourceBuilderChain=r=>{let n=r.map(r=>t(r).with({type:"ConfigurationLink"},e=>` .addLink({
1
+ import{P as e,match as t}from"ts-pattern";export const generateResourcesLiteral=r=>{let n=r.map(r=>t(r).with({type:"ConfigurationLink"},e=>` {
2
2
  type: 'ConfigurationLink',
3
3
  name: '${e.name}',
4
- })`).with({type:"Csv"},e=>{let t=e.s3Key?`,
5
- s3Key: '${e.s3Key}'`:"";return` .addCsv({
4
+ },`).with({type:"Csv"},e=>{let t=e.s3Key?`,
5
+ s3Key: '${e.s3Key}'`:"";return` {
6
6
  type: 'Csv',
7
7
  name: '${e.name}'${t},
8
- })`}).with({type:"Pdf"},e=>{let t=e.s3Key?`,
9
- s3Key: '${e.s3Key}'`:"";return` .addPdf({
8
+ },`}).with({type:"Pdf"},e=>{let t=e.s3Key?`,
9
+ s3Key: '${e.s3Key}'`:"";return` {
10
10
  type: 'Pdf',
11
11
  name: '${e.name}'${t},
12
- })`}).with({type:"Image",clientGenerated:!0,s3Key:e.string},e=>` .addClientGeneratedImage({
12
+ },`}).with({type:"Image",clientGenerated:!0,s3Key:e.string},e=>` {
13
13
  type: 'Image',
14
14
  name: '${e.name}',
15
15
  clientGenerated: true,
16
16
  s3Key: '${e.s3Key}',
17
- })`).with({type:"Image",exists:!0,url:e.string},e=>` .addExistingImage({
17
+ },`).with({type:"Image",exists:!0,url:e.string},e=>` {
18
18
  type: 'Image',
19
19
  name: '${e.name}',
20
20
  exists: true,
21
21
  url: '${e.url}',
22
- })`).with({type:"Image"},e=>` .addGeneratedImage({
22
+ },`).with({type:"Image"},e=>` {
23
23
  type: 'Image',
24
24
  name: '${e.name}',
25
25
  s3Key: '${e.s3Key}',
26
- })`).exhaustive());return`new ResourceBuilder()
26
+ },`).exhaustive());return`[
27
27
  ${n.join("\n")}
28
- .build()`};export const generateResourcesCodegen=e=>{let t=e.infra.resources;if(!(void 0!==t&&t.length>0))return{preBlock:"",builderCall:"",hasResources:!1};let r=generateResourceBuilderChain(t);return{preBlock:`
28
+ ] as const`};export const generateResourcesCodegen=e=>{let t=e.infra.resources;if(void 0===t||0===t.length)return{preBlock:"",builderCall:""};let r=generateResourcesLiteral(t);return{preBlock:`
29
29
  // ---- Resources ----
30
30
 
31
31
  export const generatedResources = ${r}
32
32
 
33
33
  export type Resource = (typeof generatedResources)[number]['name']
34
- `,builderCall:"\n .withResources(generatedResources)",hasResources:!0}};
34
+ `,builderCall:"\n .withResources(generatedResources)"}};
@@ -13,7 +13,7 @@ export { generatePhxExportsBlock, generatePhxGlobalsBlock } from './generate-phx
13
13
  export { generatePresetsCode } from './generate-presets.js';
14
14
  export { generateRelationExpressionsCode } from './generate-relation-expressions.js';
15
15
  export { generateMemoEvalPlanCode } from './generate-memo-eval-plan-code.js';
16
- export { generateResourceBuilderChain, generateResourcesCodegen, type ResourcesCodegen } from './generate-resources.js';
16
+ export { generateResourcesLiteral, generateResourcesCodegen, type ResourcesCodegen } from './generate-resources.js';
17
17
  export { generateResourcesConfigCall } from './generate-resources-config.js';
18
18
  export { generateImportedStateConstants, generateStateConstants, generateStateTypeDecls, type StateConstantsGenerator, } from './generate-states.js';
19
19
  export { generateTextLanguagesCall } from './generate-text-languages.js';
@@ -1 +1 @@
1
- export{generateAclCall}from"./generate-acl.js";export{generateApplicationMetadataBlock}from"./generate-application-metadata.js";export{generateAssistantBlock}from"./generate-assistant.js";export{generateBaseConfiguratorBuilder}from"./generate-base-configurator-builder.js";export{generateComponentOpticsCode}from"./generate-component-optics.js";export{generateDataSchemaConstants}from"./generate-data-schemas.js";export{generateChunksSpec,generateDataSpec}from"./generate-data-spec.js";export{generateDefaultsBlock}from"./generate-defaults.js";export{generateDomainBlock}from"./generate-domain-block.js";export{generateInvariantsBlock}from"./generate-invariants.js";export{generateLocaleCodegen}from"./generate-locale.js";export{generatePhxExportsBlock,generatePhxGlobalsBlock}from"./generate-phx-globals.js";export{generatePresetsCode}from"./generate-presets.js";export{generateRelationExpressionsCode}from"./generate-relation-expressions.js";export{generateMemoEvalPlanCode}from"./generate-memo-eval-plan-code.js";export{generateResourceBuilderChain,generateResourcesCodegen}from"./generate-resources.js";export{generateResourcesConfigCall}from"./generate-resources-config.js";export{generateImportedStateConstants,generateStateConstants,generateStateTypeDecls}from"./generate-states.js";export{generateTextLanguagesCall}from"./generate-text-languages.js";
1
+ export{generateAclCall}from"./generate-acl.js";export{generateApplicationMetadataBlock}from"./generate-application-metadata.js";export{generateAssistantBlock}from"./generate-assistant.js";export{generateBaseConfiguratorBuilder}from"./generate-base-configurator-builder.js";export{generateComponentOpticsCode}from"./generate-component-optics.js";export{generateDataSchemaConstants}from"./generate-data-schemas.js";export{generateChunksSpec,generateDataSpec}from"./generate-data-spec.js";export{generateDefaultsBlock}from"./generate-defaults.js";export{generateDomainBlock}from"./generate-domain-block.js";export{generateInvariantsBlock}from"./generate-invariants.js";export{generateLocaleCodegen}from"./generate-locale.js";export{generatePhxExportsBlock,generatePhxGlobalsBlock}from"./generate-phx-globals.js";export{generatePresetsCode}from"./generate-presets.js";export{generateRelationExpressionsCode}from"./generate-relation-expressions.js";export{generateMemoEvalPlanCode}from"./generate-memo-eval-plan-code.js";export{generateResourcesLiteral,generateResourcesCodegen}from"./generate-resources.js";export{generateResourcesConfigCall}from"./generate-resources-config.js";export{generateImportedStateConstants,generateStateConstants,generateStateTypeDecls}from"./generate-states.js";export{generateTextLanguagesCall}from"./generate-text-languages.js";
@@ -1,38 +1,38 @@
1
- import{CodeImports as e,autoHeader as a,skipApplicationTypeImports as i}from"../common/index.js";import{generateApplicationMetadataBlock as o,generateAssistantBlock as n,generateBaseConfiguratorBuilder as t,generateChunksSpec as s,generateDataSchemaConstants as r,generateDataSpec as p,generateDomainBlock as m,generateLocaleCodegen as d,generatePhxGlobalsBlock as c,generateResourcesCodegen as l,generateStateConstants as u}from"./domain-spec/index.js";let x="@salsita-ai/sdk/domain",g="@salsita-ai/sdk/i18n";export const globalDomainSpecPhxBinding={generateBindingBlock:c,generateStateConstants:u,registerApplicationTypeImports:i};export const generateApplicationSpecDomainSpecFile=(i,c=globalDomainSpecPhxBinding)=>{let u=new e,{registerApplicationTypeImports:f}=c,E=m({domainSpec:i.configurator,invariants:i.configurator.invariants,actions:i.configurator.actions,typePrefix:"",versionNsPrefix:"ModelV",isAdmin:!1,modelVersionsExportName:"modelVersions",relationExpressionsExportName:"relationExpressions",componentOpticsExportName:"componentOptics",valueExpressionsExportName:"valueExpressions",createRecipeExportName:"createRecipe",imports:u,registerApplicationTypeImports:f}),S=m({domainSpec:i.admin,invariants:i.admin.invariants,actions:void 0,typePrefix:"Admin",versionNsPrefix:"AdminV",isAdmin:!0,modelVersionsExportName:"adminModelVersions",relationExpressionsExportName:"adminRelationExpressions",componentOpticsExportName:"adminComponentOptics",valueExpressionsExportName:"adminValueExpressions",createRecipeExportName:"createAdminRecipe",imports:u,registerApplicationTypeImports:f}),{hasResources:$}=l(i);u.addImport(x,"ConfiguratorBuilder"),u.addImport(x,"EnumReflection"),u.addTypeImport(x,"AssistantResolvedManifest"),u.addTypeImport(x,"ChunksSpec"),u.addTypeImport(x,"DataSpec"),u.addTypeImport(x,"EnumLike"),$&&u.addImport(x,"ResourceBuilder"),u.addImport(g,"mergeCatalogs"),u.addImport(g,"sdkCatalog"),u.addImport("@lingui/core","setupI18n");let v=r(i.configurator.dataSchemas,u,f),k=c.generateStateConstants({configuratorStates:i.configurator.states,adminStates:i.admin.states},u,f),I=o(i),{importBlock:N,catalogBlock:h,createI18nExport:A}=d(i.configurator.ui.availableLocales),{preBlock:B,builderBlock:C}=t(i,u,f),R=c.generateBindingBlock();return`${a("domain-spec.ts","Domain builders, model schemas, component optics and expression definitions derived from the spec.")}
2
- ${u.toString()}${N}
1
+ import{CodeImports as e,autoHeader as a,skipApplicationTypeImports as i}from"../common/index.js";import{generateApplicationMetadataBlock as o,generateAssistantBlock as n,generateBaseConfiguratorBuilder as t,generateChunksSpec as s,generateDataSchemaConstants as r,generateDataSpec as p,generateDomainBlock as m,generateLocaleCodegen as d,generatePhxGlobalsBlock as c,generateStateConstants as l}from"./domain-spec/index.js";let x="@salsita-ai/sdk/domain",u="@salsita-ai/sdk/i18n";export const globalDomainSpecPhxBinding={generateBindingBlock:c,generateStateConstants:l,registerApplicationTypeImports:i};export const generateApplicationSpecDomainSpecFile=(i,c=globalDomainSpecPhxBinding)=>{let l=new e,{registerApplicationTypeImports:g}=c,f=m({domainSpec:i.configurator,invariants:i.configurator.invariants,actions:i.configurator.actions,typePrefix:"",versionNsPrefix:"ModelV",isAdmin:!1,modelVersionsExportName:"modelVersions",relationExpressionsExportName:"relationExpressions",componentOpticsExportName:"componentOptics",valueExpressionsExportName:"valueExpressions",createRecipeExportName:"createRecipe",imports:l,registerApplicationTypeImports:g}),E=m({domainSpec:i.admin,invariants:i.admin.invariants,actions:void 0,typePrefix:"Admin",versionNsPrefix:"AdminV",isAdmin:!0,modelVersionsExportName:"adminModelVersions",relationExpressionsExportName:"adminRelationExpressions",componentOpticsExportName:"adminComponentOptics",valueExpressionsExportName:"adminValueExpressions",createRecipeExportName:"createAdminRecipe",imports:l,registerApplicationTypeImports:g});l.addImport(x,"ConfiguratorBuilder"),l.addImport(x,"EnumReflection"),l.addTypeImport(x,"AssistantResolvedManifest"),l.addTypeImport(x,"ChunksSpec"),l.addTypeImport(x,"DataSpec"),l.addTypeImport(x,"EnumLike"),l.addImport(u,"mergeCatalogs"),l.addImport(u,"sdkCatalog"),l.addImport("@lingui/core","setupI18n");let S=r(i.configurator.dataSchemas,l,g),$=c.generateStateConstants({configuratorStates:i.configurator.states,adminStates:i.admin.states},l,g),v=o(i),{importBlock:k,catalogBlock:N,createI18nExport:I}=d(i.configurator.ui.availableLocales),{preBlock:h,builderBlock:A}=t(i,l,g),B=c.generateBindingBlock();return`${a("domain-spec.ts","Domain builders, model schemas, component optics and expression definitions derived from the spec.")}
2
+ ${l.toString()}${k}
3
3
 
4
4
  // ---- Data schemas ----
5
5
 
6
- ${v}
6
+ ${S}
7
7
 
8
8
  // ---- Admin domain ----
9
9
 
10
- ${S}
10
+ ${E}
11
11
 
12
12
  // ---- Configurator domain ----
13
13
 
14
- ${E}
14
+ ${f}
15
15
 
16
16
  // ---- i18n ----
17
17
 
18
- ${h}
18
+ ${N}
19
19
 
20
- ${A}
20
+ ${I}
21
21
 
22
22
  // ---- Application metadata ----
23
23
 
24
- ${I}
24
+ ${v}
25
25
 
26
26
  // ---- State enums ----
27
27
 
28
- ${k}
28
+ ${$}
29
29
 
30
30
  const $dataSpec: DataSpec = ${p(i.dataSpec.entries)}
31
31
 
32
32
  const $chunks: ChunksSpec = ${s(i.dataSpec.chunks)}
33
33
 
34
34
  ${n(i.configurator.assistant)}
35
- ${B}
36
- ${C}
35
+ ${h}
36
+ ${A}
37
37
 
38
- ${R}`};
38
+ ${B}`};
@@ -1,9 +1,9 @@
1
- import{CodeImports as i}from"../common/code-imports.js";import{autoHeader as o}from"../common/file-headers.js";let n=/v(\d+)\.ts$/,t=(i,o)=>i.versionedModels.filter(i=>void 0!==i.migrationFile).map(i=>({version:i.version,file:i.migrationFile,importName:o?`${o}MigrateToV${i.version}`:`migrateToV${i.version}`})),s=i=>i.map(i=>{let o=i.file.replace(n,`v${i.version}.js`),t=`migrateToV${i.version}`,s=i.importName!==t?` as ${i.importName}`:"";return`import { ${t}${s} } from '../${o}'`}).join("\n"),e=(i,o,n,t)=>[`const ${t}Migrations = {`,...i.map(i=>` ${i.version}: ${i.importName},`),"}","",`const ${t} = MigrateFunctionBuilder`,` .fromVersions(${o})`,` .to(${n})`,` .using(${t}Migrations)`," .build()"].join("\n");export const generateApplicationSpecDomainFile=n=>{let r=new i,a="./domain-spec.js",m="./configurator-domain-code.js",d="./admin-domain-code.js",p=i=>[...i.expressions.values()].some(i=>[...i.values()].some(i=>"relation"===i.implementation.kind)),l=p(n.configurator.expressions),c=p(n.admin.expressions),u=t(n.configurator.resolvedVersions,""),g=t(n.admin.resolvedVersions,"admin"),h=u.length>0,I=g.length>0;r.addImport(a,"baseConfiguratorBuilder"),r.addImport(a,"domainBuilder"),r.addImport(a,"adminDomainBuilder"),r.addImport(a,"attachComponent"),r.addImport(a,"attachAdminComponent"),r.addImport(a,"implementCustomExpressions"),r.addImport(a,"implementAdminCustomExpressions"),r.addImport(a,"createI18n"),r.addImport(a,"componentOptics"),r.addImport(a,"adminComponentOptics"),r.addImport(a,"invariantBuilder"),r.addImport(a,"adminInvariantBuilder"),r.addImport(m,"customExpressions"),r.addImport(m,"customInvariants"),r.addImport(m,"customActions"),r.addImport(d,"customAdminExpressions"),r.addImport(d,"customAdminInvariants"),l&&r.addImport(a,"relationExpressions"),c&&r.addImport(a,"adminRelationExpressions"),(h||I)&&r.addImport("@salsita-ai/sdk/domain","MigrateFunctionBuilder"),h&&r.addImport(a,"modelVersions"),I&&r.addImport(a,"adminModelVersions");let x=[];h&&x.push(s(u)),I&&x.push(s(g));let v=x.length>0?"\n"+x.join("\n")+"\n":"",$=[];h&&$.push(e(u,"modelVersions",n.configurator.schemaVersion,"migrate")),I&&$.push(e(g,"adminModelVersions",n.admin.schemaVersion,"migrateAdmin"));let E=$.length>0?"\n"+$.join("\n\n")+"\n":"",f=["const domainFactory = domainBuilder",l?" .withExpressions(relationExpressions)":null," .withExpressions(invariantBuilder.withInvariantModules(customInvariants).buildViolationExpressions())"," .withExpressionModules(customExpressions)"," .withActionModules(customActions)",h?" .withMigrate(migrate)":null," .build()"].filter(Boolean).join("\n"),A=["const adminDomainFactory = adminDomainBuilder",c?" .withExpressions(adminRelationExpressions)":null," .withExpressions(adminInvariantBuilder.withInvariantModules(customAdminInvariants).buildViolationExpressions())"," .withExpressionModules(customAdminExpressions)",I?" .withMigrate(migrateAdmin)":null," .build()"].filter(Boolean).join("\n");return`${o("domain.ts","Assembles domain and admin domain factories from builders, migrations, expressions and invariants.")}
2
- ${r.toString()}
1
+ import{CodeImports as o}from"../common/code-imports.js";import{autoHeader as i}from"../common/file-headers.js";let n=/v(\d+)\.ts$/,s=(o,i)=>o.versionedModels.filter(o=>void 0!==o.migrationFile).map(o=>({version:o.version,file:o.migrationFile,importName:i?`${i}MigrateToV${o.version}`:`migrateToV${o.version}`})),t=o=>o.map(o=>{let i=o.file.replace(n,`v${o.version}.js`),s=`migrateToV${o.version}`,t=o.importName!==s?` as ${o.importName}`:"";return`import { ${s}${t} } from '../${i}'`}).join("\n"),e=(o,i,n,s)=>[`const ${s}Migrations = {`,...o.map(o=>` ${o.version}: ${o.importName},`),"}","",`const ${s} = createMigrateFunction(${i}, ${n}, ${s}Migrations)`].join("\n");export const generateApplicationSpecDomainFile=n=>{let a=new o,r="./domain-spec.js",m="./configurator-domain-code.js",d="./admin-domain-code.js",p="@salsita-ai/sdk/domain",l=o=>[...o.expressions.values()].some(o=>[...o.values()].some(o=>"relation"===o.implementation.kind)),c=l(n.configurator.expressions),u=l(n.admin.expressions),x=s(n.configurator.resolvedVersions,""),I=s(n.admin.resolvedVersions,"admin"),g=x.length>0,h=I.length>0;a.addImport(r,"baseConfiguratorBuilder"),a.addImport(r,"domainBuilder"),a.addImport(r,"adminDomainBuilder"),a.addImport(r,"attachComponent"),a.addImport(r,"attachAdminComponent"),a.addImport(r,"implementCustomExpressions"),a.addImport(r,"implementAdminCustomExpressions"),a.addImport(r,"createI18n"),a.addImport(r,"componentOptics"),a.addImport(r,"adminComponentOptics"),a.addImport(r,"aliases"),a.addImport(r,"adminAliases"),a.addImport(r,"commonAdminInvariants"),a.addImport(p,"createViolationExpressions"),a.addImport(m,"customExpressions"),a.addImport(m,"customInvariants"),a.addImport(m,"customActions"),a.addImport(d,"customAdminExpressions"),a.addImport(d,"customAdminInvariants"),c&&a.addImport(r,"relationExpressions"),u&&a.addImport(r,"adminRelationExpressions"),(g||h)&&a.addImport(p,"createMigrateFunction"),g&&a.addImport(r,"modelVersions"),h&&a.addImport(r,"adminModelVersions");let $=[];g&&$.push(t(x)),h&&$.push(t(I));let v=$.length>0?"\n"+$.join("\n")+"\n":"",A=[];g&&A.push(e(x,"modelVersions",n.configurator.schemaVersion,"migrate")),h&&A.push(e(I,"adminModelVersions",n.admin.schemaVersion,"migrateAdmin"));let E=A.length>0?"\n"+A.join("\n\n")+"\n":"",f=["const domainFactory = domainBuilder",c?" .withExpressions(relationExpressions)":null," .withExpressions(createViolationExpressions(aliases, customInvariants))"," .withExpressionModules(customExpressions)"," .withActionModules(customActions)",g?" .withMigrate(migrate)":null," .build()"].filter(Boolean).join("\n"),w=["const adminDomainFactory = adminDomainBuilder",u?" .withExpressions(adminRelationExpressions)":null," .withExpressions(createViolationExpressions(adminAliases, customAdminInvariants, commonAdminInvariants))"," .withExpressionModules(customAdminExpressions)",h?" .withMigrate(migrateAdmin)":null," .build()"].filter(Boolean).join("\n");return`${i("domain.ts","Assembles domain and admin domain factories from builders, migrations, expressions and invariants.")}
2
+ ${a.toString()}
3
3
  ${v}export { attachComponent, attachAdminComponent, implementCustomExpressions, implementAdminCustomExpressions, createI18n }
4
4
  ${E}
5
5
  ${f}
6
- ${A}
6
+ ${w}
7
7
 
8
8
  export const configuratorBuilder = baseConfiguratorBuilder
9
9
  .withDomainFactory(domainFactory)
@@ -1,9 +1,9 @@
1
- import{autoHeader as e}from"../common/file-headers.js";import{generateApplicationSpecTypeDeclarations as a}from"./application-types.js";export const generateApplicationSpecGlobals=(o,n)=>{let t,i,l,r,d,s,p,m,y,{declarations:c,imports:f}=a(o,n,2);f.addTypeImport("@salsita-ai/sdk/domain","EnumLike");let h=[c,(t=o.configurator.latestModel,i=o.admin.latestModel,l=t.entityTypes.map(String),r=[...t.aliases].map(([e])=>String(e)),d=[...t.commonTypes].map(([e])=>String(e)),s=i.entityTypes.map(String),p=[...i.aliases].map(([e])=>String(e)),m=[...i.commonTypes].map(([e])=>String(e)),y=(e,a)=>e.map(e=>` ${a(e)}`).join("\n"),` interface Model {
2
- ${y([...l,...d,...r],e=>`readonly ${e}: ${e}`)}
1
+ import{autoHeader as e}from"../common/file-headers.js";import{generateApplicationSpecTypeDeclarations as a}from"./application-types.js";export const generateApplicationSpecGlobals=(o,t)=>{let n,i,r,l,d,s,p,m,y,{declarations:c,imports:f}=a(o,t,2);f.addTypeImport("@salsita-ai/sdk/domain","EnumLike");let u=[c,(n=o.configurator.latestModel,i=o.admin.latestModel,r=n.entityTypes.map(String),l=[...n.aliases].map(([e])=>String(e)),d=[...n.commonTypes].map(([e])=>String(e)),s=i.entityTypes.map(String),p=[...i.aliases].map(([e])=>String(e)),m=[...i.commonTypes].map(([e])=>String(e)),y=(e,a)=>e.map(e=>` ${a(e)}`).join("\n"),` interface Model {
2
+ ${y([...r,...d,...l],e=>`readonly ${e}: ${e}`)}
3
3
  }
4
4
 
5
5
  interface EnhancedModel {
6
- ${y([...l,...r],e=>`readonly $${e}: $${e}`)}
6
+ ${y([...r,...l],e=>`readonly $${e}: $${e}`)}
7
7
  }
8
8
 
9
9
  interface AdminModel {
@@ -44,7 +44,7 @@ ${y([...s,...p],e=>`readonly $${e}: Admin.$${e}`)}
44
44
  ${f.toTypeOnlyString(".phoenix/globals.d.ts")}
45
45
 
46
46
  declare global {
47
- ${h}
47
+ ${u}
48
48
 
49
49
  interface PhxGlobal {
50
50
  readonly frontendEnv: import('./frontend.config.js').RuntimeConfig
@@ -74,6 +74,7 @@ ${h}
74
74
  readonly implementCustomExpressions: typeof import('./domain-spec.js').implementCustomExpressions
75
75
  readonly implementCustomInvariants: typeof import('./domain-spec.js').implementCustomInvariants
76
76
  readonly implementActions: typeof import('./domain-spec.js').implementActions
77
+ readonly createAssistantSetupHandler: typeof import('./domain-spec.js').createAssistantSetupHandler
77
78
  readonly attachComponent: typeof import('./domain-spec.js').attachComponent
78
79
  readonly createRecipe: typeof import('./domain-spec.js').createRecipe
79
80
 
@@ -12,7 +12,6 @@
12
12
  * @module
13
13
  */
14
14
  export { stripSdkMarkerContent } from './common/strip-sdk-marker-content.js';
15
- export { generateAgentsMd } from './skills/agents-md.js';
16
15
  export { generateApplicationSpecAdminConfig } from './admin-config.js';
17
16
  export { generateApplicationSpecAdminCode } from './admin-domain-code.js';
18
17
  export { generateApplicationSpecAdminFrontendCode } from './admin-frontend-code.js';
@@ -30,8 +29,6 @@ export { generateApplicationSpecDomainFile } from './domain.js';
30
29
  export { generateApplicationSpecEditorFile } from './editor.js';
31
30
  export { generateApplicationSpecEmbeddedAdmin } from './embedded-admin.js';
32
31
  export { generateApplicationSpecEmbeddedConfigurator } from './embedded-configurator.js';
33
- export { generateApplicationSpecEnvCi } from './env-ci.js';
34
- export { generateApplicationSpecEnvExample } from './env-example.js';
35
32
  export { generateApplicationSpecEslintConfig } from './eslint-config.js';
36
33
  export { generateApplicationSpecFavicon } from './favicon.js';
37
34
  export { generateApplicationSpecFrontendConfig } from './frontend-config.js';
@@ -49,10 +46,6 @@ export { generatePhoenixReviewSkill } from './skills/phoenix-review-skill.js';
49
46
  export { type PhoenixSkillOptions, followsCanaryBuilds, generatePhoenixSkill } from './skills/phoenix-skill.js';
50
47
  export { generatePhoenixVariantsSkill } from './skills/phoenix-variants-skill.js';
51
48
  export { generateApplicationSpecPrettierConfig } from './prettier-config.js';
52
- export { generateApplicationSpecPrettierIgnore } from './prettier-ignore.js';
53
- export { generateApplicationSpecPrivateAssetsReadme } from './private-assets-readme.js';
54
- export { generateApplicationSpecPublicAssetsReadme } from './public-assets-readme.js';
55
- export { generateApplicationSpecReadme } from './readme.js';
56
49
  export { generateApplicationSpecRobotsTxt } from './robots-txt.js';
57
50
  export { generateApplicationSpecStoryDevDeclaration, generateApplicationSpecStoryPhxModule, generateApplicationSpecStoryRawProjectFiles, generateApplicationSpecStoryWrapper, } from './story/index.js';
58
51
  export { generateApplicationSpecTsconfig } from './tsconfig.js';
@@ -1 +1 @@
1
- export{stripSdkMarkerContent}from"./common/strip-sdk-marker-content.js";export{generateAgentsMd}from"./skills/agents-md.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{generateApplicationSpecEnvCi}from"./env-ci.js";export{generateApplicationSpecEnvExample}from"./env-example.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{generateApplicationSpecNvmrc}from"./nvmrc.js";export{generateApplicationSpecPackageJson}from"./package-json.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{generateApplicationSpecPrettierIgnore}from"./prettier-ignore.js";export{generateApplicationSpecPrivateAssetsReadme}from"./private-assets-readme.js";export{generateApplicationSpecPublicAssetsReadme}from"./public-assets-readme.js";export{generateApplicationSpecReadme}from"./readme.js";export{generateApplicationSpecRobotsTxt}from"./robots-txt.js";export{generateApplicationSpecStoryDevDeclaration,generateApplicationSpecStoryPhxModule,generateApplicationSpecStoryRawProjectFiles,generateApplicationSpecStoryWrapper}from"./story/index.js";export{generateApplicationSpecTsconfig}from"./tsconfig.js";export{generateApplicationSpecWebhookBuilders}from"./webhook-builders.js";export{generateApplicationSpecWebhookImplementation}from"./webhook-implementation.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{generateApplicationSpecNvmrc}from"./nvmrc.js";export{generateApplicationSpecPackageJson}from"./package-json.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{generateApplicationSpecStoryDevDeclaration,generateApplicationSpecStoryPhxModule,generateApplicationSpecStoryRawProjectFiles,generateApplicationSpecStoryWrapper}from"./story/index.js";export{generateApplicationSpecTsconfig}from"./tsconfig.js";export{generateApplicationSpecWebhookBuilders}from"./webhook-builders.js";export{generateApplicationSpecWebhookImplementation}from"./webhook-implementation.js";export{generateApplicationSpecWebhookIndex}from"./webhook-index.js";export{generateApplicationSpecWebhooksConfig}from"./webhooks-config.js";
@@ -1 +1 @@
1
- let e=["@salsita-ai/platform-project-sdk","@salsita-ai/platform-common","@salsita-ai/platform-contracts","@salsita-ai/common","@salsita-ai/contracts"],t=(e,t)=>e>t?1:e<t?-1:0,r={private:!0,type:"module",packageManager:"pnpm@11.1.3",engines:{node:"24.14.1",pnpm:"11.1.3"}},i={"babel-plugin-macros":"3.1.0",vite:"6.4.3","@vitejs/plugin-react":"5.2.0","@swc/cli":"0.8.1","@swc/core":"1.15.40",typescript:"npm:@typescript/typescript6@6.0.2","@lingui/cli":"5.9.5","@types/lodash-es":"4.17.12","@lingui/macro":"5.9.5","@lingui/swc-plugin":"5.11.0","@types/node":"24.12.2","@types/react":"18.3.8","@types/react-dom":"18.3.0","@types/three":"0.160.0","@typescript/native":"npm:typescript@7.0.2",envalid:"8.1.1",eslint:"9.39.4",prettier:"3.8.3",vitest:"4.1.11"},n={build:"phoenix build",clean:"phoenix clean",dev:"phoenix dev","dev:local":"phoenix dev --persistence local-storage",sync:"phoenix sync",check:"phoenix check",fix:"phoenix fix","verify:fix":"phoenix build && phoenix fix && phoenix check --types",test:"vitest --passWithNoTests run","test:watch":"vitest","prepare:ci":"phoenix prepare:ci","deployment:prepare-local":"phoenix deployment:prepare-local"},s=["environment:create","environment:list","deployment:register","deployment:register:skip","lint:check","prettify:check","ts:check","lint:fix","prettify:fix"],c=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),o=e=>{if(!c(e))return;let t=[];for(let[r,i]of Object.entries(e)){if("string"!=typeof i)return;t.push([r,i])}return Object.fromEntries(t)},a=e=>e.replace(/^[\^~]/,""),p=(r,i)=>{let n={};for(let[e,t]of Object.entries(r))n[e]=a(t);if(i)for(let[e,t]of Object.entries(i))e in n||(n[e]=a(t));return Object.fromEntries(Object.entries(n).filter(([t])=>!e.includes(t)).sort(([e],[r])=>t(e,r)))};export const generateApplicationSpecPackageJson=e=>{let{sdkVersion:a,useWorkspace:l,useClerk:f=!1,name:m,description:d,existingContent:u}=e,y=(e=>{if(!e)return{};try{let t=JSON.parse(e);if(c(t))return t}catch{}return{}})(u),h=p({...f?{"@clerk/clerk-react":"5.61.8"}:{},"camera-controls":"2.4.2","lodash-es":"4.18.1",react:"18.3.1","react-dom":"18.3.1","@emotion/react":"11.11.3","@emotion/styled":"11.11.0","@mui/material":"5.15.5","@mui/system":"5.16.7","@lingui/core":"5.9.5","@lingui/react":"5.9.5",three:"0.160.1","@react-three/fiber":"8.15.16","@react-three/drei":"9.97.6","@react-three/postprocessing":"2.16.3",motion:"12.34.0","@tanstack/react-query":"5.100.14",rxjs:"7.8.2",uuid:"14.0.0","ts-pattern":"5.9.0","@salsita-ai/sdk":l?"workspace:^":a,zod:"3.25.76"},o(y.dependencies)),g=p(i,o(y.devDependencies)),x=((e,r)=>{let i={};for(let[t,r]of Object.entries(e))i[t]=r;if(r)for(let[e,t]of Object.entries(r))e in i||(i[e]=t);return Object.fromEntries(Object.entries(i).filter(([e])=>!s.includes(e)).sort(([e],[r])=>t(e,r)))})({...n,...l?{dev:"phoenix dev --local"}:{}},o(y.scripts)),v=y.name,b=m?m.toLowerCase().replace(/[^a-z0-9-]/g,"-"):"string"==typeof v?v:"project-name",j={...y,name:b,...r,scripts:x,dependencies:h,devDependencies:g};return void 0!==d&&(j.description=d),JSON.stringify(j,null,2)+"\n"};
1
+ let e=["@salsita-ai/platform-project-sdk","@salsita-ai/platform-common","@salsita-ai/platform-contracts","@salsita-ai/common","@salsita-ai/contracts"],t={private:!0,type:"module",packageManager:"pnpm@11.1.3",engines:{node:"24.14.1",pnpm:"11.1.3"}},r={"babel-plugin-macros":"3.1.0",vite:"6.4.3","@vitejs/plugin-react":"5.2.0","@swc/cli":"0.8.1","@swc/core":"1.15.40",typescript:"npm:@typescript/typescript6@6.0.2","@lingui/cli":"5.9.5","@types/lodash-es":"4.17.12","@lingui/macro":"5.9.5","@lingui/swc-plugin":"5.11.0","@types/node":"24.12.2","@types/react":"18.3.8","@types/react-dom":"18.3.0","@types/three":"0.160.0","@typescript/native":"npm:typescript@7.0.2",envalid:"8.1.1",eslint:"9.39.4",prettier:"3.8.3",vitest:"4.1.11"},i=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),a=e=>{if(!i(e))return;let t=[];for(let[r,i]of Object.entries(e)){if("string"!=typeof i)return;t.push([r,i])}return Object.fromEntries(t)},s=e=>e.replace(/^[\^~]/,""),n=(t,r)=>{let i={};for(let[e,r]of Object.entries(t))i[e]=s(r);if(r)for(let[e,t]of Object.entries(r))e in i||(i[e]=s(t));return Object.fromEntries(Object.entries(i).filter(([t])=>!e.includes(t)).sort(([e],[t])=>e>t?1:e<t?-1:0))};export const generateApplicationSpecPackageJson=e=>{let{sdkVersion:s,useWorkspace:c,useClerk:o=!1,name:p,description:l,existingContent:m}=e,u=(e=>{if(!e)return{};try{let t=JSON.parse(e);if(i(t))return t}catch{}return{}})(m),f=n({...o?{"@clerk/clerk-react":"5.61.8"}:{},"camera-controls":"2.4.2","lodash-es":"4.18.1",react:"18.3.1","react-dom":"18.3.1","@emotion/react":"11.11.3","@emotion/styled":"11.11.0","@mui/material":"5.15.5","@mui/system":"5.16.7","@lingui/core":"5.9.5","@lingui/react":"5.9.5",three:"0.160.1","@react-three/fiber":"8.15.16","@react-three/drei":"9.97.6","@react-three/postprocessing":"2.16.3",motion:"12.34.0","@tanstack/react-query":"5.100.14",rxjs:"7.8.2",uuid:"14.0.0","ts-pattern":"5.9.0","@salsita-ai/sdk":c?"workspace:^":s,zod:"3.25.76"},a(u.dependencies)),d=n(r,a(u.devDependencies)),y=u.name,g=p?p.toLowerCase().replace(/[^a-z0-9-]/g,"-"):"string"==typeof y?y:"project-name",j={...u,name:g,...t,dependencies:f,devDependencies:d};return void 0!==l&&(j.description=l),JSON.stringify(j,null,2)+"\n"};
@@ -1,4 +1,4 @@
1
- import{renderAgentSkill as e}from"./agent-skill.js";let i=`Review all current git changes for correctness, Phoenix pattern violations, and security issues.
1
+ import{renderAgentSkill as e}from"./agent-skill.js";let s=`Review all current git changes for correctness, Phoenix pattern violations, and security issues.
2
2
 
3
3
  ## Phoenix-Specific Review
4
4
 
@@ -28,6 +28,12 @@ import{renderAgentSkill as e}from"./agent-skill.js";let i=`Review all current gi
28
28
  - [ ] No unnecessary React re-renders (stable object references via memoEval)
29
29
  - [ ] Export pattern correct: default export of single component or array
30
30
 
31
+ ### Assistant setup (src/handlers/)
32
+
33
+ - [ ] At most one phx.domain.createAssistantSetupHandler, synchronous, pure and deterministic over manifest and session inputs
34
+ - [ ] Only removes original declaration entries, exposes descriptions and restriction flags, and rejects immutable keys
35
+ - [ ] Narrows fields on the declaring alias before expansion; runs in browser execution and the webhook; browser GraphQL, tools and change recording use session narrowing while UI retains pure spec selectors; empty server instructions clear the baseline
36
+
31
37
  ### Webhooks (src/webhooks/)
32
38
 
33
39
  - [ ] Use phx.webhooks.\\*Builder pattern (finalizeHandlerBuilder, authHandlerBuilder)
@@ -106,4 +112,4 @@ import{renderAgentSkill as e}from"./agent-skill.js";let i=`Review all current gi
106
112
  - **Overall assessment**: <1-2 sentence summary>
107
113
  \`\`\`
108
114
 
109
- If no findings at a severity level, omit that section. If no findings at all, state "No issues found" with a brief note on what was checked.`;export const generatePhoenixReviewSkill=()=>e({name:"phoenix-review",description:"Phoenix-specific code review checklist and report format for specs, expressions, invariants, components, webhooks, TypeScript and React code. Use when reviewing changes in this Phoenix configurator project, before committing or when asked for a code review.",sections:[i]});
115
+ If no findings at a severity level, omit that section. If no findings at all, state "No issues found" with a brief note on what was checked.`;export const generatePhoenixReviewSkill=()=>e({name:"phoenix-review",description:"Phoenix-specific code review checklist and report format for specs, expressions, invariants, components, webhooks, TypeScript and React code. Use when reviewing changes in this Phoenix configurator project, before committing or when asked for a code review.",sections:[s]});
@@ -1,15 +1,11 @@
1
1
  /**
2
2
  * Documented Phoenix SDK guidance, one Markdown section per entry.
3
3
  *
4
- * The agent guidance shipped into generated projects — the starter `AGENTS.md` and the Phoenix-owned
5
- * agent skills — is composed from these sections, so each documented fact has exactly one home and
6
- * the generated files differ only in which sections they carry.
4
+ * The agent guidance shipped into generated projects — the Phoenix-owned agent skills — is composed
5
+ * from these sections, so each documented fact has exactly one home and the generated files differ
6
+ * only in which sections they carry.
7
7
  */
8
8
  export declare const sdkGuidanceSections: {
9
- /** Opening description of what a Phoenix configurator project is. */
10
- readonly projectIntro: `## Phoenix Configurator Project
11
-
12
- Declarative 3D product configurator built with Phoenix SDK. Domain model defined in YAML, custom logic in TypeScript.`;
13
9
  /** The three everyday `phoenix` package scripts. */
14
10
  readonly buildCommands: `## Build Commands
15
11
  - \`pnpm phoenix build\` — Full production build
@@ -30,6 +26,7 @@ Declarative 3D product configurator built with Phoenix SDK. Domain model defined
30
26
  - \`src/transformers/\` — Automatic state fixers (\`phx.frontend.transformerBuilder\`)
31
27
  - \`src/components/\` — ECS system components (\`phx.domain.attachComponent.withEntity()\`)
32
28
  - \`src/elements/\` — Page-level React components (\`phx.frontend.createCustomPhoenixLayoutElement()\`)
29
+ - A layout element named \`ConfiguratorLayout\` replaces everything the built-in layout renders for a loaded configuration, the finalize page included, so prefer arranging the layout in the spec; when you register it, mount \`LayoutSlots.SharedCanvas\` (from \`@salsita-ai/sdk/configurator\`) in it, or the app loader stays on screen, and call \`useSceneSafeArea()\` (same import) with its \`containerRef\` on the element covering the whole canvas and its \`safeAreaRef\` on the region the layout's UI leaves free, so the camera frames the scene there
33
30
  - \`src/handlers/\` — Event & lifecycle handlers
34
31
  - \`src/webhooks/\` — Server-side webhook handlers (\`phx.webhooks.*Builder\`)
35
32
  - \`src/migrations/\` — Schema version migrations (v*.ts)
@@ -70,15 +67,17 @@ The default export must be what the folder's phx factory returns (for example \`
70
67
  /** Which components and handlers are bundled into the webhook. */
71
68
  readonly webhookMembership: `## Webhook Membership
72
69
  - User-authored components, admin components, and handlers are frontend-only by default.
73
- - A handler that registers \`createMapPublishedRevisionDataHandler\`, \`createMapPublishedChunkedDataHandler\`, \`createDataRowValidatorHandler\`, or \`createSheetValidatorHandler\` is included in the webhook automatically.
70
+ - A handler that registers \`phx.domain.createAssistantSetupHandler\`, \`createMapPublishedRevisionDataHandler\`, \`createMapPublishedChunkedDataHandler\`, \`createDataRowValidatorHandler\`, or \`createSheetValidatorHandler\` is included in the webhook automatically.
71
+ - An assistant setup handler receives the declaration-shaped whitelist and { role, sessionData, access }. Keep the exact entity/alias split from YAML; inherited fields and expanded member entries are absent. Narrow original declarations, then the SDK expands them. Use project-defined role/session data for per-user customization. Keep the handler synchronous, pure and deterministic. The handler runs in the browser and webhook. Return null to disable assistant execution, or omit whitelist entries to restrict them. Button and panel visibility use spec presence; project developers own dynamic UI filtering through normal layout mechanics such as $filter. Leaves expose optional descriptions; writable options allow only validate: true and allowDryRuns: false; recipe groups allow descriptions and allowDryRuns: false. Deletable entries are {}. Names, component bindings, hints and types are internal. Omitted overrides retain baseline values. Existing entity, enhanced-entity and action types constrain the handler; no separate generated manifest types. Browser GraphQL, tools and change recording use the session-derived manifest; rejected setup fails closed. UI reads the pure spec selector. Omitted server instructions or AI fields preserve the baseline. An empty server instructions string clears it.
74
72
  - To include another component or handler in the webhook, put \`'use webhook'\` as its first statement (leading comments are allowed).
75
73
  - A webhook-included file and its runtime local-import closure must not import browser SDK entrypoints (\`application\`, \`admin\`, \`configurator\`, \`editor\`, \`react\`, \`ui\`) or style/font/image assets. Spec parsing reports the unsafe import and inclusion reason as a diagnostic.
76
74
  - Keep browser rendering in an unpinned file. Move shared server-safe logic into a separate module when both frontend and webhook code need it.`;
77
75
  /** Generated files a project must not edit. */
78
76
  readonly doNotEdit: `## Do Not Edit
79
77
  - \`.phoenix/\` directory — completely regenerated on each build. The one exception is \`.phoenix/variants/\`, where the \`phoenix-variants\` skill has you write option files; a rebuild keeps it
80
- - \`tsconfig.json\`, \`eslint.config.js\`, \`prettier.config.js\`, \`.prettierignore\`, \`.linguirc\`, \`.nvmrc\`
81
- - \`src/locales/\` .ts files — compiled from .po files`;
78
+ - \`tsconfig.json\`, \`eslint.config.js\`, \`prettier.config.js\`, \`.linguirc\`, \`.nvmrc\`
79
+ - \`src/locales/\` .ts files — compiled from .po files
80
+ - \`phoenix\` and \`phoenix-*\` folders under \`.claude/skills/\` and \`.agents/skills/\` — Phoenix rewrites its skills on every sync, removes anything else inside their folders and removes any other \`phoenix-*\` skill folder. To customise a skill, copy it to a folder whose name does not start with \`phoenix\``;
82
81
  /** When and how a deployed domain model gets a new version and a migration, with the recipe for replacing the starter. */
83
82
  readonly modelVersioning: `## Version the Domain Model Once It Is Deployed
84
83
  A deployed model version cannot change, because saved configurations depend on it. \`pnpm phoenix deploy\` is refused, before anything is uploaded, when the model differs from the one already deployed under the same version. The version is not written anywhere: \`model.latest\` is always the highest numbered version plus one, so a spec with only \`latest\` is v1, and \`applicationVersion\` plays no part. \`pnpm phoenix dev\` accepts every model change, so a working preview does not show that the deploy will pass.
@@ -1,12 +1,10 @@
1
- export const sdkGuidanceSections={projectIntro:`## Phoenix Configurator Project
2
-
3
- Declarative 3D product configurator built with Phoenix SDK. Domain model defined in YAML, custom logic in TypeScript.`,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",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- `src/handlers/` — Event & lifecycle handlers\n- `src/webhooks/` — Server-side webhook handlers (`phx.webhooks.*Builder`)\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={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",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 - A layout element named `ConfiguratorLayout` replaces everything the built-in layout renders for a loaded configuration, the finalize page included, so prefer arranging the layout in the spec; when you register it, mount `LayoutSlots.SharedCanvas` (from `@salsita-ai/sdk/configurator`) in it, or the app loader stays on screen, and call `useSceneSafeArea()` (same import) with its `containerRef` on the element covering the whole canvas and its `safeAreaRef` on the region the layout's UI leaves free, so the camera frames the scene there\n- `src/handlers/` — Event & lifecycle handlers\n- `src/webhooks/` — Server-side webhook handlers (`phx.webhooks.*Builder`)\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
4
2
  - Components: PascalCase (.tsx)
5
3
  - Utilities: kebab-case (.ts)
6
4
  - Expressions: entity-name.ts
7
5
  - Migrations: v*.ts (sequential)
8
6
  - Specs: kebab-case.yaml
9
- - Underscore folders (_shared/, _utils/) are NOT auto-imported`,exportRules:'## Export Rules\nAll files in src/expressions/, src/actions/, src/invariants/, src/transformers/, src/components/, src/handlers/, src/elements/, src/webhooks/ MUST use default exports. Can be a single item or an array. Named exports are ignored by the SDK auto-import system.\nThe default export must be what the folder\'s phx factory returns (for example `phx.frontend.createCustomPhoenixLayoutElement()` in src/elements/). Any other value, such as a plain React component, stops the application at start with an "Invalid default export in <file>" error. Put plain components and helpers in an underscore folder.',webhookMembership:"## Webhook Membership\n- User-authored components, admin components, and handlers are frontend-only by default.\n- A handler that registers `createMapPublishedRevisionDataHandler`, `createMapPublishedChunkedDataHandler`, `createDataRowValidatorHandler`, or `createSheetValidatorHandler` is included in the webhook automatically.\n- To include another component or handler in the webhook, put `'use webhook'` as its first statement (leading comments are allowed).\n- A webhook-included file and its runtime local-import closure must not import browser SDK entrypoints (`application`, `admin`, `configurator`, `editor`, `react`, `ui`) or style/font/image assets. Spec parsing reports the unsafe import and inclusion reason as a diagnostic.\n- Keep browser rendering in an unpinned file. Move shared server-safe logic into a separate module when both frontend and webhook code need it.",doNotEdit:"## Do Not Edit\n- `.phoenix/` directory — completely regenerated on each build. The one exception is `.phoenix/variants/`, where the `phoenix-variants` skill has you write option files; a rebuild keeps it\n- `tsconfig.json`, `eslint.config.js`, `prettier.config.js`, `.prettierignore`, `.linguirc`, `.nvmrc`\n- `src/locales/` .ts files — compiled from .po files",modelVersioning:"## Version the Domain Model Once It Is Deployed\nA deployed model version cannot change, because saved configurations depend on it. `pnpm phoenix deploy` is refused, before anything is uploaded, when the model differs from the one already deployed under the same version. The version is not written anywhere: `model.latest` is always the highest numbered version plus one, so a spec with only `latest` is v1, and `applicationVersion` plays no part. `pnpm phoenix dev` accepts every model change, so a working preview does not show that the deploy will pass.\n\nTo change a model that has been deployed as v<N>:\n1. Keep the deployed model, unchanged, as `model.v<N>` in the spec. A file of its own, such as `spec/model-v<N>.yaml`, keeps `latest` readable.\n2. Make the change in `model.latest`, which is now v<N+1>.\n3. Add `src/migrations/v<N+1>.ts` exporting `migrateToV<N+1>`. It receives the saved entities of v<N> and returns entities that are valid in v<N+1>; `ModelV<N>` and `ModelV<N+1>` are generated global namespaces.\n\nThe admin model is versioned on its own, under `src/admin/migrations/`, with its types in `AdminV<N>`.\n\n**Replacing the starter.** When the first deployment of the workspace was the starter, its `Box` model is v1 in production. When the real model replaces it, keep the starter's model as `model.v1` and define the real model in `latest`. Configurations saved from the starter are not worth converting, so the migration returns the starting state of the new model, the `initialDomainEntities` of its preset, and drops the boxes:\n```typescript\n// src/migrations/v2.ts\nimport type { Migration } from '@salsita-ai/sdk/domain'\n\nexport const migrateToV2: Migration<ModelV1.AnyDomainEntity, ModelV2.AnyDomainEntity> = () => [\n // the entities of the new model's preset\n]\n```\nAn entity of a type the new version no longer has must not stay in the returned state. An entity id starts with its type (`Box-1`), so an entity that keeps its data under a new type name needs a new id and every relation pointing at it rewritten. Read `docs/phoenix/migrations.mdx` before writing any other migration.",sdkDocumentation:'## SDK Documentation\n\nAlways search SDK docs for relevant examples before implementing Phoenix features.\n\n### Commands\n- `pnpm phoenix docs` — Full documentation index with descriptions\n- `pnpm phoenix docs -s <term>` — Search all doc content and metadata (case-insensitive)\n- `pnpm phoenix docs --dir` — Print the absolute docs directory for grep or ripgrep\n- `pnpm phoenix docs -r <path>` — Read specific doc (raw text to stdout)\n- `pnpm phoenix docs -c <category>` — List docs in a category\n- `pnpm phoenix docs -l` — List all doc paths with titles\n\n### Key Docs\n- `docs/phoenix/getting-started.mdx` — Setup, prerequisites, first project\n- `docs/phoenix/quickstart.mdx` — End-to-end tutorial building a configurator\n- `docs/phoenix/domain-model.mdx` — Entities, attributes, relations, specs\n- `docs/phoenix/components.mdx` — ECS pattern, YAML components, custom components\n- `docs/phoenix/project-structure.mdx` — Files, folders, conventions\n- `docs/phoenix/best-practices.mdx` — YAML-first, code patterns, common pitfalls\n- `docs/phoenix/state-management.mdx` — Reactive state, RxJS pipelines, data flow\n- `docs/phoenix/expression-context.mdx` — Expression API, context object, helpers\n- `docs/phoenix/webhooks.mdx` — Server-side finalization workflows\n- `docs/phoenix/finalization.mdx` — Finalization system, PDF/email/CSV generation\n- `docs/phoenix/migrations.mdx` — Schema versioning, migration files\n\n### Agent Workflow\n1. Find relevant docs by content: `pnpm phoenix docs -s \'camera\'`\n2. Read matching doc: `pnpm phoenix docs -r docs/3d-scene/cameras/transitions.mdx`\n3. Search within a doc: `pnpm phoenix docs -r <path> | grep "example"`\n4. Search titles only as a fallback: `pnpm phoenix docs -l | grep "camera"`\n5. Search generated files directly when needed: `grep -rn "camera" "$(pnpm phoenix docs --dir)"`\n6. Browse a topic area: `pnpm phoenix docs -c "Layouts"`',assetInspection:"## 3D Asset Inspection\n\nRun `pnpm phoenix inspect:assets` to discover all glTF/GLB files in `public/` and get a summary table. Use `--file <path>` for detailed single-file inspection.\n\n**When to use:** before writing YAML/code that references objectName, materialsToOverride, morphTargetInfluences, or object positioning.\n\n**What it shows per node:**\n- Name, type (Mesh/Light/Camera/Empty), children\n- Transform: `pos=`, `rot=`, `scale=` (only non-default values shown)\n- Per-node morph targets: `morphs=Width,Height`\n- Bounding box: `bounds=WxHxD` (width x height x depth in meters)\n- Origin placement: `origin=center`, `bottom-center`, `top-center`, `bottom-corner`, etc. with numerical offset\n\n**Use cases:**\n- Find exact node names for `objectName` in scene entity components\n- Find material names for `materialsToOverride`\n- Find morph target names for `morphTargetInfluences`\n- Check model dimensions (bounds) for positioning, dimension indicators, or invariants\n- Check origin placement to understand how models anchor (center vs bottom-center)\n- Use `--json` for programmatic access to all data\n\n**Flags:** `--objects`, `--materials`, `--morphs`, `--animations`, `--json`",screenshotCli:"## Screenshot CLI\n\nCapture 3D canvas screenshots from a running dev server via `pnpm phoenix screenshot`.\n\n**Prerequisites:**\n1. `phoenix dev` must be running (starts the WebSocket server on port 3020)\n2. Configurator must be open in a browser (the browser does the actual rendering)\n\n**Options:**\n- `--output, -o` — Output file path (default: `./screenshot.png`)\n- `--width, -w` — Width in pixels (default: 1920)\n- `--height` — Height in pixels (default: 1080)\n- `--format, -f` — Image format: PNG or JPEG (default: PNG)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example workflow:**\n1. Start dev server: `pnpm phoenix dev`\n2. Open configurator in browser (or via Playwright MCP)\n3. Take screenshot: `pnpm phoenix screenshot -o ./render.png -w 2560 --height 1440`\n\n**Use cases:** visual regression testing, generating product images, debugging 3D renders",inspectState:"## Inspect: State\n\nGet the current editor runtime state as JSON via `pnpm phoenix inspect:state`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` — Output file path (prints to stdout if omitted)\n- `--sections, -s` — Comma-separated: entities, navigation, validation (default: all)\n- `--pretty` — Pretty-print JSON (default: true)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example:** `pnpm phoenix inspect:state -o ./state.json -s entities,navigation`\n\n**Lifecycle status:** Always included in response. Shows which systems are ready:\n- `domainLoaded` — domain data loaded\n- `domainContextReady` — domain context initialized (entities available)\n- `configuratorReady` — 3D configurator initialized\n- `sessionAuthenticated` — session service active\n- `editorMode` — editor mode enabled\n\n**Tips:** Use `--sections` to limit payload size. Pipe through `head`/`tail` for partial output (e.g., `pnpm phoenix inspect:state | head -50`).\n\n**Use cases:** AI agent context, debugging entity state, inspecting navigation/validation",inspectData:`## Inspect: Data
7
+ - Underscore folders (_shared/, _utils/) are NOT auto-imported`,exportRules:'## Export Rules\nAll files in src/expressions/, src/actions/, src/invariants/, src/transformers/, src/components/, src/handlers/, src/elements/, src/webhooks/ MUST use default exports. Can be a single item or an array. Named exports are ignored by the SDK auto-import system.\nThe default export must be what the folder\'s phx factory returns (for example `phx.frontend.createCustomPhoenixLayoutElement()` in src/elements/). Any other value, such as a plain React component, stops the application at start with an "Invalid default export in <file>" error. Put plain components and helpers in an underscore folder.',webhookMembership:"## Webhook Membership\n- User-authored components, admin components, and handlers are frontend-only by default.\n- A handler that registers `phx.domain.createAssistantSetupHandler`, `createMapPublishedRevisionDataHandler`, `createMapPublishedChunkedDataHandler`, `createDataRowValidatorHandler`, or `createSheetValidatorHandler` is included in the webhook automatically.\n- An assistant setup handler receives the declaration-shaped whitelist and { role, sessionData, access }. Keep the exact entity/alias split from YAML; inherited fields and expanded member entries are absent. Narrow original declarations, then the SDK expands them. Use project-defined role/session data for per-user customization. Keep the handler synchronous, pure and deterministic. The handler runs in the browser and webhook. Return null to disable assistant execution, or omit whitelist entries to restrict them. Button and panel visibility use spec presence; project developers own dynamic UI filtering through normal layout mechanics such as $filter. Leaves expose optional descriptions; writable options allow only validate: true and allowDryRuns: false; recipe groups allow descriptions and allowDryRuns: false. Deletable entries are {}. Names, component bindings, hints and types are internal. Omitted overrides retain baseline values. Existing entity, enhanced-entity and action types constrain the handler; no separate generated manifest types. Browser GraphQL, tools and change recording use the session-derived manifest; rejected setup fails closed. UI reads the pure spec selector. Omitted server instructions or AI fields preserve the baseline. An empty server instructions string clears it.\n- To include another component or handler in the webhook, put `'use webhook'` as its first statement (leading comments are allowed).\n- A webhook-included file and its runtime local-import closure must not import browser SDK entrypoints (`application`, `admin`, `configurator`, `editor`, `react`, `ui`) or style/font/image assets. Spec parsing reports the unsafe import and inclusion reason as a diagnostic.\n- Keep browser rendering in an unpinned file. Move shared server-safe logic into a separate module when both frontend and webhook code need it.",doNotEdit:"## Do Not Edit\n- `.phoenix/` directory — completely regenerated on each build. The one exception is `.phoenix/variants/`, where the `phoenix-variants` skill has you write option files; a rebuild keeps it\n- `tsconfig.json`, `eslint.config.js`, `prettier.config.js`, `.linguirc`, `.nvmrc`\n- `src/locales/` .ts files — compiled from .po files\n- `phoenix` and `phoenix-*` folders under `.claude/skills/` and `.agents/skills/` — Phoenix rewrites its skills on every sync, removes anything else inside their folders and removes any other `phoenix-*` skill folder. To customise a skill, copy it to a folder whose name does not start with `phoenix`",modelVersioning:"## Version the Domain Model Once It Is Deployed\nA deployed model version cannot change, because saved configurations depend on it. `pnpm phoenix deploy` is refused, before anything is uploaded, when the model differs from the one already deployed under the same version. The version is not written anywhere: `model.latest` is always the highest numbered version plus one, so a spec with only `latest` is v1, and `applicationVersion` plays no part. `pnpm phoenix dev` accepts every model change, so a working preview does not show that the deploy will pass.\n\nTo change a model that has been deployed as v<N>:\n1. Keep the deployed model, unchanged, as `model.v<N>` in the spec. A file of its own, such as `spec/model-v<N>.yaml`, keeps `latest` readable.\n2. Make the change in `model.latest`, which is now v<N+1>.\n3. Add `src/migrations/v<N+1>.ts` exporting `migrateToV<N+1>`. It receives the saved entities of v<N> and returns entities that are valid in v<N+1>; `ModelV<N>` and `ModelV<N+1>` are generated global namespaces.\n\nThe admin model is versioned on its own, under `src/admin/migrations/`, with its types in `AdminV<N>`.\n\n**Replacing the starter.** When the first deployment of the workspace was the starter, its `Box` model is v1 in production. When the real model replaces it, keep the starter's model as `model.v1` and define the real model in `latest`. Configurations saved from the starter are not worth converting, so the migration returns the starting state of the new model, the `initialDomainEntities` of its preset, and drops the boxes:\n```typescript\n// src/migrations/v2.ts\nimport type { Migration } from '@salsita-ai/sdk/domain'\n\nexport const migrateToV2: Migration<ModelV1.AnyDomainEntity, ModelV2.AnyDomainEntity> = () => [\n // the entities of the new model's preset\n]\n```\nAn entity of a type the new version no longer has must not stay in the returned state. An entity id starts with its type (`Box-1`), so an entity that keeps its data under a new type name needs a new id and every relation pointing at it rewritten. Read `docs/phoenix/migrations.mdx` before writing any other migration.",sdkDocumentation:'## SDK Documentation\n\nAlways search SDK docs for relevant examples before implementing Phoenix features.\n\n### Commands\n- `pnpm phoenix docs` — Full documentation index with descriptions\n- `pnpm phoenix docs -s <term>` — Search all doc content and metadata (case-insensitive)\n- `pnpm phoenix docs --dir` — Print the absolute docs directory for grep or ripgrep\n- `pnpm phoenix docs -r <path>` — Read specific doc (raw text to stdout)\n- `pnpm phoenix docs -c <category>` — List docs in a category\n- `pnpm phoenix docs -l` — List all doc paths with titles\n\n### Key Docs\n- `docs/phoenix/getting-started.mdx` — Setup, prerequisites, first project\n- `docs/phoenix/quickstart.mdx` — End-to-end tutorial building a configurator\n- `docs/phoenix/domain-model.mdx` — Entities, attributes, relations, specs\n- `docs/phoenix/components.mdx` — ECS pattern, YAML components, custom components\n- `docs/phoenix/project-structure.mdx` — Files, folders, conventions\n- `docs/phoenix/best-practices.mdx` — YAML-first, code patterns, common pitfalls\n- `docs/phoenix/state-management.mdx` — Reactive state, RxJS pipelines, data flow\n- `docs/phoenix/expression-context.mdx` — Expression API, context object, helpers\n- `docs/phoenix/webhooks.mdx` — Server-side finalization workflows\n- `docs/phoenix/finalization.mdx` — Finalization system, PDF/email/CSV generation\n- `docs/phoenix/migrations.mdx` — Schema versioning, migration files\n\n### Agent Workflow\n1. Find relevant docs by content: `pnpm phoenix docs -s \'camera\'`\n2. Read matching doc: `pnpm phoenix docs -r docs/3d-scene/cameras/transitions.mdx`\n3. Search within a doc: `pnpm phoenix docs -r <path> | grep "example"`\n4. Search titles only as a fallback: `pnpm phoenix docs -l | grep "camera"`\n5. Search generated files directly when needed: `grep -rn "camera" "$(pnpm phoenix docs --dir)"`\n6. Browse a topic area: `pnpm phoenix docs -c "Layouts"`',assetInspection:"## 3D Asset Inspection\n\nRun `pnpm phoenix inspect:assets` to discover all glTF/GLB files in `public/` and get a summary table. Use `--file <path>` for detailed single-file inspection.\n\n**When to use:** before writing YAML/code that references objectName, materialsToOverride, morphTargetInfluences, or object positioning.\n\n**What it shows per node:**\n- Name, type (Mesh/Light/Camera/Empty), children\n- Transform: `pos=`, `rot=`, `scale=` (only non-default values shown)\n- Per-node morph targets: `morphs=Width,Height`\n- Bounding box: `bounds=WxHxD` (width x height x depth in meters)\n- Origin placement: `origin=center`, `bottom-center`, `top-center`, `bottom-corner`, etc. with numerical offset\n\n**Use cases:**\n- Find exact node names for `objectName` in scene entity components\n- Find material names for `materialsToOverride`\n- Find morph target names for `morphTargetInfluences`\n- Check model dimensions (bounds) for positioning, dimension indicators, or invariants\n- Check origin placement to understand how models anchor (center vs bottom-center)\n- Use `--json` for programmatic access to all data\n\n**Flags:** `--objects`, `--materials`, `--morphs`, `--animations`, `--json`",screenshotCli:"## Screenshot CLI\n\nCapture 3D canvas screenshots from a running dev server via `pnpm phoenix screenshot`.\n\n**Prerequisites:**\n1. `phoenix dev` must be running (starts the WebSocket server on port 3020)\n2. Configurator must be open in a browser (the browser does the actual rendering)\n\n**Options:**\n- `--output, -o` — Output file path (default: `./screenshot.png`)\n- `--width, -w` — Width in pixels (default: 1920)\n- `--height` — Height in pixels (default: 1080)\n- `--format, -f` — Image format: PNG or JPEG (default: PNG)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example workflow:**\n1. Start dev server: `pnpm phoenix dev`\n2. Open configurator in browser (or via Playwright MCP)\n3. Take screenshot: `pnpm phoenix screenshot -o ./render.png -w 2560 --height 1440`\n\n**Use cases:** visual regression testing, generating product images, debugging 3D renders",inspectState:"## Inspect: State\n\nGet the current editor runtime state as JSON via `pnpm phoenix inspect:state`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` — Output file path (prints to stdout if omitted)\n- `--sections, -s` — Comma-separated: entities, navigation, validation (default: all)\n- `--pretty` — Pretty-print JSON (default: true)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example:** `pnpm phoenix inspect:state -o ./state.json -s entities,navigation`\n\n**Lifecycle status:** Always included in response. Shows which systems are ready:\n- `domainLoaded` — domain data loaded\n- `domainContextReady` — domain context initialized (entities available)\n- `configuratorReady` — 3D configurator initialized\n- `sessionAuthenticated` — session service active\n- `editorMode` — editor mode enabled\n\n**Tips:** Use `--sections` to limit payload size. Pipe through `head`/`tail` for partial output (e.g., `pnpm phoenix inspect:state | head -50`).\n\n**Use cases:** AI agent context, debugging entity state, inspecting navigation/validation",inspectData:`## Inspect: Data
10
8
 
11
9
  Get the current editor context data as JSON via \`pnpm phoenix inspect:data\`.
12
10
 
@@ -6,7 +6,6 @@ import { AdminRuntime } from './admin-runtime/admin-runtime.js';
6
6
  import { ConfiguratorRuntime } from './configurator-runtime/configurator-runtime.js';
7
7
  import { DataRuntime } from './sections/data-runtime.js';
8
8
  import type { ExpressionImplementations, InvariantImplementations, MissingExpression } from './sections/expression-runtime.js';
9
- type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
10
9
  /**
11
10
  * Runtime objects built from ApplicationSpec.
12
11
  * Domain-specific fields mirror ApplicationSpec configurator/admin nesting.
@@ -31,5 +30,4 @@ export type ApplicationRuntimeResult = {
31
30
  *
32
31
  * Returns an error result when declared expressions are missing implementations.
33
32
  */
34
- export declare const ApplicationRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly AnyImportedTransformer[], invariantImplementations?: InvariantImplementations, adminImplementations?: ExpressionImplementations) => ApplicationRuntimeResult;
35
- export {};
33
+ export declare const ApplicationRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly ImportedTransformer[], invariantImplementations?: InvariantImplementations, adminImplementations?: ExpressionImplementations) => ApplicationRuntimeResult;
@@ -11,7 +11,6 @@ import { ThemeRuntime } from '../sections/theme-runtime.js';
11
11
  import { TransformersRuntime } from '../sections/transformers-runtime.js';
12
12
  import { ConfiguratorModelRuntime } from './configurator-model-runtime.js';
13
13
  import { ConfiguratorStatesRuntime } from './states-runtime.js';
14
- type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
15
14
  export type ConfiguratorRuntime = Branded<'ConfiguratorRuntime', {
16
15
  readonly modelRuntime: ConfiguratorModelRuntime;
17
16
  readonly componentOptics: ComponentOptics;
@@ -30,5 +29,4 @@ export type ConfiguratorRuntimeResult = {
30
29
  readonly ok: false;
31
30
  readonly missingExpressions: readonly MissingExpression[];
32
31
  };
33
- export declare const ConfiguratorRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly AnyImportedTransformer[], invariantImplementations?: InvariantImplementations) => ConfiguratorRuntimeResult;
34
- export {};
32
+ export declare const ConfiguratorRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, implementations: ExpressionImplementations, importedTransformers: readonly ImportedTransformer[], invariantImplementations?: InvariantImplementations) => ConfiguratorRuntimeResult;
@@ -4,7 +4,8 @@ import type { RuntimeReferenceStore } from '../../../caching/index.js';
4
4
  import type { ComponentEntry } from '../../../parse-application-files/spec/index.js';
5
5
  import type { AdminModelRuntime } from '../admin-runtime/admin-model-runtime.js';
6
6
  import type { ConfiguratorModelRuntime } from '../configurator-runtime/configurator-model-runtime.js';
7
- type AnyComponentOptic = DomainComponentOptic<any, any, any, any, any, any, SystemComponentTypeConstraint>;
7
+ /** A component optic of any project, for any component type. */
8
+ export type AnyComponentOptic = DomainComponentOptic<any, any, any, any, any, any, SystemComponentTypeConstraint>;
8
9
  /** A single built component optic with its identifying metadata. */
9
10
  export type ComponentOptic = Branded<'ComponentOptic', {
10
11
  readonly typeOrAlias: string;
@@ -1 +1 @@
1
- import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{createRelationFactory as i}from"#package/domain";import{canonicalEnhancedJsonValueKey as a}from"../../../core/index.js";import{isSdkExpressionImplementation as n}from"../../../parse-application-files/spec/index.js";import{generateMemoEvalPlanRuntime as r}from"./generate-memo-eval-plan-runtime.js";let l={},o={relation:(e,t)=>i(e.aliasMap)(t[0]),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 a=i.entityType,n=Object.entries(e.invariantImplementations).flatMap(([t,i])=>{let n=e.aliasMap[t];return t===a||n?.includes(a)?i:[]});return{origin:{name:"$violations",typeOrAlias:a},evaluate:(e,t,i)=>n.flatMap(a=>a.evaluate(e,t,i)),meta:{}}}},s=e=>{let t=r(e.plan);return{origin:{name:e.name,typeOrAlias:e.entityOrAlias},evaluate:(e,i,a)=>t(a.domain.get$Entity(e,i),i,a),meta:{}}},p=e=>({...(0,o[e.kind])({aliasMap:e.aliasMap,invariantImplementations:e.invariantImplementations},e.params),origin:{name:e.name,typeOrAlias:e.entityOrAlias}});export const ExpressionRuntime=(i,r,o,m,u=l)=>{let d={};for(let[e,t]of i.latestModel.aliases)d[String(e)]=t.map(String);let f=r.createBuilder(`${m}/sdk`,{build:p,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)}),y=r.createBuilder(`${m}/user`,{build:e=>e.impl,getKey:e=>`user::${e.entityType}::${e.name}`,compare:(e,t)=>e.impl===t.impl}),g=r.createBuilder(`${m}/value`,{build:s,getKey:e=>`value::${e.entityOrAlias}::${e.name}`,compare:(e,t)=>e.valueKey===t.valueKey}),c={},v=!1,S=new Set,b=new Set,k=new Set;for(let[e,t]of i.expressions.expressions)for(let[,i]of t){let t=d[String(e)]??[String(e)];if(n(i.implementation)){let a={entityOrAlias:String(e),name:String(i.name),kind:i.implementation.kind,params:i.implementation.params,aliasMap:d,invariantImplementations:u},n=f.build(a);for(let e of(n.changed&&(v=!0),S.add(f.getKey(a)),t))c[e]||(c[e]={}),c[e][String(i.name)]=n.output;continue}if("value"===i.implementation.kind){let n=i.implementation.value,r={entityOrAlias:String(e),name:String(i.name),valueKey:a(n),plan:i.implementation.plan},l=g.build(r);for(let e of(l.changed&&(v=!0),k.add(g.getKey(r)),t))c[e]||(c[e]={}),c[e][String(i.name)]=l.output;continue}}for(let[e,t]of Object.entries(o))for(let[i,a]of Object.entries(t)){let t={entityType:e,name:i,impl:a},n=y.build(t);n.changed&&(v=!0),b.add(y.getKey(t)),c[e]||(c[e]={}),c[e][i]=n.output}f.cleanup(S)&&(v=!0),y.cleanup(b)&&(v=!0),g.cleanup(k)&&(v=!0);let x=[];for(let[e,t]of i.expressions.entityExpressions)for(let a of t.shapeGroups){let t=i.expressions.expressions.get(a);if(t)for(let[i]of t)c[String(e)]?.[String(i)]||x.push({entityType:String(e),exprName:String(i)})}return x.length>0?{ok:!1,missing:x}:{ok:!0,runtime:t({merged:c,changed:v})}};
1
+ import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{createRelationFactory as i}from"#package/domain";import{canonicalEnhancedJsonValueKey as n}from"../../../core/index.js";import{isSdkExpressionImplementation as a}from"../../../parse-application-files/spec/index.js";import{generateMemoEvalPlanRuntime as r}from"./generate-memo-eval-plan-runtime.js";let l={},o=["0-1","1-1","0-N","1-N"],s={relation:(e,t)=>{let n=t[0];if(!("object"==typeof n&&null!==n&&"kind"in n&&"target"in n&&"string"==typeof n.target&&"cardinality"in n&&o.includes(n.cardinality)&&("allOfType"===n.kind||("direct"===n.kind||"indirect"===n.kind)&&"field"in n&&"string"==typeof n.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 i(e.aliasMap)(n)},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:{}}}},p=e=>{let t=r(e.plan);return{origin:{name:e.name,typeOrAlias:e.entityOrAlias},evaluate:(e,i,n)=>t(n.domain.get$Entity(e,i),i,n),meta:{}}},m=e=>({...(0,s[e.kind])({aliasMap:e.aliasMap,invariantImplementations:e.invariantImplementations},e.params),origin:{name:e.name,typeOrAlias:e.entityOrAlias}});export const ExpressionRuntime=(i,r,o,s,d=l)=>{let u={};for(let[e,t]of i.latestModel.aliases)u[String(e)]=t.map(String);let c=r.createBuilder(`${s}/sdk`,{build:m,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)}),f=r.createBuilder(`${s}/user`,{build:e=>e.impl,getKey:e=>`user::${e.entityType}::${e.name}`,compare:(e,t)=>e.impl===t.impl}),y=r.createBuilder(`${s}/value`,{build:p,getKey:e=>`value::${e.entityOrAlias}::${e.name}`,compare:(e,t)=>e.valueKey===t.valueKey}),g={},v=!1,S=new Set,k=new Set,b=new Set;for(let[e,t]of i.expressions.expressions)for(let[,i]of t){let t=u[String(e)]??[String(e)];if(a(i.implementation)){let n={entityOrAlias:String(e),name:String(i.name),kind:i.implementation.kind,params:i.implementation.params,aliasMap:u,invariantImplementations:d},a=c.build(n);for(let e of(a.changed&&(v=!0),S.add(c.getKey(n)),t))g[e]||(g[e]={}),g[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},l=y.build(r);for(let e of(l.changed&&(v=!0),b.add(y.getKey(r)),t))g[e]||(g[e]={}),g[e][String(i.name)]=l.output;continue}}for(let[e,t]of Object.entries(o))for(let[i,n]of Object.entries(t)){let t={entityType:e,name:i,impl:n},a=f.build(t);a.changed&&(v=!0),k.add(f.getKey(t)),g[e]||(g[e]={}),g[e][i]=a.output}c.cleanup(S)&&(v=!0),f.cleanup(k)&&(v=!0),y.cleanup(b)&&(v=!0);let h=[];for(let[e,t]of i.expressions.entityExpressions)for(let n of t.shapeGroups){let t=i.expressions.expressions.get(n);if(t)for(let[i]of t)g[String(e)]?.[String(i)]||h.push({entityType:String(e),exprName:String(i)})}return h.length>0?{ok:!1,missing:h}:{ok:!0,runtime:t({merged:g,changed:v})}};
@@ -2,7 +2,6 @@ import { Branded } from '@salsita-ai/common/utils';
2
2
  import type { ImportedTransformer } from '#package/domain';
3
3
  import type { RuntimeReferenceStore } from '../../../caching/index.js';
4
4
  import type { ApplicationSpec } from '../../../parse-application-files/index.js';
5
- type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any, any>;
6
5
  /**
7
6
  * Runtime section for transformers. Combines two sources of truth:
8
7
  * - `importedTransformers` — factory functions from src/transformers/*.ts
@@ -13,9 +12,8 @@ type AnyImportedTransformer = ImportedTransformer<any, any, any, any, any, any,
13
12
  * decide whether to push a fresh `createTransformers` factory into the registry.
14
13
  */
15
14
  export type TransformersRuntime = Branded<'TransformersRuntime', {
16
- readonly importedTransformers: readonly AnyImportedTransformer[];
15
+ readonly importedTransformers: readonly ImportedTransformer[];
17
16
  readonly specTransformers: ApplicationSpec['configurator']['transformers'];
18
17
  readonly changed: boolean;
19
18
  }>;
20
- export declare const TransformersRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, importedTransformers: readonly AnyImportedTransformer[]) => TransformersRuntime;
21
- export {};
19
+ export declare const TransformersRuntime: (spec: ApplicationSpec, referenceStore: RuntimeReferenceStore, importedTransformers: readonly ImportedTransformer[]) => TransformersRuntime;
@@ -43,6 +43,6 @@ export declare const analyzeParsedModule: (module: Module) => ModuleAnalysis;
43
43
  /** The explicit webhook classification of one authored file. */
44
44
  export type WebhookMembership = 'pinned' | 'named-handler' | 'frontend';
45
45
  /** Handler registrations that keep implicit webhook membership for legacy-CLI parity. */
46
- export declare const WEBHOOK_HANDLER_REGISTRATIONS: readonly ['createMapPublishedRevisionDataHandler', 'createMapPublishedChunkedDataHandler', 'createDataRowValidatorHandler', 'createSheetValidatorHandler'];
46
+ export declare const WEBHOOK_HANDLER_REGISTRATIONS: readonly ['phx.domain.createAssistantSetupHandler', 'phx.domain.admin.createMapPublishedRevisionDataHandler', 'phx.domain.admin.createMapPublishedChunkedDataHandler', 'phx.domain.admin.createDataRowValidatorHandler', 'phx.domain.admin.createSheetValidatorHandler'];
47
47
  /** Returns the named webhook handler registration a handler module calls, if any. */
48
48
  export declare const findWebhookHandlerRegistration: (analysis: ModuleAnalysis) => string | undefined;
@@ -1 +1 @@
1
- import{Visitor as e}from"@swc/core/Visitor.js";export const getModuleParseOptions=()=>({syntax:"typescript",tsx:!0,target:"es2022"});let t=e=>{if("Identifier"===e.type)return e.value;if("ParenthesisExpression"===e.type)return t(e.expression);if("MemberExpression"!==e.type||"Identifier"!==e.property.type)return;let r=t(e.object);return void 0===r?void 0:`${r}.${e.property.value}`},r=e=>e.length>0&&e.every(e=>"isTypeOnly"in e&&!0===e.isTypeOnly),i=class ProjectSourceVisitor extends e{imports=[];calledMemberPaths=new Set;visitTsType(e){return e}visitImportDeclaration(e){return this.imports.push({specifier:e.source.value,typeOnly:e.typeOnly||r(e.specifiers)}),e}visitExportNamedDeclaration(e){return null!=e.source&&this.imports.push({specifier:e.source.value,typeOnly:e.typeOnly||r(e.specifiers)}),super.visitExportNamedDeclaration(e)}visitExportAllDeclaration(e){return this.imports.push({specifier:e.source.value,typeOnly:"typeOnly"in e&&!0===e.typeOnly}),e}visitCallExpression(e){var r;let i=(r=e.arguments[0]?.expression,r?.type==="StringLiteral"?r.value:r?.type==="TemplateLiteral"&&0===r.expressions.length?r.quasis[0]?.cooked??r.quasis[0]?.raw:void 0);if("Import"===e.callee.type&&void 0!==i)this.imports.push({specifier:i,typeOnly:!1});else if("Super"!==e.callee.type&&"Import"!==e.callee.type){let r=t(e.callee);void 0!==r&&this.calledMemberPaths.add(r),"require"===r&&void 0!==i&&this.imports.push({specifier:i,typeOnly:!1})}return super.visitCallExpression(e)}};export const analyzeParsedModule=e=>{let t=new i;t.visitModule(e);let r=e.body[0];return{imports:t.imports,calledMemberPaths:[...t.calledMemberPaths].sort(),hasUseWebhookDirective:r?.type==="ExpressionStatement"&&"StringLiteral"===r.expression.type&&"use webhook"===r.expression.value}};export const WEBHOOK_HANDLER_REGISTRATIONS=["createMapPublishedRevisionDataHandler","createMapPublishedChunkedDataHandler","createDataRowValidatorHandler","createSheetValidatorHandler"];export const findWebhookHandlerRegistration=e=>WEBHOOK_HANDLER_REGISTRATIONS.find(t=>e.calledMemberPaths.includes(`phx.domain.admin.${t}`));
1
+ import{Visitor as e}from"@swc/core/Visitor.js";export const getModuleParseOptions=()=>({syntax:"typescript",tsx:!0,target:"es2022"});let t=e=>{if("Identifier"===e.type)return e.value;if("ParenthesisExpression"===e.type)return t(e.expression);if("MemberExpression"!==e.type||"Identifier"!==e.property.type)return;let r=t(e.object);return void 0===r?void 0:`${r}.${e.property.value}`},r=e=>e.length>0&&e.every(e=>"isTypeOnly"in e&&!0===e.isTypeOnly),i=class ProjectSourceVisitor extends e{imports=[];calledMemberPaths=new Set;visitTsType(e){return e}visitImportDeclaration(e){return this.imports.push({specifier:e.source.value,typeOnly:e.typeOnly||r(e.specifiers)}),e}visitExportNamedDeclaration(e){return null!=e.source&&this.imports.push({specifier:e.source.value,typeOnly:e.typeOnly||r(e.specifiers)}),super.visitExportNamedDeclaration(e)}visitExportAllDeclaration(e){return this.imports.push({specifier:e.source.value,typeOnly:"typeOnly"in e&&!0===e.typeOnly}),e}visitCallExpression(e){var r;let i=(r=e.arguments[0]?.expression,r?.type==="StringLiteral"?r.value:r?.type==="TemplateLiteral"&&0===r.expressions.length?r.quasis[0]?.cooked??r.quasis[0]?.raw:void 0);if("Import"===e.callee.type&&void 0!==i)this.imports.push({specifier:i,typeOnly:!1});else if("Super"!==e.callee.type&&"Import"!==e.callee.type){let r=t(e.callee);void 0!==r&&this.calledMemberPaths.add(r),"require"===r&&void 0!==i&&this.imports.push({specifier:i,typeOnly:!1})}return super.visitCallExpression(e)}};export const analyzeParsedModule=e=>{let t=new i;t.visitModule(e);let r=e.body[0];return{imports:t.imports,calledMemberPaths:[...t.calledMemberPaths].sort(),hasUseWebhookDirective:r?.type==="ExpressionStatement"&&"StringLiteral"===r.expression.type&&"use webhook"===r.expression.value}};export const WEBHOOK_HANDLER_REGISTRATIONS=["phx.domain.createAssistantSetupHandler","phx.domain.admin.createMapPublishedRevisionDataHandler","phx.domain.admin.createMapPublishedChunkedDataHandler","phx.domain.admin.createDataRowValidatorHandler","phx.domain.admin.createSheetValidatorHandler"];export const findWebhookHandlerRegistration=e=>WEBHOOK_HANDLER_REGISTRATIONS.find(t=>e.calledMemberPaths.includes(t));
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { type AssistantAiSettings } from '@salsita-ai/contracts/assistant';
3
+ import { ASSISTANT_HINTS } from '#package/domain';
3
4
  /**
4
5
  * One whitelisted field in the assistant manifest. `description` overrides the JSON Schema
5
6
  * description of the shape property; `as` exposes the field under a different GraphQL name. An empty
@@ -23,7 +24,6 @@ export type AssistantOptionComponentType = (typeof ASSISTANT_OPTION_COMPONENT_TY
23
24
  * does not change during a session. A hint only adds a sentence to a generated description; nothing
24
25
  * verifies it.
25
26
  */
26
- export declare const ASSISTANT_HINTS: readonly ['sameForAllInstances', 'constantDuringSession'];
27
27
  export type AssistantHint = (typeof ASSISTANT_HINTS)[number];
28
28
  /**
29
29
  * The component that holds the choices of a writable field: the instance `instanceName` of the