@salsita-ai/sdk 0.49.0-develop.fc391028c9 → 0.50.0-develop.0b927f4a8c
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/CHANGELOG.md +479 -0
- package/README.md +19 -11
- package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +6 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/common/index.js +1 -1
- package/dist/application-spec/generate-application/code/common/project-module-list.d.ts +8 -0
- package/dist/application-spec/generate-application/code/common/project-module-list.js +3 -0
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/admin-domain-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/admin-domain-code.js +6 -14
- package/dist/application-spec/generate-application/code/templates/admin-frontend-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/admin-frontend-code.js +4 -4
- package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +2 -2
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +7 -13
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.d.ts +1 -2
- package/dist/application-spec/generate-application/code/templates/configurator-frontend-code.js +7 -9
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.d.ts +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-assistant.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +3 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +70 -66
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +7 -7
- package/dist/application-spec/generate-application/code/templates/domain.js +4 -4
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +11 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +8 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/globals.js +1 -0
- package/dist/application-spec/generate-application/code/templates/index.d.ts +7 -6
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/agents-md.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +1 -0
- package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.d.ts → skills/phoenix-create-configurator-skill.d.ts} +1 -1
- package/dist/application-spec/generate-application/code/templates/{phoenix-create-configurator-skill.js → skills/phoenix-create-configurator-skill.js} +43 -13
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +54 -0
- package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.js → skills/phoenix-review-skill.js} +7 -5
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +6 -0
- package/dist/application-spec/generate-application/code/templates/{common → skills}/sdk-content.d.ts +53 -3
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +81 -0
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +8 -4
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +2 -0
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +14 -0
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +4 -3
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/index.d.ts +1 -0
- package/dist/application-spec/generate-application/runtime/sections/index.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +3 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/merge/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/merge/index.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-actions.d.ts +11 -0
- package/dist/application-spec/parse-application-files/merge/merged-actions.js +1 -0
- package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +2 -0
- package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/raw-spec/index.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +18 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +14 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +2 -0
- 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/application/application-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +4 -2
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.d.ts +23 -0
- package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/names/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/model/names/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +35 -0
- package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +5 -21
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +14 -39
- 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 +2 -2
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -19
- package/dist/application-spec/parse-application-files/spec/sections/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/index.js +1 -1
- package/dist/client/phoenix-api.d.ts +63 -31
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.d.ts +2 -1
- package/dist/configurator/application-runtime/extensions/configurator-extension-systems.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.d.ts +2 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +180 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -0
- package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/browser-details.d.ts +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.d.ts +85 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/change-recorder.js +1 -0
- package/dist/configurator/{assistant → application-runtime/extensions/systems/assistant-system}/graphql-tools.d.ts +20 -16
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +4 -0
- 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 +16 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.d.ts +9 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/side-effects.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +1 -0
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +2 -0
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/common/frontend-analytics.d.ts +21 -21
- package/dist/configurator/index.d.ts +0 -1
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/scene/scene-analytics/scene-analytics.d.ts +2 -2
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +11 -0
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -0
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +6 -0
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -0
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +7 -0
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -0
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +11 -0
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -0
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +6 -0
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -0
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +18 -0
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -0
- package/dist/configurator/ui/assistant/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/index.js +1 -0
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +6 -0
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -0
- package/dist/configurator/ui/assistant/theme.d.ts +2 -0
- package/dist/configurator/ui/assistant/theme.js +1 -0
- package/dist/configurator/ui/assistant/thread-items.d.ts +37 -0
- package/dist/configurator/ui/assistant/thread-items.js +1 -0
- package/dist/configurator/ui/assistant/tool-chip.d.ts +44 -0
- package/dist/configurator/ui/assistant/tool-chip.js +1 -0
- package/dist/configurator/ui/assistant/use-follow-stream.d.ts +17 -0
- package/dist/configurator/ui/assistant/use-follow-stream.js +1 -0
- package/dist/configurator/ui/assistant/use-is-assistant-panel-open.d.ts +5 -0
- package/dist/configurator/ui/assistant/use-is-assistant-panel-open.js +1 -0
- package/dist/configurator/ui/configurator-layout/universal/DesktopLayout.js +5 -5
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.d.ts +2 -0
- package/dist/configurator/ui/configurator-layout/universal/MobileLayout.js +4 -4
- package/dist/configurator/ui/legacy/mobile-controls/MobileControls.d.ts +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.d.ts +10 -0
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
- package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +84 -98
- package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +18 -12
- package/dist/docs/index.json +12 -2
- package/dist/docs/layouts/custom-price.mdx +14 -16
- package/dist/docs/layouts/sidebar/tabs.mdx +24 -21
- package/dist/docs/layouts/toolbar.mdx +6 -0
- package/dist/docs/other-features/domain-actions.mdx +418 -0
- package/dist/docs/other-features/side-effects.mdx +68 -34
- package/dist/docs/other-features/transformers.mdx +1 -1
- package/dist/docs/phoenix/admin.mdx +11 -26
- package/dist/docs/phoenix/best-practices.mdx +1 -0
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/integration/headless-mode-external.mdx +5 -5
- package/dist/docs/phoenix/integration/widget-mode-external.mdx +5 -5
- package/dist/docs/phoenix/localization.mdx +3 -22
- package/dist/docs/phoenix/migrations.mdx +45 -5
- package/dist/docs/phoenix/phoenix-cli.mdx +139 -20
- package/dist/docs/phoenix/project-structure.mdx +13 -3
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +12 -8
- package/dist/docs/phoenix/state-management.mdx +1 -1
- package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +15 -13
- package/dist/docs/relations/hierarchy.mdx +13 -2
- package/dist/domain/actions/action-factory.d.ts +11 -0
- package/dist/domain/actions/action-factory.js +1 -0
- package/dist/domain/actions/prepare-action-implementations.d.ts +15 -0
- package/dist/domain/actions/prepare-action-implementations.js +5 -0
- package/dist/domain/application/application-config.d.ts +25 -73
- package/dist/domain/application/assistant/assistant-manifest.d.ts +61 -0
- package/dist/domain/application/assistant/assistant-manifest.js +1 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +95 -0
- package/dist/domain/application/assistant/assistant-resolved-manifest.js +1 -0
- package/dist/domain/application/assistant/assistant-value-type.d.ts +9 -0
- package/dist/domain/application/assistant/assistant-value-type.js +1 -0
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +4 -0
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -0
- package/dist/{phoenix/application-spec → domain/application/assistant}/generate-assistant-prompt.d.ts +7 -6
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -0
- package/dist/domain/application/assistant/index.d.ts +4 -0
- package/dist/domain/application/assistant/index.js +1 -0
- package/dist/domain/application/assistant-field-options.d.ts +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +16 -15
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +1 -1
- package/dist/domain/application/configurator-builder.d.ts +33 -18
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/element-registration.d.ts +5 -0
- package/dist/domain/application/element-registration.js +1 -1
- package/dist/domain/application/handler-registration.d.ts +5 -0
- package/dist/domain/application/handler-registration.js +1 -1
- package/dist/domain/application/index.d.ts +5 -4
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/resolve-imported-transformers.d.ts +11 -1
- package/dist/domain/application/resolve-imported-transformers.js +1 -1
- package/dist/domain/components/domain-component-optic.d.ts +3 -0
- package/dist/domain/components/domain-component-optic.js +2 -2
- package/dist/domain/components/updates.d.ts +16 -0
- package/dist/domain/core/action.d.ts +67 -0
- package/dist/domain/core/action.js +1 -0
- package/dist/domain/core/domain-factory.d.ts +4 -0
- package/dist/domain/core/index.d.ts +1 -0
- package/dist/domain/domain-builder.d.ts +16 -0
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +40 -0
- package/dist/domain/domain-context/action-system/action-system.js +1 -0
- package/dist/domain/domain-context/domain-context-systems.d.ts +5 -2
- package/dist/domain/domain-context/index.d.ts +2 -1
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-context/store-system/store-system.js +1 -1
- package/dist/domain/domain-context/transformers/chain-builder.d.ts +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +4 -0
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +16 -4
- 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/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +18 -4
- package/dist/domain/index.d.ts +5 -2
- package/dist/domain/index.js +1 -1
- package/dist/domain/invariants/invariants.d.ts +9 -0
- package/dist/domain/invariants/invariants.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +9 -3
- package/dist/domain/mocks/create-mock-domain-runtime.js +1 -1
- package/dist/domain/project-modules/index.d.ts +1 -0
- package/dist/domain/project-modules/index.js +1 -0
- package/dist/domain/project-modules/project-modules.d.ts +41 -0
- package/dist/domain/project-modules/project-modules.js +1 -0
- package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.d.ts +44 -0
- package/dist/domain/system-components/phoenix-layout-elements/assistant-toolbar-button.js +1 -0
- package/dist/domain/system-components/phoenix-layout-elements/index.d.ts +1 -0
- package/dist/domain/system-components/phoenix-layout-elements/index.js +1 -1
- package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.d.ts +2 -1
- package/dist/domain/system-components/phoenix-layout-elements/phoenix-layout-element.js +1 -1
- package/dist/editor/Editor.js +1 -1
- 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 +11 -6
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/graphql/GraphQLPanel.js +1 -1
- package/dist/editor/variants/VariantAnswerFooter.d.ts +17 -0
- package/dist/editor/variants/VariantAnswerFooter.js +1 -0
- package/dist/editor/variants/VariantPreviewHandler.d.ts +6 -0
- package/dist/editor/variants/VariantPreviewHandler.js +1 -0
- package/dist/editor/variants/variant-preview-styles.d.ts +49 -0
- package/dist/editor/variants/variant-preview-styles.js +1 -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/domain-cli/gen/configurator-builder.js +21 -8
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +6 -0
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +18 -19
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +15 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +22 -23
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +15 -16
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.d.ts +7 -2
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/generator-shared.js +8 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/index.js +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/webhook-builders.js +7 -7
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +4 -3
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/build.d.ts +5 -0
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/deploy.js +2 -2
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/feedback.d.ts +2 -1
- package/dist/phoenix/commands/feedback.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/login.d.ts +24 -6
- package/dist/phoenix/commands/login.js +2 -2
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/commands/story-dev.js +2 -2
- package/dist/phoenix/commands/variants.d.ts +35 -0
- package/dist/phoenix/commands/variants.js +1 -0
- package/dist/phoenix/editor-server/commands-router.d.ts +68 -1
- package/dist/phoenix/editor-server/commands-router.js +1 -1
- package/dist/phoenix/editor-server/editor-router.d.ts +65 -0
- package/dist/phoenix/editor-server/editor-server.d.ts +3 -3
- package/dist/phoenix/editor-server/editor-server.js +1 -1
- package/dist/phoenix/editor-server/protocol.d.ts +1 -0
- package/dist/phoenix/editor-server/spec-router.js +1 -1
- package/dist/phoenix/editor-server/trpc.d.ts +3 -0
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +13 -2
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/index.d.ts +5 -0
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phoenix-application.d.ts +21 -0
- package/dist/phoenix/services/phoenix-application.js +1 -0
- package/dist/phoenix/services/phoenix-store.d.ts +48 -0
- package/dist/phoenix/services/phoenix-store.js +1 -0
- package/dist/phoenix/services/phx-banner-plugin.d.ts +32 -0
- package/dist/phoenix/services/phx-banner-plugin.js +1 -0
- package/dist/phoenix/services/phx-licenses-plugin.d.ts +55 -0
- package/dist/phoenix/services/phx-licenses-plugin.js +8 -0
- package/dist/phoenix/services/phx-variant-previews-plugin.d.ts +9 -0
- package/dist/phoenix/services/phx-variant-previews-plugin.js +1 -0
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/variant-file-session.d.ts +36 -0
- package/dist/phoenix/services/variant-file-session.js +1 -0
- package/dist/phoenix/services/variant-preview-service.d.ts +80 -0
- package/dist/phoenix/services/variant-preview-service.js +1 -0
- package/dist/phoenix/services/vite-config.d.ts +2 -0
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/utils/index.d.ts +1 -0
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/phoenix/utils/read-git-commit.d.ts +14 -0
- package/dist/phoenix/utils/read-git-commit.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +2 -2
- package/dist/react-sdk/application-runtime/common-services/analytics/domain-controls-analytics.d.ts +21 -21
- package/dist/react-sdk/application-runtime/hooks/data/use-published-data.d.ts +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-domain-application-props.d.ts +5 -2
- package/dist/react-sdk/application-runtime/hooks/use-spec.d.ts +1 -1
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.d.ts +1 -1
- 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 +16 -4
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -0
- package/dist/ui-sdk/common/use-viewport-size.d.ts +4 -1
- package/dist/ui-sdk/common/use-viewport-size.js +1 -1
- package/dist/ui-sdk/components/mobile-controls/index.d.ts +1 -1
- package/dist/ui-sdk/theme/types.d.ts +4 -0
- package/dist/webhook/builders/common.d.ts +3 -0
- package/dist/webhook/builders/webhook-builder.d.ts +1 -1
- package/dist/webhook/builders/webhook-builder.js +1 -1
- package/package.json +5 -8
- package/schema/domain-spec.json +24 -0
- package/dist/application-spec/generate-application/code/templates/agents-md.js +0 -2
- package/dist/application-spec/generate-application/code/templates/common/sdk-content.js +0 -67
- package/dist/application-spec/generate-application/code/templates/phoenix-cli-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/phoenix-feedback-skill.js +0 -31
- package/dist/application-spec/generate-application/code/templates/phoenix-skill.js +0 -1
- package/dist/configurator/assistant/browser-details.js +0 -1
- package/dist/configurator/assistant/graphql-tools.js +0 -1
- package/dist/configurator/assistant/index.d.ts +0 -1
- package/dist/configurator/assistant/index.js +0 -1
- package/dist/configurator/assistant/use-assistant-chat.d.ts +0 -20
- package/dist/configurator/assistant/use-assistant-chat.js +0 -1
- package/dist/extras/assistant/AssistantChat.d.ts +0 -6
- package/dist/extras/assistant/AssistantChat.js +0 -1
- package/dist/extras/assistant/index.d.ts +0 -1
- package/dist/extras/assistant/index.js +0 -1
- package/dist/phoenix/application-spec/generate-assistant-prompt.js +0 -1
- /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.d.ts +0 -0
- /package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.js +0 -0
- /package/dist/application-spec/generate-application/code/templates/{agents-md.d.ts → skills/agents-md.d.ts} +0 -0
- /package/dist/application-spec/generate-application/code/templates/{phoenix-cli-skill.d.ts → skills/phoenix-cli-skill.d.ts} +0 -0
- /package/dist/application-spec/generate-application/code/templates/{phoenix-feedback-skill.d.ts → skills/phoenix-feedback-skill.d.ts} +0 -0
- /package/dist/application-spec/generate-application/code/templates/{phoenix-review-skill.d.ts → skills/phoenix-review-skill.d.ts} +0 -0
- /package/dist/application-spec/generate-application/code/templates/{phoenix-skill.d.ts → skills/phoenix-skill.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const useConfiguratorSpec: () => import("../../../domain/index.js").ApplicationConfiguratorSpec;
|
|
2
2
|
/** The application spec's `assistant` manifest, or nothing when the spec has no `assistant` section. */
|
|
3
|
-
export declare const useSpecAssistant: () => import("../../../domain/index.js").AssistantManifest | null;
|
|
3
|
+
export declare const useSpecAssistant: () => Required<import("../../../domain/index.js").AssistantManifest> | null;
|
|
4
4
|
export declare const useSpecTextLanguages: () => readonly string[];
|
|
5
5
|
export declare const useSpecHandlerHashes: () => Record<string, string>;
|
|
6
6
|
export declare const useSpecHandlers: () => readonly import("../../../domain/index.js").HandlerRegistration<any, any>[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { $DomainEntity, ApplicationConfig, DomainEntity, RegistrableTransformer, WebComponentOptions } from '#package/domain';
|
|
2
2
|
import type { ApplicationRuntime } from '../runtime/react-runtime.js';
|
|
3
3
|
import { type WebComponentApi } from '../web-component/index.js';
|
|
4
|
-
export declare const createMockApplicationRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(
|
|
4
|
+
export declare const createMockApplicationRuntime: <ENTITIES extends DomainEntity<string>, ALLOWED_ROOT_ENTITIES extends ENTITIES, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>>, NAVIGATION_STATES extends string, VIEW_STATES extends string, TOOL_STATES extends string, EXPORT_STATES extends string, CHAT_CONTEXT extends Record<string, unknown>, PUBLISHED_DATA extends Record<string, unknown>, SESSION_DATA extends Record<string, unknown>, FRONTEND_DATA extends Record<string, unknown>, ADMIN_ENTITIES extends DomainEntity<string>, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>>, ADMIN_NAVIGATION_STATES extends string, ADMIN_VIEW_STATES extends string>(config: ApplicationConfig<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, CHAT_CONTEXT, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES>, mocks: {
|
|
5
5
|
frontendData: FRONTEND_DATA;
|
|
6
6
|
publishedData: PUBLISHED_DATA;
|
|
7
7
|
sessionData: SESSION_DATA;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{memoOnce as e}from"@salsita-ai/common/utils";import{createDomainRuntime as t,createMockDomainRuntimeServices as o,createMockSessionContext as n}from"#package/domain";import{createCommonServicesSelectors as s}from"../common-services/index.js";import{createDomainApplicationContextSelectors as i}from"../domain-application-context/index.js";import{createIntegrationActions as a,createIntegrationSelectors as r,initializeIntegration as c}from"../integration/index.js";import{createRoutingActions as m,createRoutingSelectors as d,initializeRouting as
|
|
1
|
+
import{memoOnce as e}from"@salsita-ai/common/utils";import{createDomainRuntime as t,createMockDomainRuntimeServices as o,createMockSessionContext as n}from"#package/domain";import{createCommonServicesSelectors as s}from"../common-services/index.js";import{createDomainApplicationContextSelectors as i}from"../domain-application-context/index.js";import{createIntegrationActions as a,createIntegrationSelectors as r,initializeIntegration as c}from"../integration/index.js";import{createRoutingActions as m,createRoutingSelectors as d,initializeRouting as p}from"../routing/index.js";import{SessionService as l,createSessionRuntimeActions as S,createSessionRuntimeSelectors as g,initializeSessionRuntime as v}from"../session/index.js";import{createMockWebComponentApi as u}from"../web-component/index.js";export const createMockApplicationRuntime=(f,C)=>{var x;let b,y,w,A,D,k,E,I,h,j,R,T,O,L,F,{sessionData:M,mode:U,role:V}=C,z=o(),q=(x={webComponentOptions:C.webComponentOptions??f.mount.options,webComponentApi:C.webComponentApi??u()},w=v(),A=t({config:f,services:z,getExtensionSystems:e=>F[e].getInitializableSystems()}),D=new Set,k=()=>{D.forEach(e=>{e()})},b=c({actions:E=a({setIntegration:e=>{b=e(b),k()}})}),I=r({getState:()=>({integration:b})}),h=m({setRouting:e=>{y=e(y),k()}}),y=p(),j=d({getState:()=>({...A.getState(),routing:y}),actions:h,accessActions:A.actions.access,loadedDataActions:A.actions.loadedData,domainServicesSelectors:A.selectors.domainServices,overridesSelectors:A.selectors.overrides}),R=s({getState:()=>({...A.getState(),session:w}),environmentSelectors:A.selectors.environment,specSelectors:A.selectors.spec,accessSelectors:A.selectors.access,domainServicesSelectors:A.selectors.domainServices,webComponentOptions:x.webComponentOptions,webComponentApi:x.webComponentApi,getSessionService:()=>L(),routingSelectors:j}),T=S({setSessionRuntime:e=>{w=e(w),k()}}),O=g({getState:()=>({...A.getState(),session:w}),sessionContextSelectors:A.selectors.sessionContext}),L=e(()=>new l({getLogger:()=>A.selectors.domainServices.getLogger(),getAnalyticsService:()=>A.selectors.domainServices.getAnalyticsService(),getUnauthenticatedClient:R.getUnauthenticatedClient,environmentSelectors:A.selectors.environment,sessionActions:T,setSessionContext:A.actions.sessionContext.setSessionContext,sessionSelectors:O,specSelectors:A.selectors.spec})),F={configurator:i({applicationType:"configurator",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.configurator,getApplicationRuntimeExtensions:()=>[]}),admin:i({applicationType:"admin",commonServicesSelectors:R,domainServicesSelectors:A.selectors.domainServices,domainContextSelectors:A.selectors.domainContext.admin,getApplicationRuntimeExtensions:()=>[]})},{subscribe:e=>{D.add(e);let t=A.subscribe(e);return()=>{D.delete(e),t()}},getState:()=>({...A.getState(),integration:b,routing:y,session:w}),selectors:{...A.selectors,commonServices:R,integration:I,routing:j,session:O,domainApplicationContext:F},actions:{...A.actions,integration:E,routing:h,session:T}}),B=q.getState().spec;return q.actions.spec.updateSpec({...B,configurator:{...B.configurator,createTransformers:e=>C.transformers.map(t=>t.transformer.register(e,t.priority??1/0))}}),q.actions.sessionContext.setSessionContext(n(V,M)),q.actions.access.setConfiguratorAccessInfo({raw:"mock-access-token",viewMode:"read"===U,revisionId:void 0,configurationId:"mock"}),q.actions.domainData.setDomainData({publishedData:C.publishedData,frontendData:C.frontendData,backendData:C.backendData}),q.actions.loadedData.completeConfiguratorLoad({initialRevisionId:"mock-revision",initialEntities:C.entities,modelVersion:f.domain.domainFactory.modelVersion,rootEntityType:C.rootEntityType,schemaIdentity:f.domain.domainFactory}),q};
|
|
@@ -67,7 +67,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
67
67
|
selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyProductPreset>;
|
|
68
68
|
selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, number>;
|
|
69
69
|
selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("@mui/material").ThemeOptions>;
|
|
70
|
-
selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AssistantManifest | null>;
|
|
70
|
+
selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, Required<import("#package/domain").AssistantManifest> | null>;
|
|
71
71
|
selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
72
72
|
selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
73
73
|
selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, readonly import("#package/domain").AnyDomainComponentOptic[]>;
|
|
@@ -110,7 +110,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
110
110
|
getAdminPreset: () => import("#package/domain").AnyProductPreset;
|
|
111
111
|
getAdminModelVersion: () => number;
|
|
112
112
|
getThemeOptions: () => import("@mui/material").ThemeOptions;
|
|
113
|
-
getAssistant: () => import("#package/domain").AssistantManifest | null;
|
|
113
|
+
getAssistant: () => Required<import("#package/domain").AssistantManifest> | null;
|
|
114
114
|
getConfiguratorFactory: () => import("#package/domain").AnyDomainFactory;
|
|
115
115
|
getAdminFactory: () => import("#package/domain").AnyDomainFactory;
|
|
116
116
|
getConfiguratorComponentOptics: () => readonly import("#package/domain").AnyDomainComponentOptic[];
|
|
@@ -404,6 +404,8 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
404
404
|
getActiveConfigurationId: () => string;
|
|
405
405
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
406
406
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
407
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
408
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
407
409
|
getModelVersion: () => number;
|
|
408
410
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
409
411
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -444,6 +446,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
444
446
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
445
447
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
446
448
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
449
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
447
450
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
448
451
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
449
452
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -510,6 +513,8 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
510
513
|
getActiveConfigurationId: () => string;
|
|
511
514
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
512
515
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
516
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
517
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
513
518
|
getModelVersion: () => number;
|
|
514
519
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
515
520
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -550,6 +555,7 @@ export declare function createApplicationRuntimeSlices<State extends Application
|
|
|
550
555
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
551
556
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
552
557
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
558
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
553
559
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
554
560
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
555
561
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -721,7 +727,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
721
727
|
selectAdminPreset: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyProductPreset>;
|
|
722
728
|
selectAdminModelVersion: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, number>;
|
|
723
729
|
selectThemeOptions: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("@mui/material").ThemeOptions>;
|
|
724
|
-
selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AssistantManifest | null>;
|
|
730
|
+
selectAssistant: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, Required<import("#package/domain").AssistantManifest> | null>;
|
|
725
731
|
selectConfiguratorFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
726
732
|
selectAdminFactory: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, import("#package/domain").AnyDomainFactory>;
|
|
727
733
|
selectConfiguratorComponentOptics: import("@salsita-ai/common/utils").Selector<import("#package/domain").SpecSelectorState, readonly import("#package/domain").AnyDomainComponentOptic[]>;
|
|
@@ -764,7 +770,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
764
770
|
getAdminPreset: () => import("#package/domain").AnyProductPreset;
|
|
765
771
|
getAdminModelVersion: () => number;
|
|
766
772
|
getThemeOptions: () => import("@mui/material").ThemeOptions;
|
|
767
|
-
getAssistant: () => import("#package/domain").AssistantManifest | null;
|
|
773
|
+
getAssistant: () => Required<import("#package/domain").AssistantManifest> | null;
|
|
768
774
|
getConfiguratorFactory: () => import("#package/domain").AnyDomainFactory;
|
|
769
775
|
getAdminFactory: () => import("#package/domain").AnyDomainFactory;
|
|
770
776
|
getConfiguratorComponentOptics: () => readonly import("#package/domain").AnyDomainComponentOptic[];
|
|
@@ -1058,6 +1064,8 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
1058
1064
|
getActiveConfigurationId: () => string;
|
|
1059
1065
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
1060
1066
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
1067
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
1068
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
1061
1069
|
getModelVersion: () => number;
|
|
1062
1070
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
1063
1071
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -1098,6 +1106,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
1098
1106
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
1099
1107
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
1100
1108
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
1109
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
1101
1110
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
1102
1111
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
1103
1112
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -1164,6 +1173,8 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
1164
1173
|
getActiveConfigurationId: () => string;
|
|
1165
1174
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
1166
1175
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
1176
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
1177
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
1167
1178
|
getModelVersion: () => number;
|
|
1168
1179
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
1169
1180
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -1204,6 +1215,7 @@ declare const createApplicationRuntimeImpl: <EXTENSIONS extends readonly AnyAppl
|
|
|
1204
1215
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
1205
1216
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
1206
1217
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
1218
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
1207
1219
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
1208
1220
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
1209
1221
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -60,6 +60,8 @@ export declare const useDomainContextSelectors: () => {
|
|
|
60
60
|
getActiveConfigurationId: () => string;
|
|
61
61
|
getFactory: () => import("#package/domain").AnyDomainFactory;
|
|
62
62
|
getDomainExpressions: () => import("#package/domain").AnyExpressions;
|
|
63
|
+
getActionDefinitions: () => Readonly<Record<string, import("#package/domain").ActionDefinition>>;
|
|
64
|
+
getActionImplementations: () => Readonly<Record<string, import("#package/domain").AnyActionImplementation>>;
|
|
63
65
|
getModelVersion: () => number;
|
|
64
66
|
getAliasMap: () => import("#package/domain").AnyAliasMap;
|
|
65
67
|
getAllowedRootEntityTypes: () => import("#package/domain").AnyAllowedRootEntityTypes;
|
|
@@ -100,6 +102,7 @@ export declare const useDomainContextSelectors: () => {
|
|
|
100
102
|
getNavigationSystem: () => import("../../../domain/domain-context/navigation-system/navigation-system.js").AnyNavigationSystem;
|
|
101
103
|
getUndoSystem: () => import("../../../domain/domain-context/undo-system.js").AnyUndoSystem;
|
|
102
104
|
getRecipeCookerSystem: () => import("#package/domain").AnyRecipeCookerSystem;
|
|
105
|
+
getActionSystem: () => import("#package/domain").AnyActionSystem;
|
|
103
106
|
getBlenderProjections: () => import("#package/domain").AnyBlenderProjections;
|
|
104
107
|
getExpressionContext: () => import("#package/domain").AnyExpressionContext;
|
|
105
108
|
getDomainSystems: () => import("#package/domain").AnyDomainContextSystems;
|
|
@@ -13,8 +13,11 @@ export declare const getViewportSize: () => Size;
|
|
|
13
13
|
* Returns the viewport size. This can also be used as a dependency in a
|
|
14
14
|
* useEffect to trigger an update when the browser resizes.
|
|
15
15
|
*
|
|
16
|
+
* @param subscriptionActive if `false`, the viewport is neither measured nor followed, and the size
|
|
17
|
+
* returned is the last one measured, if any (useful for optimization)
|
|
18
|
+
*
|
|
16
19
|
* @see https://martijnhols.nl/gists/how-to-get-document-height-ios-safari-osk
|
|
17
20
|
* @todo: investigate if this can use `viewport$`
|
|
18
21
|
*/
|
|
19
|
-
export declare const useViewportSize: () => Size | undefined;
|
|
22
|
+
export declare const useViewportSize: (subscriptionActive?: boolean) => Size | undefined;
|
|
20
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as e,useEffect as i,useLayoutEffect as t,useState as n}from"react";let
|
|
1
|
+
import{useCallback as e,useEffect as i,useLayoutEffect as t,useState as n}from"react";let r="u">typeof window?t:()=>{};export const getViewportSize=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight];export const useViewportSize=(t=!0)=>{let[o,w]=n(),d=e(()=>{let e=getViewportSize();w(i=>i&&i[0]===e[0]&&i[1]===e[1]?i:e)},[]);return r(()=>{t&&d()},[t,d]),i(()=>{if(!t)return;let e=()=>{d(),setTimeout(d,1e3)};return window.addEventListener("resize",e),window.addEventListener("orientationchange",e),window.visualViewport?.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e),window.visualViewport?.removeEventListener("resize",e)}},[t,d]),o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MobileControls, type MobileControlsLayoutProps, type MobileControlsThemeableProps } from './MobileControls.js';
|
|
1
|
+
export { MobileControls, type MobileControlsLayoutProps, type MobileControlsThemeableProps, type ViewOnlyModeProps, } from './MobileControls.js';
|
|
@@ -44,6 +44,7 @@ declare module '@mui/material/styles' {
|
|
|
44
44
|
PhxChat: 'root';
|
|
45
45
|
PhxChatFooter: 'root' | 'formLayout' | 'input';
|
|
46
46
|
PhxChatMessage: 'base' | 'assistant' | 'user' | 'widget' | 'error' | 'helper';
|
|
47
|
+
PhxAssistantPanel: 'root' | 'header' | 'title' | 'closeButton' | 'thread' | 'greeting' | 'messages' | 'userMessage' | 'assistantMessage' | 'chips' | 'activity' | 'activityIcon' | 'chip' | 'status' | 'notice' | 'newReplyButton' | 'composer' | 'inputFrame' | 'input' | 'sendButton' | 'stopButton' | 'hint';
|
|
47
48
|
PhxTopNavigation: 'root' | 'stepper' | 'step';
|
|
48
49
|
PhxListSelector: 'root';
|
|
49
50
|
PhxListSelectorItem: 'root' | 'radio' | 'title' | 'description' | 'formControlLabel';
|
|
@@ -109,6 +110,9 @@ declare module '@mui/material/styles' {
|
|
|
109
110
|
PhxChatMessage?: {
|
|
110
111
|
styleOverrides?: ComponentsOverrides<Theme>['PhxChatMessage'];
|
|
111
112
|
};
|
|
113
|
+
PhxAssistantPanel?: {
|
|
114
|
+
styleOverrides?: ComponentsOverrides<Theme>['PhxAssistantPanel'];
|
|
115
|
+
};
|
|
112
116
|
PhxPreviewLayout?: {
|
|
113
117
|
styleOverrides?: ComponentsOverrides<Theme>['PhxPreviewLayout'];
|
|
114
118
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { I18n } from '@lingui/core';
|
|
2
|
+
import type { DeploymentAssistant } from '@salsita-ai/contracts/assistant';
|
|
2
3
|
import type { $DomainEntity, ConfiguratorBuilder, DomainEntity } from '#package/domain';
|
|
3
4
|
export interface ClerkConfig {
|
|
4
5
|
apiKey: string;
|
|
@@ -11,6 +12,8 @@ export interface ClerkConfig {
|
|
|
11
12
|
}
|
|
12
13
|
export interface BuilderDomainContext<ENTITIES extends DomainEntity<string> = never, ALLOWED_ROOT_ENTITIES extends ENTITIES = never, $MAP extends Record<ENTITIES['type'], $DomainEntity<ENTITIES>> = never, NAVIGATION_STATES extends string = never, VIEW_STATES extends string = never, TOOL_STATES extends string = never, EXPORT_STATES extends string = never, PUBLISHED_DATA extends Record<string, unknown> = never, SESSION_DATA extends Record<string, unknown> = never, FRONTEND_DATA extends Record<string, unknown> = never, ADMIN_ENTITIES extends DomainEntity<string> = never, ADMIN_ALLOWED_ROOT_ENTITIES extends ADMIN_ENTITIES = never, ADMIN_$MAP extends Record<ADMIN_ENTITIES['type'], $DomainEntity<ADMIN_ENTITIES>> = never, ADMIN_NAVIGATION_STATES extends string = never, ADMIN_VIEW_STATES extends string = never, FINALIZE_DATA extends Record<string, unknown> = never, PREFETCHED_FINALIZE_DATA extends Record<string, unknown> = never, FINALIZE_RESULT extends Record<string, unknown> = never, CALLBACK_DATA extends Record<string, unknown> = never, RESOURCE extends string = never> {
|
|
13
14
|
configuratorBuilder: ConfiguratorBuilder<ENTITIES, ALLOWED_ROOT_ENTITIES, $MAP, NAVIGATION_STATES, VIEW_STATES, TOOL_STATES, EXPORT_STATES, PUBLISHED_DATA, SESSION_DATA, FRONTEND_DATA, ADMIN_ENTITIES, ADMIN_ALLOWED_ROOT_ENTITIES, ADMIN_$MAP, ADMIN_NAVIGATION_STATES, ADMIN_VIEW_STATES, FINALIZE_DATA, PREFETCHED_FINALIZE_DATA, FINALIZE_RESULT, CALLBACK_DATA, RESOURCE>;
|
|
15
|
+
/** Server-only settings supplied by the generated webhook bundle. */
|
|
16
|
+
assistantServerSettings?: Pick<DeploymentAssistant, 'instructions' | 'ai'> | null;
|
|
14
17
|
createI18n: () => I18n;
|
|
15
18
|
clerk?: ClerkConfig;
|
|
16
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type $DomainEntity, type DomainEntity } from '#package/domain';
|
|
2
2
|
import type { FetchBackendDataHandler } from '../backend-data-handler.js';
|
|
3
3
|
import { type AuthHandler, AuthHandlerBuilder } from './auth-handler-builder.js';
|
|
4
4
|
import { CallbackBuilder } from './callback-builder.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initConsoleLogger as e}from"@salsita-ai/common/utils";import{routeWebhookRequests as
|
|
1
|
+
import{initConsoleLogger as e}from"@salsita-ai/common/utils";import{routeWebhookRequests as t}from"@salsita-ai/contracts/webhook";import{buildAssistantManifest as n,generateAssistantPrompt as o}from"#package/domain";import{AdminFinalizeHandlerBuilder as i}from"./admin-finalize-handler-builder.js";import{AuthHandlerBuilder as s}from"./auth-handler-builder.js";import{CallbackBuilder as a}from"./callback-builder.js";import{ConfiguratorFinalizeHandlerBuilder as r}from"./configurator-finalize-handler-builder.js";import{DynamicResourcesFactory as d}from"./dynamic-resources-factory.js";import{PrefetchBuilder as l}from"./prefetch-builder.js";import{TaskFactory as h}from"./task-factory.js";export class WebhookBuilder{_context;_handlers;constructor(e,t){this._context=e,this._handlers=t}withAuthHook(e){return new WebhookBuilder(this._context,{...this._handlers,onAuth:e})}withConfiguratorFinalize(e){return new WebhookBuilder(this._context,{...this._handlers,...e})}withFetchBackendData(e){return new WebhookBuilder(this._context,{...this._handlers,onFetchBackendData:e})}build(){if(!this._handlers&&!this._context.assistantServerSettings)throw Error("Can not build webhook without any handlers! It would be very dumb!");let s=e(),a=new i(this._context).build();return t({onAuth:this._handlers?.onAuth!==void 0?(e,t)=>this._handlers.onAuth(e,{logger:s},t):void 0,admin:{onFinalize:(e,t)=>a(e,{logger:s},t)},configurator:{onAssistantSetup:this._context.assistantServerSettings?async()=>{let e=this._context.configuratorBuilder.buildConfig().assistant;if(!e)throw Error("Assistant setup operation is not configured for this webhook!");let t=n(e),i=this._context.assistantServerSettings;return{setup:{sdl:t.sdl,prompt:o(t),...i}}}:void 0,onFetchBackendData:this._handlers?.onFetchBackendData?(e,t)=>this._handlers.onFetchBackendData(e,{logger:s},t):void 0,onFinalize:this._handlers?.onFinalize?async(e,t)=>{let n=await this._handlers?.onFetchBackendData?.({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls},{logger:s},t);return this._handlers.onFinalize({deploymentId:e.deploymentId,frontendUrl:e.frontendUrl,frontendData:e.frontendData,sessionRole:e.sessionRole,sessionPayload:e.sessionPayload,publishedAdminRevisionPath:e.publishedAdminRevisionPath,publishedChunkUrls:e.publishedChunkUrls,data:e.data,locale:e.locale,configurationId:e.configurationId,entities:e.entities,modelVersion:e.modelVersion,revisionId:e.revisionId,rootEntityType:e.rootEntityType,backendData:n?.backendData},{logger:s},t)}:void 0,onCallback:this._handlers?.onCallback?(e,t)=>this._handlers.onCallback(e,{logger:s},t):void 0}},s)}}export const createDomainWebhook=e=>{let t=new s(e),n=new WebhookBuilder(e),o=new h(e),i=new d(e),u=new r(e,[]);return{authHandlerBuilder:t,webhookBuilder:n,taskFactory:o,finalizeHandlerBuilder:u,callbackBuilder:new a(e),dynamicResourcesFactory:i,prefetchBuilder:new l(e)}};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salsita-ai/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0-develop.0b927f4a8c",
|
|
4
4
|
"description": "TypeScript SDK and CLI for building, running, and deploying Phoenix configurator applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salsita",
|
|
@@ -149,10 +149,6 @@
|
|
|
149
149
|
"import": "./dist/extras/ai-preview/index.js",
|
|
150
150
|
"types": "./dist/extras/ai-preview/index.d.ts"
|
|
151
151
|
},
|
|
152
|
-
"./extras/assistant": {
|
|
153
|
-
"import": "./dist/extras/assistant/index.js",
|
|
154
|
-
"types": "./dist/extras/assistant/index.d.ts"
|
|
155
|
-
},
|
|
156
152
|
"./common/utils": {
|
|
157
153
|
"import": "./dist/common/utils.js",
|
|
158
154
|
"types": "./dist/common/utils.d.ts"
|
|
@@ -225,7 +221,7 @@
|
|
|
225
221
|
"@swc/core": "1.15.40",
|
|
226
222
|
"@swc/wasm-web": "1.15.40",
|
|
227
223
|
"@tanstack/ai": "0.64.0",
|
|
228
|
-
"@tanstack/ai-
|
|
224
|
+
"@tanstack/ai-client": "0.36.1",
|
|
229
225
|
"@trpc/client": "11.17.0",
|
|
230
226
|
"@trpc/react-query": "11.17.0",
|
|
231
227
|
"@trpc/server": "11.17.0",
|
|
@@ -275,6 +271,7 @@
|
|
|
275
271
|
"react-json-tree": "0.20.0",
|
|
276
272
|
"react-markdown": "9.0.1",
|
|
277
273
|
"remark": "15.0.1",
|
|
274
|
+
"remark-gfm": "4.0.0",
|
|
278
275
|
"rxjs": "7.8.2",
|
|
279
276
|
"semver": "7.6.3",
|
|
280
277
|
"spark-md5": "3.0.2",
|
|
@@ -295,8 +292,8 @@
|
|
|
295
292
|
"yaml": "2.9.0",
|
|
296
293
|
"yargs": "17.7.2",
|
|
297
294
|
"zod": "3.25.76",
|
|
298
|
-
"@salsita-ai/common": "0.
|
|
299
|
-
"@salsita-ai/contracts": "0.
|
|
295
|
+
"@salsita-ai/common": "0.50.0-develop.0b927f4a8c",
|
|
296
|
+
"@salsita-ai/contracts": "0.50.0-develop.0b927f4a8c"
|
|
300
297
|
},
|
|
301
298
|
"devDependencies": {
|
|
302
299
|
"@clerk/clerk-react": "5.61.8",
|
package/schema/domain-spec.json
CHANGED
|
@@ -18586,6 +18586,30 @@
|
|
|
18586
18586
|
"required": ["kind"],
|
|
18587
18587
|
"additionalProperties": false
|
|
18588
18588
|
},
|
|
18589
|
+
{
|
|
18590
|
+
"type": "object",
|
|
18591
|
+
"properties": {
|
|
18592
|
+
"kind": {
|
|
18593
|
+
"type": "string",
|
|
18594
|
+
"enum": ["assistantToolbarButton"]
|
|
18595
|
+
},
|
|
18596
|
+
"props": {
|
|
18597
|
+
"type": "object",
|
|
18598
|
+
"properties": {
|
|
18599
|
+
"showTitle": {
|
|
18600
|
+
"type": "boolean"
|
|
18601
|
+
},
|
|
18602
|
+
"icon": {
|
|
18603
|
+
"type": "string"
|
|
18604
|
+
}
|
|
18605
|
+
},
|
|
18606
|
+
"required": [],
|
|
18607
|
+
"additionalProperties": false
|
|
18608
|
+
}
|
|
18609
|
+
},
|
|
18610
|
+
"required": ["kind"],
|
|
18611
|
+
"additionalProperties": false
|
|
18612
|
+
},
|
|
18589
18613
|
{
|
|
18590
18614
|
"type": "object",
|
|
18591
18615
|
"properties": {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{sdkGuidanceSections as e}from"./common/sdk-content.js";export const generateAgentsMd=()=>`${[e.projectIntro,e.buildCommands,e.doNotEdit,"Phoenix SDK guidance lives in the `phoenix`, `phoenix-cli`, `phoenix-create-configurator`, `phoenix-feedback` and `phoenix-review` skills under `.claude/skills/` and `.agents/skills/`. Phoenix rewrites them on every sync, removes anything else inside their folders and removes other `phoenix`-prefixed skill folders, so to customise a skill, copy it to a folder whose name does not start with `phoenix`."].join("\n\n")}
|
|
2
|
-
`;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export const sdkGuidanceSections={projectIntro:`## Phoenix Configurator Project
|
|
2
|
-
|
|
3
|
-
Declarative 3D product configurator built with Phoenix SDK. Domain model defined in YAML, custom logic in TypeScript.`,buildCommands:"## Build Commands\n- `pnpm phoenix build` — Full production build\n- `pnpm phoenix dev` — Development mode with hot reload\n- `pnpm phoenix sync` — Sync generated files without full build",devLogs:"## Dev Logs\n- `pnpm phoenix dev` writes all logs to `.phoenix/phoenix-dev.log`\n- Contains: spec parse errors, build errors, browser runtime errors, file watcher events\n- After making changes, always check the log for errors: `tail -50 .phoenix/phoenix-dev.log` or `grep ERROR .phoenix/phoenix-dev.log`\n- Rotated automatically at 10MB (`.log.1`, `.log.2` are older rotations)",projectStructure:"## Project Structure\n- `spec/` — Domain YAML specs (entities, relations, expressions, invariants, components, application config)\n- `src/expressions/` — Computed/derived entity properties (`phx.domain.implementCustomExpressions()`)\n- `src/invariants/` — Business rule constraints (`phx.domain.implementCustomInvariants()`)\n- `src/transformers/` — Automatic state fixers (`phx.frontend.transformerBuilder`)\n- `src/components/` — ECS system components (`phx.domain.attachComponent.withEntity()`)\n- `src/elements/` — Page-level React components (`phx.frontend.createCustomPhoenixLayoutElement()`)\n- `src/handlers/` — Event & lifecycle handlers\n- `src/webhooks/` — Server-side webhook handlers (`phx.webhooks.*Builder`)\n- `src/migrations/` — Schema version migrations (v*.ts)\n- `src/locales/` — Locale catalogs (authored .po sources; compiled .ts, do not edit)\n- `src/admin/` — Admin interface (mirrors main src/ structure)\n- `src/_shared/` — Shared utilities (NOT auto-imported, requires explicit imports)\n- `.phoenix/` — Auto-generated files (DO NOT EDIT)\n- `public/` — Static assets (3D models, textures, images, HDRI maps, fonts)\n- `assets/` — Uploadable resources (PDF templates, email assets)",architecturePrinciples:"## Architecture Principles\n- YAML-first: 99% of configuration in spec/*.yaml, custom code is last resort\n- ECS pattern: entities (domain objects) + components (behavior/UI) + systems (SDK runtime)\n- Reactive state: immutable domain state flows through RxJS pipelines\n- Data binding: `$read` (read-only), `$write` (write-only), `$bind` (bidirectional) connect components to domain\n- memoEval: all component implementations must use memoEval for stable object references",keyPatterns:"## Key Patterns\n- Expressions = computed properties on entities (prefix: `$`), implemented per-entity in src/expressions/\n- Invariants = validation rules returning violations, static or dynamic\n- Transformers = auto-fixers maintaining consistency after state changes\n- Components defined in YAML with `$read`/`$bind` bindings, or custom in src/components/ using attachComponent builder\n- Webhooks = server-side finalization tasks (PDF, email, CSV, image rendering)\n- Filters = contextual component activation via navigationStates, viewStates, modes, selectedEntityIds",fileConventions:`## File Conventions
|
|
4
|
-
- Components: PascalCase (.tsx)
|
|
5
|
-
- Utilities: kebab-case (.ts)
|
|
6
|
-
- Expressions: entity-name.ts
|
|
7
|
-
- Migrations: v*.ts (sequential)
|
|
8
|
-
- Specs: kebab-case.yaml
|
|
9
|
-
- Underscore folders (_shared/, _utils/) are NOT auto-imported`,exportRules:`## Export Rules
|
|
10
|
-
All files in src/expressions/, src/invariants/, src/transformers/, src/components/, src/handlers/, src/webhooks/ MUST use default exports. Can be a single item or an array. Named exports are ignored by the SDK auto-import system.`,webhookMembership:"## Webhook Membership\n- User-authored components, admin components, and handlers are frontend-only by default.\n- A handler that registers `createMapPublishedRevisionDataHandler`, `createMapPublishedChunkedDataHandler`, `createDataRowValidatorHandler`, or `createSheetValidatorHandler` is included in the webhook automatically.\n- To include another component or handler in the webhook, put `'use webhook'` as its first statement (leading comments are allowed).\n- A webhook-included file and its runtime local-import closure must not import browser SDK entrypoints (`application`, `admin`, `configurator`, `editor`, `react`, `ui`) or style/font/image assets. Spec parsing reports the unsafe import and inclusion reason as a diagnostic.\n- Keep browser rendering in an unpinned file. Move shared server-safe logic into a separate module when both frontend and webhook code need it.",doNotEdit:"## Do Not Edit\n- `.phoenix/` directory — completely regenerated on each build\n- `tsconfig.json`, `eslint.config.js`, `prettier.config.js`, `.prettierignore`, `.linguirc`, `.nvmrc`\n- `src/locales/` .ts files — compiled from .po files",sdkDocumentation:'## SDK Documentation\n\nAlways search SDK docs for relevant examples before implementing Phoenix features.\n\n### Commands\n- `pnpm phoenix docs` — Full documentation index with descriptions\n- `pnpm phoenix docs -s <term>` — Search all doc content and metadata (case-insensitive)\n- `pnpm phoenix docs --dir` — Print the absolute docs directory for grep or ripgrep\n- `pnpm phoenix docs -r <path>` — Read specific doc (raw text to stdout)\n- `pnpm phoenix docs -c <category>` — List docs in a category\n- `pnpm phoenix docs -l` — List all doc paths with titles\n\n### Key Docs\n- `docs/phoenix/getting-started.mdx` — Setup, prerequisites, first project\n- `docs/phoenix/quickstart.mdx` — End-to-end tutorial building a configurator\n- `docs/phoenix/domain-model.mdx` — Entities, attributes, relations, specs\n- `docs/phoenix/components.mdx` — ECS pattern, YAML components, custom components\n- `docs/phoenix/project-structure.mdx` — Files, folders, conventions\n- `docs/phoenix/best-practices.mdx` — YAML-first, code patterns, common pitfalls\n- `docs/phoenix/state-management.mdx` — Reactive state, RxJS pipelines, data flow\n- `docs/phoenix/expression-context.mdx` — Expression API, context object, helpers\n- `docs/phoenix/webhooks.mdx` — Server-side finalization workflows\n- `docs/phoenix/finalization.mdx` — Finalization system, PDF/email/CSV generation\n- `docs/phoenix/migrations.mdx` — Schema versioning, migration files\n\n### Agent Workflow\n1. Find relevant docs by content: `pnpm phoenix docs -s \'camera\'`\n2. Read matching doc: `pnpm phoenix docs -r docs/3d-scene/cameras/transitions.mdx`\n3. Search within a doc: `pnpm phoenix docs -r <path> | grep "example"`\n4. Search titles only as a fallback: `pnpm phoenix docs -l | grep "camera"`\n5. Search generated files directly when needed: `grep -rn "camera" "$(pnpm phoenix docs --dir)"`\n6. Browse a topic area: `pnpm phoenix docs -c "Layouts"`',assetInspection:"## 3D Asset Inspection\n\nRun `pnpm phoenix inspect:assets` to discover all glTF/GLB files in `public/` and get a summary table. Use `--file <path>` for detailed single-file inspection.\n\n**When to use:** before writing YAML/code that references objectName, materialsToOverride, morphTargetInfluences, or object positioning.\n\n**What it shows per node:**\n- Name, type (Mesh/Light/Camera/Empty), children\n- Transform: `pos=`, `rot=`, `scale=` (only non-default values shown)\n- Per-node morph targets: `morphs=Width,Height`\n- Bounding box: `bounds=WxHxD` (width x height x depth in meters)\n- Origin placement: `origin=center`, `bottom-center`, `top-center`, `bottom-corner`, etc. with numerical offset\n\n**Use cases:**\n- Find exact node names for `objectName` in scene entity components\n- Find material names for `materialsToOverride`\n- Find morph target names for `morphTargetInfluences`\n- Check model dimensions (bounds) for positioning, dimension indicators, or invariants\n- Check origin placement to understand how models anchor (center vs bottom-center)\n- Use `--json` for programmatic access to all data\n\n**Flags:** `--objects`, `--materials`, `--morphs`, `--animations`, `--json`",screenshotCli:"## Screenshot CLI\n\nCapture 3D canvas screenshots from a running dev server via `pnpm phoenix screenshot`.\n\n**Prerequisites:**\n1. `phoenix dev` must be running (starts the WebSocket server on port 3020)\n2. Configurator must be open in a browser (the browser does the actual rendering)\n\n**Options:**\n- `--output, -o` — Output file path (default: `./screenshot.png`)\n- `--width, -w` — Width in pixels (default: 1920)\n- `--height` — Height in pixels (default: 1080)\n- `--format, -f` — Image format: PNG or JPEG (default: PNG)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example workflow:**\n1. Start dev server: `pnpm phoenix dev`\n2. Open configurator in browser (or via Playwright MCP)\n3. Take screenshot: `pnpm phoenix screenshot -o ./render.png -w 2560 --height 1440`\n\n**Use cases:** visual regression testing, generating product images, debugging 3D renders",inspectState:"## Inspect: State\n\nGet the current editor runtime state as JSON via `pnpm phoenix inspect:state`.\n\n**Prerequisites:** same as screenshot (dev server running + browser open)\n\n**Options:**\n- `--output, -o` — Output file path (prints to stdout if omitted)\n- `--sections, -s` — Comma-separated: entities, navigation, validation (default: all)\n- `--pretty` — Pretty-print JSON (default: true)\n- `--port` — WebSocket server port (default: 3020)\n\n**Example:** `pnpm phoenix inspect:state -o ./state.json -s entities,navigation`\n\n**Lifecycle status:** Always included in response. Shows which systems are ready:\n- `domainLoaded` — domain data loaded\n- `domainContextReady` — domain context initialized (entities available)\n- `configuratorReady` — 3D configurator initialized\n- `sessionAuthenticated` — session service active\n- `editorMode` — editor mode enabled\n\n**Tips:** Use `--sections` to limit payload size. Pipe through `head`/`tail` for partial output (e.g., `pnpm phoenix inspect:state | head -50`).\n\n**Use cases:** AI agent context, debugging entity state, inspecting navigation/validation",inspectData:`## Inspect: Data
|
|
11
|
-
|
|
12
|
-
Get the current editor context data as JSON via \`pnpm phoenix inspect:data\`.
|
|
13
|
-
|
|
14
|
-
**Prerequisites:** same as screenshot (dev server running + browser open)
|
|
15
|
-
|
|
16
|
-
**Options:**
|
|
17
|
-
- \`--output, -o\` — Output file path (prints to stdout if omitted)
|
|
18
|
-
- \`--pretty\` — Pretty-print JSON (default: true)
|
|
19
|
-
- \`--port\` — WebSocket server port (default: 3020)
|
|
20
|
-
|
|
21
|
-
**Returns:** publishedData, frontendData, backendData, sessionData, accessData, webComponentProperties
|
|
22
|
-
|
|
23
|
-
**Example:** \`pnpm phoenix inspect:data -o ./data.json\`
|
|
24
|
-
|
|
25
|
-
**Tips:** Pipe through \`head\`/\`tail\` for partial output (e.g., \`pnpm phoenix inspect:data | head -30\`).
|
|
26
|
-
|
|
27
|
-
**Use cases:** AI agent context, debugging published/session/access data`,inspectScene:`## Inspect: Scene
|
|
28
|
-
|
|
29
|
-
Get the current Three.js scene graph as JSON via \`pnpm phoenix inspect:scene\`.
|
|
30
|
-
|
|
31
|
-
**Prerequisites:** same as screenshot (dev server running + browser open)
|
|
32
|
-
|
|
33
|
-
**Options:**
|
|
34
|
-
- \`--output, -o\` — Output file path (prints to stdout if omitted)
|
|
35
|
-
- \`--pretty\` — Pretty-print JSON (default: true)
|
|
36
|
-
- \`--port\` — WebSocket server port (default: 3020)
|
|
37
|
-
|
|
38
|
-
**Returns:** Recursive scene tree with per-node: name, type, visible, position, rotation, scale, userData (entityId), and for meshes: geometry name, bounding box, material properties (color, metalness, roughness, opacity, textures), morph target influences. Lights include color, intensity, and type-specific properties.
|
|
39
|
-
|
|
40
|
-
**Example:** \`pnpm phoenix inspect:scene -o ./scene.json\`
|
|
41
|
-
|
|
42
|
-
**Tips:** Scene graphs can be large. Pipe through \`head\`/\`tail\` for partial output.
|
|
43
|
-
|
|
44
|
-
**Use cases:** AI agent context, debugging 3D scene layout, inspecting materials and lighting`,playwrightMcpSetup:`## Playwright MCP Setup (for AI agents)
|
|
45
|
-
|
|
46
|
-
To interact with the 3D configurator in a browser, Playwright MCP needs GPU-enabled flags for WebGL rendering. Add to \`~/.claude/.mcp.json\`:
|
|
47
|
-
|
|
48
|
-
\`\`\`json
|
|
49
|
-
{
|
|
50
|
-
"mcpServers": {
|
|
51
|
-
"playwright": {
|
|
52
|
-
"command": "npx",
|
|
53
|
-
"args": [
|
|
54
|
-
"@playwright/mcp@latest",
|
|
55
|
-
"--headed",
|
|
56
|
-
"--launch-options",
|
|
57
|
-
"{\\"args\\":[\\"--use-gl=swiftshader\\",\\"--enable-webgl\\",\\"--ignore-gpu-blocklist\\"]}"
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
\`\`\`
|
|
63
|
-
|
|
64
|
-
Key flags:
|
|
65
|
-
- \`--headed\` — visible browser (required for GPU rendering)
|
|
66
|
-
- \`--use-gl=swiftshader\` — software GPU fallback for environments without a physical GPU
|
|
67
|
-
- \`--enable-webgl\` + \`--ignore-gpu-blocklist\` — ensure WebGL is available`};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{renderAgentSkill as n}from"./common/agent-skill.js";import{sdkGuidanceSections as e}from"./common/sdk-content.js";export const generatePhoenixCliSkill=()=>n({name:"phoenix-cli",description:"Phoenix CLI tooling for building and inspecting this configurator, covering build, dev and sync commands, dev logs, glTF asset inspection, screenshots, runtime state, data and scene inspection, and Playwright MCP setup. Use when building, debugging build or runtime errors, checking 3D assets, or inspecting the running configurator.",sections:[e.buildCommands,e.devLogs,e.assetInspection,e.screenshotCli,e.inspectState,e.inspectData,e.inspectScene,e.playwrightMcpSetup]});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import{renderAgentSkill as e}from"./common/agent-skill.js";let t=`## When to Raise Feedback
|
|
2
|
-
Draft feedback for the Phoenix team when one of these happens while you work in this project:
|
|
3
|
-
- **Bug** — the SDK, the \`phoenix\` CLI or generated code crashes, produces wrong output or behaves differently from its documentation, and the cause is not in this project's own code.
|
|
4
|
-
- **Misleading guidance** — a doc page, a Phoenix skill or an error message sent you the wrong way, or did not say what you needed.
|
|
5
|
-
- **Missing feature** — something the SDK does not support forced a workaround, or a routine task took far more steps than it should.
|
|
6
|
-
|
|
7
|
-
Do not draft feedback for problems in this project's own specs or code, for a suspicion you have not checked, or twice for the same problem. Write one draft per distinct problem.`,o=`## Ask Before You Send
|
|
8
|
-
Never send feedback on your own. Show the user a draft and send it only after they approve it.
|
|
9
|
-
|
|
10
|
-
When to ask is your judgement:
|
|
11
|
-
- **Right away** — the problem is crucial: it blocks the task or forces a workaround the user should know about now. Interrupt the work, show the draft, and continue once the user has answered.
|
|
12
|
-
- **At the end of the task** — everything else. Collect the details while you work and show all drafts together in your final message.
|
|
13
|
-
- **When the user asks** you to send feedback — draft it and show it before sending.
|
|
14
|
-
|
|
15
|
-
The draft is exactly what would be sent: the type, the message, the project if you name one with \`--projectSlug\`, and the contact if the user gave one. Send it unchanged after a yes; if the user edits it, send their version. If they decline, drop it and do not raise that problem again.`,a=`## Ask for a Rating After a Deploy
|
|
16
|
-
When \`phoenix deploy\` reports that the configurator is live, tell the user the live URL first, then ask them to rate building with Phoenix so far:
|
|
17
|
-
- Ask for a score from 0 to 10, where 10 is the best, and one optional sentence on what would have made it better. Say in the same question that the answer is sent to the Phoenix team as feedback.
|
|
18
|
-
- Ask once per conversation, after the first deploy that goes live. Do not ask again after later deploys, and do not ask after a deploy that failed.
|
|
19
|
-
- Never choose or guess the score yourself. If the user skips the question or declines, send nothing and do not ask again.
|
|
20
|
-
|
|
21
|
-
A rating is feedback like any other, so the rules of this skill apply. Write the comment from the user's words, and take out anything the last section forbids: replace this project's product, customer and people names with generic words. Then show the user the three lines below exactly as they would be sent and send them only after a yes; if they edit the text, send their version. Use \`none\` when they gave no comment:
|
|
22
|
-
\`\`\`bash
|
|
23
|
-
pnpm phoenix feedback 'Rating: <score>/10
|
|
24
|
-
Comment: <their comment, or none>
|
|
25
|
-
Stage: after a deploy' --type other --agent '<your agent name>'
|
|
26
|
-
\`\`\`
|
|
27
|
-
Keep the three labels and their order, so the ratings can be read out of the feedback list. A rating is not a bug report: when the comment names a concrete problem, offer to draft it as its own feedback as the sections above describe.`,n=`## What Never Goes Into Feedback
|
|
28
|
-
The message leaves this project and is read by the Phoenix team. Never include:
|
|
29
|
-
- secrets: API tokens, keys, passwords or \`.env\` values;
|
|
30
|
-
- customer or end-user data, or personal data such as names and email addresses, other than a contact the user asked you to add;
|
|
31
|
-
- this project's source code, specs or business rules. Describe the shape of the problem in words, or reduce it to a generic example that contains nothing of the project.`;export const generatePhoenixFeedbackSkill=()=>e({name:"phoenix-feedback",description:"Drafting feedback about the Phoenix SDK, CLI, documentation or Studio for the Phoenix team and sending it with the phoenix feedback command once the user approves the draft, covering when to raise it, how to write it, the rating asked for after a deploy and what must never be included. Use when the SDK or CLI misbehaves, a doc or skill misled you, a missing feature forced a workaround, the user asks to send feedback, or phoenix deploy has just gone live and the user should be asked to rate the experience from 0 to 10.",sections:[t,o,"## How to Send It\n```bash\npnpm phoenix feedback '<message>' --type bug --agent '<your agent name>'\n```\n- Put the message in single quotes, so the shell passes backticks, `$` and double quotes through unchanged. In bash or zsh, write a single quote inside the message as `'\\''`; in PowerShell, double it instead.\n- `--type` is `bug`, `idea` or `other` (default `other`). Use `idea` for a missing feature or an improvement.\n- `--agent` names you, the coding agent, so the team can tell agent feedback from a person's.\n- `--contact '<email>'` only when the user wants a reply and gave you the contact to use.\n- The workspace, user, SDK version and the spec's `project` are attached automatically. `--projectSlug <slug>` names another project of the workspace.\n- A message holds at most 5000 characters.\n\nWrite the message for someone who cannot see this project: what you ran or called, what you expected, what happened instead with the error text, and the workaround if you found one. Before quoting an error, replace this project's names, file paths and values in it with generic placeholders, as the list below requires.\n\nThe command needs `phoenix login`. If it answers that you are not signed in, tell the user once and continue; do not sign in yourself, because the sign-in is approved in a browser.\n\nAfter sending, confirm it to the user in one line.",a,n]});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{renderAgentSkill as e}from"./common/agent-skill.js";import{sdkGuidanceSections as t}from"./common/sdk-content.js";export const followsCanaryBuilds=e=>!e.useWorkspace&&e.sdkVersion.includes("-develop.");export const generatePhoenixSkill=({checkLatestCanary:n})=>e({name:"phoenix",description:`Phoenix SDK project conventions, covering project structure, architecture principles, key patterns, file and export rules, webhook membership, showing the user the dev preview and the build of a deploy, and how to search the SDK documentation${n?", and the internal-beta check for the latest canary SDK build":""}. Use before writing or changing specs or source code in this Phoenix configurator project.`,sections:[...n?["## Stay on the Latest Canary\nDuring the internal beta this project uses the `canary` build of the SDK, which is published from every change to the platform. Once per conversation, before you change anything, compare the installed version with the newest canary:\n```bash\npnpm list @salsita-ai/sdk --depth 0\nnpm view @salsita-ai/sdk@canary version\n```\nWhen they differ, tell the user which version you are moving to, then update the project and regenerate its files:\n```bash\npnpm add @salsita-ai/sdk@canary\npnpm phoenix sync\n```\n`sync` rewrites the Phoenix skills, so read the ones you use again after it. When the user runs a globally installed `phoenix`, update that too with `npm install -g @salsita-ai/sdk@canary`. If the project no longer builds after the update, stop and tell the user; the `phoenix-feedback` skill covers reporting it."]:[],t.projectStructure,t.architecturePrinciples,t.keyPatterns,t.fileConventions,t.exportRules,t.webhookMembership,t.doNotEdit,"## Show the Preview While You Work\nThe user should see the configurator change as you build it. Before your first change in a conversation, make sure `pnpm phoenix dev` is running (start it in the background when it is not) and open the address it prints as `Preview: <url>` (also written to `.phoenix/phoenix-dev.log`) in the user's browser: `open '<url>'` on macOS, `xdg-open '<url>'` on Linux, `Start-Process '<url>'` in PowerShell, `start \"\" \"<url>\"` in cmd. Keep the quotes, the shell would otherwise read a `?` in the address as a pattern. The log keeps the lines of earlier runs, so when you have just started dev, wait for the `Preview:` line written after your start and use the last one. Open it once; the preview reloads on every change, so tell the user to keep that tab open instead of opening it again.","## Show the Build After a Deploy\n`pnpm phoenix deploy` starts a build on the server and waits for it to go live. Right after `Build <id> started` it prints `Follow the build in Studio: <url>`. Run the deploy so that you can read its output while it runs, and open that link in the user's browser, quoted as above, as soon as it appears, so they can follow the build they just triggered. When the line is missing, the sign-in is older than the link: tell the user the build is listed under Deployments in Studio, and that `pnpm phoenix login <workspace>` brings the link back.","## Code Review\nUse the `phoenix-review` skill to review code changes before committing.",t.sdkDocumentation]});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{browserDetailsTool as e}from"@salsita-ai/contracts/assistant";let t=e=>{let t=[];for(let i=0;i<e.length;i+=64)t.push(e.slice(i,i+64));return t};export const browserDetailsClientTool=e.client(()=>{let e=(()=>{let e=[`User agent: ${navigator.userAgent}`,`Viewport: ${window.innerWidth} x ${window.innerHeight} px`,`Screen: ${window.screen.width} x ${window.screen.height} px`,`Device pixel ratio: ${window.devicePixelRatio}`,`Language: ${navigator.language}`,`Time zone: ${Intl.DateTimeFormat().resolvedOptions().timeZone}`].flatMap(t),i=document.createElement("canvas");i.width=720,i.height=48+26*e.length;let n=i.getContext("2d");if(!n)throw Error("The browser details capture failed because the canvas has no 2D context. Retry in another browser.");return n.fillStyle="#ffffff",n.fillRect(0,0,i.width,i.height),n.fillStyle="#111111",n.font="16px monospace",n.textBaseline="top",e.forEach((e,t)=>n.fillText(e,24,24+26*t)),i.toDataURL("image/png")})();return[{type:"image",source:{type:"data",value:e.slice(e.indexOf(",")+1),mimeType:"image/png"}}]});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{AssistantGraphQLToolInput as e,applyTool as t,queryTool as o}from"@salsita-ai/contracts/assistant";let a=e=>({results:[],committed:!1,message:e}),s=e=>JSON.parse(JSON.stringify(e)),i=t=>{let o=e.safeParse(t);if(!o.success){let e=o.error.issues.map(e=>`${e.path.join(".")}: ${e.message}`).join("; ");return{ok:!1,refusal:a(`Nothing was run, because the tool input is not a list of operations (${e}). Send { "operations": [{ "query": "<one GraphQL operation>" }] } with at least one item.`)}}return{ok:!0,operations:o.data.operations.map(({query:e,variables:t,operationName:o})=>({document:e,variables:t??void 0,operationName:o??void 0}))}};export const queryClientTool=o.client(async(e,{context:t})=>{let o=i(e);return o.ok?t.storeSystem.isInitialized?s({results:(await t.graphQLSystem.prepare(t.storeSystem.stateSlices.committed.value.state,o.operations)).map(({result:e})=>e),committed:!1}):a("Nothing was run, because the configuration is not loaded yet, so there is no state to query. Call the tool again once the configurator has finished loading."):o.refusal});export const applyClientTool=t.client(async(e,{context:t})=>{if("owner"!==t.getActiveMode())return a("Nothing was run, because changes cannot be applied in this session: the user may view this configuration but not change it. The query tool still works here, including mutations, to show what a change would do without keeping it.");let o=i(e);return o.ok?s(await t.graphQLSystem.execute(o.operations)):o.refusal});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useAssistantChat, type AssistantChatState } from './use-assistant-chat.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{useAssistantChat}from"./use-assistant-chat.js";
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type UIMessage } from '@tanstack/ai-react';
|
|
2
|
-
/** Experimental assistant chat state and actions of the current configuration. */
|
|
3
|
-
export interface AssistantChatState {
|
|
4
|
-
/** The thread as painted: hydrated from the server, then streamed. */
|
|
5
|
-
readonly messages: ReadonlyArray<UIMessage>;
|
|
6
|
-
/** True while a reply streams or a browser tool runs. */
|
|
7
|
-
readonly isLoading: boolean;
|
|
8
|
-
readonly error: Error | undefined;
|
|
9
|
-
/** Sends a user message stamped with its send time. */
|
|
10
|
-
readonly send: (content: string) => Promise<void>;
|
|
11
|
-
/** Stops the current reply in the browser and on the server. */
|
|
12
|
-
readonly stop: () => Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Experimental: the conversational assistant of the current configuration. The server owns the
|
|
16
|
-
* thread — the chat hydrates from it on mount and rejoins a reply still streaming — so the hook
|
|
17
|
-
* keeps nothing in browser storage. Each message carries its send time for the model. The model's
|
|
18
|
-
* `query` and `apply` calls run here, in the browser, against the configurator this hook is rendered in.
|
|
19
|
-
*/
|
|
20
|
-
export declare const useAssistantChat: () => AssistantChatState;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fetchServerSentEvents as t,useChat as e}from"@tanstack/ai-react";import{useCallback as a,useMemo as r}from"react";import{useAuthorizedClient as s,useConfigurationId as n,useDomain as o}from"#package/react-sdk";import{useConfigurator as i}from"../application-runtime/index.js";import{browserDetailsClientTool as c}from"./browser-details.js";import{applyClientTool as p,queryClientTool as l}from"./graphql-tools.js";let m=[c,l,p];export const useAssistantChat=()=>{let c=n(),p=s(),l=r(()=>p.getAssistantChatConnection(c),[p,c]),d=r(()=>{let e=async()=>({headers:await l.headers()}),a=t(l.url,e),r=t(`${l.url}/runs`,e);return{...a,joinRun:r.joinRun}},[l]),{graphQLSystem:u}=i(),{storeSystem:h,domainContextSelectors:f}=o(),{getActiveMode:w}=f,{messages:g,isLoading:j,error:y,sendMessage:C,stop:S,runId:$}=e({threadId:`assistant:${c}`,connection:d,persistence:!0,history:{pageSize:50},tools:m,context:r(()=>({graphQLSystem:u,storeSystem:h,getActiveMode:w}),[u,h,w])});return{messages:g,isLoading:j,error:y,send:a(async t=>{let e={sentAt:new Date().toISOString()};await C({content:t,metadata:e})},[C]),stop:a(async()=>{S(),null!=$&&await fetch(`${l.url}/runs/${encodeURIComponent($)}/cancel`,{method:"POST",headers:await l.headers()})},[l,$,S])}};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Experimental, unstyled assistant chat for the current configuration: streamed replies, reasoning
|
|
3
|
-
* summaries, tool calls with their payloads, a pending indicator and a stop button. It renders
|
|
4
|
-
* nothing, and contacts no server, when the application spec has no `assistant` section.
|
|
5
|
-
*/
|
|
6
|
-
export declare const AssistantChat: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Alert as r,Box as a,Button as i,LinearProgress as n,Stack as o,TextField as l,Typography as s}from"@mui/material";import{useState as c}from"react";import{useAssistantChat as p}from"#package/configurator";import{useSpecAssistant as m}from"#package/react-sdk";let d=({part:t})=>{switch(t.type){case"text":return e(s,{sx:{whiteSpace:"pre-wrap"},children:t.content});case"thinking":return e(s,{variant:"body2",color:"text.secondary",sx:{fontStyle:"italic",whiteSpace:"pre-wrap"},children:t.content});case"tool-call":return e(s,{variant:"caption",component:"pre",sx:{m:0,whiteSpace:"pre-wrap"},children:`${t.name}(${JSON.stringify(t.input??t.arguments)}) \xb7 ${t.state}`});case"tool-result":{let r=(e=>{if("string"!=typeof e){for(let t of e)if("image"===t.type&&"data"===t.source.type)return`data:${t.source.mimeType};base64,${t.source.value}`}})(t.content);return r?e(a,{component:"img",src:r,alt:"Tool result",sx:{maxWidth:"100%",border:1}}):e(s,{variant:"caption",children:`Tool result \xb7 ${t.state}`})}default:return null}},u=()=>{let{messages:m,send:u,stop:h,isLoading:f,error:x}=p(),[g,v]=c("");return t(o,{spacing:1.5,sx:{p:2},children:[m.map(r=>t(a,{component:"div",sx:{alignSelf:"user"===r.role?"flex-end":"flex-start",maxWidth:"85%"},children:[e(s,{variant:"overline",children:r.role}),r.parts.map((t,r)=>e(d,{part:t},r))]},r.id)),f&&e(n,{"aria-label":"Assistant is responding"}),x&&e(r,{severity:"warning",children:x.message}),e("form",{onSubmit:e=>{e.preventDefault();let t=g.trim();t&&(v(""),u(t))},children:t(o,{direction:"row",spacing:1,children:[e(l,{size:"small",fullWidth:!0,placeholder:"Ask the assistant…",value:g,onChange:e=>v(e.target.value)}),f?e(i,{onClick:()=>void h(),children:"Stop"}):e(i,{type:"submit",variant:"contained",disabled:!g.trim(),children:"Send"})]})})]})};export const AssistantChat=()=>m()?e(u,{}):null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { AssistantChat } from './AssistantChat.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{AssistantChat}from"./AssistantChat.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e=["How to read the GraphQL schema of this configurator:","- A configuration is a set of entities. `root` is the root entity, `entities` lists every entity or the ones with the given ids, and `selectedEntity` is the entity the user has selected, or the root entity when nothing is selected.","- Every entity has an `id` of the form `<Type>-<number>`, for example `Table-1`, and a `type` with its entity type name. Ids are assigned by the configurator: read them from the configuration and never make one up.","- A field whose name starts with `_` is computed by the configurator from other values. It can be read like any other field and never written.","- Numbers are in the units the configuration stores them in. A field description names the unit when the product defines one.",'- A text field that only takes fixed values lists them in its description as "One of: ...". Use exactly those values.',"- A field typed as another entity type or as a list of one is a relation: select fields on it to read the related entities.","- Field and type descriptions come from the team that built the configurator and say what a value means for the product."],t=["How changes work:","- Every field of the `Mutation` type is one change. Its description says what it changes and what it returns.","- The configurator checks the whole configuration after each change. A change that would leave it invalid fails with an error that names the entities at fault, and it is not applied. Later changes of the same request are then not run.","- The configurator may adjust other values in response to a change, so read what a mutation returns instead of assuming the values you sent."],n=["How to add entities:","- Entities are added from recipes, the same ones the configurator offers the user. An entity type that can take children has a `meta` field; `meta { childRecipes }` lists its recipe groups and their recipes.","- List the recipes of the group first, pick one by its `key`, then call `addChild` with the id of the parent, the `groupId` and the `key`. Keys change with the configuration and the language, so never reuse one from memory.","- `dryRun` on a recipe shows what adding it would do without adding it: whether it is `ok`, the `changedEntities` it would add or modify, the `deletedEntityIds` it would remove, and the `errors` when it cannot be added. An entity whose id the configuration does not have yet is new. It is costly, so select it only on the recipes you are deciding between.","- Put each `addChild` in its own operation. The recipes of a group and what they add depend on the configuration before them, so after adding something, list the group again before adding from it once more."],a=["How to replace entities:","- An entity is replaced from recipes, the same ones the configurator offers the user. An entity type that can be replaced has a `meta` field; `meta { replaceRecipes }` lists its replace recipe groups and what the entity can be replaced with.","- List the recipes of the group first, pick one by its `key`, then call `replaceEntity` with the id of the entity, the `groupId` and the `key`. `dryRun` on a replace recipe shows what replacing would do without doing it: the replacement and everything else that changes are under `changedEntities`, and the replaced entity is among the `deletedEntityIds`.","- The replacement is a new entity with a new id, and its field values come from the recipe, so they can differ from those of the entity it replaces. Read the ids and values `replaceEntity` returns, and never use the old id again.","- Put each `replaceEntity` in its own operation. The recipes of a group and what they do depend on the configuration before them, so after replacing something, list the group of the replacement again before replacing once more."],i=["How to find the values a field can take:","- Some fields store a key whose choices the configurator holds elsewhere. Such a field has an edge under `meta` named after it: `meta { <field>Options }` lists its choices, each with the `value` to write and the `name` the user sees.","- Read the choices before you write such a field or name a choice to the user, and write the `value`, not the `name`. A value outside the list is rejected unless the edge description says the field is not checked.","- `dryRun` on an option shows what writing its value would do without writing it: whether it is `ok`, the `changedEntities` it would add or modify, the `deletedEntityIds` it would remove, and the `errors` when the value cannot be written. It is costly, so select it only on the options you are deciding between. It is null when the edge description says the options cannot be dry-run.","- The choices can depend on the entity and on its current state. Read them again after a change, unless the edge description says they are the same for all instances or do not change."],o=["How to use the `query` and `apply` tools:","- Both take `operations`, a list of GraphQL documents that run in order. Each document holds exactly one operation. To do several things, send several items in one call instead of several calls.","- Write values into the document as literals. Use `variables` only for a value that cannot be written as a literal.","- Select only the fields you need: results are returned whole.","- The result has one GraphQL result per operation, in the order sent. When an operation fails, its `errors` say why and the operations after it are not run.","- `query` reads the configuration the user has open and never changes it. Call it before you say anything about the configuration."],s=["- This configurator exposes no changes, so there is nothing for `apply` to run. Say so when the user asks you to change the configuration."],r=['- Mutations inside `query` answer "what if" questions. Each operation sees the changes of the ones before it, so a mutation followed by a query shows the configuration as it would be. Nothing is kept and the user sees no change.',"- `apply` makes the changes the user asked for. It is all or nothing: when any operation fails, nothing is changed; when all succeed, the user gets them as one undo step.","- `committed` in the result says whether the changes were kept. When it is false although no operation failed, `message` says why: the changes may be waiting for the approval of the user, the user may have changed the configuration meanwhile, or this session may not change the configuration at all. Without a `message`, the operations changed nothing. Never tell the user a change was made unless `committed` is true."];export const generateAssistantPrompt=h=>{let d=/^type Mutation\b/m.test(h.sdl);return[e,...d?[t]:[],.../^\s+addChild\(/m.test(h.sdl)?[n]:[],.../^\s+replaceEntity\(/m.test(h.sdl)?[a]:[],.../^type FieldOption\b/m.test(h.sdl)?[i]:[],[...o,...d?r:s]].map(e=>e.join("\n")).join("\n\n")};
|
|
File without changes
|
/package/dist/application-spec/generate-application/code/templates/{common → skills}/agent-skill.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|