@almadar/core 9.6.1 → 9.7.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/factory/index.d.ts +4 -398
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +214 -8
- package/dist/types/index.js +6 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types-CBb2iBAY.d.ts +454 -0
- package/package.json +1 -1
- package/dist/json-lCu3FWzv.d.ts +0 -57
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { aL as OrbitalSchema, az as Orbital, aS as Page, F as DomainContext, aZ as PageTraitRef } from '../schema-Dx404jRG.js';
|
|
2
|
-
export { A as AGENT_DOMAIN_CATEGORIES, a as ALLOWED_CUSTOM_COMPONENTS, b as AgentDomainCategory, c as AgentDomainCategorySchema, d as AllowedCustomComponent, C as ColorSlice, e as ColorSliceSchema, f as ColorTokens, g as ColorTokensSchema, h as ComputedEventContract, i as ComputedEventContractSchema, j as ComputedEventListener, k as ComputedEventListenerSchema, l as CustomPatternDefinition, m as CustomPatternDefinitionInput, n as CustomPatternDefinitionSchema, o as CustomPatternMap, p as CustomPatternMapInput, q as CustomPatternMapSchema, D as DensitySlice, r as DensitySliceSchema, s as DensityTokens, t as DensityTokensSchema, u as DesignPreferences, v as DesignPreferencesInput, w as DesignPreferencesSchema, x as DesignTokens, y as DesignTokensInput, z as DesignTokensSchema, B as DomainCategory, E as DomainCategorySchema, G as DomainContextInput, H as DomainContextSchema, I as DomainVocabulary, J as DomainVocabularySchema, K as ElevationSlice, L as ElevationSliceSchema, M as ElevationTokens, N as ElevationTokensSchema, O as EntityCall, P as EntityCallSchema, Q as EntityRef, R as EntityRefSchema, S as EntityRefStringSchema, T as EntitySemanticRole, U as EntitySemanticRoleSchema, V as EventListener, W as EventListenerSchema, X as EventSemanticRole, Y as EventSemanticRoleSchema, Z as EventSource, _ as EventSourceSchema, $ as GameSubCategory, a0 as GameSubCategorySchema, a1 as GeometrySlice, a2 as GeometrySliceSchema, a3 as GeometryTokens, a4 as GeometryTokensSchema, a5 as IconFamily, a6 as IconFamilySchema, a7 as IconographySlice, a8 as IconographySliceSchema, a9 as IconographyTokens, aa as IconographyTokensSchema, ab as IllustrationSlice, ac as IllustrationSliceSchema, ad as IllustrationStyle, ae as IllustrationStyleSchema, af as IllustrationTokens, ag as IllustrationTokensSchema, ah as MotionDurationKey, ai as MotionDurationKeySchema, aj as MotionDurationPalette, ak as MotionDurationPaletteSchema, al as MotionEasingKey, am as MotionEasingKeySchema, an as MotionEasingPalette, ao as MotionEasingPaletteSchema, ap as MotionIntent, aq as MotionIntentMap, ar as MotionIntentMapSchema, as as MotionIntentSchema, at as MotionSlice, au as MotionSliceSchema, av as MotionTokens, aw as MotionTokensSchema, ax as NodeClassification, ay as NodeClassificationSchema, aA as OrbitalConfig, aB as OrbitalConfigInput, aC as OrbitalConfigSchema,
|
|
3
|
-
import { a_ as ServiceParams, bm as Trait, z as Entity, O as EntityRow, a7 as FieldValue, D as DeclaredTraitConfig, bp as TraitConfig, F as EntityField, K as EntityPersistence, bn as TraitCategory, bJ as TraitScope } from '../trait-BjSJtFXv.js';
|
|
4
|
-
export { A as AgentEffect, a as AnimationDef, b as AnimationDefInput, c as AnimationDefSchema, d as ArrayEntityField, e as AssetMap, f as AssetMapInput, g as AssetMapSchema, h as AssetMapping, i as AssetMappingInput, j as AssetMappingSchema, k as AtomicEffect, C as CallServiceConfig, l as CallServiceEffect, m as CheckpointLoadEffect, n as CheckpointSaveEffect,
|
|
5
|
-
import { c as EventPayloadValue, b as EventPayload, L as LogMeta, S as SExpr } from '../expression-BVRFm0sV.js';
|
|
6
|
-
export { C as CORE_BINDINGS, a as CoreBinding,
|
|
1
|
+
import { aL as OrbitalSchema, az as Orbital, aS as Page, F as DomainContext, aD as OrbitalDefinition, aZ as PageTraitRef } from '../schema-Dx404jRG.js';
|
|
2
|
+
export { A as AGENT_DOMAIN_CATEGORIES, a as ALLOWED_CUSTOM_COMPONENTS, b as AgentDomainCategory, c as AgentDomainCategorySchema, d as AllowedCustomComponent, C as ColorSlice, e as ColorSliceSchema, f as ColorTokens, g as ColorTokensSchema, h as ComputedEventContract, i as ComputedEventContractSchema, j as ComputedEventListener, k as ComputedEventListenerSchema, l as CustomPatternDefinition, m as CustomPatternDefinitionInput, n as CustomPatternDefinitionSchema, o as CustomPatternMap, p as CustomPatternMapInput, q as CustomPatternMapSchema, D as DensitySlice, r as DensitySliceSchema, s as DensityTokens, t as DensityTokensSchema, u as DesignPreferences, v as DesignPreferencesInput, w as DesignPreferencesSchema, x as DesignTokens, y as DesignTokensInput, z as DesignTokensSchema, B as DomainCategory, E as DomainCategorySchema, G as DomainContextInput, H as DomainContextSchema, I as DomainVocabulary, J as DomainVocabularySchema, K as ElevationSlice, L as ElevationSliceSchema, M as ElevationTokens, N as ElevationTokensSchema, O as EntityCall, P as EntityCallSchema, Q as EntityRef, R as EntityRefSchema, S as EntityRefStringSchema, T as EntitySemanticRole, U as EntitySemanticRoleSchema, V as EventListener, W as EventListenerSchema, X as EventSemanticRole, Y as EventSemanticRoleSchema, Z as EventSource, _ as EventSourceSchema, $ as GameSubCategory, a0 as GameSubCategorySchema, a1 as GeometrySlice, a2 as GeometrySliceSchema, a3 as GeometryTokens, a4 as GeometryTokensSchema, a5 as IconFamily, a6 as IconFamilySchema, a7 as IconographySlice, a8 as IconographySliceSchema, a9 as IconographyTokens, aa as IconographyTokensSchema, ab as IllustrationSlice, ac as IllustrationSliceSchema, ad as IllustrationStyle, ae as IllustrationStyleSchema, af as IllustrationTokens, ag as IllustrationTokensSchema, ah as MotionDurationKey, ai as MotionDurationKeySchema, aj as MotionDurationPalette, ak as MotionDurationPaletteSchema, al as MotionEasingKey, am as MotionEasingKeySchema, an as MotionEasingPalette, ao as MotionEasingPaletteSchema, ap as MotionIntent, aq as MotionIntentMap, ar as MotionIntentMapSchema, as as MotionIntentSchema, at as MotionSlice, au as MotionSliceSchema, av as MotionTokens, aw as MotionTokensSchema, ax as NodeClassification, ay as NodeClassificationSchema, aA as OrbitalConfig, aB as OrbitalConfigInput, aC as OrbitalConfigSchema, aE as OrbitalDefinitionSchema, aF as OrbitalInput, aG as OrbitalPage, aH as OrbitalPageInput, aI as OrbitalPageSchema, aJ as OrbitalPageStrictInput, aK as OrbitalPageStrictSchema, aN as OrbitalSchemaInput, aO as OrbitalSchemaSchema, aP as OrbitalSchemaWithTraits, aQ as OrbitalUnit, aR as OrbitalUnitSchema, aM as OrbitalZodSchema, aT as PageRef, aU as PageRefObject, aV as PageRefObjectSchema, aW as PageRefSchema, aX as PageRefStringSchema, aY as PageSchema, a_ as PageTraitRefSchema, a$ as RelatedLink, b0 as RelatedLinkSchema, b1 as SkinSpec, b2 as SkinSpecSchema, b3 as SpacingScale, b4 as SpacingScaleSchema, b5 as StateSemanticRole, b6 as StateSemanticRoleSchema, b7 as SuggestedGuard, b8 as SuggestedGuardSchema, b9 as ThemeDefinition, ba as ThemeDefinitionSchema, bb as ThemeRef, bc as ThemeRefSchema, bd as ThemeRefStringSchema, be as ThemeTokens, bf as ThemeTokensSchema, bg as ThemeVariant, bh as ThemeVariantSchema, bi as TypeIntent, bj as TypeIntentMap, bk as TypeIntentMapSchema, bl as TypeIntentSchema, bm as TypeScale, bn as TypeScaleEntry, bo as TypeScaleEntrySchema, bp as TypeScaleSchema, bq as TypeScaleTokens, br as TypeScaleTokensSchema, bs as TypeSizeKey, bt as TypeSizeKeySchema, bu as TypeSlice, bv as TypeSliceSchema, bw as TypeSlot, bx as TypeSlotSchema, by as TypeWeight, bz as TypeWeightSchema, bA as UXHints, bB as UXHintsSchema, bC as UseDeclaration, bD as UseDeclarationSchema, bE as UserPersona, bF as UserPersonaInput, bG as UserPersonaSchema, bH as ViewType, bI as ViewTypeSchema, bJ as isEntityCall, bK as isEntityReference, bL as isEntityReferenceAny, bM as isImportedTraitRef, bN as isOrbitalDefinition, bO as isPageReference, bP as isPageReferenceObject, bQ as isPageReferenceString, bR as isThemeReference, bS as parseEntityRef, bT as parseImportedTraitRef, bU as parseOrbitalSchema, bV as parsePageRef, bW as safeParseOrbitalSchema } from '../schema-Dx404jRG.js';
|
|
3
|
+
import { a_ as ServiceParams, bm as Trait, z as Entity, O as EntityRow, a7 as FieldValue, D as DeclaredTraitConfig, bp as TraitConfig, u as Effect, o as ConfigFieldDeclaration, bd as State, bN as Transition, F as EntityField, T as Event, bs as TraitConfigValue, K as EntityPersistence, bn as TraitCategory, bJ as TraitScope } from '../trait-BjSJtFXv.js';
|
|
4
|
+
export { A as AgentEffect, a as AnimationDef, b as AnimationDefInput, c as AnimationDefSchema, d as ArrayEntityField, e as AssetMap, f as AssetMapInput, g as AssetMapSchema, h as AssetMapping, i as AssetMappingInput, j as AssetMappingSchema, k as AtomicEffect, C as CallServiceConfig, l as CallServiceEffect, m as CheckpointLoadEffect, n as CheckpointSaveEffect, p as ConfigFieldDeclarationSchema, q as DeclaredTraitConfigSchema, r as DerefEffect, s as DespawnEffect, t as DoEffect, E as ENTITY_ROLES, v as EffectInput, w as EffectSchema, x as EmitConfig, y as EmitEffect, B as EntityData, G as EntityFieldContract, H as EntityFieldContractSchema, I as EntityFieldInput, J as EntityFieldSchema, L as EntityPersistenceSchema, M as EntityRole, N as EntityRoleSchema, P as EntitySchema, Q as EnumEntityField, R as EvaluateConfig, S as EvaluateEffect, U as EventInput, V as EventPayloadField, W as EventPayloadFieldSchema, X as EventSchema, Y as EventScope, Z as EventScopeSchema, _ as FetchEffect, $ as FetchOptions, a0 as FetchResult, a1 as Field, a2 as FieldFormat, a3 as FieldFormatSchema, a4 as FieldSchema, a5 as FieldType, a6 as FieldTypeSchema, a8 as ForwardConfig, a9 as ForwardEffect, aa as GAME_TYPES, ab as GameType, ac as GameTypeSchema, ad as Guard, ae as GuardInput, af as GuardSchema, ag as ListenSource, ah as ListenSourceSchema, ai as LogEffect, aj as McpServiceDef, ak as McpServiceDefSchema, al as NavigateEffect, am as NnConfig, an as NnLayer, ao as NotifyEffect, ap as OrbitalEntity, aq as OrbitalEntityInput, ar as OrbitalEntitySchema, as as OrbitalTraitRef, at as OrbitalTraitRefSchema, au as OsEffect, av as PayloadField, aw as PayloadFieldSchema, ax as PersistData, ay as PersistEffect, az as PersistEmitConfig, aA as PresentationType, aB as RefEffect, aC as RelationConfig, aD as RelationConfigSchema, aE as RelationEntityField, aF as RenderItemLambda, aG as RenderUIConfig, aH as RenderUIEffect, aI as RenderUINode, aJ as RequiredField, aK as RequiredFieldSchema, aL as ResolvedAsset, aM as ResolvedAssetInput, aN as ResolvedAssetSchema, aO as ResolvedPatternProps, aP as RestAuthConfig, aQ as RestAuthConfigSchema, aR as RestServiceDef, aS as RestServiceDefSchema, aT as SERVICE_TYPES, aU as ScalarEntityField, aV as SemanticAssetRef, aW as SemanticAssetRefInput, aX as SemanticAssetRefSchema, aY as ServiceDefinition, aZ as ServiceDefinitionSchema, a$ as ServiceParamsValue, b0 as ServiceRef, b1 as ServiceRefObject, b2 as ServiceRefObjectSchema, b3 as ServiceRefSchema, b4 as ServiceRefStringSchema, b5 as ServiceType, b6 as ServiceTypeSchema, b7 as SetEffect, b8 as SocketEvents, b9 as SocketEventsSchema, ba as SocketServiceDef, bb as SocketServiceDefSchema, bc as SpawnEffect, be as StateInput, bf as StateMachine, bg as StateMachineInput, bh as StateMachineSchema, bi as StateSchema, bj as SwapEffect, bk as TrainConfig, bl as TrainEffect, bo as TraitCategorySchema, bq as TraitConfigObject, br as TraitConfigSchema, bt as TraitConfigValueSchema, bu as TraitDataEntity, bv as TraitDataEntitySchema, bw as TraitEntityField, bx as TraitEntityFieldSchema, by as TraitEventContract, bz as TraitEventContractSchema, bA as TraitEventListener, bB as TraitEventListenerSchema, bC as TraitInput, bD as TraitRef, bE as TraitRefSchema, bF as TraitReference, bG as TraitReferenceInput, bH as TraitReferenceSchema, bI as TraitSchema, bK as TraitTick, bL as TraitTickSchema, bM as TraitUIBinding, bO as TransitionInput, bP as TransitionSchema, bQ as TypedEffect, bR as UISlot, bS as UISlotSchema, bT as UI_SLOTS, bU as VISUAL_STYLES, bV as VisualStyle, bW as VisualStyleSchema, bX as WatchEffect, bY as WatchOptions, bZ as atomic, b_ as callService, b$ as createAssetKey, c0 as deref, c1 as deriveCollection, c2 as despawn, c3 as doEffects, c4 as emit, c5 as findService, c6 as getDefaultAnimationsForRole, c7 as getServiceNames, c8 as getTraitConfig, c9 as getTraitName, ca as hasService, cb as isCircuitEvent, cc as isEffect, cd as isInlineTrait, ce as isMcpService, cf as isRestService, cg as isRuntimeEntity, ch as isSExprEffect, ci as isServiceReference, cj as isServiceReferenceObject, ck as isSingletonEntity, cl as isSocketService, cm as navigate, cn as normalizeTraitRef, co as notify, cp as parseAssetKey, cq as parseServiceRef, cr as persist, cs as ref, ct as renderUI, cu as set, cv as spawn, cw as swap, cx as validateAssetAnimations, cy as watch } from '../trait-BjSJtFXv.js';
|
|
5
|
+
import { c as EventPayloadValue, b as EventPayload, L as LogMeta, S as SExpr, E as EvalContext } from '../expression-BVRFm0sV.js';
|
|
6
|
+
export { C as CORE_BINDINGS, a as CoreBinding, d as Expression, e as ExpressionInput, f as ExpressionSchema, P as ParsedBinding, g as SExprAtom, h as SExprAtomSchema, i as SExprInput, j as SExprSchema, k as collectBindings, l as getArgs, m as getOperator, n as isBinding, o as isSExpr, p as isSExprAtom, q as isSExprCall, r as isValidBinding, s as parseBinding, t as sexpr, w as walkSExpr } from '../expression-BVRFm0sV.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { AnyPatternConfig } from '@almadar/patterns';
|
|
9
9
|
export { PATTERN_TYPES, PatternConfig, PatternType, isValidPatternType } from '@almadar/patterns';
|
|
10
|
-
|
|
10
|
+
import { c as FactoryConfigTier } from '../types-CBb2iBAY.js';
|
|
11
|
+
export { J as JsonObject, n as JsonValue, T as ToolArgs, t as isJsonArray, u as isJsonObject, v as isJsonPrimitive } from '../types-CBb2iBAY.js';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* S-Expression Bindings
|
|
@@ -1562,6 +1563,21 @@ interface ValidationError {
|
|
|
1562
1563
|
* via `KnownValidationErrorCode` when exhaustive handling is needed.
|
|
1563
1564
|
*/
|
|
1564
1565
|
type ValidationErrorCode = string;
|
|
1566
|
+
/**
|
|
1567
|
+
* The result of a single validator pass: a boolean verdict plus the errors
|
|
1568
|
+
* and warnings (the validator wire shape, `ValidationError`).
|
|
1569
|
+
*
|
|
1570
|
+
* Distinct from `ValidationResults` (app.ts): that is the Firestore-persisted
|
|
1571
|
+
* app-document shape keyed on `ValidationIssue` (with `severity` + array path
|
|
1572
|
+
* + `validatedAt`). This `ValidationResult` is the in-process pass result keyed
|
|
1573
|
+
* on `ValidationError` (code + JSON-pointer string path + `suggestion`).
|
|
1574
|
+
* `ok === true` iff there are zero errors AND zero warnings.
|
|
1575
|
+
*/
|
|
1576
|
+
interface ValidationResult {
|
|
1577
|
+
ok: boolean;
|
|
1578
|
+
errors: ValidationError[];
|
|
1579
|
+
warnings: ValidationError[];
|
|
1580
|
+
}
|
|
1565
1581
|
/**
|
|
1566
1582
|
* Closed set of validation codes the Rust validator + lolo lower
|
|
1567
1583
|
* pipeline currently emit. Source-tagged: codes are extracted from
|
|
@@ -1749,6 +1765,196 @@ type KnownValidationErrorCode = typeof KNOWN_VALIDATION_ERROR_CODES[keyof typeof
|
|
|
1749
1765
|
*/
|
|
1750
1766
|
declare function isKnownValidationErrorCode(code: ValidationErrorCode): boolean;
|
|
1751
1767
|
|
|
1768
|
+
/**
|
|
1769
|
+
* Living Orbital Schema — Golden Data Structure type system.
|
|
1770
|
+
*
|
|
1771
|
+
* The Living layer treats an `OrbitalSchema` as a heterogeneous attributed
|
|
1772
|
+
* graph: every vertex (orbital, entity, trait, state, transition, page, field,
|
|
1773
|
+
* event, effect, config-knob) carries a `SemanticAnnotation` + an embedding
|
|
1774
|
+
* vector, and the whole object can embed / validate / compile / similarity-
|
|
1775
|
+
* search / evolve itself. These are the canonical TYPE definitions shared by
|
|
1776
|
+
* the masar (Python) implementation and any TS implementation (rabit, Phase 5);
|
|
1777
|
+
* the numeric implementation lives outside @almadar/core.
|
|
1778
|
+
*
|
|
1779
|
+
* See `docs/Almadar_Masar_Golden_Data_Structure.md` §II/§III/§VIII. Existing
|
|
1780
|
+
* core vocabulary is reused, never re-defined: `SchemaChange`/`SemanticChangeKind`
|
|
1781
|
+
* (changeset.ts) back the evolution delta, `ValidationError`/`ValidationResult`
|
|
1782
|
+
* (validation.ts) back `validate()`, and the per-vertex payloads ARE the existing
|
|
1783
|
+
* structural types.
|
|
1784
|
+
*
|
|
1785
|
+
* @packageDocumentation
|
|
1786
|
+
*/
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* Decision-kind tier for the annotation layer. SUPERSET of the validator-
|
|
1790
|
+
* enforced `FactoryConfigTier` (`domain`/`presentation`/`internal`), adding
|
|
1791
|
+
* `essential` and `customization` for non-knob vertices. `FactoryConfigTier`
|
|
1792
|
+
* is intentionally NOT widened — its 3-value set still governs knob validation
|
|
1793
|
+
* (`ORB_T_CONFIG_TIER_INVALID`). (Historically three tier vocabularies were in
|
|
1794
|
+
* flight; this is the reconciled annotation-layer set.)
|
|
1795
|
+
*/
|
|
1796
|
+
type AnnotationTier = "essential" | "domain" | "presentation" | "customization" | "internal";
|
|
1797
|
+
/** Widen a knob's `FactoryConfigTier` into the annotation-layer `AnnotationTier`. */
|
|
1798
|
+
declare function widenTier(tier: FactoryConfigTier): AnnotationTier;
|
|
1799
|
+
/**
|
|
1800
|
+
* The natural-language metadata attached to every living vertex — the text that
|
|
1801
|
+
* gets embedded for `similar()`/`match_intent()`. Today these four members live
|
|
1802
|
+
* scattered inline across core types (`EntityField.description`/`synonyms`,
|
|
1803
|
+
* `Event`/`TraitEventContract`.`description`/`synonyms`/`tier`,
|
|
1804
|
+
* `FactoryConfigParam.label`/`description`/`synonyms`/`tier`); `SemanticAnnotation`
|
|
1805
|
+
* is the uniform bundle of them, generalized to every vertex.
|
|
1806
|
+
*/
|
|
1807
|
+
interface SemanticAnnotation {
|
|
1808
|
+
description: string;
|
|
1809
|
+
synonyms: string[];
|
|
1810
|
+
label: string;
|
|
1811
|
+
tier: AnnotationTier;
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* A dense semantic embedding. In-memory form is `Float32Array`; the at-rest
|
|
1815
|
+
* JSON form (e.g. rabit's `knob-embeddings.json`) is `number[]`.
|
|
1816
|
+
*/
|
|
1817
|
+
type SemanticVector = Float32Array;
|
|
1818
|
+
/** A probability in `[0, 1]`. */
|
|
1819
|
+
type Probability = number;
|
|
1820
|
+
/** Whether a semantic gate's transition is open, closed, or ~0.5 ambiguous. */
|
|
1821
|
+
type GateState = "open" | "closed" | "ambiguous";
|
|
1822
|
+
/** The typed vertex kinds of the living attributed graph (§II.1 `V_*`). */
|
|
1823
|
+
type VertexType = "orbital" | "entity" | "trait" | "state" | "transition" | "page" | "field" | "event" | "effect" | "value";
|
|
1824
|
+
/**
|
|
1825
|
+
* A stable, structural, embedding-independent vertex id (path style, e.g.
|
|
1826
|
+
* `orb:Cart/trt:AddItem/st:Open`). Re-embedding never changes it.
|
|
1827
|
+
*/
|
|
1828
|
+
type VertexId = string;
|
|
1829
|
+
/** The typed directed edge kinds of the living attributed graph (§II.1 `E_*`). */
|
|
1830
|
+
type EdgeType = "belongs_to" | "has_trait" | "has_state" | "has_transition" | "from_state" | "to_state" | "on_event" | "emits" | "listens" | "cross_orbital" | "has_effect" | "effect_seq" | "data_flow" | "ref_in_effect" | "has_page" | "has_field" | "ref";
|
|
1831
|
+
/**
|
|
1832
|
+
* An effect vertex's payload. Effects are positional S-expression tuples
|
|
1833
|
+
* (`Effect`), so the synthesized coordinates (operator, owning transition,
|
|
1834
|
+
* positional index) carry the addressing the raw tuple lacks.
|
|
1835
|
+
*/
|
|
1836
|
+
interface EffectPayload {
|
|
1837
|
+
sexpr: Effect;
|
|
1838
|
+
operator: string;
|
|
1839
|
+
transitionId: VertexId;
|
|
1840
|
+
index: number;
|
|
1841
|
+
}
|
|
1842
|
+
/**
|
|
1843
|
+
* A config-knob vertex's payload — joins a `Trait.config` dict key with its
|
|
1844
|
+
* declaration (no single core type carries both).
|
|
1845
|
+
*/
|
|
1846
|
+
interface KnobPayload {
|
|
1847
|
+
name: string;
|
|
1848
|
+
declaration: ConfigFieldDeclaration;
|
|
1849
|
+
traitId: VertexId;
|
|
1850
|
+
}
|
|
1851
|
+
/** The union of every kind of vertex payload (the existing structural types). */
|
|
1852
|
+
type VertexPayload = OrbitalDefinition | Entity | Trait | State | Transition | Page | EntityField | Event | EffectPayload | KnobPayload;
|
|
1853
|
+
/**
|
|
1854
|
+
* One vertex of the living graph: a structural payload plus its annotation and
|
|
1855
|
+
* embedding. Identity is `id` (structural); annotation/embedding are derived.
|
|
1856
|
+
*/
|
|
1857
|
+
interface LivingVertex<P extends VertexPayload = VertexPayload> {
|
|
1858
|
+
id: VertexId;
|
|
1859
|
+
vtype: VertexType;
|
|
1860
|
+
payload: P;
|
|
1861
|
+
annotation: SemanticAnnotation;
|
|
1862
|
+
/** Lazily populated — undefined until the schema's `embed()` runs. */
|
|
1863
|
+
embedding?: SemanticVector;
|
|
1864
|
+
}
|
|
1865
|
+
type LivingOrbital = LivingVertex<OrbitalDefinition>;
|
|
1866
|
+
type LivingEntity = LivingVertex<Entity>;
|
|
1867
|
+
type LivingTrait = LivingVertex<Trait>;
|
|
1868
|
+
type LivingState = LivingVertex<State>;
|
|
1869
|
+
type LivingTransition = LivingVertex<Transition>;
|
|
1870
|
+
type LivingPage = LivingVertex<Page>;
|
|
1871
|
+
type LivingField = LivingVertex<EntityField>;
|
|
1872
|
+
type LivingEvent = LivingVertex<Event>;
|
|
1873
|
+
type LivingEffect = LivingVertex<EffectPayload>;
|
|
1874
|
+
type LivingValue = LivingVertex<KnobPayload>;
|
|
1875
|
+
/**
|
|
1876
|
+
* One directed edge. `via` carries the transition vertex for the ternary
|
|
1877
|
+
* `has_transition(from, via, to)` decomposition; `seq` carries the ordering for
|
|
1878
|
+
* `effect_seq`.
|
|
1879
|
+
*/
|
|
1880
|
+
interface LivingEdge {
|
|
1881
|
+
etype: EdgeType;
|
|
1882
|
+
src: VertexId;
|
|
1883
|
+
dst: VertexId;
|
|
1884
|
+
via?: VertexId;
|
|
1885
|
+
seq?: number;
|
|
1886
|
+
}
|
|
1887
|
+
/**
|
|
1888
|
+
* A single evolution step over the living graph. `modified` reuses the canonical
|
|
1889
|
+
* `SchemaChange` (changeset.ts) rather than inventing a parallel operation enum;
|
|
1890
|
+
* `intent` is the natural-language delta that caused the change.
|
|
1891
|
+
*/
|
|
1892
|
+
interface EvolutionDelta {
|
|
1893
|
+
added: VertexId[];
|
|
1894
|
+
removed: VertexId[];
|
|
1895
|
+
modified: SchemaChange[];
|
|
1896
|
+
intent: string;
|
|
1897
|
+
}
|
|
1898
|
+
/** One immutable entry in a living schema's evolution lineage (§6.2). */
|
|
1899
|
+
interface LineageEntry {
|
|
1900
|
+
root: string;
|
|
1901
|
+
parent: string;
|
|
1902
|
+
delta: EvolutionDelta;
|
|
1903
|
+
intent: string;
|
|
1904
|
+
time: number;
|
|
1905
|
+
valid: boolean;
|
|
1906
|
+
}
|
|
1907
|
+
/** The result of simulating one effect's S-expression (§4.6) — pure, no I/O. */
|
|
1908
|
+
interface EffectResult {
|
|
1909
|
+
result: SExpr;
|
|
1910
|
+
sideEffects: string[];
|
|
1911
|
+
emittedEvents: string[];
|
|
1912
|
+
}
|
|
1913
|
+
/**
|
|
1914
|
+
* The operation surface of a living orbital schema. This interface is the shared
|
|
1915
|
+
* CONTRACT; the numeric implementation (embedding, cosine, validator shelling)
|
|
1916
|
+
* is language-specific. `compile()` is the bridge back to the canonical
|
|
1917
|
+
* `OrbitalSchema` (the ML surface — annotations beyond `description`, embeddings,
|
|
1918
|
+
* gates — is stripped).
|
|
1919
|
+
*/
|
|
1920
|
+
interface LivingOrbitalSchema {
|
|
1921
|
+
orbitals: LivingOrbital[];
|
|
1922
|
+
addOrbital(name: string): LivingOrbital;
|
|
1923
|
+
removeOrbital(name: string): void;
|
|
1924
|
+
getOrbital(name: string): LivingOrbital;
|
|
1925
|
+
annotations: Map<VertexId, SemanticAnnotation>;
|
|
1926
|
+
embeddings: Map<VertexId, SemanticVector>;
|
|
1927
|
+
embed(): void;
|
|
1928
|
+
compile(): OrbitalSchema;
|
|
1929
|
+
validate(): ValidationResult;
|
|
1930
|
+
similar(query: string | SemanticVector, k: number, type?: VertexType): LivingVertex[];
|
|
1931
|
+
matchIntent(intent: string, threshold?: number): {
|
|
1932
|
+
vertex: LivingVertex;
|
|
1933
|
+
score: number;
|
|
1934
|
+
}[];
|
|
1935
|
+
predictConfig(intent: string, trait: Trait): Record<string, TraitConfigValue>;
|
|
1936
|
+
predictPresence(intent: string): Set<string>;
|
|
1937
|
+
suggestOrbital(intent: string): LivingOrbital[];
|
|
1938
|
+
suggestEntity(intent: string): LivingEntity[];
|
|
1939
|
+
suggestTrait(intent: string): LivingTrait[];
|
|
1940
|
+
evolve(intentDelta: string): LivingOrbitalSchema;
|
|
1941
|
+
compose(other: LivingOrbitalSchema): LivingOrbitalSchema;
|
|
1942
|
+
repair(errors: ValidationError[]): LivingOrbitalSchema;
|
|
1943
|
+
wireEvents(source: LivingEvent, target: LivingEvent): void;
|
|
1944
|
+
findWiringGaps(): LivingEvent[];
|
|
1945
|
+
simulateEffect(effect: LivingEffect, context: EvalContext): EffectResult;
|
|
1946
|
+
simulateInteraction(effect: LivingEffect, path: string[]): {
|
|
1947
|
+
event: LivingEvent;
|
|
1948
|
+
payload: EventPayload;
|
|
1949
|
+
};
|
|
1950
|
+
traceDataFlow(transition: LivingTransition, inputEntity: LivingEntity): LivingEffect[];
|
|
1951
|
+
evaluateGates(intentEmbedding: SemanticVector): Map<VertexId, GateState[]>;
|
|
1952
|
+
sampleTrajectory(intentEmbedding: SemanticVector, steps: number): LivingVertex[];
|
|
1953
|
+
lineage: LineageEntry[];
|
|
1954
|
+
checkout(hash: string): LivingOrbitalSchema;
|
|
1955
|
+
diff(hash1: string, hash2: string): EvolutionDelta;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1752
1958
|
/**
|
|
1753
1959
|
* Parsed AST — LLM-emit relaxed views of the canonical orbital types.
|
|
1754
1960
|
*
|
|
@@ -1936,4 +2142,4 @@ interface ParsedDesign {
|
|
|
1936
2142
|
};
|
|
1937
2143
|
}
|
|
1938
2144
|
|
|
1939
|
-
export { type AgentCodeSearchResult, type AgentCompactResult, type AgentCompactStrategy, type AgentContext, type AgentGenerateOptions, type AgentMemoryCategory, type AgentMemoryRecord, OrbitalSchema as AppSchema, type AppSummary, type AssetLoadStatus, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, type BindingContext, type BindingRoot, BindingSchema, type BridgeHealth, type BusEvent, type BusEventListener, type BusEventSource, type CategorizedRemovals, type ChangeAuthor, type ChangeSetDocument, type ChangeSummary, type ChangesetValue, type CheckStatus, type ContextExtensions, type CreateFlow, DEFAULT_INTERACTION_MODELS, DeclaredTraitConfig, type DeleteFlow, DomainContext, type EditFlow, type EffectTrace, Entity, EntityField, EntityPersistence, EntityRow, type EventEmit, type EventKey, type EventListen, type EventLogEntry, EventPayload, EventPayloadValue, FieldValue, Orbital as FullOrbitalUnit, type GitHubLink, type HistoryMeta, type InteractionModel, type InteractionModelInput, InteractionModelSchema, KNOWN_VALIDATION_ERROR_CODES, type KnownValidationErrorCode, type LazyService, type ListInteraction, LogMeta, Orbital, OrbitalSchema, type OrbitalVerificationAPI, Page, type PageContentReduction, PageTraitRef, type ParsedDesign, type ParsedDomainContext, type ParsedEmitDeclaration, type ParsedEntity, type ParsedEvent, type ParsedListenDeclaration, type ParsedOrbital, type ParsedPage, type ParsedState, type ParsedStateMachine, type ParsedTrait, type ParsedTraitConfig, type ParsedTransition, PatternTypeSchema, type PersistActionName, type ResolvedEntity, type ResolvedEntityBinding, type ResolvedField, type ResolvedIR, type ResolvedNavigation, type ResolvedPage, type ResolvedPattern, type ResolvedSection, type ResolvedSectionEvent, type ResolvedTrait, type ResolvedTraitBinding, type ResolvedTraitDataEntity, type ResolvedTraitEvent, type ResolvedTraitGuard, type ResolvedTraitListener, type ResolvedTraitState, type ResolvedTraitTick, type ResolvedTraitTransition, type ResolvedTraitUIBinding, SExpr, type SaveOptions, type SaveResult, type SchemaChange, type SemanticChangeKind, type SemanticSchemaChange, type ServerResponseTrace, type ServiceAction, type ServiceActionName, type ServiceContract, type ServiceEvents, ServiceParams, type SnapshotDocument, type StatsView, type StoreContract, type StoreFilter, type StoreFilterOp, Trait, TraitCategory, TraitConfig, type TraitFieldRef, TraitFieldRefSchema, type TraitStateSnapshot, type TransitionFrom, type TransitionTrace, type Unsubscribe, type ValidationDocument, type ValidationError, type ValidationErrorCode, type ValidationIssue, type ValidationMeta, type ValidationResults, type VerificationCheck, type VerificationSnapshot, type VerificationSummary, type ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isKnownValidationErrorCode, isResolvedIR, isTraitFieldRef, toBindingRoot, validateBindingInContext };
|
|
2145
|
+
export { type AgentCodeSearchResult, type AgentCompactResult, type AgentCompactStrategy, type AgentContext, type AgentGenerateOptions, type AgentMemoryCategory, type AgentMemoryRecord, type AnnotationTier, OrbitalSchema as AppSchema, type AppSummary, type AssetLoadStatus, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, type BindingContext, type BindingRoot, BindingSchema, type BridgeHealth, type BusEvent, type BusEventListener, type BusEventSource, type CategorizedRemovals, type ChangeAuthor, type ChangeSetDocument, type ChangeSummary, type ChangesetValue, type CheckStatus, ConfigFieldDeclaration, type ContextExtensions, type CreateFlow, DEFAULT_INTERACTION_MODELS, DeclaredTraitConfig, type DeleteFlow, DomainContext, type EdgeType, type EditFlow, Effect, type EffectPayload, type EffectResult, type EffectTrace, Entity, EntityField, EntityPersistence, EntityRow, EvalContext, Event, type EventEmit, type EventKey, type EventListen, type EventLogEntry, EventPayload, EventPayloadValue, type EvolutionDelta, FieldValue, Orbital as FullOrbitalUnit, type GateState, type GitHubLink, type HistoryMeta, type InteractionModel, type InteractionModelInput, InteractionModelSchema, KNOWN_VALIDATION_ERROR_CODES, type KnobPayload, type KnownValidationErrorCode, type LazyService, type LineageEntry, type ListInteraction, type LivingEdge, type LivingEffect, type LivingEntity, type LivingEvent, type LivingField, type LivingOrbital, type LivingOrbitalSchema, type LivingPage, type LivingState, type LivingTrait, type LivingTransition, type LivingValue, type LivingVertex, LogMeta, Orbital, OrbitalDefinition, OrbitalSchema, type OrbitalVerificationAPI, Page, type PageContentReduction, PageTraitRef, type ParsedDesign, type ParsedDomainContext, type ParsedEmitDeclaration, type ParsedEntity, type ParsedEvent, type ParsedListenDeclaration, type ParsedOrbital, type ParsedPage, type ParsedState, type ParsedStateMachine, type ParsedTrait, type ParsedTraitConfig, type ParsedTransition, PatternTypeSchema, type PersistActionName, type Probability, type ResolvedEntity, type ResolvedEntityBinding, type ResolvedField, type ResolvedIR, type ResolvedNavigation, type ResolvedPage, type ResolvedPattern, type ResolvedSection, type ResolvedSectionEvent, type ResolvedTrait, type ResolvedTraitBinding, type ResolvedTraitDataEntity, type ResolvedTraitEvent, type ResolvedTraitGuard, type ResolvedTraitListener, type ResolvedTraitState, type ResolvedTraitTick, type ResolvedTraitTransition, type ResolvedTraitUIBinding, SExpr, type SaveOptions, type SaveResult, type SchemaChange, type SemanticAnnotation, type SemanticChangeKind, type SemanticSchemaChange, type SemanticVector, type ServerResponseTrace, type ServiceAction, type ServiceActionName, type ServiceContract, type ServiceEvents, ServiceParams, type SnapshotDocument, State, type StatsView, type StoreContract, type StoreFilter, type StoreFilterOp, Trait, TraitCategory, TraitConfig, TraitConfigValue, type TraitFieldRef, TraitFieldRefSchema, type TraitStateSnapshot, Transition, type TransitionFrom, type TransitionTrace, type Unsubscribe, OrbitalDefinition as ValidatedOrbital, type ValidationDocument, type ValidationError, type ValidationErrorCode, type ValidationIssue, type ValidationMeta, type ValidationResult, type ValidationResults, type VerificationCheck, type VerificationSnapshot, type VerificationSummary, type VertexId, type VertexPayload, type VertexType, type ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isKnownValidationErrorCode, isResolvedIR, isTraitFieldRef, toBindingRoot, validateBindingInContext, widenTier };
|
package/dist/types/index.js
CHANGED
|
@@ -1892,6 +1892,11 @@ function isKnownValidationErrorCode(code) {
|
|
|
1892
1892
|
return code in KNOWN_VALIDATION_ERROR_CODES;
|
|
1893
1893
|
}
|
|
1894
1894
|
|
|
1895
|
-
|
|
1895
|
+
// src/types/living.ts
|
|
1896
|
+
function widenTier(tier) {
|
|
1897
|
+
return tier;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
export { AGENT_DOMAIN_CATEGORIES, ALLOWED_CUSTOM_COMPONENTS, AgentDomainCategorySchema, AnimationDefSchema, AssetMapSchema, AssetMappingSchema, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingSchema, CORE_BINDINGS, ColorSliceSchema, ColorTokensSchema, ComputedEventContractSchema, ComputedEventListenerSchema, ConfigFieldDeclarationSchema, CustomPatternDefinitionSchema, CustomPatternMapSchema, DEFAULT_INTERACTION_MODELS, DeclaredTraitConfigSchema, DensitySliceSchema, DensityTokensSchema, DesignPreferencesSchema, DesignTokensSchema, DomainCategorySchema, DomainContextSchema, DomainVocabularySchema, ENTITY_ROLES, EffectSchema, ElevationSliceSchema, ElevationTokensSchema, EntityCallSchema, EntityFieldContractSchema, EntityFieldSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntitySchema, EntitySemanticRoleSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpressionSchema, FieldFormatSchema, FieldSchema, FieldTypeSchema, GAME_TYPES, GameSubCategorySchema, GameTypeSchema, GeometrySliceSchema, GeometryTokensSchema, GuardSchema, IconFamilySchema, IconographySliceSchema, IconographyTokensSchema, IllustrationSliceSchema, IllustrationStyleSchema, IllustrationTokensSchema, InteractionModelSchema, KNOWN_VALIDATION_ERROR_CODES, ListenSourceSchema, McpServiceDefSchema, MotionDurationKeySchema, MotionDurationPaletteSchema, MotionEasingKeySchema, MotionEasingPaletteSchema, MotionIntentMapSchema, MotionIntentSchema, MotionSliceSchema, MotionTokensSchema, NodeClassificationSchema, OrbitalConfigSchema, OrbitalDefinitionSchema, OrbitalEntitySchema, OrbitalPageSchema, OrbitalPageStrictSchema, OrbitalSchemaSchema, OrbitalTraitRefSchema, OrbitalUnitSchema, OrbitalSchema as OrbitalZodSchema, PageRefObjectSchema, PageRefSchema, PageRefStringSchema, PageSchema, PageTraitRefSchema, PatternTypeSchema, PayloadFieldSchema, RelatedLinkSchema, RelationConfigSchema, RequiredFieldSchema, ResolvedAssetSchema, RestAuthConfigSchema, RestServiceDefSchema, SERVICE_TYPES, SExprAtomSchema, SExprSchema, SemanticAssetRefSchema, ServiceDefinitionSchema, ServiceRefObjectSchema, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SkinSpecSchema, SocketEventsSchema, SocketServiceDefSchema, SpacingScaleSchema, StateMachineSchema, StateSchema, StateSemanticRoleSchema, SuggestedGuardSchema, ThemeDefinitionSchema, ThemeRefSchema, ThemeRefStringSchema, ThemeTokensSchema, ThemeVariantSchema, TraitCategorySchema, TraitConfigSchema, TraitConfigValueSchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitFieldRefSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TransitionSchema, TypeIntentMapSchema, TypeIntentSchema, TypeScaleEntrySchema, TypeScaleSchema, TypeScaleTokensSchema, TypeSizeKeySchema, TypeSliceSchema, TypeSlotSchema, TypeWeightSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, atomic, callService, collectBindings, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, deref, deriveCollection, despawn, doEffects, emit, findService, getAllPatternTypes, getArgs, getBindingExamples, getDefaultAnimationsForRole, getInteractionModelForDomain, getOperator, getServiceNames, getTraitConfig, getTraitName, hasService, inferTsType, isBinding, isCircuitEvent, isEffect, isEntityCall, isEntityReference, isEntityReferenceAny, isImportedTraitRef, isInlineTrait, isJsonArray, isJsonObject, isJsonPrimitive, isKnownValidationErrorCode, isMcpService, isOrbitalDefinition, isPageReference, isPageReferenceObject, isPageReferenceString, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isServiceReference, isServiceReferenceObject, isSingletonEntity, isSocketService, isThemeReference, isTraitFieldRef, isValidBinding, navigate, normalizeTraitRef, notify, parseAssetKey, parseBinding, parseEntityRef, parseImportedTraitRef, parseOrbitalSchema, parsePageRef, parseServiceRef, persist, ref, renderUI, safeParseOrbitalSchema, set, sexpr, spawn, swap, toBindingRoot, validateAssetAnimations, validateBindingInContext, walkSExpr, watch, widenTier };
|
|
1896
1901
|
//# sourceMappingURL=index.js.map
|
|
1897
1902
|
//# sourceMappingURL=index.js.map
|