@salsita-ai/sdk 0.50.0-develop.b5d443db78 → 0.50.0-develop.b5dfdd9774
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 +10 -3
- package/dist/admin/common/admin-interface.d.ts +2 -2
- package/dist/application-spec/errors/diagnostic-codes.d.ts +8 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +9 -1
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +4 -3
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.js +3 -2
- package/dist/application-spec/generate-application/code/templates/application-types.js +5 -5
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +4 -2
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +6 -8
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +8 -6
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +6 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +3 -3
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-base-configurator-builder.js +2 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +38 -41
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +0 -3
- package/dist/application-spec/generate-application/code/templates/domain.js +3 -3
- package/dist/application-spec/generate-application/code/templates/editor.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/editor.js +16 -3
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +7 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +3 -3
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +10 -6
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -7
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +10 -11
- package/dist/application-spec/generate-application/code/templates/html-index.d.ts +12 -1
- package/dist/application-spec/generate-application/code/templates/html-index.js +9 -10
- package/dist/application-spec/generate-application/code/templates/index.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +8 -36
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +15 -11
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/panel.js +42 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/reading-and-changing.js +55 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/assistant/session-setup.js +16 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +4 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/variants.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +42 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.js +45 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.js +92 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.js +26 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.js +51 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.js +88 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.js +68 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/assistant-configuration.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +29 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +29 -15
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +17 -14
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +3 -3
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +2 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/scene-realism.js +29 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-specification.js +28 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +0 -7
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -1
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +7 -6
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +2 -2
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +3 -0
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +3 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +67 -8
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-components.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +6 -3
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/relations/relations.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +14 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +7 -10
- 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-server-settings.d.ts +5 -6
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-server-settings.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/index.d.ts +0 -1
- package/dist/application-spec/webhook-boundary.js +1 -1
- package/dist/client/authorized-client.d.ts +1 -0
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/cli-client/cli-api-client.d.ts +17 -0
- package/dist/client/cli-client/cli-api-client.js +1 -0
- package/dist/client/cli-client/index.d.ts +2 -0
- package/dist/client/cli-client/index.js +1 -0
- package/dist/client/cli-client/unsupported-api-version-error.d.ts +11 -0
- package/dist/client/cli-client/unsupported-api-version-error.js +1 -0
- package/dist/client/contract.d.ts +28 -10
- package/dist/client/contract.js +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.js +1 -1
- package/dist/client/local-authorized-client.d.ts +1 -0
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +1 -0
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +7503 -2093
- package/dist/client/unauthenticated-client.js +1 -1
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/agent-at-work/AgentAtWorkFallback.d.ts +7 -0
- package/dist/configurator/agent-at-work/AgentAtWorkFallback.js +1 -0
- package/dist/configurator/agent-at-work/AgentAtWorkPage.d.ts +20 -0
- package/dist/configurator/agent-at-work/AgentAtWorkPage.js +1 -0
- package/dist/configurator/agent-at-work/AgentModeBadge.d.ts +11 -0
- package/dist/configurator/agent-at-work/AgentModeBadge.js +1 -0
- package/dist/configurator/agent-at-work/StudioMark.d.ts +8 -0
- package/dist/configurator/agent-at-work/StudioMark.js +1 -0
- package/dist/configurator/agent-at-work/agent-at-work-copy.d.ts +17 -0
- package/dist/configurator/agent-at-work/agent-at-work-copy.js +1 -0
- package/dist/configurator/agent-at-work/agent-at-work-styles.d.ts +23 -0
- package/dist/configurator/agent-at-work/agent-at-work-styles.js +374 -0
- package/dist/configurator/agent-at-work/index.d.ts +3 -0
- package/dist/configurator/agent-at-work/index.js +1 -0
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +5 -4
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
- package/dist/configurator/application-runtime/extensions/create-configurator-extensions.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +4 -2
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-context.d.ts +14 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-factory.d.ts +13 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.d.ts +55 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action-system.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action.d.ts +56 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/action.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/index.d.ts +6 -0
- package/dist/configurator/application-runtime/extensions/systems/action-system/index.js +1 -0
- package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.d.ts +4 -3
- package/dist/{domain/domain-runtime/spec → configurator/application-runtime/extensions/systems/action-system}/prepare-action-implementations.js +2 -2
- package/dist/{domain/spec/modules → configurator/application-runtime/extensions/systems/action-system}/resolve-action-modules.d.ts +2 -2
- package/dist/configurator/application-runtime/extensions/systems/action-system/resolve-action-modules.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +14 -8
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.d.ts +18 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.d.ts +69 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +246 -22
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +63 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +52 -36
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.d.ts +13 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.d.ts +7 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.d.ts +3 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/index.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.d.ts +33 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/register-webmcp-tools.js +6 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.d.ts +14 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/share-link.js +2 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.d.ts +10 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/webmcp/to-webmcp-result.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +41 -35
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +18 -5
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +8 -1
- 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 +46 -12
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.d.ts +16 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/is-offered-for-selection.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.d.ts +26 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/read-offered-navigation.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +25 -8
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.d.ts +15 -4
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/export-image-capture.js +3 -3
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +15 -7
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +8 -3
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +11 -0
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/sketching-system/sketching-system.d.ts +5 -5
- package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
- package/dist/configurator/common/configurator-interface.d.ts +11 -9
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/index.d.ts +1 -0
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/{ui/configurator-layout/universal → pages}/ExportingOverlay.d.ts +3 -2
- package/dist/configurator/pages/ExportingOverlay.js +1 -0
- package/dist/configurator/pages/InertRoot.d.ts +10 -0
- package/dist/configurator/pages/InertRoot.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.d.ts +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
- package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.d.ts +8 -0
- package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.js +1 -0
- package/dist/configurator/pages/error-boundaries/DevContextFallback.d.ts +4 -2
- package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.d.ts +6 -4
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
- package/dist/configurator/scene/cameras/CameraPadding.d.ts +5 -0
- package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
- package/dist/configurator/scene/resources/use-phx-gltf.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/LocalCreatedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.d.ts +5 -0
- package/dist/configurator/scene/scene-entity/materials/RemoteReplacedMaterial.js +1 -1
- package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.d.ts +27 -0
- package/dist/configurator/scene/scene-entity/materials/use-dispose-replaced.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -1
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +78 -6
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +99 -1
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +37 -3
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +51 -4
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +85 -2
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThreadItemView.d.ts +83 -6
- package/dist/configurator/ui/assistant/AssistantThreadItemView.js +1 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +35 -1
- package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -1
- package/dist/configurator/ui/assistant/alert/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.d.ts +34 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.js +1 -1
- package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.d.ts +2 -3
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -1
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -1
- package/dist/configurator/ui/assistant/annotation/annotation-layout.d.ts +59 -5
- package/dist/configurator/ui/assistant/annotation/annotation-layout.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +40 -5
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +6 -5
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +5 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -1
- package/dist/configurator/ui/assistant/annotation/editor/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/annotation/index.d.ts +3 -2
- package/dist/configurator/ui/assistant/annotation/index.js +1 -1
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +9 -4
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +49 -5
- package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -1
- package/dist/configurator/ui/assistant/attachments/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/composer/composer-frame.d.ts +7 -2
- package/dist/configurator/ui/assistant/composer/composer-frame.js +1 -1
- package/dist/configurator/ui/assistant/composer/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/composer/index.js +1 -1
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.d.ts +10 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerDialog.js +1 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.d.ts +10 -0
- package/dist/configurator/ui/assistant/disclaimer/AssistantDisclaimerLine.js +1 -0
- package/dist/configurator/ui/assistant/disclaimer/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/disclaimer/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +58 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -0
- package/dist/configurator/ui/assistant/drawing/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/drawing/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/parse-drawing.d.ts +18 -0
- package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -0
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +8 -0
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +35 -1
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +59 -2
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/built-in-form-slots.d.ts +16 -0
- package/dist/configurator/ui/assistant/form/built-in-form-slots.js +1 -0
- package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
- package/dist/configurator/ui/assistant/form/index.d.ts +2 -1
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +6 -5
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -1
- package/dist/configurator/ui/assistant/form/read-form-tile.d.ts +8 -0
- package/dist/configurator/ui/assistant/form/read-form-tile.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +6 -3
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +11 -7
- package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -1
- package/dist/configurator/ui/assistant/form/registry/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/split-form-rows.d.ts +7 -0
- package/dist/configurator/ui/assistant/form/split-form-rows.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +51 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +47 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +43 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +56 -2
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +43 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +47 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -1
- package/dist/configurator/ui/assistant/form-elements/FormTile.d.ts +72 -0
- package/dist/configurator/ui/assistant/form-elements/FormTile.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +27 -0
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +8 -9
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
- package/dist/configurator/ui/assistant/image-view/ImageView.d.ts +66 -0
- package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -0
- package/dist/configurator/ui/assistant/image-view/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/image-view/index.js +1 -0
- package/dist/configurator/ui/assistant/image-view/use-image-blob.d.ts +7 -0
- package/dist/configurator/ui/assistant/image-view/use-image-blob.js +1 -0
- package/dist/configurator/ui/assistant/index.d.ts +21 -10
- package/dist/configurator/ui/assistant/index.js +1 -1
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.d.ts +57 -0
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -0
- package/dist/configurator/ui/assistant/panel/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/panel/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +43 -1
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -1
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +4 -1
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -1
- package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -2
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +49 -2
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/resource-image/index.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +34 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +2 -6
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +5 -6
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -1
- package/dist/configurator/ui/assistant/thread-items.d.ts +17 -3
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +32 -7
- package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -2
- package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +15 -1
- package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -1
- package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +3 -3
- package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -1
- package/dist/configurator/ui/assistant/{annotation/use-end-on-unmount.d.ts → use-on-unmount.d.ts} +1 -1
- package/dist/configurator/ui/assistant/use-on-unmount.js +1 -0
- package/dist/configurator/ui/assistant/voice/RecordingBar.d.ts +21 -0
- package/dist/configurator/ui/assistant/voice/RecordingBar.js +1 -0
- package/dist/configurator/ui/assistant/voice/ReplyPlayButton.d.ts +43 -0
- package/dist/configurator/ui/assistant/voice/ReplyPlayButton.js +1 -0
- package/dist/configurator/ui/assistant/voice/index.d.ts +4 -0
- package/dist/configurator/ui/assistant/voice/index.js +1 -0
- package/dist/configurator/ui/assistant/voice/use-voice-recording.d.ts +39 -0
- package/dist/configurator/ui/assistant/voice/use-voice-recording.js +1 -0
- package/dist/configurator/ui/assistant/voice/voice-capture.d.ts +22 -0
- package/dist/configurator/ui/assistant/voice/voice-capture.js +1 -0
- package/dist/configurator/ui/configurator-layout/index.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/desktop-sidebar/DesktopSidebar.js +4 -4
- package/dist/configurator/ui/configurator-layout/slots/index.d.ts +2 -0
- package/dist/configurator/ui/configurator-layout/slots/index.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/DesktopViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/MobileViewControls.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.d.ts +7 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/NestedViewControls.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.d.ts +6 -0
- package/dist/configurator/ui/configurator-layout/slots/view-controls/use-view-control-items.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/Layout.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +3 -3
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.d.ts +1 -0
- package/dist/configurator/ui/configurator-layout/universal/use-preview-description.js +1 -0
- package/dist/configurator/ui/index.d.ts +1 -1
- package/dist/configurator/ui/legacy/layout/common/ViewControls.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
- package/dist/docs/index.json +130 -5
- package/dist/docs/integrations/woocommerce/overview.mdx +4 -2
- package/dist/docs/layouts/nested-view-controls.mdx +223 -0
- package/dist/docs/layouts/presets/custom.mdx +1 -0
- package/dist/docs/layouts/preview/always.mdx +22 -0
- package/dist/docs/layouts/view-controls.mdx +2 -0
- package/dist/docs/other-features/domain-actions.mdx +82 -55
- package/dist/docs/other-features/violation-messages.mdx +3 -1
- package/dist/docs/phoenix/admin.mdx +30 -34
- package/dist/docs/phoenix/application-states.mdx +1 -1
- package/dist/docs/phoenix/assistant/actions.mdx +183 -0
- package/dist/docs/phoenix/assistant/changing-the-configuration.mdx +333 -0
- package/dist/docs/phoenix/assistant/instructions-and-ai-settings.mdx +221 -0
- package/dist/docs/phoenix/assistant/overview.mdx +137 -0
- package/dist/docs/phoenix/assistant/per-session-setup.mdx +166 -0
- package/dist/docs/phoenix/assistant/reading-the-configuration.mdx +349 -0
- package/dist/docs/phoenix/assistant/screenshots.mdx +135 -0
- package/dist/docs/phoenix/assistant/security-and-limits.mdx +151 -0
- package/dist/docs/phoenix/assistant/the-panel.mdx +298 -0
- package/dist/docs/phoenix/blender-rendering.mdx +3 -1
- package/dist/docs/phoenix/configurator-interface.mdx +105 -10
- package/dist/docs/phoenix/data-sources.mdx +61 -37
- package/dist/docs/phoenix/finalization.mdx +2 -1
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/integration/authentication-internal.mdx +2 -2
- package/dist/docs/phoenix/integration/finalization-internal.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +2 -2
- package/dist/docs/phoenix/localization.mdx +2 -1
- package/dist/docs/phoenix/migrations.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +97 -57
- package/dist/docs/phoenix/project-structure.mdx +17 -7
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +61 -30
- package/dist/docs/phoenix/sessions-and-access.mdx +62 -41
- package/dist/docs/phoenix/sharing.mdx +1 -1
- package/dist/docs/phoenix/theming.mdx +5 -9
- package/dist/docs/phoenix/webhook-membership.mdx +1 -1
- package/dist/docs/phoenix/webhooks.mdx +417 -241
- package/dist/docs/ux-guidelines/choosing-navigation.mdx +2 -0
- package/dist/docs/ux-guidelines/designing-the-configuration-journey.mdx +43 -0
- package/dist/docs/ux-guidelines/interaction-modes.mdx +2 -2
- package/dist/docs/ux-guidelines/overview.mdx +11 -9
- package/dist/domain/admin-domain/index.d.ts +2 -2
- package/dist/domain/application/application-config.d.ts +8 -1
- package/dist/domain/application/assistant/assistant-exposure.d.ts +22 -0
- package/dist/domain/application/assistant/assistant-exposure.js +1 -0
- package/dist/domain/application/assistant/assistant-selection.d.ts +30 -0
- package/dist/domain/application/assistant/assistant-selection.js +1 -0
- package/dist/domain/application/assistant/build-assistant-lenses.js +4 -4
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +2 -2
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +18 -2
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +5 -1
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/prepare-assistant-navigation-updates.d.ts +16 -0
- package/dist/domain/application/assistant/prepare-assistant-navigation-updates.js +1 -0
- package/dist/domain/application/assistant/read-assistant-navigation.d.ts +40 -0
- package/dist/domain/application/assistant/read-assistant-navigation.js +1 -0
- 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 +30 -2
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-takes-images.d.ts +7 -0
- package/dist/domain/application/assistant/session-setup/assistant-takes-images.js +1 -0
- package/dist/domain/application/assistant/session-setup/index.d.ts +1 -0
- package/dist/domain/application/assistant/session-setup/index.js +1 -1
- package/dist/domain/application/assistant-field-options.d.ts +2 -0
- package/dist/domain/application/assistant-field-options.js +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +17 -11
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +4 -3
- package/dist/domain/application/assistant-recipe-groups.js +1 -1
- package/dist/domain/application/configurator-builder.d.ts +45 -37
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/available-system-components/available-system-components.d.ts +1 -1
- package/dist/domain/available-system-components/available-system-components.js +1 -1
- package/dist/domain/core/action/action.d.ts +0 -49
- package/dist/domain/core/action/index.d.ts +0 -1
- package/dist/domain/core/action/index.js +1 -1
- package/dist/domain/core/component/system-component-filter.d.ts +1 -0
- package/dist/domain/core/component/system-component-filter.js +1 -1
- package/dist/domain/core/component/view-state-component.d.ts +4 -3
- package/dist/domain/core/component/view-state-component.js +1 -1
- package/dist/domain/core/domain-factory.d.ts +2 -3
- package/dist/domain/core/index.d.ts +1 -1
- package/dist/domain/core/index.js +1 -1
- package/dist/domain/core/invariant/control-violation-hints.d.ts +37 -0
- package/dist/domain/core/invariant/control-violation-hints.js +1 -0
- package/dist/domain/core/invariant/index.d.ts +1 -0
- package/dist/domain/core/invariant/index.js +1 -1
- package/dist/domain/domain-builder/domain-builder.d.ts +1 -6
- package/dist/domain/domain-builder/domain-builder.js +1 -1
- package/dist/domain/domain-context/domain-context-systems.d.ts +3 -5
- package/dist/domain/domain-context/index.d.ts +0 -1
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/navigation-system/navigation-system.d.ts +2 -2
- package/dist/domain/domain-context/navigation-system/navigation-system.js +1 -1
- package/dist/domain/domain-context/transformers/when-builder.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.d.ts +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/index.d.ts +0 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +5 -4
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +19 -13
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/environment/actions.d.ts +1 -0
- package/dist/domain/domain-runtime/environment/actions.js +1 -1
- package/dist/domain/domain-runtime/environment/initialize.js +1 -1
- package/dist/domain/domain-runtime/environment/selectors.d.ts +2 -0
- package/dist/domain/domain-runtime/environment/selectors.js +1 -1
- package/dist/domain/domain-runtime/environment/types.d.ts +6 -0
- package/dist/domain/domain-runtime/spec/index.d.ts +0 -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/selectors.d.ts +2 -2
- package/dist/domain/domain-runtime/spec/types.d.ts +12 -10
- package/dist/domain/extensions/assistant/assistant-greeting.d.ts +30 -0
- package/dist/domain/extensions/assistant/assistant-greeting.js +1 -0
- package/dist/domain/extensions/assistant/index.d.ts +1 -0
- package/dist/domain/extensions/assistant/index.js +1 -0
- package/dist/domain/extensions/export-images/agent-screenshot.d.ts +5 -4
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -1
- package/dist/domain/extensions/index.d.ts +1 -1
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/index.d.ts +1 -1
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -6
- package/dist/domain/spec/expressions/relation-expression-params.d.ts +1 -1
- package/dist/domain/spec/modules/index.d.ts +0 -1
- package/dist/domain/spec/modules/index.js +1 -1
- package/dist/domain/spec/phx/phx-domain.d.ts +0 -1
- package/dist/domain/spec/phx/phx-domain.js +1 -1
- package/dist/domain/spec/runtime/application-spec-slice.d.ts +5 -5
- package/dist/domain/spec/runtime/application-spec-slice.js +1 -1
- package/dist/domain/spec/runtime/create-application.d.ts +5 -2
- package/dist/domain/spec/runtime/create-application.js +1 -1
- package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +2 -2
- package/dist/domain/spec/sections/actions.d.ts +3 -2
- package/dist/domain/spec/sections/app-metadata.d.ts +3 -0
- package/dist/domain/spec/sections/assistant/assistant-features.d.ts +13 -0
- package/dist/domain/spec/sections/assistant/assistant-features.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +35 -2
- package/dist/domain/spec/sections/assistant/assistant-navigation.d.ts +21 -0
- package/dist/domain/spec/sections/assistant/assistant-navigation.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +55 -13
- package/dist/domain/spec/sections/assistant/assistant-select.d.ts +12 -0
- package/dist/domain/spec/sections/assistant/assistant-select.js +1 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +10 -26
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -1
- package/dist/domain/spec/sections/assistant/index.d.ts +5 -2
- package/dist/domain/system-components/index.d.ts +1 -0
- package/dist/domain/system-components/index.js +1 -1
- package/dist/domain/system-components/navigation/index.d.ts +1 -0
- package/dist/domain/system-components/navigation/index.js +1 -0
- package/dist/domain/system-components/navigation/view-controls.d.ts +24 -0
- package/dist/domain/system-components/navigation/view-controls.js +1 -0
- package/dist/editor/Editor.d.ts +5 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/EditorMode.d.ts +2 -0
- package/dist/editor/EditorMode.js +1 -1
- package/dist/editor/agent-mode/AgentModeBridge.d.ts +10 -0
- package/dist/editor/agent-mode/AgentModeBridge.js +1 -0
- package/dist/editor/agent-mode/agent-at-work-fonts.d.ts +2 -0
- package/dist/editor/agent-mode/agent-at-work-fonts.js +1 -0
- package/dist/editor/console-reporter/BrowserConsoleReporter.js +1 -1
- package/dist/editor/console-reporter/console-capture.d.ts +20 -0
- package/dist/editor/console-reporter/console-capture.js +1 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +4 -3
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/index.d.ts +1 -0
- package/dist/editor/index.js +1 -1
- package/dist/editor/variants/VariantAnswerFooter.d.ts +8 -1
- package/dist/editor/variants/VariantAnswerFooter.js +1 -1
- package/dist/editor/variants/VariantPageUnavailable.d.ts +5 -0
- package/dist/editor/variants/VariantPageUnavailable.js +1 -0
- package/dist/editor/variants/VariantPreviewHandler.js +1 -1
- package/dist/editor/variants/variant-preview-fonts.d.ts +2 -0
- package/dist/editor/variants/variant-preview-fonts.js +1 -0
- package/dist/editor/variants/variant-preview-styles.d.ts +40 -48
- package/dist/editor/variants/variant-preview-styles.js +493 -1
- package/dist/extras/cognito/CognitoSignInPage.d.ts +2 -0
- package/dist/extras/cognito/CognitoSignInPage.js +1 -0
- package/dist/extras/cognito/index.d.ts +1 -0
- package/dist/extras/cognito/index.js +1 -0
- package/dist/globals/index.d.ts +5 -0
- 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/legacy/deployment-cli/commands/create-environment.js +1 -1
- package/dist/legacy/deployment-cli/commands/list-environments.js +1 -1
- package/dist/legacy/deployment-cli/commands/register-deployment.js +1 -1
- package/dist/legacy/domain-cli/gen/configurator-builder.js +5 -4
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +25 -3
- package/dist/legacy/phoenix-cli/commands/prepare-deployment-command.js +1 -1
- package/dist/legacy/phoenix-cli/commands/prepare-local-environment-command.js +1 -1
- package/dist/legacy/phoenix-cli/services/prepare-development-environment.js +1 -1
- package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
- package/dist/legacy/webhook-cli/lib/webhook-boundary.js +1 -1
- package/dist/phoenix/application-spec/application-spec-builder.d.ts +2 -2
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +2 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +4 -3
- package/dist/phoenix/application-spec/generate-project-files.js +1 -1
- package/dist/phoenix/application-spec/index.d.ts +2 -1
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/read-spec-project.d.ts +1 -2
- package/dist/phoenix/application-spec/read-spec-project.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +1 -0
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/account/index.d.ts +1 -0
- package/dist/phoenix/commands/account/index.js +1 -0
- package/dist/phoenix/commands/account/whoami.d.ts +10 -0
- package/dist/phoenix/commands/account/whoami.js +4 -0
- package/dist/phoenix/commands/build.d.ts +2 -1
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/clean.d.ts +2 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/cleanup-environment.js +1 -1
- package/dist/phoenix/commands/deploy.d.ts +7 -2
- package/dist/phoenix/commands/deploy.js +9 -3
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- package/dist/phoenix/commands/dev.d.ts +2 -1
- package/dist/phoenix/commands/dev.js +4 -4
- package/dist/phoenix/commands/feedback.d.ts +2 -2
- package/dist/phoenix/commands/feedback.js +1 -1
- package/dist/phoenix/commands/finish-deployment-command.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/init-starter-spec.js +3 -4
- package/dist/phoenix/commands/init.d.ts +2 -2
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/login.d.ts +6 -3
- package/dist/phoenix/commands/login.js +3 -3
- package/dist/phoenix/commands/logout.js +1 -1
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/commands/sync.d.ts +2 -1
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +3 -1
- package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
- package/dist/phoenix/services/cli-credentials.d.ts +26 -7
- package/dist/phoenix/services/cli-credentials.js +2 -2
- package/dist/phoenix/services/cli-server/describe-saved-logins.d.ts +5 -0
- package/dist/phoenix/services/cli-server/describe-saved-logins.js +1 -0
- package/dist/phoenix/services/cli-server/index.d.ts +2 -0
- package/dist/phoenix/services/cli-server/index.js +1 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.d.ts +19 -0
- package/dist/phoenix/services/cli-server/resolve-cli-server-url.js +1 -0
- package/dist/phoenix/services/dev-experience/dev-experience.d.ts +31 -0
- package/dist/phoenix/services/dev-experience/dev-experience.js +1 -0
- package/dist/phoenix/services/dev-experience/index.d.ts +3 -0
- package/dist/phoenix/services/dev-experience/index.js +1 -0
- package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.d.ts +7 -0
- package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.js +1 -0
- package/dist/phoenix/services/dev-experience/regenerated-page-experience.d.ts +24 -0
- package/dist/phoenix/services/dev-experience/regenerated-page-experience.js +1 -0
- package/dist/phoenix/services/development-credential.js +1 -1
- package/dist/phoenix/services/frontend-config.d.ts +2 -0
- package/dist/phoenix/services/index.d.ts +6 -3
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-pubsub.d.ts +4 -0
- package/dist/phoenix/services/phoenix-regions.d.ts +6 -1
- package/dist/phoenix/services/phoenix-regions.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/session/phoenix-application.d.ts +2 -1
- package/dist/phoenix/services/session/phoenix-application.js +2 -2
- package/dist/phoenix/services/signed-in-development-environment.d.ts +15 -4
- package/dist/phoenix/services/signed-in-development-environment.js +1 -1
- package/dist/phoenix/services/spec-project/describe-workspace-projects.d.ts +11 -0
- package/dist/phoenix/services/spec-project/describe-workspace-projects.js +1 -0
- package/dist/phoenix/services/spec-project/index.d.ts +3 -0
- package/dist/phoenix/services/spec-project/index.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.d.ts +47 -0
- package/dist/phoenix/services/spec-project/resolve-deploy-target.js +1 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.d.ts +34 -0
- package/dist/phoenix/services/spec-project/resolve-target-project.js +2 -0
- package/dist/phoenix/services/spec-project/write-spec-project.d.ts +7 -0
- package/dist/phoenix/services/spec-project/write-spec-project.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-event.js +1 -1
- package/dist/phoenix/services/telemetry/telemetry-state.d.ts +1 -1
- package/dist/phoenix/services/telemetry/telemetry-state.js +1 -1
- package/dist/phoenix/services/variant-file-session.js +1 -1
- package/dist/phoenix/services/vite-config.d.ts +2 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/services/webhook-service/transport.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/common-services/index.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/selectors.d.ts +2 -0
- package/dist/react-sdk/application-runtime/common-services/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/webmcp/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/index.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.d.ts +35 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-host.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.d.ts +44 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-model-context.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.d.ts +24 -0
- package/dist/react-sdk/application-runtime/common-services/webmcp/webmcp-tool-result.js +1 -0
- package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.d.ts +7 -1
- package/dist/react-sdk/application-runtime/domain-application-context/application-runtime-extension.js +1 -1
- package/dist/react-sdk/application-runtime/domain-application-context/domain-application-systems.d.ts +2 -2
- package/dist/react-sdk/application-runtime/domain-application-context/selectors.d.ts +1 -3
- package/dist/react-sdk/application-runtime/domain-application-context/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +2 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-environment.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/use-environment.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/use-webmcp-host.js +1 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/responsive/actions.d.ts +6 -0
- package/dist/react-sdk/application-runtime/responsive/actions.js +1 -1
- package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -1
- package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/responsive/types.d.ts +9 -0
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +28 -12
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/session/session-service.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +2 -2
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +3 -2
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +1 -5
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link.d.ts +25 -0
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -3
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.d.ts +11 -0
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -1
- package/dist/react-sdk/preset-selection/PresetWebMcpTools.d.ts +14 -0
- package/dist/react-sdk/preset-selection/PresetWebMcpTools.js +1 -0
- package/dist/react-sdk/preset-selection/index.d.ts +2 -1
- package/dist/react-sdk/preset-selection/index.js +1 -1
- package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.d.ts +31 -0
- package/dist/react-sdk/preset-selection/register-preset-webmcp-tools.js +1 -0
- package/dist/react-sdk/session/ConfiguratorUnavailablePage.d.ts +5 -0
- package/dist/react-sdk/session/ConfiguratorUnavailablePage.js +1 -0
- package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
- package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
- package/dist/ui-sdk/components/preview/Preview.d.ts +12 -4
- package/dist/ui-sdk/components/preview/Preview.js +2 -2
- package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +3 -2
- package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.d.ts +2 -0
- package/dist/ui-sdk/components/toolbar/desktop-toolbar/ToolbarPopper.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsContext.d.ts +3 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsItem.js +1 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.d.ts +6 -1
- package/dist/ui-sdk/components/view-controls/ViewControlsRoot.js +1 -1
- package/dist/ui-sdk/icons/__generated/Microphone.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Microphone.js +1 -0
- package/dist/ui-sdk/icons/__generated/MicrophoneSlash.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/MicrophoneSlash.js +1 -0
- package/dist/ui-sdk/icons/__generated/SpeakerHigh.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/SpeakerHigh.js +1 -0
- package/dist/ui-sdk/icons/__generated/SpeakerSlash.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/SpeakerSlash.js +1 -0
- package/dist/ui-sdk/icons/__generated/Stop.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Stop.js +1 -0
- package/dist/ui-sdk/icons/__generated/index.d.ts +10 -0
- package/dist/ui-sdk/icons/__generated/index.js +1 -1
- package/dist/ui-sdk/icons/icons-registry.js +1 -1
- package/dist/ui-sdk/theme/types.d.ts +0 -4
- package/dist/webhook/builders/auth-handler-builder.d.ts +3 -0
- package/dist/webhook/builders/auth-handler-builder.js +1 -1
- package/dist/webhook/builders/common.d.ts +5 -3
- package/dist/webhook/builders/webhook-builder.d.ts +5 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +11 -4
- package/schema/domain-spec.json +444 -65
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.d.ts +0 -2
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +0 -2
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +0 -25
- package/dist/configurator/ui/assistant/annotation/annotation-host-context.d.ts +0 -5
- package/dist/configurator/ui/assistant/annotation/annotation-host-context.js +0 -1
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -9
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -10
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
- package/dist/configurator/ui/assistant/theme.d.ts +0 -2
- package/dist/configurator/ui/assistant/theme.js +0 -1
- package/dist/configurator/ui/configurator-layout/universal/ExportingOverlay.js +0 -1
- package/dist/domain/core/action/action-factory.d.ts +0 -11
- package/dist/domain/domain-context/action-system/action-system.d.ts +0 -38
- package/dist/domain/domain-context/action-system/action-system.js +0 -1
- package/dist/domain/domain-context/action-system/index.d.ts +0 -1
- package/dist/domain/domain-context/action-system/index.js +0 -1
- package/dist/domain/domain-runtime/domain-context/action-context.d.ts +0 -11
- package/dist/domain/extensions/view-controls.d.ts +0 -25
- package/dist/domain/extensions/view-controls.js +0 -1
- package/dist/domain/spec/modules/resolve-action-modules.js +0 -1
- /package/dist/{domain/domain-runtime/domain-context → configurator/application-runtime/extensions/systems/action-system}/action-context.js +0 -0
- /package/dist/{domain/core/action → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Subject as e}from"rxjs";import{createServer as t}from"vite";import{resolveGeneratedEnvFile as
|
|
2
|
-
${
|
|
1
|
+
import{Subject as e}from"rxjs";import{createServer as t}from"vite";import{resolveGeneratedEnvFile as r}from"@salsita-ai/common/env";import{generateProjectFiles as o,getDeploymentFingerprint as s}from"../../application-spec/index.js";import{exists as i}from"../../utils/index.js";import{buildWebhooks as n,webhookLogContext as a}from"../../webhooks/index.js";import{ApplicationSpecProjectWatcher as l}from"../application-spec-project-watcher.js";import{ApplicationSpecStoryWatcher as c}from"../application-spec-story-watcher.js";import{DeploymentPreparationService as h,readGeneratedEnvMarkers as p}from"../deployment/index.js";import{getDevelopmentCredentialHint as u}from"../development-credential.js";import{LinguiWatcher as g}from"../lingui-watcher.js";import{LogBus as m}from"../log-bus.js";import{MockTemplateWatcher as d}from"../mock-template-watcher.js";import{PhoenixPubSub as v}from"../phoenix-pubsub.js";import{PhoenixStore as w}from"../phoenix-store.js";import{VariantPreviewService as b}from"../variant-preview-service.js";import{getViteDevConfig as S}from"../vite-config.js";import{createWebhookTunnelTransport as E,readOrCreateTunnelSessionId as x,startWebhookService as f}from"../webhook-service/index.js";import{WebhookTunnelMonitor as P}from"../webhook-tunnel-monitor.js";export class PhoenixApplication{props;context;store=new w;pubsub=new v;failures$=new e;logsValue;tunnelMonitorValue;deploymentPreparationValue;variantPreviewsValue;linguiWatcherValue;projectWatcher;storyWatcher;mockTemplateWatcher;editorServer;webhookTunnel;browserConsoleSubscription;startPromise;closePromise;constructor(e,t){this.props=e,this.context=t;let r="dev"===e.mode?e.development:void 0,o=r&&(!r.persistenceMode||"server"===r.persistenceMode);this.logsValue="dev"===e.mode?new m:void 0,this.tunnelMonitorValue=o&&r.serverUrl?new P(r.serverUrl):void 0,this.deploymentPreparationValue=o&&r.serverUrl&&r.credential?new h({serverUrl:r.serverUrl,credential:r.credential,projectSlug:r.projectSlug,environmentSlug:r.environmentSlug,sdkVersion:r.sdkVersion},{store:this.store,get logger(){return t.logger}}):void 0}get logs(){return this.logsValue}get tunnelMonitor(){return this.tunnelMonitorValue}get deploymentPreparation(){return this.deploymentPreparationValue}get projectRoot(){return this.props.projectRoot}get mode(){return this.props.mode}get variantPreviews(){return this.variantPreviewsValue}get linguiWatcher(){return this.linguiWatcherValue}start(){return this.startPromise??=this.startSession(),this.startPromise}close(){return this.closePromise??=this.closeResources(this.context.logger),this.closePromise}async startSession(){try{if(this.assertStarting(),"story"===this.mode)return void await this.startEditor();let e=this.logs;if(!e)throw Error("Cannot start development: the application has no log bus.");return this.browserConsoleSubscription=this.pubsub.browserConsole$.subscribe(t=>this.context.onBrowserConsole(t,e)),await this.startDevelopment()}catch(e){throw this.closePromise||this.context.onStartupFailure(e),await this.close(),e}}async startEditor(){let e=this.props.editorPort;void 0!==e&&("dev"===this.mode&&this.context.logger.step("Starting editor WebSocket server"),this.editorServer=this.context.createEditorServer({port:e,application:this,logger:this.context.logger,debug:this.props.development?.debug??!1}),await this.editorServer.ready,this.assertStarting(),"dev"===this.mode&&this.context.logger.debug(`Editor WebSocket server started on port ${e}`),this.mockTemplateWatcher=new d({projectRoot:this.projectRoot,pubsub:this.pubsub,logger:this.context.logger}),this.mockTemplateWatcher.start(),"story"===this.mode&&(this.storyWatcher=new c({projectRoot:this.projectRoot,pubsub:this.pubsub,logger:this.context.logger}),this.storyWatcher.start()))}async startDevelopment(){let e=this.props.development,c=this.logs;if(!e||!c)throw Error("Cannot start development: session options are missing. Supply development options when constructing the application.");let{sdkVersion:h,projectSlug:m,environmentSlug:d,cliUseWorkspace:v,devExperience:w,debug:P,withLingui:j,persistenceMode:y,force:k,serverUrl:V,credential:W,skipUpload:R}=e,{store:N,pubsub:T,deploymentPreparation:I,tunnelMonitor:_}=this;process.env.NODE_ENV="development",y&&(process.env.PERSISTENCE_MODE=y);let O=!y||"server"===y;if(O&&V&&(process.env.SERVER_URL=V),this.context.logger.step("Starting development mode"),!await i("spec"))throw Object.assign(Error('Spec folder not found. Run "phoenix init" first.'),{code:"SPEC_NOT_FOUND"});if(O&&(!V||!W))throw Error("Server persistence needs a server and a credential. Run `phoenix login`, or create a development environment in Studio and paste its .env block into .env.");this.context.logger.step("Building project files");let{templateFiles:D,applicationSpec:$}=await o({sdkVersion:h,projectSlug:m,environmentSlug:d,cliUseWorkspace:v,pageExperience:w,withLingui:j,force:k},{logger:this.context.logger});if(this.assertStarting(),this.context.logger.success("Project files built successfully"),O&&V&&W){let e=r("."),t=await p(e);k||t?.PHOENIX_PROJECT_SLUG!==m||t.PHOENIX_ENVIRONMENT_SLUG!==d||t.PHOENIX_SERVER_URL!==V||t.PHOENIX_DEPLOYMENT_FINGERPRINT!==s($)?(this.context.logger.step("Preparing development deployment"),await I?.prepareAtStartup({skipUpload:R,debug:P})):this.context.logger.debug(`${e} matches the current development environment, skipping prepare`)}if(this.assertStarting(),this.context.onProjectPrepared(c),j?(this.linguiWatcherValue=new g({logger:this.context.logger}),this.linguiWatcherValue.start()):this.context.logger.warn("Continuous Lingui updates are disabled; missing catalogs were bootstrapped at startup. Pass --withLingui or set WITH_LINGUI=true to enable."),O&&(this.context.logger.step("Building webhooks"),await a.run("webhook",async()=>{await n({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js"})})),O&&V&&W){let e=r("."),t=await p(e);if(!t?.DEPLOYMENT_ID)throw Error(`Webhook tunnel cannot start because ${e} has no DEPLOYMENT_ID. Rerun phoenix dev to prepare the development deployment.`);this.assertStarting();let o=await x();this.assertStarting();let s=await f({experimental:!0,transport:E({serverUrl:V,credential:W,projectSlug:m,environmentSlug:d}),rejectionHint:u(W,m),environmentSlug:d,deploymentId:t.DEPLOYMENT_ID,sessionId:o,onStatus:(e,r)=>{_?.setStatus(e,{deploymentId:t.DEPLOYMENT_ID,sessionId:o,message:r??null})},onRequest:e=>_?.record(e)});this.closePromise&&(await s.stop(),this.assertStarting()),this.webhookTunnel=s,_?.setStatus("waiting",{deploymentId:t.DEPLOYMENT_ID,sessionId:o}),s.stopped.catch(e=>{this.failures$.next(Error(`Webhook tunnel failed: ${e instanceof Error?e.message:String(e)}`)),this.close()}),this.context.logger.success("Webhook tunnel started")}this.assertStarting();let M=new l({pubsub:T,logger:this.context.logger,sdkVersion:h,projectSlug:m,environmentSlug:d,cliUseWorkspace:v,pageExperience:w,inlineTemplates:!1,useServer:O},{store:N,linguiWatcher:this.linguiWatcherValue,deploymentPreparation:I});this.projectWatcher=M,this.variantPreviewsValue=new b({projectRoot:this.projectRoot},{store:N,logger:this.context.logger,projectWatcher:M}),"plain"!==w&&void 0!==this.props.editorPort&&await this.startEditor();let C=await S({templateFiles:D,agentMode:"agent"===w}),L=await t(C);return this.closePromise&&(await L.close(),this.assertStarting()),this.store.viteServer$.next(L),await L.listen(),this.assertStarting(),this.context.logger.step("Starting Vite dev server"),M.start(L),L}assertStarting(){if(this.closePromise)throw Error("Cannot continue startup: the session has already closed. Start a new Phoenix application.")}async closeResources(e){"dev"===this.mode&&e.debug("Shutting down...");let t="story"===this.mode?[{name:"story source watcher",close:()=>this.storyWatcher?.close()},{name:"mock-template watcher",close:()=>this.mockTemplateWatcher?.close()},{name:"editor server",close:()=>this.editorServer?.close()}]:[{name:"lingui watcher",close:()=>this.linguiWatcherValue?.close()},{name:"project watcher",close:()=>this.projectWatcher?.close()},{name:"mock template watcher",close:()=>this.mockTemplateWatcher?.close()},{name:"editor server",close:()=>this.editorServer?.close()},{name:"variant previews",close:()=>this.variantPreviewsValue?.dispose()},{name:"vite server",close:()=>this.store.viteServer$.value?.close()},{name:"webhook tunnel",close:()=>this.webhookTunnel?.stop()}],r=[];for(let o of t)try{"dev"===this.mode&&e.debug(`Shutting down ${o.name}`),await o.close()}catch(s){let t=s instanceof Error?s.message:String(s);"story"===this.mode?e.warn(`Failed to close the story-dev ${o.name}: ${t}. The process will continue shutting down.`):r.push(`${o.name}: ${t}`)}this.browserConsoleSubscription?.unsubscribe(),this.failures$.complete(),r.length>0&&e.warn(`Cleanup warnings:
|
|
2
|
+
${r.join("\n ")}`),"dev"===this.mode&&e.debug("Shutdown complete")}}
|
|
@@ -1,17 +1,28 @@
|
|
|
1
|
+
import type { Logger } from '../utils/index.js';
|
|
1
2
|
interface SignedInDevelopmentEnvironmentProps {
|
|
2
3
|
readonly serverUrl: string;
|
|
3
|
-
readonly
|
|
4
|
+
readonly flagProject: string | undefined;
|
|
5
|
+
readonly specProject: string | undefined;
|
|
6
|
+
readonly specProjectSource: string;
|
|
7
|
+
readonly projectRoot: string;
|
|
8
|
+
readonly interactive: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface SignedInDevelopmentEnvironmentContext {
|
|
11
|
+
readonly logger: Logger;
|
|
12
|
+
readonly ask: (question: string) => Promise<string>;
|
|
4
13
|
}
|
|
5
14
|
/** The development environment `phoenix dev` works in when it authenticates with the stored login. */
|
|
6
15
|
interface SignedInDevelopmentEnvironment {
|
|
7
16
|
readonly apiToken: string;
|
|
8
|
-
|
|
17
|
+
/** Name of the workspace the sign-in is bound to. A personal sign-in has none. */
|
|
18
|
+
readonly workspaceName: string | undefined;
|
|
9
19
|
readonly projectSlug: string;
|
|
10
20
|
readonly environmentSlug: string;
|
|
11
21
|
}
|
|
12
22
|
/**
|
|
13
23
|
* Asks the server for the signed-in user's development environment in a project. The server creates it on the first
|
|
14
|
-
* call, so nothing has to be set up in Studio.
|
|
24
|
+
* call, so nothing has to be set up in Studio. The project is the one --project or the spec names, or one of the
|
|
25
|
+
* projects the sign-in can reach.
|
|
15
26
|
*/
|
|
16
|
-
export declare const resolveSignedInDevelopmentEnvironment: (props: SignedInDevelopmentEnvironmentProps) => Promise<SignedInDevelopmentEnvironment>;
|
|
27
|
+
export declare const resolveSignedInDevelopmentEnvironment: (props: SignedInDevelopmentEnvironmentProps, context: SignedInDevelopmentEnvironmentContext) => Promise<SignedInDevelopmentEnvironment>;
|
|
17
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createCliApiClient as e}from"#package/client";import{getServerCredentials as o}from"./cli-credentials.js";import{describeSavedLogins as n}from"./cli-server/index.js";import{resolveTargetProject as r}from"./spec-project/index.js";export const resolveSignedInDevelopmentEnvironment=async(t,i)=>{let{serverUrl:a,projectRoot:c}=t,s=await o(a);if(!s)throw Error(`phoenix dev has no development key and you are not signed in to ${a}. ${await n()??"Run `phoenix login`."} Or paste the .env block of a Studio development environment into .env.`);void 0!==process.env.PHOENIX_API_TOKEN&&i.logger.info(`phoenix dev ignores PHOENIX_API_TOKEN: it develops with the saved login on ${a}${s.customerName?` for workspace ${s.customerName}`:""}.`);let p=await r({serverUrl:a,token:s.token,flagProject:t.flagProject,specProject:t.specProject,specProjectSource:t.specProjectSource,projectRoot:c,interactive:t.interactive,credentialHint:"Run `phoenix login` again."},i),{data:m,error:l}=await e(a).POST("/environments/development/resolve",{body:{project:p},headers:{authorization:`Bearer ${s.token}`}});if(l||!m)throw Error(`The server did not provide a development environment for project "${p}"${s.customerSlug?` in workspace "${s.customerSlug}"`:""} on ${a}: ${l?.message??"no response"}`);return{apiToken:s.token,workspaceName:s.customerName,projectSlug:m.projectSlug,environmentSlug:m.environmentSlug}};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** A workspace of the session, as `/auth/me` lists it. */
|
|
2
|
+
interface SessionWorkspace {
|
|
3
|
+
readonly slug: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly projects: readonly {
|
|
6
|
+
readonly slug: string;
|
|
7
|
+
}[];
|
|
8
|
+
}
|
|
9
|
+
/** One workspace with the project slugs the credential can reach in it, as `whoami` and deploy errors list them. */
|
|
10
|
+
export declare const describeWorkspaceProjects: (workspace: SessionWorkspace) => string;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const describeWorkspaceProjects=e=>`${e.name} (${e.slug}): ${e.projects.map(e=>e.slug).join(", ")||"no project access"}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{describeWorkspaceProjects}from"./describe-workspace-projects.js";export{resolveDeployTarget}from"./resolve-deploy-target.js";export{resolveTargetProject}from"./resolve-target-project.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
interface ResolveDeployTargetProps {
|
|
2
|
+
readonly serverUrl: string;
|
|
3
|
+
/** API token of the credential the deploy runs with. */
|
|
4
|
+
readonly token: string;
|
|
5
|
+
/** Slug of the project the deploy is about to upload to. */
|
|
6
|
+
readonly project: string;
|
|
7
|
+
/** What to do when the server refuses the token: sign in again, or replace the variable that supplies it. */
|
|
8
|
+
readonly credentialHint: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Where a deploy goes and who it acts as, checked against the server before anything is packed, so a wrong project
|
|
12
|
+
* or account shows before it reaches a live configurator.
|
|
13
|
+
*/
|
|
14
|
+
interface DeployTarget {
|
|
15
|
+
/** Workspace that owns the project. Null when the server is too old to list the workspaces of the session. */
|
|
16
|
+
readonly workspace: {
|
|
17
|
+
readonly slug: string;
|
|
18
|
+
readonly name: string;
|
|
19
|
+
} | null;
|
|
20
|
+
/**
|
|
21
|
+
* Workspaces the named slug is in when it is in several of them; the server then deploys to the one whose project the
|
|
22
|
+
* credential can manage, and `workspace` is null. Empty otherwise.
|
|
23
|
+
*/
|
|
24
|
+
readonly ambiguousWorkspaces: readonly {
|
|
25
|
+
readonly slug: string;
|
|
26
|
+
readonly name: string;
|
|
27
|
+
}[];
|
|
28
|
+
/** How the deploy names the project: its slug, or `<slug>--<workspace slug>`. */
|
|
29
|
+
readonly project: string;
|
|
30
|
+
/** The project's slug within its workspace, which Studio addresses name it by. */
|
|
31
|
+
readonly projectSlug: string;
|
|
32
|
+
/** Email of the account, or its id on a server that sends no email. */
|
|
33
|
+
readonly account: string;
|
|
34
|
+
/** API version the server reported with the session, when it sent one. */
|
|
35
|
+
readonly apiVersion: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* The previews of the project a deploy can build into, which `--env` is checked against. Null when the server does
|
|
38
|
+
* not list them, a server from before previews.
|
|
39
|
+
*/
|
|
40
|
+
readonly previews: readonly string[] | null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Reads the session of the credential and finds the workspace of the project a deploy targets. A project the
|
|
44
|
+
* credential cannot reach stops the deploy here with the ones it can, instead of after packing and uploading.
|
|
45
|
+
*/
|
|
46
|
+
export declare const resolveDeployTarget: ({ serverUrl, token, project, credentialHint, }: ResolveDeployTargetProps) => Promise<DeployTarget>;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createCliApiClient as e}from"#package/client";import{describeWorkspaceProjects as r}from"./describe-workspace-projects.js";export const resolveDeployTarget=async({serverUrl:o,token:s,project:a,credentialHint:p})=>{let{data:t,error:c,response:l}=await e(o).GET("/auth/me",{headers:{authorization:`Bearer ${s}`}});if(c||!t){let e=401===l.status?` ${p}`:"";throw Error(`Your sign-in could not be checked: ${(c?.message??"no response").replace(/\.$/,"")}.${e}`)}let i=t.email??t.userId,n=l.headers.get("x-api-version");if(void 0===t.workspaces)return{workspace:null,ambiguousWorkspaces:[],project:a,projectSlug:a,account:i,apiVersion:n,previews:null};let u=t.workspaces.flatMap(e=>e.projects.filter(r=>r.slug===a||`${r.slug}--${e.slug}`===a).map(r=>({workspace:{slug:e.slug,name:e.name},projectSlug:r.slug,previews:r.previews??null}))),[g]=u;if(void 0===g){let e=t.workspaces.map(r).join("; ");throw Error(`Project "${a}" is not one ${i} can reach on ${o}, so nothing was packed or uploaded. ${e?`Reachable projects: ${e}`:"The credential reaches no workspace"}. Pass --project <slug> or set \`project\` in spec/application.yaml to one of them, or ask a workspace administrator for access to "${a}".`)}return u.length>1?{workspace:null,ambiguousWorkspaces:u.map(e=>e.workspace),project:a,projectSlug:g.projectSlug,account:i,apiVersion:n,previews:null}:{workspace:g.workspace,ambiguousWorkspaces:[],project:a,projectSlug:g.projectSlug,account:i,apiVersion:n,previews:g.previews}};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Logger } from '../../utils/index.js';
|
|
2
|
+
interface ResolveTargetProjectProps {
|
|
3
|
+
readonly serverUrl: string;
|
|
4
|
+
/** API token of the sign-in the command runs with. */
|
|
5
|
+
readonly token: string;
|
|
6
|
+
/** Project slug named with `--project`. It wins over the spec. */
|
|
7
|
+
readonly flagProject: string | undefined;
|
|
8
|
+
/** `project` of the application spec, when a spec file sets it, or the project `.env` names in its place. */
|
|
9
|
+
readonly specProject: string | undefined;
|
|
10
|
+
/** Where `specProject` comes from, for messages: the spec, or `PROJECT_SLUG` for `phoenix dev`. */
|
|
11
|
+
readonly specProjectSource: string;
|
|
12
|
+
/** Folder of the project whose spec may get the chosen project written into it. */
|
|
13
|
+
readonly projectRoot: string;
|
|
14
|
+
/** Whether somebody can answer a prompt: false for an agent, CI or piped input. */
|
|
15
|
+
readonly interactive: boolean;
|
|
16
|
+
/** What to do when the server refuses the token: sign in again, or replace the variable that supplies it. */
|
|
17
|
+
readonly credentialHint: string;
|
|
18
|
+
}
|
|
19
|
+
interface ResolveTargetProjectContext {
|
|
20
|
+
readonly logger: Logger;
|
|
21
|
+
/** Prints a question and resolves with the trimmed line typed as the answer. */
|
|
22
|
+
readonly ask: (question: string) => Promise<string>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Decides which server project `phoenix dev` and `phoenix deploy` work in: the one named with `--project`, else the
|
|
26
|
+
* one the spec names, else one of the projects the sign-in can reach.
|
|
27
|
+
*
|
|
28
|
+
* With no project named, a terminal gets a select of the reachable projects; without a terminal the only reachable
|
|
29
|
+
* project is used and several stop the command with the list, since nobody can choose. A choice the spec does not
|
|
30
|
+
* hold yet is offered for saving. A spec that still says `project: default` names no project: that alias for a
|
|
31
|
+
* workspace's original project no longer exists.
|
|
32
|
+
*/
|
|
33
|
+
export declare const resolveTargetProject: (props: ResolveTargetProjectProps, context: ResolveTargetProjectContext) => Promise<string>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{DEFAULT_PROJECT_ALIAS as e}from"@salsita-ai/contracts/domain";import{createCliApiClient as t}from"#package/client";import{describeWorkspaceProjects as r}from"./describe-workspace-projects.js";import{writeSpecProject as o}from"./write-spec-project.js";let a=t=>{let r=t?.trim();return r&&r!==e?r:void 0},n=async({serverUrl:e,token:r,credentialHint:o})=>{let{data:a,error:n,response:s}=await t(e).GET("/auth/me",{headers:{authorization:`Bearer ${r}`}});if(n||!a){let t=401===s.status?` ${o}`:"";throw Error(`Phoenix could not list the projects your sign-in can reach on ${e}: ${(n?.message??"no response").replace(/\.$/,"")}. The list is needed because neither --project nor the spec names a project.${t} Passing --project <slug> skips the list.`)}let i=(a.workspaces??[]).flatMap(e=>e.projects.map(t=>({slug:t.slug,name:t.name,workspaceName:e.name,workspaceSlug:e.slug})));return i.map(e=>({...e,target:i.filter(t=>t.slug===e.slug).length>1?`${e.slug}--${e.workspaceSlug}`:e.slug}))},s=async(e,{logger:t,ask:r})=>{let o=e.map((e,t)=>` ${t+1}. ${e.target} (${e.name}, workspace ${e.workspaceName})`).join("\n");for(t.info(`Neither --project nor the spec names a project. Your sign-in can reach:
|
|
2
|
+
${o}`);;){let o=await r(`Project to use [1-${e.length}]: `),a=e.find((e,t)=>o===String(t+1)||o===e.target);if(a)return a.target;t.warn(`"${o}" is not on the list. Type a number from 1 to ${e.length}, or a project slug.`)}},i=async(t,r,{logger:a,ask:n})=>{let s=`project: ${t}`;if(!r.interactive){let o=r.flagProject?.trim()?"keep passing --project":`pass --project ${t}`;a.info(r.specProject?.trim()===e?`Replace \`${e}\` in ${r.specProjectSource} with \`${t}\`, or ${o}, to target it on later runs.`:`Add \`${s}\` to spec/application.yaml, or ${o}, to target it on later runs.`);return}if(!["","y","yes"].includes((await n(`Write \`${s}\` to the spec so later runs use it? [Y/n] `)).toLowerCase()))return;let i=await o(r.projectRoot,t);a.info(void 0===i?`Phoenix could not write \`${s}\` into the spec, because \`project\` is set there in a form it cannot rewrite or spec/application.yaml is missing. Set it by hand.`:`${i} now says \`${s}\`. Commit the change.`)};export const resolveTargetProject=async(t,o)=>{let{serverUrl:c,interactive:p}=t,{logger:l}=o,g=a(t.specProject);if(t.flagProject?.trim()===e)throw Error(`--project ${e} names no project: \`${e}\` was an alias for a workspace's original project and no longer exists. Pass the project's slug; \`phoenix whoami\` lists the ones you can reach.`);let u=a(t.flagProject);if(void 0!==u)return void 0===g?await i(u,t,o):g!==u&&l.info(`Using project "${u}" from --project instead of "${g}" from ${t.specProjectSource}.`),u;if(void 0!==g)return g;t.specProject?.trim()===e&&l.warn(`The project \`${e}\` from ${t.specProjectSource} no longer names a project. Replace it with a project slug.`);let m=await n(t),[h]=m;if(void 0===h)throw Error(`Your sign-in on ${c} can reach no project, and neither --project nor the spec names one. Create a project in Studio, or ask a workspace administrator for project access, then run the command again.`);if(p){let e=await s(m,o);return await i(e,t,o),e}if(m.length>1)throw Error(`Neither --project nor the spec names a project, and your sign-in can reach ${m.length} (${[...new Set(m.map(e=>e.workspaceSlug))].map(e=>{let t=m.filter(t=>t.workspaceSlug===e);return r({slug:e,name:t[0]?.workspaceName??e,projects:t})}).join("; ")}). Pass --project <slug>, or set \`project\` in spec/application.yaml to the slug of the one to work in.`);return l.info(`Using project "${h.target}", the only project your sign-in can reach.`),await i(h.target,t,o),h.target};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writes the project a command targets into the spec, and returns the path of the changed file within the project.
|
|
3
|
+
* A spec file that still says `project: default` gets the slug in place of that value; otherwise the slug is added
|
|
4
|
+
* to `spec/application.yaml`. Returns nothing, and writes nothing, when `project` is set in a form that cannot be
|
|
5
|
+
* rewritten safely (a block scalar, an alias, an empty value) or there is no application spec file to add it to.
|
|
6
|
+
*/
|
|
7
|
+
export declare const writeSpecProject: (projectRoot: string, projectSlug: string) => Promise<string | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{globby as t}from"globby";import{readFile as e,writeFile as r}from"node:fs/promises";import{join as i}from"node:path";import{Scalar as a,isMap as n,isScalar as o,parseDocument as l,stringify as p}from"yaml";import{DEFAULT_PROJECT_ALIAS as s}from"@salsita-ai/contracts/domain";import{SPEC_FILE_PATTERN as m}from"../../application-spec/index.js";let c="spec/application.yaml",f=(t,e)=>{let r=l(t).get("project",!0);if(!o(r)||!r.range||"string"!=typeof r.value||r.type===a.BLOCK_LITERAL||r.type===a.BLOCK_FOLDED||r.value.trim()!==s)return t;let[i,n]=r.range;return`${t.slice(0,i)}${p(e).trimEnd()}${t.slice(n)}`};export const writeSpecProject=async(a,o)=>{let s=(await t(m,{cwd:a})).sort(),u=await Promise.all(s.map(async t=>({filePath:t,text:await e(i(a,t),"utf-8")})));for(let{filePath:t,text:e}of u){let n=f(e,o);if(n!==e)return await r(i(a,t),n),t}let $=u.find(t=>t.filePath===c);if(!$||u.some(t=>l(t.text).has("project")))return;let d=((t,e)=>{let{contents:r}=l(t),i=t.includes("\r\n")?"\r\n":"\n",a=`project: ${p(e).trimEnd()}${i}`;if(null===r)return`${t}${""===t||t.endsWith("\n")?"":i}${a}`;if(!n(r)||!r.range)return t;let[o]=r.range,s=`${t.slice(0,o)}${a}${t.slice(o)}`,m=l(s);return 0===m.errors.length&&m.get("project")===e?s:t})($.text,o);if(d!==$.text)return await r(i(a,c),d),c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const createCommandEvent=(e,t)=>({eventId:t.createId(),name:"ready"===e.phase?"cli_dev_server_ready":"started"===e.phase?"cli_command_started":"cli_command_completed",occurredAt:e.occurredAt,deviceId:e.identity.installationId,..."userId"in e.identity?{userId:e.identity.userId}:{},properties:{schema_version:1,source:"cli",command:e.command,attempt_id:e.attemptId,phase:e.phase,outcome:e.outcome,...void 0===e.durationMs?{}:{duration_ms:e.durationMs},...void 0===e.failureCategory?{}:{failure_category:e.failureCategory},sdk_version:e.sdkVersion,classification:"userId"in e.identity?"general":"unknown",work_session_id:e.identity.workSessionId,..."workspaceId"in e.identity?{workspace_id:e.identity.workspaceId}:{}}});
|
|
1
|
+
export const createCommandEvent=(e,t)=>({eventId:t.createId(),name:"ready"===e.phase?"cli_dev_server_ready":"started"===e.phase?"cli_command_started":"cli_command_completed",occurredAt:e.occurredAt,deviceId:e.identity.installationId,..."userId"in e.identity?{userId:e.identity.userId}:{},properties:{schema_version:1,source:"cli",command:e.command,attempt_id:e.attemptId,phase:e.phase,outcome:e.outcome,...void 0===e.durationMs?{}:{duration_ms:e.durationMs},...void 0===e.failureCategory?{}:{failure_category:e.failureCategory},sdk_version:e.sdkVersion,classification:"userId"in e.identity?"general":"unknown",work_session_id:e.identity.workSessionId,..."workspaceId"in e.identity&&null!==e.identity.workspaceId?{workspace_id:e.identity.workspaceId}:{}}});
|
|
@@ -8,7 +8,7 @@ export interface TelemetryAssociation {
|
|
|
8
8
|
/** Stable authenticated builder user ID, mapped to Amplitude's user_id after authentication. */
|
|
9
9
|
readonly userId: string;
|
|
10
10
|
/** Internal UUID of the SDK-builder workspace the CLI authenticated against. */
|
|
11
|
-
readonly workspaceId: string;
|
|
11
|
+
readonly workspaceId: string | null;
|
|
12
12
|
}
|
|
13
13
|
export type TelemetryIdentity = AnonymousTelemetryIdentity | (AnonymousTelemetryIdentity & TelemetryAssociation);
|
|
14
14
|
interface TelemetryStateContext {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{randomUUID as t}from"node:crypto";import{chmod as e,mkdir as i,readFile as n,writeFile as a}from"node:fs/promises";import{homedir as s}from"node:os";import{dirname as r,join as o}from"node:path";import{z as d}from"zod";let l=d.object({installationId:d.string().uuid(),workSessionId:d.string().uuid(),lastActiveAt:d.string().datetime()}),c=d.union([l.extend({userId:d.string().min(5),workspaceId:d.string().uuid()}),l.strict()]),I={createId:t,now:()=>new Date};export const getTelemetryStatePath=()=>process.env.PHOENIX_TELEMETRY_FILE??o(s(),".phoenix","telemetry.json");let u=async(t,n)=>{await i(r(t),{recursive:!0,mode:448}),await a(t,`${JSON.stringify(n,null,2)}
|
|
1
|
+
import{randomUUID as t}from"node:crypto";import{chmod as e,mkdir as i,readFile as n,writeFile as a}from"node:fs/promises";import{homedir as s}from"node:os";import{dirname as r,join as o}from"node:path";import{z as d}from"zod";let l=d.object({installationId:d.string().uuid(),workSessionId:d.string().uuid(),lastActiveAt:d.string().datetime()}),c=d.union([l.extend({userId:d.string().min(5),workspaceId:d.string().uuid().nullable()}),l.strict()]),I={createId:t,now:()=>new Date};export const getTelemetryStatePath=()=>process.env.PHOENIX_TELEMETRY_FILE??o(s(),".phoenix","telemetry.json");let u=async(t,n)=>{await i(r(t),{recursive:!0,mode:448}),await a(t,`${JSON.stringify(n,null,2)}
|
|
2
2
|
`,{mode:384}),await e(t,384)},w=async t=>{let e;try{e=await n(t,"utf8")}catch(t){return t instanceof Error&&"code"in t&&"ENOENT"===t.code?{kind:"missing"}:{kind:"invalid"}}try{let t=c.safeParse(JSON.parse(e));return t.success?{kind:"valid",state:t.data}:{kind:"invalid"}}catch{return{kind:"invalid"}}};export const loadTelemetryIdentity=async(t=I)=>{let e=getTelemetryStatePath(),i=await w(e),n="valid"===i.kind?i.state:null,a=t.now(),s=null===n?null:Date.parse(n.lastActiveAt),r=null===s||a.getTime()-s>=18e5,o=null===n?{installationId:t.createId(),workSessionId:t.createId(),lastActiveAt:a.toISOString()}:{...n,workSessionId:r?t.createId():n.workSessionId,lastActiveAt:a.toISOString()};try{"invalid"!==i.kind&&await u(e,o)}catch{return{installationId:o.installationId,workSessionId:o.workSessionId}}return{installationId:o.installationId,workSessionId:o.workSessionId,..."userId"in o&&"workspaceId"in o?{userId:o.userId,workspaceId:o.workspaceId}:{}}};export const saveTelemetryAssociation=async(t,e)=>{let i=getTelemetryStatePath(),n=await w(i);"valid"===n.kind&&n.state.installationId===t.installationId&&n.state.workSessionId===t.workSessionId&&await u(i,{...n.state,...e})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mkdir as e,readFile as t,realpath as i,rename as a,rm as r,writeFile as s}from"node:fs/promises";import{dirname as o,join as n,relative as l,resolve as p,sep as c}from"node:path";import h from"promise-queue";import{z as d}from"zod";import{RawProjectFiles as f,RuntimeReferenceStore as m,TextFile as w,buildPhoenixDefinitions as u,isTextFile as g,parseApplicationFiles as v}from"#package/application-spec";import{generateAssistantPrompt as y,getAllPhxDefinitions as b}from"#package/domain";import{readApplicationFiles as S}from"../application-spec/application-spec-file-reader.js";import{swcEvalExpressionParser as F,swcModuleAnalyzer as N}from"../application-spec/swc-module-analyzer.js";let k=".phoenix/variant-recovery.json",j=d.array(d.object({fileName:d.string(),original:d.string().nullable(),applied:d.string().nullable(),previous:d.string().nullable().optional()})),E=e=>!e.includes("\\")&&!e.split("/").some(e=>".."===e||"."===e||""===e)&&(/^spec\/(?!admin\/).+\.yaml$/.test(e)||/^src\/(?:components|transformers|handlers|elements|_[^/]+)\/.+\.tsx?$/.test(e)),M=e=>`Left ${e} as it is: it was edited outside the variant comparison, so restoring the baseline would overwrite that edit. Review the file and remove what the option added to it`,$=async e=>{try{return await t(e,"utf8")}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return null;throw e}},C=async(t,i)=>{if(null===i)return void await r(t,{force:!0});await e(o(t),{recursive:!0});let n=`${t}.variant-${crypto.randomUUID()}`;try{await s(n,i),await a(n,t)}finally{await r(n,{force:!0})}},R=(e,t)=>{let i=v({rawProjectFiles:e,phxDefinitions:u(b())},{analyzer:N,evalExpressionParser:F,referenceStore:new m,logger:t});if(!i.ok)throw Error(`Cannot apply variant: ${i.errors.map(e=>`[${e.code}] ${e.message}`).join("\n")}`);let{configurator:a,admin:r,appMetadata:s,infra:o,dataSpec:n}=i.value.applicationSpec,l=i.value.categorizedFiles,p=new Set([...l.webhooks,...l.expressions,...l.actions,...l.invariants,...l.migrations,...l.adminMigrations,...l.adminExpressions,...l.adminInvariants,...l.handlers.filter(e=>"pinned"===e.webhookMembership||"named-handler"===e.webhookMembership),...l.components.filter(e=>"pinned"===e.webhookMembership),...l.adminComponents.filter(e=>"pinned"===e.webhookMembership)].flatMap(e=>[e.file.name,...e.deps]));return JSON.stringify({webhookFiles:e.files.filter(g).filter(e=>p.has(e.name)).sort((e,t)=>e.name.localeCompare(t.name)),appMetadata:s,infra:o,dataSpec:n,model:a.latestModel,schema:a.configurationSchema,dataSchemas:a.dataSchemas,adminModel:r.latestModel,adminSchema:r.configurationSchema,assistant:a.assistant?.sdl,assistantSettings:a.assistantServerSettings,assistantPrompt:a.assistant?y(a.assistant):null},(e,t)=>t instanceof Map?[...t.entries()]:t)};export class VariantFileSession{props;queue=new h(1,1/0);applied=new Map;baseline=new Map;contract;settled=!1;constructor(e){for(let t of(this.props=e,e.rawFiles.files))g(t)&&E(t.name)&&this.baseline.set(t.name,t.content);this.contract=R(e.rawFiles,e.logger)}static async create(e){await VariantFileSession.recover(e.projectRoot,e.logger);let t=await S({projectRoot:e.projectRoot,envs:{}});return new VariantFileSession({...e,rawFiles:t})}static async recover(e,t){let i=await $(n(e,k));if(null!==i){for(let a of j.parse(JSON.parse(i))){let i=await VariantFileSession.resolveFile(e,a.fileName),r=await $(i);if(r!==a.applied&&r!==a.original&&r!==a.previous){t.warn(M(a.fileName));continue}await C(i,a.original)}await r(n(e,k),{force:!0})}}static async resolveFile(e,t){if(!E(t))throw Error(`Cannot override ${t}: variants support frontend spec and TypeScript files only. Keep server code, dependencies, environment files and assets unchanged`);let a=await i(e),r=p(a,t),s=r;for(;;)try{let e=await i(s),r=l(a,e);if(".."===r||r.startsWith(`..${c}`))throw Error(`Cannot override ${t}: its symbolic link leaves the project`);if(e!==s)throw Error(`Cannot override ${t}: it uses a symbolic link. Variant edits require regular files so restoration preserves the original file`);break}catch(e){if(!(e instanceof Error&&"code"in e&&"ENOENT"===e.code))throw e;s=o(s)}return r}getFiles(){return[...this.baseline].map(([e,t])=>({fileName:e,content:t}))}apply(e){return this.queue.add(async()=>{if(this.settled)throw Error("This variant comparison has already ended");let t=new Map;for(let i of e){if(await VariantFileSession.resolveFile(this.props.projectRoot,i.fileName),t.has(i.fileName))throw Error(`Cannot apply variant: ${i.fileName} is specified twice`);t.set(i.fileName,i.content)}if(t.size>0){let e=this.props.rawFiles.files.filter(e=>!t.has(e.name));for(let[i,a]of t)null!==a&&e.push(w(i,a));if(R(f(e),this.props.logger)!==this.contract)throw Error("Cannot apply variant: it changes the model, schemas, data or deployment settings. Variants must need no server preparation")}await this.writeTarget(t,"refuse")})}finish(e){return this.queue.add(async()=>{this.settled||(e||await this.writeTarget(new Map,"keep"),await r(n(this.props.projectRoot,k),{force:!0}),this.settled=!0)})}async writeTarget(t,i){let a=new Set([...this.applied.keys(),...t.keys()]);if(0===a.size)return;let r=new Map;for(let e of a){let t=await VariantFileSession.resolveFile(this.props.projectRoot,e),a=this.applied.has(e)?this.applied.get(e):this.baseline.get(e)??null;if(await $(t)===a){r.set(e,t);continue}if("refuse"===i)throw Error(`Cannot switch variant: ${e} was edited outside the preview, and switching would overwrite that edit. Choose the option that is shown, or close the comparison with \`phoenix variants --close\`, which keeps the edit`);this.props.logger.warn(M(e))}let s=[...r.keys()].map(e=>({fileName:e,original:this.baseline.get(e)??null,previous:this.applied.has(e)?this.applied.get(e)??null:this.baseline.get(e)??null,applied:t.has(e)?t.get(e)??null:this.baseline.get(e)??null}));await e(n(this.props.projectRoot,".phoenix"),{recursive:!0}),await C(n(this.props.projectRoot,k),JSON.stringify(s));let o=new Map(this.applied);try{for(let e of s){let t=r.get(e.fileName);void 0!==t&&await C(t,e.applied)}}catch(e){for(let[e,t]of r)await C(t,o.has(e)?o.get(e)??null:this.baseline.get(e)??null);throw await C(n(this.props.projectRoot,k),JSON.stringify([...o].map(([e,t])=>({fileName:e,original:this.baseline.get(e)??null,applied:t})))),e}for(let[e,i]of(this.applied.clear(),t))this.applied.set(e,i);this.props.onFilesChanged(s.map(e=>({fileName:e.fileName,content:e.applied})))}}
|
|
1
|
+
import{mkdir as e,readFile as t,realpath as i,rename as a,rm as r,writeFile as s}from"node:fs/promises";import{dirname as o,join as n,relative as l,resolve as p,sep as c}from"node:path";import h from"promise-queue";import{z as d}from"zod";import{RawProjectFiles as f,RuntimeReferenceStore as m,TextFile as w,buildPhoenixDefinitions as u,isTextFile as g,parseApplicationFiles as v}from"#package/application-spec";import{generateAssistantPrompt as y,getAllPhxDefinitions as b}from"#package/domain";import{readApplicationFiles as S}from"../application-spec/application-spec-file-reader.js";import{swcEvalExpressionParser as F,swcModuleAnalyzer as N}from"../application-spec/swc-module-analyzer.js";let k=".phoenix/variant-recovery.json",j=d.array(d.object({fileName:d.string(),original:d.string().nullable(),applied:d.string().nullable(),previous:d.string().nullable().optional()})),E=e=>!e.includes("\\")&&!e.split("/").some(e=>".."===e||"."===e||""===e)&&(/^spec\/(?!admin\/).+\.yaml$/.test(e)||/^src\/(?:components|transformers|handlers|elements|_[^/]+)\/.+\.tsx?$/.test(e)),M=e=>`Left ${e} as it is: it was edited outside the variant comparison, so restoring the baseline would overwrite that edit. Review the file and remove what the option added to it`,$=async e=>{try{return await t(e,"utf8")}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return null;throw e}},C=async(t,i)=>{if(null===i)return void await r(t,{force:!0});await e(o(t),{recursive:!0});let n=`${t}.variant-${crypto.randomUUID()}`;try{await s(n,i),await a(n,t)}finally{await r(n,{force:!0})}},R=(e,t)=>{let i=v({rawProjectFiles:e,phxDefinitions:u(b())},{analyzer:N,evalExpressionParser:F,referenceStore:new m,logger:t});if(!i.ok)throw Error(`Cannot apply variant: ${i.errors.map(e=>`[${e.code}] ${e.message}`).join("\n")}`);let{configurator:a,admin:r,appMetadata:s,infra:o,dataSpec:n}=i.value.applicationSpec,l=i.value.categorizedFiles,p=new Set([...l.webhooks,...l.expressions,...l.actions,...l.invariants,...l.migrations,...l.adminMigrations,...l.adminExpressions,...l.adminInvariants,...l.handlers.filter(e=>"pinned"===e.webhookMembership||"named-handler"===e.webhookMembership),...l.components.filter(e=>"pinned"===e.webhookMembership),...l.adminComponents.filter(e=>"pinned"===e.webhookMembership)].flatMap(e=>[e.file.name,...e.deps]));return JSON.stringify({webhookFiles:e.files.filter(g).filter(e=>p.has(e.name)).sort((e,t)=>e.name.localeCompare(t.name)),appMetadata:s,infra:o,dataSpec:n,model:a.latestModel,schema:a.configurationSchema,dataSchemas:a.dataSchemas,adminModel:r.latestModel,adminSchema:r.configurationSchema,assistant:a.assistant?.sdl,assistantInstructions:a.assistant?.instructions,assistantSettings:a.assistantServerSettings,assistantPrompt:a.assistant?y(a.assistant,{surface:"panel",voice:a.assistantServerSettings?.ai.voice===!0}):null},(e,t)=>t instanceof Map?[...t.entries()]:t)};export class VariantFileSession{props;queue=new h(1,1/0);applied=new Map;baseline=new Map;contract;settled=!1;constructor(e){for(let t of(this.props=e,e.rawFiles.files))g(t)&&E(t.name)&&this.baseline.set(t.name,t.content);this.contract=R(e.rawFiles,e.logger)}static async create(e){await VariantFileSession.recover(e.projectRoot,e.logger);let t=await S({projectRoot:e.projectRoot,envs:{}});return new VariantFileSession({...e,rawFiles:t})}static async recover(e,t){let i=await $(n(e,k));if(null!==i){for(let a of j.parse(JSON.parse(i))){let i=await VariantFileSession.resolveFile(e,a.fileName),r=await $(i);if(r!==a.applied&&r!==a.original&&r!==a.previous){t.warn(M(a.fileName));continue}await C(i,a.original)}await r(n(e,k),{force:!0})}}static async resolveFile(e,t){if(!E(t))throw Error(`Cannot override ${t}: variants support frontend spec and TypeScript files only. Keep server code, dependencies, environment files and assets unchanged`);let a=await i(e),r=p(a,t),s=r;for(;;)try{let e=await i(s),r=l(a,e);if(".."===r||r.startsWith(`..${c}`))throw Error(`Cannot override ${t}: its symbolic link leaves the project`);if(e!==s)throw Error(`Cannot override ${t}: it uses a symbolic link. Variant edits require regular files so restoration preserves the original file`);break}catch(e){if(!(e instanceof Error&&"code"in e&&"ENOENT"===e.code))throw e;s=o(s)}return r}getFiles(){return[...this.baseline].map(([e,t])=>({fileName:e,content:t}))}apply(e){return this.queue.add(async()=>{if(this.settled)throw Error("This variant comparison has already ended");let t=new Map;for(let i of e){if(await VariantFileSession.resolveFile(this.props.projectRoot,i.fileName),t.has(i.fileName))throw Error(`Cannot apply variant: ${i.fileName} is specified twice`);t.set(i.fileName,i.content)}if(t.size>0){let e=this.props.rawFiles.files.filter(e=>!t.has(e.name));for(let[i,a]of t)null!==a&&e.push(w(i,a));if(R(f(e),this.props.logger)!==this.contract)throw Error("Cannot apply variant: it changes the model, schemas, data or deployment settings. Variants must need no server preparation")}await this.writeTarget(t,"refuse")})}finish(e){return this.queue.add(async()=>{this.settled||(e||await this.writeTarget(new Map,"keep"),await r(n(this.props.projectRoot,k),{force:!0}),this.settled=!0)})}async writeTarget(t,i){let a=new Set([...this.applied.keys(),...t.keys()]);if(0===a.size)return;let r=new Map;for(let e of a){let t=await VariantFileSession.resolveFile(this.props.projectRoot,e),a=this.applied.has(e)?this.applied.get(e):this.baseline.get(e)??null;if(await $(t)===a){r.set(e,t);continue}if("refuse"===i)throw Error(`Cannot switch variant: ${e} was edited outside the preview, and switching would overwrite that edit. Choose the option that is shown, or close the comparison with \`phoenix variants --close\`, which keeps the edit`);this.props.logger.warn(M(e))}let s=[...r.keys()].map(e=>({fileName:e,original:this.baseline.get(e)??null,previous:this.applied.has(e)?this.applied.get(e)??null:this.baseline.get(e)??null,applied:t.has(e)?t.get(e)??null:this.baseline.get(e)??null}));await e(n(this.props.projectRoot,".phoenix"),{recursive:!0}),await C(n(this.props.projectRoot,k),JSON.stringify(s));let o=new Map(this.applied);try{for(let e of s){let t=r.get(e.fileName);void 0!==t&&await C(t,e.applied)}}catch(e){for(let[e,t]of r)await C(t,o.has(e)?o.get(e)??null:this.baseline.get(e)??null);throw await C(n(this.props.projectRoot,k),JSON.stringify([...o].map(([e,t])=>({fileName:e,original:this.baseline.get(e)??null,applied:t})))),e}for(let[e,i]of(this.applied.clear(),t))this.applied.set(e,i);this.props.onFilesChanged(s.map(e=>({fileName:e.fileName,content:e.applied})))}}
|
|
@@ -8,8 +8,9 @@ export declare const setViteLogSink: (sink: ViteLogSink, options?: ViteLogSinkOp
|
|
|
8
8
|
/**
|
|
9
9
|
* Get the inline Vite configuration for Phoenix projects
|
|
10
10
|
*/
|
|
11
|
-
export declare const getViteDevConfig: (options
|
|
11
|
+
export declare const getViteDevConfig: (options: {
|
|
12
12
|
readonly templateFiles?: readonly string[];
|
|
13
|
+
readonly agentMode: boolean;
|
|
13
14
|
}) => Promise<InlineConfig>;
|
|
14
15
|
/**
|
|
15
16
|
* Get the inline Vite configuration for Phoenix projects
|
|
@@ -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
|
|
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 r,readFile as n,writeFile as o}from"fs/promises";import a from"lodash-es/camelCase.js";import{createHash as l}from"node:crypto";import{readFileSync as s,rmSync as m,writeFileSync as g}from"node:fs";import{createRequire as f}from"node:module";import{dirname as p,resolve as d}from"path";import{createLogger as c}from"vite";import u from"vite-plugin-css-injected-by-js";import{LINGUI_CONFIG_PATH as h}from"../lingui/index.js";import{isUsingLocalSdk as O}from"../utils/package-info.js";import{loadFrontendConfigModule as E}from"./frontend-config.js";import{phxBannerPlugin as y}from"./phx-banner-plugin.js";import{phxCspNoncePlugin as _}from"./phx-csp-nonce-plugin.js";import{phxGlobalIsolationPlugin as b}from"./phx-global-isolation-plugin.js";import{phxLicensesPlugin as P}from"./phx-licenses-plugin.js";import{phxVariantPreviewsPlugin as S}from"./phx-variant-previews-plugin.js";let D=null;export const setViteLogSink=(e,i={})=>{D={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"],T=()=>{let t=s(h),r=l("sha256").update(t).digest("hex"),n=d(`${h}.${process.pid}.${r}.json`);try{return g(n,t),{macroPlugin:[f(import.meta.url).resolve("@lingui/babel-plugin-lingui-macro"),{linguiConfig:e({configPath:n})}],catalogPlugin:i({configPath:n})}}finally{m(n,{force:!0})}},R=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 i,r;let n,o,a=O(),l=E(),s=l.readRuntimeConfig(),m=l.frontendBuildConfig,g=T(),u=Object.fromEntries((e.templateFiles??[]).map(e=>[e,`.phoenix/${e}`]));return{...D&&{customLogger:(i=D.sink,r=D.echo,n=c(),{get hasWarned(){return n.hasWarned},info:(e,t)=>{i("info",e),r&&n.info(e,t)},warn:(e,t)=>{i("warn",e),r&&n.warn(e,t)},warnOnce:(e,t)=>{i("warn",e),r&&n.warnOnce(e,t)},error:(e,t)=>{i("error",e),r&&n.error(e,t)},clearScreen:e=>{r&&n.clearScreen(e)},hasErrorLogged:e=>n.hasErrorLogged(e)}),...D.echo?{}:{clearScreen:!1}},mode:"development",optimizeDeps:{exclude:["@swc/wasm-web"],...a&&{entries:["index.html","admin.html",...e.templateFiles??[]],force:!0}},...a&&{resolve:{alias:(o=f(d(process.cwd(),"package.json")),x.flatMap(e=>{try{let i=p(o.resolve(`${e}/package.json`));return[{find:RegExp(`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(/|$)`),replacement:`${i}$1`}]}catch{return[]}}))}},plugins:[t({babel:{plugins:[g.macroPlugin]}}),g.catalogPlugin,{name:"vite:runtime-config",apply:(e,i)=>"build"===i.command||"development"===i.mode,config:e=>{let i=l.readRuntimeConfig(),t=l.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),"globalThis.PHX_GLTF_DECODER_WORKER_LIMIT":JSON.stringify(t.gltfDecoderWorkerLimit),"globalThis.PHX_EXPORT_PIXEL_RATIO":JSON.stringify(t.exportPixelRatio??null)}}}},b({getDeploymentId:()=>R(l.readRuntimeConfig())}),S()],define:{"process.env":{},"import.meta.env.DEV":!0,"import.meta.env.PROD":!1,"phx.frontendEnv":JSON.stringify(s),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(m.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(m.gltfDecoder),"globalThis.PHX_GLTF_DECODER_WORKER_LIMIT":JSON.stringify(m.gltfDecoderWorkerLimit),"globalThis.PHX_EXPORT_PIXEL_RATIO":JSON.stringify(m.exportPixelRatio??null)},build:{rollupOptions:{input:{index:".phoenix/index.html",admin:".phoenix/admin.html",...u}}},root:d(process.cwd(),"./.phoenix"),server:{watch:{ignored:["./**/*.{ts,tsx}","./.swc/**","../spec/**","../src/**"]},hmr:{overlay:!e.agentMode}}}};export const getViteBuildConfigs=async e=>{let i=E(),l=i.readRuntimeConfig(),s=i.frontendBuildConfig,m=T(),g=P(),f=y({sdkVersion:e.sdkVersion,banner:e.banner}),c=[{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(c=>({plugins:[t({babel:{plugins:[m.macroPlugin]}}),m.catalogPlugin,u({useStrictCSP:!0}),_(),b({getDeploymentId:()=>R(i.readRuntimeConfig())}),{name:"vite:lib-index",writeBundle:async()=>{if(!c.htmlFiles.length)return;let i="iife"===c.format?`${c.name}.iife.js`:`${c.name}.js`;for(let t of c.htmlFiles){if(c.main&&e.enableEditor&&"./index.html"===t)continue;let a=d("./.phoenix",t),l=d("./.phoenix/dist/frontend",t);await r(p(l),{recursive:!0});let s=(await n(a,"utf-8")).replace(c.mainScriptPath,i);await o(l,s,"utf-8")}}},g,f],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,lib:{entry:c.entryFile,name:a(c.name),formats:[c.format],fileName:()=>"iife"===c.format?`${c.name}.iife.js`:`${c.name}.js`},rollupOptions:{external:[],output:{assetFileNames:`${c.name}.[ext]`}},minify:!0,emptyOutDir:!1},root:d(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(l),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(s.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(s.gltfDecoder),"globalThis.PHX_GLTF_DECODER_WORKER_LIMIT":JSON.stringify(s.gltfDecoderWorkerLimit),"globalThis.PHX_EXPORT_PIXEL_RATIO":JSON.stringify(s.exportPixelRatio??null)}}));return e.enableEditor?[...c,{plugins:[t({babel:{plugins:[m.macroPlugin]}}),m.catalogPlugin,u({useStrictCSP:!0}),_(),g,f],build:{outDir:"./dist/frontend",chunkSizeWarningLimit:4e3,rollupOptions:{external:[]},minify:!0,emptyOutDir:!1},root:d(process.cwd(),"./.phoenix"),define:{"process.env":{},"process.env.NODE_ENV":JSON.stringify("production"),"phx.frontendEnv":JSON.stringify(l),"globalThis.PHX_SCHEMA_VALIDATOR":JSON.stringify(s.jsonSchemaValidator),"globalThis.PHX_GLTF_DECODER":JSON.stringify(s.gltfDecoder),"globalThis.PHX_GLTF_DECODER_WORKER_LIMIT":JSON.stringify(s.gltfDecoderWorkerLimit),"globalThis.PHX_EXPORT_PIXEL_RATIO":JSON.stringify(s.exportPixelRatio??null)}}]:c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{UnsupportedApiVersionError as e,createCliApiClient as t}from"#package/client";import{getDevelopmentHeaders as s}from"../development-credential.js";let a=(e,t)=>({ok:!1,status:t.status,message:e.message}),n=async t=>{try{return await t()}catch(t){if(t instanceof e)return{ok:!1,status:t.status,message:t.message};throw t}};export const createWebhookTunnelTransport=({serverUrl:e,credential:o,projectSlug:r,environmentSlug:l})=>{let d=t(e),u=s(o,{projectSlug:r,environmentSlug:l});return{poll:({deploymentId:e,sessionId:t,signal:s})=>n(async()=>{let{data:n,error:o,response:r}=await d.POST("/deployments/{deploymentId}/webhook-tunnel/poll",{params:{path:{deploymentId:e}},body:{sessionId:t,acceptResponseEncoding:"gzip"},headers:u,signal:s});return o?a(o,r):{ok:!0,value:n?.request??null}}),respond:async({deploymentId:e,sessionId:t,requestId:s,status:o,headers:r,body:l,isBase64Encoded:p,signal:c})=>{let i={sessionId:t,requestId:s,status:o,headers:r,body:l,isBase64Encoded:p};return Buffer.byteLength(JSON.stringify(i),"utf8")>5242880?{ok:!1,status:413,message:"Webhook tunnel response exceeds the 5 MiB encoded request limit. Reduce the backend data and retry."}:n(async()=>{let{error:t,response:s}=await d.POST("/deployments/{deploymentId}/webhook-tunnel/respond",{params:{path:{deploymentId:e}},body:i,headers:u,signal:c});return t?a(t,s):{ok:!0,value:void 0}})}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./selectors.js";export*from"./datadog-logger.js";export*from"./resource-url-service.js";export*from"./analytics/index.js";
|
|
1
|
+
export*from"./selectors.js";export*from"./datadog-logger.js";export*from"./resource-url-service.js";export*from"./analytics/index.js";export*from"./webmcp/index.js";
|
|
@@ -35,6 +35,8 @@ export declare const createCommonServicesSelectors: (context: Context) => {
|
|
|
35
35
|
getQueryClient: () => import("@tanstack/react-query").QueryClient;
|
|
36
36
|
getWebComponentOptions: () => WebComponentOptions;
|
|
37
37
|
getWebComponentApi: () => WebComponentApi;
|
|
38
|
+
/** @internal SDK plumbing for the configurator's WebMCP tools; not part of a project's API. */
|
|
39
|
+
getWebMcpHost: () => import("./index.js").WebMcpHost;
|
|
38
40
|
getSessionService: () => SessionService<Record<string, unknown>>;
|
|
39
41
|
selectRequestSessionToken: import("@salsita-ai/common/utils").Selector<CommonServicesSelectorState, (minValiditySeconds?: number) => Promise<string>>;
|
|
40
42
|
selectRequestAdminSessionToken: import("@salsita-ai/common/utils").Selector<CommonServicesSelectorState, (minValiditySeconds?: number) => Promise<string>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{match as e}from"ts-pattern";import{createSelector as t}from"@salsita-ai/common/utils";import{AuthenticatedClient as r,AuthorizedClient as s,LocalStorageAuthenticatedClientPhoenixApiClient as i,LocalStorageAuthorizedPhoenixApiClient as o,LocalStorageUnauthenticatedPhoenixApiClient as n,MemoryAuthenticatedClientPhoenixApiClient as c,MemoryAuthorizedPhoenixApiClient as l,UnauthenticatedClient as g}from"#package/client";import{createQueryClient as
|
|
1
|
+
import{match as e}from"ts-pattern";import{createSelector as t}from"@salsita-ai/common/utils";import{AuthenticatedClient as r,AuthorizedClient as s,LocalStorageAuthenticatedClientPhoenixApiClient as i,LocalStorageAuthorizedPhoenixApiClient as o,LocalStorageUnauthenticatedPhoenixApiClient as n,MemoryAuthenticatedClientPhoenixApiClient as c,MemoryAuthorizedPhoenixApiClient as l,UnauthenticatedClient as g}from"#package/client";import{createQueryClient as m}from"./initialize.js";import{ResourceUrlService as u}from"./resource-url-service.js";import{createWebMcpHost as a}from"./webmcp/index.js";let p=t=>{let{persistenceConfig:r,requestAccessToken:i,modelVersion:n,requestSessionToken:c}=t;return e(r).with({type:"server"},e=>new s(e.serverUrl,i,c)).with({type:"local-storage"},()=>new o(n)).with({type:"memory"},()=>new l(n)).exhaustive()},C=t=>{let{persistenceConfig:s,modelVersion:o,requestSessionToken:n}=t;return e(s).with({type:"server"},e=>new r(e.serverUrl,n)).with({type:"local-storage"},()=>new i(o)).with({type:"memory"},()=>new c(o)).exhaustive()};export const createCommonServicesSelectors=r=>{let{getState:s,environmentSelectors:i,specSelectors:o,accessSelectors:c,domainServicesSelectors:l,webComponentOptions:d,webComponentApi:w,getSessionService:A,routingSelectors:f}=r,h=m(l.getLogger()),y=a(),v=t.withTypes(),k=v([],()=>A().requestSessionToken),S=v([],()=>A().requestAdminSessionToken),T=v([o.selectBaseResourcesUrl,i.selectDeploymentId,o.selectDeploymentQueryDisabled],(e,t,r)=>new u({baseResourcesUrl:e,deploymentId:t,deploymentQueryDisabled:r})),q=v([c.selectConfiguratorAccessService,i.selectPersistenceConfig,o.selectConfiguratorModelVersion,k],(e,t,r,s)=>{let{configurationId:i,accessInfo:o}=e;return p({persistenceConfig:t,requestAccessToken:()=>f.getRoutingService().requestAccessToken(i,o.raw),modelVersion:r,requestSessionToken:s})}),M=v([c.selectAdminAccessService,i.selectPersistenceConfig,o.selectAdminModelVersion,S],(e,t,r,s)=>p({persistenceConfig:t,requestAccessToken:()=>e.accessInfo.raw,modelVersion:r,requestSessionToken:s})),P=v([i.selectPersistenceConfig,o.selectConfiguratorModelVersion,k],(e,t,r)=>C({persistenceConfig:e,modelVersion:t,requestSessionToken:r})),U=v([i.selectPersistenceConfig,o.selectAdminModelVersion,S],(e,t,r)=>C({persistenceConfig:e,modelVersion:t,requestSessionToken:r})),V=v([i.selectPersistenceConfig,o.selectConfiguratorModelVersion,k],(e,t,r)=>s=>p({persistenceConfig:e,requestAccessToken:()=>s,modelVersion:t,requestSessionToken:r})),b=v([i.selectPersistenceConfig,o.selectAdminModelVersion,S],(e,t,r)=>s=>p({persistenceConfig:e,requestAccessToken:()=>s,modelVersion:t,requestSessionToken:r})),x=v([i.selectPersistenceConfig,i.selectDeploymentId],(t,r)=>e(t).with({type:"server"},e=>new g(e.serverUrl,l.getLogger())).with({type:"local-storage"},()=>new n(r)).with({type:"memory"},()=>new n(r)).exhaustive());return{getQueryClient:()=>h,getWebComponentOptions:()=>d,getWebComponentApi:()=>w,getWebMcpHost:()=>y,getSessionService:A,selectRequestSessionToken:k,selectRequestAdminSessionToken:S,selectResourceUrlService:T,selectConfiguratorAuthorizedClient:q,selectAdminAuthorizedClient:M,selectConfiguratorAuthenticatedClient:P,selectAdminAuthenticatedClient:U,selectCreateConfiguratorAuthorizedClient:V,selectCreateAdminAuthorizedClient:b,selectUnauthenticatedClient:x,getResourceUrlService:()=>T(s()),getConfiguratorAuthorizedClient:()=>q(s()),getAdminAuthorizedClient:()=>M(s()),getConfiguratorAuthenticatedClient:()=>P(s()),getAdminAuthenticatedClient:()=>U(s()),getCreateConfiguratorAuthorizedClient:()=>V(s()),getCreateAdminAuthorizedClient:()=>b(s()),getUnauthenticatedClient:()=>x(s())}};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { type WebMcpHost, type WebMcpLoad, createWebMcpHost } from './webmcp-host.js';
|
|
2
|
+
export { type WebMcpModelContext, type WebMcpTool, type WebMcpToolAnnotations } from './webmcp-model-context.js';
|
|
3
|
+
export { type WebMcpContent, type WebMcpToolResult } from './webmcp-tool-result.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{createWebMcpHost}from"./webmcp-host.js";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type Observable } from 'rxjs';
|
|
2
|
+
import { type WebMcpModelContext } from './webmcp-model-context.js';
|
|
3
|
+
/**
|
|
4
|
+
* @internal SDK plumbing for the configurator's WebMCP tools; not part of a project's API.
|
|
5
|
+
*
|
|
6
|
+
* How one configuration load settled its WebMCP tools: `tools` is `true` once `configurator_guide`
|
|
7
|
+
* and the other tools of that configuration are registered, and `false` when the load registers
|
|
8
|
+
* none, because the browser has no WebMCP, the session's assistant or its WebMCP is off, or the
|
|
9
|
+
* browser refused a tool.
|
|
10
|
+
*/
|
|
11
|
+
export interface WebMcpLoad {
|
|
12
|
+
readonly configurationId: string;
|
|
13
|
+
readonly tools: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal SDK plumbing for the configurator's WebMCP tools; not part of a project's API.
|
|
17
|
+
*
|
|
18
|
+
* The configurator's side of WebMCP for the whole application, alive on the preset screen and inside
|
|
19
|
+
* a configuration alike: the browser's model context, and the loads that settled their tools, so a
|
|
20
|
+
* tool that opens a configuration can wait until that configuration offers its own tools.
|
|
21
|
+
*/
|
|
22
|
+
export interface WebMcpHost {
|
|
23
|
+
/** The browser's WebMCP entry point when it is read, or `null` where there is none. */
|
|
24
|
+
readonly modelContext: WebMcpModelContext | null;
|
|
25
|
+
/** The latest settled load first, then each one as it settles. */
|
|
26
|
+
readonly loads$: Observable<WebMcpLoad>;
|
|
27
|
+
readonly settleLoad: (load: WebMcpLoad) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @internal SDK plumbing for the configurator's WebMCP tools; not part of a project's API.
|
|
31
|
+
*
|
|
32
|
+
* Creates the application's {@link WebMcpHost}. The model context is looked up on every read rather
|
|
33
|
+
* than once, so one the browser or a test provides later is still found.
|
|
34
|
+
*/
|
|
35
|
+
export declare const createWebMcpHost: () => WebMcpHost;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ReplaySubject as e}from"rxjs";import{findWebMcpModelContext as t}from"./webmcp-model-context.js";export const createWebMcpHost=()=>{let o=new e(1);return{get modelContext(){return t()},loads$:o.asObservable(),settleLoad:e=>{o.next(e)}}};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { WebMcpToolResult } from './webmcp-tool-result.js';
|
|
2
|
+
/**
|
|
3
|
+
* @internal SDK plumbing for the configurator's WebMCP tools; not part of a project's API.
|
|
4
|
+
*
|
|
5
|
+
* Hints a WebMCP tool gives the agent about what calling it does. `readOnlyHint` says it changes
|
|
6
|
+
* nothing, so an agent may call it without asking the user.
|
|
7
|
+
*/
|
|
8
|
+
export interface WebMcpToolAnnotations {
|
|
9
|
+
readonly readOnlyHint?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @internal SDK plumbing for the configurator's WebMCP tools; not part of a project's API.
|
|
13
|
+
*
|
|
14
|
+
* One tool as WebMCP's `registerTool` takes it (Draft Community Group Report, 2026-10-20): the agent
|
|
15
|
+
* reads the name, description and input schema, and the browser calls `execute` with the agent's
|
|
16
|
+
* input. Its result is serialized as JSON.
|
|
17
|
+
*/
|
|
18
|
+
export interface WebMcpTool {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly title?: string;
|
|
21
|
+
readonly description: string;
|
|
22
|
+
readonly inputSchema?: object;
|
|
23
|
+
readonly execute: (input: unknown) => Promise<WebMcpToolResult>;
|
|
24
|
+
readonly annotations?: WebMcpToolAnnotations;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @internal SDK plumbing for the configurator's WebMCP tools; not part of a project's API.
|
|
28
|
+
*
|
|
29
|
+
* The part of the browser's `document.modelContext` the configurator uses: registering a tool for
|
|
30
|
+
* the agents in the visitor's browser until `signal` aborts. A second tool of the same name rejects
|
|
31
|
+
* with an `InvalidStateError`.
|
|
32
|
+
*/
|
|
33
|
+
export interface WebMcpModelContext {
|
|
34
|
+
readonly registerTool: (tool: WebMcpTool, options: {
|
|
35
|
+
readonly signal: AbortSignal;
|
|
36
|
+
}) => unknown;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The browser's WebMCP entry point, or `null` where there is none: outside a browser, in a browser
|
|
40
|
+
* without WebMCP, or on an origin that does not enable its origin trial. Chrome 150 moved it from
|
|
41
|
+
* `navigator.modelContext`, still read as a fallback, to `document.modelContext`. Detection only: the
|
|
42
|
+
* API is still an origin trial, so nothing is polyfilled.
|
|
43
|
+
*/
|
|
44
|
+
export declare const findWebMcpModelContext: () => WebMcpModelContext | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let o=o=>{let t;return void 0!==o&&"modelContext"in o?"object"==typeof(t=o.modelContext)&&null!==t&&"registerTool"in t&&"function"==typeof t.registerTool?o.modelContext:null:null};export const findWebMcpModelContext=()=>o("u"<typeof document?void 0:document)??o("u"<typeof navigator?void 0:navigator);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal SDK plumbing for the configurator's WebMCP tools; not part of a project's API.
|
|
3
|
+
*
|
|
4
|
+
* One part of a WebMCP tool result, in the content shape of an MCP `CallToolResult`.
|
|
5
|
+
*/
|
|
6
|
+
export type WebMcpContent = {
|
|
7
|
+
readonly type: 'text';
|
|
8
|
+
readonly text: string;
|
|
9
|
+
} | {
|
|
10
|
+
readonly type: 'image';
|
|
11
|
+
readonly data: string;
|
|
12
|
+
readonly mimeType: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @internal SDK plumbing for the configurator's WebMCP tools; not part of a project's API.
|
|
16
|
+
*
|
|
17
|
+
* A WebMCP tool result: the content an agent reads, as MCP tool results carry it. `isError` marks a
|
|
18
|
+
* call the tool refused or could not complete, with the reason as text, so the agent reads it as a
|
|
19
|
+
* failure rather than as data.
|
|
20
|
+
*/
|
|
21
|
+
export interface WebMcpToolResult {
|
|
22
|
+
readonly content: readonly WebMcpContent[];
|
|
23
|
+
readonly isError?: true;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -12,5 +12,11 @@ export type MergedApplicationRuntimeExtensionSystems<EXTENSIONS extends readonly
|
|
|
12
12
|
] extends [never] ? object : UnionToIntersection<ExtensionSystems<EXTENSIONS[number]>>) & object;
|
|
13
13
|
export type ApplicationRuntimeSystems<SYSTEMS extends object> = DomainApplicationSystems & SYSTEMS;
|
|
14
14
|
export declare const createApplicationRuntimeExtension: <SYSTEMS extends { readonly [KEY in keyof SYSTEMS]: InitializableSystem; }>(systems: SYSTEMS) => ApplicationRuntimeExtension<SYSTEMS>;
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Merges the built-in domain-application systems with the extensions' systems, in declaration
|
|
17
|
+
* order. Every name must be unique and must not replace a system of the slot's domain context
|
|
18
|
+
* (`domainSystems`): actions see both graphs side by side, so a clash is reported here, once, when
|
|
19
|
+
* the runtime resolves its systems, instead of at the first action call.
|
|
20
|
+
*/
|
|
21
|
+
export declare const mergeApplicationRuntimeSystems: <EXTENSIONS extends readonly AnyApplicationRuntimeExtension[]>(domainApplicationSystems: DomainApplicationSystems, extensions: EXTENSIONS, domainSystems: object) => ApplicationRuntimeSystems<MergedApplicationRuntimeExtensionSystems<EXTENSIONS>>;
|
|
16
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const createApplicationRuntimeExtension=e=>({systems:e});let e=e=>Object.entries(e.systems),t=(e,t)=>{if(!("object"==typeof t&&null!==t&&"initialize"in t&&"function"==typeof t.initialize))throw Error(`Cannot create application runtime: extension system "${e}" does not implement initialize(). Add an initialize method, using a no-op when the system has no initialization work.`);return t};export const mergeApplicationRuntimeSystems=(i,n)=>{let
|
|
1
|
+
export const createApplicationRuntimeExtension=e=>({systems:e});let e=e=>Object.entries(e.systems),t=(e,t)=>{if(!("object"==typeof t&&null!==t&&"initialize"in t&&"function"==typeof t.initialize))throw Error(`Cannot create application runtime: extension system "${e}" does not implement initialize(). Add an initialize method, using a no-op when the system has no initialization work.`);return t};export const mergeApplicationRuntimeSystems=(i,n,o)=>{let a={...i};for(let i of n)for(let[n,o]of e(i)){if(Object.hasOwn(a,n))throw Error(`Cannot create application runtime: extension system name conflicts with an existing application system: ${n}. Rename every extension system so all names in the merged application system graph are unique.`);a[n]=t(n,o)}for(let e of Object.keys(a))if(Object.hasOwn(o,e))throw Error(`Cannot create application runtime: application system "${e}" conflicts with a domain system. Rename the extension system so it does not replace a domain capability.`);return a};
|
|
@@ -7,7 +7,7 @@ import type { ConfigurationPersistSystem } from './configuration-persist-system.
|
|
|
7
7
|
* the generated configurator/admin interfaces narrow them back on read, the same split the domain
|
|
8
8
|
* layer uses between `AnyDomainContextSystems` and `DomainContextSystems`.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type DomainApplicationSystems = {
|
|
11
11
|
readonly configurationPersistSystem: ConfigurationPersistSystem;
|
|
12
12
|
readonly chatSystem: ChatSystem;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DomainContextSelectors, DomainServicesSelectors
|
|
1
|
+
import type { DomainContextSelectors, DomainServicesSelectors } from '#package/domain';
|
|
2
2
|
import type { CommonServicesSelectors } from '../common-services/index.js';
|
|
3
3
|
import { type AnyApplicationRuntimeExtension, type ApplicationRuntimeSystems, type MergedApplicationRuntimeExtensionSystems } from './application-runtime-extension.js';
|
|
4
4
|
import { ChatSystem } from './chat-system.js';
|
|
@@ -23,8 +23,6 @@ export declare const createDomainApplicationContextSelectors: <EXTENSIONS extend
|
|
|
23
23
|
getChatSystem: () => ChatSystem;
|
|
24
24
|
getConfigurationPersistSystem: () => ConfigurationPersistSystem;
|
|
25
25
|
getSystems: () => ApplicationRuntimeSystems<MergedApplicationRuntimeExtensionSystems<EXTENSIONS>>;
|
|
26
|
-
/** Contributed to the slot's domain context in the same order exposed by `getSystems`. */
|
|
27
|
-
getInitializableSystems: () => readonly InitializableSystem[];
|
|
28
26
|
};
|
|
29
27
|
export type DomainApplicationContextSelectors<EXTENSIONS extends readonly AnyApplicationRuntimeExtension[] = readonly []> = ReturnType<typeof createDomainApplicationContextSelectors<EXTENSIONS>>;
|
|
30
28
|
export {};
|