@salsita-ai/sdk 0.50.0-develop.c33986dc44 → 0.50.0-develop.ca5894b56c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/application-spec/core/enhanced-json-value.d.ts +2 -31
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/index.d.ts +1 -3
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-schema.d.ts +2 -52
- package/dist/application-spec/core/markers/index.d.ts +1 -1
- package/dist/application-spec/core/markers/index.js +1 -1
- package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
- package/dist/application-spec/core/markers/msg-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
- package/dist/application-spec/errors/diagnostic-codes.d.ts +1 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +1 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/templates/index.d.ts +2 -6
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/factory-data-runtime.d.ts +2 -2
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/recipe-defaults.js +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/factory-data/static-violations.js +1 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +1 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +2 -3
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +2 -1
- package/dist/application-spec/generate-application/runtime/spec-code/resolve-spec-code.d.ts +1 -1
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
- package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
- package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
- package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
- package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
- package/dist/client/authorized-client.d.ts +3 -1
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/contract.d.ts +17 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/local-authorized-client.d.ts +3 -1
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +4 -1
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +228 -0
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +13 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +2 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +15 -9
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/common/configurator-interface.d.ts +2 -2
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +1 -1
- package/dist/configurator/configurator-context/PresetSelectionProvider.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
- package/dist/configurator/configurator-context/index.d.ts +0 -4
- package/dist/configurator/configurator-context/index.js +1 -1
- package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +1 -1
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +12 -4
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -1
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
- package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
- package/dist/docs/3d-scene/cameras/custom.mdx +4 -2
- package/dist/docs/index.json +1 -1
- package/dist/docs/phoenix/domain-model.mdx +4 -1
- package/dist/docs/phoenix/phoenix-cli.mdx +14 -6
- package/dist/docs/phoenix/project-structure.mdx +21 -17
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +2 -2
- package/dist/docs/phoenix/webhooks.mdx +5 -1
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/index.d.ts +1 -0
- package/dist/domain/index.js +1 -1
- package/dist/domain/spec/application/index.d.ts +1 -0
- package/dist/domain/spec/application/index.js +1 -0
- package/dist/{application-spec/core → domain/spec}/components/component-filter.d.ts +3 -2
- package/dist/domain/spec/enhanced-json-value.d.ts +30 -0
- package/dist/domain/spec/enhanced-json-value.js +1 -0
- package/dist/domain/spec/index.d.ts +7 -0
- package/dist/domain/spec/index.js +1 -0
- package/dist/domain/spec/json-schema.d.ts +52 -0
- package/dist/domain/spec/json-schema.js +1 -0
- package/dist/domain/spec/markers/index.d.ts +2 -0
- package/dist/domain/spec/markers/index.js +1 -0
- package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
- package/dist/domain/spec/markers/msg-marker.js +1 -0
- package/dist/domain/spec/model/aliases.d.ts +9 -0
- package/dist/domain/spec/model/aliases.js +1 -0
- package/dist/domain/spec/model/common-types.d.ts +15 -0
- package/dist/domain/spec/model/common-types.js +1 -0
- package/dist/domain/spec/model/defaults.d.ts +33 -0
- package/dist/domain/spec/model/defaults.js +1 -0
- package/dist/domain/spec/model/entity-types.d.ts +8 -0
- package/dist/domain/spec/model/entity-types.js +1 -0
- package/dist/domain/spec/model/index.d.ts +7 -0
- package/dist/domain/spec/model/index.js +1 -0
- package/dist/domain/spec/model/model-version-key.d.ts +3 -0
- package/dist/domain/spec/model/model-version-key.js +1 -0
- package/dist/domain/spec/model/names/action-name.d.ts +7 -0
- package/dist/domain/spec/model/names/action-name.js +1 -0
- package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
- package/dist/domain/spec/model/names/alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-type-name.js +1 -0
- package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
- package/dist/domain/spec/model/names/expression-name.js +1 -0
- package/dist/domain/spec/model/names/index.d.ts +9 -0
- package/dist/domain/spec/model/names/index.js +1 -0
- package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
- package/dist/domain/spec/model/names/instance-name.js +1 -0
- package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
- package/dist/domain/spec/model/names/invariant-name.js +1 -0
- package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
- package/dist/domain/spec/model/names/shape-property-name.js +1 -0
- package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
- package/dist/domain/spec/model/names/violation-type-name.js +1 -0
- package/dist/domain/spec/model/presets.d.ts +30 -0
- package/dist/domain/spec/model/presets.js +1 -0
- package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +1 -0
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +1 -0
- package/dist/phoenix/application-spec/index.d.ts +1 -0
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +11 -0
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/bin.js +1 -1
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/deploy.js +1 -1
- package/dist/phoenix/commands/dev.js +5 -5
- package/dist/phoenix/commands/generated-env-markers.d.ts +1 -0
- package/dist/phoenix/commands/generated-env-markers.js +1 -1
- package/dist/phoenix/commands/index.d.ts +1 -1
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/lingui/index.d.ts +1 -0
- package/dist/phoenix/lingui/index.js +1 -0
- package/dist/phoenix/{services → lingui}/lingui.d.ts +5 -2
- package/dist/phoenix/lingui/lingui.js +1 -0
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +3 -1
- package/dist/phoenix/services/application-spec-project-watcher.js +2 -2
- package/dist/phoenix/services/index.d.ts +1 -0
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/lingui-watcher.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/ConfiguratorRoutingProvider.d.ts +1 -1
- package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/OnGoToIndexHandler.d.ts +1 -2
- package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
- package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/index.js +1 -1
- package/dist/{configurator/configurator-context → react-sdk}/configurator-routing/use-power-routing-lifecycle.d.ts +2 -0
- package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
- package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
- package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
- package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
- package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
- package/dist/react-sdk/domain-application-context/index.js +1 -1
- package/dist/react-sdk/index.d.ts +3 -0
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
- package/dist/react-sdk/integration/index.d.ts +1 -0
- package/dist/react-sdk/integration/index.js +1 -0
- package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
- package/dist/react-sdk/lifecycle-providers/index.d.ts +1 -0
- package/dist/react-sdk/lifecycle-providers/index.js +1 -0
- package/package.json +3 -3
- package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
- package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
- package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
- package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
- package/dist/phoenix/services/lingui.js +0 -1
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/index.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/index.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/relation-expression-params.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { AliasName, EntityTypeName } from './names/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Flattened alias map — each alias name maps to the concrete entity types it resolves to.
|
|
5
|
+
* Nested aliases (e.g. AllLegs → [SteelLegs, LegsOak] where SteelLegs is itself an alias)
|
|
6
|
+
* are fully resolved to leaf entity types. Includes the synthetic "AnyDomainEntity" alias
|
|
7
|
+
* that maps to all entity types in the version. `application-spec` exports it as `Aliases`.
|
|
8
|
+
*/
|
|
9
|
+
export type SpecAliases = Branded<'Aliases', ReadonlyMap<AliasName, readonly EntityTypeName[]>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { EnhancedJsonSchemaType } from '../../core/index.js';
|
|
3
|
+
import type { JsonSchema } from '../json-schema.js';
|
|
4
|
+
/** A single common type definition with both enhanced schema (for type inference) and resolved runtime schema. */
|
|
5
|
+
export type CommonType = Branded<'CommonType', {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly schema: EnhancedJsonSchemaType;
|
|
8
|
+
readonly runtimeSchema: JsonSchema;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Branded map of common type name to CommonType.
|
|
12
|
+
* Entries are in topo-sorted order (dependencies before dependents),
|
|
13
|
+
* so iterating the map yields types in valid emission order.
|
|
14
|
+
*/
|
|
15
|
+
export type CommonTypes = Branded<'CommonTypes', ReadonlyMap<string, CommonType>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { EnhancedJsonValue } from '../enhanced-json-value.js';
|
|
3
|
+
import type { EntityTypeName, ShapePropertyName } from './names/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* A map of shape property names to their default values inside a single entity block.
|
|
6
|
+
* Raw YAML values — markers intact — keyed by a validated {@link ShapePropertyName}.
|
|
7
|
+
* Codegen emits these as-is via `stringifyEnhancedJsonValue`; at run time
|
|
8
|
+
* `createRecipeFactory` makes the generated `createRecipe` factory from them.
|
|
9
|
+
*/
|
|
10
|
+
export type DefaultEntries = Readonly<Record<ShapePropertyName, EnhancedJsonValue>>;
|
|
11
|
+
/**
|
|
12
|
+
* Validated defaults map — source keys confirmed to exist in `model.latest`,
|
|
13
|
+
* property names confirmed to exist on the (effective) shape of the entity
|
|
14
|
+
* or on every alias member's effective shape, values type-checked against the
|
|
15
|
+
* relaxed entity shape (all properties optional). Alias-keyed defaults are
|
|
16
|
+
* flattened here to concrete entity entries so downstream codegen only serialises
|
|
17
|
+
* a runtime-ready per-entity map.
|
|
18
|
+
*
|
|
19
|
+
* A source key may state part of a shape, but the flattened entry of a concrete
|
|
20
|
+
* entity type states every property of its shape: `createRecipeFactory` validates
|
|
21
|
+
* each entry as a whole entity when the generated module loads. An entity type
|
|
22
|
+
* with no entry has no defaults and is not checked.
|
|
23
|
+
*
|
|
24
|
+
* Values are raw `EnhancedJsonValue` so codegen can emit them via
|
|
25
|
+
* `stringifyEnhancedJsonValue` with `$msg` markers preserved.
|
|
26
|
+
*
|
|
27
|
+
* **Deprecated feature.** The whole defaults surface is retained for legacy parity.
|
|
28
|
+
* New specs should express initial values as `$data` entries. When the merged map is
|
|
29
|
+
* non-empty, the factory emits a `DEFAULTS_DEPRECATED` warning.
|
|
30
|
+
*/
|
|
31
|
+
export type Defaults = Branded<'Defaults', {
|
|
32
|
+
readonly entries: Readonly<Record<EntityTypeName, DefaultEntries>>;
|
|
33
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
import type { EntityTypeName } from './names/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Validated list of entity type names declared in a model version (e.g. [Table, TopCircle, Legs3D]).
|
|
5
|
+
* Entity types are the concrete domain objects that can be instantiated in the configurator.
|
|
6
|
+
* Each name must be unique PascalCase.
|
|
7
|
+
*/
|
|
8
|
+
export type EntityTypes = Branded<'EntityTypes', readonly EntityTypeName[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type * from './aliases.js';
|
|
2
|
+
export type * from './common-types.js';
|
|
3
|
+
export type * from './defaults.js';
|
|
4
|
+
export type * from './entity-types.js';
|
|
5
|
+
export type * from './model-version-key.js';
|
|
6
|
+
export type * from './names/index.js';
|
|
7
|
+
export type * from './presets.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Branded action name: camelCase without a prefix (e.g. "movePartBy", "swapCabinets"). An action is
|
|
4
|
+
* a named domain operation, so its name doubles as the key of its implementation and of its
|
|
5
|
+
* generated types.
|
|
6
|
+
*/
|
|
7
|
+
export type ActionName = Branded<'ActionName', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Branded PascalCase alias name (e.g. "RootEntity", "AllLegs").
|
|
4
|
+
* Aliases group entity types so that shapes, expressions, and rules can target
|
|
5
|
+
* multiple entities at once. "RootEntity" is required in every model version.
|
|
6
|
+
*/
|
|
7
|
+
export type AliasName = Branded<'AliasName', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AliasName } from './alias-name.js';
|
|
2
|
+
import type { EntityTypeName } from './entity-type-name.js';
|
|
3
|
+
/**
|
|
4
|
+
* A PascalCase name that identifies either a concrete entity type (e.g. "Table")
|
|
5
|
+
* or an alias group (e.g. "RootEntity"). Used as shape keys since shapes
|
|
6
|
+
* can be defined for both entity types and aliases.
|
|
7
|
+
*/
|
|
8
|
+
export type EntityOrAliasName = EntityTypeName | AliasName;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Branded PascalCase entity type name (e.g. "Table", "TopCircle", "Legs3D").
|
|
4
|
+
* Entity types are the concrete domain objects declared in a model version.
|
|
5
|
+
* Each entity type can have shapes, be referenced by aliases, and be instantiated
|
|
6
|
+
* in the configurator at runtime.
|
|
7
|
+
*/
|
|
8
|
+
export type EntityTypeName = Branded<'EntityTypeName', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Branded expression name starting with $ followed by camelCase (e.g. "$price", "$isValid", "$availableColors").
|
|
4
|
+
* Expressions are computed properties on entities — their names are prefixed with $ to distinguish them from shape properties.
|
|
5
|
+
*/
|
|
6
|
+
export type ExpressionName = Branded<'ExpressionName', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type * from './action-name.js';
|
|
2
|
+
export type * from './alias-name.js';
|
|
3
|
+
export type * from './entity-or-alias-name.js';
|
|
4
|
+
export type * from './entity-type-name.js';
|
|
5
|
+
export type * from './expression-name.js';
|
|
6
|
+
export type * from './instance-name.js';
|
|
7
|
+
export type * from './invariant-name.js';
|
|
8
|
+
export type * from './shape-property-name.js';
|
|
9
|
+
export type * from './violation-type-name.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Branded component instance name.
|
|
4
|
+
* User-declared names must start with a letter (e.g. "default", "body", "main").
|
|
5
|
+
* SDK-derived names may include `$` prefix and `.` separators (e.g. "$top", "Table.$top").
|
|
6
|
+
*/
|
|
7
|
+
export type InstanceName = Branded<'InstanceName', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Branded shape property name — the key under which an entity shape (or
|
|
4
|
+
* alias shape) declares a field, and the key under which `defaults:` attaches
|
|
5
|
+
* initial values. Must match /^[a-z]\w*$/: start with a lowercase letter,
|
|
6
|
+
* then word characters (letters, digits, underscore).
|
|
7
|
+
*
|
|
8
|
+
* Examples: `height`, `positionX`, `hoodId`. Rejected: `Height`, `$height`,
|
|
9
|
+
* `3D`, `height-px`.
|
|
10
|
+
*/
|
|
11
|
+
export type ShapePropertyName = Branded<'ShapePropertyName', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Branded } from '@salsita-ai/common/utils';
|
|
2
|
+
/**
|
|
3
|
+
* A single entity within a preset — id, type, and shape properties.
|
|
4
|
+
* Properties are validated against the entity's schema from ConfigurationSchema.
|
|
5
|
+
*/
|
|
6
|
+
export type PresetEntity = Branded<'PresetEntity', {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly type: string;
|
|
9
|
+
readonly properties: Readonly<Record<string, unknown>>;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* A single parsed preset — the root entity type, initial entities, and optional metadata.
|
|
13
|
+
* Represents one initial configuration state for a configurator deployment. `application-spec`
|
|
14
|
+
* exports it as `Preset`.
|
|
15
|
+
*/
|
|
16
|
+
export type SpecPreset = Branded<'Preset', {
|
|
17
|
+
readonly rootEntityType: string;
|
|
18
|
+
readonly initialDomainEntities: readonly PresetEntity[];
|
|
19
|
+
readonly name?: string;
|
|
20
|
+
readonly description?: string;
|
|
21
|
+
readonly img?: string;
|
|
22
|
+
readonly imgAlt?: string;
|
|
23
|
+
readonly detailTitle?: string;
|
|
24
|
+
readonly detailDescription?: string;
|
|
25
|
+
readonly tags?: readonly string[];
|
|
26
|
+
}>;
|
|
27
|
+
/** All parsed presets for a parsed configurator or admin model. */
|
|
28
|
+
export type Presets = Branded<'Presets', {
|
|
29
|
+
readonly presets: readonly SpecPreset[];
|
|
30
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -14,5 +14,6 @@ interface GenerateProjectOptions {
|
|
|
14
14
|
export declare const generateApplicationSpecProject: (options: GenerateProjectOptions) => Promise<{
|
|
15
15
|
templateFiles: readonly string[];
|
|
16
16
|
applicationSpec: import("#package/application-spec").ApplicationSpec;
|
|
17
|
+
diagnostics: readonly import("#package/application-spec").SpecDiagnostic[];
|
|
17
18
|
}>;
|
|
18
19
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{symlink as e}from"fs/promises";import{ParseContext as i}from"#package/application-spec";import{extractAndCompileLingui as
|
|
2
|
-
${S.errors.map(e=>` [${e.code}] ${e.message}`).join("\n")}`);let
|
|
1
|
+
import{symlink as e}from"fs/promises";import{ParseContext as i}from"#package/application-spec";import{bootstrapLinguiCatalogs as t,extractAndCompileLingui as p}from"../lingui/index.js";import{compileWithSwc as a}from"../services/swc.js";import{exists as o}from"../utils/index.js";import{ApplicationSpecBuilder as s}from"./application-spec-builder.js";import{formatMetrics as c}from"./metrics/index.js";import{syncTemplateFiles as n}from"./template-files.js";let r=".phoenix",l=async(e,i)=>{let t=i.startSpan("swcCompile(src)","sync","generate-application-spec-project.ts");await a({sourceDir:"src",outDir:`./${r}/.swc/src`},{logger:e}),t();let p=i.startSpan("swcCompile(.phoenix)","sync","generate-application-spec-project.ts");await a({sourceDir:r,outDir:`./${r}/.swc/${r}`},{logger:e}),p()};export const generateApplicationSpecProject=async a=>{let{withLingui:r=!0,force:m=!1,analyze:u=!1}=a,g=a.logger;g.info("Using application-spec pipeline");let j=new i,w=j.startSpan("sync","generateApplicationSpecProject","generate-application-spec-project.ts"),d=j.startSpan("build","sync","application-spec-builder.ts"),f=new s({logger:g,sdkVersion:a.sdkVersion,projectSlug:a.projectSlug,environmentSlug:a.environmentSlug,cliUseWorkspace:a.cliUseWorkspace,enableEditor:a.enableEditor??!0,inlineTemplates:a.inlineTemplates??!1}),S=await f.build({force:m,parsingContext:j,compile:!1});if(d(),!S.ok)throw Error(`Failed to build the project files:
|
|
2
|
+
${S.errors.map(e=>` [${e.code}] ${e.message}`).join("\n")}`);let b=j.startSpan("symlink","sync","generate-application-spec-project.ts");await o("./.phoenix/public")||await e("../public","./.phoenix/public");let x=await n();if(b(),r){let e=j.startSpan("lingui","sync","generate-application-spec-project.ts");await p({logger:g}),e()}else await t(S.application.applicationSpec.configurator.ui.availableLocales,{logger:g});return await l(g,j),w(),u&&c(j.metrics,j.counts,g),{templateFiles:x,applicationSpec:S.application.applicationSpec,diagnostics:S.diagnostics}};
|
|
@@ -13,4 +13,5 @@ export interface GenerateProjectFilesProps {
|
|
|
13
13
|
export declare const generateProjectFiles: (props: GenerateProjectFilesProps, context?: CommandContext) => Promise<{
|
|
14
14
|
templateFiles: readonly string[];
|
|
15
15
|
applicationSpec: import("../../application-spec/index.js").ApplicationSpec;
|
|
16
|
+
diagnostics: readonly import("../../application-spec/index.js").SpecDiagnostic[];
|
|
16
17
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./generate-application-spec-project.js";export*from"./generate-application-spec-story.js";export*from"./application-spec-file-reader.js";export*from"./application-spec-builder.js";export*from"./resolve-deployment-data.js";export{generateProjectFiles}from"./generate-project-files.js";
|
|
1
|
+
export*from"./generate-application-spec-project.js";export*from"./generate-application-spec-story.js";export*from"./application-spec-file-reader.js";export*from"./application-spec-builder.js";export*from"./resolve-deployment-data.js";export{generateProjectFiles}from"./generate-project-files.js";export{logDiagnostics}from"./metrics/index.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DeploymentAssistant } from '@salsita-ai/contracts/assistant';
|
|
2
|
+
import { type ApplicationSpec } from '#package/application-spec';
|
|
2
3
|
import type { Logger } from '../utils/index.js';
|
|
3
4
|
interface ResolveOptions {
|
|
4
5
|
readonly skipUpload: boolean;
|
|
@@ -22,6 +23,8 @@ interface DeploymentData {
|
|
|
22
23
|
readonly assistant: boolean;
|
|
23
24
|
/** Generated locally for prepare-command diagnostics; never sent to the server. */
|
|
24
25
|
readonly assistantSetup: DeploymentAssistant | undefined;
|
|
26
|
+
/** {@link getDeploymentFingerprint} of the spec the data was resolved from; never sent to the server. */
|
|
27
|
+
readonly fingerprint: string;
|
|
25
28
|
readonly assets: {
|
|
26
29
|
readonly privateFilePaths: readonly string[];
|
|
27
30
|
readonly publicFilePaths: readonly string[];
|
|
@@ -29,6 +32,14 @@ interface DeploymentData {
|
|
|
29
32
|
readonly publicFilesFullPaths: readonly string[];
|
|
30
33
|
};
|
|
31
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Fingerprint of what the server applies to the requests of a deployment prepared from the spec: the configurator and
|
|
37
|
+
* admin configuration schemas with their versions, the published data schema, the auth hook, the roles that may
|
|
38
|
+
* create configurations and the assistant. Preparing a development deployment records it in the generated env file,
|
|
39
|
+
* and `phoenix dev` prepares again when the spec's fingerprint differs from the recorded one, such as after a domain
|
|
40
|
+
* model change.
|
|
41
|
+
*/
|
|
42
|
+
export declare const getDeploymentFingerprint: (applicationSpec: ApplicationSpec) => string;
|
|
32
43
|
/** Resolves deployment data using the new application-spec pipeline (parse only, no codegen/write). */
|
|
33
44
|
export declare const resolveApplicationSpecDeploymentData: (options: ResolveOptions) => Promise<DeploymentData>;
|
|
34
45
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{RuntimeReferenceStore as
|
|
2
|
-
${u.errors.map(e=>` [${e.code}] ${e.message}`).join("\n")}`);let{
|
|
1
|
+
import{createHash as e}from"node:crypto";import{RuntimeReferenceStore as a,buildPhoenixDefinitions as s,parseApplicationFiles as t}from"#package/application-spec";import{generateAssistantPrompt as i,getAllPhxDefinitions as n}from"#package/domain";import{readApplicationFiles as o}from"./application-spec-file-reader.js";import{readProjectAssets as r}from"./read-project-assets.js";import{swcEvalExpressionParser as c,swcModuleAnalyzer as l}from"./swc-module-analyzer.js";let p=e=>null!==e.assistant&&null!==e.assistantServerSettings;export const getDeploymentFingerprint=a=>{let{configurator:s,admin:t,appMetadata:i,infra:n}=a,o={configurationSchema:[s.configurationSchema.version,s.configurationSchema.hash],adminConfigurationSchema:[t.configurationSchema.version,t.configurationSchema.hash],publishedDataHash:s.dataSchemas.publishedDataHash,useAuthHook:i.useAuthHook,aclCanCreate:n.acl.canCreate,assistant:p(s)};return e("sha256").update(JSON.stringify(o)).digest("hex")};export const resolveApplicationSpecDeploymentData=async e=>{let{skipUpload:h,logger:m}=e,u=t({rawProjectFiles:await o({envs:{}}),phxDefinitions:s(n())},{analyzer:l,evalExpressionParser:c,referenceStore:new a,logger:m});if(!u.ok)throw Error(`Failed to parse application spec:
|
|
2
|
+
${u.errors.map(e=>` [${e.code}] ${e.message}`).join("\n")}`);let{applicationSpec:d}=u.value,{configurator:g,admin:f}=d,{configurationSchema:S}=g,v=f.configurationSchema,F=await r(),b=[],A=[],D=[],y=[];h||(b=F.privateAssetFiles,A=F.publicAssetFiles,D=F.privateAssetFilesFullPaths,y=F.publicAssetFilesFullPaths,m.debug(`Scanned assets: ${b.length} private files, ${A.length} public files`));let{appMetadata:H,infra:k}=d,{assistant:C,assistantServerSettings:j}=g;return{schema:{...S.schema},schemaVersion:S.version,adminSchema:{...v.schema},adminSchemaVersion:v.version,applicationVersion:H.applicationVersion,publishedDataHash:g.dataSchemas.publishedDataHash,useAuthHook:H.useAuthHook,aclCanCreate:k.acl.canCreate,embeddings:void 0,chat:void 0,assistant:p(g),assistantSetup:C&&j?{sdl:C.sdl,prompt:i(C),instructions:j.instructions??void 0,ai:j.ai}:void 0,fingerprint:getDeploymentFingerprint(d),assets:{privateFilePaths:b,publicFilePaths:A,privateFilesFullPaths:D,publicFilesFullPaths:y}}};
|
package/dist/phoenix/bin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{assertSupportedNodeVersion as
|
|
2
|
+
import{assertSupportedNodeVersion as e}from"./utils/node-version/index.js";e(),await import("./cli.js").catch(e=>{throw console.error("If this error comes from loading a dependency, check peerDependencies in the installed @salsita-ai/sdk package.json, align your project's dependencies, reinstall, and retry."),e});
|