@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,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
applicationVersion: 1.0.0
|
|
1
|
+
let e=`applicationVersion: 1.0.0
|
|
3
2
|
pageTitle: Phoenix Configurator
|
|
4
|
-
`,
|
|
3
|
+
`,t=`model:
|
|
5
4
|
latest:
|
|
6
5
|
entityTypes:
|
|
7
6
|
- Box
|
|
@@ -136,4 +135,4 @@ components:
|
|
|
136
135
|
|
|
137
136
|
selectable:
|
|
138
137
|
main: {}
|
|
139
|
-
`;export const starterSpecFiles=[{path:"spec/application.yaml",content:
|
|
138
|
+
`;export const starterSpecFiles=[{path:"spec/application.yaml",content:e},{path:"spec/configurator.yaml",content:t}];
|
|
@@ -20,8 +20,8 @@ export interface InitCommandProps {
|
|
|
20
20
|
* and `fix` scripts. An entry the project already has stays as it is. It writes no package-manager settings or
|
|
21
21
|
* `packageManager` field: the project installs with any package manager, and its maintainer owns those settings.
|
|
22
22
|
* The next steps it prints name the package manager that ran it. It touches no server and asks nothing: the starter
|
|
23
|
-
* spec names
|
|
24
|
-
* by sync or the build.
|
|
23
|
+
* spec names no server project, so the first dev or deploy chooses one from the projects the sign-in can reach, and
|
|
24
|
+
* everything else is generated by sync or the build.
|
|
25
25
|
*
|
|
26
26
|
* Refuses when a `spec/` folder exists, and when an existing `package.json` does not depend on the SDK.
|
|
27
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as e}from"fs";import{mkdir as t,readFile as i,writeFile as n}from"fs/promises";import{basename as o,dirname as r,join as a}from"path";import{findPackageManagerCommands as s}from"../utils/index.js";import{addMissingDependencies as p,addMissingSdkPeers as c}from"./deps/index.js";import{starterSpecFiles as d}from"./init-starter-spec.js";let l="@salsita-ai/sdk",h={dev:"phoenix dev",build:"phoenix build",deploy:"phoenix deploy",check:"phoenix check",fix:"phoenix fix"},f=(e,t)=>void 0===e?`\`phoenix ${t}\` through your package manager`:`\`${e.phoenix(t)}\``,u=async(e,t)=>{let n=void 0===t?`add ${l} with your package manager`:`\`${t.add(l)}\``,o=`Install the SDK first (${n}), then rerun ${f(t,"init")}.`,r=JSON.parse(await i(e,"utf-8"));if("object"!=typeof r||null===r||Array.isArray(r))throw Error(`phoenix init could not read package.json because it is not a JSON object. ${o}`);if(!["dependencies","devDependencies"].some(e=>{let t=Reflect.get(r,e);return"object"==typeof t&&null!==t&&l in t}))throw Error(`phoenix init found no ${l} dependency in package.json. ${o}`);return{...r}},m=async e=>{for(let i of d){let o=a(e,i.path);await t(r(o),{recursive:!0}),await n(o,i.content)}},x=async(e,t,i)=>{let o=t.phoenix,r=t.scripts,a="object"==typeof r&&null!==r?r:{},s=Object.fromEntries(Object.entries(h).filter(([e])=>!(e in a))),d=p(c({...t,scripts:{...a,...s}},{useClerk:!1}),Object.entries(i).map(([e,t])=>({name:e,version:t,field:"devDependencies"})));await n(e,JSON.stringify({...d,phoenix:{..."object"==typeof o&&null!==o?o:{},applicationFlow:!0}},null,2)+"\n")};export const runInitCommand=async(i,{logger:n})=>{var r,p;let c,d,h=i.projectRoot??process.cwd(),g=a(h,"package.json"),j=s(process.env.npm_config_user_agent);if(e(a(h,"spec")))throw Error(`phoenix init found an existing spec/ folder. init only starts new projects, and writing a starter spec would overwrite or mix with the existing one. To update an existing project, run ${f(j,"sync")}; to start over, run init in an empty project folder.`);let y=e(g)?await u(g,j):(r=h,p=i.sdkVersion,{name:(c=o(r).toLowerCase().replace(/[^a-z0-9._-]+/g,"-").replace(/^[._-]+|[-]+$/g,"")).length>0?c:"phoenix-configurator",private:!0,type:"module",scripts:{},dependencies:{[l]:p}});n.step(`Writing the starter project to ${h}`),await t(h,{recursive:!0}),await m(h),await x(g,y,i.editorToolVersions),n.success(`Phoenix project created in ${h}.`),n.info(["",...(d=["sync","login
|
|
1
|
+
import{existsSync as e}from"fs";import{mkdir as t,readFile as i,writeFile as n}from"fs/promises";import{basename as o,dirname as r,join as a}from"path";import{findPackageManagerCommands as s}from"../utils/index.js";import{addMissingDependencies as p,addMissingSdkPeers as c}from"./deps/index.js";import{starterSpecFiles as d}from"./init-starter-spec.js";let l="@salsita-ai/sdk",h={dev:"phoenix dev",build:"phoenix build",deploy:"phoenix deploy",check:"phoenix check",fix:"phoenix fix"},f=(e,t)=>void 0===e?`\`phoenix ${t}\` through your package manager`:`\`${e.phoenix(t)}\``,u=async(e,t)=>{let n=void 0===t?`add ${l} with your package manager`:`\`${t.add(l)}\``,o=`Install the SDK first (${n}), then rerun ${f(t,"init")}.`,r=JSON.parse(await i(e,"utf-8"));if("object"!=typeof r||null===r||Array.isArray(r))throw Error(`phoenix init could not read package.json because it is not a JSON object. ${o}`);if(!["dependencies","devDependencies"].some(e=>{let t=Reflect.get(r,e);return"object"==typeof t&&null!==t&&l in t}))throw Error(`phoenix init found no ${l} dependency in package.json. ${o}`);return{...r}},m=async e=>{for(let i of d){let o=a(e,i.path);await t(r(o),{recursive:!0}),await n(o,i.content)}},x=async(e,t,i)=>{let o=t.phoenix,r=t.scripts,a="object"==typeof r&&null!==r?r:{},s=Object.fromEntries(Object.entries(h).filter(([e])=>!(e in a))),d=p(c({...t,scripts:{...a,...s}},{useClerk:!1}),Object.entries(i).map(([e,t])=>({name:e,version:t,field:"devDependencies"})));await n(e,JSON.stringify({...d,phoenix:{..."object"==typeof o&&null!==o?o:{},applicationFlow:!0}},null,2)+"\n")};export const runInitCommand=async(i,{logger:n})=>{var r,p;let c,d,h=i.projectRoot??process.cwd(),g=a(h,"package.json"),j=s(process.env.npm_config_user_agent);if(e(a(h,"spec")))throw Error(`phoenix init found an existing spec/ folder. init only starts new projects, and writing a starter spec would overwrite or mix with the existing one. To update an existing project, run ${f(j,"sync")}; to start over, run init in an empty project folder.`);let y=e(g)?await u(g,j):(r=h,p=i.sdkVersion,{name:(c=o(r).toLowerCase().replace(/[^a-z0-9._-]+/g,"-").replace(/^[._-]+|[-]+$/g,"")).length>0?c:"phoenix-configurator",private:!0,type:"module",scripts:{},dependencies:{[l]:p}});n.step(`Writing the starter project to ${h}`),await t(h,{recursive:!0}),await m(h),await x(g,y,i.editorToolVersions),n.success(`Phoenix project created in ${h}.`),n.info(["",...(d=["sync","login","dev","deploy"],void 0===j?["Next steps, in the project folder, through your package manager:"," install the dependencies",...d.map(e=>` phoenix ${e}`)]:["Next steps, in the project folder:",` ${j.install}`,...d.map(e=>` ${j.phoenix(e)}`)]),"","Developing against a Studio development environment instead? Paste its .env block into .env before phoenix dev."].join("\n"))};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CommandContext } from './types.js';
|
|
2
2
|
export interface LoginCommandProps {
|
|
3
|
-
readonly customer: string;
|
|
3
|
+
readonly customer: string | undefined;
|
|
4
4
|
readonly serverUrl: string;
|
|
5
5
|
readonly studioUrl: string;
|
|
6
6
|
readonly open: boolean;
|
|
@@ -24,7 +24,7 @@ interface LoginCallbackListener {
|
|
|
24
24
|
interface LoginCallbackListenerProps {
|
|
25
25
|
readonly state: string;
|
|
26
26
|
readonly studioUrl: string;
|
|
27
|
-
readonly customer: string;
|
|
27
|
+
readonly customer: string | undefined;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Receives Studio's answer on 127.0.0.1: the one-time code of an approval, or a denial. Only a callback carrying
|
|
@@ -33,12 +33,15 @@ interface LoginCallbackListenerProps {
|
|
|
33
33
|
*/
|
|
34
34
|
export declare const startLoginCallbackListener: (props: LoginCallbackListenerProps) => Promise<LoginCallbackListener>;
|
|
35
35
|
/**
|
|
36
|
-
* Signs the CLI in to
|
|
36
|
+
* Signs the CLI in to the user's Phoenix account, or to one SDK-builder workspace when one is named: the user names the token and approves in Studio, Studio returns a
|
|
37
37
|
* one-time code to this CLI's loopback listener, and the CLI exchanges it with its PKCE verifier for an API token.
|
|
38
38
|
* The browser waits on the callback meanwhile and ends on Studio's page for the outcome.
|
|
39
39
|
*/
|
|
40
40
|
export declare const runLoginCommand: (props: LoginCommandProps, { logger }: CommandContext) => Promise<{
|
|
41
41
|
userId: string;
|
|
42
42
|
workspaceId: string;
|
|
43
|
+
} | {
|
|
44
|
+
userId: string;
|
|
45
|
+
workspaceId: null;
|
|
43
46
|
} | undefined>;
|
|
44
47
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{spawn as e}from"node:child_process";import{createHash as
|
|
1
|
+
import{spawn as e}from"node:child_process";import{createHash as r,randomBytes as t}from"node:crypto";import{createServer as o}from"node:http";import{hostname as n}from"node:os";import{z as s}from"zod";import{createCliApiClient as i}from"#package/client";import{getServerCredentials as a,saveServerCredentials as l}from"../services/index.js";let c=s.string().uuid(),d={"&":"&","<":"<",">":">",'"':""","'":"'"},u=(e,r)=>`<!doctype html><html><head><meta charset="utf-8"><title>${e}</title></head><body style="font-family:system-ui,sans-serif;display:grid;place-items:center;height:100vh;margin:0"><main style="text-align:center"><h1>${e}</h1><p>${r.replace(/[&<>"']/g,e=>d[e]??e)}</p></main></body></html>`,h=(e,r,t,o)=>new Promise(n=>{e.destroyed?n():(e.once("close",n),e.writeHead(r,{...t,connection:"close"}).end(o))});export const startLoginCallbackListener=async e=>{let{state:r,studioUrl:t,customer:n}=e,s=(e,r)=>{let o=new URL(e,t);return n&&o.searchParams.set("customer",n),r&&o.searchParams.set("name",r),o.toString()},i=null,a=!1,l=new Promise((e,r)=>{i={resolve:e,reject:r}}),c=o((e,t)=>{let o=new URL(e.url??"/","http://127.0.0.1"),n=o.searchParams.get("code"),l="access_denied"===o.searchParams.get("error");if("/callback"!==o.pathname)return void t.writeHead(404).end();if(o.searchParams.get("state")!==r||a||!n&&!l){h(t,400,{"content-type":"text/html"},u("Sign-in failed","This response does not belong to the waiting CLI. Run phoenix login again.")),a||i?.reject(Error("The sign-in response did not match this CLI session. Run `phoenix login` again."));return}if(a=!0,l||!n)return void h(t,302,{location:s("/builder/cli-login/denied",null)}).then(()=>{i?.reject(Error("The sign-in was denied in Studio. Run `phoenix login` again to sign in."))});let c=o.searchParams.get("name");i?.resolve({code:n,tokenName:c,finish:e=>e.signedIn?h(t,302,{location:s("/builder/cli-login/done",c)}):h(t,200,{"content-type":"text/html"},u("Sign-in failed",e.message))})}),d=await new Promise((e,r)=>{c.once("error",r),c.listen(0,"127.0.0.1",()=>{let t=c.address();null===t||"string"==typeof t?r(Error("The login callback listener did not get a port. Run `phoenix login` again.")):e(t.port)})}),g=setTimeout(()=>{i?.reject(Error("Nobody approved the sign-in within 5 minutes. Run `phoenix login` again."))},3e5);return{port:d,callback:l,close:()=>{clearTimeout(g),c.close()}}};let g=async(e,r)=>{try{let{error:t,response:o}=await i(e).DELETE("/auth/token",{headers:{authorization:`Bearer ${r}`,"content-type":null}});return t&&401!==o.status?t.message:null}catch(e){return e instanceof Error?e.message:String(e)}},m=async(e,r)=>{let{data:t,error:o}=await i(e.serverUrl).POST("/auth/token",{body:r});if(o||!t)throw Error(`The server did not accept the sign-in: ${o?.message??"no response"}`);let n=t.customer?.slug??void 0;if(n!==e.customer){var s;throw await g(e.serverUrl,t.token),Error((s=e.customer,void 0===s?`The sign-in was approved for workspace "${n}" only, but \`phoenix login\` signs in to your whole Phoenix account. Check --region or --studioUrl and run \`phoenix login\` again.`:void 0===n?`The sign-in was approved for your whole Phoenix account, not for workspace "${s}". Check --region or --studioUrl and run \`phoenix login ${s}\` again.`:`The sign-in was approved in workspace "${n}", not "${s}". Check --region or --studioUrl and run \`phoenix login ${s}\` again.`))}let d=await a(e.serverUrl),u=c.safeParse(t.customer?.id),h=await l(e.serverUrl,{token:t.token,userId:t.userId,...u.success?{customerId:u.data}:{},...t.customer?{customerSlug:t.customer.slug,customerName:t.customer.name}:{},studioUrl:e.studioUrl,createdAt:new Date().toISOString()}),m=d?await g(e.serverUrl,d.token):null;return{customerName:t.customer?.name??"your Phoenix account",path:h,revokeError:m,replaced:d,telemetryAssociation:u.success?{userId:t.userId,workspaceId:u.data}:null===t.customer?{userId:t.userId,workspaceId:null}:void 0}};export const runLoginCommand=async(o,{logger:s})=>{let{data:a,error:l}=await i(o.serverUrl).GET("/auth/config");if(l||!a?.studioOrigin||!((e,{studioUrl:r,customer:t})=>{let o=new URL(e),n=new URL(r);return t?o.protocol===n.protocol&&o.port===n.port&&(n.hostname===o.hostname||n.hostname.endsWith(`.${o.hostname}`)):o.origin===n.origin})(a.studioOrigin,o))throw Error(`The server ${o.serverUrl} and the Studio ${o.studioUrl} do not share a sign-in region, so a sign-in approved there would not work here. Check --region, --serverUrl and --studioUrl, then run phoenix login again.`);let c=t(32).toString("base64url"),d=r("sha256").update(c).digest("base64url"),u=t(16).toString("base64url"),h=n(),g=`phoenix CLI on ${h}`,p=await startLoginCallbackListener({state:u,studioUrl:o.studioUrl,customer:o.customer});try{let r=new URL("/builder/cli-login",o.studioUrl);o.customer&&r.searchParams.set("customer",o.customer),r.searchParams.set("port",String(p.port)),r.searchParams.set("state",u),r.searchParams.set("challenge",d),r.searchParams.set("name",g),r.searchParams.set("host",h),r.searchParams.set("started",String(Date.now())),s.step(`Signing in to ${o.customer?`workspace "${o.customer}"`:"your Phoenix account"} on ${o.serverUrl}`),s.info(`Approve the CLI in your browser:
|
|
2
2
|
|
|
3
|
-
${
|
|
4
|
-
`),o.open&&(
|
|
3
|
+
${r.toString()}
|
|
4
|
+
`),o.open&&(r=>{let[t,o]="darwin"===process.platform?["open",[r]]:"win32"===process.platform?["rundll32",["url.dll,FileProtocolHandler",r]]:["xdg-open",[r]];e(t,o,{stdio:"ignore",detached:!0}).on("error",()=>void 0).unref()})(r.toString());let t=await p.callback;try{let e=await m(o,{code:t.code,codeVerifier:c,port:p.port,name:g});if(e.revokeError){let r=new URL("/builder/tokens",e.replaced?.studioUrl??o.studioUrl);e.replaced?.customerSlug&&r.searchParams.set("customer",e.replaced.customerSlug),s.warn(`The server did not revoke the token this sign-in replaces (${e.revokeError}). It stays valid on the server. Revoke it on the Tokens page of Studio: ${r.toString()}`)}return await t.finish({signedIn:!0}),s.success(`Signed in to ${e.customerName}. The token is stored in ${e.path}; revoke it with phoenix logout.`),e.telemetryAssociation}catch(e){throw await t.finish({signedIn:!1,message:e instanceof Error?e.message:String(e)}),e}}finally{p.close()}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createCliApiClient as e}from"#package/client";import{describeSavedLogins as t,getServerCredentials as r,removeServerCredentials as o}from"../services/index.js";let n=async(t,r)=>{try{let{error:o,response:n}=await e(t).DELETE("/auth/token",{headers:{authorization:`Bearer ${r}`,"content-type":null}});return o&&401!==n.status?o.message:null}catch(e){return e instanceof Error?e.message:String(e)}};export const runLogoutCommand=async(e,{logger:s})=>{let a=await r(e.serverUrl);if(!a){let r=await t();s.info(`Not signed in to ${e.serverUrl}.${r?` ${r}`:""}`);return}void 0!==process.env.PHOENIX_API_TOKEN&&s.info(`phoenix logout ignores PHOENIX_API_TOKEN: it signs out the saved login on ${e.serverUrl} and leaves that token valid.`);let i=await n(e.serverUrl,a.token);if(await o(e.serverUrl),i){let e=a.studioUrl?new URL("/builder/tokens",a.studioUrl):null;e&&a.customerSlug&&e.searchParams.set("customer",a.customerSlug),s.warn(`Signed out locally, but the server did not revoke the token (${i}). It is removed from this computer but stays valid on the server. Revoke it on the Tokens page of Studio${e?`: ${e.toString()}`:"."}`);return}s.success(`Signed out of ${a.customerName??"your Phoenix account"} on ${e.serverUrl}.`)};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{writeFile as e}from"fs/promises";import{
|
|
2
|
-
${e}`),l.info(`Assistant prompt of this deployment (generated prompt, schema and instructions): ${r} characters`)}l.info("Preparing deployment on server...");let{data:w,error:S}=await b.POST("/environments/prepare",{body:{projectSlug:p,environmentSlug:d,applicationVersion:y.applicationVersion,projectRef:c,projectSha:m,publishedDataHash:y.publishedDataHash,useAuthHook:y.useAuthHook,overrideSchema:f,configurationSchema:{version:y.schemaVersion,schema:y.schema},adminConfigurationSchema:y.adminSchema?{schema:y.adminSchema,version:y.adminSchemaVersion}:void 0,chat:y.chat,embeddings:y.embeddings,...y.assistant?{assistant:!0}:{},acl:{canCreate:y.aclCanCreate},privateFiles:[...y.assets.privateFilePaths],publicFiles:[...y.assets.publicFilePaths]},headers:{"x-api-key":r,"x-project-key":
|
|
1
|
+
import{writeFile as e}from"fs/promises";import{createCliApiClient as t}from"#package/client";import{resolveApplicationSpecDeploymentData as a}from"../application-spec/index.js";import{exitCli as r}from"../services/index.js";import{formatEnvContent as i,formatEnvLine as s}from"../utils/index.js";export const runPrepareDeploymentCommand=async(o,n)=>{let{logger:l}=n;try{l.step("Preparing deployment");let{apiKey:r,projectKey:n,projectSlug:p,projectRef:c,projectSha:m,environmentSlug:d,outFile:h,skipUpload:u,overrideSchema:f,uploadLinksFile:g,serverUrl:v}=o;l.info(`Preparing deployment for project "${p}", environment "${d}"`);let b=t(v);l.debug(`Using server URL: ${v}`);let y=await a({skipUpload:u,logger:l});if(y.assistantSetup){let{sdl:e,prompt:t,instructions:a}=y.assistantSetup,r=t.length+e.length+(a?.length??0);l.info(`Assistant GraphQL schema:
|
|
2
|
+
${e}`),l.info(`Assistant prompt of this deployment (generated prompt, schema and instructions): ${r} characters`)}l.info("Preparing deployment on server...");let{data:w,error:S}=await b.POST("/environments/prepare",{body:{projectSlug:p,environmentSlug:d,applicationVersion:y.applicationVersion,projectRef:c,projectSha:m,publishedDataHash:y.publishedDataHash,useAuthHook:y.useAuthHook,useCognito:y.useCognito,overrideSchema:f,configurationSchema:{version:y.schemaVersion,schema:y.schema},adminConfigurationSchema:y.adminSchema?{schema:y.adminSchema,version:y.adminSchemaVersion}:void 0,chat:y.chat,embeddings:y.embeddings,...y.assistant?{assistant:!0}:{},acl:{canCreate:y.aclCanCreate},privateFiles:[...y.assets.privateFilePaths],publicFiles:[...y.assets.publicFilePaths]},headers:{"x-api-key":r,"x-project-key":n,"x-project-slug":p}});if(S)throw Error(`Failed to prepare deployment with server: ${S.message}`);if(!w)throw Error("No data returned from server");l.debug("Deployment prepared on server");let{baseDomain:F,isCustomDomain:P}=w,U=w.environmentVariables,k=w.privateUploadUrls,$=w.publicUploadUrls;if(!U||!k||!$)throw Error("Incomplete data returned from server");try{let t=[i(U),s("BASE_DOMAIN",String(F)),s("IS_CUSTOM_DOMAIN",String(P))].join("\n");await e(h,t+"\n"),l.debug(`Environment variables written to ${h}`)}catch(e){throw Error("Failed to write environment variables to file")}try{if(u)await e(g,JSON.stringify({privateFiles:[],publicFiles:[]},null,2)),l.debug("Upload links file cleared (upload was skipped)");else{let t={privateFiles:[...y.assets.privateFilesFullPaths].map(e=>({localPath:e,uploadUrl:k[e.replace(/^assets\/private\//,"")]})),publicFiles:[...y.assets.publicFilesFullPaths].map(e=>({localPath:e,uploadUrl:$[e.replace(/^assets\/public\//,"")]}))};await e(g,JSON.stringify(t,null,2)),l.debug(`Upload links written to ${g}`),l.info('Run "finish" command to upload files and activate the deployment')}}catch(e){throw Error("Failed to write upload links to file")}l.success("Deployment prepared successfully!")}catch(e){l.error(`Deployment preparation failed: ${e instanceof Error?e.message:String(e)}`,e),await r(1)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{writeFile as e}from"fs/promises";import{
|
|
1
|
+
import{writeFile as e}from"fs/promises";import{createCliApiClient as r}from"#package/client";import{resolveApplicationSpecDeploymentData as t}from"../application-spec/index.js";import{formatEnvContent as i,uploadFilesWithPresignedUrls as a}from"../utils/index.js";export const prepareLocalEnvironment=async(o,s)=>{let{logger:n}=s;n.step("Preparing local environment");let{projectKey:l,projectSlug:p,outFile:c,skipUpload:d,overrideSchema:m,serverUrl:h,lambdaUrl:f,environmentSlug:v,apiKey:u}=o;n.info(`Preparing local environment for project "${p}", environment "${v}"`);let g=r(h);n.debug(`Using server URL: ${h}`);let y=await t({skipUpload:d,logger:n});n.info("Preparing a local environment and deployment on the server...");let{data:b,error:w}=await g.POST("/environments/prepare",{body:{projectSlug:p,environmentSlug:v,applicationVersion:y.applicationVersion,publishedDataHash:y.publishedDataHash,useAuthHook:y.useAuthHook,useCognito:y.useCognito,overrideSchema:m,configurationSchema:{version:y.schemaVersion,schema:y.schema},adminConfigurationSchema:y.adminSchema?{schema:y.adminSchema,version:y.adminSchemaVersion}:void 0,chat:y.chat,embeddings:y.embeddings,...y.assistant?{assistant:!0}:{},acl:{canCreate:y.aclCanCreate},privateFiles:[...y.assets.privateFilePaths],publicFiles:[...y.assets.publicFilePaths]},headers:{"x-api-key":u,"x-project-key":l,"x-project-slug":p}});if(w)throw Error(`Failed to prepare deployment with server: ${w.message}`);if(!b)throw Error("No data returned from server");n.debug("Deployment prepared on server");let E=b.environmentVariables,F=b.privateUploadUrls,P=b.publicUploadUrls,$=E?.DEPLOYMENT_ID;if(!E||!F||!P)throw Error("Incomplete data returned from server");if(!$)throw Error("No deployment ID returned from server");try{await e(c,i(E)+"\n"),n.debug(`Environment variables written to ${c}`)}catch(e){throw Error(`Failed to write environment variables to file at ${c}, please verify you have write permissions to this location.`)}if(d)n.debug("Skipping file upload");else{n.info("Uploading files to S3...");let e={privateFiles:[...y.assets.privateFilesFullPaths].map(e=>{let r=e.replace("assets/private/",""),t=F[r];if(!t)throw Error(`No upload URL provided for private file ${r}, the server did not return a presigned URL for this file, please verify the file exists in the assets/private directory.`);return{localPath:e,uploadUrl:t}}),publicFiles:[...y.assets.publicFilesFullPaths].map(e=>{let r=e.replace("assets/public/",""),t=P[r];if(!t)throw Error(`No upload URL provided for public file ${r}, the server did not return a presigned URL for this file, please verify the file exists in the assets/public directory.`);return{localPath:e,uploadUrl:t}})};await a(e,{logger:n})}n.info("Activating deployment...");let{error:U}=await g.POST("/deployments/{deploymentId}/activate",{params:{path:{deploymentId:$}},headers:{"x-project-key":l,"x-project-slug":p,"x-api-key":u},body:{lambdaUrl:f}});if(U)throw Error(`Failed to activate deployment with server: ${U.message}`);n.info(`Project: ${p}`),n.info(`Environment: ${v}`),n.info(`Deployment ID: ${$}`),n.info(`Lambda URL: ${f}`),n.success("Local environment prepared successfully!")};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { PageExperience } from '#package/application-spec';
|
|
1
2
|
import type { CommandContext } from './types.js';
|
|
2
3
|
export interface SyncCommandProps {
|
|
3
4
|
readonly sdkVersion: string;
|
|
4
5
|
readonly projectSlug: string;
|
|
5
6
|
readonly environmentSlug: string;
|
|
6
7
|
readonly cliUseWorkspace?: boolean;
|
|
7
|
-
readonly
|
|
8
|
+
readonly pageExperience: PageExperience;
|
|
8
9
|
readonly force?: boolean;
|
|
9
10
|
readonly analyze?: boolean;
|
|
10
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{generateProjectFiles as e,logDiagnostics as s}from"../application-spec/index.js";import{exitCli as c}from"../services/index.js";export const runSyncCommand=async(i,
|
|
1
|
+
import{generateProjectFiles as e,logDiagnostics as s}from"../application-spec/index.js";import{exitCli as c}from"../services/index.js";export const runSyncCommand=async(i,t)=>{let{logger:r}=t,{sdkVersion:n,projectSlug:o,environmentSlug:l,cliUseWorkspace:a,pageExperience:p,force:f=!1,analyze:m=!1}=i;try{r.step("Syncing Phoenix project files"),r.step("Building project files");let{diagnostics:c}=await e({sdkVersion:n,projectSlug:o,environmentSlug:l,cliUseWorkspace:a,pageExperience:p,inlineTemplates:"agent"!==p,force:f,analyze:m},t);s(c,r),r.success("Project files built successfully"),r.success("Sync completed successfully!")}catch(e){r.error(`Sync failed: ${e instanceof Error?e.message:String(e)}`,e),await c(1)}};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ViteDevServer } from 'vite';
|
|
2
|
+
import type { PageExperience } from '#package/application-spec';
|
|
2
3
|
import type { Logger } from '../utils/index.js';
|
|
3
4
|
import type { DeploymentPreparationService } from './deployment/index.js';
|
|
4
5
|
import type { LinguiWatcher } from './lingui-watcher.js';
|
|
@@ -15,7 +16,7 @@ export interface ApplicationSpecProjectWatcherConfig {
|
|
|
15
16
|
readonly projectSlug: string;
|
|
16
17
|
readonly environmentSlug: string;
|
|
17
18
|
readonly cliUseWorkspace?: boolean;
|
|
18
|
-
readonly
|
|
19
|
+
readonly pageExperience: PageExperience;
|
|
19
20
|
readonly inlineTemplates: boolean;
|
|
20
21
|
readonly useServer: boolean;
|
|
21
22
|
}
|
|
@@ -46,6 +47,7 @@ export declare class ApplicationSpecProjectWatcher {
|
|
|
46
47
|
private readonly logger;
|
|
47
48
|
private readonly builder;
|
|
48
49
|
private readonly useServer;
|
|
50
|
+
private readonly agentMode;
|
|
49
51
|
private isShuttingDown;
|
|
50
52
|
private suspended;
|
|
51
53
|
private readonly heldChanges;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{mkdirSync as e}from"fs";import{resolve as t}from"path";import i from"promise-queue";import{Subject as s,buffer as r,debounceTime as o}from"rxjs";import{createServer as n,normalizePath as
|
|
1
|
+
import{mkdirSync as e}from"fs";import{resolve as t}from"path";import i from"promise-queue";import{Subject as s,buffer as r,debounceTime as o}from"rxjs";import{createServer as n,normalizePath as a}from"vite";import{watch as c}from"#package/watch";import{ApplicationSpecBuilder as l}from"../application-spec/application-spec-builder.js";import{logDiagnostics as h}from"../application-spec/metrics/index.js";import{syncTemplateFiles as u}from"../application-spec/template-files.js";import{buildWebhooks as p}from"../webhooks/index.js";import{getViteDevConfig as g}from"./vite-config.js";export const WATCH_PATTERNS=["package.json","spec/**/*.{yaml,yml}","src/**/*.{ts,tsx,yaml,yml,json,html,css}","templates/*.html",".env",".env.generated",".phoenix/.env.generated"];export const IGNORED_PATTERNS=["src/locales/**/*.{ts,tsx}",".phoenix/!(.env.generated)/**"];export class ApplicationSpecProjectWatcher{context;watcher=null;subscription=null;rebuildQueue=new i(1,1/0);changeSubject$=new s;pubsub;logger;builder;useServer;agentMode;isShuttingDown=!1;suspended=!1;heldChanges=new Set;constructor(e,t){this.context=t,this.pubsub=e.pubsub,this.logger=e.logger,this.builder=new l({logger:e.logger,sdkVersion:e.sdkVersion,projectSlug:e.projectSlug,environmentSlug:e.environmentSlug,cliUseWorkspace:e.cliUseWorkspace,pageExperience:e.pageExperience,inlineTemplates:e.inlineTemplates}),this.useServer=e.useServer,this.agentMode="agent"===e.pageExperience}start(e){this.context.store.viteServer$.next(e),this.setupFileWatcher(),this.setupRebuildSubscription()}applyVariantFiles(e){this.rebuildQueue.add(async()=>{this.isShuttingDown||await this.rebuild(new Set(e.map(e=>e.fileName)),!1,!0)})}suspend(){this.suspended=!0}resume(){for(let e of(this.suspended=!1,this.heldChanges))this.changeSubject$.next(e);this.heldChanges.clear()}async close(){this.isShuttingDown=!0,this.watcher&&(await this.watcher.close(),this.watcher=null),this.subscription?.unsubscribe(),this.changeSubject$.complete()}setupFileWatcher(){e(t(process.cwd(),"src"),{recursive:!0}),this.watcher=c(WATCH_PATTERNS,{ignored:IGNORED_PATTERNS,cwd:process.cwd(),persistent:!0,ignoreInitial:!1}),this.watcher.on("all",(e,t)=>{if("change"===e||"add"===e||"unlink"===e){if(this.suspended)return void this.heldChanges.add(t);this.logger.info(`
|
|
2
2
|
📝 Detected ${e}: ${t}`),this.changeSubject$.next(t)}})}setupRebuildSubscription(){let e=this.changeSubject$.pipe(o(10));this.subscription=this.changeSubject$.pipe(r(e)).subscribe(e=>{let t=new Set(e),i=t.has(".env");this.rebuildQueue.add(async()=>{this.isShuttingDown||(this.logger.info(`
|
|
3
3
|
🔨 Rebuilding spec files...
|
|
4
|
-
`),await this.rebuild(t,i,!1))})})}async rebuild(e,i,s){try{let r=this.context.store.viteServer$.value;if(!r)throw Error("Cannot rebuild the project: the watcher has no Vite server yet, because it was not started. Start the watcher before applying files");let o=await u();if(this.isShuttingDown)return;let
|
|
4
|
+
`),await this.rebuild(t,i,!1))})})}async rebuild(e,i,s){try{let r=this.context.store.viteServer$.value;if(!r)throw Error("Cannot rebuild the project: the watcher has no Vite server yet, because it was not started. Start the watcher before applying files");let o=await u();if(this.isShuttingDown)return;let c=await this.builder.build({compile:!s});if(this.isShuttingDown)return;if(h(c.diagnostics,this.logger),!c.ok){for(let e of c.errors)this.logger.error(`[${e.code}] ${e.message}${e.file?` (${e.file})`:""}`);this.pubsub.specFile$.next({rawProjectFiles:c.rawProjectFiles,projectRoot:process.cwd(),build:"failed"});return}let{application:l,changedFiles:d}=c;this.context.linguiWatcher?.trigger(),this.context.deploymentPreparation?.reportUnregisteredSpec(l.applicationSpec);let w=r.moduleGraph,f=Date.now(),b=new Set,m=process.cwd(),S=e=>{let t=w.getModulesByFile(a(e));if(t)for(let e of t)w.invalidateModule(e,b,f,!0)};for(let i of e)S(t(m,i));for(let e of d)S(t(m,`.phoenix/${e.path}`));if(this.pubsub.specFile$.next({rawProjectFiles:l.rawProjectFiles,projectRoot:process.cwd(),configurationSchemaHash:l.applicationSpec.configurator.configurationSchema.hash,build:"ok"}),this.isShuttingDown)return;if(i){if(await r.close(),this.isShuttingDown)return;let e=await g({templateFiles:o,agentMode:this.agentMode});if(this.isShuttingDown)return;let t=await n(e);if(this.isShuttingDown||(await t.listen(),this.isShuttingDown))return void await t.close();this.context.store.viteServer$.next(t),this.logger.success("Vite server restarted (env changed)")}if(this.useServer&&!s){if(this.logger.step("Building webhooks"),await p({experimental:!0,skipNodeEnvOverride:!0,webhookEntryPoint:"./.phoenix/.swc/.phoenix/webhook.js",preserveExistingOutput:!0}),this.isShuttingDown)return;this.logger.success("Webhooks rebuilt successfully")}this.logger.success("Project files rebuilt successfully")}catch(e){this.logger.error(`Build failed: ${e instanceof Error?e.message:String(e)}`,e)}}}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
|
-
* What `phoenix login` stores for one Phoenix server: the SDK builder's API token and the workspace it
|
|
3
|
+
* What `phoenix login` stores for one Phoenix server: the SDK builder's API token, and the workspace it is bound to
|
|
4
|
+
* when the sign-in named one.
|
|
4
5
|
*/
|
|
5
6
|
declare const ServerCredentials: z.ZodObject<{
|
|
6
7
|
token: z.ZodString;
|
|
7
8
|
userId: z.ZodString;
|
|
8
9
|
customerId: z.ZodOptional<z.ZodString>;
|
|
9
|
-
customerSlug: z.ZodString
|
|
10
|
-
customerName: z.ZodString
|
|
10
|
+
customerSlug: z.ZodOptional<z.ZodString>;
|
|
11
|
+
customerName: z.ZodOptional<z.ZodString>;
|
|
11
12
|
studioUrl: z.ZodOptional<z.ZodString>;
|
|
12
13
|
createdAt: z.ZodString;
|
|
13
14
|
}, "strip", z.ZodTypeAny, {
|
|
14
15
|
token: string;
|
|
15
16
|
userId: string;
|
|
16
17
|
customerId?: string | undefined;
|
|
17
|
-
customerSlug
|
|
18
|
-
customerName
|
|
18
|
+
customerSlug?: string | undefined;
|
|
19
|
+
customerName?: string | undefined;
|
|
19
20
|
studioUrl?: string | undefined;
|
|
20
21
|
createdAt: string;
|
|
21
22
|
}, {
|
|
22
23
|
token: string;
|
|
23
24
|
userId: string;
|
|
24
25
|
customerId?: string | undefined;
|
|
25
|
-
customerSlug
|
|
26
|
-
customerName
|
|
26
|
+
customerSlug?: string | undefined;
|
|
27
|
+
customerName?: string | undefined;
|
|
27
28
|
studioUrl?: string | undefined;
|
|
28
29
|
createdAt: string;
|
|
29
30
|
}>;
|
|
@@ -32,7 +33,25 @@ export type ServerCredentials = z.infer<typeof ServerCredentials>;
|
|
|
32
33
|
* Where the CLI keeps credentials: `~/.phoenix/credentials.json`, or the file in `PHOENIX_CREDENTIALS_FILE`.
|
|
33
34
|
*/
|
|
34
35
|
export declare const getCredentialsPath: () => string;
|
|
36
|
+
/** Server of the current saved login: the most recent `phoenix login` that was not signed out since. */
|
|
37
|
+
export declare const getCurrentServerUrl: () => Promise<string | null>;
|
|
38
|
+
/** Servers that hold a saved login, for a message that tells the user where they are signed in. */
|
|
39
|
+
export declare const listSavedServerUrls: () => Promise<readonly string[]>;
|
|
35
40
|
export declare const getServerCredentials: (serverUrl: string) => Promise<ServerCredentials | null>;
|
|
41
|
+
/** Credentials used by deploy and whoami; CI tokens never enter the login file. */
|
|
42
|
+
export interface CliApiCredentials {
|
|
43
|
+
readonly token: string;
|
|
44
|
+
/** Whether `PHOENIX_API_TOKEN` supplied the token, so signing in again cannot replace it. */
|
|
45
|
+
readonly fromEnvironment: boolean;
|
|
46
|
+
readonly customerSlug?: string;
|
|
47
|
+
readonly customerName?: string;
|
|
48
|
+
readonly studioUrl?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare const getCliApiCredentials: (serverUrl: string) => Promise<CliApiCredentials | null>;
|
|
51
|
+
/** Where the credential of deploy or whoami comes from, so the user sees which identity a command acts as. */
|
|
52
|
+
export declare const describeCliApiCredentialSource: (credentials: CliApiCredentials) => string;
|
|
53
|
+
/** What to do when the server refuses the credential of deploy or whoami. */
|
|
54
|
+
export declare const getCliApiCredentialsHint: (credentials: CliApiCredentials) => string;
|
|
36
55
|
export declare const saveServerCredentials: (serverUrl: string, entry: ServerCredentials) => Promise<string>;
|
|
37
56
|
export declare const removeServerCredentials: (serverUrl: string) => Promise<void>;
|
|
38
57
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{chmod as e,mkdir as r,readFile as t,writeFile as
|
|
2
|
-
`,{mode:384}),await e(
|
|
1
|
+
import{chmod as e,mkdir as r,readFile as t,writeFile as n}from"node:fs/promises";import{homedir as o}from"node:os";import{dirname as i,join as s}from"node:path";import{z as a}from"zod";let l=a.object({token:a.string().min(1),userId:a.string(),customerId:a.string().uuid().optional(),customerSlug:a.string().optional(),customerName:a.string().optional(),studioUrl:a.string().optional(),createdAt:a.string()}),c=a.object({version:a.literal(1),servers:a.record(a.string(),l),current:a.string().optional()}),d={version:1,servers:{}};export const getCredentialsPath=()=>process.env.PHOENIX_CREDENTIALS_FILE??s(o(),".phoenix","credentials.json");let u=e=>new URL(e).origin,v=async()=>{let e;try{e=await t(getCredentialsPath(),"utf8")}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return d;throw e}let r=c.safeParse((e=>{try{return JSON.parse(e)}catch{return null}})(e));if(!r.success)throw Error(`The credentials file ${getCredentialsPath()} is not valid. Delete it and run \`phoenix login\` again.`);return r.data},p=async t=>{let o=getCredentialsPath();return await r(i(o),{recursive:!0,mode:448}),await n(o,`${JSON.stringify(t,null,2)}
|
|
2
|
+
`,{mode:384}),await e(o,384),o},g=e=>{if(void 0!==e.current&&e.servers[e.current])return e.current;let[r]=Object.entries(e.servers).sort(([,e],[,r])=>r.createdAt.localeCompare(e.createdAt));return r?.[0]??null};export const getCurrentServerUrl=async()=>g(await v());export const listSavedServerUrls=async()=>Object.keys((await v()).servers);export const getServerCredentials=async e=>(await v()).servers[u(e)]??null;export const getCliApiCredentials=async e=>{let r=process.env.PHOENIX_API_TOKEN;if(void 0===r){let r=await getServerCredentials(e);return r?{...r,fromEnvironment:!1}:null}if(!/^phx[a]?_[A-Za-z0-9_-]{43}$/.test(r))throw Error("PHOENIX_API_TOKEN is not a valid Phoenix token. Replace the process variable or unset it to use your saved login.");return{token:r,fromEnvironment:!0}};export const describeCliApiCredentialSource=e=>e.fromEnvironment?"PHOENIX_API_TOKEN":`saved login in ${getCredentialsPath()}`;export const getCliApiCredentialsHint=e=>e.fromEnvironment?"The token comes from PHOENIX_API_TOKEN, so signing in again does not replace it. Set the variable to a valid token, or unset it to use your saved login.":"Run `phoenix login` again.";export const saveServerCredentials=async(e,r)=>{let t=await v(),n=u(e);return p({...t,servers:{...t.servers,[n]:r},current:n})};export const removeServerCredentials=async e=>{let r=await v(),{[u(e)]:t,...n}=r.servers,{current:o,...i}=r,s=g({...r,servers:n});await p({...i,servers:n,...null===s?{}:{current:s}})};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Says where the user is signed in when the server a command resolved holds no login, and how to select one of
|
|
3
|
+
* those servers. Null when there is no saved login at all, so the caller advises to sign in instead.
|
|
4
|
+
*/
|
|
5
|
+
export declare const describeSavedLogins: () => Promise<string | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{listSavedServerUrls as e}from"../cli-credentials.js";import{PUBLIC_PHOENIX_REGIONS as n,getRegionServerUrl as i}from"../phoenix-regions.js";export const describeSavedLogins=async()=>{let r=await e();if(0===r.length)return null;let o=r.map(e=>{let r;return`${e} (${(r=n.find(n=>new URL(i(n)).origin===e))?`--region ${r}`:`--serverUrl ${e}`})`}).join(", ");return`You have a saved login on ${o}: pass its flag to use it, or run \`phoenix login\` to sign in here.`};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{describeSavedLogins}from"./describe-saved-logins.js";export{resolveCliServerUrl}from"./resolve-cli-server-url.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type PhoenixRegion } from '../phoenix-regions.js';
|
|
2
|
+
interface ResolveCliServerUrlProps {
|
|
3
|
+
/** Server named with `--serverUrl`. */
|
|
4
|
+
readonly serverUrl: string | undefined;
|
|
5
|
+
/** Region named with `--region`. */
|
|
6
|
+
readonly region: PhoenixRegion | undefined;
|
|
7
|
+
/** What the process environment and the project's `.env` say about the server. */
|
|
8
|
+
readonly env: {
|
|
9
|
+
readonly SERVER_URL: string | undefined;
|
|
10
|
+
readonly PHOENIX_REGION: PhoenixRegion | undefined;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Decides which Phoenix server a sign-in command talks to, by one rule for `login`, `dev`, `deploy`, `whoami`,
|
|
15
|
+
* `logout` and `feedback`, so they cannot point at different servers unnoticed: a flag wins, then the environment,
|
|
16
|
+
* then the server of the current saved login, then the default region.
|
|
17
|
+
*/
|
|
18
|
+
export declare const resolveCliServerUrl: ({ serverUrl, region, env }: ResolveCliServerUrlProps) => Promise<string>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getCurrentServerUrl as e}from"../cli-credentials.js";import{DEFAULT_PHOENIX_REGION as o,getRegionServerUrl as r}from"../phoenix-regions.js";export const resolveCliServerUrl=async({serverUrl:i,region:t,env:E})=>i?.length?i:void 0!==t?r(t):E.SERVER_URL?.length?E.SERVER_URL:void 0!==E.PHOENIX_REGION?r(E.PHOENIX_REGION):await e()??r(o);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Logger } from '../../utils/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* What `phoenix dev` shows around the configurator in the browser.
|
|
4
|
+
*
|
|
5
|
+
* `editor` is the internal experience: the Phoenix editor, the detailed dev error pages and Vite's
|
|
6
|
+
* error overlay. `agent` is the experience of a project whose configurator an AI agent builds: the
|
|
7
|
+
* editor runs with its UI hidden, so the CLI's inspect commands still work, and every dev error lands
|
|
8
|
+
* on the "Agent at work" screen while the details go to the terminal logs the agent reads. `plain` is
|
|
9
|
+
* the configurator alone with the detailed dev error pages, for internal tooling such as asset captures.
|
|
10
|
+
*/
|
|
11
|
+
export type DevExperience = 'editor' | 'agent' | 'plain';
|
|
12
|
+
/**
|
|
13
|
+
* How `phoenix dev` authenticated with the Phoenix server. Only a session as the signed-in Studio user
|
|
14
|
+
* runs in agent mode, and only when no editor setting is given; every internal setup keeps the editor.
|
|
15
|
+
*/
|
|
16
|
+
export type CredentialRoute = 'signed-in' | 'development-key' | 'local' | 'no-server';
|
|
17
|
+
/** Inputs of {@link resolveDevExperience}: the explicit settings, unset when absent, and the credential route. */
|
|
18
|
+
export interface ResolveDevExperienceInput {
|
|
19
|
+
/** `--editor` (true) or `--no-editor` (false). */
|
|
20
|
+
readonly cliEditor: boolean | undefined;
|
|
21
|
+
/** The `ENABLE_EDITOR` environment variable. */
|
|
22
|
+
readonly envEditor: boolean | undefined;
|
|
23
|
+
readonly route: CredentialRoute;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Agent mode comes from the credentials alone: the signed-in route gets it when neither `--editor`/`--no-editor`
|
|
27
|
+
* nor `ENABLE_EDITOR` is set. Those keep their meaning on every route: the editor, or the plain page.
|
|
28
|
+
*/
|
|
29
|
+
export declare const resolveDevExperience: (input: ResolveDevExperienceInput, context: {
|
|
30
|
+
readonly logger: Logger;
|
|
31
|
+
}) => DevExperience;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const resolveDevExperience=(e,r)=>{let{cliEditor:t,envEditor:i,route:n}=e;if(void 0!==t)return r.logger.detail(`Editor enabled: ${t} (from CLI flag)`),t?"editor":"plain";if(void 0!==i)return r.logger.detail(`Editor enabled: ${i} (from environment variable)`),i?"editor":"plain";let o="signed-in"===n?"agent":"editor";return r.logger.detail("agent"===o?"Dev experience: agent mode, the editor running with its UI hidden (default for the signed-in route)":`Dev experience: editor (default for the ${n} route)`),o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{resolveDevExperience}from"./dev-experience.js";export{readExplicitEditorSetting}from"./read-explicit-editor-setting.js";export{resolveRegeneratedPageExperience}from"./regenerated-page-experience.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `ENABLE_EDITOR` a user set, from the process environment, the project's `.env` or the pnpm
|
|
3
|
+
* workspace root's `.env`, in that order, as the env reader takes it. The generated env file is left
|
|
4
|
+
* out on purpose: development preparation writes the server's `ENABLE_EDITOR=true` into it, and
|
|
5
|
+
* reading that back would turn every signed-in session after the first into an editor session.
|
|
6
|
+
*/
|
|
7
|
+
export declare const readExplicitEditorSetting: (projectRoot: string) => boolean | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parse as t}from"dotenv";import{bool as r,cleanEnv as e}from"envalid";import{existsSync as o,readFileSync as E}from"fs";import{dirname as i,join as n}from"path";let p=r=>{let e=n(r,".env");return o(e)?t(E(e,"utf8")).ENABLE_EDITOR:void 0},m=t=>{if(o(n(t,"pnpm-workspace.yaml")))return t;let r=i(t);return r===t?void 0:m(r)};export const readExplicitEditorSetting=t=>{let o=m(t);return e({ENABLE_EDITOR:process.env.ENABLE_EDITOR??p(t)??(o&&o!==t?p(o):void 0)},{ENABLE_EDITOR:r({default:void 0})}).ENABLE_EDITOR};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PageExperience } from '#package/application-spec';
|
|
2
|
+
import type { Logger } from '../../utils/index.js';
|
|
3
|
+
/** The editor settings {@link resolveRegeneratedPageExperience} weighs. */
|
|
4
|
+
export interface RegeneratedPageExperienceInput {
|
|
5
|
+
/** `--editor` or `--no-editor`. */
|
|
6
|
+
readonly cliEditor: boolean | undefined;
|
|
7
|
+
/** `ENABLE_EDITOR` the user set in the environment or `.env`, the generated env file left out. */
|
|
8
|
+
readonly userEditor: boolean | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* `ENABLE_EDITOR` as the env reader takes it, the generated env file first after the environment. A
|
|
11
|
+
* deploy build gets `false` there, and a signed-in dev session `true`.
|
|
12
|
+
*/
|
|
13
|
+
readonly environmentEditor: boolean | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The page `phoenix sync`, `build` and `clean` regenerate. `--editor`/`--no-editor` decides first. An
|
|
17
|
+
* agent-mode page dev generated is kept unless the user set `ENABLE_EDITOR`, so running one while dev is
|
|
18
|
+
* in agent mode never puts the visible editor back in front of the client; the generated env file's
|
|
19
|
+
* `ENABLE_EDITOR=true` is not a choice there. Otherwise `ENABLE_EDITOR` decides as the env reader takes
|
|
20
|
+
* it, the generated env file before `.env`, as it does for a deploy build, and the editor is the default.
|
|
21
|
+
*/
|
|
22
|
+
export declare const resolveRegeneratedPageExperience: (input: RegeneratedPageExperienceInput, context: {
|
|
23
|
+
readonly logger: Logger;
|
|
24
|
+
}) => PageExperience;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{existsSync as e,readFileSync as o}from"fs";let t=".phoenix/editor.tsx";export const resolveRegeneratedPageExperience=(i,r)=>{let{cliEditor:n,userEditor:d,environmentEditor:a}=i,l=(e,o)=>(r.logger.detail(`Page: ${e} (${o})`),e);return void 0!==n?l(n?"editor":"plain","from CLI flag"):e(t)&&o(t,"utf8").includes(" hideUi")?void 0===d?l("agent","keeps the agent-mode page phoenix dev generated"):l(d?"editor":"plain","from ENABLE_EDITOR in the environment or .env"):void 0===a?l("editor","default"):l(a?"editor":"plain","from ENABLE_EDITOR")};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const getDevelopmentCredentialHint=(e,n)=>"developmentKey"in e?`Create a development environment for project "${n}" in Studio and paste its .env block into .env.`:"Run `phoenix login
|
|
1
|
+
export const getDevelopmentCredentialHint=(e,n)=>"developmentKey"in e?`Create a development environment for project "${n}" in Studio and paste its .env block into .env.`:"Run `phoenix login` again if the sign-in was revoked, then restart phoenix dev.";export const getDevelopmentHeaders=(e,n)=>({..."developmentKey"in e?{"x-development-key":e.developmentKey}:{authorization:`Bearer ${e.apiToken}`},"x-project-slug":n.projectSlug,"x-environment-slug":n.environmentSlug});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
interface FrontendBuildConfig {
|
|
2
2
|
readonly jsonSchemaValidator: 'ajv' | 'csp-compatible';
|
|
3
3
|
readonly gltfDecoder: 'js' | 'wasm';
|
|
4
|
+
readonly gltfDecoderWorkerLimit: number;
|
|
5
|
+
readonly exportPixelRatio: number | undefined;
|
|
4
6
|
}
|
|
5
7
|
export interface FrontendConfigModule {
|
|
6
8
|
readonly readRuntimeConfig: () => Record<string, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { BrowserConsoleEvent, DataRequest, DataResult, EditorContextData, EditorLifecycleStatus, EditorStateData, MockTemplateUpdateEvent, SceneRequest, SceneResult, ScreenshotRequest, ScreenshotResult, SpecUpdateEvent, StateRequest, StateResult, StateSection, } from './phoenix-pubsub.js';
|
|
1
|
+
export type { BrowserConsoleEvent, DataRequest, DataResult, EditorContextData, EditorLifecycleStatus, EditorStateData, MockTemplateUpdateEvent, SceneRequest, SceneResult, ScreenshotRequest, ScreenshotResult, SpecBuildStatus, SpecUpdateEvent, StateRequest, StateResult, StateSection, } from './phoenix-pubsub.js';
|
|
2
2
|
export { PhoenixPubSub } from './phoenix-pubsub.js';
|
|
3
3
|
export { PhoenixStore } from './phoenix-store.js';
|
|
4
4
|
export { DeploymentPreparationService, readGeneratedEnvMarkers } from './deployment/index.js';
|
|
@@ -19,9 +19,12 @@ export { compileWithSwc, watchWithSwc } from './swc.js';
|
|
|
19
19
|
export { STORY_DEV_MARKER_PATH, readActiveStoryDevMarker, type StoryDevMarker } from './story-dev-marker.js';
|
|
20
20
|
export { composeDefaultBanner } from './phx-banner-plugin.js';
|
|
21
21
|
export { getViteBuildConfigs, getViteDevConfig, setViteLogSink, type ViteLogSink, type ViteLogSinkOptions, } from './vite-config.js';
|
|
22
|
-
export { getServerCredentials, removeServerCredentials, saveServerCredentials } from './cli-credentials.js';
|
|
22
|
+
export { describeCliApiCredentialSource, getCliApiCredentials, getCliApiCredentialsHint, getServerCredentials, removeServerCredentials, saveServerCredentials, } from './cli-credentials.js';
|
|
23
23
|
export { exitCli, setBeforeCliExit } from './cli-exit.js';
|
|
24
24
|
export { createSourceArchive, extractSourceArchive } from './source-archive.js';
|
|
25
25
|
export { resolveSignedInDevelopmentEnvironment } from './signed-in-development-environment.js';
|
|
26
|
+
export { describeWorkspaceProjects, resolveDeployTarget, resolveTargetProject } from './spec-project/index.js';
|
|
26
27
|
export { createTelemetryClient, resolveTelemetryCommand, type CommandTelemetryAttempt, type TelemetryAssociation, type TelemetryClient, type TelemetryCommand, } from './telemetry/index.js';
|
|
27
|
-
export { DEFAULT_PHOENIX_REGION, PHOENIX_REGIONS, PUBLIC_PHOENIX_REGIONS, getRegionServerUrl, getRegionStudioUrl, } from './phoenix-regions.js';
|
|
28
|
+
export { DEFAULT_PHOENIX_REGION, PHOENIX_REGIONS, PUBLIC_PHOENIX_REGIONS, getRegionServerUrl, getRegionStudioUrl, getServerStudioUrl, } from './phoenix-regions.js';
|
|
29
|
+
export { describeSavedLogins, resolveCliServerUrl } from './cli-server/index.js';
|
|
30
|
+
export { type CredentialRoute, type DevExperience, readExplicitEditorSetting, resolveDevExperience, resolveRegeneratedPageExperience, } from './dev-experience/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{PhoenixPubSub}from"./phoenix-pubsub.js";export{PhoenixStore}from"./phoenix-store.js";export{DeploymentPreparationService,readGeneratedEnvMarkers}from"./deployment/index.js";export{PhoenixApplication}from"./session/index.js";export{VariantFileSession}from"./variant-file-session.js";export{VariantPreviewService}from"./variant-preview-service.js";export{MockTemplateWatcher}from"./mock-template-watcher.js";export{ApplicationSpecProjectWatcher}from"./application-spec-project-watcher.js";export{ApplicationSpecStoryWatcher}from"./application-spec-story-watcher.js";export{LinguiWatcher}from"./lingui-watcher.js";export{bootstrapLinguiCatalogs,extractAndCompileLingui}from"../lingui/index.js";export{loadMockTemplates,parseMockTemplateYaml}from"./spec-files.js";export{LOG_STREAMS,LogBus}from"./log-bus.js";export{createBusLogger}from"./bus-logger.js";export{patchConsole}from"./console-capture.js";export{WebhookTunnelMonitor}from"./webhook-tunnel-monitor.js";export{compileWithSwc,watchWithSwc}from"./swc.js";export{STORY_DEV_MARKER_PATH,readActiveStoryDevMarker}from"./story-dev-marker.js";export{composeDefaultBanner}from"./phx-banner-plugin.js";export{getViteBuildConfigs,getViteDevConfig,setViteLogSink}from"./vite-config.js";export{getServerCredentials,removeServerCredentials,saveServerCredentials}from"./cli-credentials.js";export{exitCli,setBeforeCliExit}from"./cli-exit.js";export{createSourceArchive,extractSourceArchive}from"./source-archive.js";export{resolveSignedInDevelopmentEnvironment}from"./signed-in-development-environment.js";export{createTelemetryClient,resolveTelemetryCommand}from"./telemetry/index.js";export{DEFAULT_PHOENIX_REGION,PHOENIX_REGIONS,PUBLIC_PHOENIX_REGIONS,getRegionServerUrl,getRegionStudioUrl}from"./phoenix-regions.js";
|
|
1
|
+
export{PhoenixPubSub}from"./phoenix-pubsub.js";export{PhoenixStore}from"./phoenix-store.js";export{DeploymentPreparationService,readGeneratedEnvMarkers}from"./deployment/index.js";export{PhoenixApplication}from"./session/index.js";export{VariantFileSession}from"./variant-file-session.js";export{VariantPreviewService}from"./variant-preview-service.js";export{MockTemplateWatcher}from"./mock-template-watcher.js";export{ApplicationSpecProjectWatcher}from"./application-spec-project-watcher.js";export{ApplicationSpecStoryWatcher}from"./application-spec-story-watcher.js";export{LinguiWatcher}from"./lingui-watcher.js";export{bootstrapLinguiCatalogs,extractAndCompileLingui}from"../lingui/index.js";export{loadMockTemplates,parseMockTemplateYaml}from"./spec-files.js";export{LOG_STREAMS,LogBus}from"./log-bus.js";export{createBusLogger}from"./bus-logger.js";export{patchConsole}from"./console-capture.js";export{WebhookTunnelMonitor}from"./webhook-tunnel-monitor.js";export{compileWithSwc,watchWithSwc}from"./swc.js";export{STORY_DEV_MARKER_PATH,readActiveStoryDevMarker}from"./story-dev-marker.js";export{composeDefaultBanner}from"./phx-banner-plugin.js";export{getViteBuildConfigs,getViteDevConfig,setViteLogSink}from"./vite-config.js";export{describeCliApiCredentialSource,getCliApiCredentials,getCliApiCredentialsHint,getServerCredentials,removeServerCredentials,saveServerCredentials}from"./cli-credentials.js";export{exitCli,setBeforeCliExit}from"./cli-exit.js";export{createSourceArchive,extractSourceArchive}from"./source-archive.js";export{resolveSignedInDevelopmentEnvironment}from"./signed-in-development-environment.js";export{describeWorkspaceProjects,resolveDeployTarget,resolveTargetProject}from"./spec-project/index.js";export{createTelemetryClient,resolveTelemetryCommand}from"./telemetry/index.js";export{DEFAULT_PHOENIX_REGION,PHOENIX_REGIONS,PUBLIC_PHOENIX_REGIONS,getRegionServerUrl,getRegionStudioUrl,getServerStudioUrl}from"./phoenix-regions.js";export{describeSavedLogins,resolveCliServerUrl}from"./cli-server/index.js";export{readExplicitEditorSetting,resolveDevExperience,resolveRegeneratedPageExperience}from"./dev-experience/index.js";
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { Subject } from 'rxjs';
|
|
2
2
|
import type { RawProjectFiles } from '#package/application-spec';
|
|
3
3
|
import type { MockTemplateDefinition } from '#package/editor';
|
|
4
|
+
/** Whether the latest rebuild of the project files succeeded; an agent-mode page shows it on its badge. */
|
|
5
|
+
export type SpecBuildStatus = 'ok' | 'failed';
|
|
4
6
|
/** Batch of project files that changed on disk. */
|
|
5
7
|
export interface SpecUpdateEvent {
|
|
6
8
|
readonly rawProjectFiles: RawProjectFiles;
|
|
7
9
|
readonly projectRoot: string;
|
|
8
10
|
readonly configurationSchemaHash?: string;
|
|
11
|
+
/** How the rebuild this event reports went; absent when the event reports no rebuild. */
|
|
12
|
+
readonly build?: SpecBuildStatus;
|
|
9
13
|
}
|
|
10
14
|
/** Updated set of mock template definitions after a file change. */
|
|
11
15
|
export interface MockTemplateUpdateEvent {
|
|
@@ -15,4 +15,9 @@ export declare const getRegionServerUrl: (region: PhoenixRegion) => string;
|
|
|
15
15
|
* Studio of one workspace in a region. The slug becomes a subdomain, so anything but a plain slug is refused: it
|
|
16
16
|
* could otherwise point the sign-in at another host.
|
|
17
17
|
*/
|
|
18
|
-
export declare const getRegionStudioUrl: (region: PhoenixRegion, workspace: string) => string;
|
|
18
|
+
export declare const getRegionStudioUrl: (region: PhoenixRegion, workspace: string | undefined) => string;
|
|
19
|
+
/**
|
|
20
|
+
* Studio that pairs with a server, for a sign-in that names the server and no Studio. Only the server of a region
|
|
21
|
+
* has a known Studio; for a local or self-hosted server the user names it.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getServerStudioUrl: (serverUrl: string, workspace: string | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PHOENIX_REGIONS=["eu","us","staging"];export const PUBLIC_PHOENIX_REGIONS=["eu","us"];export const DEFAULT_PHOENIX_REGION="eu";let
|
|
1
|
+
export const PHOENIX_REGIONS=["eu","us","staging"];export const PUBLIC_PHOENIX_REGIONS=["eu","us"];export const DEFAULT_PHOENIX_REGION="eu";let t={eu:{serverUrl:"https://production-eu-central-1.salsita.ai",studioDomain:"studio.eu.salsita.ai"},us:{serverUrl:"https://production-us-east-1.salsita.ai",studioDomain:"studio.salsita.ai"},staging:{serverUrl:"https://staging.salsita.app",studioDomain:"studio-staging.salsita.app"}},s=/^[a-z0-9-]+$/;export const getRegionServerUrl=s=>t[s].serverUrl;export const getRegionStudioUrl=(e,o)=>{if(void 0===o)return`https://${t[e].studioDomain}`;if(!s.test(o))throw Error(`"${o}" is not a workspace slug. A slug has only lowercase letters, digits and dashes; use the one from your Studio address.`);return`https://${o}.${t[e].studioDomain}`};export const getServerStudioUrl=(s,e)=>{let o=PHOENIX_REGIONS.find(e=>new URL(t[e].serverUrl).origin===new URL(s).origin);if(void 0===o)throw Error(`The Studio of ${s} is not known, because it is not the server of a Phoenix region. Pass --studioUrl <url> with the address of the Studio that belongs to it.`);return getRegionStudioUrl(o,e)};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{writeFile as e}from"node:fs/promises";import{
|
|
1
|
+
import{writeFile as e}from"node:fs/promises";import{createCliApiClient as i}from"#package/client";import{resolveApplicationSpecDeploymentData as t}from"../application-spec/index.js";import{formatEnvContent as r,uploadFilesWithPresignedUrls as a}from"../utils/index.js";import{getDevelopmentCredentialHint as o,getDevelopmentHeaders as s}from"./development-credential.js";export const prepareDevelopmentEnvironment=async(n,l)=>{let{logger:p}=l,{projectSlug:d,environmentSlug:m,serverUrl:c,credential:h,outFile:v,skipUpload:f,overrideSchema:u,projectVersion:g}=n;p.step("Preparing development environment"),p.info(`Preparing development environment for project "${d}", environment "${m}"`);let E=i(c);p.debug(`Using server URL: ${c}`);let P=await t({skipUpload:f,logger:p});p.info("Preparing and activating the development deployment on the server...");let{data:b,error:$}=await E.POST("/environments/development/prepare",{body:{applicationVersion:P.applicationVersion,publishedDataHash:P.publishedDataHash,useAuthHook:P.useAuthHook,useCognito:P.useCognito,overrideSchema:u,configurationSchema:{version:P.schemaVersion,schema:P.schema},adminConfigurationSchema:P.adminSchema?{schema:P.adminSchema,version:P.adminSchemaVersion}:void 0,chat:P.chat,embeddings:P.embeddings,...P.assistant?{assistant:!0}:{},acl:{canCreate:P.aclCanCreate},privateFiles:[...P.assets.privateFilePaths],publicFiles:[...P.assets.publicFilePaths],sdkVersion:g},headers:s(h,{projectSlug:d,environmentSlug:m})});if($)throw Error(`Failed to prepare development deployment for ${d}/${m} on ${c}: ${$.message}. ${o(h,d)}`);if(!b)throw Error("No data returned from server while preparing the development deployment.");let{environmentVariables:y,privateUploadUrls:N,publicUploadUrls:w}=b;if(f)p.debug("Skipping file upload");else{p.info("Uploading files to S3...");let e={privateFiles:[...P.assets.privateFilesFullPaths].map(e=>{let i=e.replace("assets/private/",""),t=N[i];if(!t)throw Error(`No upload URL provided for private file ${i}, the server did not return a presigned URL for this file, please verify the file exists in the assets/private directory.`);return{localPath:e,uploadUrl:t}}),publicFiles:[...P.assets.publicFilesFullPaths].map(e=>{let i=e.replace("assets/public/",""),t=w[i];if(!t)throw Error(`No upload URL provided for public file ${i}, the server did not return a presigned URL for this file, please verify the file exists in the assets/public directory.`);return{localPath:e,uploadUrl:t}})};await a(e,{logger:p})}try{await e(v,`${r({...y,PHOENIX_PROJECT_SLUG:d,PHOENIX_ENVIRONMENT_SLUG:m,PHOENIX_SERVER_URL:c,PHOENIX_DEPLOYMENT_FINGERPRINT:P.fingerprint})}
|
|
2
2
|
`),p.debug(`Environment variables written to ${v}`)}catch{throw Error(`Failed to write environment variables to file at ${v}, please verify you have write permissions to this location.`)}p.info(`Project: ${d}`),p.info(`Environment: ${m}`),p.info(`Deployment ID: ${y.DEPLOYMENT_ID}`),p.success("Development environment prepared successfully!")};
|
|
@@ -2,6 +2,7 @@ import { Subject } from 'rxjs';
|
|
|
2
2
|
import { createServer } from 'vite';
|
|
3
3
|
import { type Logger } from '../../utils/index.js';
|
|
4
4
|
import { DeploymentPreparationService } from '../deployment/index.js';
|
|
5
|
+
import type { DevExperience } from '../dev-experience/index.js';
|
|
5
6
|
import { type DevelopmentCredential } from '../development-credential.js';
|
|
6
7
|
import { LinguiWatcher } from '../lingui-watcher.js';
|
|
7
8
|
import { LogBus } from '../log-bus.js';
|
|
@@ -16,7 +17,7 @@ export interface PhoenixDevelopmentOptions {
|
|
|
16
17
|
readonly projectSlug: string;
|
|
17
18
|
readonly environmentSlug: string;
|
|
18
19
|
readonly cliUseWorkspace: boolean | undefined;
|
|
19
|
-
readonly
|
|
20
|
+
readonly devExperience: DevExperience;
|
|
20
21
|
readonly debug: boolean;
|
|
21
22
|
readonly withLingui: boolean;
|
|
22
23
|
readonly persistenceMode: string | undefined;
|