@salsita-ai/sdk 0.50.0-develop.ecda3c6152 → 0.50.0-develop.eeaf6c4605
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.
- package/README.md +4 -2
- package/dist/application-spec/caching/index.d.ts +6 -1
- package/dist/application-spec/caching/index.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.d.ts +0 -19
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/gitignore.js +2 -1
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/lingui-rc.js +5 -4
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/index.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +150 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +40 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/features.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/inspection.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/inspection.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/variants.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/variants.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +54 -0
- package/dist/application-spec/generate-application/code/templates/skills/guide.js +18 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +12 -5
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +23 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.js +39 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +23 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +26 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/{phoenix-skill.d.ts → processes/operations.d.ts} +2 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/operations.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/planning.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/planning.js +5 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +46 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.js +6 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +13 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.js +20 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +22 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +25 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +63 -249
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +3 -58
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -1
- package/dist/application-spec/generate-application/code/templates/tsconfig.js +2 -1
- package/dist/application-spec/generate-application/index.d.ts +1 -8
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/client/authorized-client.d.ts +1 -1
- package/dist/client/contract.d.ts +4 -3
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +28 -18
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +8 -2
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +10 -0
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.js +2 -2
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +4 -3
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +4 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +26 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -1
- package/dist/configurator/ui/assistant/popover/AssistantPopover.d.ts +24 -0
- package/dist/configurator/ui/assistant/popover/AssistantPopover.js +1 -0
- package/dist/configurator/ui/assistant/popover/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/popover/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -1
- package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -1
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +11 -0
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +22 -0
- package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
- package/dist/docs/index.json +1 -1
- package/dist/docs/phoenix/getting-started.mdx +0 -2
- package/dist/docs/phoenix/migration-guide.mdx +7 -8
- package/dist/docs/phoenix/phoenix-cli.mdx +21 -12
- package/dist/docs/phoenix/project-structure.mdx +30 -35
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +3 -9
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +1 -1
- package/dist/domain/application/GetThemeHandler.d.ts +1 -1
- package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
- package/dist/domain/application/application-config.d.ts +1 -3
- package/dist/domain/application/assistant/assistant-fields.d.ts +1 -1
- package/dist/domain/application/assistant/assistant-value-type.d.ts +1 -1
- package/dist/domain/application/assistant/build-assistant-lenses.d.ts +1 -2
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +1 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +1 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +0 -4
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +1 -1
- package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +1 -2
- package/dist/domain/application/assistant-field-options.d.ts +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
- package/dist/domain/application/configurator-builder.d.ts +1 -2
- package/dist/domain/application/create-initial-published-data.d.ts +2 -1
- package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
- package/dist/domain/domain-builder/domain-builder.d.ts +1 -1
- package/dist/domain/domain-builder/domain-builder.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +24 -24
- package/dist/domain/domain-runtime/index.d.ts +0 -1
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/{module-checks/resolve-imported-transformers.d.ts → resolve-imported-transformers.d.ts} +3 -3
- package/dist/domain/domain-runtime/spec/resolve-imported-transformers.js +1 -0
- package/dist/domain/domain-runtime/spec/selectors.d.ts +5 -5
- package/dist/domain/domain-runtime/spec/types.d.ts +2 -2
- package/dist/domain/index.d.ts +13 -1
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-test-application-config.d.ts +1 -1
- package/dist/domain/spec/index.d.ts +3 -8
- package/dist/domain/spec/index.js +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/element-registration.d.ts +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/find-assistant-form-element-errors.d.ts +1 -1
- package/dist/domain/spec/modules/find-assistant-form-element-errors.js +1 -0
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/index.d.ts +2 -3
- package/dist/domain/spec/modules/index.js +1 -0
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/merge-expression-modules.d.ts +2 -2
- package/dist/domain/spec/modules/merge-expression-modules.js +1 -0
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/project-modules.d.ts +1 -1
- package/dist/domain/spec/modules/project-modules.js +1 -0
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.d.ts +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-component-optic-modules.d.ts +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-expression-modules.d.ts +1 -1
- package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.d.ts +1 -1
- package/dist/domain/spec/phx/index.d.ts +1 -0
- package/dist/domain/spec/phx/index.js +1 -0
- package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-application-types.d.ts +1 -1
- package/dist/domain/spec/phx/phx-application-types.js +1 -0
- package/dist/domain/spec/phx/phx-domain.js +1 -0
- package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-model.d.ts +2 -2
- package/dist/domain/spec/phx/phx-model.js +1 -0
- package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx.d.ts +1 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/admin-runtime.d.ts +7 -6
- package/dist/domain/spec/runtime/admin-runtime/admin-runtime.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/admin-spec-runtime.d.ts +2 -2
- package/dist/domain/spec/runtime/admin-runtime/admin-spec-runtime.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/index.d.ts +2 -0
- package/dist/domain/spec/runtime/admin-runtime/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.d.ts +1 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime/application-runtime.d.ts +8 -6
- package/dist/domain/spec/runtime/application-runtime.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/application-spec-slice.d.ts +3 -1
- package/dist/domain/spec/runtime/application-spec-slice.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/configurator-runtime.d.ts +8 -10
- package/dist/domain/spec/runtime/configurator-runtime/configurator-runtime.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/configurator-spec-runtime.d.ts +2 -2
- package/dist/domain/spec/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/index.d.ts +2 -0
- package/dist/domain/spec/runtime/configurator-runtime/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.d.ts +1 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime/create-application.d.ts +3 -2
- package/dist/domain/spec/runtime/create-application.js +1 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/expression-runtime.d.ts +5 -2
- package/dist/domain/spec/runtime/expressions/expression-runtime.js +1 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/generate-memo-eval-plan-runtime.d.ts +2 -1
- package/dist/domain/spec/runtime/expressions/generate-memo-eval-plan-runtime.js +1 -0
- package/dist/domain/spec/runtime/expressions/index.d.ts +3 -0
- package/dist/domain/spec/runtime/expressions/index.js +1 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/reflection-constants-runtime.d.ts +2 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/factory-data-runtime.d.ts +4 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/recipe-defaults.d.ts +1 -1
- package/dist/domain/spec/runtime/factory-data/recipe-defaults.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/static-violations.d.ts +2 -1
- package/dist/domain/spec/runtime/factory-data/static-violations.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/generate-runtime-instance.d.ts +1 -1
- package/dist/domain/spec/runtime/generate-runtime-instance.js +1 -0
- package/dist/domain/spec/runtime/index.d.ts +13 -0
- package/dist/domain/spec/runtime/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/migration-runtime.d.ts +2 -2
- package/dist/domain/spec/runtime/migrations/migration-runtime.js +1 -0
- package/dist/{application-spec/generate-application/runtime/admin-runtime → domain/spec/runtime/model}/admin-model-runtime.d.ts +4 -2
- package/dist/domain/spec/runtime/model/admin-model-runtime.js +1 -0
- package/dist/{application-spec/generate-application/runtime/configurator-runtime → domain/spec/runtime/model}/configurator-model-runtime.d.ts +4 -2
- package/dist/domain/spec/runtime/model/configurator-model-runtime.js +1 -0
- package/dist/domain/spec/runtime/model/index.d.ts +2 -0
- package/dist/domain/spec/runtime/model/index.js +1 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/build-sdk-optic.d.ts +3 -4
- package/dist/domain/spec/runtime/optics/build-sdk-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/build-user-bound-optic.d.ts +7 -0
- package/dist/domain/spec/runtime/optics/build-user-bound-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/built-component-optic.d.ts +11 -0
- package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/component-optic.d.ts +4 -13
- package/dist/domain/spec/runtime/optics/index.d.ts +2 -0
- package/dist/domain/spec/runtime/optics/index.js +1 -0
- package/dist/{application-spec/caching → domain/spec/runtime}/runtime-reference-store.d.ts +1 -5
- package/dist/domain/spec/runtime/runtime-reference-store.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.d.ts +3 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/assistant-runtime.d.ts +2 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.d.ts +1 -1
- package/dist/domain/spec/runtime/sections/index.d.ts +6 -0
- package/dist/domain/spec/runtime/sections/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.d.ts +3 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.d.ts +1 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.d.ts +2 -2
- package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/resolve-spec-code.d.ts +1 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-runtime.d.ts +3 -3
- package/dist/domain/spec/runtime/spec-runtime.js +1 -0
- package/dist/domain/spec/runtime-spec/index.d.ts +4 -0
- package/dist/domain/spec/runtime-spec/index.js +1 -0
- package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/runtime-spec.d.ts +7 -1
- package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/spec-code-id.d.ts +1 -1
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.js +1 -0
- package/dist/domain/spec/sections/assistant/index.d.ts +4 -0
- package/dist/domain/spec/sections/assistant/index.js +1 -0
- package/dist/domain/spec/sections/index.d.ts +1 -0
- package/dist/domain/spec/sections/index.js +1 -1
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/index.d.ts +1 -0
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/project-files.d.ts +8 -2
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/services/source-archive.d.ts +2 -0
- package/dist/phoenix/services/source-archive.js +1 -1
- package/dist/phoenix/services/swc.d.ts +5 -4
- package/dist/phoenix/services/swc.js +2 -2
- package/dist/ui-sdk/components/numerical-input/InputField.d.ts +2 -0
- package/dist/ui-sdk/components/numerical-input/InputField.js +1 -1
- package/dist/ui-sdk/components/numerical-input/NumericalInput.d.ts +2 -2
- package/dist/ui-sdk/components/numerical-input/Slider.d.ts +3 -1
- package/dist/ui-sdk/components/numerical-input/Slider.js +1 -1
- package/package.json +3 -3
- package/dist/application-spec/caching/runtime-reference-store.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.d.ts +0 -3
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +0 -166
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +0 -54
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +0 -115
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +0 -6
- package/dist/application-spec/generate-application/implementations/phx-application-types.js +0 -1
- package/dist/application-spec/generate-application/implementations/phx-domain.js +0 -1
- package/dist/application-spec/generate-application/implementations/phx-model.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/application-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/application-spec-slice.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-spec-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/create-application.js +0 -1
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +0 -1
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +0 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +0 -1
- package/dist/application-spec/generate-application/runtime/index.d.ts +0 -8
- package/dist/application-spec/generate-application/runtime/index.js +0 -1
- package/dist/application-spec/generate-application/runtime/migrations/migration-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +0 -8
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/index.d.ts +0 -10
- package/dist/application-spec/generate-application/runtime/sections/index.js +0 -1
- package/dist/application-spec/generate-application/runtime/spec-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime-spec/index.d.ts +0 -5
- package/dist/application-spec/generate-application/runtime-spec/index.js +0 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.d.ts +0 -17
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/find-assistant-form-element-errors.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/index.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/merge-expression-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +0 -1
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error-collector.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error-collector.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/index.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/index.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/element-registration.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.d.ts +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-component-optic-modules.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-expression-modules.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.js +0 -0
- /package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx-domain.d.ts +0 -0
- /package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.js +0 -0
- /package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/expressions}/reflection-constants-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/factory-data-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.js +0 -0
- /package/dist/{application-spec/generate-application/runtime/spec-code/spec-code-module.js → domain/spec/runtime/optics/built-component-optic.js} +0 -0
- /package/dist/{application-spec/generate-application/runtime/sections → domain/spec/runtime/optics}/component-optic.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/assistant-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/resolve-spec-code.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/spec-code-module.d.ts +0 -0
- /package/dist/domain/{application/assistant/assistant-resolved-manifest.js → spec/runtime/spec-code/spec-code-module.js} +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/decode-runtime-spec.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/decode-runtime-spec.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encode-runtime-spec.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encode-runtime-spec.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encoded-runtime-spec.d.ts +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/encoded-runtime-spec.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/runtime-spec.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/spec-code-id.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/assistant-manifest.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/assistant-manifest.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/assistant-resolved-manifest.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.js +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/index.d.ts +0 -0
- /package/dist/domain/{application → spec/sections}/assistant/form/index.js +0 -0
package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const generatePhoenixReviewSkill: () => string;
|
package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import{renderAgentSkill as e}from"./agent-skill.js";import{sdkGuidanceSections as s}from"./sdk-content.js";let i=`Review all current git changes for correctness, Phoenix pattern violations, and security issues.
|
|
2
|
-
|
|
3
|
-
## Phoenix-Specific Review
|
|
4
|
-
|
|
5
|
-
### Domain Model (spec/\\*.yaml)
|
|
6
|
-
|
|
7
|
-
- [ ] Relations properly define parent-child ownership (1-N, 0-1)
|
|
8
|
-
- [ ] Expressions have matching implementations in src/expressions/
|
|
9
|
-
- [ ] Invariants have matching implementations in src/invariants/
|
|
10
|
-
- [ ] Actions declared under actions: have matching implementations in src/actions/ (a missing one stops the application at start; it is not a type error)
|
|
11
|
-
- [ ] Component bindings use correct entity types or aliases
|
|
12
|
-
- [ ] $read/$write/$bind reference valid properties or expressions
|
|
13
|
-
- [ ] A model that has been deployed is unchanged under its version: the change is in \`model.latest\`, the deployed model is kept as \`model.v<N>\`, and \`src/migrations/v<N+1>.ts\` migrates saved configurations
|
|
14
|
-
|
|
15
|
-
### Expressions, Actions & Invariants (src/expressions/, src/actions/, src/invariants/)
|
|
16
|
-
|
|
17
|
-
- [ ] Use phx.domain.implementCustomExpressions() / implementActions() / implementCustomInvariants()
|
|
18
|
-
- [ ] Actions only prepare: they return updates and a readResult reader, never stage or commit, and throw messages that say what to send instead
|
|
19
|
-
- [ ] Expression names prefixed with $ in YAML match implementation
|
|
20
|
-
- [ ] No side effects in expressions (pure computed values only)
|
|
21
|
-
- [ ] Invariant violations return proper severity and messages
|
|
22
|
-
|
|
23
|
-
### Components (src/components/, spec/components.yaml)
|
|
24
|
-
|
|
25
|
-
- [ ] Custom components use memoEval with correct dependency arrays
|
|
26
|
-
- [ ] Component attachment uses withEntity() or withAlias() correctly
|
|
27
|
-
- [ ] Filters use withGradualFilter() with static criteria first for performance
|
|
28
|
-
- [ ] No unnecessary React re-renders (stable object references via memoEval)
|
|
29
|
-
- [ ] Export pattern correct: default export of single component or array
|
|
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
|
-
|
|
37
|
-
### Webhooks (src/webhooks/)
|
|
38
|
-
|
|
39
|
-
- [ ] Use phx.webhooks.\\*Builder pattern (finalizeHandlerBuilder, authHandlerBuilder)
|
|
40
|
-
- [ ] Environment variables defined in spec/application.yaml env.webhook section
|
|
41
|
-
- [ ] No hardcoded secrets or API keys
|
|
42
|
-
- [ ] Error handling in async webhook tasks
|
|
43
|
-
- [ ] Proper task chaining for finalization workflows
|
|
44
|
-
|
|
45
|
-
## General Code Quality
|
|
46
|
-
|
|
47
|
-
### TypeScript Strictness
|
|
48
|
-
|
|
49
|
-
- [ ] No \`any\` type usage — use proper types or generics
|
|
50
|
-
- [ ] No \`as\` type casts — use type guards or discriminated unions
|
|
51
|
-
- [ ] \`readonly\` on type/interface fields
|
|
52
|
-
- [ ] Exhaustive pattern matching where appropriate
|
|
53
|
-
|
|
54
|
-
### React Patterns
|
|
55
|
-
|
|
56
|
-
- [ ] useEffect cleanup functions for subscriptions, timers, listeners
|
|
57
|
-
- [ ] Correct dependency arrays (no missing/unnecessary deps)
|
|
58
|
-
- [ ] Proper memoization (useMemo, useCallback) for expensive computations
|
|
59
|
-
- [ ] No direct DOM manipulation (no innerHTML, document.querySelector)
|
|
60
|
-
|
|
61
|
-
### Code Style
|
|
62
|
-
|
|
63
|
-
- [ ] Newlines between logical sections for readability
|
|
64
|
-
- [ ] No commented-out code (unless tricky/special logic with explanation)
|
|
65
|
-
- [ ] Error messages format: "What went wrong, why, how to fix"
|
|
66
|
-
|
|
67
|
-
## Auto-Generated Files — DO NOT modify
|
|
68
|
-
|
|
69
|
-
- .phoenix/ directory (except the option files in .phoenix/variants/, which the phoenix-variants skill writes)
|
|
70
|
-
- src/locales/\\*.ts files
|
|
71
|
-
|
|
72
|
-
### Runtime Verification
|
|
73
|
-
|
|
74
|
-
- [ ] No errors in \`.phoenix/phoenix-dev.log\` after changes (\`grep ERROR .phoenix/phoenix-dev.log\`)
|
|
75
|
-
- [ ] No browser console errors (check log for \`[browser]\` entries)
|
|
76
|
-
- [ ] Spec parsing succeeds without warnings
|
|
77
|
-
|
|
78
|
-
## Review Process
|
|
79
|
-
|
|
80
|
-
1. Get git diff — review all changes in current branch
|
|
81
|
-
2. Check affected files — identify which spec/src areas changed
|
|
82
|
-
3. Verify build — ensure \`pnpm phoenix build\` passes
|
|
83
|
-
4. Check dev logs — if \`phoenix dev\` is running, verify \`.phoenix/phoenix-dev.log\` has no runtime errors
|
|
84
|
-
5. Produce findings report using the output format below
|
|
85
|
-
|
|
86
|
-
## Output Format
|
|
87
|
-
|
|
88
|
-
\`\`\`
|
|
89
|
-
# Code Review Report
|
|
90
|
-
|
|
91
|
-
**Files reviewed**: <count>
|
|
92
|
-
|
|
93
|
-
## Findings
|
|
94
|
-
|
|
95
|
-
### CRITICAL
|
|
96
|
-
- **[<file_path>:<line>]** <title>
|
|
97
|
-
- **Issue**: <description>
|
|
98
|
-
- **Rule**: <which rule/pattern is violated>
|
|
99
|
-
- **Remediation**: <how to fix>
|
|
100
|
-
|
|
101
|
-
### HIGH
|
|
102
|
-
...
|
|
103
|
-
|
|
104
|
-
### MEDIUM
|
|
105
|
-
...
|
|
106
|
-
|
|
107
|
-
### LOW
|
|
108
|
-
...
|
|
109
|
-
|
|
110
|
-
## Summary
|
|
111
|
-
- Critical: N | High: N | Medium: N | Low: N
|
|
112
|
-
- **Overall assessment**: <1-2 sentence summary>
|
|
113
|
-
\`\`\`
|
|
114
|
-
|
|
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.packageManager,i]});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{renderAgentSkill as e}from"./agent-skill.js";import{sdkGuidanceSections as t}from"./sdk-content.js";export const followsCanaryBuilds=e=>!e.useWorkspace&&e.sdkVersion.includes("-develop.");export const generatePhoenixSkill=({checkLatestCanary:n})=>e({name:"phoenix",description:`Phoenix SDK project conventions, covering project structure, architecture principles, key patterns, file and export rules, webhook membership, versioning the domain model once it is deployed, showing the user the dev preview and the build of a deploy, the run evaluation that follows a live deploy, inspecting the rendered result, and how to search the SDK documentation${n?", and the internal-beta check for the latest canary SDK build":""}. Use before writing or changing specs or source code, or deploying this Phoenix configurator project.`,sections:[t.packageManager,...n?["## Stay on the Latest Canary\nDuring the internal beta this project uses the `canary` build of the SDK, which is published from every change to the platform. Once per conversation, before you change anything, compare the installed version, the `version` in `node_modules/@salsita-ai/sdk/package.json`, with the newest canary:\n```bash\nnpm view @salsita-ai/sdk@canary version\n```\nWhen they differ, tell the user which version you are moving to, then update the SDK, bring the packages it needs next to it in line, and regenerate the project's files:\n```bash\npnpm add @salsita-ai/sdk@canary && pnpm phoenix deps && pnpm install && pnpm phoenix sync\n```\n`sync` rewrites the Phoenix skills, so read the ones you use again after it. When the user runs a globally installed `phoenix`, update that too with `npm install -g @salsita-ai/sdk@canary`. If the project no longer builds after the update, stop and tell the user; the `phoenix-feedback` skill covers reporting it."]:[],t.projectStructure,t.architecturePrinciples,t.keyPatterns,t.fileConventions,t.exportRules,t.webhookMembership,t.doNotEdit,t.modelVersioning,"## Show the Preview While You Work\nThe user should see the configurator change as you build it. Before your first change in a conversation, make sure `pnpm phoenix dev` is running (start it in the background when it is not) and open the address it prints as `Preview: <url>` (also written to `.phoenix/phoenix-dev.log`) in the user's browser: `open '<url>'` on macOS, `xdg-open '<url>'` on Linux, `Start-Process '<url>'` in PowerShell, `start \"\" \"<url>\"` in cmd. Keep the quotes, the shell would otherwise read a `?` in the address as a pattern. The log keeps the lines of earlier runs, so when you have just started dev, wait for the `Preview:` line written after your start and use the last one. Open it once; the preview reloads on every change, so tell the user to keep that tab open instead of opening it again. A domain model change is the exception: `pnpm phoenix dev` registers the model with the server only when it starts, and after the change it logs an error that asks for a restart. Restart it, wait for the new `Preview:` line and open that address in place of the old tab, whose address carries the `?cid=` of a configuration saved with the earlier model, which the new model rejects.",t.visualInspection,"## Show the Build After a Deploy\nImmediately before invoking `pnpm phoenix deploy`, refresh `conversation.log` in the project root with the current conversation. Prefer the agent application's native session export when available; do not invent an export command or scan unrelated sessions. Otherwise write the messages still available in context and label the log `reconstructed; incomplete`. Never present a compaction summary as verbatim earlier messages.\n\nUse UTF-8 text with a header naming the agent, export time, source (native export or reconstructed), covered session and known omissions. Preserve user and assistant messages in chronological order, plus tool names, arguments and results when available. Keep each tool result to at most 16 KiB of text, marking truncation explicitly; describe image attachments by reference rather than embedding binary/base64 data, and mark references whose files are not uploaded. Exclude internal instructions, hidden reasoning, credentials and unrelated sensitive content; mark redactions without repeating the removed content. Refresh the current session's log rather than appending duplicate copies or silently carrying over a previous session.\n\nShow the user the exact file to review or redact and obtain approval to include it before deploying; do not ask again when they have already approved that file. If they decline, move it out of the project root before deployment so it cannot be collected. Deploy includes the file in the build's private source archive, downloadable by those authorized to download that build's sources, and leaves it out when extracting build inputs. A missing log warns but does not block deployment. The CLI does not export, redact or validate the transcript's completeness for you.\n\n`pnpm phoenix deploy` starts a build on the server and waits for it to go live. Right after `Build <id> started` it prints `Follow the build in Studio: <url>`. Run the deploy so that you can read its output while it runs, and open that link in the user's browser, quoted as above, as soon as it appears, so they can follow the build they just triggered. When the line is missing, the sign-in is older than the link: tell the user the build is listed under Deployments in Studio, and that `pnpm phoenix login <workspace>` brings the link back.\n\nWhen the deploy reports the configurator live, load the `phoenix-feedback` skill before you write your final message and follow its \"Evaluate the Run\" section, so the user is asked about the run while they are still there. It is asked once per conversation, and only once the user has nothing more to build.","## Code Review\nUse the `phoenix-review` skill to review code changes before committing.",t.sdkDocumentation]});
|
package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const generatePhoenixVariantsSkill: () => string;
|
package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{renderAgentSkill as e}from"./agent-skill.js";import{sdkGuidanceSections as t}from"./sdk-content.js";let n=`## When to Offer Options
|
|
2
|
-
- Offer options when the answer is a matter of taste or brand and the supplied materials do not settle it.
|
|
3
|
-
- Do not offer options for facts (dimensions, prices, rules), for something the user already decided, or to avoid a decision you can make yourself and state.
|
|
4
|
-
- One decision per set, one set open at a time. Vary one thing and keep everything else identical.
|
|
5
|
-
- Usually offer two to four options; the system has no fixed option limit. Original is always available as the captured baseline.
|
|
6
|
-
- Make the options differ in a way the UI or scene can show. Three sheens of one matte wood in soft light look the same.`;export const generatePhoenixVariantsSkill=()=>e({name:"phoenix-variants",description:"Showing the user a few options over the dev preview and getting their pick back, with the phoenix variants command. Use when a visual or interaction decision has several reasonable answers and the taste of the user decides it, such as a shape, a material setting, lighting, an environment, a control or a flow.",sections:[t.packageManager,n,"## Choose the Kind of Option\n- Use `<id>.variant.js` to edit real frontend project files on top of one captured baseline. Use `<id>.html` for a standalone branding, layout or flow proposal rendered in an iframe.\n- Use the same mechanism for controls, layout, brand, lights, visuals, materials, positions, components, elements and transformers.\n- Keep the model, schemas, data, assistant server settings, webhooks and code shared with them, dependencies, environment and uploaded assets unchanged. The preview rejects changes needing server preparation.\n- Options reuse the already loaded configurator, one at a time. Variant transactions bypass file-watcher debounce; hot reload still takes time to apply, without a special wait for rendering to settle.",'## Write the Options\n- One folder per set: `.phoenix/variants/<name>/`, one script or HTML file per option. HTML and scripts can share a set, but option ids must be unique. Keep HTML self-contained. This folder survives rebuilds and is never committed.\n- For HTML, set `<title>` and `<meta name="description" content="...">`; choosing a page changes no source files.\n- For scripts, export `title` and `description` as plain string literals, and a default function `({ read, write, remove }) => {}`; it may be async.\n- `read(path)` returns the original baseline file contents. `write(path, contents)` replaces or creates a file; `remove(path)` deletes it. Paths are relative to the project root.\n- Scripts run once per selection in the browser and collect edits. Phoenix validates and writes the whole batch locally; it owns backups and undo. Do not perform your own filesystem or network operations.\n- Supported edits are YAML in `spec/` outside `spec/admin/`, and TypeScript under `src/components`, `transformers`, `handlers`, `elements` and `_`-prefixed shared folders. Expressions, actions and invariants run on the server too, so they cannot be edited.\n- Every option starts from the same baseline. Original restores it; switching restores files the previous option alone changed.\n- Keep the working tree untouched while comparing. Phoenix never overwrites an edit made outside the preview: it refuses to switch options over one, and when the comparison ends it leaves that file as it is and warns in the dev log.\n- Name options in the user\'s product language; explain what changes in one line.','## Run It and Wait\n```bash\npnpm phoenix variants .phoenix/variants/<name> --title \'<the question>\' --description \'<what differs between the options>\'\n```\n- `pnpm phoenix dev` must be running with the preview open in a browser. Tell the user the options are open there.\n- Put the title and the description in single quotes, so the shell passes backticks, `$` and double quotes through unchanged. In bash or zsh, write a single quote inside them as `\'\\\'\'`; in PowerShell, double it instead.\n- The command waits for the answer, 540 seconds unless `--timeout <seconds>` says otherwise, so give it a command timeout longer than that. It prints JSON:\n - `"status": "chosen"` with `choice` (the option id, or `null` for Original) and `label`;\n - `"status": "waiting"` when the wait ran out. The options stay open: run the same command again, or end your turn and run it when the user is back. An answer given in between is returned by the next run;\n - `"status": "closed"` when the preview was closed without an answer.\n- `pnpm phoenix variants --close` closes the open set when you give up on it.\n- `--port <port>` names the editor WebSocket port when `phoenix dev` does not use 3020.\n- The live configurator keeps its current configuration. Interactions still change it; restoring source files does not undo configuration changes.',"## Use the Answer\n- **Chosen:** a script's exact file edits remain in the project. For an HTML choice, implement the selected proposal using the SDK and compare the result with the page. With `choice: null`, the user chose Original and the baseline remains. Verify the result using `pnpm phoenix inspect:scene` and `pnpm phoenix screenshot`, and tell the user anything that came out differently.\n- Record the decision and its reason where the project keeps its decisions, such as `configurator-spec.md`.\n- The user confirms Original or another option; Escape and the backdrop do not close the comparison. The agent can use `--close` to restore baseline source files without an answer. The folder is removed once the user answers. Pass `--keep` when you still need the files to build from, and remove the folder yourself afterwards."]});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{EnumReflection as a}from"#package/domain";let t=(t,e)=>new a(t,{enum:[...e]});export const createPhxApplicationTypes=a=>{let{dataSchemas:e,states:i}=a.configurator;return{ApplicationVersion:a.appMetadata.applicationVersion,PublishedDataHash:e.publishedDataHash,PublishedData:e.publishedData.runtimeSchema,SessionData:e.sessionData.runtimeSchema,FrontendData:e.frontendData.runtimeSchema,BackendData:e.backendData?.runtimeSchema,FinalizeData:e.finalizeData.runtimeSchema,PrefetchedFinalizeData:e.prefetchedFinalizeData.runtimeSchema,FinalizeResult:e.finalizeResult.runtimeSchema,CallbackData:e.callbackData.runtimeSchema,NavigationState:t("NavigationState",i.navigationStates),ViewState:t("ViewState",i.viewStates),ToolState:t("ToolState",i.toolStates),ExportState:t("ExportState",i.exportStates),AdminNavigationState:t("AdminNavigationState",a.admin.states.navigationStates)}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DomainComponentOpticBuilder as a,createActionFactory as t,createAssistantSetupHandlerFactory as e,createCustomExpressionFactory as o,createCustomInvariantFactory as i,createDataRowValidatorHandler as s,createMapPublishedChunkedDataHandlerFactory as n,createMapPublishedRevisionDataHandlerFactory as m,createRecipeFactory as r,createSheetValidatorHandler as c}from"#package/domain";let l=a=>r(a.aliases,a.entityReflections,a.defaults);export const createPhxDomain=(r,p)=>({...r.model,implementCustomExpressions:o(),implementCustomInvariants:i()(r.factoryData.staticViolations),implementActions:t(),createAssistantSetupHandler:e(),attachComponent:a.from(r.factoryData.aliases),createRecipe:l(r.factoryData),admin:{...p.model,implementCustomExpressions:o(),implementCustomInvariants:i()(p.factoryData.staticViolations),attachComponent:a.from(p.factoryData.aliases),createMapPublishedRevisionDataHandler:m(),createMapPublishedChunkedDataHandler:n(),createDataRowValidatorHandler:s,createSheetValidatorHandler:c,createRecipe:l(p.factoryData)}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{EnhancedAliasReflection as e,EnumReflection as t,SchemaReflection as n}from"#package/domain";import{evaluateReflectionConstants as o}from"../runtime/index.js";let r=e=>e,i=(e,o,i)=>{let l,s=r(i);return void 0!==(l=o.enum)&&l.length>0&&l.every(e=>"string"==typeof e)?new t(e,{...s,enum:[...o.enum]}):new n(e,s)};export const createPhxModel=(t,l,s)=>{let a={...l.entities,...l.aliasReflections};for(let[e,n]of t.latestModel.commonTypes)a[String(e)]=i(String(e),n.schema,n.runtimeSchema);for(let e of t.latestModel.shapes.values()){let t=`${String(e.name)}Shape`;a[t]=new n(t,r(e.runtimeSchema))}let m={};for(let[e,t]of Object.entries(l.$entityReflections))m[`$${e}`]=t;for(let[n,r]of t.latestModel.aliases){let i=String(n);m[`$${i}`]=new e(`$${i}`,r.map(String),o(t.expressions,i,s))}return{model:a,enhancedModel:m}};
|
package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{$DomainEntityReflection as s,DomainBuilder as a,DomainEntityReflection as n,RawAliasReflection as i,SchemaReflection as o}from"#package/domain";import{evaluateReflectionConstants as r,findReflectionConstants as m}from"../sections/reflection-constants-runtime.js";let l=e=>({latestVersion:e.resolvedVersions.latestVersion,versionedModels:e.resolvedVersions.versionedModels.map(e=>({version:e.version,key:e.key,isLatest:e.isLatest,migrationFile:e.migrationFile}))}),p=e=>{let t=[];for(let[s,a]of e.expressions.entityExpressions)t.push({entityType:String(s),shapeGroups:a.shapeGroups.map(String),expressionNamesByGroup:a.shapeGroups.map(t=>{let s=e.expressions.expressions.get(t);return{group:String(t),names:s?[...s.keys()].map(String):[]}}),constants:[...m(e.expressions,String(s))??[]].map(([e,t])=>[String(e),t])});return t},c=(t,s)=>{let a,n;return t.code===s.code&&(a=t.domainSpec,n=s.domainSpec,e(a.latestModel.entitySchemas.map(e=>e.shapeSchema),n.latestModel.entitySchemas.map(e=>e.shapeSchema))&&e([...a.latestModel.aliases],[...n.latestModel.aliases])&&e([...a.latestModel.commonTypes],[...n.latestModel.commonTypes])&&e(l(a),l(n))&&e(p(a),p(n)))&&e(t.dataSchemas.publishedData.runtimeSchema,s.dataSchemas.publishedData.runtimeSchema)&&e(t.dataSchemas.sessionData.runtimeSchema,s.dataSchemas.sessionData.runtimeSchema)&&e(t.dataSchemas.frontendData.runtimeSchema,s.dataSchemas.frontendData.runtimeSchema)},d=e=>{let{latestModel:t,resolvedVersions:m,expressions:l}=e.domainSpec,p={};for(let e of t.entitySchemas)p[String(e.entityType)]=new n(String(e.entityType),[e.shapeSchema]);let c={};for(let[e,s]of t.commonTypes){let t=s.runtimeSchema;c[String(e)]=new o(String(e),t)}let d=[...t.aliases],S={},h={};for(let[e,t]of d){let s=t.map(e=>p[String(e)]),a=new i(String(e),s);S[String(e)]=a,h[String(e)]=a.types}let u={};for(let a of t.entityTypes){let t=String(a),n=l.entityExpressions.get(a),i=[];if(n)for(let e of n.shapeGroups){let t=l.expressions.get(e);t&&i.push(...t.keys())}u[t]=new s(t,i,r(l,t,e.code))}let y=d.map(([e])=>String(e)).includes("RootEntity")?"RootEntity":"AnyDomainEntity",g=S[y]?.types??[],f=m.latestVersion,D=e.dataSchemas.publishedData.runtimeSchema,x=e.dataSchemas.sessionData.runtimeSchema,M=e.dataSchemas.frontendData.runtimeSchema,v=a.from(p,h,u,g,f,D,x,M,void 0,!0);return{entities:p,aliasReflections:S,commonTypeReflections:c,aliases:h,$entityReflections:u,rootEntityTypes:g,modelVersion:f,domainBuilder:v}};export const AdminModelRuntime=(e,s,a,n)=>{let i=a.createBuilder("modelRuntime:admin",{build:d,getKey:()=>"singleton",compare:c}).build({domainSpec:e,dataSchemas:s,code:n});return t({...i.output,schemaChanged:i.changed})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{Preset as t,PresetCategory as i,commonAdminCustomExpressions as s,commonAdminViolationExpressions as n}from"#package/domain";import{MigrationRuntime as r}from"../migrations/index.js";import{ComponentOptics as o}from"../sections/component-optic.js";import{ExpressionRuntime as m}from"../sections/expression-runtime.js";import{PresetRuntime as a}from"../sections/preset-runtime.js";import{AdminSpecRuntime as p}from"./admin-spec-runtime.js";import{AdminStatesRuntime as u}from"./states-runtime.js";let c={Preset:[{evaluate:(e,i,s)=>{let r=s.domain.get$Entity(e,i);return t.assert(r),n.Preset.nameNotEmpty(r)}}]},f={PresetCategory:{$isDraft:{origin:{name:"$isDraft",typeOrAlias:"PresetCategory"},evaluate:(e,t,n)=>{let r=n.domain.get$Entity(e,t);return i.assert(r),s.PresetCategory.$isDraft(r)},meta:{}}}},l=new WeakMap;export const AdminRuntime=(t,i,s,n,g,d,R)=>{let{modelRuntime:j,factoryDataRuntime:y}=p(t,i,d),k=m(t.admin,i,s,"adminExpressionRuntime",((e,t)=>{if(0===Object.keys(e).length)return c;let i=l.get(t)??new WeakMap;l.set(t,i);let s=i.get(e);if(s)return s;let n={};for(let i of[c,e])for(let[e,s]of Object.entries(i))for(let i of t[e]??[e])n[i]=[...n[i]??[],...s];return i.set(e,n),n})(n,j.aliases),d,R,f),x=r(i,{referenceScope:"adminRuntime/migrationRuntime",resolvedVersions:t.admin.resolvedVersions,latestEntities:j.entities,migrationModules:g});return k.ok?{ok:!0,runtime:e({modelRuntime:j,componentOptics:o(i,{components:t.admin.components,referenceScope:"adminRuntime/componentOptics",modelRuntime:j,code:d}),expressionRuntime:k.runtime,presetRuntime:a(i,{referenceScope:"adminRuntime/presetRuntime",presets:t.admin.presets.presets}),statesRuntime:u(t,i),migrationRuntime:x,factoryDataRuntime:y})}:{ok:!1,missingExpressions:k.missing,missingMigrations:x.missingMigrations}};
|
package/dist/application-spec/generate-application/runtime/admin-runtime/admin-spec-runtime.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Branded as a}from"@salsita-ai/common/utils";import{FactoryDataRuntime as t}from"../factory-data/index.js";import{AdminModelRuntime as i}from"./admin-model-runtime.js";export const AdminSpecRuntime=(e,n,m)=>{let r=i(e.admin,e.configurator.dataSchemas,n,m);return a({modelRuntime:r,factoryDataRuntime:t(n,{referenceScope:"adminRuntime/factoryDataRuntime",invariants:e.admin.invariants,defaults:e.admin.defaults,aliases:r.aliases,entities:r.entities})})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Branded as i}from"@salsita-ai/common/utils";import{createImplementationErrorCollector as n}from"#package/domain";import{AdminRuntime as o}from"./admin-runtime/admin-runtime.js";import{ConfiguratorRuntime as r}from"./configurator-runtime/configurator-runtime.js";import{DataRuntime as m}from"./sections/data-runtime.js";export const ApplicationRuntime=(t,s,a,e,g,u=[],p={},f={},c,k)=>{let d=k??n(),M=r(t,s,a,e,g,f,c?.configurator,d),l=o(t,s,u,p,f,c?.admin,d);return(void 0===k&&d.throwIfAny(),M.ok&&l.ok)?{ok:!0,runtime:i({configurator:M.runtime,admin:l.runtime,data:m(t,s)})}:{ok:!1,missingExpressions:[...M.ok?[]:M.missingExpressions,...l.ok?[]:l.missingExpressions],missingMigrations:[...M.ok?M.runtime.migrationRuntime.missingMigrations:M.missingMigrations,...l.ok?l.runtime.migrationRuntime.missingMigrations:l.missingMigrations]}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{resolveImportedTransformers as e}from"#package/domain";export const customComponentOpticsOf=e=>e.filter(e=>!0!==e.generated);let t=(t,n)=>{let{runtime:s,modules:a,themePresets:i}=t,{configurator:o}=s,r=(e,t,s)=>e||void 0===n?t():s(n),l=a.handlers?.handlers??n?.handlers??[],m=a.handlers||void 0===n?((e,t,n)=>{let s={};for(let a of e)s[a.name]=t?.[a.name]??n?.[a.name]??a.name;return s})(l,a.handlers?.nameHashes,n?.handlerHashes):n.handlerHashes,c=a.elements?.elements??n?.elements??[],p=a.elements||void 0===n?((e,t,n)=>{let s={},a=0;for(let i of e)if("assistantFormElement"!==i.type)if("entity"===i.type||"layout"===i.type)s[i.name]=t?.[i.name]??n?.[i.name]??i.name;else{let e=`icon:${a}`;s[e]=t?.[e]??n?.[e]??`${e}:${i.elements.length}`,a+=1}return s})(c,a.elements?.nameHashes,n?.elementHashes):n.elementHashes,d=a.customComponentOptics??customComponentOpticsOf(n?.componentOptics??[]),u=r(o.componentOptics.changed||null!==a.customComponentOptics,()=>[...o.componentOptics.optics.map(e=>e.optic),...d],e=>e.componentOptics),{importedTransformers:h,specTransformers:g}=o.transformersRuntime;return{presets:r(o.presetRuntime.changed,()=>o.presetRuntime.presets,e=>e.presets),theme:r(o.themeRuntime.changed,()=>{var e;let t;return t=(Object.hasOwn(i,(e=o.themeRuntime).preset)?i[e.preset]:{})??{},Object.keys(e.options).length>0?{...t,...e.options}:t},e=>e.theme),assistant:r(o.assistantRuntime.changed,()=>o.assistantRuntime.assistant,e=>e.assistant),navigationStates:r(o.statesRuntime.changed,()=>o.statesRuntime.navigationStates,e=>e.navigationStates),viewStates:r(o.statesRuntime.changed,()=>o.statesRuntime.viewStates,e=>e.viewStates),toolStates:r(o.statesRuntime.changed,()=>o.statesRuntime.toolStates,e=>e.toolStates),exportStates:r(o.statesRuntime.changed,()=>o.statesRuntime.exportStates,e=>e.exportStates),componentOptics:u,createTransformers:r(o.transformersRuntime.changed,()=>t=>e(h,g,t),e=>e.createTransformers),handlers:l,handlerHashes:m,elements:c,elementHashes:p}},n=(e,t,n)=>{let{modelRuntime:s,expressionRuntime:a,actionsRuntime:i,migrationRuntime:o}=e.configurator,r=s.domainBuilder.withExpressions(a.merged).withActions(Object.values(i.definitions)).withActionImplementations(t),l=(n?r.withMigrate(o.migrate):r).build();return{modelVersion:l.context.modelVersion,factory:l,aliasMap:l.context.aliasMap,entityReflections:l.context.entityReflections,$entityReflections:l.context.$entityReflections,allowedRootEntityTypes:l.context.allowedRootEntityTypes,migrate:l.context.migrate}};export const applicationSpecSlice=e=>void 0===e.previous?(e=>{let{runtime:s,spec:a}=e,i=(e=>{let{runtime:s,modules:a,spec:i,defaultElements:o}=e,{expressionRuntime:r,actionsRuntime:l}=s.configurator,{ui:m}=i.configurator,c=i.infra.resourcesConfig,p=a.actionImplementations??{};return{...t(e,void 0),...n(s,p,!0),expressions:r.merged,actions:l.definitions,actionImplementations:p,defaultElements:o,appLoader:m.appLoader??"universal",preview:m.preview??"auto",alwaysExpand:m.alwaysExpand??!1,deploymentQueryDisabled:c?.deploymentQueryDisabled??!1,prefetchTextureUrls:c?.prefetchTextureUrls??[]}})(e),o=a.configurator.ui.textLanguages;return{version:a.appMetadata.applicationVersion,dataConfig:s.data.dataSpec,chunks:s.data.chunks,publishedDataHash:s.data.publishedDataHash,initialPublishedData:{},canCreate:[...a.infra.acl.canCreate],enableAdminRelease:a.appMetadata.enableAdminRelease,textLanguages:o&&o.length>0?o:["en"],baseResourcesUrl:a.infra.resourcesConfig?.baseResourcesUrl??e.environmentResourcesUrl??"",configurator:i,admin:((e,t)=>{let{modelRuntime:n,expressionRuntime:s,migrationRuntime:a,presetRuntime:i,componentOptics:o,statesRuntime:r}=e.runtime.admin,[l]=i.presets;if(void 0===l)throw Error("Cannot register application spec because admin preset is required.");let m=n.domainBuilder.withExpressions(s.merged).withMigrate(a.migrate).build();return{factory:m,modelVersion:m.modelVersion,aliasMap:m.context.aliasMap,entityReflections:m.context.entityReflections,$entityReflections:m.context.$entityReflections,expressions:m.context.expressions,actions:m.context.actions,actionImplementations:m.context.actionImplementations,allowedRootEntityTypes:m.context.allowedRootEntityTypes,migrate:m.context.migrate,preset:l,componentOptics:[...o.optics.map(e=>e.optic),...e.customAdminComponentOptics],navigationStates:r.navigationStates,viewStates:[],handlers:t.handlers,handlerHashes:t.handlerHashes,elements:t.elements,elementHashes:t.elementHashes}})(e,i)}})(e):{...e.previous,configurator:(e=>{let{runtime:s,modules:a,previous:i,model:o}=e,r=i.configurator,{expressionRuntime:l,actionsRuntime:m}=s.configurator,c=t(e,r),p=a.actionImplementations??r.actionImplementations;return"keep"===o?{...r,...c,expressions:l.changed?l.merged:r.expressions,actions:m.changed?m.definitions:r.actions,actionImplementations:p}:{...r,...c,...n(s,p,!1),expressions:l.merged,actions:m.definitions,actionImplementations:p}})(e)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{$DomainEntityReflection as s,DomainBuilder as o,DomainEntityReflection as i,RawAliasReflection as n,SchemaReflection as a}from"#package/domain";import{evaluateReflectionConstants as r,findReflectionConstants as m}from"../sections/reflection-constants-runtime.js";let l=e=>({latestVersion:e.resolvedVersions.latestVersion,versionedModels:e.resolvedVersions.versionedModels.map(e=>({version:e.version,key:e.key,isLatest:e.isLatest,migrationFile:e.migrationFile}))}),p=e=>{let t=[];for(let[s,o]of e.expressions.entityExpressions)t.push({entityType:String(s),shapeGroups:o.shapeGroups.map(String),expressionNamesByGroup:o.shapeGroups.map(t=>{let s=e.expressions.expressions.get(t);return{group:String(t),names:s?[...s.keys()].map(String):[]}}),constants:[...m(e.expressions,String(s))??[]].map(([e,t])=>[String(e),t])});return t};export const isConfiguratorModelSchemaCompatible=(t,s)=>e(t.latestModel.entitySchemas.map(e=>e.shapeSchema),s.latestModel.entitySchemas.map(e=>e.shapeSchema))&&e([...t.latestModel.aliases],[...s.latestModel.aliases])&&e([...t.latestModel.commonTypes],[...s.latestModel.commonTypes])&&e(l(t),l(s))&&e(p(t),p(s))&&e(t.dataSchemas,s.dataSchemas);let c=e=>{let{latestModel:t,resolvedVersions:m,dataSchemas:l,expressions:p}=e.domainSpec,c={};for(let e of t.entitySchemas)c[String(e.entityType)]=new i(String(e.entityType),[e.shapeSchema]);let d={};for(let[e,s]of t.commonTypes){let t=s.runtimeSchema;d[String(e)]=new a(String(e),t)}let S=[...t.aliases],u={},g={};for(let[e,t]of S){let s=t.map(e=>c[String(e)]),o=new n(String(e),s);u[String(e)]=o,g[String(e)]=o.types}let h={};for(let o of t.entityTypes){let t=String(o),i=p.entityExpressions.get(o),n=[];if(i)for(let e of i.shapeGroups){let t=p.expressions.get(e);t&&n.push(...t.keys())}h[t]=new s(t,n,r(p,t,e.code))}let y=S.map(([e])=>String(e)).includes("RootEntity")?"RootEntity":"AnyDomainEntity",f=u[y]?.types??[],M=m.latestVersion,x=l.publishedData.runtimeSchema,T=l.sessionData.runtimeSchema,b=l.frontendData.runtimeSchema,k=l.backendData?.runtimeSchema,v=o.from(c,g,h,f,M,x,T,b,k,!1);return{entities:c,aliasReflections:u,commonTypeReflections:d,aliases:g,$entityReflections:h,rootEntityTypes:f,modelVersion:M,domainBuilder:v}};export const ConfiguratorModelRuntime=(e,s,o)=>{let i=s.createBuilder("modelRuntime:configurator",{build:c,getKey:()=>"singleton",compare:(e,t)=>e.code===t.code&&isConfiguratorModelSchemaCompatible(e.domainSpec,t.domainSpec)}).build({domainSpec:e,code:o});return t({...i.output,schemaChanged:i.changed})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Branded as t}from"@salsita-ai/common/utils";import{MigrationRuntime as e}from"../migrations/index.js";import{ActionsRuntime as i}from"../sections/actions-runtime.js";import{AssistantRuntime as o}from"../sections/assistant-runtime.js";import{ComponentOptics as s}from"../sections/component-optic.js";import{ExpressionRuntime as r}from"../sections/expression-runtime.js";import{PresetRuntime as n}from"../sections/preset-runtime.js";import{ThemeRuntime as m}from"../sections/theme-runtime.js";import{TransformersRuntime as c}from"../sections/transformers-runtime.js";import{ConfiguratorSpecRuntime as u}from"./configurator-spec-runtime.js";import{ConfiguratorStatesRuntime as p}from"./states-runtime.js";export const ConfiguratorRuntime=(a,f,g,R,j,l,x,d)=>{let{modelRuntime:k,factoryDataRuntime:E}=u(a,f,x),S=r(a.configurator,f,g,"configuratorExpressionRuntime",j,x,d),h=e(f,{referenceScope:"configuratorRuntime/migrationRuntime",resolvedVersions:a.configurator.resolvedVersions,latestEntities:k.entities,migrationModules:l});return S.ok?{ok:!0,runtime:t({modelRuntime:k,componentOptics:s(f,{components:a.configurator.components,referenceScope:"configuratorRuntime/componentOptics",modelRuntime:k,code:x}),presetRuntime:n(f,{referenceScope:"configuratorRuntime/presetRuntime",presets:a.configurator.presets.presets}),statesRuntime:p(a,f),expressionRuntime:S.runtime,themeRuntime:m(a,f),transformersRuntime:c(a,f,R),assistantRuntime:o(a,f),actionsRuntime:i(a.configurator.actions,f),migrationRuntime:h,factoryDataRuntime:E})}:{ok:!1,missingExpressions:S.missing,missingMigrations:h.missingMigrations}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Branded as t}from"@salsita-ai/common/utils";import{FactoryDataRuntime as r}from"../factory-data/index.js";import{ConfiguratorModelRuntime as a}from"./configurator-model-runtime.js";export const ConfiguratorSpecRuntime=(i,o,e)=>{let n=a(i.configurator,o,e);return t({modelRuntime:n,factoryDataRuntime:r(o,{referenceScope:"configuratorRuntime/factoryDataRuntime",invariants:i.configurator.invariants,defaults:i.configurator.defaults,aliases:n.aliases,entities:n.entities})})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{setupI18n as e}from"@lingui/core";import{initConsoleLogger as t}from"@salsita-ai/common/utils";import{ImplementationError as i,NoopAnalyticsSystem as n,checkSingleInstanceHandlers as o,createDomainRuntime as a,createImplementationErrorCollector as r,createInitialPublishedData as s,resolveActionModules as m,resolveComponentOpticModules as c,resolveElementModule as l,resolveHandlerModule as p,resolveInvariantModules as u,resolveTransformerModule as d}from"#package/domain";import{defaultI18n as f,mergeCatalogs as g,sdkCatalog as h}from"#package/i18n";import{ApplicationRuntime as v}from"./application-runtime.js";import{applicationSpecSlice as E}from"./application-spec-slice.js";let M=(e,t,i)=>e.filter(e=>i.attempt(()=>(t(e),!0),!1)),w=(e,t,i)=>e.flatMap(e=>i.attempt(()=>t(e),[]));export const createApplication=I=>{let{spec:T,referenceStore:b,specCode:k,modules:x,environment:A={}}=I,C=r(),R=w(x.handlers,p,C),y=w(x.elements,l,C),N=w(x.transformers,e=>[d(e)],C),P=w(x.components,e=>c([e]),C),S=w(x.adminComponents,e=>c([e]),C),O=M(x.invariants,e=>u([e]),C),j=M(x.adminInvariants,e=>u([e]),C),L=M(x.actions,e=>m([e]),C),U=v(T,b,x.expressions,N,u(O),x.adminExpressions,u(j),x.migrations,k,C);if((U.ok?[...U.runtime.configurator.migrationRuntime.missingMigrations,...U.runtime.admin.migrationRuntime.missingMigrations]:U.missingMigrations).forEach(e=>C.add((e=>{let[t=e,n="migrateToVN"]=e.split("#");return new i({code:"MISSING_IMPLEMENTATION",origin:t,problem:`The migration ${n} is missing`,fix:`The spec declares the model version this file migrates to, so the file must export ${n}, the function that turns a state of the previous version into one of this version; without it a saved configuration of an earlier version cannot load. Add or rename the export.`})})(e))),C.throwIfAny(),!U.ok)throw Error("The application runtime could not be built, but no implementation error was recorded.");o(R);let $=E({runtime:U.runtime,spec:T,modules:{handlers:{handlers:R},elements:{elements:y},customComponentOptics:P,actionImplementations:m(L)},customAdminComponentOptics:S,defaultElements:I.defaultElements,themePresets:I.themePresets,environmentResourcesUrl:A.defaultEnvs?.resourcesUrl}),D=t(),F=s({adminDomainFactory:$.admin.factory,domainRuntime:a({application:{spec:$,environment:A},services:{analyticsService:new n,i18n:f,logger:D}}),adminPresets:U.runtime.admin.presetRuntime.presets,handlers:$.configurator.handlers,dataSpec:$.dataConfig??void 0,chunks:$.chunks,logger:D});return{spec:{...$,initialPublishedData:F},environment:A,services:{...I.services,i18n:e({messages:g([h,x.catalogs]),locale:T.configurator.ui.availableLocales[0]})},tag:I.tag??T.appMetadata.webComponentTag??"salsita-configurator"}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createMessageDescriptor as e,isEvalMarker as t,isMsgMarker as r}from"#package/domain";let a=(s,i)=>{if(null===s||"object"!=typeof s)return s;if(r(s))return e(s);if(t(s))throw Error(`The default at ${i} is an $eval expression. Defaults are static values; the parser rejects $eval in them, so the spec given to the runtime was not produced by it. Parse the spec again and pass the result.`);return Array.isArray(s)?s.map((e,t)=>a(e,`${i}[${t}]`)):Object.fromEntries(Object.entries(s).map(([e,t])=>[e,a(t,`${i}.${e}`)]))};export const createRecipeDefaults=e=>Object.fromEntries(Object.entries(e.entries).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).map(([t,r])=>[t,a(r,`${e}.${t}`)]))]));
|
package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createMessageDescriptor as t}from"#package/domain";export const createStaticViolations=e=>{let i={};for(let[o,r]of Object.entries(e.entries))for(let e of Object.values(r)){if("static"!==e.kind)continue;let r={type:String(e.violationType),severity:e.severity,message:"string"==typeof e.message?e.message:t(e.message),...void 0===e.controlViolationPriority?{}:{controlViolationPriority:e.controlViolationPriority}};i[o]={...i[o],[String(e.name)]:r}}return i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ApplicationInstance as e}from"#package/domain";export const generateRuntimeInstance=n=>e(n.applicationVersion);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { ApplicationRuntime, type ApplicationRuntimeResult } from './application-runtime.js';
|
|
2
|
-
export { AdminModelRuntime } from './admin-runtime/admin-model-runtime.js';
|
|
3
|
-
export { ConfiguratorModelRuntime } from './configurator-runtime/configurator-model-runtime.js';
|
|
4
|
-
export { SpecRuntime } from './spec-runtime.js';
|
|
5
|
-
export * from './factory-data/index.js';
|
|
6
|
-
export * from './migrations/index.js';
|
|
7
|
-
export * from './sections/index.js';
|
|
8
|
-
export * from './spec-code/index.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ApplicationRuntime}from"./application-runtime.js";export{AdminModelRuntime}from"./admin-runtime/admin-model-runtime.js";export{ConfiguratorModelRuntime}from"./configurator-runtime/configurator-model-runtime.js";export{SpecRuntime}from"./spec-runtime.js";export*from"./factory-data/index.js";export*from"./migrations/index.js";export*from"./sections/index.js";export*from"./spec-code/index.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"lodash-es/isEqual.js";import{Branded as i}from"@salsita-ai/common/utils";import{DomainEntityReflection as t,createMigrateFunction as s}from"#package/domain";let o=e=>"function"==typeof e,r=e=>`migrateToV${e}`,n=e=>{let{resolvedVersions:i,latestEntities:n,migrationModules:a}=e,l={},m={},d=[];for(let e of i.versionedModels){if(e.isLatest)l[e.version]=n;else{let i={};for(let s of e.modelVersion.entitySchemas)i[String(s.entityType)]=new t(String(s.entityType),[s.shapeSchema]);l[e.version]=i}if(void 0===e.migrationFile)continue;let i=r(e.version),s=a[e.migrationFile]?.[i];o(s)?m[e.version]=s:d.push(`${e.migrationFile}#${i}`)}return{modelVersions:l,migrations:m,migrate:s(l,i.latestVersion,m),missingMigrations:d}},a=e=>e.versionedModels.map(e=>({version:e.version,isLatest:e.isLatest,migrationFile:e.migrationFile,schemas:e.isLatest?[]:e.modelVersion.entitySchemas.map(e=>e.shapeSchema)})),l=(i,t)=>i.latestEntities===t.latestEntities&&i.resolvedVersions.latestVersion===t.resolvedVersions.latestVersion&&e(a(i.resolvedVersions),a(t.resolvedVersions))&&i.resolvedVersions.versionedModels.every(e=>void 0===e.migrationFile||i.migrationModules[e.migrationFile]===t.migrationModules[e.migrationFile]);export const MigrationRuntime=(e,t)=>{let s=e.createBuilder(t.referenceScope,{build:n,getKey:()=>"singleton",compare:l}).build({resolvedVersions:t.resolvedVersions,latestEntities:t.latestEntities,migrationModules:t.migrationModules});return i({...s.output,changed:s.changed})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Branded as t}from"@salsita-ai/common/utils";import{DomainComponentOpticBuilder as e,FILTER_CRITERION_KEYS as i,adminSidebarComponent as o,attributeSelectionComponent as n,componentsByName as a,composedOfComponent as r,createAdminCustomPageRead as s,createAdminCustomSidebarRead as c,createAdminDataPageRead as m,createAdminDataTableSidebarRead as l,createAdminNavigationPanelRead as d,createAdminPresetCategoryPageRead as p,createAdminPresetCategorySelectionRead as f,createAdminPresetCategorySelectionWrite as u,createAdminPresetCategorySidebarRead as h,createAdminPresetListPageRead as g,createAdminPresetSidebarRead as y,createAdminRecipeCollectionPageRead as w,createAdminRecipeSidebarRead as S,createEmptyWrite as N,createMultipleCompositionRead as k,createMultipleReferenceRead as A,createMultipleReferenceWrite as v,createSingleCompositionRead as O,createSingleReferenceRead as b,createSingleReferenceWrite as F,isSdkCodeRef as R,navigationPageComponent as $,navigationPanelListComponent as E,referenceComponent as x}from"#package/domain";import{specCodeComponentKey as T,specCodeFilterId as j}from"../../runtime-spec/index.js";import{resolveSpecCode as D}from"../spec-code/index.js";let K=new Map([["reference",x],["composedOf",r],["adminSidebar",o],["attributeSelection",n],["navigationPage",$],["navigationPanelList",E]]),M={createAdminCustomPageRead:s,createAdminCustomSidebarRead:c,createAdminDataPageRead:m,createAdminDataTableSidebarRead:l,createAdminNavigationPanelRead:d,createAdminPresetCategoryPageRead:p,createAdminPresetCategorySelectionRead:f,createAdminPresetCategorySelectionWrite:u,createAdminPresetCategorySidebarRead:h,createAdminPresetListPageRead:g,createAdminPresetSidebarRead:y,createAdminRecipeCollectionPageRead:w,createAdminRecipeSidebarRead:S,createEmptyWrite:N,createMultipleCompositionRead:k,createMultipleReferenceRead:A,createMultipleReferenceWrite:v,createSingleCompositionRead:O,createSingleReferenceRead:b,createSingleReferenceWrite:F},P=(t,e)=>{let i=M[t.sdkFunction];if("function"!=typeof i)throw Error(`SDK factory function "${t.sdkFunction}" not found. The spec names a factory that the factory map of build-sdk-optic.ts does not list. Add the factory to that map.`);return i(...t.params.map(t=>{if(R(t)){let i=e.entities[t.$codeRef]??e.aliasReflections[t.$codeRef];if(!i)throw Error(`Reflection "${t.$codeRef}" not found in ModelRuntime. This is a bug — the target was validated at parse time.`);return i}return t}))};export const buildSdkOptic=(o,n,r,s,c)=>{let m=e.from(r),l=a.get(o.componentName)??K.get(o.componentName);if(!l)throw Error(`SDK component "${o.componentName}" not found. This is a bug — the component was validated at parse time.`);let d=m.withComponent(l,o.instanceName,!0),p=o.isAlias?d.withAlias(String(o.typeOrAlias)):d.withEntity(String(o.typeOrAlias)),f=T(String(o.typeOrAlias),String(o.instanceName),o.componentName);for(let[t,e]of n.filters.items.entries()){if("root"===e.kind){let t=e.target,i=e=>e[t];p=p.withFilter(i);continue}let o={};for(let n of i){let i=e[n];void 0!==i&&("dynamic"===i.kind?o[n]=t=>t[i.target]:"eval"===i.kind?o[n]=D(c,j(f,t,n,i.code),i.code):o[n]=i.value)}p=p.withGradualFilter(o)}let u=P(n.readFactory,s),h=P(n.writeFactory,s),g=p.attach(u,h);return t({typeOrAlias:String(o.typeOrAlias),componentName:o.componentName,instanceName:String(o.instanceName),optic:g})};
|
package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ComponentEntry, type ComponentImplementation } from '#package/domain';
|
|
2
|
-
import type { AdminModelRuntime } from '../admin-runtime/admin-model-runtime.js';
|
|
3
|
-
import type { ConfiguratorModelRuntime } from '../configurator-runtime/configurator-model-runtime.js';
|
|
4
|
-
import { type SpecCodeMap } from '../spec-code/index.js';
|
|
5
|
-
import type { ComponentOptic } from './component-optic.js';
|
|
6
|
-
export declare const buildUserBoundOptic: (entry: ComponentEntry, impl: ComponentImplementation & {
|
|
7
|
-
readonly kind: 'userBound';
|
|
8
|
-
}, model: AdminModelRuntime | ConfiguratorModelRuntime, code: SpecCodeMap | undefined) => ComponentOptic | undefined;
|
package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{match as e}from"ts-pattern";import{Branded as t}from"@salsita-ai/common/utils";import{DomainComponentOpticBuilder as i,assertBoolean as n,assertNumber as r,assertString as o,componentsByName as a}from"#package/domain";import{specCodeComponentKey as s,specCodeFilterId as l}from"../../runtime-spec/index.js";import{resolveSpecCode as m}from"../spec-code/index.js";import{generateMemoEvalPlanRuntime as d}from"./generate-memo-eval-plan-runtime.js";let p=(e,t,i)=>{if("dynamic"===e.kind){let t=e.target;return e=>e[t]}if("eval"===e.kind){let n=l(i.componentKey,i.branch,t,e.code);return m(i.code,n,e.code)}return e.value},c=(e,t)=>{let i={};for(let[n,r]of Object.entries(e))"kind"!==n&&void 0!==r&&(i[n]=p(r,n,t));return i},f={assertString:o,assertNumber:r,assertBoolean:n},h=(e,t)=>{let i=t.commonTypeReflections[e]??t.entities[e]??t.aliasReflections[e];if(!i)throw Error(`Reflection "${e}" not found in ModelRuntime for write assertion. This is a bug — the type was resolved at parse time.`);return i},u=(e,t)=>{let i=t.entities[e]??t.aliasReflections[e];if(!i)throw Error(`Entity reflection "${e}" not found in ModelRuntime for write assertion. This is a bug — the type was resolved at parse time.`);return i},w=(t,i,n)=>e(t).with({kind:"primitive"},({assertFn:e})=>typeof i==("assertNumber"===e?"number":"assertBoolean"===e?"boolean":"string")).with({kind:"declaredType"},({typeName:e})=>h(e,n).is(i)).with({kind:"declaredTypeId"},({referencedType:e})=>u(e,n).isId(i)).with({kind:"literal"},({value:e})=>i===e).with({kind:"anyOf"},({assertions:e})=>e.some(e=>w(e,i,n))).with({kind:"none"},()=>!0).exhaustive(),y=(t,i,n)=>{e(t).with({kind:"primitive"},({assertFn:e})=>{f[e](i)}).with({kind:"declaredType"},({typeName:e})=>{h(e,n).assert(i)}).with({kind:"declaredTypeId"},({referencedType:e})=>{u(e,n).assertId(i)}).with({kind:"literal"},e=>{if(!w(e,i,n))throw Error(`Expected value to match its declared schema but got ${i}`)}).with({kind:"anyOf"},e=>{if(!w(e,i,n))throw Error(`Expected value to match one of its declared schemas but got ${i}`)}).with({kind:"none"},()=>{}).exhaustive()};export const buildUserBoundOptic=(e,n,r,o)=>{let l,m=(l=r.aliases,i.from(l)),p=a.get(e.componentName);if(!p)return void console.warn(`[ComponentOptic] Unknown component: ${e.componentName}`);let f=m.withComponent(p,e.instanceName,!0),h=e.isAlias?f.withAlias(String(e.typeOrAlias)):f.withEntity(String(e.typeOrAlias)),u=s(String(e.typeOrAlias),String(e.instanceName),e.componentName);for(let[e,t]of n.filters.items.entries()){if("root"===t.kind){let e=t.target,i=t=>t[e];h=h.withFilter(i);continue}h=h.withGradualFilter(c(t,{componentKey:u,branch:e,code:o}))}let w=d(n.plan,u,o),k="composite"===n.implementation.kind?n.implementation.writeBindings:[],g=k.length>0?e=>{let t={};for(let i of k)y(i.assertion,e[i.propKey],r),t[i.entityField]=e[i.propKey];return t}:()=>({}),v=h.attach(w,g);return t({typeOrAlias:String(e.typeOrAlias),componentName:e.componentName,instanceName:String(e.instanceName),optic:v})};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"lodash-es/isEqual.js";import{Branded as t}from"@salsita-ai/common/utils";import{ImplementationError as i,canonicalEnhancedJsonValueKey as n,createRelationFactory as a,isSdkExpressionImplementation as r,mergeExpressionModules as o}from"#package/domain";import{specCodeExpressionKey as l}from"../../runtime-spec/index.js";import{generateMemoEvalPlanRuntime as s}from"./generate-memo-eval-plan-runtime.js";let p={},m=["0-1","1-1","0-N","1-N"],d={relation:(e,t)=>{let i=t[0];if(!("object"==typeof i&&null!==i&&"kind"in i&&"target"in i&&"string"==typeof i.target&&"cardinality"in i&&m.includes(i.cardinality)&&("allOfType"===i.kind||("direct"===i.kind||"indirect"===i.kind)&&"field"in i&&"string"==typeof i.field)))throw Error("Cannot create the relation expression because its parameter is not a relation declaration. The application spec is inconsistent; rebuild it from a valid relations declaration.");return a(e.aliasMap)(i)},violations:(e,t)=>{let i=t[0];if("object"!=typeof i||null===i||!("entityType"in i)||"string"!=typeof i.entityType)throw Error("Cannot create the violations expression because its entityType parameter is missing. The application spec is inconsistent; rebuild it from a valid invariants declaration.");let n=i.entityType,a=Object.entries(e.invariantImplementations).flatMap(([t,i])=>{let a=e.aliasMap[t];return t===n||a?.includes(n)?i:[]});return{origin:{name:"$violations",typeOrAlias:n},evaluate:(e,t,i)=>a.flatMap(n=>n.evaluate(e,t,i)),meta:{}}}},f=e=>{let t=s(e.plan,l(e.entityOrAlias,e.name),e.code);return{origin:{name:e.name,typeOrAlias:e.entityOrAlias},evaluate:(e,i,n)=>t(n.domain.get$Entity(e,i),i,n),meta:{}}},u=e=>({...(0,d[e.kind])({aliasMap:e.aliasMap,invariantImplementations:e.invariantImplementations},e.params),origin:{name:e.name,typeOrAlias:e.entityOrAlias}});export const ExpressionRuntime=(a,l,s,m,d=p,c,g,y={})=>{let v={};for(let[e,t]of a.latestModel.aliases)v[String(e)]=t.map(String);let x={...y};for(let[e,t]of Object.entries(o(s,v,g,((e,t,i)=>{let n=new Map,a=(e,t)=>{n.set(e,(n.get(e)??new Set).add(t))};for(let[i,n]of e.expressions.expressions)for(let[e,r]of n)if("user"!==r.implementation.kind)for(let n of t[String(i)]??[String(i)])a(n,String(e));for(let[e,t]of Object.entries(i))for(let i of Object.keys(t))a(e,i);return n})(a,v,y))))x[e]={...x[e],...t};let S=l.createBuilder(`${m}/sdk`,{build:u,getKey:e=>`sdk::${e.entityOrAlias}::${e.name}`,compare:(t,i)=>t.kind===i.kind&&e(t.params,i.params)&&e(t.aliasMap,i.aliasMap)&&("violations"!==i.kind||t.invariantImplementations===i.invariantImplementations)}),h=l.createBuilder(`${m}/user`,{build:e=>e.impl,getKey:e=>`user::${e.entityType}::${e.name}`,compare:(e,t)=>{let i,n;return(i=e.impl)===(n=t.impl)||i.evaluate===n.evaluate&&i.meta===n.meta&&i.origin.name===n.origin.name&&i.origin.typeOrAlias===n.origin.typeOrAlias}}),O=l.createBuilder(`${m}/value`,{build:f,getKey:e=>`value::${e.entityOrAlias}::${e.name}`,compare:(e,t)=>e.valueKey===t.valueKey&&e.code===t.code}),b={},k=!1,$=new Set,M=new Set,A=new Set;for(let[e,t]of a.expressions.expressions)for(let[,i]of t){let t=v[String(e)]??[String(e)];if(r(i.implementation)){let n={entityOrAlias:String(e),name:String(i.name),kind:i.implementation.kind,params:i.implementation.params,aliasMap:v,invariantImplementations:d},a=S.build(n);for(let e of(a.changed&&(k=!0),$.add(S.getKey(n)),t))b[e]||(b[e]={}),b[e][String(i.name)]=a.output;continue}if("value"===i.implementation.kind){let a=i.implementation.value,r={entityOrAlias:String(e),name:String(i.name),valueKey:n(a),plan:i.implementation.plan,code:c},o=O.build(r);for(let e of(o.changed&&(k=!0),A.add(O.getKey(r)),t))b[e]||(b[e]={}),b[e][String(i.name)]=o.output;continue}}for(let[e,t]of Object.entries(x))for(let[i,n]of Object.entries(t)){let t={entityType:e,name:i,impl:n},a=h.build(t);a.changed&&(k=!0),M.add(h.getKey(t)),b[e]||(b[e]={}),b[e][i]=a.output}S.cleanup($)&&(k=!0),h.cleanup(M)&&(k=!0),O.cleanup(A)&&(k=!0);let T=[];for(let[e,t]of a.expressions.entityExpressions)for(let i of t.shapeGroups){let t=a.expressions.expressions.get(i);if(t)for(let[i]of t)b[String(e)]?.[String(i)]||T.push({entityType:String(e),exprName:String(i)})}return T.length>0?(T.forEach(e=>g.add(new i({code:"MISSING_IMPLEMENTATION",origin:null,problem:`Missing implementation of expression ${e.entityType}.${e.exprName}`,fix:"The spec declares it without a value of its own ($eval, $msg or a read), so a project file implements it: a default export of phx.domain.implementCustomExpressions({ ... }) in src/expressions/, or of phx.domain.admin.implementCustomExpressions({ ... }) in src/admin/expressions/ for an admin entity type. Implement it, or remove the declaration from the spec."}))),{ok:!1,missing:T}):{ok:!0,runtime:t({merged:b,changed:k})}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createMessageDescriptor as e,memoEval as t}from"#package/domain";import{specCodeEvalIds as a}from"../../runtime-spec/index.js";import{resolveSpecCode as r}from"../spec-code/index.js";let n=(t,a)=>{if("literal"===t.kind)return t.value;if("slot"===t.kind)return a[t.depIndex];if("msg"===t.kind)return e(t.marker);if("array"===t.kind)return t.items.map(e=>n(e,a));let r={};for(let[e,l]of t.entries)r[e]=n(l,a);return r};export const generateMemoEvalPlanRuntime=(e,l,i)=>{if(0===e.deps.length){let t=n(e.template,[]);return()=>t}let s=a(e,l),o=e.deps.map((e,t)=>{let a=s[t];return"eval"===e.kind&&void 0!==a?r(i,a,e.code):void 0});return t(t=>e.deps.map((e,a)=>"eval"===e.kind?o[a](t):Reflect.get(t,e.target)),(...t)=>n(e.template,t))};export const evaluateStaticMemoEvalPlan=(e,t,l)=>{if(e.usesSelf)throw Error("Cannot evaluate a plan that uses self as a static value. Filter self-dependent plans before evaluating constants.");let i=a(e,t),s=e.deps.map((e,t)=>{if("read"===e.kind)throw Error(`Cannot evaluate the self-dependent read "${e.target}" as a static value. Filter self-dependent plans before evaluating constants.`);return r(l,i[t],e.code)()});return n(e.template,s)};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { ActionsRuntime } from './actions-runtime.js';
|
|
2
|
-
export { AssistantRuntime } from './assistant-runtime.js';
|
|
3
|
-
export { ComponentOptics, type ComponentOptic } from './component-optic.js';
|
|
4
|
-
export { DataRuntime } from './data-runtime.js';
|
|
5
|
-
export { ExpressionRuntime, type ExpressionImplementations, type InvariantImplementations, type MissingExpression, } from './expression-runtime.js';
|
|
6
|
-
export { PresetRuntime } from './preset-runtime.js';
|
|
7
|
-
export { ThemeRuntime } from './theme-runtime.js';
|
|
8
|
-
export { TransformersRuntime } from './transformers-runtime.js';
|
|
9
|
-
export { evaluateStaticMemoEvalPlan, generateMemoEvalPlanRuntime } from './generate-memo-eval-plan-runtime.js';
|
|
10
|
-
export { evaluateReflectionConstants, findReflectionConstants } from './reflection-constants-runtime.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ActionsRuntime}from"./actions-runtime.js";export{AssistantRuntime}from"./assistant-runtime.js";export{ComponentOptics}from"./component-optic.js";export{DataRuntime}from"./data-runtime.js";export{ExpressionRuntime}from"./expression-runtime.js";export{PresetRuntime}from"./preset-runtime.js";export{ThemeRuntime}from"./theme-runtime.js";export{TransformersRuntime}from"./transformers-runtime.js";export{evaluateStaticMemoEvalPlan,generateMemoEvalPlanRuntime}from"./generate-memo-eval-plan-runtime.js";export{evaluateReflectionConstants,findReflectionConstants}from"./reflection-constants-runtime.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Branded as i}from"@salsita-ai/common/utils";import{AdminSpecRuntime as r}from"./admin-runtime/admin-spec-runtime.js";import{ConfiguratorSpecRuntime as o}from"./configurator-runtime/configurator-spec-runtime.js";export const SpecRuntime=(m,t,n)=>i({configurator:o(m,t,n?.configurator),admin:r(m,t,n?.admin)});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"./runtime-spec.js";export*from"./encoded-runtime-spec.js";export*from"./encode-runtime-spec.js";export*from"./decode-runtime-spec.js";export*from"./spec-code-id.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser implementation of the assistant's `getBrowserDetails` tool: draws the browser details onto
|
|
3
|
-
* a canvas and returns the capture as a PNG image part, so the model reads them from an image.
|
|
4
|
-
*/
|
|
5
|
-
export declare const createBrowserDetailsClientTool: () => import("@tanstack/ai").ClientTool<{
|
|
6
|
-
type: string;
|
|
7
|
-
properties: {};
|
|
8
|
-
required: never[];
|
|
9
|
-
}, undefined, "getBrowserDetails", unknown, false, undefined> & {
|
|
10
|
-
inputSchema: {
|
|
11
|
-
type: string;
|
|
12
|
-
properties: {};
|
|
13
|
-
required: never[];
|
|
14
|
-
};
|
|
15
|
-
outputSchema: undefined;
|
|
16
|
-
approvalSchema: undefined;
|
|
17
|
-
};
|
package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{browserDetailsTool as e}from"@salsita-ai/contracts/assistant";let t=e=>{let t=[];for(let i=0;i<e.length;i+=64)t.push(e.slice(i,i+64));return t};export const createBrowserDetailsClientTool=()=>e.client(()=>{let e=(()=>{let e=[`User agent: ${navigator.userAgent}`,`Viewport: ${window.innerWidth} x ${window.innerHeight} px`,`Screen: ${window.screen.width} x ${window.screen.height} px`,`Device pixel ratio: ${window.devicePixelRatio}`,`Language: ${navigator.language}`,`Time zone: ${Intl.DateTimeFormat().resolvedOptions().timeZone}`].flatMap(t),i=document.createElement("canvas");i.width=720,i.height=48+26*e.length;let n=i.getContext("2d");if(!n)throw Error("The browser details capture failed because the canvas has no 2D context. Retry in another browser.");return n.fillStyle="#ffffff",n.fillRect(0,0,i.width,i.height),n.fillStyle="#111111",n.font="16px monospace",n.textBaseline="top",e.forEach((e,t)=>n.fillText(e,24,24+26*t)),i.toDataURL("image/png")})();return[{type:"image",source:{type:"data",value:e.slice(e.indexOf(",")+1),mimeType:"image/png"}}]});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ImplementationError as e}from"../../errors/index.js";export const findAssistantFormElementErrors=(t,n)=>{let s=n.flatMap(e=>"assistantFormElement"===e.type?[e.name]:[]),r=new Set(t.map(({name:e})=>e));return[...t.flatMap(({name:t})=>{let n=s.filter(e=>e===t).length;return 0===n?[new e({code:"MISSING_IMPLEMENTATION",origin:null,problem:`The assistant form element "${t}" declared under assistant.formElements has no component`,fix:`Add a file to src/elements/ that default-exports phx.frontend.createAssistantFormElement('${t}', Component), or remove the element from the YAML.`})]:n>1?[new e({code:"DUPLICATE_DEFINITION",origin:null,problem:`The assistant form element "${t}" is registered by ${n} files in src/elements/`,fix:`Each element has one component. Keep one phx.frontend.createAssistantFormElement('${t}', …) and remove the others.`})]:[]}),...[...new Set(s)].filter(e=>!r.has(e)).map(t=>new e({code:"MISSING_IMPLEMENTATION",origin:null,problem:`A file in src/elements/ registers the assistant form element "${t}", which assistant.formElements does not declare`,fix:`Declare "${t}" under assistant.formElements with its description, role and attributes, so the assistant knows the element, or remove the registration.`}))]};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{createPhoenixLayoutElement,createPhoenixEntityElement,createCustomPhoenixLayoutElement,createCustomPhoenixEntityElement,createAssistantFormElement,resolveElementModule,resolveElementModules}from"./element-registration.js";export{createPhoenixHandler,createSystemPhoenixHandler,createSystemPhoenixAsyncHandler,resolveHandlerModule,resolveHandlerModules}from"./handler-registration.js";export{findAssistantFormElementErrors}from"./find-assistant-form-element-errors.js";export{resolveActionModules}from"./resolve-action-modules.js";export{resolveComponentOpticModules}from"./resolve-component-optic-modules.js";export{mergeExpressionModules}from"./merge-expression-modules.js";export{resolveExpressionModules}from"./resolve-expression-modules.js";export{resolveImportedTransformers,resolveTransformerModule,resolveTransformerModules}from"./resolve-imported-transformers.js";export{resolveInvariantModules}from"./resolve-invariant-modules.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ImplementationError as e,ImplementationErrors as o,createImplementationErrorCollector as t}from"../../errors/index.js";import{SHARED_FOLDER_HINT as i,createContractError as n,isRecord as r}from"./project-modules.js";let s={expected:"an object of expressions keyed by entity type or alias, then by expression name",fix:`Create it with phx.domain.implementCustomExpressions({ ... }) (phx.domain.admin.implementCustomExpressions({ ... }) under src/admin/), ${i}.`},a=e=>r(e)&&"function"==typeof e.evaluate,p=e=>r(e)&&Object.values(e).every(a);export const isExpressionExport=e=>r(e)&&Object.values(e).every(p);let l=(o,t,i)=>new e({code:"DUPLICATE_DEFINITION",origin:o,problem:`Duplicate expression ${t}`,fix:i}),d=(e,t,i,r)=>{if(!isExpressionExport(e.exports))throw n(e,s,e.exports);let a=[],p=new Map,d=[];for(let[o,n]of Object.entries(e.exports))for(let s of t[o]??[o])for(let[t,f]of Object.entries(n)){let n=`${s}.${t}`,h=p.get(n),m=i.get(n);r.get(s)?.has(t)?d.push(l(e.origin,n,"The application already gives it a value (an $eval, $msg or read in the spec, a relation, the $violations of its invariants, or a built-in expression of the SDK), so this implementation would be ignored. Remove it from the file, or declare the expression in the spec with a type and no value.")):void 0!==h?d.push(l(e.origin,n,`The file defines it on both ${h} and ${o}, so its value would depend on the order the definitions are merged in. Define it once, on the alias or on the entity type.`)):void 0!==m&&d.push(l(e.origin,n,`It is also defined in ${m}, so its value would depend on file order. Keep one definition and remove the other.`)),p.set(n,o),a.push({key:n,entityType:s,typeOrAlias:o,name:t,expression:f})}if(d.length>0)throw new o(d);return a};export const mergeExpressionModules=(e,o,i,n=new Map)=>{let r=i??t(),s=new Map,a={};for(let t of e)for(let{key:e,entityType:i,typeOrAlias:p,name:l,expression:f}of r.attempt(()=>d(t,o,s,n),[]))s.set(e,t.origin),a[i]={...a[i],[l]:{...f,origin:{name:l,typeOrAlias:p}}};return void 0===i&&r.throwIfAny(),a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ImplementationError as e}from"../../errors/index.js";export const SHARED_FOLDER_HINT="or move the file to an underscore-prefixed folder such as src/_shared/ when it is shared code";export const isRecord=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);export const createContractError=(r,t,o)=>new e({code:void 0===r.exports?"MISSING_EXPORT":"INVALID_EXPORT",origin:r.origin,problem:"Invalid default export",expected:t.expected,received:(e=>{if(void 0===e)return"nothing (the file has no default export)";if(null===e)return"null";if("function"==typeof e)return e.name?`the function "${e.name}"`:"an anonymous function";if(Array.isArray(e))return`an array of ${e.length} item(s)`;if(isRecord(e)){let r=Object.keys(e);return r.length>0?`an object with the keys ${r.join(", ")}`:"an empty object"}return`the ${typeof e} ${JSON.stringify(e)}`})(o),fix:`Every file in this folder is loaded by convention, so each one must default-export that shape. ${t.fix}`});export const resolveListModule=(e,r,t)=>{let o=Array.isArray(e.exports)?e.exports:[e.exports],n=[];for(let i of o){if(!t(i))throw createContractError(e,r,i);n.push(i)}return n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SHARED_FOLDER_HINT as r,createContractError as e,isRecord as t}from"./project-modules.js";let o={expected:"a transformer (a function of the domain context, or an object with a register method), or an array of them",fix:`Create it with phx.frontend.transformerBuilder, ${r}.`},n=r=>"function"==typeof r||t(r)&&"function"==typeof r.register;export const resolveTransformerModule=r=>{let t;if(!(Array.isArray(t=r.exports)?t.every(n):n(t)))throw e(r,o,r.exports);return{name:r.origin.replace(/^.*\//,"").replace(/\.tsx?$/,""),transformer:r.exports}};export const resolveTransformerModules=r=>r.map(resolveTransformerModule);export const resolveImportedTransformers=(r,e,t)=>{let o=r.flatMap(({name:r,transformer:e})=>{if(Array.isArray(e))return e.map((e,o)=>{if("register"in e)return e.register(t);if("function"==typeof e)return{priority:1/0,transformer:e(t),name:`${r}[${o}]`};throw Error(`Transformer '${r}[${o}]' must be either a RegistrableTransformer (with register method) or a TransformerFactory (function)`)});if("register"in e)return e.register(t);if("function"==typeof e)return{priority:1/0,transformer:e(t),name:r};throw Error(`Transformer '${r}' must be either a RegistrableTransformer (with register method) or a TransformerFactory (function)`)}),n=[];for(let r of e){let e=o.find(e=>e.name===r.name);if(!e){let e=o.map(r=>r.name).filter(Boolean).join(", ");throw Error(`Transformer '${r.name}' not found in imported transformer files. Available transformers: ${e||"none"}`)}n.push({priority:r.priority??1/0,transformer:e.transformer,name:r.name})}return n};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/element-registration.js
RENAMED
|
File without changes
|
/package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.d.ts
RENAMED
|
File without changes
|
/package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.js
RENAMED
|
File without changes
|
/package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/{application-spec/generate-application/implementations → domain/spec/phx}/phx.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.d.ts
RENAMED
|
File without changes
|
/package/dist/{application-spec/generate-application → domain/spec}/runtime/factory-data/index.js
RENAMED
|
File without changes
|
/package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.d.ts
RENAMED
|
File without changes
|
/package/dist/{application-spec/generate-application → domain/spec}/runtime/migrations/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.d.ts
RENAMED
|
File without changes
|
/package/dist/{application-spec/generate-application → domain/spec}/runtime/spec-code/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/runtime-spec.js
RENAMED
|
File without changes
|
/package/dist/{application-spec/generate-application → domain/spec}/runtime-spec/spec-code-id.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/domain/{application → spec/sections}/assistant/assistant-resolved-manifest.d.ts
RENAMED
|
File without changes
|
/package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.d.ts
RENAMED
|
File without changes
|
/package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-element-name.js
RENAMED
|
File without changes
|
/package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.d.ts
RENAMED
|
File without changes
|
/package/dist/domain/{application → spec/sections}/assistant/form/assistant-form-elements.js
RENAMED
|
File without changes
|
/package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.d.ts
RENAMED
|
File without changes
|
/package/dist/domain/{application → spec/sections}/assistant/form/assistant-resource-path.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|