@almadar/core 10.34.0 → 10.36.0
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/dist/{builders-DFOj9_N8.d.ts → builders-CBL9rED-.d.ts} +117 -117
- package/dist/builders.d.ts +3 -3
- package/dist/builders.js +2 -2
- package/dist/builders.js.map +1 -1
- package/dist/{effect-D9WY6JgN.d.ts → effect-Cd6ibbZc.d.ts} +6 -1
- package/dist/factory/index.d.ts +5 -5
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +3 -4
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/index.d.ts +115 -21
- package/dist/index.js +243 -11
- package/dist/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +1 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +182 -5
- package/dist/patterns/index.js +90 -3
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/integrators-registry.json +30 -0
- package/dist/patterns/patterns-registry.json +58 -1
- package/dist/patterns/registry.json +58 -1
- package/dist/{trait-6_gs33fs.d.ts → trait-X5mQAMtW.d.ts} +26 -21
- package/dist/types/index.d.ts +116 -11
- package/dist/types/index.js +72 -3
- package/dist/types/index.js.map +1 -1
- package/dist/{types-CeGT3YB1.d.ts → types-DujRcijG.d.ts} +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as OrbitalDefinition, O as OrbitalSchema } from './builders-
|
|
2
|
-
export { A as AGENT_DOMAIN_CATEGORIES, b as ALLOWED_CUSTOM_COMPONENTS, c as AgentDomainCategory, d as AgentDomainCategorySchema, e as AllowedCustomComponent, C as ColorSlice, f as ColorSliceSchema, g as ColorTokens, h as ColorTokensSchema, i as ComposeBehaviorsInput, j as ComposeBehaviorsResult, k as ComputedEventContract, l as ComputedEventContractSchema, m as ComputedEventListener, n as ComputedEventListenerSchema, o as ConfigProvenanceRecord, p as ConfigProvenanceRecordSchema, q as CustomPatternDefinition, r as CustomPatternDefinitionInput, s as CustomPatternDefinitionSchema, t as CustomPatternMap, u as CustomPatternMapInput, v as CustomPatternMapSchema, D as DensitySlice, w as DensitySliceSchema, x as DensityTokens, y as DensityTokensSchema, z as DesignPreferences, B as DesignPreferencesInput, E as DesignPreferencesSchema, F as DesignTokens, G as DesignTokensInput, H as DesignTokensSchema, I as DomainCategory, J as DomainCategorySchema, K as DomainContext, L as DomainContextInput, N as DomainContextSchema, P as DomainVocabulary, Q as DomainVocabularySchema, R as ElevationSlice, S as ElevationSliceSchema, T as ElevationTokens, U as ElevationTokensSchema, V as EntityCall, W as EntityCallSchema, X as EntityRef, Y as EntityRefSchema, Z as EntityRefStringSchema, _ as EntitySemanticRole, $ as EntitySemanticRoleSchema, a0 as EventListener, a1 as EventListenerSchema, a2 as EventSemanticRole, a3 as EventSemanticRoleSchema, a4 as EventSource, a5 as EventSourceSchema, a6 as EventWiringEntry, a7 as FullOrbitalUnit, a8 as GameSubCategory, a9 as GameSubCategorySchema, aa as GeometrySlice, ab as GeometrySliceSchema, ac as GeometryTokens, ad as GeometryTokensSchema, ae as IconFamily, af as IconFamilySchema, ag as IconographySlice, ah as IconographySliceSchema, ai as IconographyTokens, aj as IconographyTokensSchema, ak as IllustrationSlice, al as IllustrationSliceSchema, am as IllustrationStyle, an as IllustrationStyleSchema, ao as IllustrationTokens, ap as IllustrationTokensSchema, aq as LayoutStrategy, ar as MotionDurationKey, as as MotionDurationKeySchema, at as MotionDurationPalette, au as MotionDurationPaletteSchema, av as MotionEasingKey, aw as MotionEasingKeySchema, ax as MotionEasingPalette, ay as MotionEasingPaletteSchema, az as MotionIntent, aA as MotionIntentMap, aB as MotionIntentMapSchema, aC as MotionIntentSchema, aD as MotionSlice, aE as MotionSliceSchema, aF as MotionTokens, aG as MotionTokensSchema, aH as NodeClassification, aI as NodeClassificationSchema, a7 as Orbital, aJ as OrbitalConfig, aK as OrbitalConfigInput, aL as OrbitalConfigSchema, aM as OrbitalDefinitionSchema, aN as OrbitalInput, aO as OrbitalPage, aP as OrbitalPageInput, aQ as OrbitalPageSchema, aR as OrbitalPageStrictInput, aS as OrbitalPageStrictSchema, aT as OrbitalSchemaInput, aU as OrbitalSchemaSchema, aV as OrbitalSchemaWithTraits, aW as OrbitalUnit, aX as OrbitalUnitSchema, aY as OrbitalZodSchema, aZ as Page, a_ as PageRef, a$ as PageRefObject, b0 as PageRefObjectSchema, b1 as PageRefSchema, b2 as PageRefStringSchema, b3 as PageSchema, b4 as PageTraitRef, b5 as PageTraitRefSchema, b6 as RelatedLink, b7 as RelatedLinkSchema, b8 as SchemaMetadata, b9 as SchemaMetadataSchema, ba as SkinSpec, bb as SkinSpecSchema, bc as SpacingScale, bd as SpacingScaleSchema, be as StateSemanticRole, bf as StateSemanticRoleSchema, bg as SuggestedGuard, bh as SuggestedGuardSchema, bi as ThemeDefinition, bj as ThemeDefinitionSchema, bk as ThemeRef, bl as ThemeRefSchema, bm as ThemeRefStringSchema, bn as ThemeTokens, bo as ThemeTokensSchema, bp as ThemeVariant, bq as ThemeVariantSchema, br as TypeIntent, bs as TypeIntentMap, bt as TypeIntentMapSchema, bu as TypeIntentSchema, bv as TypeScale, bw as TypeScaleEntry, bx as TypeScaleEntrySchema, by as TypeScaleSchema, bz as TypeScaleTokens, bA as TypeScaleTokensSchema, bB as TypeSizeKey, bC as TypeSizeKeySchema, bD as TypeSlice, bE as TypeSliceSchema, bF as TypeSlot, bG as TypeSlotSchema, bH as TypeWeight, bI as TypeWeightSchema, bJ as UXHints, bK as UXHintsSchema, bL as UseDeclaration, bM as UseDeclarationSchema, bN as UserPersona, bO as UserPersonaInput, bP as UserPersonaSchema, bQ as ViewType, bR as ViewTypeSchema, bS as applyEventWiring, bT as composeBehaviors, bU as detectLayoutStrategy, bV as isEntityCall, bW as isEntityReference, bX as isEntityReferenceAny, bY as isImportedTraitRef, bZ as isOrbitalDefinition, b_ as isPageReference, b$ as isPageReferenceObject, c0 as isPageReferenceString, c1 as isThemeReference, c2 as parseEntityRef, c3 as parseImportedTraitRef, c4 as parseOrbitalSchema, c5 as parsePageRef, c6 as safeParseOrbitalSchema } from './builders-
|
|
3
|
-
import { f as ToolArgs, J as JsonValue, F as FieldValue, g as EntityRow } from './effect-
|
|
4
|
-
export { h as ANIMATION_NAMES, i as ASSET_ASPECTS, j as ASSET_DIMENSIONS, k as AgentEffect, l as AnimationDef, m as AnimationDefInput, n as AnimationDefSchema, o as AnimationName, p as AnimationNameSchema, A as AnyPatternConfig, q as ApplicationEffect, r as ArrayEntityField, s as Asset, t as AssetAspect, u as AssetAspectSchema, v as AssetCatalog, w as AssetCatalogEntry, x as AssetCatalogEntryInput, y as AssetCatalogEntrySchema, z as AssetCatalogSchema, B as AssetDimension, C as AssetDimensionSchema, D as AssetSchema, G as AssetUrl, H as AtomicEffect, I as BehaviorEffect, K as CAMERA_MODES, L as CallServiceConfig, M as CallServiceEffect, N as Camera, Q as CameraMode, S as CameraModeSchema, U as CameraSchema, V as CheckpointLoadEffect, W as CheckpointSaveEffect, X as ComposeEffect, Y as DerefEffect, Z as DespawnEffect, _ as DoEffect, $ as ENTITY_ROLES, c as Effect, a0 as EffectInput, a1 as EffectSchema, a2 as EmitConfig, a3 as EmitEffect, e as Entity, a4 as EntityData, E as EntityField, a5 as EntityFieldInput, a6 as EntityFieldSchema, d as EntityId, a7 as EntityIdSchema, a as EntityPersistence, a8 as EntityPersistenceSchema, a9 as EntityRole, aa as EntityRoleSchema, ab as EntitySchema, ac as EntityWith, ad as EnumEntityField, ae as EvaluateConfig, af as EvaluateEffect, b as EventId, ag as EventIdSchema, ah as FetchEffect, ai as FetchOptions, aj as FetchResult, ak as Field, al as FieldFormat, am as FieldFormatSchema, an as FieldSchema, ao as FieldType, ap as FieldTypeSchema, aq as ForwardConfig, ar as ForwardEffect, as as IdForKind, at as IdKind, au as IdentityLedger, av as IdentityLedgerSchema, aw as JsonObject, ax as LedgerEntry, ay as LedgerEntrySchema, az as LedgerKind, aA as LedgerKindSchema, aB as LlmEffect, aC as LogEffect, aD as McpServiceDef, aE as McpServiceDefSchema, aF as MemoryEffect, aG as NavigateEffect, aH as NnConfig, aI as NnLayer, aJ as NotifyEffect, aK as OrbitalEntity, aL as OrbitalEntityInput, aM as OrbitalEntitySchema, O as OrbitalId, aN as OrbitalIdSchema, aO as OsEffect, aP as PATTERN_TYPES, P as PageId, aQ as PageIdSchema, aR as PaletteEntryId, aS as PaletteEntryIdSchema, aT as PatternConfig, aU as PatternProps, aV as PatternPropsMap, aW as PatternType, aX as PersistData, aY as PersistEffect, aZ as PersistEmitConfig, a_ as RefEffect, R as RelationConfig, a$ as RelationConfigSchema, b0 as RelationEntityField, b1 as RenderBinding, b2 as RenderChildrenMap, b3 as RenderItemLambda, b4 as RenderUIEffect, b5 as RenderUINode, b6 as ResolvedPatternProps, b7 as RestAuthConfig, b8 as RestAuthConfigSchema, b9 as RestServiceDef, ba as RestServiceDefSchema, bb as SERVICE_TYPES, bc as SPRITE_DIRECTIONS, bd as ScalarEntityField, be as ScenePos, bf as ScenePosSchema, bg as SemanticAssetRef, bh as SemanticAssetRefInput, bi as SemanticAssetRefSchema, bj as ServiceDefinition, bk as ServiceDefinitionSchema, bl as ServiceId, bm as ServiceIdSchema, bn as ServiceParams, bo as ServiceParamsValue, bp as ServiceRef, bq as ServiceRefObject, br as ServiceRefObjectSchema, bs as ServiceRefSchema, bt as ServiceRefStringSchema, bu as ServiceType, bv as ServiceTypeSchema, bw as SessionEffect, bx as SetEffect, by as SocketEvents, bz as SocketEventsSchema, bA as SocketServiceDef, bB as SocketServiceDefSchema, bC as SpawnEffect, bD as SpriteDirection, bE as SpriteDirectionSchema, bF as SpriteSheetAtlas, bG as SpriteSheetAtlasInput, bH as SpriteSheetAtlasSchema, bI as SubTexture, bJ as SubTextureSchema, bK as SwapEffect, bL as TextureAtlas, bM as TextureAtlasSchema, bN as ThemeId, bO as ThemeIdSchema, bP as Tilesheet, bQ as TilesheetSchema, bR as TraceEffect, bS as TrainConfig, bT as TrainEffect, T as TraitId, bU as TraitIdSchema, bV as TypedEffect, bW as UISlot, bX as UISlotSchema, bY as UI_SLOTS, bZ as VISUAL_STYLES, b_ as ValidateEffect, b$ as VisualStyle, c0 as VisualStyleSchema, c1 as WatchEffect, c2 as WatchOptions, c3 as asEntityId, c4 as asEventId, c5 as asOrbitalId, c6 as asPageId, c7 as asPaletteEntryId, c8 as asServiceId, c9 as asThemeId, ca as asTraitId, cb as atomic, cc as callService, cd as createAssetKey, ce as deref, cf as deriveCollection, cg as despawn, ch as doEffects, ci as emit, cj as findService, ck as getDefaultAnimationsForRole, cl as getServiceNames, cm as hasService, cn as idKindOf, co as idPrefix, cp as isEffect, cq as isEntityId, cr as isEventId, cs as isFieldValue, ct as isJsonArray, cu as isJsonObject, cv as isJsonPrimitive, cw as isMcpService, cx as isOrbitalId, cy as isPageId, cz as isPaletteEntryId, cA as isRestService, cB as isRuntimeEntity, cC as isSExprEffect, cD as isServiceId, cE as isServiceReference, cF as isServiceReferenceObject, cG as isSocketService, cH as isThemeId, cI as isTraitId, cJ as isValidPatternType, cK as ledgerCurName, cL as ledgerRename, cM as ledgerResolveName, cN as mintId, cO as navigate, cP as notify, cQ as parseAssetKey, cR as parseServiceRef, cS as persist, cT as persistenceModeAllowsOverrides, cU as ref, cV as renderUI, cW as set, cX as spawn, cY as swap, cZ as validateAssetAnimations, c_ as watch } from './effect-
|
|
5
|
-
import { a as EventPayload } from './expression-DpAj1RzP.js';
|
|
6
|
-
export { C as CORE_BINDINGS, b as CoreBinding, c as EvalContext, d as EventPayloadValue, E as Expression, e as ExpressionInput, f as ExpressionSchema, L as LogMeta, g as LogMetaValue, P as ParsedBinding,
|
|
1
|
+
import { a as OrbitalDefinition, O as OrbitalSchema } from './builders-CBL9rED-.js';
|
|
2
|
+
export { A as AGENT_DOMAIN_CATEGORIES, b as ALLOWED_CUSTOM_COMPONENTS, c as AgentDomainCategory, d as AgentDomainCategorySchema, e as AllowedCustomComponent, C as ColorSlice, f as ColorSliceSchema, g as ColorTokens, h as ColorTokensSchema, i as ComposeBehaviorsInput, j as ComposeBehaviorsResult, k as ComputedEventContract, l as ComputedEventContractSchema, m as ComputedEventListener, n as ComputedEventListenerSchema, o as ConfigProvenanceRecord, p as ConfigProvenanceRecordSchema, q as CustomPatternDefinition, r as CustomPatternDefinitionInput, s as CustomPatternDefinitionSchema, t as CustomPatternMap, u as CustomPatternMapInput, v as CustomPatternMapSchema, D as DensitySlice, w as DensitySliceSchema, x as DensityTokens, y as DensityTokensSchema, z as DesignPreferences, B as DesignPreferencesInput, E as DesignPreferencesSchema, F as DesignTokens, G as DesignTokensInput, H as DesignTokensSchema, I as DomainCategory, J as DomainCategorySchema, K as DomainContext, L as DomainContextInput, N as DomainContextSchema, P as DomainVocabulary, Q as DomainVocabularySchema, R as ElevationSlice, S as ElevationSliceSchema, T as ElevationTokens, U as ElevationTokensSchema, V as EntityCall, W as EntityCallSchema, X as EntityRef, Y as EntityRefSchema, Z as EntityRefStringSchema, _ as EntitySemanticRole, $ as EntitySemanticRoleSchema, a0 as EventListener, a1 as EventListenerSchema, a2 as EventSemanticRole, a3 as EventSemanticRoleSchema, a4 as EventSource, a5 as EventSourceSchema, a6 as EventWiringEntry, a7 as FullOrbitalUnit, a8 as GameSubCategory, a9 as GameSubCategorySchema, aa as GeometrySlice, ab as GeometrySliceSchema, ac as GeometryTokens, ad as GeometryTokensSchema, ae as IconFamily, af as IconFamilySchema, ag as IconographySlice, ah as IconographySliceSchema, ai as IconographyTokens, aj as IconographyTokensSchema, ak as IllustrationSlice, al as IllustrationSliceSchema, am as IllustrationStyle, an as IllustrationStyleSchema, ao as IllustrationTokens, ap as IllustrationTokensSchema, aq as LayoutStrategy, ar as MotionDurationKey, as as MotionDurationKeySchema, at as MotionDurationPalette, au as MotionDurationPaletteSchema, av as MotionEasingKey, aw as MotionEasingKeySchema, ax as MotionEasingPalette, ay as MotionEasingPaletteSchema, az as MotionIntent, aA as MotionIntentMap, aB as MotionIntentMapSchema, aC as MotionIntentSchema, aD as MotionSlice, aE as MotionSliceSchema, aF as MotionTokens, aG as MotionTokensSchema, aH as NodeClassification, aI as NodeClassificationSchema, a7 as Orbital, aJ as OrbitalConfig, aK as OrbitalConfigInput, aL as OrbitalConfigSchema, aM as OrbitalDefinitionSchema, aN as OrbitalInput, aO as OrbitalPage, aP as OrbitalPageInput, aQ as OrbitalPageSchema, aR as OrbitalPageStrictInput, aS as OrbitalPageStrictSchema, aT as OrbitalSchemaInput, aU as OrbitalSchemaSchema, aV as OrbitalSchemaWithTraits, aW as OrbitalUnit, aX as OrbitalUnitSchema, aY as OrbitalZodSchema, aZ as Page, a_ as PageRef, a$ as PageRefObject, b0 as PageRefObjectSchema, b1 as PageRefSchema, b2 as PageRefStringSchema, b3 as PageSchema, b4 as PageTraitRef, b5 as PageTraitRefSchema, b6 as RelatedLink, b7 as RelatedLinkSchema, b8 as SchemaMetadata, b9 as SchemaMetadataSchema, ba as SkinSpec, bb as SkinSpecSchema, bc as SpacingScale, bd as SpacingScaleSchema, be as StateSemanticRole, bf as StateSemanticRoleSchema, bg as SuggestedGuard, bh as SuggestedGuardSchema, bi as ThemeDefinition, bj as ThemeDefinitionSchema, bk as ThemeRef, bl as ThemeRefSchema, bm as ThemeRefStringSchema, bn as ThemeTokens, bo as ThemeTokensSchema, bp as ThemeVariant, bq as ThemeVariantSchema, br as TypeIntent, bs as TypeIntentMap, bt as TypeIntentMapSchema, bu as TypeIntentSchema, bv as TypeScale, bw as TypeScaleEntry, bx as TypeScaleEntrySchema, by as TypeScaleSchema, bz as TypeScaleTokens, bA as TypeScaleTokensSchema, bB as TypeSizeKey, bC as TypeSizeKeySchema, bD as TypeSlice, bE as TypeSliceSchema, bF as TypeSlot, bG as TypeSlotSchema, bH as TypeWeight, bI as TypeWeightSchema, bJ as UXHints, bK as UXHintsSchema, bL as UseDeclaration, bM as UseDeclarationSchema, bN as UserPersona, bO as UserPersonaInput, bP as UserPersonaSchema, bQ as ViewType, bR as ViewTypeSchema, bS as applyEventWiring, bT as composeBehaviors, bU as detectLayoutStrategy, bV as isEntityCall, bW as isEntityReference, bX as isEntityReferenceAny, bY as isImportedTraitRef, bZ as isOrbitalDefinition, b_ as isPageReference, b$ as isPageReferenceObject, c0 as isPageReferenceString, c1 as isThemeReference, c2 as parseEntityRef, c3 as parseImportedTraitRef, c4 as parseOrbitalSchema, c5 as parsePageRef, c6 as safeParseOrbitalSchema } from './builders-CBL9rED-.js';
|
|
3
|
+
import { f as ToolArgs, J as JsonValue, F as FieldValue, g as EntityRow } from './effect-Cd6ibbZc.js';
|
|
4
|
+
export { h as ANIMATION_NAMES, i as ASSET_ASPECTS, j as ASSET_DIMENSIONS, k as AgentEffect, l as AnimationDef, m as AnimationDefInput, n as AnimationDefSchema, o as AnimationName, p as AnimationNameSchema, A as AnyPatternConfig, q as ApplicationEffect, r as ArrayEntityField, s as Asset, t as AssetAspect, u as AssetAspectSchema, v as AssetCatalog, w as AssetCatalogEntry, x as AssetCatalogEntryInput, y as AssetCatalogEntrySchema, z as AssetCatalogSchema, B as AssetDimension, C as AssetDimensionSchema, D as AssetSchema, G as AssetUrl, H as AtomicEffect, I as BehaviorEffect, K as CAMERA_MODES, L as CallServiceConfig, M as CallServiceEffect, N as Camera, Q as CameraMode, S as CameraModeSchema, U as CameraSchema, V as CheckpointLoadEffect, W as CheckpointSaveEffect, X as ComposeEffect, Y as DerefEffect, Z as DespawnEffect, _ as DoEffect, $ as ENTITY_ROLES, c as Effect, a0 as EffectInput, a1 as EffectSchema, a2 as EmitConfig, a3 as EmitEffect, e as Entity, a4 as EntityData, E as EntityField, a5 as EntityFieldInput, a6 as EntityFieldSchema, d as EntityId, a7 as EntityIdSchema, a as EntityPersistence, a8 as EntityPersistenceSchema, a9 as EntityRole, aa as EntityRoleSchema, ab as EntitySchema, ac as EntityWith, ad as EnumEntityField, ae as EvaluateConfig, af as EvaluateEffect, b as EventId, ag as EventIdSchema, ah as FetchEffect, ai as FetchOptions, aj as FetchResult, ak as Field, al as FieldFormat, am as FieldFormatSchema, an as FieldSchema, ao as FieldType, ap as FieldTypeSchema, aq as ForwardConfig, ar as ForwardEffect, as as IdForKind, at as IdKind, au as IdentityLedger, av as IdentityLedgerSchema, aw as JsonObject, ax as LedgerEntry, ay as LedgerEntrySchema, az as LedgerKind, aA as LedgerKindSchema, aB as LlmEffect, aC as LogEffect, aD as McpServiceDef, aE as McpServiceDefSchema, aF as MemoryEffect, aG as NavigateEffect, aH as NnConfig, aI as NnLayer, aJ as NotifyEffect, aK as OrbitalEntity, aL as OrbitalEntityInput, aM as OrbitalEntitySchema, O as OrbitalId, aN as OrbitalIdSchema, aO as OsEffect, aP as PATTERN_TYPES, P as PageId, aQ as PageIdSchema, aR as PaletteEntryId, aS as PaletteEntryIdSchema, aT as PatternConfig, aU as PatternProps, aV as PatternPropsMap, aW as PatternType, aX as PersistData, aY as PersistEffect, aZ as PersistEmitConfig, a_ as RefEffect, R as RelationConfig, a$ as RelationConfigSchema, b0 as RelationEntityField, b1 as RenderBinding, b2 as RenderChildrenMap, b3 as RenderItemLambda, b4 as RenderUIEffect, b5 as RenderUINode, b6 as ResolvedPatternProps, b7 as RestAuthConfig, b8 as RestAuthConfigSchema, b9 as RestServiceDef, ba as RestServiceDefSchema, bb as SERVICE_TYPES, bc as SPRITE_DIRECTIONS, bd as ScalarEntityField, be as ScenePos, bf as ScenePosSchema, bg as SemanticAssetRef, bh as SemanticAssetRefInput, bi as SemanticAssetRefSchema, bj as ServiceDefinition, bk as ServiceDefinitionSchema, bl as ServiceId, bm as ServiceIdSchema, bn as ServiceParams, bo as ServiceParamsValue, bp as ServiceRef, bq as ServiceRefObject, br as ServiceRefObjectSchema, bs as ServiceRefSchema, bt as ServiceRefStringSchema, bu as ServiceType, bv as ServiceTypeSchema, bw as SessionEffect, bx as SetEffect, by as SocketEvents, bz as SocketEventsSchema, bA as SocketServiceDef, bB as SocketServiceDefSchema, bC as SpawnEffect, bD as SpriteDirection, bE as SpriteDirectionSchema, bF as SpriteSheetAtlas, bG as SpriteSheetAtlasInput, bH as SpriteSheetAtlasSchema, bI as SubTexture, bJ as SubTextureSchema, bK as SwapEffect, bL as TextureAtlas, bM as TextureAtlasSchema, bN as ThemeId, bO as ThemeIdSchema, bP as Tilesheet, bQ as TilesheetSchema, bR as TraceEffect, bS as TrainConfig, bT as TrainEffect, T as TraitId, bU as TraitIdSchema, bV as TypedEffect, bW as UISlot, bX as UISlotSchema, bY as UI_SLOTS, bZ as VISUAL_STYLES, b_ as ValidateEffect, b$ as VisualStyle, c0 as VisualStyleSchema, c1 as WatchEffect, c2 as WatchOptions, c3 as asEntityId, c4 as asEventId, c5 as asOrbitalId, c6 as asPageId, c7 as asPaletteEntryId, c8 as asServiceId, c9 as asThemeId, ca as asTraitId, cb as atomic, cc as callService, cd as createAssetKey, ce as deref, cf as deriveCollection, cg as despawn, ch as doEffects, ci as emit, cj as findService, ck as getDefaultAnimationsForRole, cl as getServiceNames, cm as hasService, cn as idKindOf, co as idPrefix, cp as isEffect, cq as isEntityId, cr as isEventId, cs as isFieldValue, ct as isJsonArray, cu as isJsonObject, cv as isJsonPrimitive, cw as isMcpService, cx as isOrbitalId, cy as isPageId, cz as isPaletteEntryId, cA as isRestService, cB as isRuntimeEntity, cC as isSExprEffect, cD as isServiceId, cE as isServiceReference, cF as isServiceReferenceObject, cG as isSocketService, cH as isThemeId, cI as isTraitId, cJ as isValidPatternType, cK as ledgerCurName, cL as ledgerRename, cM as ledgerResolveName, cN as mintId, cO as navigate, cP as notify, cQ as parseAssetKey, cR as parseServiceRef, cS as persist, cT as persistenceModeAllowsOverrides, cU as ref, cV as renderUI, cW as set, cX as spawn, cY as swap, cZ as validateAssetAnimations, c_ as watch } from './effect-Cd6ibbZc.js';
|
|
5
|
+
import { S as SExpr, a as EventPayload } from './expression-DpAj1RzP.js';
|
|
6
|
+
export { C as CORE_BINDINGS, b as CoreBinding, c as EvalContext, d as EventPayloadValue, E as Expression, e as ExpressionInput, f as ExpressionSchema, L as LogMeta, g as LogMetaValue, P as ParsedBinding, h as SExprAtom, i as SExprAtomSchema, j as SExprInput, k as SExprSchema, l as collectBindings, m as getArgs, n as getOperator, o as isBinding, p as isEventPayloadValue, q as isSExpr, r as isSExprAtom, s as isSExprCall, t as isValidBinding, u as parseBinding, v as sexpr, w as walkSExpr } from './expression-DpAj1RzP.js';
|
|
7
7
|
import { ResolvedIR, ResolvedEntity, ResolvedPage, ResolvedTrait, ChangesetValue, SchemaChange, CategorizedRemovals, PageContentReduction, SemanticSchemaChange } from './types/index.js';
|
|
8
|
-
export { AgentCodeSearchResult, AgentCompactResult, AgentCompactStrategy, AgentContext, AgentGenerateOptions, AgentMemoryCategory, AgentMemoryRecord, AnalysisOrbital, AnalysisOrbitalParams, AnalysisPageOverride, AnalysisRename, AnalysisResult, AnnotationTier, AppCreatedEvent, AppSummary, AssetLoadStatus, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingContext, BindingRoot, BindingSchema, BridgeHealth, BuilderResult, BusEvent, BusEventListener, BusEventSource, CancelledEvent, ChangeAuthor, ChangeSetDocument, ChangeSummary, ChangesetRecordedEvent, CheckStatus, Clarification, ClarificationCandidate, ClarificationLevel, CompleteEvent, ComplexityAssessment, ComposeAllResult, ComposeChildrenResult, ComposeOptions, ContextExtensions, CreateFlow, DEFAULT_INTERACTION_MODELS, DeleteFlow, DispatchUpdatesResult, EdgeType, EditFlow, EffectPayload, EffectResult, EffectTrace, ErrorEvent, EventEmit, EventKey, EventListen, EventLogEntry, EvolutionDelta, ExecutePlanResult, ExtraTraitRef, FileOperationEvent, FileWrittenEvent, GateState, GenerationLogEvent, GitHubIssue, GitHubLink, GitHubRepo, HistoryMeta, IntegrationContext, InteractionModel, InteractionModelInput, InteractionModelSchema, InterruptEvent, KNOWN_VALIDATION_ERROR_CODES, KnobPayload, KnownValidationErrorCode, LazyService, LineageEntry, ListInteraction, LivingEdge, LivingEffect, LivingEntity, LivingEvent, LivingField, LivingOrbital, LivingOrbitalSchema, LivingPage, LivingState, LivingTrait, LivingTransition, LivingValue, LivingVertex, LlmCallToolsResult, LlmContext, LlmMessage, LlmTokenUsage, LlmToolCall, LlmToolDef, LoloEmitResult, MemoryContext, MessageEvent, OrbitalAddedEvent, OrbitalSchemaCompleteEvent, OrbitalVerificationAPI, ParamsRepairEmittedEvent, ParsedDesign, ParsedDomainContext, ParsedEmitDeclaration, ParsedEntity, ParsedEvent, ParsedListenDeclaration, ParsedOrbital, ParsedPage, ParsedState, ParsedStateMachine, ParsedTrait, ParsedTraitConfig, ParsedTransition, PatternTypeSchema, PersistActionName, PlanSnapshot, PlanSnapshotStatus, PlannerResult, Probability, ProcessCompleteEvent, ProcessErrorEvent, ProcessRepairCompleteEvent, ProcessRepairEvent, ProcessStartEvent, RepairResult, ResolvedEntityBinding, ResolvedField, ResolvedNavigation, ResolvedPattern, ResolvedSection, ResolvedSectionEvent, ResolvedTraitBinding, ResolvedTraitDataEntity, ResolvedTraitEvent, ResolvedTraitGuard, ResolvedTraitListener, ResolvedTraitState, ResolvedTraitTick, ResolvedTraitTransition, ResolvedTraitUIBinding, SSEEvent, SSEEventBase, SSEEventType, SaveOptions, SaveResult, SchemaPhaseUpdateEvent, SchemaPhaseValidatedEvent, SchemaUpdateEvent, SemanticAnnotation, SemanticChangeKind, SemanticVector, ServerResponseTrace, ServiceAction, ServiceActionName, ServiceCallResult, ServiceContract, ServiceEvents, SessionContext, SessionHistoryEntry, SnapshotCreatedEvent, SnapshotDocument, SpawnResult, StartEvent, StatsView, StoreContract, StoreFilter, StoreFilterOp, SubagentCompleteEvent, SubagentEvent, SubagentProgressEvent, SubagentStartEvent, TodoActivityType, TodoDetailEvent, TodoUpdateEvent, ToolCallEvent, ToolResultEvent, TraceContext, TraitFieldRef, TraitFieldRefSchema, TraitStateSnapshot, TransitionFrom, TransitionTrace, Unsubscribe, ValidateResult, ValidationDocument, ValidationError, ValidationErrorCode, ValidationIssue, ValidationMeta, ValidationResult, ValidationResults, VerificationCheck, VerificationSnapshot, VerificationSummary, VertexId, VertexPayload, VertexType, ViewFlow, WorkspaceContext, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getBindingExamples, getInteractionModelForDomain, inferTsType, isKnownValidationErrorCode, isPlanSnapshot, isResolvedIR, isSessionHistoryEntry, isTraitFieldRef, toBindingRoot, validateBindingInContext, widenTier } from './types/index.js';
|
|
9
|
-
import { d as TraitConfig, S as State } from './trait-
|
|
10
|
-
export { e as CONFIG_REF_EVENT_PATTERN, C as CallSiteConfig, b as CallSiteConfigEntry, f as ConfigFieldDeclaration, g as ConfigFieldDeclarationSchema, h as ConfigFieldItemsDeclaration, i as ConfigRefEventError, D as DeclaredTraitConfig, j as DeclaredTraitConfigSchema, E as EntityFieldContract, k as EntityFieldContractSchema, l as Event, m as EventInput, n as EventPayloadField, o as EventPayloadFieldSchema, p as EventSchema, q as EventScope, r as EventScopeSchema, G as Guard, s as GuardInput, t as GuardSchema, L as ListenSource, u as ListenSourceSchema, O as OrbitalTraitRef, v as OrbitalTraitRefSchema, P as PayloadField, w as PayloadFieldSchema, x as PresentationType, R as REFERENCE_CONFIG_TYPES, y as ReferenceConfigType, z as RequiredField, A as RequiredFieldSchema, B as StateInput, F as StateMachine, H as StateMachineInput, I as StateMachineSchema, J as StateSchema, c as Trait, K as TraitCategory, M as TraitCategorySchema, N as TraitConfigObject, Q as TraitConfigSchema, U as TraitConfigValue, V as TraitConfigValueSchema, W as TraitDataEntity, X as TraitDataEntitySchema, Y as TraitEntityField, Z as TraitEntityFieldSchema, _ as TraitEventContract, $ as TraitEventContractSchema, T as TraitEventListener, a0 as TraitEventListenerSchema, a1 as TraitInput, a2 as TraitRef, a3 as TraitRefSchema, a as TraitReference, a4 as TraitReferenceInput, a5 as TraitReferenceSchema, a6 as TraitSchema, a7 as TraitTick, a8 as TraitTickSchema, a9 as TraitUIBinding, aa as Transition, ab as TransitionInput, ac as TransitionSchema, ad as configRefEventKnob, ae as getTraitConfig, af as getTraitName, ag as isCallSiteConfigDeclaration, ah as isCircuitEvent, ai as isInlineTrait, aj as isReferenceConfigType, ak as normalizeCallSiteConfigToValues, al as normalizeTraitRef, am as resolveConfigRefEventName } from './trait-
|
|
11
|
-
export { F as FactoryCallSite, a as FactoryCallSiteParams, b as FactoryConfigParam, c as FactoryConfigTier, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryExposure, g as FactoryPageSignature, h as FactoryParamValue, i as FactoryProvenance, j as FactorySignature, k as FactorySignatureCatalog, l as FactorySignatureEntityField, m as FactoryTraitSignature, J as JsonSchema, n as JsonSchemaType, O as OwnershipOverlayEntry, P as PresentationNavItem, o as PresentationOverlay, R as RuleOverlay, p as RuleOverlayEntry, S as SchemaFieldType, T as TraitOverlay, q as TraitOverlayEntry, r as TraitOverlayListener } from './types-
|
|
8
|
+
export { ANONYMOUS_USER, AgentCodeSearchResult, AgentCompactResult, AgentCompactStrategy, AgentContext, AgentGenerateOptions, AgentMemoryCategory, AgentMemoryRecord, AnalysisOrbital, AnalysisOrbitalParams, AnalysisPageOverride, AnalysisRename, AnalysisResult, AnnotationTier, AppCreatedEvent, AppSummary, AssetLoadStatus, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingContext, BindingRoot, BindingSchema, BridgeHealth, BuilderResult, BusEvent, BusEventListener, BusEventSource, CancelledEvent, ChangeAuthor, ChangeSetDocument, ChangeSummary, ChangesetRecordedEvent, CheckStatus, Clarification, ClarificationCandidate, ClarificationLevel, CompleteEvent, ComplexityAssessment, ComposeAllResult, ComposeChildrenResult, ComposeOptions, ContextExtensions, CreateFlow, DEFAULT_INTERACTION_MODELS, DEV_TOKEN_PREFIX, DeleteFlow, DispatchUpdatesResult, EdgeType, EditFlow, EffectPayload, EffectResult, EffectTrace, ErrorEvent, EventEmit, EventKey, EventListen, EventLogEntry, EvolutionDelta, ExecutePlanResult, ExtraTraitRef, FileOperationEvent, FileWrittenEvent, GateState, GenerationLogEvent, GitHubIssue, GitHubLink, GitHubRepo, HistoryMeta, IntegrationContext, InteractionModel, InteractionModelInput, InteractionModelSchema, InterruptEvent, KNOWN_VALIDATION_ERROR_CODES, KnobPayload, KnownValidationErrorCode, LazyService, LineageEntry, ListInteraction, LivingEdge, LivingEffect, LivingEntity, LivingEvent, LivingField, LivingOrbital, LivingOrbitalSchema, LivingPage, LivingState, LivingTrait, LivingTransition, LivingValue, LivingVertex, LlmCallToolsResult, LlmContext, LlmMessage, LlmTokenUsage, LlmToolCall, LlmToolDef, LoloEmitResult, MOCK_PERSONAS, MemoryContext, MessageEvent, OrbitalAddedEvent, OrbitalSchemaCompleteEvent, OrbitalVerificationAPI, ParamsRepairEmittedEvent, ParsedDesign, ParsedDomainContext, ParsedEmitDeclaration, ParsedEntity, ParsedEvent, ParsedListenDeclaration, ParsedOrbital, ParsedPage, ParsedState, ParsedStateMachine, ParsedTrait, ParsedTraitConfig, ParsedTransition, PatternTypeSchema, PersistActionName, PlanSnapshot, PlanSnapshotStatus, PlannerResult, Probability, ProcessCompleteEvent, ProcessErrorEvent, ProcessRepairCompleteEvent, ProcessRepairEvent, ProcessStartEvent, RawUserClaims, RepairResult, ResolvedEntityBinding, ResolvedField, ResolvedNavigation, ResolvedPattern, ResolvedSection, ResolvedSectionEvent, ResolvedTraitBinding, ResolvedTraitDataEntity, ResolvedTraitEvent, ResolvedTraitGuard, ResolvedTraitListener, ResolvedTraitState, ResolvedTraitTick, ResolvedTraitTransition, ResolvedTraitUIBinding, SSEEvent, SSEEventBase, SSEEventType, SaveOptions, SaveResult, SchemaPhaseUpdateEvent, SchemaPhaseValidatedEvent, SchemaUpdateEvent, SemanticAnnotation, SemanticChangeKind, SemanticVector, ServerResponseTrace, ServiceAction, ServiceActionName, ServiceCallResult, ServiceContract, ServiceEvents, SessionContext, SessionHistoryEntry, SnapshotCreatedEvent, SnapshotDocument, SpawnResult, StartEvent, StatsView, StoreContract, StoreFilter, StoreFilterOp, SubagentCompleteEvent, SubagentEvent, SubagentProgressEvent, SubagentStartEvent, TodoActivityType, TodoDetailEvent, TodoUpdateEvent, ToolCallEvent, ToolResultEvent, TraceContext, TraitFieldRef, TraitFieldRefSchema, TraitStateSnapshot, TransitionFrom, TransitionTrace, Unsubscribe, UserContext, ValidateResult, ValidationDocument, ValidationError, ValidationErrorCode, ValidationIssue, ValidationMeta, ValidationResult, ValidationResults, VerificationCheck, VerificationSnapshot, VerificationSummary, VertexId, VertexPayload, VertexType, ViewFlow, WorkspaceContext, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, decodeDevIdentityToken, encodeDevIdentityToken, findMockPersona, getBindingExamples, getInteractionModelForDomain, inferTsType, isKnownValidationErrorCode, isPlanSnapshot, isResolvedIR, isSessionHistoryEntry, isTraitFieldRef, normalizeUserContext, resolvePersonaSpec, toBindingRoot, validateBindingInContext, widenTier } from './types/index.js';
|
|
9
|
+
import { d as TraitConfig, S as State } from './trait-X5mQAMtW.js';
|
|
10
|
+
export { e as CONFIG_REF_EVENT_PATTERN, C as CallSiteConfig, b as CallSiteConfigEntry, f as ConfigFieldDeclaration, g as ConfigFieldDeclarationSchema, h as ConfigFieldItemsDeclaration, i as ConfigRefEventError, D as DeclaredTraitConfig, j as DeclaredTraitConfigSchema, E as EntityFieldContract, k as EntityFieldContractSchema, l as Event, m as EventInput, n as EventPayloadField, o as EventPayloadFieldSchema, p as EventSchema, q as EventScope, r as EventScopeSchema, G as Guard, s as GuardInput, t as GuardSchema, L as ListenSource, u as ListenSourceSchema, O as OrbitalTraitRef, v as OrbitalTraitRefSchema, P as PayloadField, w as PayloadFieldSchema, x as PresentationType, R as REFERENCE_CONFIG_TYPES, y as ReferenceConfigType, z as RequiredField, A as RequiredFieldSchema, B as StateInput, F as StateMachine, H as StateMachineInput, I as StateMachineSchema, J as StateSchema, c as Trait, K as TraitCategory, M as TraitCategorySchema, N as TraitConfigObject, Q as TraitConfigSchema, U as TraitConfigValue, V as TraitConfigValueSchema, W as TraitDataEntity, X as TraitDataEntitySchema, Y as TraitEntityField, Z as TraitEntityFieldSchema, _ as TraitEventContract, $ as TraitEventContractSchema, T as TraitEventListener, a0 as TraitEventListenerSchema, a1 as TraitInput, a2 as TraitRef, a3 as TraitRefSchema, a as TraitReference, a4 as TraitReferenceInput, a5 as TraitReferenceSchema, a6 as TraitSchema, a7 as TraitTick, a8 as TraitTickSchema, a9 as TraitUIBinding, aa as Transition, ab as TransitionInput, ac as TransitionSchema, ad as configRefEventKnob, ae as getTraitConfig, af as getTraitName, ag as isCallSiteConfigDeclaration, ah as isCircuitEvent, ai as isInlineTrait, aj as isReferenceConfigType, ak as normalizeCallSiteConfigToValues, al as normalizeTraitRef, am as resolveConfigRefEventName } from './trait-X5mQAMtW.js';
|
|
11
|
+
export { F as FactoryCallSite, a as FactoryCallSiteParams, b as FactoryConfigParam, c as FactoryConfigTier, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryExposure, g as FactoryPageSignature, h as FactoryParamValue, i as FactoryProvenance, j as FactorySignature, k as FactorySignatureCatalog, l as FactorySignatureEntityField, m as FactoryTraitSignature, J as JsonSchema, n as JsonSchemaType, O as OwnershipOverlayEntry, P as PresentationNavItem, o as PresentationOverlay, R as RuleOverlay, p as RuleOverlayEntry, S as SchemaFieldType, T as TraitOverlay, q as TraitOverlayEntry, r as TraitOverlayListener } from './types-DujRcijG.js';
|
|
12
12
|
export { CallSiteDiff, DomainQuestion, DomainQuestionAnswer, DomainQuestionAnswers, DomainQuestionInputType, FactoryCallPlanMutation, FactoryCallPlanMutationTemplate, FactoryCallPlanState, OrbitalCallInput, TranslationBinding, TranslationResult, TranslationWarning, answerToMutations, answersToMutations, applyFactoryCallPlanMutation, deriveInputType, diffFactoryCalls, generateQuestions, translateOverlaysToParams } from './factory/index.js';
|
|
13
13
|
export { COMPONENT_MAPPING, EVENT_CONTRACTS, FormSubmitPayload, INTEGRATORS_REGISTRY, ItemActionPayload, LoadMoreRequestPayload, PATTERN_REGISTRY, PatternCallbackArg, PatternEntry, PatternPayloadField, PatternPropDef, PatternRecommendation, PatternSwapGate, PropKind, RecommendationContext, RenderUiPayload, SelectionChangePayload, buildRecommendationContext, collectRenderUiPatternTypes, componentMapping, eventContracts, findCompatiblePatterns, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getEmittedEvents, getEntityCardinality, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integratorsRegistry, isContentBodyPattern, isContentBodyPatternType, isDrawHostPattern, isDrawablePattern, isEntityAwarePattern, isMainSlotRenderUi, patternsRegistry, recommendPatterns, registry, renderUiPatternTypesOf } from './patterns/index.js';
|
|
14
14
|
export { BFSNode, BFSPathNode, EdgeWalkTransition, GraphTransition, GuardPayload, ReplayStep, ReplayTransition, StateEdge, WalkStep, buildEdgeCoveringWalk, buildGuardPayloads, buildReplayPaths, buildStateGraph, collectReachableStates, constTruth, extractPayloadFieldRef, walkStatePairs } from './state-machine/index.js';
|
|
@@ -443,26 +443,120 @@ declare function collectTraitConfigRefAdjacency(orbital: OrbitalDefinition): Rea
|
|
|
443
443
|
declare function buildResolvedTraitConfigs(schema: OrbitalSchema | undefined | null): Record<string, TraitConfig>;
|
|
444
444
|
|
|
445
445
|
/**
|
|
446
|
-
* Listen-route payload mapping — the `with { field:
|
|
446
|
+
* Listen-route payload mapping — the `with { field: <expr> }` clause.
|
|
447
447
|
*
|
|
448
|
-
* A `listens` entry's `payloadMapping` is `{ targetField:
|
|
449
|
-
*
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
448
|
+
* A `listens` entry's `payloadMapping` is `{ targetField: SExpr }` (see
|
|
449
|
+
* `TraitEventListener.payloadMapping`). Applying it rewrites the SOURCE trait's
|
|
450
|
+
* outgoing payload into the shape the LOCAL trigger expects before the internal
|
|
451
|
+
* event dispatches. ONE contract, shared by every delivery path: the server
|
|
452
|
+
* runtime (`OrbitalServerRuntime`) and the client cross-trait wiring
|
|
453
|
+
* (`@almadar/ui` useTraitStateMachine).
|
|
454
|
+
*
|
|
455
|
+
* Every value is a full s-expression evaluated against the source payload —
|
|
456
|
+
* `?field` renames, but also `(object/get ?request "accepted")`, `(str/concat …)`,
|
|
457
|
+
* object and array literals. This mirrors `orbital-core`'s listener fan-out
|
|
458
|
+
* (`runtime/listener.rs:126-136`, `runtime/kernel.rs:696-707`), which evaluates
|
|
459
|
+
* each mapping value through the canonical `Evaluator` with a payload-only
|
|
460
|
+
* binding context.
|
|
461
|
+
*
|
|
462
|
+
* The evaluator is injected rather than imported: `@almadar/core` sits upstream
|
|
463
|
+
* of `@almadar/evaluator`, so the caller — which already holds one — supplies it.
|
|
454
464
|
*
|
|
455
465
|
* @packageDocumentation
|
|
456
466
|
*/
|
|
457
467
|
|
|
468
|
+
/**
|
|
469
|
+
* Evaluates one `with{}` mapping value against the source event payload.
|
|
470
|
+
*
|
|
471
|
+
* The context MUST bind the payload only, matching the Rust listener's
|
|
472
|
+
* `BindingContextBuilder::new().payload(…).build()`. Binding `@entity` or
|
|
473
|
+
* `@config` here would let a mapping resolve on the JS path and silently
|
|
474
|
+
* yield nothing on the compiled one.
|
|
475
|
+
*/
|
|
476
|
+
type ListenPayloadEvaluator = (expr: SExpr, payload: EventPayload) => unknown;
|
|
458
477
|
/**
|
|
459
478
|
* Apply a listen entry's `payloadMapping` to the source event payload.
|
|
460
479
|
*
|
|
461
480
|
* - No mapping, or no payload → the payload passes through unchanged.
|
|
462
|
-
* -
|
|
463
|
-
* -
|
|
481
|
+
* - Otherwise the mapping REPLACES the payload: only mapped keys survive.
|
|
482
|
+
* - `"@payload.<field>"` reads that field; a bare string is a literal; an
|
|
483
|
+
* operator list is evaluated. All three are just `evaluate`.
|
|
484
|
+
* - A key whose expression throws, or whose result cannot travel in a payload,
|
|
485
|
+
* is dropped — parity with `runtime/listener.rs`, where a failed evaluation
|
|
486
|
+
* skips the insert rather than delivering a hole.
|
|
487
|
+
*/
|
|
488
|
+
declare function applyListenPayloadMapping(payloadMapping: Record<string, SExpr> | undefined, payload: EventPayload | undefined, evaluate: ListenPayloadEvaluator): EventPayload | undefined;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* ML contract validation — the ONE pure implementation shared by the runtime
|
|
492
|
+
* path (`@almadar/evaluator`'s contract/* operators) and the compiled path
|
|
493
|
+
* (the TypeScript shell imports `validateContract` directly, so the two
|
|
494
|
+
* paths cannot drift). Mirrors `contract_helpers.py` (emitted by
|
|
495
|
+
* `orbital-shell-python`) semantically: same contract JSON in, same
|
|
496
|
+
* `{valid, violations}` out.
|
|
497
|
+
*
|
|
498
|
+
* A tensor on the JS side is a plain JSON value — a number, or (possibly
|
|
499
|
+
* nested) arrays of numbers — exactly what a `torch.Tensor` round-trips
|
|
500
|
+
* to/from via `tolist()`.
|
|
501
|
+
*
|
|
502
|
+
* @packageDocumentation
|
|
464
503
|
*/
|
|
465
|
-
|
|
504
|
+
/** A tensor on the JS path: a number, or nested arrays of numbers. */
|
|
505
|
+
type TensorValue = number | TensorValue[];
|
|
506
|
+
/** Per-dimension range bound. Missing bounds default to +-Infinity, matching contract_helpers.py's `float("-inf")`/`float("inf")`. */
|
|
507
|
+
interface ContractRange {
|
|
508
|
+
min?: number;
|
|
509
|
+
max?: number;
|
|
510
|
+
}
|
|
511
|
+
interface ContractFieldSpec {
|
|
512
|
+
name: string;
|
|
513
|
+
}
|
|
514
|
+
type ContractFieldEntry = string | ContractFieldSpec;
|
|
515
|
+
/**
|
|
516
|
+
* Canonical contract shape (matches contract_helpers.py's dict contracts
|
|
517
|
+
* byte-for-byte): `shape`/`ranges` drive validate/clamp/violations, `fields`
|
|
518
|
+
* drives the entity<->tensor mapping. A single contract object may carry
|
|
519
|
+
* both halves.
|
|
520
|
+
*/
|
|
521
|
+
interface ContractSpec {
|
|
522
|
+
shape?: number[];
|
|
523
|
+
ranges?: Record<string, ContractRange>;
|
|
524
|
+
fields?: ContractFieldEntry[];
|
|
525
|
+
}
|
|
526
|
+
interface ContractViolation {
|
|
527
|
+
type: 'shape_mismatch' | 'range_violation' | 'not_a_tensor';
|
|
528
|
+
expected?: number[];
|
|
529
|
+
actual?: number[];
|
|
530
|
+
dim?: number;
|
|
531
|
+
min?: number;
|
|
532
|
+
max?: number;
|
|
533
|
+
actualMin?: number;
|
|
534
|
+
actualMax?: number;
|
|
535
|
+
/** `not_a_tensor` only — what arrived instead, for diagnosis. */
|
|
536
|
+
actualType?: string;
|
|
537
|
+
}
|
|
538
|
+
interface ContractValidationResult {
|
|
539
|
+
valid: boolean;
|
|
540
|
+
violations: ContractViolation[];
|
|
541
|
+
}
|
|
542
|
+
declare function contractFieldName(f: ContractFieldEntry): string;
|
|
543
|
+
/**
|
|
544
|
+
* A JS-path tensor is a number or nested arrays of numbers. Model output
|
|
545
|
+
* arrives from an untrusted service, so every contract operator guards before
|
|
546
|
+
* walking it — an unguarded walk throws a bare `TypeError` three frames deep,
|
|
547
|
+
* which stalls the transition instead of abstaining.
|
|
548
|
+
*/
|
|
549
|
+
declare function isTensorValue(v: unknown): v is TensorValue;
|
|
550
|
+
/** What arrived instead of a tensor, for the `not_a_tensor` violation. */
|
|
551
|
+
declare function describeTensorMismatch(v: unknown): string;
|
|
552
|
+
/** Shape of a tensor value, e.g. `[[1,2],[3,4]]` -> `[2,2]`, `[1,2,3]` -> `[3]`. */
|
|
553
|
+
declare function tensorShape(t: TensorValue): number[];
|
|
554
|
+
declare function tensorLastDimSize(t: TensorValue): number;
|
|
555
|
+
/** All values at index `dim` along the last axis, flattened across every leading axis — mirrors `tensor[..., dim]`. */
|
|
556
|
+
declare function gatherTensorLastDim(t: TensorValue, dim: number): number[];
|
|
557
|
+
/** Replace values at index `dim` along the last axis via `fn` — mirrors in-place `result[..., dim] = ...clamp(...)`. */
|
|
558
|
+
declare function mapTensorLastDim(t: TensorValue, dim: number, fn: (v: number) => number): TensorValue;
|
|
559
|
+
declare function validateContract(tensor: unknown, contract: ContractSpec): ContractValidationResult;
|
|
466
560
|
|
|
467
561
|
/**
|
|
468
562
|
* Schema Diffing & Protection
|
|
@@ -665,4 +759,4 @@ type EntityFrameState = EntityRow;
|
|
|
665
759
|
*/
|
|
666
760
|
declare function mergeEntityFrame(current: EntityFrameState, orderedWrites: readonly EntityFieldWrite[]): EntityFrameState;
|
|
667
761
|
|
|
668
|
-
export { OrbitalSchema as AppSchema, CategorizedRemovals, ChangesetValue, type EditFocus, type EditFocusLevel, type EntityFieldWrite, type EntityFrameState, EntityRow, EventPayload, FieldValue, JsonValue, OrbitalDefinition, OrbitalSchema, PageContentReduction, type PatternNode, type PatternValue, type RenderOverlayResult, type RenderUiPatch, type RenderUiPatchAddress, type RenderUiPatchOp, ResolvedEntity, ResolvedIR, ResolvedPage, ResolvedTrait, SchemaChange, type SchemaDiff, type SchemaDiffAuthor, type SchemaDiffChange, type SchemaDiffChangeset, type SchemaDiffMode, type SchemaDiffOptions, type SchemaDiffSource, type SchemaDiffSummary, SemanticSchemaChange, State, ToolArgs, type TraceActivity, type TraceActivityItem, type TraceAvatarRole, type TraceChatMessage, type TraceChatMessageToolCall, type TraceDiffHunk, type TraceDiffLine, type TraceFileOperation, type TraceSubagent, type TraceSubagentMessage, TraitConfig, OrbitalDefinition as ValidatedOrbital, applyListenPayloadMapping, applyRenderOverlay, buildResolvedTraitConfigs, categorizeRemovals, classifyWorkflow, clearSchemaCache, collectEmbeddedTraitReferrers, collectTraitConfigRefAdjacency, collectTraitEmbedAdjacency, detectPageContentReduction, diffOrbitalSchemas, diffSchemaSemantics, diffSchemas, fingerprintNode, getEntity, getPage, getPages, getRemovals, getSchemaCacheStats, getTrait, hasSignificantPageReduction, insertChildAtPath, isDestructiveChange, mergeEntityFrame, navigatePatternPath, removeChildAtPath, replaceChildAtPath, requiresConfirmation, schemaToIR, setPropAtPath, summarizeOrbital, summarizeSchema };
|
|
762
|
+
export { OrbitalSchema as AppSchema, CategorizedRemovals, ChangesetValue, type ContractFieldEntry, type ContractFieldSpec, type ContractRange, type ContractSpec, type ContractValidationResult, type ContractViolation, type EditFocus, type EditFocusLevel, type EntityFieldWrite, type EntityFrameState, EntityRow, EventPayload, FieldValue, JsonValue, type ListenPayloadEvaluator, OrbitalDefinition, OrbitalSchema, PageContentReduction, type PatternNode, type PatternValue, type RenderOverlayResult, type RenderUiPatch, type RenderUiPatchAddress, type RenderUiPatchOp, ResolvedEntity, ResolvedIR, ResolvedPage, ResolvedTrait, SExpr, SchemaChange, type SchemaDiff, type SchemaDiffAuthor, type SchemaDiffChange, type SchemaDiffChangeset, type SchemaDiffMode, type SchemaDiffOptions, type SchemaDiffSource, type SchemaDiffSummary, SemanticSchemaChange, State, type TensorValue, ToolArgs, type TraceActivity, type TraceActivityItem, type TraceAvatarRole, type TraceChatMessage, type TraceChatMessageToolCall, type TraceDiffHunk, type TraceDiffLine, type TraceFileOperation, type TraceSubagent, type TraceSubagentMessage, TraitConfig, OrbitalDefinition as ValidatedOrbital, applyListenPayloadMapping, applyRenderOverlay, buildResolvedTraitConfigs, categorizeRemovals, classifyWorkflow, clearSchemaCache, collectEmbeddedTraitReferrers, collectTraitConfigRefAdjacency, collectTraitEmbedAdjacency, contractFieldName, describeTensorMismatch, detectPageContentReduction, diffOrbitalSchemas, diffSchemaSemantics, diffSchemas, fingerprintNode, gatherTensorLastDim, getEntity, getPage, getPages, getRemovals, getSchemaCacheStats, getTrait, hasSignificantPageReduction, insertChildAtPath, isDestructiveChange, isTensorValue, mapTensorLastDim, mergeEntityFrame, navigatePatternPath, removeChildAtPath, replaceChildAtPath, requiresConfirmation, schemaToIR, setPropAtPath, summarizeOrbital, summarizeSchema, tensorLastDimSize, tensorShape, validateContract };
|
package/dist/index.js
CHANGED
|
@@ -922,7 +922,7 @@ var TraitEventListenerSchema = z.object({
|
|
|
922
922
|
tier: z.string().optional(),
|
|
923
923
|
guard: ExpressionSchema.optional(),
|
|
924
924
|
scope: EventScopeSchema.optional(),
|
|
925
|
-
payloadMapping: z.record(
|
|
925
|
+
payloadMapping: z.record(SExprSchema).optional(),
|
|
926
926
|
source: ListenSourceSchema.optional()
|
|
927
927
|
});
|
|
928
928
|
var RequiredFieldSchema = z.object({
|
|
@@ -1731,7 +1731,7 @@ var ComputedEventListenerSchema = z.object({
|
|
|
1731
1731
|
source: EventSourceSchema,
|
|
1732
1732
|
triggers: z.string().min(1),
|
|
1733
1733
|
guard: ExpressionSchema.optional(),
|
|
1734
|
-
payloadMapping: z.record(
|
|
1734
|
+
payloadMapping: z.record(SExprSchema).optional()
|
|
1735
1735
|
});
|
|
1736
1736
|
var OrbitalDefinitionSchema = z.object({
|
|
1737
1737
|
id: OrbitalIdSchema.optional(),
|
|
@@ -1923,6 +1923,75 @@ function isTraitFieldRef(value) {
|
|
|
1923
1923
|
}
|
|
1924
1924
|
var TraitFieldRefSchema = z.string().regex(TRAIT_REF_PATTERN, "expected `@trait.<TraitName>` reference");
|
|
1925
1925
|
|
|
1926
|
+
// src/types/user.ts
|
|
1927
|
+
var ANONYMOUS_USER = {
|
|
1928
|
+
id: "anonymous",
|
|
1929
|
+
role: "anonymous",
|
|
1930
|
+
permissions: []
|
|
1931
|
+
};
|
|
1932
|
+
var DERIVED_CLAIM_KEYS = ["id", "name", "displayName", "email"];
|
|
1933
|
+
function normalizeUserContext(claims) {
|
|
1934
|
+
if (!claims) return void 0;
|
|
1935
|
+
const id = claims.id ?? claims.uid;
|
|
1936
|
+
if (typeof id !== "string" || id.length === 0) return void 0;
|
|
1937
|
+
const user = { id };
|
|
1938
|
+
for (const [key, value] of Object.entries(claims)) {
|
|
1939
|
+
if (value === void 0 || DERIVED_CLAIM_KEYS.includes(key)) continue;
|
|
1940
|
+
user[key] = value;
|
|
1941
|
+
}
|
|
1942
|
+
const name = claims.name ?? claims.displayName;
|
|
1943
|
+
if (typeof name === "string" && name.length > 0) user.name = name;
|
|
1944
|
+
if (typeof claims.email === "string" && claims.email.length > 0) user.email = claims.email;
|
|
1945
|
+
return user;
|
|
1946
|
+
}
|
|
1947
|
+
var MOCK_PERSONAS = [
|
|
1948
|
+
{ id: "admin-1", name: "Ada Admin", email: "ada@example.com", role: "admin", permissions: ["read", "write", "delete"] },
|
|
1949
|
+
{ id: "staff-1", name: "Sam Staff", email: "sam@example.com", role: "staff", permissions: ["read", "write"] },
|
|
1950
|
+
{ id: "member-1", name: "Maya Member", email: "maya@example.com", role: "member", permissions: ["read"] },
|
|
1951
|
+
{ id: "customer-1", name: "Cai Customer", email: "cai@example.com", role: "customer", permissions: ["read"] }
|
|
1952
|
+
];
|
|
1953
|
+
function findMockPersona(idOrRole) {
|
|
1954
|
+
return MOCK_PERSONAS.find((p) => p.id === idOrRole) ?? MOCK_PERSONAS.find((p) => p.role === idOrRole);
|
|
1955
|
+
}
|
|
1956
|
+
function resolvePersonaSpec(spec) {
|
|
1957
|
+
const raw = spec.trim();
|
|
1958
|
+
if (!raw.startsWith("{")) {
|
|
1959
|
+
const seeded = findMockPersona(raw);
|
|
1960
|
+
if (!seeded) {
|
|
1961
|
+
throw new Error(
|
|
1962
|
+
`Persona "${raw}" is not a seeded persona id or role. Known: ${MOCK_PERSONAS.map((p) => `${p.id}/${p.role}`).join(", ")}`
|
|
1963
|
+
);
|
|
1964
|
+
}
|
|
1965
|
+
return seeded;
|
|
1966
|
+
}
|
|
1967
|
+
let claims;
|
|
1968
|
+
try {
|
|
1969
|
+
claims = JSON.parse(raw);
|
|
1970
|
+
} catch {
|
|
1971
|
+
throw new Error(`Persona is not valid JSON: ${raw}`);
|
|
1972
|
+
}
|
|
1973
|
+
const user = normalizeUserContext(claims);
|
|
1974
|
+
if (!user) {
|
|
1975
|
+
throw new Error(`Persona needs an "id" (or "uid"): ${raw}`);
|
|
1976
|
+
}
|
|
1977
|
+
return user;
|
|
1978
|
+
}
|
|
1979
|
+
var DEV_TOKEN_PREFIX = "almadar-dev.";
|
|
1980
|
+
function encodeDevIdentityToken(user) {
|
|
1981
|
+
return DEV_TOKEN_PREFIX + encodeURIComponent(JSON.stringify(user));
|
|
1982
|
+
}
|
|
1983
|
+
function decodeDevIdentityToken(token) {
|
|
1984
|
+
if (!token.startsWith(DEV_TOKEN_PREFIX)) return void 0;
|
|
1985
|
+
try {
|
|
1986
|
+
const claims = JSON.parse(
|
|
1987
|
+
decodeURIComponent(token.slice(DEV_TOKEN_PREFIX.length))
|
|
1988
|
+
);
|
|
1989
|
+
return normalizeUserContext(claims);
|
|
1990
|
+
} catch {
|
|
1991
|
+
return void 0;
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1926
1995
|
// src/types/agent.ts
|
|
1927
1996
|
function isSessionHistoryEntry(value) {
|
|
1928
1997
|
if (typeof value !== "object" || value === null) return false;
|
|
@@ -1988,7 +2057,7 @@ function getInteractionModelForDomain(domain) {
|
|
|
1988
2057
|
// src/patterns/patterns-registry.json
|
|
1989
2058
|
var patterns_registry_default = {
|
|
1990
2059
|
version: "1.0.0",
|
|
1991
|
-
exportedAt: "2026-07-
|
|
2060
|
+
exportedAt: "2026-07-25T06:32:53.902Z",
|
|
1992
2061
|
patterns: {
|
|
1993
2062
|
"entity-table": {
|
|
1994
2063
|
type: "entity-table",
|
|
@@ -18308,6 +18377,63 @@ var patterns_registry_default = {
|
|
|
18308
18377
|
"auto"
|
|
18309
18378
|
],
|
|
18310
18379
|
default: "auto"
|
|
18380
|
+
},
|
|
18381
|
+
titleField: {
|
|
18382
|
+
types: [
|
|
18383
|
+
"string"
|
|
18384
|
+
],
|
|
18385
|
+
description: "Row field holding the chip label. Defaults to `title`. Lets a host bound to its own entity name the column instead of being forced to rename its fields to this grid's contract (same accessor idiom as `DataList`'s `senderField` / `DataGrid`'s `imageField`).",
|
|
18386
|
+
default: "title"
|
|
18387
|
+
},
|
|
18388
|
+
startField: {
|
|
18389
|
+
types: [
|
|
18390
|
+
"string"
|
|
18391
|
+
],
|
|
18392
|
+
description: "Row field holding the start timestamp (ISO or epoch). Defaults to `startTime`.",
|
|
18393
|
+
default: "startTime"
|
|
18394
|
+
},
|
|
18395
|
+
colorField: {
|
|
18396
|
+
types: [
|
|
18397
|
+
"string"
|
|
18398
|
+
],
|
|
18399
|
+
description: "Row field holding the chip's Tailwind colour class. Defaults to `color`.",
|
|
18400
|
+
default: "color"
|
|
18401
|
+
},
|
|
18402
|
+
children: {
|
|
18403
|
+
types: [
|
|
18404
|
+
"function"
|
|
18405
|
+
],
|
|
18406
|
+
description: "Render function for one event chip's content. Receives the row and its index in the materialised events array. The grid keeps ownership of placement, colour and the click target; this replaces only what is drawn INSIDE the chip, so a host can show a time + instructor + badge stack instead of the default single label.",
|
|
18407
|
+
kind: "callback",
|
|
18408
|
+
callbackArgs: [
|
|
18409
|
+
{
|
|
18410
|
+
name: "item",
|
|
18411
|
+
type: "object"
|
|
18412
|
+
},
|
|
18413
|
+
{
|
|
18414
|
+
name: "index",
|
|
18415
|
+
type: "number"
|
|
18416
|
+
}
|
|
18417
|
+
],
|
|
18418
|
+
renderCallback: true
|
|
18419
|
+
},
|
|
18420
|
+
renderItem: {
|
|
18421
|
+
types: [
|
|
18422
|
+
"function"
|
|
18423
|
+
],
|
|
18424
|
+
description: 'Per-event render function (schema-level alias for the children render prop). In `.orb`: `["fn", "item", { pattern tree with @item.field bindings }]`. In `.lolo`: `renderItem: (fn item <Component \u2026={@item.field}/>)` \u2014 the same contract `data-list` / `data-grid` / `carousel` already use.',
|
|
18425
|
+
kind: "callback",
|
|
18426
|
+
callbackArgs: [
|
|
18427
|
+
{
|
|
18428
|
+
name: "item",
|
|
18429
|
+
type: "object"
|
|
18430
|
+
},
|
|
18431
|
+
{
|
|
18432
|
+
name: "index",
|
|
18433
|
+
type: "number"
|
|
18434
|
+
}
|
|
18435
|
+
],
|
|
18436
|
+
renderCallback: true
|
|
18311
18437
|
}
|
|
18312
18438
|
}
|
|
18313
18439
|
},
|
|
@@ -42654,6 +42780,36 @@ var integrators_registry_default = {
|
|
|
42654
42780
|
}
|
|
42655
42781
|
]
|
|
42656
42782
|
},
|
|
42783
|
+
ml: {
|
|
42784
|
+
name: "ml",
|
|
42785
|
+
description: "ML service - model inference on a trained or off-the-shelf checkpoint, reached via a deployed serving orbital",
|
|
42786
|
+
category: "ai",
|
|
42787
|
+
actions: [
|
|
42788
|
+
{
|
|
42789
|
+
name: "infer",
|
|
42790
|
+
description: "Run inference against a deployed model checkpoint",
|
|
42791
|
+
params: [
|
|
42792
|
+
{
|
|
42793
|
+
name: "model",
|
|
42794
|
+
type: "string",
|
|
42795
|
+
required: true,
|
|
42796
|
+
description: "hf:<id> for off-the-shelf weights, or a masar checkpoint id"
|
|
42797
|
+
},
|
|
42798
|
+
{
|
|
42799
|
+
name: "input",
|
|
42800
|
+
type: "any",
|
|
42801
|
+
required: true,
|
|
42802
|
+
description: "JSON-safe model input (object, array, or primitive tensor payload)"
|
|
42803
|
+
}
|
|
42804
|
+
],
|
|
42805
|
+
responseShape: {
|
|
42806
|
+
output: "object",
|
|
42807
|
+
confidence: "number",
|
|
42808
|
+
violations: "string[]"
|
|
42809
|
+
}
|
|
42810
|
+
}
|
|
42811
|
+
]
|
|
42812
|
+
},
|
|
42657
42813
|
deepagent: {
|
|
42658
42814
|
name: "deepagent",
|
|
42659
42815
|
description: "AI code generation agent with tool use - generates schemas, code, and manages projects",
|
|
@@ -42877,7 +43033,7 @@ var integrators_registry_default = {
|
|
|
42877
43033
|
// src/patterns/component-mapping.json
|
|
42878
43034
|
var component_mapping_default = {
|
|
42879
43035
|
version: "1.0.0",
|
|
42880
|
-
exportedAt: "2026-07-
|
|
43036
|
+
exportedAt: "2026-07-25T06:32:53.902Z",
|
|
42881
43037
|
mappings: {
|
|
42882
43038
|
"page-header": {
|
|
42883
43039
|
component: "PageHeader",
|
|
@@ -44242,7 +44398,7 @@ var component_mapping_default = {
|
|
|
44242
44398
|
// src/patterns/event-contracts.json
|
|
44243
44399
|
var event_contracts_default = {
|
|
44244
44400
|
version: "1.0.0",
|
|
44245
|
-
exportedAt: "2026-07-
|
|
44401
|
+
exportedAt: "2026-07-25T06:32:53.902Z",
|
|
44246
44402
|
contracts: {
|
|
44247
44403
|
form: {
|
|
44248
44404
|
emits: [
|
|
@@ -46972,19 +47128,95 @@ function buildResolvedTraitConfigs(schema) {
|
|
|
46972
47128
|
}
|
|
46973
47129
|
|
|
46974
47130
|
// src/listen-payload-mapping.ts
|
|
46975
|
-
function applyListenPayloadMapping(payloadMapping, payload) {
|
|
47131
|
+
function applyListenPayloadMapping(payloadMapping, payload, evaluate) {
|
|
46976
47132
|
if (!payloadMapping || !payload) return payload;
|
|
46977
47133
|
const mapped = {};
|
|
46978
47134
|
for (const [key, expr] of Object.entries(payloadMapping)) {
|
|
46979
|
-
|
|
46980
|
-
|
|
46981
|
-
|
|
46982
|
-
|
|
47135
|
+
let value;
|
|
47136
|
+
try {
|
|
47137
|
+
value = evaluate(expr, payload);
|
|
47138
|
+
} catch {
|
|
47139
|
+
continue;
|
|
46983
47140
|
}
|
|
47141
|
+
if (isEventPayloadValue(value)) mapped[key] = value;
|
|
46984
47142
|
}
|
|
46985
47143
|
return mapped;
|
|
46986
47144
|
}
|
|
46987
47145
|
|
|
47146
|
+
// src/ml-contract.ts
|
|
47147
|
+
function contractFieldName(f) {
|
|
47148
|
+
return typeof f === "string" ? f : f.name;
|
|
47149
|
+
}
|
|
47150
|
+
function isTensorValue(v) {
|
|
47151
|
+
if (typeof v === "number") return true;
|
|
47152
|
+
return Array.isArray(v) && v.every(isTensorValue);
|
|
47153
|
+
}
|
|
47154
|
+
function describeTensorMismatch(v) {
|
|
47155
|
+
if (v === null) return "null";
|
|
47156
|
+
if (Array.isArray(v)) return "array containing non-numeric values";
|
|
47157
|
+
return typeof v;
|
|
47158
|
+
}
|
|
47159
|
+
function tensorShape(t) {
|
|
47160
|
+
if (typeof t === "number") return [];
|
|
47161
|
+
if (t.length === 0) return [0];
|
|
47162
|
+
const first = t[0];
|
|
47163
|
+
if (typeof first === "number") return [t.length];
|
|
47164
|
+
return [t.length, ...tensorShape(first)];
|
|
47165
|
+
}
|
|
47166
|
+
function tensorLastDimSize(t) {
|
|
47167
|
+
const shape = tensorShape(t);
|
|
47168
|
+
return shape.length === 0 ? 0 : shape[shape.length - 1];
|
|
47169
|
+
}
|
|
47170
|
+
function arraysEqual(a, b) {
|
|
47171
|
+
return a.length === b.length && a.every((v, i) => v === b[i]);
|
|
47172
|
+
}
|
|
47173
|
+
function gatherTensorLastDim(t, dim) {
|
|
47174
|
+
if (typeof t === "number") return [];
|
|
47175
|
+
if (t.length === 0) return [];
|
|
47176
|
+
if (typeof t[0] === "number") return [t[dim]];
|
|
47177
|
+
const out = [];
|
|
47178
|
+
for (const sub of t) out.push(...gatherTensorLastDim(sub, dim));
|
|
47179
|
+
return out;
|
|
47180
|
+
}
|
|
47181
|
+
function mapTensorLastDim(t, dim, fn) {
|
|
47182
|
+
if (typeof t === "number") return t;
|
|
47183
|
+
if (t.length === 0) return t;
|
|
47184
|
+
if (typeof t[0] === "number") {
|
|
47185
|
+
const copy = [...t];
|
|
47186
|
+
copy[dim] = fn(copy[dim]);
|
|
47187
|
+
return copy;
|
|
47188
|
+
}
|
|
47189
|
+
return t.map((sub) => mapTensorLastDim(sub, dim, fn));
|
|
47190
|
+
}
|
|
47191
|
+
function validateContract(tensor, contract) {
|
|
47192
|
+
if (!isTensorValue(tensor)) {
|
|
47193
|
+
return {
|
|
47194
|
+
valid: false,
|
|
47195
|
+
violations: [{ type: "not_a_tensor", actualType: describeTensorMismatch(tensor) }]
|
|
47196
|
+
};
|
|
47197
|
+
}
|
|
47198
|
+
const violations = [];
|
|
47199
|
+
const shape = tensorShape(tensor);
|
|
47200
|
+
if (contract.shape && !arraysEqual(shape, contract.shape)) {
|
|
47201
|
+
violations.push({ type: "shape_mismatch", expected: contract.shape, actual: shape });
|
|
47202
|
+
}
|
|
47203
|
+
const ranges = contract.ranges ?? {};
|
|
47204
|
+
const size = tensorLastDimSize(tensor);
|
|
47205
|
+
for (const [dimStr, bounds] of Object.entries(ranges)) {
|
|
47206
|
+
const dim = Number(dimStr);
|
|
47207
|
+
if (dim >= size) continue;
|
|
47208
|
+
const vals = gatherTensorLastDim(tensor, dim);
|
|
47209
|
+
const min = bounds.min ?? -Infinity;
|
|
47210
|
+
const max = bounds.max ?? Infinity;
|
|
47211
|
+
const actualMin = Math.min(...vals);
|
|
47212
|
+
const actualMax = Math.max(...vals);
|
|
47213
|
+
if (actualMin < min || actualMax > max) {
|
|
47214
|
+
violations.push({ type: "range_violation", dim, min, max, actualMin, actualMax });
|
|
47215
|
+
}
|
|
47216
|
+
}
|
|
47217
|
+
return { valid: violations.length === 0, violations };
|
|
47218
|
+
}
|
|
47219
|
+
|
|
46988
47220
|
// src/diff.ts
|
|
46989
47221
|
function diffSchemas(before, after) {
|
|
46990
47222
|
const changes = [];
|
|
@@ -49151,6 +49383,6 @@ function mergeEntityFrame(current, orderedWrites) {
|
|
|
49151
49383
|
return next;
|
|
49152
49384
|
}
|
|
49153
49385
|
|
|
49154
|
-
export { AGENT_DOMAIN_CATEGORIES, ALLOWED_CUSTOM_COMPONENTS, ANIMATION_NAMES, ASSET_ASPECTS, ASSET_DIMENSIONS, AgentDomainCategorySchema, AnimationDefSchema, AnimationNameSchema, AssetAspectSchema, AssetCatalogEntrySchema, AssetCatalogSchema, AssetDimensionSchema, AssetSchema, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingSchema, CAMERA_MODES, COMPONENT_MAPPING, CONFIG_REF_EVENT_PATTERN, CORE_BINDINGS, CameraModeSchema, CameraSchema, ColorSliceSchema, ColorTokensSchema, ComputedEventContractSchema, ComputedEventListenerSchema, ConfigFieldDeclarationSchema, ConfigProvenanceRecordSchema, CustomPatternDefinitionSchema, CustomPatternMapSchema, DEFAULT_INTERACTION_MODELS, DeclaredTraitConfigSchema, DensitySliceSchema, DensityTokensSchema, DesignPreferencesSchema, DesignTokensSchema, DomainCategorySchema, DomainContextSchema, DomainVocabularySchema, ENTITY_ROLES, EVENT_CONTRACTS, EffectSchema, ElevationSliceSchema, ElevationTokensSchema, EntityCallSchema, EntityFieldContractSchema, EntityFieldSchema, EntityIdSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntitySchema, EntitySemanticRoleSchema, EventIdSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpressionSchema, FieldFormatSchema, FieldSchema, FieldTypeSchema, GameSubCategorySchema, GeometrySliceSchema, GeometryTokensSchema, GuardSchema, INTEGRATORS_REGISTRY, IconFamilySchema, IconographySliceSchema, IconographyTokensSchema, IdentityLedgerSchema, IllustrationSliceSchema, IllustrationStyleSchema, IllustrationTokensSchema, InteractionModelSchema, KNOWN_VALIDATION_ERROR_CODES, LedgerEntrySchema, LedgerKindSchema, ListenSourceSchema, McpServiceDefSchema, MotionDurationKeySchema, MotionDurationPaletteSchema, MotionEasingKeySchema, MotionEasingPaletteSchema, MotionIntentMapSchema, MotionIntentSchema, MotionSliceSchema, MotionTokensSchema, NodeClassificationSchema, OrbitalConfigSchema, OrbitalDefinitionSchema, OrbitalEntitySchema, OrbitalIdSchema, OrbitalPageSchema, OrbitalPageStrictSchema, OrbitalSchemaSchema, OrbitalTraitRefSchema, OrbitalUnitSchema, OrbitalSchema as OrbitalZodSchema, PATTERN_REGISTRY, PATTERN_TYPES, PageIdSchema, PageRefObjectSchema, PageRefSchema, PageRefStringSchema, PageSchema, PageTraitRefSchema, PaletteEntryIdSchema, PatternTypeSchema, PayloadFieldSchema, REFERENCE_CONFIG_TYPES, RelatedLinkSchema, RelationConfigSchema, RequiredFieldSchema, RestAuthConfigSchema, RestServiceDefSchema, SERVICE_TYPES, SExprAtomSchema, SExprSchema, SPRITE_DIRECTIONS, ScenePosSchema, SchemaMetadataSchema, SemanticAssetRefSchema, ServiceDefinitionSchema, ServiceIdSchema, ServiceRefObjectSchema, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SkinSpecSchema, SocketEventsSchema, SocketServiceDefSchema, SpacingScaleSchema, SpriteDirectionSchema, SpriteSheetAtlasSchema, StateMachineSchema, StateSchema, StateSemanticRoleSchema, SubTextureSchema, SuggestedGuardSchema, TextureAtlasSchema, ThemeDefinitionSchema, ThemeIdSchema, ThemeRefSchema, ThemeRefStringSchema, ThemeTokensSchema, ThemeVariantSchema, TilesheetSchema, TraitCategorySchema, TraitConfigSchema, TraitConfigValueSchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitFieldRefSchema, TraitIdSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TransitionSchema, TypeIntentMapSchema, TypeIntentSchema, TypeScaleEntrySchema, TypeScaleSchema, TypeScaleTokensSchema, TypeSizeKeySchema, TypeSliceSchema, TypeSlotSchema, TypeWeightSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, answerToMutations, answersToMutations, applyEventWiring, applyFactoryCallPlanMutation, applyListenPayloadMapping, applyRenderOverlay, asEntityId, asEventId, asOrbitalId, asPageId, asPaletteEntryId, asServiceId, asThemeId, asTraitId, atomic, buildEdgeCoveringWalk, buildGuardPayloads, buildRecommendationContext, buildReplayPaths, buildResolvedTraitConfigs, buildStateGraph, callService, categorizeRemovals, classifyWorkflow, clearSchemaCache, collectBindings, collectEmbeddedTraitReferrers, collectReachableStates, collectRenderUiPatternTypes, collectTraitConfigRefAdjacency, collectTraitEmbedAdjacency, component_mapping_default as componentMapping, composeBehaviors, configRefEventKnob, constTruth, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, deref, deriveCollection, deriveInputType, despawn, detectLayoutStrategy, detectPageContentReduction, diffFactoryCalls, diffOrbitalSchemas, diffSchemaSemantics, diffSchemas, doEffects, emit, event_contracts_default as eventContracts, extractPayloadFieldRef, findCompatiblePatterns, findService, fingerprintNode, formatRecommendationsForPrompt, generatePatternDescription, generateQuestions, getAllPatternTypes, getArgs, getBindingExamples, getComponentForPattern, getDefaultAnimationsForRole, getEmittedEvents, getEntity, getEntityCardinality, getInteractionModelForDomain, getOperator, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPage, getPages, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, getRemovals, getSchemaCacheStats, getServiceNames, getTrait, getTraitConfig, getTraitName, hasService, hasSignificantPageReduction, idKindOf, idPrefix, inferTsType, insertChildAtPath, integrators_registry_default as integratorsRegistry, isBinding, isCallSiteConfigDeclaration, isCircuitEvent, isContentBodyPattern, isContentBodyPatternType, isDestructiveChange, isDrawHostPattern, isDrawablePattern, isEffect, isEntityAwarePattern, isEntityCall, isEntityId, isEntityReference, isEntityReferenceAny, isEventId, isEventPayloadValue, isFieldValue, isImportedTraitRef, isInlineTrait, isJsonArray, isJsonObject, isJsonPrimitive, isKnownValidationErrorCode, isMainSlotRenderUi, isMcpService, isOrbitalDefinition, isOrbitalId, isPageId, isPageReference, isPageReferenceObject, isPageReferenceString, isPaletteEntryId, isPlanSnapshot, isReferenceConfigType, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isServiceId, isServiceReference, isServiceReferenceObject, isSessionHistoryEntry, isSocketService, isThemeId, isThemeReference, isTraitFieldRef, isTraitId, isValidBinding, isValidPatternType, ledgerCurName, ledgerRename, ledgerResolveName, mergeEntityFrame, mintId, navigate, navigatePatternPath, normalizeCallSiteConfigToValues, normalizeTraitRef, notify, parseAssetKey, parseBinding, parseEntityRef, parseImportedTraitRef, parseOrbitalSchema, parsePageRef, parseServiceRef, patterns_registry_default as patternsRegistry, persist, persistenceModeAllowsOverrides, recommendPatterns, ref, registry, removeChildAtPath, renderUI, renderUiPatternTypesOf, replaceChildAtPath, requiresConfirmation, resolveConfigRefEventName, safeParseOrbitalSchema, schemaToIR, set, setPropAtPath, sexpr, spawn, summarizeOrbital, summarizeSchema, swap, toBindingRoot, translateOverlaysToParams, validateAssetAnimations, validateBindingInContext, walkSExpr, walkStatePairs, watch, widenTier };
|
|
49386
|
+
export { AGENT_DOMAIN_CATEGORIES, ALLOWED_CUSTOM_COMPONENTS, ANIMATION_NAMES, ANONYMOUS_USER, ASSET_ASPECTS, ASSET_DIMENSIONS, AgentDomainCategorySchema, AnimationDefSchema, AnimationNameSchema, AssetAspectSchema, AssetCatalogEntrySchema, AssetCatalogSchema, AssetDimensionSchema, AssetSchema, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingSchema, CAMERA_MODES, COMPONENT_MAPPING, CONFIG_REF_EVENT_PATTERN, CORE_BINDINGS, CameraModeSchema, CameraSchema, ColorSliceSchema, ColorTokensSchema, ComputedEventContractSchema, ComputedEventListenerSchema, ConfigFieldDeclarationSchema, ConfigProvenanceRecordSchema, CustomPatternDefinitionSchema, CustomPatternMapSchema, DEFAULT_INTERACTION_MODELS, DEV_TOKEN_PREFIX, DeclaredTraitConfigSchema, DensitySliceSchema, DensityTokensSchema, DesignPreferencesSchema, DesignTokensSchema, DomainCategorySchema, DomainContextSchema, DomainVocabularySchema, ENTITY_ROLES, EVENT_CONTRACTS, EffectSchema, ElevationSliceSchema, ElevationTokensSchema, EntityCallSchema, EntityFieldContractSchema, EntityFieldSchema, EntityIdSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntitySchema, EntitySemanticRoleSchema, EventIdSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpressionSchema, FieldFormatSchema, FieldSchema, FieldTypeSchema, GameSubCategorySchema, GeometrySliceSchema, GeometryTokensSchema, GuardSchema, INTEGRATORS_REGISTRY, IconFamilySchema, IconographySliceSchema, IconographyTokensSchema, IdentityLedgerSchema, IllustrationSliceSchema, IllustrationStyleSchema, IllustrationTokensSchema, InteractionModelSchema, KNOWN_VALIDATION_ERROR_CODES, LedgerEntrySchema, LedgerKindSchema, ListenSourceSchema, MOCK_PERSONAS, McpServiceDefSchema, MotionDurationKeySchema, MotionDurationPaletteSchema, MotionEasingKeySchema, MotionEasingPaletteSchema, MotionIntentMapSchema, MotionIntentSchema, MotionSliceSchema, MotionTokensSchema, NodeClassificationSchema, OrbitalConfigSchema, OrbitalDefinitionSchema, OrbitalEntitySchema, OrbitalIdSchema, OrbitalPageSchema, OrbitalPageStrictSchema, OrbitalSchemaSchema, OrbitalTraitRefSchema, OrbitalUnitSchema, OrbitalSchema as OrbitalZodSchema, PATTERN_REGISTRY, PATTERN_TYPES, PageIdSchema, PageRefObjectSchema, PageRefSchema, PageRefStringSchema, PageSchema, PageTraitRefSchema, PaletteEntryIdSchema, PatternTypeSchema, PayloadFieldSchema, REFERENCE_CONFIG_TYPES, RelatedLinkSchema, RelationConfigSchema, RequiredFieldSchema, RestAuthConfigSchema, RestServiceDefSchema, SERVICE_TYPES, SExprAtomSchema, SExprSchema, SPRITE_DIRECTIONS, ScenePosSchema, SchemaMetadataSchema, SemanticAssetRefSchema, ServiceDefinitionSchema, ServiceIdSchema, ServiceRefObjectSchema, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SkinSpecSchema, SocketEventsSchema, SocketServiceDefSchema, SpacingScaleSchema, SpriteDirectionSchema, SpriteSheetAtlasSchema, StateMachineSchema, StateSchema, StateSemanticRoleSchema, SubTextureSchema, SuggestedGuardSchema, TextureAtlasSchema, ThemeDefinitionSchema, ThemeIdSchema, ThemeRefSchema, ThemeRefStringSchema, ThemeTokensSchema, ThemeVariantSchema, TilesheetSchema, TraitCategorySchema, TraitConfigSchema, TraitConfigValueSchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitFieldRefSchema, TraitIdSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TransitionSchema, TypeIntentMapSchema, TypeIntentSchema, TypeScaleEntrySchema, TypeScaleSchema, TypeScaleTokensSchema, TypeSizeKeySchema, TypeSliceSchema, TypeSlotSchema, TypeWeightSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, answerToMutations, answersToMutations, applyEventWiring, applyFactoryCallPlanMutation, applyListenPayloadMapping, applyRenderOverlay, asEntityId, asEventId, asOrbitalId, asPageId, asPaletteEntryId, asServiceId, asThemeId, asTraitId, atomic, buildEdgeCoveringWalk, buildGuardPayloads, buildRecommendationContext, buildReplayPaths, buildResolvedTraitConfigs, buildStateGraph, callService, categorizeRemovals, classifyWorkflow, clearSchemaCache, collectBindings, collectEmbeddedTraitReferrers, collectReachableStates, collectRenderUiPatternTypes, collectTraitConfigRefAdjacency, collectTraitEmbedAdjacency, component_mapping_default as componentMapping, composeBehaviors, configRefEventKnob, constTruth, contractFieldName, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, decodeDevIdentityToken, deref, deriveCollection, deriveInputType, describeTensorMismatch, despawn, detectLayoutStrategy, detectPageContentReduction, diffFactoryCalls, diffOrbitalSchemas, diffSchemaSemantics, diffSchemas, doEffects, emit, encodeDevIdentityToken, event_contracts_default as eventContracts, extractPayloadFieldRef, findCompatiblePatterns, findMockPersona, findService, fingerprintNode, formatRecommendationsForPrompt, gatherTensorLastDim, generatePatternDescription, generateQuestions, getAllPatternTypes, getArgs, getBindingExamples, getComponentForPattern, getDefaultAnimationsForRole, getEmittedEvents, getEntity, getEntityCardinality, getInteractionModelForDomain, getOperator, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPage, getPages, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, getRemovals, getSchemaCacheStats, getServiceNames, getTrait, getTraitConfig, getTraitName, hasService, hasSignificantPageReduction, idKindOf, idPrefix, inferTsType, insertChildAtPath, integrators_registry_default as integratorsRegistry, isBinding, isCallSiteConfigDeclaration, isCircuitEvent, isContentBodyPattern, isContentBodyPatternType, isDestructiveChange, isDrawHostPattern, isDrawablePattern, isEffect, isEntityAwarePattern, isEntityCall, isEntityId, isEntityReference, isEntityReferenceAny, isEventId, isEventPayloadValue, isFieldValue, isImportedTraitRef, isInlineTrait, isJsonArray, isJsonObject, isJsonPrimitive, isKnownValidationErrorCode, isMainSlotRenderUi, isMcpService, isOrbitalDefinition, isOrbitalId, isPageId, isPageReference, isPageReferenceObject, isPageReferenceString, isPaletteEntryId, isPlanSnapshot, isReferenceConfigType, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isServiceId, isServiceReference, isServiceReferenceObject, isSessionHistoryEntry, isSocketService, isTensorValue, isThemeId, isThemeReference, isTraitFieldRef, isTraitId, isValidBinding, isValidPatternType, ledgerCurName, ledgerRename, ledgerResolveName, mapTensorLastDim, mergeEntityFrame, mintId, navigate, navigatePatternPath, normalizeCallSiteConfigToValues, normalizeTraitRef, normalizeUserContext, notify, parseAssetKey, parseBinding, parseEntityRef, parseImportedTraitRef, parseOrbitalSchema, parsePageRef, parseServiceRef, patterns_registry_default as patternsRegistry, persist, persistenceModeAllowsOverrides, recommendPatterns, ref, registry, removeChildAtPath, renderUI, renderUiPatternTypesOf, replaceChildAtPath, requiresConfirmation, resolveConfigRefEventName, resolvePersonaSpec, safeParseOrbitalSchema, schemaToIR, set, setPropAtPath, sexpr, spawn, summarizeOrbital, summarizeSchema, swap, tensorLastDimSize, tensorShape, toBindingRoot, translateOverlaysToParams, validateAssetAnimations, validateBindingInContext, validateContract, walkSExpr, walkStatePairs, watch, widenTier };
|
|
49155
49387
|
//# sourceMappingURL=index.js.map
|
|
49156
49388
|
//# sourceMappingURL=index.js.map
|