@salsita-ai/sdk 0.50.0-develop.9eab66c5a9 → 0.50.0-develop.9fe72d003e
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 +1 -1
- package/dist/application-spec/core/enhanced-json-value.d.ts +2 -31
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/index.d.ts +1 -3
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-schema.d.ts +2 -52
- package/dist/application-spec/core/markers/index.d.ts +1 -1
- package/dist/application-spec/core/markers/index.js +1 -1
- package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
- package/dist/application-spec/core/markers/msg-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
- package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -1
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +15 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -6
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
- package/dist/application-spec/generate-application/implementations/phx-model.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +1 -2
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +2 -3
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime-spec/runtime-spec.d.ts +96 -31
- package/dist/application-spec/generate-application/runtime-spec/spec-code-id.d.ts +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +13 -4
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-infra.d.ts +4 -11
- package/dist/application-spec/parse-application-files/merge/merged-transformers.d.ts +2 -4
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-acl.d.ts +2 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-acl.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-admin-pages.d.ts +3 -24
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +25 -20
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-resources.d.ts +19 -64
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-pages.d.ts +3 -20
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/states.d.ts +3 -5
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/states.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
- package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
- package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +4 -10
- package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
- package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
- package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +2 -3
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +2 -3
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +7 -29
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +2 -2
- package/dist/application-spec/parse-application-files/spec/invariants/invariant.d.ts +5 -21
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +4 -14
- package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
- package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
- package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
- package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
- package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
- package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +6 -23
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.d.ts +3 -18
- package/dist/application-spec/parse-application-files/spec/sections/application-version.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/chunks.d.ts +6 -23
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/custom-data-spec.d.ts +1 -16
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-entry-key.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-spec.d.ts +1 -10
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/swatch-data-spec.d.ts +1 -14
- package/dist/application-spec/parse-application-files/spec/sections/state-value.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/sections/theme.d.ts +3 -10
- package/dist/application-spec/parse-application-files/spec/sections/transformers.d.ts +4 -11
- package/dist/application-spec/parse-application-files/spec/sections/ui.d.ts +3 -12
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +19 -3
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +70 -56
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +15 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
- package/dist/configurator/common/configurator-interface.d.ts +2 -2
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
- package/dist/configurator/configurator-context/index.d.ts +0 -4
- package/dist/configurator/configurator-context/index.js +1 -1
- package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/tool-chip.d.ts +19 -9
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
- package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -1
- package/dist/docs/3d-scene/cameras/custom.mdx +4 -2
- package/dist/docs/drag-and-drop/room-planner.mdx +1 -1
- package/dist/docs/index.json +1 -1
- package/dist/docs/phoenix/configurator-interface.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +21 -0
- package/dist/docs/phoenix/phoenix-cli.mdx +4 -3
- package/dist/docs/phoenix/project-structure.mdx +21 -17
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
- package/dist/docs/phoenix/webhooks.mdx +5 -1
- package/dist/domain/application/application-config.d.ts +6 -24
- package/dist/domain/application/assistant/assistant-manifest.d.ts +13 -3
- package/dist/domain/application/assistant/assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +5 -9
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -1
- package/dist/domain/application/assistant/build-assistant-lenses.js +1 -1
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +3 -3
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +2 -4
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/index.d.ts +1 -0
- package/dist/domain/index.js +1 -1
- package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
- package/dist/domain/spec/application/admin-pages.d.ts +26 -0
- package/dist/domain/spec/application/admin-states.d.ts +5 -0
- package/dist/domain/spec/application/configurator-states.d.ts +8 -0
- package/dist/domain/spec/application/configurator-states.js +1 -0
- package/dist/domain/spec/application/index.d.ts +5 -0
- package/dist/domain/spec/application/index.js +1 -0
- package/dist/domain/spec/components/bindings/index.d.ts +2 -0
- package/dist/domain/spec/components/bindings/index.js +1 -0
- package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
- package/dist/domain/spec/components/bindings/read-binding.js +1 -0
- package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
- package/dist/domain/spec/components/bindings/write-binding.js +1 -0
- package/dist/{application-spec/parse-application-files → domain}/spec/components/component-entry.d.ts +3 -3
- package/dist/domain/spec/components/component-entry.js +1 -0
- package/dist/{application-spec/core → domain/spec}/components/component-filter.d.ts +3 -2
- package/dist/domain/spec/components/component-filters.d.ts +10 -0
- package/dist/domain/spec/components/component-filters.js +1 -0
- package/dist/domain/spec/components/components.d.ts +4 -0
- package/dist/domain/spec/components/components.js +1 -0
- package/dist/domain/spec/components/index.d.ts +6 -0
- package/dist/domain/spec/enhanced-json-value.d.ts +30 -0
- package/dist/domain/spec/enhanced-json-value.js +1 -0
- package/dist/{application-spec/parse-application-files → domain}/spec/expressions/expression.d.ts +9 -3
- package/dist/domain/spec/expressions/expression.js +1 -0
- package/dist/domain/spec/expressions/expressions.d.ts +27 -0
- package/dist/domain/spec/expressions/expressions.js +1 -0
- package/dist/domain/spec/expressions/index.d.ts +5 -0
- package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
- package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
- package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
- package/dist/domain/spec/index.d.ts +9 -0
- package/dist/domain/spec/index.js +1 -0
- package/dist/domain/spec/invariants/index.d.ts +2 -0
- package/dist/domain/spec/invariants/index.js +1 -0
- package/dist/domain/spec/invariants/invariant.d.ts +24 -0
- package/dist/domain/spec/invariants/invariant.js +1 -0
- package/dist/domain/spec/invariants/invariants.d.ts +14 -0
- package/dist/domain/spec/invariants/invariants.js +1 -0
- package/dist/domain/spec/json-schema.d.ts +52 -0
- package/dist/domain/spec/json-schema.js +1 -0
- package/dist/domain/spec/markers/index.d.ts +3 -0
- package/dist/domain/spec/markers/index.js +1 -0
- package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
- package/dist/domain/spec/markers/msg-marker.js +1 -0
- package/dist/domain/spec/model/aliases.d.ts +9 -0
- package/dist/domain/spec/model/aliases.js +1 -0
- package/dist/domain/spec/model/common-types.d.ts +15 -0
- package/dist/domain/spec/model/common-types.js +1 -0
- package/dist/domain/spec/model/defaults.d.ts +33 -0
- package/dist/domain/spec/model/defaults.js +1 -0
- package/dist/domain/spec/model/entity-types.d.ts +8 -0
- package/dist/domain/spec/model/entity-types.js +1 -0
- package/dist/domain/spec/model/index.d.ts +7 -0
- package/dist/domain/spec/model/index.js +1 -0
- package/dist/domain/spec/model/model-version-key.d.ts +3 -0
- package/dist/domain/spec/model/model-version-key.js +1 -0
- package/dist/domain/spec/model/names/action-name.d.ts +7 -0
- package/dist/domain/spec/model/names/action-name.js +1 -0
- package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
- package/dist/domain/spec/model/names/alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-type-name.js +1 -0
- package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
- package/dist/domain/spec/model/names/expression-name.js +1 -0
- package/dist/domain/spec/model/names/index.d.ts +9 -0
- package/dist/domain/spec/model/names/index.js +1 -0
- package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
- package/dist/domain/spec/model/names/instance-name.js +1 -0
- package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
- package/dist/domain/spec/model/names/invariant-name.js +1 -0
- package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
- package/dist/domain/spec/model/names/shape-property-name.js +1 -0
- package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
- package/dist/domain/spec/model/names/violation-type-name.js +1 -0
- package/dist/domain/spec/model/presets.d.ts +30 -0
- package/dist/domain/spec/model/presets.js +1 -0
- package/dist/domain/spec/sections/actions.d.ts +23 -0
- package/dist/domain/spec/sections/actions.js +1 -0
- package/dist/domain/spec/sections/app-metadata.d.ts +18 -0
- package/dist/domain/spec/sections/app-metadata.js +1 -0
- package/dist/domain/spec/sections/application-version.d.ts +7 -0
- package/dist/domain/spec/sections/application-version.js +1 -0
- package/dist/domain/spec/sections/data-spec/chunks.d.ts +23 -0
- package/dist/domain/spec/sections/data-spec/chunks.js +1 -0
- package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.d.ts +16 -0
- package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.js +1 -0
- package/dist/domain/spec/sections/data-spec/data-entry-key.d.ts +9 -0
- package/dist/domain/spec/sections/data-spec/data-entry-key.js +1 -0
- package/dist/domain/spec/sections/data-spec/index.d.ts +5 -0
- package/dist/domain/spec/sections/data-spec/index.js +1 -0
- package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.d.ts +10 -0
- package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.js +1 -0
- package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.d.ts +14 -0
- package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.js +1 -0
- package/dist/domain/spec/sections/index.d.ts +9 -0
- package/dist/domain/spec/sections/index.js +1 -0
- package/dist/domain/spec/sections/infra/acl.d.ts +12 -0
- package/dist/domain/spec/sections/infra/acl.js +1 -0
- package/dist/domain/spec/sections/infra/index.d.ts +3 -0
- package/dist/domain/spec/sections/infra/index.js +1 -0
- package/dist/domain/spec/sections/infra/resource-entry.d.ts +46 -0
- package/dist/domain/spec/sections/infra/resource-entry.js +1 -0
- package/dist/domain/spec/sections/infra/resources-config.d.ts +10 -0
- package/dist/domain/spec/sections/infra/resources-config.js +1 -0
- package/dist/domain/spec/sections/state-value.d.ts +7 -0
- package/dist/domain/spec/sections/state-value.js +1 -0
- package/dist/domain/spec/sections/theme.d.ts +10 -0
- package/dist/domain/spec/sections/theme.js +1 -0
- package/dist/domain/spec/sections/transformers.d.ts +15 -0
- package/dist/domain/spec/sections/transformers.js +1 -0
- package/dist/domain/spec/sections/ui.d.ts +12 -0
- package/dist/domain/spec/sections/ui.js +1 -0
- package/dist/editor/graphql/GraphQLPanel.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +1 -0
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +1 -0
- package/dist/phoenix/application-spec/index.d.ts +1 -0
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/bin.js +1 -1
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/lingui/index.d.ts +1 -0
- package/dist/phoenix/lingui/index.js +1 -0
- package/dist/phoenix/services/application-spec-project-watcher.js +1 -1
- package/dist/phoenix/services/index.d.ts +1 -1
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/lingui-watcher.js +1 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/ConfiguratorRoutingProvider.d.ts +1 -1
- package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/OnGoToIndexHandler.d.ts +1 -2
- package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
- package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/index.js +1 -1
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/use-power-routing-lifecycle.d.ts +2 -0
- package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
- package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
- package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
- package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
- package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
- package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
- package/dist/react-sdk/domain-application-context/index.js +1 -1
- package/dist/react-sdk/index.d.ts +4 -0
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
- package/dist/react-sdk/integration/index.d.ts +1 -0
- package/dist/react-sdk/integration/index.js +1 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
- package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
- package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
- package/dist/react-sdk/lifecycle-providers/index.js +1 -0
- package/dist/react-sdk/notifications/index.d.ts +1 -0
- package/dist/react-sdk/notifications/index.js +1 -0
- package/dist/react-sdk/notifications/snackbar-action-button.d.ts +30 -0
- package/dist/react-sdk/notifications/snackbar-action-button.js +1 -0
- package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
- package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
- package/dist/watch/glob-matcher.d.ts +4 -4
- package/dist/watch/glob-matcher.js +1 -1
- package/dist/watch/watch.d.ts +4 -4
- package/dist/watch/watch.js +1 -1
- package/package.json +3 -3
- package/dist/application-spec/core/components/index.d.ts +0 -2
- package/dist/application-spec/core/expressions/index.d.ts +0 -2
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
- package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
- package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
- package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
- package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
- /package/dist/{application-spec/core/expressions/relation-expression-params.js → domain/spec/application/admin-pages-section.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → domain/spec/application/admin-pages.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → domain/spec/application/admin-states.js} +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
- /package/dist/phoenix/{services → lingui}/lingui.d.ts +0 -0
- /package/dist/phoenix/{services → lingui}/lingui.js +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { EnhancedJsonSchemaType } from '../../core/index.js';
|
|
3
|
+
import type { JsonSchema } from '../json-schema.js';
|
|
4
|
+
import type { ActionName } from '../model/index.js';
|
|
5
|
+
/** One parameter of an action: its declared schema, and whether a call has to pass it (a nullable param is optional). */
|
|
6
|
+
export interface ActionParam {
|
|
7
|
+
readonly schema: EnhancedJsonSchemaType;
|
|
8
|
+
readonly required: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* One validated action declaration. `params` and `result` keep the enhanced schemas for codegen and
|
|
12
|
+
* for consumers that expose the action; `paramsSchema` is the AJV-ready object schema of the parameters, with the
|
|
13
|
+
* refs resolved into `$defs`, which the action system validates the arguments of a call against.
|
|
14
|
+
*/
|
|
15
|
+
export type Action = Branded<'Action', {
|
|
16
|
+
readonly name: ActionName;
|
|
17
|
+
readonly description?: string;
|
|
18
|
+
readonly params: Readonly<Record<string, ActionParam>>;
|
|
19
|
+
readonly result: Readonly<Record<string, EnhancedJsonSchemaType>>;
|
|
20
|
+
readonly paramsSchema: JsonSchema;
|
|
21
|
+
}>;
|
|
22
|
+
/** The validated `actions` section: every declared action by name, in declaration order; empty when the spec declares none. */
|
|
23
|
+
export type Actions = Branded<'Actions', ReadonlyMap<ActionName, Action>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { ApplicationVersion } from './application-version.js';
|
|
3
|
+
/**
|
|
4
|
+
* Validated application metadata — version, auth, infrastructure settings.
|
|
5
|
+
* Used by codegen for ApplicationVersion export and builder chain methods.
|
|
6
|
+
*/
|
|
7
|
+
export type AppMetadata = Branded<'AppMetadata', {
|
|
8
|
+
readonly applicationVersion: ApplicationVersion;
|
|
9
|
+
readonly workspace: boolean;
|
|
10
|
+
readonly webComponentTag: string | undefined;
|
|
11
|
+
readonly pageTitle: string | undefined;
|
|
12
|
+
readonly useAuthHook: boolean;
|
|
13
|
+
readonly useClerk: boolean;
|
|
14
|
+
readonly enableAdminRelease: boolean;
|
|
15
|
+
readonly jsonSchemaValidator: 'ajv' | 'csp-compatible';
|
|
16
|
+
readonly gltfDecoder: 'js' | 'wasm';
|
|
17
|
+
readonly collectFinalizeData: boolean;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Branded semantic version (x.y.z) of the application.
|
|
4
|
+
* Exported by codegen as the `ApplicationVersion` constant and stored as
|
|
5
|
+
* `applicationVersion` on the deployment record.
|
|
6
|
+
*/
|
|
7
|
+
export type ApplicationVersion = Branded<'ApplicationVersion', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Validated published-data chunk name.
|
|
4
|
+
* Chunk names identify top-level partitions in generated `publishedData`. Data
|
|
5
|
+
* entries point to these names through their `chunk` field, and the parser adds
|
|
6
|
+
* the reserved `system` chunk when user chunks exist.
|
|
7
|
+
*/
|
|
8
|
+
export type ChunkName = Branded<'ChunkName', string>;
|
|
9
|
+
/**
|
|
10
|
+
* A named partition of published data with a scope.
|
|
11
|
+
* `scope` is typically `'project'` (per-project data) or `'public'` (shared).
|
|
12
|
+
*/
|
|
13
|
+
export interface ChunkDefinition {
|
|
14
|
+
/** Visibility/storage scope used by runtime data publishing for this chunk. */
|
|
15
|
+
readonly scope: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Validated chunk definitions, keyed by chunk name.
|
|
19
|
+
* When any user-defined chunks are present, the reserved `system` chunk is
|
|
20
|
+
* auto-injected with `scope: 'public'` to carry admin presets/recipes schemas.
|
|
21
|
+
* When the input is empty, no system injection happens (mirrors domain-spec behavior).
|
|
22
|
+
*/
|
|
23
|
+
export type Chunks = Readonly<Record<ChunkName, ChunkDefinition>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DataCellValue, DataSchema } from '../../../core/index.js';
|
|
2
|
+
/** Parsed `$data.custom` entry with validated definition and normalized row values. */
|
|
3
|
+
export interface CustomDataSpecEntry {
|
|
4
|
+
/** Column/property schema for a custom data row, used by admin pages and published-data schemas. */
|
|
5
|
+
readonly definition: DataSchema;
|
|
6
|
+
/** Optional published-data chunk that receives this entry as an array property. */
|
|
7
|
+
readonly chunk?: string;
|
|
8
|
+
/** Ownership mode deciding whether data is manual, externally connected, or admin-generated. */
|
|
9
|
+
readonly kind: 'manual' | 'connected' | 'generated';
|
|
10
|
+
/** Optional human-readable label used by inferred admin pages and connected-data UI. */
|
|
11
|
+
readonly title?: string;
|
|
12
|
+
/** Optional icon name used in inferred admin navigation. */
|
|
13
|
+
readonly icon?: string;
|
|
14
|
+
/** Default rows normalized to the same column order as `definition`. */
|
|
15
|
+
readonly values?: ReadonlyArray<readonly DataCellValue[]>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Validated `$data` entry key.
|
|
4
|
+
* This is the stable identifier for a data collection declared under `$data.custom`
|
|
5
|
+
* or `$data.swatchOptions`. The same key is used when extending published data,
|
|
6
|
+
* wiring connected/generated admin pages, and linking explicit admin pages through
|
|
7
|
+
* `connectedDataEntry`.
|
|
8
|
+
*/
|
|
9
|
+
export type DataEntryKey = Branded<'DataEntryKey', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CustomDataSpecEntry } from './custom-data-spec-entry.js';
|
|
2
|
+
import type { DataEntryKey } from './data-entry-key.js';
|
|
3
|
+
import type { SwatchDataSpecEntry } from './swatch-data-spec-entry.js';
|
|
4
|
+
/** Validated `$data` entries grouped by their source section. */
|
|
5
|
+
export interface ParsedDataSpecEntries {
|
|
6
|
+
/** Custom data entries with user-declared schemas. */
|
|
7
|
+
readonly custom: Readonly<Record<DataEntryKey, CustomDataSpecEntry>>;
|
|
8
|
+
/** Swatch data entries with the built-in swatch schema. */
|
|
9
|
+
readonly swatchOptions: Readonly<Record<DataEntryKey, SwatchDataSpecEntry>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CellValue } from '@salsita-ai/contracts/webhook';
|
|
2
|
+
/** Parsed `$data.swatchOptions` entry using the fixed swatch data shape. */
|
|
3
|
+
export interface SwatchDataSpecEntry {
|
|
4
|
+
/** Optional published-data chunk that receives this swatch entry as an array property. */
|
|
5
|
+
readonly chunk?: string;
|
|
6
|
+
/** Ownership mode deciding whether swatches are manual, externally connected, or admin-generated. */
|
|
7
|
+
readonly kind: 'manual' | 'connected' | 'generated';
|
|
8
|
+
/** Optional human-readable label used by inferred admin pages and connected-data UI. */
|
|
9
|
+
readonly title?: string;
|
|
10
|
+
/** Optional icon name used in inferred admin navigation. */
|
|
11
|
+
readonly icon?: string;
|
|
12
|
+
/** Default swatch rows normalized to `SWATCH_DEFINITION` column order. */
|
|
13
|
+
readonly values?: ReadonlyArray<readonly CellValue[]>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type * from './actions.js';
|
|
2
|
+
export type * from './app-metadata.js';
|
|
3
|
+
export type * from './application-version.js';
|
|
4
|
+
export type * from './data-spec/index.js';
|
|
5
|
+
export * from './infra/index.js';
|
|
6
|
+
export type * from './state-value.js';
|
|
7
|
+
export type * from './theme.js';
|
|
8
|
+
export type * from './transformers.js';
|
|
9
|
+
export type * from './ui.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./infra/index.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** The roles of `acl.canCreate`: the users who may create a configuration. */
|
|
2
|
+
export declare const aclRoles: readonly ['anonymous', 'user', 'admin', 'superadmin'];
|
|
3
|
+
/** One role of {@link aclRoles}. */
|
|
4
|
+
export type AclRole = (typeof aclRoles)[number];
|
|
5
|
+
/**
|
|
6
|
+
* The parsed `acl` section of the application spec: the roles that may create a configuration,
|
|
7
|
+
* all four when the spec declares none. Code generation passes it to the generated configurator
|
|
8
|
+
* builder, and the runtime spec carries it to the application.
|
|
9
|
+
*/
|
|
10
|
+
export interface Acl {
|
|
11
|
+
readonly canCreate: readonly AclRole[];
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const aclRoles=["anonymous","user","admin","superadmin"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./acl.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** A resource that links to the configuration. */
|
|
2
|
+
export interface ConfigurationLinkResource {
|
|
3
|
+
readonly type: 'ConfigurationLink';
|
|
4
|
+
readonly name: string;
|
|
5
|
+
}
|
|
6
|
+
/** A CSV document of the configuration, generated by the server or stored under `s3Key`. */
|
|
7
|
+
export interface CsvResource {
|
|
8
|
+
readonly type: 'Csv';
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly s3Key?: string;
|
|
11
|
+
}
|
|
12
|
+
/** A PDF document of the configuration, generated by the server or stored under `s3Key`. */
|
|
13
|
+
export interface PdfResource {
|
|
14
|
+
readonly type: 'Pdf';
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly s3Key?: string;
|
|
17
|
+
}
|
|
18
|
+
/** An image the client renders and uploads under `s3Key`. */
|
|
19
|
+
export interface ClientGeneratedImageResource {
|
|
20
|
+
readonly type: 'Image';
|
|
21
|
+
readonly name: string;
|
|
22
|
+
readonly clientGenerated: true;
|
|
23
|
+
readonly s3Key: string;
|
|
24
|
+
}
|
|
25
|
+
/** An image that already exists at `url`. */
|
|
26
|
+
export interface ExistingImageResource {
|
|
27
|
+
readonly type: 'Image';
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly exists: true;
|
|
30
|
+
readonly url: string;
|
|
31
|
+
}
|
|
32
|
+
/** An image the server renders under `s3Key`. */
|
|
33
|
+
export interface GeneratedImageResource {
|
|
34
|
+
readonly type: 'Image';
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly s3Key: string;
|
|
37
|
+
}
|
|
38
|
+
/** One of the three kinds of image resource. */
|
|
39
|
+
export type ImageResource = ClientGeneratedImageResource | ExistingImageResource | GeneratedImageResource;
|
|
40
|
+
/**
|
|
41
|
+
* One entry of the `resources` section of the application spec: a generated or linked resource of a
|
|
42
|
+
* configuration. A name identifies one resource, so no two entries share a name. Code generation
|
|
43
|
+
* emits the entries as an array literal, and the union of their names is the type of a resource
|
|
44
|
+
* name in the project's webhook and frontend code.
|
|
45
|
+
*/
|
|
46
|
+
export type ResourceEntry = ConfigurationLinkResource | CsvResource | PdfResource | ImageResource;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parsed `resourcesConfig` section of the application spec: the host settings of the
|
|
3
|
+
* resources, such as the base resources URL and the texture URLs to prefetch. `domain` exports a
|
|
4
|
+
* different `ResourcesConfig`, the resources part of an application config.
|
|
5
|
+
*/
|
|
6
|
+
export interface SpecResourcesConfig {
|
|
7
|
+
readonly baseResourcesUrl?: string;
|
|
8
|
+
readonly prefetchTextureUrls?: readonly string[];
|
|
9
|
+
readonly deploymentQueryDisabled?: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Branded state value — a valid identifier used as a state enum entry
|
|
4
|
+
* (e.g. "Default", "overview", "detailView").
|
|
5
|
+
* Used across navigation, view, tool, and export state dimensions.
|
|
6
|
+
*/
|
|
7
|
+
export type StateValue = Branded<'StateValue', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Validated theme configuration for the configurator UI.
|
|
4
|
+
* Preset identifies a built-in theme from getPhoenixThemes(),
|
|
5
|
+
* options provides partial overrides passed to the theme factory.
|
|
6
|
+
*/
|
|
7
|
+
export type Theme = Branded<'Theme', {
|
|
8
|
+
readonly preset: string;
|
|
9
|
+
readonly options: Readonly<Record<string, unknown>>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/** One declared transformer: the name its implementation is registered under, and its priority. */
|
|
3
|
+
export interface TransformerEntry {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly priority?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Validated transformer declarations. Each transformer is applied during
|
|
9
|
+
* domain state transitions to enforce business rules (e.g. "fixLegsForCircleTop").
|
|
10
|
+
* Every entry's name must match a file basename in `src/transformers/`
|
|
11
|
+
* (modulo case + dashes — kebab-case files and camelCase YAML names are
|
|
12
|
+
* treated as equivalent since runtime matching happens on the `.build('name')`
|
|
13
|
+
* label, not the filename). `application-spec` exports it as `Transformers`.
|
|
14
|
+
*/
|
|
15
|
+
export type SpecTransformers = Branded<'Transformers', readonly TransformerEntry[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Validated UI configuration for the configurator.
|
|
4
|
+
* Controls preview behavior, expansion mode, and locale settings.
|
|
5
|
+
*/
|
|
6
|
+
export type Ui = Branded<'Ui', {
|
|
7
|
+
readonly preview?: 'always' | 'never' | 'auto' | 'hide';
|
|
8
|
+
readonly alwaysExpand?: boolean;
|
|
9
|
+
readonly appLoader?: 'legacy' | 'universal';
|
|
10
|
+
readonly availableLocales: readonly string[];
|
|
11
|
+
readonly textLanguages?: readonly string[];
|
|
12
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"@monaco-editor/react";import{Box as r,Checkbox as i,FormControlLabel as a,Stack as n,Typography as s}from"@mui/material";import{useState as l}from"react";import{EditorButton as m}from"../common/EditorButton.js";import{jsonEditorOptions as d}from"../common/monaco-config.js";import{useOptionalConfigurator as c,useOptionalDomain as p}from"../hooks/use-optional-runtime.js";import{splitOperations as u}from"./split-operations.js";let h={fontSize:"12px",fontWeight:600,color:"text.secondary"};export const GraphQLPanel=()=>{let
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"@monaco-editor/react";import{Box as r,Checkbox as i,FormControlLabel as a,Stack as n,Typography as s}from"@mui/material";import{useState as l}from"react";import{EditorButton as m}from"../common/EditorButton.js";import{jsonEditorOptions as d}from"../common/monaco-config.js";import{useOptionalConfigurator as c,useOptionalDomain as p}from"../hooks/use-optional-runtime.js";import{splitOperations as u}from"./split-operations.js";let h={fontSize:"12px",fontWeight:600,color:"text.secondary"};export const GraphQLPanel=()=>{let g=c()?.graphQLSystem,f=p()?.storeSystem,[x,v]=l("query { root { id type } }"),[y,b]=l(""),[S,k]=l(!1),[j,N]=l(null),[w,C]=l(null),[z,J]=l(!1),O=async()=>{let e=u(x),t=(e=>{if(""===e.trim())return{ok:!0,variables:void 0};try{let t=JSON.parse(e);return"object"!=typeof t||null===t||Array.isArray(t)?{ok:!1,message:"Variables must be a JSON object. Wrap them in {} or clear the field."}:{ok:!0,variables:t}}catch(e){return{ok:!1,message:`Variables are not valid JSON: ${e instanceof Error?e.message:String(e)}. Fix the JSON or clear the field.`}}})(y);if(g){if(C(null),!e.ok)return void N(e.message);if(!t.ok)return void N(t.message);if(S&&!f?.isInitialized)return void N("The configuration is not loaded yet, so there is no state to run against. Run again once the configurator has finished loading.");J(!0);try{let o=e.operations.map(e=>({...e,variables:t.variables})),r=S?f?.stateSlices.committed.value.state:void 0,i=r?await g.prepare(r,o):void 0,{results:a,committed:n,message:s,sideEffects:l,warnings:m}=i&&r?{results:i.map(({result:e})=>e),committed:!1,message:"Dry run: nothing was committed.",sideEffects:g.readSideEffects(i),warnings:g.readWarnings(r,i)}:await g.execute(o),d=a.map((t,o)=>({operationName:e.operations[o]?.operationName??null,...t}));N(JSON.stringify(l.length>0||m.length>0?{results:d,...l.length>0?{sideEffects:l}:{},...m.length>0?{warnings:m}:{}}:d,null,2)),C(n?"Committed as one undo step.":s??"Nothing was committed.")}finally{J(!1)}}};return t(n,{direction:"column",spacing:1.5,sx:{px:1.5,py:1},children:[e(s,{variant:"subtitle2",sx:h,children:"Query"}),e(r,{component:"div",sx:{height:160,border:"1px solid #dee2e6"},children:e(o,{language:"graphql",value:x,onChange:e=>v(e??""),options:d})}),e(s,{variant:"subtitle2",sx:h,children:"Variables (JSON)"}),e(r,{component:"div",sx:{height:80,border:"1px solid #dee2e6"},children:e(o,{language:"json",value:y,onChange:e=>b(e??""),options:d})}),e(a,{control:e(i,{size:"small",checked:S,onChange:e=>{k(e.target.checked)},sx:{p:.5}}),label:"Dry run",sx:{ml:-.5,mr:0,"& .MuiFormControlLabel-label":{fontSize:"12px",color:"#212529"}}}),e(m,{fullWidth:!0,disabled:!g||z,onClick:()=>void O(),children:g?"Run":"Configurator is not ready"}),null!==w&&e(s,{"data-testid":"graphql-status",sx:{fontSize:"12px",color:"text.secondary"},children:w}),null!==j&&e(r,{component:"pre","data-testid":"graphql-result",sx:{m:0,p:1,fontSize:"12px",backgroundColor:"#f8f9fa",overflow:"auto",whiteSpace:"pre-wrap"},children:j})]})};
|
|
@@ -14,5 +14,6 @@ interface GenerateProjectOptions {
|
|
|
14
14
|
export declare const generateApplicationSpecProject: (options: GenerateProjectOptions) => Promise<{
|
|
15
15
|
templateFiles: readonly string[];
|
|
16
16
|
applicationSpec: import("#package/application-spec").ApplicationSpec;
|
|
17
|
+
diagnostics: readonly import("#package/application-spec").SpecDiagnostic[];
|
|
17
18
|
}>;
|
|
18
19
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{symlink as e}from"fs/promises";import{ParseContext as i}from"#package/application-spec";import{bootstrapLinguiCatalogs as t,extractAndCompileLingui as p}from"../
|
|
2
|
-
${
|
|
1
|
+
import{symlink as e}from"fs/promises";import{ParseContext as i}from"#package/application-spec";import{bootstrapLinguiCatalogs as t,extractAndCompileLingui as p}from"../lingui/index.js";import{compileWithSwc as a}from"../services/swc.js";import{exists as o}from"../utils/index.js";import{ApplicationSpecBuilder as s}from"./application-spec-builder.js";import{formatMetrics as c}from"./metrics/index.js";import{syncTemplateFiles as n}from"./template-files.js";let r=".phoenix",l=async(e,i)=>{let t=i.startSpan("swcCompile(src)","sync","generate-application-spec-project.ts");await a({sourceDir:"src",outDir:`./${r}/.swc/src`},{logger:e}),t();let p=i.startSpan("swcCompile(.phoenix)","sync","generate-application-spec-project.ts");await a({sourceDir:r,outDir:`./${r}/.swc/${r}`},{logger:e}),p()};export const generateApplicationSpecProject=async a=>{let{withLingui:r=!0,force:m=!1,analyze:u=!1}=a,g=a.logger;g.info("Using application-spec pipeline");let j=new i,w=j.startSpan("sync","generateApplicationSpecProject","generate-application-spec-project.ts"),d=j.startSpan("build","sync","application-spec-builder.ts"),f=new s({logger:g,sdkVersion:a.sdkVersion,projectSlug:a.projectSlug,environmentSlug:a.environmentSlug,cliUseWorkspace:a.cliUseWorkspace,enableEditor:a.enableEditor??!0,inlineTemplates:a.inlineTemplates??!1}),S=await f.build({force:m,parsingContext:j,compile:!1});if(d(),!S.ok)throw Error(`Failed to build the project files:
|
|
2
|
+
${S.errors.map(e=>` [${e.code}] ${e.message}`).join("\n")}`);let b=j.startSpan("symlink","sync","generate-application-spec-project.ts");await o("./.phoenix/public")||await e("../public","./.phoenix/public");let x=await n();if(b(),r){let e=j.startSpan("lingui","sync","generate-application-spec-project.ts");await p({logger:g}),e()}else await t(S.application.applicationSpec.configurator.ui.availableLocales,{logger:g});return await l(g,j),w(),u&&c(j.metrics,j.counts,g),{templateFiles:x,applicationSpec:S.application.applicationSpec,diagnostics:S.diagnostics}};
|
|
@@ -13,4 +13,5 @@ export interface GenerateProjectFilesProps {
|
|
|
13
13
|
export declare const generateProjectFiles: (props: GenerateProjectFilesProps, context?: CommandContext) => Promise<{
|
|
14
14
|
templateFiles: readonly string[];
|
|
15
15
|
applicationSpec: import("../../application-spec/index.js").ApplicationSpec;
|
|
16
|
+
diagnostics: readonly import("../../application-spec/index.js").SpecDiagnostic[];
|
|
16
17
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./generate-application-spec-project.js";export*from"./generate-application-spec-story.js";export*from"./application-spec-file-reader.js";export*from"./application-spec-builder.js";export*from"./resolve-deployment-data.js";export{generateProjectFiles}from"./generate-project-files.js";
|
|
1
|
+
export*from"./generate-application-spec-project.js";export*from"./generate-application-spec-story.js";export*from"./application-spec-file-reader.js";export*from"./application-spec-builder.js";export*from"./resolve-deployment-data.js";export{generateProjectFiles}from"./generate-project-files.js";export{logDiagnostics}from"./metrics/index.js";
|
package/dist/phoenix/bin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{assertSupportedNodeVersion as
|
|
2
|
+
import{assertSupportedNodeVersion as e}from"./utils/node-version/index.js";e(),await import("./cli.js").catch(e=>{throw console.error("If this error comes from loading a dependency, check peerDependencies in the installed @salsita-ai/sdk package.json, align your project's dependencies, reinstall, and retry."),e});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{rm as e}from"fs/promises";import{build as o}from"vite";import{generateProjectFiles as i}from"../application-spec/index.js";import{composeDefaultBanner as
|
|
1
|
+
import{rm as e}from"fs/promises";import{build as o}from"vite";import{generateProjectFiles as i,logDiagnostics as t}from"../application-spec/index.js";import{composeDefaultBanner as r,getViteBuildConfigs as s}from"../services/index.js";import{checkBundleSizeBudgets as n,readGitCommit as c}from"../utils/index.js";import{buildWebhooks as d}from"../webhooks/index.js";export const runBuildCommand=async(a,l)=>{let{logger:p}=l,{sdkVersion:u,projectSlug:m,environmentSlug:b,cliUseWorkspace:f,enableEditor:h,buildTarget:w="both",force:g=!1,banner:x}=a;try{process.env.NODE_ENV="production",p.step("Building Phoenix project");let{templateFiles:a,applicationSpec:y,diagnostics:v}=await i({sdkVersion:u,projectSlug:m,environmentSlug:b,cliUseWorkspace:f,enableEditor:h,inlineTemplates:!0,force:g},l);if(t(v,p),p.success("Project files built successfully"),"frontend"===w||"both"===w){p.step("Cleaning frontend build directory");try{await e("./.phoenix/dist/frontend",{recursive:!0,force:!0}),p.debug("Frontend build directory cleaned")}catch(e){p.debug("No frontend build directory to clean")}p.step("Building Vite bundle");let i=void 0===x?await c({directory:process.cwd(),trackedFile:"package.json"}):void 0;for(let e of(void 0===x&&void 0===i&&p.debug("No git commit found for the banner comment; it names the application version only"),await s({enableEditor:h,templateFiles:a,sdkVersion:u,banner:x??r({applicationVersion:y?.appMetadata.applicationVersion,commit:i})})))await o(e);p.success("Vite build completed")}("webhook"===w||"both"===w)&&(p.step("Building webhooks"),await d({experimental:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js"}),p.success("Webhooks build completed")),void 0!==y&&await n({budgets:y.budgets,buildTarget:w},l),p.success("Build completed successfully!")}catch(e){p.error(`Build failed: ${e instanceof Error?e.message:String(e)}`,e),process.exit(1)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{rm as e}from"fs/promises";import{generateProjectFiles as i}from"../application-spec/index.js";import{exists as
|
|
1
|
+
import{rm as e}from"fs/promises";import{generateProjectFiles as i,logDiagnostics as o}from"../application-spec/index.js";import{exists as r}from"../utils/index.js";export const runCleanCommand=async(s,n)=>{let{logger:p}=n,{sdkVersion:t,projectSlug:a,environmentSlug:c,cliUseWorkspace:l,enableEditor:d}=s;try{if(p.step("Cleaning Phoenix project"),await r(".phoenix")&&(p.debug("Removing .phoenix..."),await e(".phoenix",{recursive:!0,force:!0}),p.debug("Removed .phoenix")),p.success("Cleanup completed"),!await r("spec"))return void p.warn("Spec folder not found. Skipping spec rebuild.");p.step("Rebuilding specs");let{diagnostics:s}=await i({sdkVersion:t,projectSlug:a,environmentSlug:c,cliUseWorkspace:l,enableEditor:d},n);o(s,p),p.success("Clean and rebuild completed successfully!")}catch(e){p.error(`Clean failed: ${e instanceof Error?e.message:String(e)}`,e),process.exit(1)}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{openAsBlob as e}from"node:fs";import{createApiBaseClient as t}from"#package/client";import{resolveApplicationSpecDeploymentData as i}from"../application-spec/index.js";import{createSourceArchive as o,getServerCredentials as a}from"../services/index.js";let r={queued:"Waiting for a build runner",preparing:"Preparing the deployment",building:"Building the project",deploying:"Deploying the frontend, webhooks and assets",live:"Live",failed:"Failed",cancelled:"Cancelled"},s=e=>new Promise(t=>setTimeout(t,e)),n=async(t,i)=>{let o=new FormData;for(let[e,i]of Object.entries(t.fields))o.append(e,i);o.append("file",await e(i,{type:"application/gzip"}),"sources.tgz");let a=await fetch(t.url,{method:"POST",body:o});if(!a.ok)throw Error(`Uploading the sources failed with HTTP ${a.status}: ${await a.text()}`)};export const runDeployCommand=async(e,{logger:l})=>{let d=await a(e.serverUrl),{pollIntervalMs:u}=e;if(!d)throw Error(`You are not signed in to ${e.serverUrl}. Run \`phoenix login <workspace>\` first.`);let c=t(e.serverUrl),p={authorization:`Bearer ${d.token}`};l.step("Validating the application spec");let h=await i({skipUpload:!0,logger:l});l.success(`The spec is valid (application version ${h.applicationVersion})`),l.step(`Packing the project for ${d.customerName}`);let m=await o(e.projectDir);try{let t;m.hasConversationLog?l.info("Including conversation.log in the private sources archive. It is not published with the application."):l.warn("No conversation.log found in the project root. Deploying without a conversation transcript."),l.info(` ${m.fileCount} files, ${(t=m.size)<1048576?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(1)} MB`}`);let i=await c.POST("/deployments/builds",{body:{sdkVersion:e.sdkVersion,sizeBytes:m.size,configurationSchema:{version:h.schemaVersion,schema:h.schema},adminConfigurationSchema:h.adminSchema?{version:h.adminSchemaVersion,schema:h.adminSchema}:void 0},headers:p});if(i.error||!i.data)throw Error(`The server did not create a build: ${i.error?.message??"no response"}`);let{buildId:o,upload:a}=i.data;l.step("Uploading the sources"),await n(a,m.path);let f=await c.POST("/deployments/builds/{buildId}/start",{params:{path:{buildId:o}},headers:{...p,"content-type":null}});if(f.error)throw Error(`The server did not start the build: ${f.error.message}`);if(f.data?.status==="failed")throw Error(`Build ${o} could not be started: ${f.data.error??"the server gave no reason"}`);if(l.success(`Build ${o} started`),d.studioUrl){let e=new URL(`/builder/deployments/${o}`,d.studioUrl);e.searchParams.set("customer",d.customerSlug),l.info(`Follow the build in Studio: ${e.toString()}`)}if(!e.wait)return;let g=null,w=0;for(;;){let{data:e,error:t}=await c.GET("/deployments/builds/{buildId}",{params:{path:{buildId:o}},headers:p}).catch(e=>({data:void 0,error:{message:String(e)}}));if(t||!e){if((w+=1)>=5)throw Error(`Following build ${o} failed: ${t?.message??"no response"}. The build may still finish; check Deployments in Studio.`);await s(u);continue}if(w=0,e.status!==g&&(g=e.status,l.step(r[e.status])),"live"===e.status){l.success(`Your configurator is live at ${e.configuratorUrl}`),l.info("Coding agents: when the user has nothing more to build,
|
|
1
|
+
import{openAsBlob as e}from"node:fs";import{createApiBaseClient as t}from"#package/client";import{resolveApplicationSpecDeploymentData as i}from"../application-spec/index.js";import{createSourceArchive as o,getServerCredentials as a}from"../services/index.js";let r={queued:"Waiting for a build runner",preparing:"Preparing the deployment",building:"Building the project",deploying:"Deploying the frontend, webhooks and assets",live:"Live",failed:"Failed",cancelled:"Cancelled"},s=e=>new Promise(t=>setTimeout(t,e)),n=async(t,i)=>{let o=new FormData;for(let[e,i]of Object.entries(t.fields))o.append(e,i);o.append("file",await e(i,{type:"application/gzip"}),"sources.tgz");let a=await fetch(t.url,{method:"POST",body:o});if(!a.ok)throw Error(`Uploading the sources failed with HTTP ${a.status}: ${await a.text()}`)};export const runDeployCommand=async(e,{logger:l})=>{let d=await a(e.serverUrl),{pollIntervalMs:u}=e;if(!d)throw Error(`You are not signed in to ${e.serverUrl}. Run \`phoenix login <workspace>\` first.`);let c=t(e.serverUrl),p={authorization:`Bearer ${d.token}`};l.step("Validating the application spec");let h=await i({skipUpload:!0,logger:l});l.success(`The spec is valid (application version ${h.applicationVersion})`),l.step(`Packing the project for ${d.customerName}`);let m=await o(e.projectDir);try{let t;m.hasConversationLog?l.info("Including conversation.log in the private sources archive. It is not published with the application."):l.warn("No conversation.log found in the project root. Deploying without a conversation transcript."),l.info(` ${m.fileCount} files, ${(t=m.size)<1048576?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(1)} MB`}`);let i=await c.POST("/deployments/builds",{body:{sdkVersion:e.sdkVersion,sizeBytes:m.size,configurationSchema:{version:h.schemaVersion,schema:h.schema},adminConfigurationSchema:h.adminSchema?{version:h.adminSchemaVersion,schema:h.adminSchema}:void 0},headers:p});if(i.error||!i.data)throw Error(`The server did not create a build: ${i.error?.message??"no response"}`);let{buildId:o,upload:a}=i.data;l.step("Uploading the sources"),await n(a,m.path);let f=await c.POST("/deployments/builds/{buildId}/start",{params:{path:{buildId:o}},headers:{...p,"content-type":null}});if(f.error)throw Error(`The server did not start the build: ${f.error.message}`);if(f.data?.status==="failed")throw Error(`Build ${o} could not be started: ${f.data.error??"the server gave no reason"}`);if(l.success(`Build ${o} started`),d.studioUrl){let e=new URL(`/builder/deployments/${o}`,d.studioUrl);e.searchParams.set("customer",d.customerSlug),l.info(`Follow the build in Studio: ${e.toString()}`)}if(!e.wait)return;let g=null,w=0;for(;;){let{data:e,error:t}=await c.GET("/deployments/builds/{buildId}",{params:{path:{buildId:o}},headers:p}).catch(e=>({data:void 0,error:{message:String(e)}}));if(t||!e){if((w+=1)>=5)throw Error(`Following build ${o} failed: ${t?.message??"no response"}. The build may still finish; check Deployments in Studio.`);await s(u);continue}if(w=0,e.status!==g&&(g=e.status,l.step(r[e.status])),"live"===e.status){l.success(`Your configurator is live at ${e.configuratorUrl}`),l.info("Coding agents: when the user has nothing more to build, load the phoenix skill and follow its Feedback guide for the run evaluation, once per conversation.");return}if("failed"===e.status||"cancelled"===e.status||e.timedOut){let t=await c.GET("/deployments/builds/{buildId}/log",{params:{path:{buildId:o}},headers:p}).catch(()=>({data:void 0})),i=(t.data?.log??"").trim().split("\n").slice(-40).join("\n");i&&l.info(`
|
|
2
2
|
Last lines of the build log:
|
|
3
3
|
${i}
|
|
4
4
|
`);let a=e.timedOut?"it took too long":e.error??"see the build log";throw Error(`Build ${o} did not go live: ${a}`)}await s(u)}}finally{await m.cleanup()}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{generateProjectFiles as e}from"../application-spec/index.js";export const runSyncCommand=async(
|
|
1
|
+
import{generateProjectFiles as e,logDiagnostics as s}from"../application-spec/index.js";export const runSyncCommand=async(c,t)=>{let{logger:i}=t,{sdkVersion:r,projectSlug:n,environmentSlug:l,cliUseWorkspace:o,enableEditor:p,force:a=!1,analyze:u=!1}=c;try{i.step("Syncing Phoenix project files"),i.step("Building project files");let{diagnostics:c}=await e({sdkVersion:r,projectSlug:n,environmentSlug:l,cliUseWorkspace:o,enableEditor:p,inlineTemplates:!0,force:a,analyze:u},t);s(c,i),i.success("Project files built successfully"),i.success("Sync completed successfully!")}catch(e){i.error(`Sync failed: ${e instanceof Error?e.message:String(e)}`,e),process.exit(1)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LINGUI_CONFIG_PATH, bootstrapLinguiCatalogs, compileLingui, extractAndCompileLingui } from './lingui.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{LINGUI_CONFIG_PATH,bootstrapLinguiCatalogs,compileLingui,extractAndCompileLingui}from"./lingui.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{mkdirSync as e}from"fs";import{resolve as t}from"path";import i from"promise-queue";import{Subject as s,buffer as r,debounceTime as o}from"rxjs";import{createServer as n,normalizePath as l}from"vite";import{watch as a}from"#package/watch";import{ApplicationSpecBuilder as h}from"../application-spec/application-spec-builder.js";import{logDiagnostics as c}from"../application-spec/metrics/index.js";import{syncTemplateFiles as u}from"../application-spec/template-files.js";import{buildWebhooks as p}from"../webhooks/index.js";import{getViteDevConfig as g}from"./vite-config.js";export const WATCH_PATTERNS=["spec/**/*.{yaml,yml}","src/**/*.{ts,tsx,yaml,yml,json,html,css}","templates/*.html",".env",".env.generated",".phoenix/.env.generated"];export const IGNORED_PATTERNS=["src/locales/**/*.{ts,tsx}",".phoenix/!(.env.generated)/**"];export class ApplicationSpecProjectWatcher{watcher=null;subscription=null;rebuildQueue=new i(1,1/0);changeSubject$=new s;viteServer=null;pubsub;logger;onRebuilt;onViteServerChange;builder;useServer;isShuttingDown=!1;suspended=!1;heldChanges=new Set;constructor(e){this.pubsub=e.pubsub,this.logger=e.logger,this.onRebuilt=e.onRebuilt,this.onViteServerChange=e.onViteServerChange,this.builder=new h({logger:e.logger,sdkVersion:e.sdkVersion,projectSlug:e.projectSlug,environmentSlug:e.environmentSlug,cliUseWorkspace:e.cliUseWorkspace,enableEditor:e.enableEditor,inlineTemplates:e.inlineTemplates}),this.useServer=e.useServer}start(e){this.viteServer=e,this.setupFileWatcher(),this.setupRebuildSubscription()}applyVariantFiles(e){this.rebuildQueue.add(async()=>{this.isShuttingDown||await this.rebuild(new Set(e.map(e=>e.fileName)),!1,!0)})}suspend(){this.suspended=!0}resume(){for(let e of(this.suspended=!1,this.heldChanges))this.changeSubject$.next(e);this.heldChanges.clear()}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){e(t(process.cwd(),"src"),{recursive:!0}),this.watcher=a(WATCH_PATTERNS,{ignored:IGNORED_PATTERNS,cwd:process.cwd(),persistent:!0,ignoreInitial:!1}),this.watcher.on("all",(e,t)=>{if("change"===e||"add"===e||"unlink"===e){if(this.suspended)return void this.heldChanges.add(t);this.logger.info(`
|
|
1
|
+
import{mkdirSync as e}from"fs";import{resolve as t}from"path";import i from"promise-queue";import{Subject as s,buffer as r,debounceTime as o}from"rxjs";import{createServer as n,normalizePath as l}from"vite";import{watch as a}from"#package/watch";import{ApplicationSpecBuilder as h}from"../application-spec/application-spec-builder.js";import{logDiagnostics as c}from"../application-spec/metrics/index.js";import{syncTemplateFiles as u}from"../application-spec/template-files.js";import{buildWebhooks as p}from"../webhooks/index.js";import{getViteDevConfig as g}from"./vite-config.js";export const WATCH_PATTERNS=["package.json","spec/**/*.{yaml,yml}","src/**/*.{ts,tsx,yaml,yml,json,html,css}","templates/*.html",".env",".env.generated",".phoenix/.env.generated"];export const IGNORED_PATTERNS=["src/locales/**/*.{ts,tsx}",".phoenix/!(.env.generated)/**"];export class ApplicationSpecProjectWatcher{watcher=null;subscription=null;rebuildQueue=new i(1,1/0);changeSubject$=new s;viteServer=null;pubsub;logger;onRebuilt;onViteServerChange;builder;useServer;isShuttingDown=!1;suspended=!1;heldChanges=new Set;constructor(e){this.pubsub=e.pubsub,this.logger=e.logger,this.onRebuilt=e.onRebuilt,this.onViteServerChange=e.onViteServerChange,this.builder=new h({logger:e.logger,sdkVersion:e.sdkVersion,projectSlug:e.projectSlug,environmentSlug:e.environmentSlug,cliUseWorkspace:e.cliUseWorkspace,enableEditor:e.enableEditor,inlineTemplates:e.inlineTemplates}),this.useServer=e.useServer}start(e){this.viteServer=e,this.setupFileWatcher(),this.setupRebuildSubscription()}applyVariantFiles(e){this.rebuildQueue.add(async()=>{this.isShuttingDown||await this.rebuild(new Set(e.map(e=>e.fileName)),!1,!0)})}suspend(){this.suspended=!0}resume(){for(let e of(this.suspended=!1,this.heldChanges))this.changeSubject$.next(e);this.heldChanges.clear()}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){e(t(process.cwd(),"src"),{recursive:!0}),this.watcher=a(WATCH_PATTERNS,{ignored:IGNORED_PATTERNS,cwd:process.cwd(),persistent:!0,ignoreInitial:!1}),this.watcher.on("all",(e,t)=>{if("change"===e||"add"===e||"unlink"===e){if(this.suspended)return void this.heldChanges.add(t);this.logger.info(`
|
|
2
2
|
📝 Detected ${e}: ${t}`),this.changeSubject$.next(t)}})}setupRebuildSubscription(){let e=this.changeSubject$.pipe(o(10));this.subscription=this.changeSubject$.pipe(r(e)).subscribe(e=>{let t=new Set(e),i=t.has(".env");this.rebuildQueue.add(async()=>{this.isShuttingDown||(this.logger.info(`
|
|
3
3
|
🔨 Rebuilding spec files...
|
|
4
4
|
`),await this.rebuild(t,i,!1))})})}async rebuild(e,i,s){try{let r=this.viteServer;if(!r)throw Error("Cannot rebuild the project: the watcher has no Vite server yet, because it was not started. Start the watcher before applying files");let o=await u();if(this.isShuttingDown)return;let a=await this.builder.build({compile:!s});if(this.isShuttingDown)return;if(c(a.diagnostics,this.logger),!a.ok){for(let e of a.errors)this.logger.error(`[${e.code}] ${e.message}${e.file?` (${e.file})`:""}`);this.pubsub.specFile$.next({rawProjectFiles:a.rawProjectFiles,projectRoot:process.cwd()});return}let{application:h,changedFiles:d}=a;this.onRebuilt?.(h.applicationSpec);let w=r.moduleGraph,b=Date.now(),f=new Set,S=process.cwd(),m=e=>{let t=w.getModulesByFile(l(e));if(t)for(let e of t)w.invalidateModule(e,f,b,!0)};for(let i of e)m(t(S,i));for(let e of d)m(t(S,`.phoenix/${e.path}`));if(this.pubsub.specFile$.next({rawProjectFiles:h.rawProjectFiles,projectRoot:process.cwd(),configurationSchemaHash:h.applicationSpec.configurator.configurationSchema.hash}),this.isShuttingDown)return;if(i){if(await r.close(),this.isShuttingDown)return;let e=await g({templateFiles:o});if(this.isShuttingDown)return;let t=await n(e);if(this.isShuttingDown||(await t.listen(),this.isShuttingDown))return void await t.close();this.viteServer=t,this.onViteServerChange?.(t),this.logger.success("Vite server restarted (env changed)")}if(this.useServer&&!s){if(this.logger.step("Building webhooks"),await p({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js",preserveExistingOutput:!0}),this.isShuttingDown)return;this.logger.success("Webhooks rebuilt successfully")}this.logger.success("Project files rebuilt successfully")}catch(e){this.logger.error(`Build failed: ${e instanceof Error?e.message:String(e)}`,e)}}}
|
|
@@ -8,7 +8,7 @@ export { MockTemplateWatcher, type MockTemplateWatcherConfig } from './mock-temp
|
|
|
8
8
|
export { ApplicationSpecProjectWatcher, type ApplicationSpecProjectWatcherConfig, } from './application-spec-project-watcher.js';
|
|
9
9
|
export { ApplicationSpecStoryWatcher, type ApplicationSpecStoryWatcherConfig, } from './application-spec-story-watcher.js';
|
|
10
10
|
export { LinguiWatcher, type LinguiWatcherConfig } from './lingui-watcher.js';
|
|
11
|
-
export { bootstrapLinguiCatalogs, extractAndCompileLingui } from '
|
|
11
|
+
export { bootstrapLinguiCatalogs, extractAndCompileLingui } from '../lingui/index.js';
|
|
12
12
|
export { loadMockTemplates, parseMockTemplateYaml, type LoadMockTemplatesResult, type ParsedMockTemplate, } from './spec-files.js';
|
|
13
13
|
export { LOG_STREAMS, LogBus, type LogEntry, type LogLevel, type LogPage, type LogQuery, type LogStream, } from './log-bus.js';
|
|
14
14
|
export { createBusLogger, type CreateBusLoggerOptions } from './bus-logger.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{PhoenixPubSub}from"./phoenix-pubsub.js";export{PhoenixStore}from"./phoenix-store.js";export{PhoenixApplication}from"./phoenix-application.js";export{VariantFileSession}from"./variant-file-session.js";export{VariantPreviewService}from"./variant-preview-service.js";export{MockTemplateWatcher}from"./mock-template-watcher.js";export{ApplicationSpecProjectWatcher}from"./application-spec-project-watcher.js";export{ApplicationSpecStoryWatcher}from"./application-spec-story-watcher.js";export{LinguiWatcher}from"./lingui-watcher.js";export{bootstrapLinguiCatalogs,extractAndCompileLingui}from"
|
|
1
|
+
export{PhoenixPubSub}from"./phoenix-pubsub.js";export{PhoenixStore}from"./phoenix-store.js";export{PhoenixApplication}from"./phoenix-application.js";export{VariantFileSession}from"./variant-file-session.js";export{VariantPreviewService}from"./variant-preview-service.js";export{MockTemplateWatcher}from"./mock-template-watcher.js";export{ApplicationSpecProjectWatcher}from"./application-spec-project-watcher.js";export{ApplicationSpecStoryWatcher}from"./application-spec-story-watcher.js";export{LinguiWatcher}from"./lingui-watcher.js";export{bootstrapLinguiCatalogs,extractAndCompileLingui}from"../lingui/index.js";export{loadMockTemplates,parseMockTemplateYaml}from"./spec-files.js";export{LOG_STREAMS,LogBus}from"./log-bus.js";export{createBusLogger}from"./bus-logger.js";export{patchConsole}from"./console-capture.js";export{WebhookTunnelMonitor}from"./webhook-tunnel-monitor.js";export{compileWithSwc,watchWithSwc}from"./swc.js";export{STORY_DEV_MARKER_PATH,readActiveStoryDevMarker}from"./story-dev-marker.js";export{composeDefaultBanner}from"./phx-banner-plugin.js";export{getViteBuildConfigs,getViteDevConfig,setViteLogSink}from"./vite-config.js";export{getServerCredentials,removeServerCredentials,saveServerCredentials}from"./cli-credentials.js";export{createSourceArchive,extractSourceArchive}from"./source-archive.js";export{resolveSignedInDevelopmentEnvironment}from"./signed-in-development-environment.js";export{DEFAULT_PHOENIX_REGION,PHOENIX_REGIONS,PUBLIC_PHOENIX_REGIONS,getRegionServerUrl,getRegionStudioUrl}from"./phoenix-regions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"promise-queue";import{Subject as
|
|
1
|
+
import e from"promise-queue";import{Subject as i,buffer as t,debounceTime as s}from"rxjs";import{watch as r}from"#package/watch";import{compileLingui as n,extractAndCompileLingui as o}from"../lingui/index.js";let c=["src/**/*.{ts,tsx}","src/locales/**/*.po"],g=["src/locales/**/*.{ts,tsx}"];export class LinguiWatcher{watcher=null;subscription=null;runQueue=new e(1,1/0);changeSubject$=new i;logger;isShuttingDown=!1;constructor(e){this.logger=e.logger}start(){this.setupFileWatcher(),this.setupRunSubscription()}trigger(){this.changeSubject$.next("<codegen-rebuild>")}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){this.watcher=r(c,{ignored:g,cwd:process.cwd(),ignoreInitial:!0,persistent:!0}),this.watcher.on("all",(e,i)=>{("change"===e||"add"===e||"unlink"===e)&&(this.logger.debug(`Lingui source ${e}: ${i}`),this.changeSubject$.next(i))}).on("error",e=>{this.logger.error(`Lingui watcher error: ${e instanceof Error?e.message:String(e)}`,e)})}setupRunSubscription(){let e=this.changeSubject$.pipe(s(200));this.subscription=this.changeSubject$.pipe(t(e)).subscribe(e=>{let i=e.some(e=>!e.endsWith(".po"));this.runQueue.add(async()=>{if(!this.isShuttingDown)try{i?(this.logger.info("Lingui sources changed, extracting and compiling i18n messages..."),await o({logger:this.logger})):(this.logger.info("Lingui catalogs changed, compiling i18n messages..."),await n({logger:this.logger}))}catch(e){this.logger.error(`Lingui update failed: ${e instanceof Error?e.message:String(e)}`,e)}})})}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getConfig as e}from"@lingui/conf";import{lingui as i}from"@lingui/vite-plugin";import t from"@vitejs/plugin-react";import{mkdir as n,readFile as r,writeFile as o}from"fs/promises";import a from"lodash-es/camelCase.js";import{createRequire as s}from"node:module";import{dirname as l,resolve as m}from"path";import{createLogger as f}from"vite";import p from"vite-plugin-css-injected-by-js";import{
|
|
1
|
+
import{getConfig as e}from"@lingui/conf";import{lingui as i}from"@lingui/vite-plugin";import t from"@vitejs/plugin-react";import{mkdir as n,readFile as r,writeFile as o}from"fs/promises";import a from"lodash-es/camelCase.js";import{createRequire as s}from"node:module";import{dirname as l,resolve as m}from"path";import{createLogger as f}from"vite";import p from"vite-plugin-css-injected-by-js";import{LINGUI_CONFIG_PATH as d}from"../lingui/index.js";import{isUsingLocalSdk as c}from"../utils/package-info.js";import{loadFrontendConfigModule as g}from"./frontend-config.js";import{phxBannerPlugin as u}from"./phx-banner-plugin.js";import{phxCspNoncePlugin as h}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as b}from"./phx-global-isolation-plugin.js";import{phxLicensesPlugin as S}from"./phx-licenses-plugin.js";import{phxVariantPreviewsPlugin as y}from"./phx-variant-previews-plugin.js";let O=null;export const setViteLogSink=(e,i={})=>{O={sink:e,echo:i.echo??!1}};let x=["react","react-dom","three","@react-three/fiber","@react-three/drei","@react-three/postprocessing","its-fine","@emotion/react","@emotion/styled","@mui/material","@mui/system","@tanstack/react-query","rxjs"],D=()=>[s(import.meta.url).resolve("@lingui/babel-plugin-lingui-macro"),{linguiConfig:e({configPath:d})}],E=e=>{let i=e.DEPLOYMENT_ID;if("string"!=typeof i)throw Error("DEPLOYMENT_ID is required in runtime config");return i};export const getViteDevConfig=async e=>{var n,r;let o,a,p=c(),u=g(),h=u.readRuntimeConfig(),S=u.frontendBuildConfig,v=D(),j=Object.fromEntries((e?.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...O&&{customLogger:(n=O.sink,r=O.echo,o=f(),{get hasWarned(){return o.hasWarned},info:(e,i)=>{n("info",e),r&&o.info(e,i)},warn:(e,i)=>{n("warn",e),r&&o.warn(e,i)},warnOnce:(e,i)=>{n("warn",e),r&&o.warnOnce(e,i)},error:(e,i)=>{n("error",e),r&&o.error(e,i)},clearScreen:e=>{r&&o.clearScreen(e)},hasErrorLogged:e=>o.hasErrorLogged(e)}),...O.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...p&&{entries:["index.html","admin.html",...e?.templateFiles??[]],force:!0}},...p&&{resolve:{alias:(a=s(m(process.cwd(),"package.json")),x.flatMap(e=>{try{let i=l(a.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[t({babel:{plugins:[v]}}),i({configPath:d}),{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=u.readRuntimeConfig(),t=u.frontendBuildConfig;return{...e,define:{...e.define,"phx.frontendEnv":JSON.stringify(i),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(t.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(t.gltfDecoder)}}}},b({getDeploymentId:()=>E(u.readRuntimeConfig())}),y()],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(h),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(S.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(S.gltfDecoder)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...j}}},root:m(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]}}}};export const getViteBuildConfigs=async e=>{let s=g(),f=s.readRuntimeConfig(),c=s.frontendBuildConfig,y=D(),O=S(),x=u({sdkVersion:e.sdkVersion,banner:e.banner}),v=[{name:"salsita-configurator",entryFile:"./configurator.ts",mainScriptPath:"./configurator.ts",htmlFiles:["./index.html",...{templateFiles:e.templateFiles}.templateFiles],main:!0,format:"iife"},{name:"salsita-admin",entryFile:"./admin.ts",mainScriptPath:"./admin.ts",htmlFiles:["./admin.html"],main:!1,format:"iife"},{name:"salsita-embedded-admin",entryFile:"./embedded-admin.ts",mainScriptPath:"./embedded-admin.ts",htmlFiles:[],main:!1,format:"es"},{name:"salsita-embedded-configurator",entryFile:"./embedded-configurator.ts",mainScriptPath:"./embedded-configurator.ts",htmlFiles:[],main:!1,format:"es"}].map(g=>({plugins:[t({babel:{plugins:[y]}}),i({configPath:d}),p({useStrictCSP:!0}),h(),b({getDeploymentId:()=>E(s.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!g.htmlFiles.length)return;let i="iife"===g.format?`${g.name}.iife.js`:`${g.name}.js`;for(let t of g.htmlFiles){if(g.main&&e.enableEditor&&"./index.html"===t)continue;let a=m("./.phoenix",t),s=m("./.phoenix/dist/frontend",t);await n(l(s),{recursive:!0});let f=(await r(a,"utf-8")).replace(g.mainScriptPath,i);await o(s,f,"utf-8")}}},O,x],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:g.entryFile,name:a(g.name),formats:[g.format],fileName:()=>"iife"===g.format?`${g.name}.iife.js`:`${g.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${g.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(c.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(c.gltfDecoder)}}));return e.enableEditor?[...v,{plugins:[t({babel:{plugins:[y]}}),i({configPath:d}),p({useStrictCSP:!0}),h(),O,x],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:m(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(f),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(c.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(c.gltfDecoder)}}]:v};
|
|
@@ -29,7 +29,7 @@ export interface SendVoiceMessageParams<CHAT_CONTEXT extends Record<string, unkn
|
|
|
29
29
|
* Runtime chat service consumed only by the legacy configurator chat UI. Its user-facing consumers
|
|
30
30
|
* live under `configurator/ui/legacy/`: `Chat` is reached through `MobileChat`, `TabsSidebar`,
|
|
31
31
|
* `StepsSideBar`, and `SimpleSidebar`, with availability gated by
|
|
32
|
-
* `
|
|
32
|
+
* `react-sdk/domain-application-context/chat-hooks.ts`.
|
|
33
33
|
*
|
|
34
34
|
* `sendMessage` deliberately retains a known reinitialization race. Its `ChunkType.calls`
|
|
35
35
|
* continuation does not recheck the captured generation after `processToolCalls` before publishing
|
|
@@ -3,7 +3,7 @@ import type { ReactNode } from 'react';
|
|
|
3
3
|
* This is probably a temporary solution, we may need an actual routing library in the future.
|
|
4
4
|
* @beta
|
|
5
5
|
*/
|
|
6
|
-
export declare const useConfiguratorRouting: () => import("
|
|
6
|
+
export declare const useConfiguratorRouting: () => import("../index.js").RoutingService;
|
|
7
7
|
export type UseConfiguratorRouting = typeof useConfiguratorRouting;
|
|
8
8
|
export interface ConfiguratorRoutingProviderProps {
|
|
9
9
|
readonly children: ReactNode;
|