@salsita-ai/sdk 0.50.0-develop.11a39afa73 → 0.50.0-develop.12744a81f2
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/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/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 +1 -4
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +2 -2
- 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 +26 -29
- 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/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 +11 -12
- 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 +3 -2
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +13 -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/{webhooks/assistant-setup.d.ts → assistant/session-setup.d.ts} +1 -1
- 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/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/webhooks/authentication.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -1
- 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/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/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 +66 -7
- 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/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 +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/client/phoenix-api.d.ts +5263 -1723
- package/dist/configurator/ConfiguratorApp.js +1 -1
- 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 +7 -4
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +99 -35
- 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 +12 -17
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -1
- 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/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 +14 -4
- 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 +5 -4
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/hooks/use-configurator.d.ts +3 -3
- package/dist/configurator/common/configurator-interface.d.ts +9 -7
- package/dist/configurator/common/configurator-interface.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 +5 -5
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +4 -3
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +6 -4
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +10 -2
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- 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/editor/AnnotationComment.d.ts +6 -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/index.d.ts +0 -1
- package/dist/configurator/ui/assistant/annotation/index.js +1 -1
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +6 -4
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.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 +1 -1
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -1
- package/dist/configurator/ui/assistant/drawing/index.d.ts +1 -1
- package/dist/configurator/ui/assistant/drawing/index.js +1 -1
- package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -1
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +6 -12
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -1
- package/dist/configurator/ui/assistant/form/form-model.d.ts +9 -0
- 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/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/FormOptions.d.ts +7 -4
- package/dist/configurator/ui/assistant/form-elements/FormOptions.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 +2 -3
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -1
- package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -1
- package/dist/configurator/ui/assistant/index.d.ts +2 -2
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.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 +2 -1
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +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 +2 -2
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +7 -1
- 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/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/MobileLayout.js +3 -3
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.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 +128 -3
- 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 +58 -62
- package/dist/docs/other-features/violation-messages.mdx +3 -1
- 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/configurator-interface.mdx +68 -39
- package/dist/docs/phoenix/data-sources.mdx +1 -1
- package/dist/docs/phoenix/getting-started.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +2 -2
- package/dist/docs/phoenix/migrations.mdx +1 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +90 -54
- package/dist/docs/phoenix/project-structure.mdx +17 -7
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +57 -28
- package/dist/docs/phoenix/sessions-and-access.mdx +10 -7
- package/dist/docs/phoenix/theming.mdx +5 -9
- package/dist/docs/phoenix/webhook-membership.mdx +1 -1
- package/dist/docs/phoenix/webhooks.mdx +56 -4
- 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/application/application-config.d.ts +5 -0
- 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 +8 -0
- 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/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/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 -6
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +13 -19
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/index.d.ts +0 -1
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/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 +6 -8
- 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 +34 -1
- 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 +45 -4
- 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 +4 -1
- 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/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/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-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/index.d.ts +1 -1
- package/dist/phoenix/application-spec/index.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/cleanup-environment.js +1 -1
- package/dist/phoenix/commands/deploy.d.ts +7 -2
- package/dist/phoenix/commands/deploy.js +8 -2
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- 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/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/development-credential.js +1 -1
- package/dist/phoenix/services/frontend-config.d.ts +2 -0
- package/dist/phoenix/services/index.d.ts +4 -2
- package/dist/phoenix/services/index.js +1 -1
- 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.js +1 -1
- 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.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/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/runtime/create-application-runtime.d.ts +14 -16
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +5 -6
- 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/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/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 +3 -1
- package/dist/webhook/builders/webhook-builder.d.ts +5 -0
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +9 -4
- package/schema/domain-spec.json +444 -65
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +0 -32
- 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/use-end-on-unmount.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +0 -68
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +0 -1
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +0 -61
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +0 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +0 -64
- 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/action-factory.d.ts +0 -11
- 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/domain-runtime → configurator/application-runtime/extensions/systems/action-system}/action-factory.js +0 -0
|
@@ -7,7 +7,9 @@ import{createPhoenixProcessGuide as e}from"../../guide.js";let n=`### Source and
|
|
|
7
7
|
|
|
8
8
|
- What the product is, who configures it and what completing a configuration means.
|
|
9
9
|
- Products and families; configurable assemblies versus separate products; reusable parts versus examples or decorative props.
|
|
10
|
+
- Components and relationships: required, optional and repeatable parts; what can be configured, added or removed.
|
|
10
11
|
- Options per part, sizes and units, dependencies and compatibility rules.
|
|
12
|
+
- One representative journey: starting configuration, decision order and intended outcome; selection, add/remove behavior, global versus per-component changes, and what happens for an invalid combination or automatic adjustment. Include a meaningful constraint when one is known; mark provisional assumptions and unknowns.
|
|
11
13
|
- Price basis, mandatory items, premiums, discounts, rounding, tax and delivery.
|
|
12
14
|
- Assets and their state: supplied, converted or stand-in. When tools permit, note model structure, units, orientation, component separation, materials, textures and animations.
|
|
13
15
|
- The source of each fact, and what is provisional or unknown.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createPhoenixIndexGuide as e}from"../../guide.js";import{generatePhoenixBranding as
|
|
1
|
+
import{createPhoenixIndexGuide as e}from"../../guide.js";import{generatePhoenixBranding as t}from"./branding.js";import{generatePhoenixCatalog as n}from"./catalog.js";import{generatePhoenixProductDefinition as o}from"./product-definition.js";import{generatePhoenixUxSpecification as r}from"./ux-specification.js";export const generatePhoenixSpecificationGuides=()=>{let i=[t(),r(),o(),n()];return[e({path:"processes/specification/index.md",title:"Specification",summary:"The client-facing documents later work follows: branding, UX specification, product definition and catalogs; read when creating or changing one, or when work depends on what they define.",intro:"The specification is a set of client-facing documents that every later increment follows. Read only the document the task creates, changes or depends on.",guides:i,notes:["## Sources and PDFs\n\nKeep each document consistent with the current agreed product: when an increment resolves an assumption or changes scope, revise the affected statements rather than leaving a later status note to contradict them. Distinguish agreed requirements from implemented and verified behavior.\n\nEach document keeps its editable source in `.phoenix/workspace/specification/` and a rendered PDF in `docs/`. Edit the source, never the PDF, and render the PDF again in the documented brand whenever the source changes. One re-runnable script in `tools/` that renders every document, for example branded HTML printed to PDF by a headless browser, keeps them on one page size and one look. Later work reads the sources; the PDFs are for the client and travel with the deployed sources. Mark provisional content visibly in both, and name sources by what they are, such as the client's price list, rather than by file paths or internal tool names."]}),...i]};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{createPhoenixProcessGuide as e}from"../../guide.js";let t=`### Source and PDF
|
|
2
|
+
|
|
3
|
+
- Source: \`.phoenix/workspace/specification/ux-specification.md\`.
|
|
4
|
+
- PDF: \`docs/ux-specification.pdf\`, rendered in the brand.
|
|
5
|
+
|
|
6
|
+
Keep decisions and their rationale in the project record.
|
|
7
|
+
|
|
8
|
+
### Patterns
|
|
9
|
+
|
|
10
|
+
Describe the patterns the configurator uses, so every later increment follows them:
|
|
11
|
+
|
|
12
|
+
- Layout on desktop and phone: where the scene, controls, summary and actions sit.
|
|
13
|
+
- Navigation: flat choices, tabs or ordered steps, and when each applies.
|
|
14
|
+
- Which control serves which kind of decision: swatches, cards, selects, inputs or in-scene controls.
|
|
15
|
+
- Selecting, adding and removing parts, global versus per-component edits, and keeping the edited part in view.
|
|
16
|
+
- Constraint feedback and automatic adjustments: what changed, why and how users continue.
|
|
17
|
+
- Messages: violations, provisional prices, saving, errors and empty states.
|
|
18
|
+
- Relevant starting screens, loading feedback and finalization, when it serves the intended outcome.
|
|
19
|
+
|
|
20
|
+
Base each choice on the Phoenix UX guidelines: read \`docs/ux-guidelines/overview.mdx\` with \`pnpm phoenix docs -r <path>\`, then the topic pages it links, such as choosing navigation, choosing a control, interaction modes, canvas and feedback, and presets.
|
|
21
|
+
|
|
22
|
+
### Experience structure
|
|
23
|
+
|
|
24
|
+
Start with the representative journey in the product definition and describe the chosen layout and interaction patterns. As increments add decisions, extend the experience structure: every decision users make, grouped and ordered by what they understand and choose first and by real product dependencies, each with the pattern it uses. It grows with the work rather than being written for the whole scope up front; mark agreed decisions that are not built yet.
|
|
25
|
+
|
|
26
|
+
### Follow them
|
|
27
|
+
|
|
28
|
+
A change that needs a new pattern updates this specification first and is presented to the client as a UX change, rather than arriving silently in code.`;export const generatePhoenixUxSpecification=()=>e({path:"processes/specification/ux-specification.md",title:"UX specification",summary:"The UX patterns every increment follows, and the experience structure that grows from the representative journey; read when writing them or before adding a control, step or screen.",whenToUse:"When [Build](../first-draft/build.md) documents the reviewed core interaction design, when an increment adds a decision to the experience structure, and before any change that adds a control, a step or a screen to a project that has them.",steps:t,doneWhen:"- The specification describes the patterns of the chosen layout, and `docs/ux-specification.pdf` matches the source.\n- The experience structure covers the representative journey and what is built and agreed so far.",example:"For a bottom-sheet layout: options sit in a sheet over the scene on phones and in a right-hand panel on desktop; finishes use named swatches and sizes use cards with dimensions; an added part is selected and framed by the camera; a provisional price reads as an estimate."});
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
let
|
|
1
|
+
let e=e=>`webhookHandlers${e}`;export const generateApplicationSpecWebhookBuilders=(t,o)=>{let i=t.appMetadata.useClerk?` clerk: {
|
|
2
2
|
apiKey: phx.webhooksEnv.CLERK_API_KEY,
|
|
3
3
|
authorizedParties: [phx.webhooksEnv.FRONTEND_URL, phx.webhooksEnv.RESOURCES_URL],
|
|
4
4
|
jwtSecret: phx.webhooksEnv.JWT_SECRET_BASE64,
|
|
5
5
|
oauthClientId: phx.webhooksEnv.OAUTH_PROVIDER_CLIENT_ID,
|
|
6
6
|
oauthClientSecret: phx.webhooksEnv.OAUTH_PROVIDER_CLIENT_SECRET,
|
|
7
7
|
oauthProviderBaseUrl: phx.webhooksEnv.OAUTH_PROVIDER_BASE_URL,
|
|
8
|
-
},`:"",
|
|
9
|
-
.withHandlers(${
|
|
8
|
+
},`:"",a=o.map((t,o)=>{let i=e(o),a=t.replace(/\.tsx?$/,".js");return`import ${i} from '../${a}'`}).join("\n"),r=o.length>0,n=o.map((t,o)=>`{ origin: '${t}', exports: ${e(o)} }`),s=`[${n.join(", ")}]`,l=r?`
|
|
9
|
+
.withHandlers(${s})`:"";return`// Auto-generated by application-spec pipeline. Do not edit.
|
|
10
10
|
import { createDomainWebhook } from '@salsita-ai/sdk/webhook'
|
|
11
11
|
import type { DeploymentAssistant } from '@salsita-ai/sdk/contracts/assistant'
|
|
12
12
|
|
|
13
13
|
import { configuratorBuilder, createI18n } from './domain.js'
|
|
14
14
|
import { customComponentOptics } from './configurator-domain-code.js'
|
|
15
15
|
import { customAdminComponentOptics } from './admin-domain-code.js'
|
|
16
|
-
${
|
|
17
|
-
${
|
|
16
|
+
${a?`
|
|
17
|
+
${a}
|
|
18
18
|
`:""}
|
|
19
|
-
const $assistantServerSettings: Pick<DeploymentAssistant, '
|
|
19
|
+
const $assistantServerSettings: Pick<DeploymentAssistant, 'ai'> | null = ${JSON.stringify(t.configurator.assistantServerSettings?{ai:t.configurator.assistantServerSettings.ai}:null)}
|
|
20
20
|
|
|
21
21
|
const webhookConfiguratorBuilder = configuratorBuilder
|
|
22
22
|
.withComponentOptics(customComponentOptics)
|
|
@@ -39,6 +39,7 @@ export const {
|
|
|
39
39
|
assistantServerSettings: $assistantServerSettings,
|
|
40
40
|
assistantStrictThreads: phx.webhooksEnv.ASSISTANT_STRICT_THREADS,
|
|
41
41
|
${i}
|
|
42
|
+
${t.appMetadata.useCognito?" useCognito: true,":""}
|
|
42
43
|
})
|
|
43
44
|
|
|
44
45
|
// @ts-ignore - Initialize the globals
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
export interface WebhookIndexOptions {
|
|
3
3
|
/** Whether the project has `src/webhooks/index.ts`; without it the entry holds the built-in webhook. */
|
|
4
4
|
readonly hasWebhookEntry: boolean;
|
|
5
|
+
readonly useCognito: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare const generateApplicationSpecWebhookIndex: ({ hasWebhookEntry }: WebhookIndexOptions) => string;
|
|
7
|
+
export declare const generateApplicationSpecWebhookIndex: ({ hasWebhookEntry, useCognito }: WebhookIndexOptions) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{autoHeader as e}from"../common/file-headers.js";export const generateApplicationSpecWebhookIndex=({hasWebhookEntry:o})=>o?`${e("webhook.ts","Webhook entry point — imports builders (sets globalThis.phx.webhooks) then re-exports user handler.")}
|
|
1
|
+
import{autoHeader as e}from"../common/file-headers.js";export const generateApplicationSpecWebhookIndex=({hasWebhookEntry:o,useCognito:s})=>o?`${e("webhook.ts","Webhook entry point — imports builders (sets globalThis.phx.webhooks) then re-exports user handler.")}
|
|
2
2
|
export * as builders from './webhook-builders.js'
|
|
3
3
|
|
|
4
4
|
import implementation from '../src/webhooks/index.js'
|
|
@@ -9,7 +9,7 @@ export * as builders from './webhook-builders.js'
|
|
|
9
9
|
|
|
10
10
|
// A webhook needs at least one handler; anonymous auth stays inert until spec/application.yaml sets useAuthHook
|
|
11
11
|
const authHandler = phx.webhooks.authHandlerBuilder
|
|
12
|
-
.withAnonymousHandler(async () => ({ success: true, data: {}, role: 'anonymous' }))
|
|
12
|
+
.withAnonymousHandler(async () => (${s?"{ success: false }":"{ success: true, data: {}, role: 'anonymous' }"}))
|
|
13
13
|
.build()
|
|
14
14
|
|
|
15
15
|
export const handler = phx.webhooks.webhookBuilder.withAuthHook(authHandler).build()
|
|
@@ -9,9 +9,12 @@ export type MergedAppMetadata = Branded<'MergedAppMetadata', {
|
|
|
9
9
|
readonly pageTitle: string | undefined;
|
|
10
10
|
readonly useAuthHook: boolean;
|
|
11
11
|
readonly useClerk: boolean;
|
|
12
|
+
readonly useCognito: boolean;
|
|
12
13
|
readonly enableAdminRelease: boolean;
|
|
13
14
|
readonly jsonSchemaValidator: 'ajv' | 'csp-compatible';
|
|
14
15
|
readonly gltfDecoder: 'js' | 'wasm';
|
|
16
|
+
readonly gltfDecoderWorkerLimit: number;
|
|
17
|
+
readonly exportPixelRatio: number | undefined;
|
|
15
18
|
readonly collectFinalizeData: boolean;
|
|
16
19
|
}>;
|
|
17
20
|
export declare const MergedAppMetadata: (files: readonly ClassifiedSpecFile[], ctx: ParseContext) => MergedAppMetadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as o,diagnosticMessages as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as o,diagnosticMessages as t}from"../../errors/index.js";let a=["project","applicationVersion","workspace","webComponentTag","pageTitle","useAuthHook","useClerk","useCognito","enableAdminRelease","jsonSchemaValidator","gltfDecoder","gltfDecoderWorkerLimit","exportPixelRatio","collectFinalizeData"];export const MergedAppMetadata=(i,r)=>{let l=((e,i)=>{let r={},l={};for(let n of e)for(let e of a){let a=n.content[e];if(void 0===a)continue;let c=l[e];if(c){i.error(o.DUPLICATE_APP_METADATA_FIELD,t.DUPLICATE_APP_METADATA_FIELD(e,c,n.name));continue}r[e]=a,l[e]=n.name}return r})(i,r),n=l.useClerk??!1,c=l.useCognito??!1;c&&(n||!1===l.useAuthHook)&&r.error(o.COGNITO_AUTH_CONFLICT,t.COGNITO_AUTH_CONFLICT());let s=l.useAuthHook??(n||c);return e({applicationVersion:l.applicationVersion??"0.0.0",workspace:l.workspace??!1,webComponentTag:l.webComponentTag,pageTitle:l.pageTitle,useAuthHook:s,useClerk:n,useCognito:c,enableAdminRelease:l.enableAdminRelease??!1,jsonSchemaValidator:l.jsonSchemaValidator??"ajv",gltfDecoder:l.gltfDecoder??"wasm",gltfDecoderWorkerLimit:l.gltfDecoderWorkerLimit??4,exportPixelRatio:l.exportPixelRatio,collectFinalizeData:l.collectFinalizeData??!1})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{ASSISTANT_HOURLY_LIMIT_LEVELS as t,ASSISTANT_HOURLY_LIMIT_MAXIMA as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{ASSISTANT_HOURLY_LIMIT_LEVELS as t,ASSISTANT_HOURLY_LIMIT_MAXIMA as a,ASSISTANT_MAX_THREAD_SIZE as i,ASSISTANT_MAX_TOOL_CALLS_PER_MESSAGE as s}from"@salsita-ai/contracts/assistant";import{DiagnosticCode as n,diagnosticMessages as r}from"../../errors/index.js";let o=(e,t,a,i)=>{let s=t.flatMap(e=>{let t=a(e.manifest);return t?[{file:e.file,entries:t}]:[]});if(0===s.length)return;let o={},l=new Map;for(let{file:t,entries:a}of s)for(let[s,S]of Object.entries(a)){let a=l.get(s);if(a){i.at("assistant",...e.split("."),s).error(n.ASSISTANT_MERGE_CONFLICT,r.ASSISTANT_MERGE_CONFLICT(e,s,a,t));continue}l.set(s,t),o[s]=S}return o},l=(e,t,a,i)=>{let s,o;for(let l of t){let t=a(l.manifest);if(void 0!==t){if(s){i.at("assistant",e).error(n.DUPLICATE_ASSISTANT_FIELD,r.DUPLICATE_ASSISTANT_FIELD(e,s,l.file));continue}s=l.file,o=t}}return o};export const MergedAssistant=(S,A)=>{let m=S.flatMap(e=>e.content.assistant?[{file:e.name,manifest:e.content.assistant}]:[]);if(0===m.length)return e({manifest:null});let f={entities:o("entities",m,e=>e.entities,A),deletable:o("deletable",m,e=>e.deletable,A),writable:o("writable",m,e=>e.writable,A),childRecipes:o("childRecipes",m,e=>e.childRecipes,A),replaceRecipes:o("replaceRecipes",m,e=>e.replaceRecipes,A),actions:o("actions",m,e=>e.actions,A),screenshots:o("screenshots",m,e=>e.screenshots,A),navigation:((e,t)=>{if(!e.some(e=>e.manifest.navigation))return;let a=o("navigation.navigationStates",e,e=>e.navigation?.navigationStates,t),i=o("navigation.viewStates",e,e=>e.navigation?.viewStates,t),s=o("navigation.toolStates",e,e=>e.navigation?.toolStates,t),n=o("navigation.select",e,e=>e.navigation?.select,t);return{...a&&{navigationStates:a},...i&&{viewStates:i},...s&&{toolStates:s},...n&&{select:n}}})(m,A),formElements:o("formElements",m,e=>e.formElements,A),lenses:l("lenses",m,e=>e.lenses,A),instructions:l("instructions",m,e=>e.instructions,A),webmcp:l("webmcp",m,e=>e.webmcp,A),features:l("features",m,e=>e.features,A),ai:l("ai",m,e=>e.ai,A)},{ai:T}=f;if(!T)return A.at("assistant","ai").error(n.ASSISTANT_MISSING_AI,r.ASSISTANT_MISSING_AI()),e({manifest:null});for(let e of(void 0!==T.maxThreadSize&&T.maxThreadSize>i&&A.at("assistant","ai","maxThreadSize").error(n.ASSISTANT_AI_ABOVE_MAXIMUM,r.ASSISTANT_AI_ABOVE_MAXIMUM("maxThreadSize",T.maxThreadSize,i)),void 0!==T.maxToolCallsPerMessage&&T.maxToolCallsPerMessage>s&&A.at("assistant","ai","maxToolCallsPerMessage").error(n.ASSISTANT_AI_ABOVE_MAXIMUM,r.ASSISTANT_AI_ABOVE_MAXIMUM("maxToolCallsPerMessage",T.maxToolCallsPerMessage,s)),t)){let t=T.hourlyLimits?.[e];void 0!==t&&t>a[e]&&A.at("assistant","ai","hourlyLimits",e).error(n.ASSISTANT_AI_ABOVE_MAXIMUM,r.ASSISTANT_AI_ABOVE_MAXIMUM(`hourlyLimits.${e}`,t,a[e]))}return e({manifest:{...f,ai:T}})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{ParseContext as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{ParseContext as t}from"../core/index.js";import{DiagnosticCode as s,diagnosticMessages as r}from"../errors/index.js";import{CategorizedFiles as a}from"./categorize/index.js";import{MergedSpec as i}from"./merge/index.js";import{RawSpecFiles as p}from"./raw-spec/parse-raw-spec.js";import{RawMockTemplates as o}from"./raw-spec/raw-mock-templates.js";import{ResolvedSpecFiles as l}from"./resolve/index.js";import{ApplicationSpec as n}from"./spec/index.js";export const parseApplicationFiles=(m,c)=>{let{rawProjectFiles:d,phxDefinitions:f}=m,{evalExpressionParser:u,referenceStore:F,parsingContext:g}=c,A=g??new t,w=A.startSpan("parseApplicationFiles","build","parse-application-files.ts"),R=a(d,F,A,c);if(!R)return w(),A.toResult(void 0);let S=A.startSpan("RawSpecFiles","parseApplicationFiles","parse-raw-spec.ts"),T=p(R.spec,A);S();let j=A.startSpan("RawMockTemplates","parseApplicationFiles","raw-mock-templates.ts"),O=o(R.mockTemplates,A);if(j(),!T)return w(),A.toResult(void 0);let k=A.startSpan("ResolvedSpecFiles","parseApplicationFiles","resolved-spec-files.ts"),v=l(T,d,A);k();let x=A.startSpan("MergedSpec","parseApplicationFiles","merged-spec.ts"),H=i(v,A);if(x(),A.hasErrors)return w(),A.toResult(void 0);let M=A.startSpan("ApplicationSpec","parseApplicationFiles","application-spec.ts"),E=n({merged:H,migrationFiles:R.migrations,adminMigrationFiles:R.adminMigrations,transformerFiles:R.transformers.map(e=>e.file.name),phxDefinitions:f,evalExpressionParser:u},A);return(M(),E)?(!R.hasWebhookEntry&&!E.appMetadata.useCognito&&(E.appMetadata.useAuthHook||E.appMetadata.useClerk)&&A.warning(s.AUTH_WITHOUT_PROJECT_WEBHOOK,r.AUTH_WITHOUT_PROJECT_WEBHOOK()),w(),A.toResult(e({rawProjectFiles:d,categorizedFiles:R,rawMockTemplates:O,applicationSpec:E}))):(w(),A.toResult(void 0))};
|
|
@@ -3,7 +3,8 @@ import { type EnhancedJsonSchemaType } from '../../core/enhanced-json-schema.js'
|
|
|
3
3
|
/**
|
|
4
4
|
* One action declared under the top-level `actions:` block: a domain operation the project
|
|
5
5
|
* implements in `src/actions/` and the application runs through the action system. `params` and
|
|
6
|
-
* `result` are maps of named enhanced JSON schemas;
|
|
6
|
+
* `result` are maps of named enhanced JSON schemas; `result` is optional, and an action that reports
|
|
7
|
+
* nothing leaves it out or sets it to `null`. A `phx:DomainEntityId` param with `references`
|
|
7
8
|
* is typed by the referenced entity type or alias, and a `phx:$DomainEntity` result member with
|
|
8
9
|
* `references` is typed as the enhanced entity. The `description` of the action and of each param
|
|
9
10
|
* and result member documents it in the generated types; whoever exposes the action can reuse it.
|
|
@@ -11,7 +12,7 @@ import { type EnhancedJsonSchemaType } from '../../core/enhanced-json-schema.js'
|
|
|
11
12
|
export interface RawActionEntry {
|
|
12
13
|
readonly description?: string;
|
|
13
14
|
readonly params: Readonly<Record<string, EnhancedJsonSchemaType>>;
|
|
14
|
-
readonly result
|
|
15
|
+
readonly result?: Readonly<Record<string, EnhancedJsonSchemaType>> | null;
|
|
15
16
|
}
|
|
16
17
|
/** Record of all action entries keyed by action name, produced by `rawSpecFileSchema` for the `actions:` block. */
|
|
17
18
|
export type RawActions = Readonly<Record<string, RawActionEntry>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"zod";import{enhancedJsonSchema as
|
|
1
|
+
import{z as e}from"zod";import{enhancedJsonSchema as t}from"../../core/enhanced-json-schema.js";let r=t=>e.string().regex(/^[A-Za-z][A-Za-z0-9_]*$/,`is not a valid ${t} name: use letters, digits and underscores, starting with a letter, e.g. "partId"`),a=e.object({description:e.string().optional(),params:e.record(r("parameter"),t,{required_error:"is required: declare the parameters of the action as a map of named schemas, empty when it takes none",invalid_type_error:"must be a map of parameter names to JSON schemas"}),result:e.record(r("result member"),t,{invalid_type_error:"must be a map of result member names to JSON schemas, or null when the action reports nothing"}).refine(e=>Object.keys(e).length>0,{message:"must not be empty: set `result` to null or leave it out when the action reports nothing"}).nullable().optional()}).strict();export const rawActionsSchema=e.record(e.string(),a).readonly();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type AssistantAiSettings } from '@salsita-ai/contracts/assistant';
|
|
3
3
|
import { ASSISTANT_HINTS, type AssistantFormAttribute, type AssistantFormRole } from '#package/domain';
|
|
4
|
+
import { type EnhancedJsonSchemaType } from '../../core/enhanced-json-schema.js';
|
|
4
5
|
/**
|
|
5
6
|
* One whitelisted field in the assistant manifest. `description` overrides the JSON Schema
|
|
6
7
|
* description of the shape property; `as` exposes the field under a different GraphQL name; `lenses`
|
|
@@ -19,13 +20,16 @@ export interface RawAssistantField {
|
|
|
19
20
|
* the form collects it into the answer and where the prompt lists it, with `description` after its
|
|
20
21
|
* signature. `attributes` are flat scalars beside the built-in `label`, each a JSON Schema of the
|
|
21
22
|
* keywords `AssistantFormAttribute` allows, and `required` names those the model must write. An
|
|
22
|
-
* option or an input that takes a `value` declares it like any other attribute.
|
|
23
|
+
* option or an input that takes a `value` declares it like any other attribute. An input may declare
|
|
24
|
+
* the `state` its component holds, as an Enhanced JSON Schema like an action's params: it only types
|
|
25
|
+
* the component's `state` and `onChange`, since the state never leaves the browser.
|
|
23
26
|
*/
|
|
24
27
|
export interface RawAssistantFormElement {
|
|
25
28
|
readonly description: string;
|
|
26
29
|
readonly role: AssistantFormRole;
|
|
27
30
|
readonly attributes?: Readonly<Record<string, AssistantFormAttribute>>;
|
|
28
31
|
readonly required?: readonly string[];
|
|
32
|
+
readonly state?: EnhancedJsonSchemaType;
|
|
29
33
|
}
|
|
30
34
|
/**
|
|
31
35
|
* One lens of the assistant `lenses` map, keyed by the name the agent spreads it by: a named
|
|
@@ -74,9 +78,12 @@ export interface RawAssistantFieldOptions {
|
|
|
74
78
|
/**
|
|
75
79
|
* One writable field of the assistant `writable` map. An empty entry (`width:` in YAML) declares the
|
|
76
80
|
* stored field writable, linked to the component that holds its choices when one instance writes it;
|
|
77
|
-
* `options` sets up that link, and `options: null` declares the field without one.
|
|
81
|
+
* `options` sets up that link, and `options: null` declares the field without one. `description`
|
|
82
|
+
* tells the agent what writing the field does; without it, the delta field takes the description of
|
|
83
|
+
* the field it is exposed as, and the domain model's description when it is not exposed.
|
|
78
84
|
*/
|
|
79
85
|
export interface RawAssistantWritableField {
|
|
86
|
+
readonly description?: string;
|
|
80
87
|
readonly options?: RawAssistantFieldOptions | null;
|
|
81
88
|
}
|
|
82
89
|
/**
|
|
@@ -114,6 +121,48 @@ export interface RawAssistantScreenshot {
|
|
|
114
121
|
readonly description: string;
|
|
115
122
|
readonly as?: string;
|
|
116
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* One UI state of the assistant `navigation` section, keyed by the state as the spec declares it
|
|
126
|
+
* under `navigationStates`, `viewStates` or `toolStates`: it lets the agent move the user to that
|
|
127
|
+
* state when the configurator's UI offers it. `description` tells the agent what the user sees in
|
|
128
|
+
* it; `as` is the name the agent reads and sets it by, the state itself by default.
|
|
129
|
+
*/
|
|
130
|
+
export interface RawAssistantNavigationState {
|
|
131
|
+
readonly description: string;
|
|
132
|
+
readonly as?: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* One entity type or alias of the assistant `navigation.select` section: it lets the agent select an
|
|
136
|
+
* entity of the type when the configurator's UI lets the user select it. `description` tells the
|
|
137
|
+
* agent what selecting such an entity does for the user. `null` exposes the type without one.
|
|
138
|
+
*/
|
|
139
|
+
export interface RawAssistantSelect {
|
|
140
|
+
readonly description?: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The assistant `navigation` section: per kind of UI state, the states the agent may move the user
|
|
144
|
+
* to, and under `select` the entity types or aliases it may select an entity of. A kind left out
|
|
145
|
+
* exposes none.
|
|
146
|
+
*/
|
|
147
|
+
export interface RawAssistantNavigation {
|
|
148
|
+
readonly navigationStates?: Readonly<Record<string, RawAssistantNavigationState>>;
|
|
149
|
+
readonly viewStates?: Readonly<Record<string, RawAssistantNavigationState>>;
|
|
150
|
+
readonly toolStates?: Readonly<Record<string, RawAssistantNavigationState>>;
|
|
151
|
+
readonly select?: Readonly<Record<string, RawAssistantSelect | null>>;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* The parts of the assistant panel the spec switches off under `assistant.features`; a flag left out
|
|
155
|
+
* is on. `drawings` and `forms` drop their system-prompt sections. `images` hides attaching images,
|
|
156
|
+
* and `annotations` hides annotating together with the prompt's lines about annotations. With
|
|
157
|
+
* `images` and `annotations` both off, the prompt's "Images from the user" section goes too, and
|
|
158
|
+
* with no screenshots exposed either, the server takes no images for the session.
|
|
159
|
+
*/
|
|
160
|
+
export interface RawAssistantFeatures {
|
|
161
|
+
readonly drawings?: boolean;
|
|
162
|
+
readonly forms?: boolean;
|
|
163
|
+
readonly images?: boolean;
|
|
164
|
+
readonly annotations?: boolean;
|
|
165
|
+
}
|
|
117
166
|
/**
|
|
118
167
|
* Experimental assistant manifest authored under the `assistant` root key. `entities` whitelists the
|
|
119
168
|
* stored fields the generated GraphQL schema exposes, keyed by entity type or alias name and then by
|
|
@@ -126,17 +175,24 @@ export interface RawAssistantScreenshot {
|
|
|
126
175
|
* groups whose recipes the agent may list and replace the entity by with `replaceEntity`. `actions`
|
|
127
176
|
* names the declared actions the agent may run as custom mutations. `screenshots` names, per entity
|
|
128
177
|
* type or alias, the `agentScreenshot` views the agent may take a screenshot of the entity from.
|
|
178
|
+
* `navigation` names, per kind, the navigation, view and tool states the agent may move the user to,
|
|
179
|
+
* and the entity types or aliases it may select an entity of.
|
|
129
180
|
* Nothing is exposed without an entry. `lenses` declares the named selections that `entities`
|
|
130
181
|
* entries are tagged with, and `formElements` the project's own elements of the forms the agent
|
|
131
182
|
* asks the user with.
|
|
132
183
|
*
|
|
133
184
|
* The manifest can be split across spec files: each section keyed by entity type, action or form
|
|
134
|
-
* element name merges per key, while `ai`, `instructions` and `lenses` are declared in one
|
|
135
|
-
* each, and `ai` in exactly one.
|
|
185
|
+
* element name merges per key, `navigation` per kind and state, while `ai`, `instructions`, `webmcp`, `features` and `lenses` are declared in one
|
|
186
|
+
* file each, and `ai` in exactly one.
|
|
136
187
|
*
|
|
137
|
-
* `ai`
|
|
138
|
-
*
|
|
139
|
-
*
|
|
188
|
+
* `ai` is for the server only: the provider, model tier and reasoning level the deployment's
|
|
189
|
+
* assistant runs with. It is sent when a deployment is prepared and never reaches the application
|
|
190
|
+
* bundle. `instructions` is the integrator's own guidance for the assistant: the server appends it to
|
|
191
|
+
* the system prompt, and the WebMCP guide returns it, so it is part of the application bundle and
|
|
192
|
+
* visitors and their agents can read it. `webmcp: false` stops the configurator from offering its
|
|
193
|
+
* assistant tools to the AI agents in the visitor's browser through WebMCP, which it does by default
|
|
194
|
+
* and when the spec says `webmcp: true`. `features` switches off parts of the assistant panel: each
|
|
195
|
+
* flag left out is on.
|
|
140
196
|
*/
|
|
141
197
|
export interface RawAssistant {
|
|
142
198
|
readonly entities?: Readonly<Record<string, Readonly<Record<string, RawAssistantField | null>>>>;
|
|
@@ -146,9 +202,12 @@ export interface RawAssistant {
|
|
|
146
202
|
readonly replaceRecipes?: Readonly<Record<string, Readonly<Record<string, RawAssistantRecipeGroup | null>>>>;
|
|
147
203
|
readonly actions?: Readonly<Record<string, RawAssistantAction | null>>;
|
|
148
204
|
readonly screenshots?: Readonly<Record<string, Readonly<Record<string, RawAssistantScreenshot>>>>;
|
|
205
|
+
readonly navigation?: RawAssistantNavigation;
|
|
149
206
|
readonly lenses?: Readonly<Record<string, RawAssistantLens>>;
|
|
150
207
|
readonly formElements?: Readonly<Record<string, RawAssistantFormElement>>;
|
|
151
208
|
readonly instructions?: string;
|
|
209
|
+
readonly webmcp?: boolean;
|
|
210
|
+
readonly features?: RawAssistantFeatures;
|
|
152
211
|
readonly ai?: AssistantAiSettings;
|
|
153
212
|
}
|
|
154
213
|
/** A GraphQL name the schema may use for a field or type: letters, digits and `_`, not starting with a digit or `__`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"zod";import{ASSISTANT_AI_PROVIDERS as t,ASSISTANT_MODEL_TIERS as o,ASSISTANT_REASONING_LEVELS as n}from"@salsita-ai/contracts/assistant";import{ASSISTANT_FORM_NAME_PATTERN as i,ASSISTANT_HINTS as r}from"#package/domain";export const ASSISTANT_OPTION_COMPONENT_TYPES=["materialSwatch","attributeSelection","distanceDimensionSelect"];export const GRAPHQL_NAME_PATTERN=/^(?!__)[_A-Za-z][_0-9A-Za-z]*$/;let
|
|
1
|
+
import{z as e}from"zod";import{ASSISTANT_AI_PROVIDERS as t,ASSISTANT_MODEL_TIERS as o,ASSISTANT_REASONING_LEVELS as n}from"@salsita-ai/contracts/assistant";import{ASSISTANT_FORM_NAME_PATTERN as i,ASSISTANT_HINTS as r}from"#package/domain";import{enhancedJsonSchema as a}from"../../core/enhanced-json-schema.js";export const ASSISTANT_OPTION_COMPONENT_TYPES=["materialSwatch","attributeSelection","distanceDimensionSelect"];export const GRAPHQL_NAME_PATTERN=/^(?!__)[_A-Za-z][_0-9A-Za-z]*$/;let s=e.string().regex(GRAPHQL_NAME_PATTERN,'must be a GraphQL name: letters, digits and "_", not starting with a digit or "__"'),l=t=>e.enum(t,{errorMap:()=>({message:`must be one of: ${t.join(", ")}`})}),m=e.object({description:e.string().optional(),as:s.optional(),lenses:e.array(e.string()).optional()}).strict(),p="must be a whole number of at least 1; remove the key to nest tagged relations one level",c=e.object({description:e.string().trim().min(1,"must not be empty; say when the agent should use the lens"),maxDepth:e.number({invalid_type_error:p}).int(p).min(1,p).optional()}).strict(),u=s.refine(e=>!e.includes("__"),'must not contain "__", which names the generated copies of a lens'),d=e.array(l(r)),h=e.object({description:e.string().optional(),options:e.object({componentType:l(ASSISTANT_OPTION_COMPONENT_TYPES).optional(),instanceName:e.string().min(1,"must not be empty; name the component instance that holds the choices").optional(),as:s.optional(),validate:e.boolean().optional(),allowDryRuns:e.boolean().optional(),hints:d.optional()}).strict().refine(({componentType:e,instanceName:t})=>void 0===e==(void 0===t),'must give "componentType" and "instanceName" together, or neither to use the one option component instance that writes the field').nullable().optional()}).strict(),b=e.object({as:s.optional(),description:e.string().optional(),allowDryRuns:e.boolean().optional(),hints:d.optional()},{errorMap:(t,o)=>({message:t.code===e.ZodIssueCode.unrecognized_keys?`${o.defaultError}. A recipe group takes "as", "description", "allowDryRuns" and "hints"; the groups of a type go directly under it, keyed by instance name, with no "groups" level`:o.defaultError})}).strict(),g=e.object({description:e.string().optional(),as:s.optional()}).strict(),y=["enum","pattern","minimum","maximum","minLength","maxLength"],v=["enum","pattern","minLength","maxLength"],f=["enum","minimum","maximum"],_=e.object({type:l(["string","number","integer","boolean"]),enum:e.array(e.union([e.string(),e.number()])).min(1,"must list at least one value").optional(),pattern:e.string().refine(e=>{try{return RegExp(e,"u"),!0}catch{return!1}},"must be a regular expression, as in JSON Schema").optional(),minimum:e.number().optional(),maximum:e.number().optional(),minLength:e.number().int().nonnegative().optional(),maxLength:e.number().int().nonnegative().optional()}).strict().superRefine((t,o)=>{let n="string"===t.type?v:"boolean"===t.type?[]:f;for(let i of y)void 0===t[i]||n.includes(i)||o.addIssue({code:e.ZodIssueCode.custom,path:[i],message:`does not apply to an attribute of type "${t.type}"; remove it or change the type`});let i="string"===t.type?"string":"number";for(let[n,r]of("boolean"!==t.type&&t.enum?.some(e=>typeof e!==i||"integer"===t.type&&!Number.isInteger(e))&&o.addIssue({code:e.ZodIssueCode.custom,path:["enum"],message:`must list only ${"integer"===t.type?"whole number":i}s, since the attribute is of type "${t.type}"`}),[["minimum","maximum"],["minLength","maxLength"]])){let[i,a]=[t[n],t[r]];void 0!==i&&void 0!==a&&i>a&&o.addIssue({code:e.ZodIssueCode.custom,path:[n],message:`must not be greater than "${r}", or no value could satisfy the attribute`})}}),w=e.string().regex(i,'must start with a lowercase letter and hold only lowercase letters, digits and "-", since the panel reads form markup in lowercase'),j=e.object({description:e.string().trim().min(1,"must not be empty; say what the element is for and where the agent may use it"),role:l(["group","choice","choices","option","input"]),attributes:e.record(w,_).optional(),required:e.array(e.string()).optional(),state:a.optional()}).strict(),x=e.object({description:e.string().trim().min(1,"must not be empty; say what the view shows"),as:s.optional()}).strict(),S=e.object({description:e.string().trim().min(1,"must not be empty; say what the user sees in this state"),as:e.string().optional()}).strict(),T=e.object({description:e.string().trim().min(1,"must not be empty; say what selecting the entity does for the user").optional()}).strict(),N=e.record(e.string(),S).optional(),k=e.object({navigationStates:N,viewStates:N,toolStates:N,select:e.record(e.string(),T.nullable()).optional()}).strict(),A=`must be an object: declare provider (${t.join(", ")}), model (${o.join(", ")}) and reasoning (${n.join(", ")})`,E="must be a positive whole number of input tokens; remove the key to use the default of the server",I="must be a positive whole number of tool calls; remove the key to use the default of the server",L="must be a positive whole number of days; remove the key to keep conversations forever",P="must be a positive whole number of weighted tokens per hour; remove the key to use the default of the server",R=e.number({invalid_type_error:P}).int(P).positive(P).optional(),$=e.object({sub:R,ip:R,project:R},{invalid_type_error:"must be an object with any of sub, ip and project"}).strict(),O=e.object({provider:l(t),model:l(o),reasoning:l(n),maxThreadSize:e.number({invalid_type_error:E}).int(E).positive(E).optional(),maxToolCallsPerMessage:e.number({invalid_type_error:I}).int(I).positive(I).optional(),hourlyLimits:$.optional(),retentionDays:e.number({invalid_type_error:L}).int(L).positive(L).optional(),voice:e.boolean({invalid_type_error:"must be true or false"}).optional()},{invalid_type_error:A}).strict(),C=e.object({drawings:e.boolean().optional(),forms:e.boolean().optional(),images:e.boolean().optional(),annotations:e.boolean().optional()}).strict();export const rawAssistantSchema=e.object({entities:e.record(e.string(),e.record(e.string(),m.nullable())).optional(),deletable:e.record(e.string(),e.object({}).strict().nullable()).optional(),writable:e.record(e.string(),e.record(e.string(),h.nullable())).optional(),childRecipes:e.record(e.string(),e.record(e.string(),b.nullable())).optional(),replaceRecipes:e.record(e.string(),e.record(e.string(),b.nullable())).optional(),actions:e.record(e.string(),g.nullable()).optional(),screenshots:e.record(e.string(),e.record(e.string(),x)).optional(),navigation:k.optional(),lenses:e.record(u,c).optional(),formElements:e.record(w,j).optional(),instructions:e.string().trim().min(1,"must not be empty; remove the key when there are no instructions").optional(),webmcp:e.boolean().optional(),features:C.optional(),ai:O.optional()}).strict();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"lodash-es/isEqual.js";import{P as t,match as r}from"ts-pattern";import{z as n}from"zod";import{ComponentSystemFilterSchema as a,componentsByName as i,getAllPhxDefinitions as o,getExtendedSchemaValidator as s}from"#package/domain";import{EVAL_MARKER_KEY as d,FILTER_KEY as m,READ_MARKER_KEY as p,bindMarkerDefinition as c,enhancedJsonValueSchema as l,readMarkerDefinition as f,readWriteMarkerDefinition as h,writeMarkerDefinition as y}from"../../core/index.js";let u={Read:f,Write:y,Bind:c,ReadWrite:h,Eval:{type:"object",properties:{[d]:{type:"string"}},required:[d],additionalProperties:!1}},b={anyOf:[{$ref:"#/definitions/Read"},{$ref:"#/definitions/Eval"}]},g={$ref:"#/definitions/ReadWrite"}
|
|
1
|
+
import e from"lodash-es/isEqual.js";import{P as t,match as r}from"ts-pattern";import{z as n}from"zod";import{ComponentSystemFilterSchema as a,componentsByName as i,getAllPhxDefinitions as o,getExtendedSchemaValidator as s}from"#package/domain";import{EVAL_MARKER_KEY as d,FILTER_KEY as m,READ_MARKER_KEY as p,bindMarkerDefinition as c,enhancedJsonValueSchema as l,readMarkerDefinition as f,readWriteMarkerDefinition as h,writeMarkerDefinition as y}from"../../core/index.js";let u={Read:f,Write:y,Bind:c,ReadWrite:h,Eval:{type:"object",properties:{[d]:{type:"string"}},required:[d],additionalProperties:!1}},b={anyOf:[{$ref:"#/definitions/Read"},{$ref:"#/definitions/Eval"}]},g={$ref:"#/definitions/ReadWrite"},$=[{readName:"EnhancedStringRead",readWriteName:"EnhancedStringReadWrite",schema:{type:"string"}},{readName:"EnhancedNumberRead",readWriteName:"EnhancedNumberReadWrite",schema:{type:"number"}},{readName:"EnhancedBooleanRead",readWriteName:"EnhancedBooleanReadWrite",schema:{type:"boolean"}}],j=(e,n)=>({...e,...r(e).with({type:"object",properties:t.not(t.nullish).select()},e=>({properties:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,E(t,n.includes(e))]))})).with({type:"object",additionalProperties:t.not(t.nullish.or(t.boolean)).select()},e=>({additionalProperties:E(e,!1)})).with({type:"object",patternProperties:t.not(t.nullish).select()},e=>({patternProperties:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,E(t,!1)]))})).with({type:"array",items:t.not(t.nullish).select()},e=>({items:j(e,[])})).with({anyOf:t.array().select()},e=>({anyOf:e.map(e=>j(e,[]))})).with({oneOf:t.array().select()},e=>({oneOf:e.map(e=>j(e,[]))})).otherwise(()=>({}))}),O=(e,t)=>({anyOf:[j(e,[]),t?{$ref:"#/definitions/ReadWriteEnhancement"}:{$ref:"#/definitions/ReadEnhancement"}]}),E=(t,r)=>{let n=$.find(r=>e(t,r.schema));return n?{$ref:`#/definitions/${r?n.readWriteName:n.readName}`}:O(t,r)},R={anyOf:[...j(a,[]).anyOf??[],{$ref:"#/definitions/Read"}]},w=Object.fromEntries($.flatMap(e=>[[e.readName,O(e.schema,!1)],[e.readWriteName,O(e.schema,!0)]])),W=new Map,N=e=>{let t=W.get(e.name);if(t)return t;let r=(e=>{let{definitions:t,...r}=j(e.schema,e.writableKeys);return{anyOf:[{...r,properties:{...r.properties,[m]:{$ref:"#/definitions/ComponentSystemFilter"}}},{type:"object",properties:{[p]:{type:"string",pattern:"^\\$?[a-z]\\w*$"},[m]:{$ref:"#/definitions/ComponentSystemFilter"}},required:[p],additionalProperties:!1}],definitions:{...u,...o(),...w,ComponentSystemFilter:R,ReadEnhancement:b,ReadWriteEnhancement:g}}})(e),n=s().compile(r);return W.set(e.name,n),n},P=e=>{let t=e.params?.allowedValues;return"enum"===e.keyword&&Array.isArray(t)?`${e.message}: ${t.map(String).join(", ")}`:e.message},S=e=>e.filter(e=>e.message).map(e=>e.instancePath?`at ${e.instancePath}: ${P(e)}`:P(e)).join("; "),C=n.record(n.string(),n.record(n.string(),n.record(n.string(),n.record(n.string(),l).readonly()).readonly()).readonly());export const rawComponentsSchema=C.superRefine((e,t)=>{for(let[r,a]of Object.entries(e))for(let[e,o]of Object.entries(a)){let a=i.get(e);if(!a){t.addIssue({code:n.ZodIssueCode.custom,path:[r,e],message:`Unknown component type "${e}". Check the component name against the list of available system components.`});continue}for(let[i,s]of Object.entries(o)){let o=N(a);!o(s)&&o.errors&&t.addIssue({code:n.ZodIssueCode.custom,path:[r,e,i],message:`Schema validation failed: ${S(o.errors)}`})}}});
|
|
@@ -49,9 +49,9 @@ export interface RawSpecContent {
|
|
|
49
49
|
readonly textLanguages?: readonly string[];
|
|
50
50
|
readonly transformers?: readonly RawTransformerEntry[];
|
|
51
51
|
/**
|
|
52
|
-
* The server project this application is developed in
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* The slug of the server project this application is developed in and deployed to. Read only by the CLI, which
|
|
53
|
+
* `--project` overrides and which chooses from the reachable projects when it is missing; it never reaches the
|
|
54
|
+
* generated application.
|
|
55
55
|
*/
|
|
56
56
|
readonly project?: string;
|
|
57
57
|
readonly applicationVersion?: string;
|
|
@@ -60,9 +60,12 @@ export interface RawSpecContent {
|
|
|
60
60
|
readonly pageTitle?: string;
|
|
61
61
|
readonly useAuthHook?: boolean;
|
|
62
62
|
readonly useClerk?: boolean;
|
|
63
|
+
readonly useCognito?: boolean;
|
|
63
64
|
readonly enableAdminRelease?: boolean;
|
|
64
65
|
readonly jsonSchemaValidator?: 'ajv' | 'csp-compatible';
|
|
65
66
|
readonly gltfDecoder?: 'js' | 'wasm';
|
|
67
|
+
readonly gltfDecoderWorkerLimit?: number;
|
|
68
|
+
readonly exportPixelRatio?: number;
|
|
66
69
|
readonly appLoader?: 'legacy' | 'universal';
|
|
67
70
|
readonly collectFinalizeData?: boolean;
|
|
68
71
|
readonly env?: RawEnv;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as o}from"zod";import{Branded as
|
|
1
|
+
import{z as o}from"zod";import{Branded as t}from"@salsita-ai/common/utils";import{enhancedJsonObjectSchema as a}from"../../core/index.js";import{validateNoLegacyCodeRef as e}from"../../enhanced-json/index.js";import{DiagnosticCode as n,diagnosticMessages as i}from"../../errors/index.js";import{rawAclSchema as r}from"./raw-acl.js";import{rawActionsSchema as s}from"./raw-actions.js";import{rawAdminPagesSchema as l}from"./raw-admin-pages.js";import{rawAssistantSchema as p}from"./raw-assistant.js";import{rawBudgetsSchema as m}from"./raw-budgets.js";import{rawChunksSchema as c}from"./raw-chunks.js";import{rawComponentsSchema as f}from"./raw-components.js";import{rawConstantsSchema as d}from"./raw-constants.js";import{rawDataSpecSchema as u}from"./raw-data.js";import{rawDefaultsSchema as j}from"./raw-defaults.js";import{rawEnvSchema as b}from"./raw-env.js";import{rawExpressionsSchema as w}from"./raw-expressions.js";import{rawInvariantsSchema as g}from"./raw-invariants.js";import{rawModelSchema as S}from"./raw-model.js";import{rawPresetsSchema as v}from"./raw-presets.js";import{rawRelationsSchema as D}from"./raw-relations.js";import{rawResourcesConfigSchema as h,rawResourcesSchema as O}from"./raw-resources.js";import{rawStateValuesSchema as R}from"./raw-states.js";import{rawTransformersSchema as k}from"./raw-transformers.js";export const DATA_SCHEMA_KEYS=["publishedData","sessionData","frontendData","backendData","finalizeData","prefetchedFinalizeData","finalizeResult","callbackData"];let x=o.object({$admin:o.boolean().optional(),model:S.optional(),components:f.optional(),presets:v.optional(),$data:u.optional(),expressions:w.optional(),actions:s.optional(),invariants:g.optional(),constants:d.optional(),relations:D.optional(),defaults:j.optional(),publishedData:a.optional(),sessionData:a.optional(),frontendData:a.optional(),backendData:a.optional(),finalizeData:a.optional(),prefetchedFinalizeData:a.optional(),finalizeResult:a.optional(),callbackData:a.optional(),navigationStates:R.optional(),viewStates:R.optional(),toolStates:R.optional(),exportStates:R.optional(),themePreset:o.string().optional(),themeOptions:o.record(o.unknown()).optional(),preview:o.enum(["always","never","auto","hide"]).optional(),alwaysExpand:o.boolean().optional(),availableLocales:o.array(o.string()).optional(),textLanguages:o.array(o.string()).optional(),transformers:k.optional(),project:o.string().regex(/^[a-z0-9-]{3,}$/,"must be a project slug (lowercase letters, digits and dashes, at least 3)").optional(),applicationVersion:o.string().optional(),workspace:o.boolean().optional(),webComponentTag:o.string().optional(),pageTitle:o.string().optional(),useAuthHook:o.boolean().optional(),useClerk:o.boolean().optional(),useCognito:o.boolean().optional(),enableAdminRelease:o.boolean().optional(),jsonSchemaValidator:o.enum(["ajv","csp-compatible"]).optional(),gltfDecoder:o.enum(["js","wasm"]).optional(),gltfDecoderWorkerLimit:o.number().int().positive().optional(),exportPixelRatio:o.number().positive().finite().optional(),appLoader:o.enum(["legacy","universal"]).optional(),collectFinalizeData:o.boolean().optional(),env:b.optional(),acl:r.optional(),resources:O.optional(),resourcesConfig:h.optional(),budgets:m.optional(),chunks:c.optional(),assistant:p.optional(),$adminPages:l.optional()}).strict();export const parseRawSpecFile=(o,a)=>{e(o.content,a);let r=x.safeParse(o.content);if(!r.success){for(let o of r.error.issues)a.error(n.SCHEMA_PARSE_ERROR,i.SCHEMA_PARSE_ERROR(o.path.join("."),o.message));return}let{constants:s,...l}=r.data,p=((o,t)=>{let a=Object.fromEntries(Object.entries(o.expressions??{}).map(([o,t])=>[o,{...t}]));if(void 0===o.constants)return Object.keys(a).length>0?a:void 0;for(let[e,r]of Object.entries(o.constants))for(let[o,s]of(a[e]||(a[e]={}),Object.entries(r))){if(void 0!==a[e][o]){t.at("constants",e,o).error(n.CONSTANTS_EXPRESSION_CONFLICT,i[n.CONSTANTS_EXPRESSION_CONFLICT](e,o));continue}a[e][o]={kind:"value",constant:!0,value:s,schema:{}}}return Object.keys(a).length>0?a:void 0})(r.data,a);return t({name:o.name,content:{...l,expressions:p}})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mapSchema as e,resolveProjectFileImport as t,resolveProjectPath as r}from"../../core/index.js";import{DiagnosticCode as o,diagnosticMessages as s}from"../../errors/index.js";import{DATA_SCHEMA_KEYS as n}from"../raw-spec/index.js";let m=(n,m,a,i)=>e(n,(e,n)=>e.import?{...e,import:e.import.map((e,p)=>{if(!e.module.startsWith("."))return e;let c=r(m,e.module),O=i.at(...n,"import",String(p),"module");c.escapedProjectRoot?O.warning(o.IMPORT_MODULE_OUTSIDE_PROJECT,s[o.IMPORT_MODULE_OUTSIDE_PROJECT](e.module,c.path)):t(m,e.module,a)||O.error(o.IMPORT_MODULE_NOT_FOUND,s[o.IMPORT_MODULE_NOT_FOUND](e.module,c.path));let l=c.path.startsWith(".")?c.path:`./${c.path}`;return{...e,module:l}})}:e);export const resolveImportModules=(e,t,r)=>{let o=e.content.model?Object.fromEntries(Object.entries(e.content.model).map(([o,s])=>[o,{...s,...s.commonTypes?{commonTypes:Object.fromEntries(Object.entries(s.commonTypes).map(([s,n])=>[s,m(n,e.name,t,r.at("model",o,"commonTypes",s))]))}:{},...s.shapes?{shapes:Object.fromEntries(Object.entries(s.shapes).map(([s,n])=>[s,Object.fromEntries(Object.entries(n).map(([n,a])=>[n,m(a,e.name,t,r.at("model",o,"shapes",s,n))]))]))}:{}}])):void 0,s=e.content.expressions?Object.fromEntries(Object.entries(e.content.expressions).map(([o,s])=>[o,Object.fromEntries(Object.entries(s).map(([s,n])=>[s,{...n,schema:m(n.schema,e.name,t,r.at("expressions",o,s))}]))])):void 0,a=e.content.actions?Object.fromEntries(Object.entries(e.content.actions).map(([o,s])=>{let n=(s,n)=>Object.fromEntries(Object.entries(s).map(([s,a])=>[s,m(a,e.name,t,r.at("actions",o,n,s))]));return[o,{...s,params:n(s.params,"params")
|
|
1
|
+
import{mapSchema as e,resolveProjectFileImport as t,resolveProjectPath as r}from"../../core/index.js";import{DiagnosticCode as o,diagnosticMessages as s}from"../../errors/index.js";import{DATA_SCHEMA_KEYS as n}from"../raw-spec/index.js";let m=(n,m,a,i)=>e(n,(e,n)=>e.import?{...e,import:e.import.map((e,p)=>{if(!e.module.startsWith("."))return e;let c=r(m,e.module),O=i.at(...n,"import",String(p),"module");c.escapedProjectRoot?O.warning(o.IMPORT_MODULE_OUTSIDE_PROJECT,s[o.IMPORT_MODULE_OUTSIDE_PROJECT](e.module,c.path)):t(m,e.module,a)||O.error(o.IMPORT_MODULE_NOT_FOUND,s[o.IMPORT_MODULE_NOT_FOUND](e.module,c.path));let l=c.path.startsWith(".")?c.path:`./${c.path}`;return{...e,module:l}})}:e);export const resolveImportModules=(e,t,r)=>{let o=e.content.model?Object.fromEntries(Object.entries(e.content.model).map(([o,s])=>[o,{...s,...s.commonTypes?{commonTypes:Object.fromEntries(Object.entries(s.commonTypes).map(([s,n])=>[s,m(n,e.name,t,r.at("model",o,"commonTypes",s))]))}:{},...s.shapes?{shapes:Object.fromEntries(Object.entries(s.shapes).map(([s,n])=>[s,Object.fromEntries(Object.entries(n).map(([n,a])=>[n,m(a,e.name,t,r.at("model",o,"shapes",s,n))]))]))}:{}}])):void 0,s=e.content.expressions?Object.fromEntries(Object.entries(e.content.expressions).map(([o,s])=>[o,Object.fromEntries(Object.entries(s).map(([s,n])=>[s,{...n,schema:m(n.schema,e.name,t,r.at("expressions",o,s))}]))])):void 0,a=e.content.actions?Object.fromEntries(Object.entries(e.content.actions).map(([o,s])=>{let n=(s,n)=>Object.fromEntries(Object.entries(s).map(([s,a])=>[s,m(a,e.name,t,r.at("actions",o,n,s))]));return[o,{...s,params:n(s.params,"params"),...s.result?{result:n(s.result,"result")}:{}}]})):void 0,i=Object.fromEntries(n.flatMap(o=>{let s,n=e.content[o];return n?[[o,{...s=m(n,e.name,t,r.at(o)),type:"object",properties:s.properties??{},required:s.required??[],additionalProperties:!1}]]:[]}));return{...e.content,...o?{model:o}:{},...s?{expressions:s}:{},...a?{actions:a}:{},...i}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{collectSchemaRefs as r}from"../../../core/index.js";import{schemaFromValue as t}from"../../../enhanced-json/index.js";import{DiagnosticCode as o,diagnosticMessages as a}from"../../../errors/index.js";import{ValueType as s,formatValueType as m,isAssignableValueType as n}from"../common/index.js";import{ExpressionName as i}from"../model/index.js";import{expressionValueType as E}from"./expression-value-type.js";import{MemoEvalPlan as l}from"./memo-eval-plan.js";let c=(e,r,i,c,N)=>{if("user"===e.kind)return{schema:e.schema,implementation:{kind:"user"}};let f=l(e.value,r),p={kind:"value",constant:e.constant,value:e.value,plan:f};if(Object.keys(e.schema).length>0){var h,u;let t,l;return h=e.value,u=e.schema,t=E(h,N),n(t,l=s(u,{...N,author:"project"}))||i.error(o.EXPRESSION_VALUE_TYPE_MISMATCH,a.EXPRESSION_VALUE_TYPE_MISMATCH(r,m(t),m(l))),{schema:e.schema,implementation:p}}let _=t(e.value,i,c);if(void 0!==_)return{schema:_,implementation:p}};export const UserExpressions=(t,s)=>{let{latestModel:m,evalExpressionParser:n,typeResolution:E,parsingContext:l}=s,{allNames:N}=m,f=[...N].map(String),p=[];for(let[s,m]of Object.entries(t)){N.has(s)||l.error(o.EXPRESSION_UNKNOWN_ENTITY_KEY,a.EXPRESSION_UNKNOWN_ENTITY_KEY(s,f));let t=e(s);for(let[f,h]of Object.entries(m)){let m=l.at(s),u=i(f,m);if(!u)continue;let _=c(h,`${s}.${f}`,m.at(f),n,E);if(_){for(let e of r(_.schema).references)N.has(e.value)||m.at(f,...e.path).error(o.EXPRESSION_UNKNOWN_REFERENCE_TARGET,a.EXPRESSION_UNKNOWN_REFERENCE_TARGET(`${s}.${f}`,e.value));p.push(e({entityKey:t,name:u,schema:_.schema,declaredSchema:_.schema,implementation:_.implementation}))}}}if(!l.hasErrors)return p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as r}from"../../../errors/index.js";let i=[{name:"id",types:["string"],expected:'type "string"'},{name:"accessToken",types:["string"],expected:'type "string"'},{name:"tags",types:["array"],itemTypes:["string"],expected:'type "array" with items of type "string"'},{name:"emailAddress",types:["string"],expected:'type "string"'},{name:"fullName",types:["string","null"],expected:'type "string | null"'}],s=e=>{if(void 0!==e.type)return Array.isArray(e.type)?e.type:[e.type]},n=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),p=e=>void 0===e?'no "type"':`type "${e.join(" | ")}"`;export const SessionDataSchema=a=>{let{sessionData:
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as r}from"../../../errors/index.js";let i=[{name:"id",types:["string"],expected:'type "string"'},{name:"accessToken",types:["string"],expected:'type "string"'},{name:"tags",types:["array"],itemTypes:["string"],expected:'type "array" with items of type "string"'},{name:"emailAddress",types:["string"],expected:'type "string"'},{name:"fullName",types:["string","null"],expected:'type "string | null"'}],s=e=>{if(void 0!==e.type)return Array.isArray(e.type)?e.type:[e.type]},n=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),p=e=>void 0===e?'no "type"':`type "${e.join(" | ")}"`;export const SessionDataSchema=a=>{let{sessionData:o,appMetadata:d,parsingContext:y}=a;if(!d.useClerk&&!d.useCognito)return e(o);let m=i.flatMap(e=>{let t=((e,t)=>{if(void 0===e)return`"${t.name}" is missing (expected ${t.expected})`;let r=s(e);if(void 0===r||!n(r,t.types))return`"${t.name}" declares ${p(r)} (expected ${t.expected})`;if(t.itemTypes){let r=e.items;if(void 0===r||Array.isArray(r))return`"${t.name}" declares no single "items" schema (expected ${t.expected})`;let i=s(r);if(void 0===i||!n(i,t.itemTypes))return`"${t.name}" declares array items with ${p(i)} (expected ${t.expected})`}})(o.properties[e.name],e);return void 0===t?[]:[t]});return m.length>0?void y.error(d.useCognito?t.COGNITO_SESSION_DATA_INCOMPATIBLE:t.CLERK_SESSION_DATA_INCOMPATIBLE,d.useCognito?r.COGNITO_SESSION_DATA_INCOMPATIBLE(m):r.CLERK_SESSION_DATA_INCOMPATIBLE(m)):e(o)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as r}from"../../../errors/index.js";import{IMPLICIT_ENTITY_FIELDS as i,RelationName as o,getResolvedShape as E}from"../model/index.js";import{referenceFieldType as n}from"./reference-field-type.js";import{relationFieldMismatch as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{DiagnosticCode as t,diagnosticMessages as r}from"../../../errors/index.js";import{IMPLICIT_ENTITY_FIELDS as i,RelationName as o,getResolvedShape as E}from"../model/index.js";import{referenceFieldType as n}from"./reference-field-type.js";import{relationFieldMismatch as l}from"./relation-field-mismatch.js";import{Relation as f}from"./relation.js";let T=(e,t,r,i)=>{let o="direct"===t.kind?"indirect":"indirect"===t.kind?"direct":"allOfType",E=[...i].filter(([,e])=>e.includes(t.target)).map(([e])=>String(e));for(let i of[t.target,...E])for(let[E,n]of Object.entries(r[i]??{}))if(n.kind===o&&n.target===e&&("allOfType"===t.kind||"allOfType"===n.kind||t.field===n.field))return{entityKey:i,name:E,relation:n}},a=(e,t)=>{let r=t.aliases.get(e);return r||[e]},N=(e,i,o)=>{let{entityKey:E,relationName:n,field:l,fieldOwner:f,related:T,relatedEntityTypes:a,cardinality:N}=i;switch(e.kind){case"notReference":o.error(t.RELATION_FIELD_NOT_REFERENCE,r.RELATION_FIELD_NOT_REFERENCE(E,n,l,f));break;case"otherEntityTypes":o.error(t.RELATION_FIELD_REFERENCES_OTHER_TYPES,r.RELATION_FIELD_REFERENCES_OTHER_TYPES(E,n,l,f,e.referenced,T,a));break;case"cardinality":o.error(t.RELATION_FIELD_CARDINALITY_MISMATCH,r.RELATION_FIELD_CARDINALITY_MISMATCH(E,n,l,N,e.shape,e.required))}};export const Relations=(O,_,I,s)=>{let{allNames:d,resolvedShapes:R}=_,c=[...d].map(String),L=(e,t)=>E(R,e).fieldSchemas.has(t),A={};for(let[e,T]of Object.entries(O)){let O=s.at(e);if(!d.has(e)){O.error(t.RELATION_UNKNOWN_ENTITY_KEY,r.RELATION_UNKNOWN_ENTITY_KEY(e,c));continue}for(let[s,p]of Object.entries(T)){if(!o(s,O))continue;if(!d.has(p.target)){O.error(t.RELATION_UNKNOWN_TARGET,r.RELATION_UNKNOWN_TARGET(e,s,p.target,c));continue}if("direct"===p.kind){if(i.has(p.field)){O.error(t.RELATION_IMMUTABLE_FIELD,r.RELATION_IMMUTABLE_FIELD(e,s,p.field,e));continue}if(!L(e,p.field)){O.error(t.RELATION_UNKNOWN_FIELD_DIRECT,r.RELATION_UNKNOWN_FIELD_DIRECT(e,s,p.field));continue}}else if("indirect"===p.kind){if(i.has(p.field)){O.error(t.RELATION_IMMUTABLE_FIELD,r.RELATION_IMMUTABLE_FIELD(e,s,p.field,p.target));continue}if(!L(p.target,p.field)){O.error(t.RELATION_UNKNOWN_FIELD_INDIRECT,r.RELATION_UNKNOWN_FIELD_INDIRECT(e,s,p.field,p.target));continue}}if("allOfType"!==p.kind){let[t,r]="direct"===p.kind?[e,p.target]:[p.target,e],i=a(r,_).map(String),o=a(t,_).flatMap(e=>{let t=E(R,e).fieldSchemas.get(p.field);return t?[n(t,_,I)]:[]}),f=l(p,o,i);f&&N(f,{entityKey:e,relationName:s,field:p.field,fieldOwner:t,related:r,relatedEntityTypes:i,cardinality:p.cardinality},O.at(s))}let T=f(s,p,e,_.aliases,O);T&&(A[e]||(A[e]={}),A[e][T.name]=T)}}var p=_.aliases;for(let[e,i]of Object.entries(A)){let o=s.at(e);for(let[E,n]of Object.entries(i)){if(n.target===e)continue;let i=T(e,n,A,p);if(!i){o.error(t.RELATION_MISSING_COUNTERPART,r.RELATION_MISSING_COUNTERPART(e,E,n.kind,n.target,"allOfType"===n.kind?void 0:n.field,n.composedOf));continue}n.composedOf&&i.relation.composedOf&&o.error(t.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH,r.RELATION_COUNTERPART_COMPOSED_OF_MISMATCH(e,E,i.entityKey,i.name))}}((e,i,o)=>{let E=new Map;for(let[t,r]of Object.entries(e))for(let e of Object.values(r)){if(!e.composedOf)continue;let r=a(t,i),o=a(e.target,i);for(let e of r){let t=E.get(e);for(let r of(t||(t=new Set,E.set(e,t)),o))t.add(r)}}let n=new Set(i.rootEntityTypes),l=[...i.rootEntityTypes];for(;l.length>0;){let e=l.shift(),t=E.get(e);if(t)for(let e of t)n.has(e)||(n.add(e),l.push(e))}let f=i.rootEntityTypes.map(String);for(let e of i.entityTypes)n.has(e)||o.at(String(e)).error(t.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE,r.RELATION_ENTITY_NOT_IN_COMPOSITION_TREE(String(e),f))})(A,_,s);let{components:m,expressions:S}=(e=>{let t=[],r=[];for(let i of Object.values(e))for(let e of Object.values(i))t.push(...e.components),r.push(e.expression);return{components:t,expressions:r}})(A);return e({entries:A,components:m,expressions:S})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{buildPhxDefSchemas as t,collectSchemaRefs as r,toRuntimeSchema as o}from"../../../core/index.js";import{DiagnosticCode as s,diagnosticMessages as i}from"../../../errors/index.js";import{createSchemaRefResolver as a,isNullableSchema as m,validateSchemaRefs as n}from"../common/index.js";import{ActionName as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{buildPhxDefSchemas as t,collectSchemaRefs as r,toRuntimeSchema as o}from"../../../core/index.js";import{DiagnosticCode as s,diagnosticMessages as i}from"../../../errors/index.js";import{createSchemaRefResolver as a,isNullableSchema as m,validateSchemaRefs as n}from"../common/index.js";import{ActionName as l}from"../model/index.js";let p=(e,{latestModel:t,phxDefinitions:o},a,m)=>{let l=new Set(t.commonTypes.keys());for(let[p,c]of Object.entries(e)){let{refs:e,references:d}=r(c),f=a.at(p);for(let r of(n(e,t.versionKey,l,o,f),d))[...t.allNames].some(e=>e===r.value)||f.at(...r.path).error(s.ACTION_UNKNOWN_REFERENCE_TARGET,i.ACTION_UNKNOWN_REFERENCE_TARGET(m,p,r.value))}};export const Actions=(r,s,i)=>{let{latestModel:n,phxDefinitions:c}=s,d=i.errors.length,f=a(n.commonTypes,c),u=new Map([...Object.entries(t(c)),...[...n.commonTypes].map(([e,t])=>[e,t.schema])]),j=new Map;for(let[t,a]of Object.entries(r)){let r=i.at(t),n=l(t,r);if(p(a.params,s,r.at("params"),`actions.${t}.params`),a.result&&p(a.result,s,r.at("result"),`actions.${t}.result`),!n)continue;let c=Object.fromEntries(Object.entries(a.params).map(([e,t])=>[e,{schema:t,required:!m(t,f)}])),d=o({type:"object",properties:a.params,required:Object.entries(c).flatMap(([e,{required:t}])=>t?[e]:[]),additionalProperties:!1},u);j.set(n,e({name:n,...void 0===a.description?{}:{description:a.description},params:c,...a.result?{result:a.result}:{},paramsSchema:d}))}return i.errors.length>d?void 0:e(j)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Branded as e}from"@salsita-ai/common/utils";import{ApplicationVersion as
|
|
1
|
+
import{Branded as e}from"@salsita-ai/common/utils";import{ApplicationVersion as o}from"./application-version.js";export const AppMetadata=(t,a)=>{let i=o(t.applicationVersion,a);if(i)return e({applicationVersion:i,workspace:t.workspace,webComponentTag:t.webComponentTag,pageTitle:t.pageTitle,useAuthHook:t.useAuthHook,useClerk:t.useClerk,useCognito:t.useCognito,enableAdminRelease:t.enableAdminRelease,jsonSchemaValidator:t.jsonSchemaValidator,gltfDecoder:t.gltfDecoder,gltfDecoderWorkerLimit:t.gltfDecoderWorkerLimit,exportPixelRatio:t.exportPixelRatio,collectFinalizeData:t.collectFinalizeData})};
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { type AssistantFormElementDescriptor } from '#package/domain';
|
|
2
|
-
import type
|
|
2
|
+
import { type EnhancedJsonSchemaType, type ParseContext, type PhoenixDefinitions } from '../../../../core/index.js';
|
|
3
3
|
import type { RawAssistantFormElement } from '../../../raw-spec/index.js';
|
|
4
|
+
import type { ModelVersion } from '../../model/index.js';
|
|
5
|
+
/** What the `state` of an input is checked against: the refs of its schema resolve as in action params. */
|
|
6
|
+
export interface FormElementStateContext {
|
|
7
|
+
readonly model: ModelVersion;
|
|
8
|
+
readonly phxDefinitions: PhoenixDefinitions;
|
|
9
|
+
}
|
|
4
10
|
/**
|
|
5
11
|
* Checks the project's own form elements and turns them into the descriptors the built-ins use, in
|
|
6
12
|
* YAML order. Whether each has an implementation is not known here, since module analysis does not
|
|
7
13
|
* see the name a file registers; the application checks that pairing when it starts.
|
|
8
14
|
*/
|
|
9
|
-
export declare const resolveFormElements: (formElements: Readonly<Record<string, RawAssistantFormElement>>, ctx: ParseContext) => readonly AssistantFormElementDescriptor[];
|
|
15
|
+
export declare const resolveFormElements: (formElements: Readonly<Record<string, RawAssistantFormElement>>, stateContext: FormElementStateContext, ctx: ParseContext) => readonly AssistantFormElementDescriptor[];
|
|
16
|
+
/**
|
|
17
|
+
* The `state` schema of each input that declares one, by element name. Code generation types the
|
|
18
|
+
* element's `state` and `onChange` by it; it stays out of the descriptors, so neither the runtime
|
|
19
|
+
* manifest nor the prompt carries it.
|
|
20
|
+
*/
|
|
21
|
+
export declare const resolveFormElementStates: (formElements: Readonly<Record<string, RawAssistantFormElement>>) => Readonly<Record<string, EnhancedJsonSchemaType>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ASSISTANT_BUILT_IN_FORM_ELEMENTS as e,isHtmlElementName as r}from"#package/domain";import{DiagnosticCode as
|
|
1
|
+
import{ASSISTANT_BUILT_IN_FORM_ELEMENTS as e,isHtmlElementName as r}from"#package/domain";import{collectSchemaRefs as T}from"../../../../core/index.js";import{DiagnosticCode as t,diagnosticMessages as E}from"../../../../errors/index.js";import{validateSchemaRefs as _}from"../../common/index.js";let o=e.map(({name:e})=>e),N=new Set(["label"]);export const resolveFormElements=(e,S,A)=>Object.entries(e).map(([e,i])=>{let s=A.at(e);return o.includes(e)?s.error(t.ASSISTANT_FORM_ELEMENT_BUILT_IN_NAME,E.ASSISTANT_FORM_ELEMENT_BUILT_IN_NAME(e,o)):r(e)&&s.error(t.ASSISTANT_FORM_ELEMENT_HTML_NAME,E.ASSISTANT_FORM_ELEMENT_HTML_NAME(e)),((e,{attributes:r={},required:T=[]},_)=>{let o=Object.keys(r);for(let r of o)N.has(r)&&_.at("attributes",r).error(t.ASSISTANT_FORM_ATTRIBUTE_RESERVED_NAME,E.ASSISTANT_FORM_ATTRIBUTE_RESERVED_NAME(e,r));for(let N of T)Object.hasOwn(r,N)||_.at("required").error(t.ASSISTANT_FORM_ELEMENT_UNKNOWN_REQUIRED,E.ASSISTANT_FORM_ELEMENT_UNKNOWN_REQUIRED(e,N,o))})(e,i,s),((e,{role:r,state:o},{model:N,phxDefinitions:S},A)=>{if(void 0===o)return;let i=A.at("state");if("input"!==r)return i.error(t.ASSISTANT_FORM_STATE_NOT_INPUT,E.ASSISTANT_FORM_STATE_NOT_INPUT(e,r));let{refs:s,references:R}=T(o);for(let r of(_(s,N.versionKey,new Set(N.commonTypes.keys()),S,i),R))[...N.allNames].some(e=>e===r.value)||i.at(...r.path).error(t.ASSISTANT_FORM_STATE_UNKNOWN_REFERENCE_TARGET,E.ASSISTANT_FORM_STATE_UNKNOWN_REFERENCE_TARGET(e,r.value))})(e,i,S,s),{name:e,role:i.role,description:i.description,attributes:i.attributes??{},...void 0===i.required?{}:{required:i.required}}});export const resolveFormElementStates=e=>Object.fromEntries(Object.entries(e).flatMap(([e,{role:r,state:T}])=>"input"===r&&void 0!==T?[[e,T]]:[]));
|