@almadar/core 2.14.0 → 2.14.1
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/index.d.ts +11 -3
- package/dist/index.js +154 -1
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +17 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as OrbitalSchema, S as State, O as OrbitalDefinition } from './schema-BFnZrBhm.js';
|
|
2
2
|
export { A as AGENT_DOMAIN_CATEGORIES, f as ALLOWED_CUSTOM_COMPONENTS, g as AgentDomainCategory, h as AgentDomainCategorySchema, i as AgentEffect, j as AllowedCustomComponent, k as AnimationDef, l as AnimationDefInput, m as AnimationDefSchema, n as AssetMap, o as AssetMapInput, p as AssetMapSchema, q as AssetMapping, r as AssetMappingInput, s as AssetMappingSchema, t as AtomicEffect, C as CORE_BINDINGS, u as CallServiceConfig, v as ComputedEventContract, w as ComputedEventContractSchema, x as ComputedEventListener, y as ComputedEventListenerSchema, z as CoreBinding, B as CustomPatternDefinition, D as CustomPatternDefinitionInput, F as CustomPatternDefinitionSchema, G as CustomPatternMap, H as CustomPatternMapInput, I as CustomPatternMapSchema, J as DerefEffect, K as DesignPreferences, L as DesignPreferencesInput, M as DesignPreferencesSchema, N as DesignTokens, Q as DesignTokensInput, R as DesignTokensSchema, U as DomainCategory, V as DomainCategorySchema, W as DomainContext, X as DomainContextInput, Y as DomainContextSchema, Z as DomainVocabulary, _ as DomainVocabularySchema, $ as ENTITY_ROLES, a0 as Effect, a1 as EffectInput, a2 as EffectSchema, e as Entity, a3 as EntityData, E as EntityField, a4 as EntityFieldInput, a5 as EntityFieldSchema, a as EntityPersistence, a6 as EntityPersistenceSchema, a7 as EntityRef, a8 as EntityRefSchema, a9 as EntityRefStringSchema, aa as EntityRole, ab as EntityRoleSchema, b as EntityRow, ac as EntitySchema, ad as EntitySemanticRole, ae as EntitySemanticRoleSchema, af as EvalContext, ag as Event, ah as EventInput, ai as EventListener, aj as EventListenerSchema, ak as EventPayload, al as EventPayloadField, am as EventPayloadFieldSchema, an as EventSchema, ao as EventScope, ap as EventScopeSchema, aq as EventSemanticRole, ar as EventSemanticRoleSchema, as as EventSource, at as EventSourceSchema, au as Expression, av as ExpressionInput, aw as ExpressionSchema, ax as Field, ay as FieldFormat, az as FieldFormatSchema, aA as FieldSchema, aB as FieldType, aC as FieldTypeSchema, aD as FieldValue, aE as FullOrbitalUnit, aF as GAME_TYPES, aG as GameSubCategory, aH as GameSubCategorySchema, aI as GameType, aJ as GameTypeSchema, aK as Guard, aL as GuardInput, aM as GuardSchema, aN as LogMeta, aO as McpServiceDef, aP as McpServiceDefSchema, aQ as NodeClassification, aR as NodeClassificationSchema, aE as Orbital, aS as OrbitalConfig, aT as OrbitalConfigInput, aU as OrbitalConfigSchema, aV as OrbitalDefinitionSchema, aW as OrbitalEntity, aX as OrbitalEntityInput, aY as OrbitalEntitySchema, aZ as OrbitalInput, a_ as OrbitalPage, a$ as OrbitalPageInput, b0 as OrbitalPageSchema, b1 as OrbitalPageStrictInput, b2 as OrbitalPageStrictSchema, b3 as OrbitalSchemaInput, b4 as OrbitalSchemaSchema, b5 as OrbitalTraitRef, b6 as OrbitalTraitRefSchema, b7 as OrbitalUnit, b8 as OrbitalUnitSchema, b9 as OrbitalZodSchema, P as Page, ba as PageRef, bb as PageRefObject, bc as PageRefObjectSchema, bd as PageRefSchema, be as PageRefStringSchema, bf as PageSchema, bg as PageTraitRef, bh as PageTraitRefSchema, bi as ParsedBinding, bj as PayloadField, bk as PayloadFieldSchema, bl as PresentationType, bm as RefEffect, bn as RelatedLink, bo as RelatedLinkSchema, bp as RelationConfig, bq as RelationConfigSchema, br as RenderUIConfig, bs as RenderUINode, bt as RequiredField, bu as RequiredFieldSchema, bv as ResolvedAsset, bw as ResolvedAssetInput, bx as ResolvedAssetSchema, by as ResolvedPatternProps, bz as RestAuthConfig, bA as RestAuthConfigSchema, bB as RestServiceDef, bC as RestServiceDefSchema, bD as SERVICE_TYPES, bE as SExpr, bF as SExprAtom, bG as SExprAtomSchema, bH as SExprInput, bI as SExprSchema, bJ as SemanticAssetRef, bK as SemanticAssetRefInput, bL as SemanticAssetRefSchema, bM as ServiceDefinition, bN as ServiceDefinitionSchema, bO as ServiceParams, bP as ServiceRef, bQ as ServiceRefSchema, bR as ServiceRefStringSchema, bS as ServiceType, bT as ServiceTypeSchema, bU as SocketEvents, bV as SocketEventsSchema, bW as SocketServiceDef, bX as SocketServiceDefSchema, bY as StateInput, bZ as StateMachine, b_ as StateMachineInput, b$ as StateMachineSchema, c0 as StateSchema, c1 as StateSemanticRole, c2 as StateSemanticRoleSchema, c3 as SuggestedGuard, c4 as SuggestedGuardSchema, c5 as SwapEffect, c6 as ThemeDefinition, c7 as ThemeDefinitionSchema, c8 as ThemeRef, c9 as ThemeRefSchema, ca as ThemeRefStringSchema, cb as ThemeTokens, cc as ThemeTokensSchema, cd as ThemeVariant, ce as ThemeVariantSchema, d as Trait, cf as TraitCategory, cg as TraitCategorySchema, ch as TraitDataEntity, ci as TraitDataEntitySchema, cj as TraitEntityField, ck as TraitEntityFieldSchema, T as TraitEventContract, cl as TraitEventContractSchema, cm as TraitEventListener, cn as TraitEventListenerSchema, co as TraitInput, cp as TraitRef, cq as TraitRefSchema, cr as TraitReference, cs as TraitReferenceInput, ct as TraitReferenceSchema, cu as TraitSchema, cv as TraitTick, cw as TraitTickSchema, cx as TraitUIBinding, cy as Transition, cz as TransitionInput, cA as TransitionSchema, cB as UISlot, cC as UISlotSchema, cD as UI_SLOTS, cE as UXHints, cF as UXHintsSchema, cG as UseDeclaration, cH as UseDeclarationSchema, cI as UserPersona, cJ as UserPersonaInput, cK as UserPersonaSchema, cL as VISUAL_STYLES, cM as ViewType, cN as ViewTypeSchema, cO as VisualStyle, cP as VisualStyleSchema, cQ as WatchEffect, cR as WatchOptions, cS as atomic, cT as callService, cU as collectBindings, cV as createAssetKey, cW as deref, cX as deriveCollection, cY as despawn, cZ as doEffects, c_ as emit, c$ as findService, d0 as getArgs, d1 as getDefaultAnimationsForRole, d2 as getOperator, d3 as getServiceNames, d4 as getTraitConfig, d5 as getTraitName, d6 as hasService, d7 as isBinding, d8 as isCircuitEvent, d9 as isEffect, da as isEntityReference, db as isImportedTraitRef, dc as isInlineTrait, dd as isMcpService, de as isOrbitalDefinition, df as isPageReference, dg as isPageReferenceObject, dh as isPageReferenceString, di as isRestService, dj as isRuntimeEntity, dk as isSExpr, dl as isSExprAtom, dm as isSExprCall, dn as isSExprEffect, dp as isServiceReference, dq as isSingletonEntity, dr as isSocketService, ds as isThemeReference, dt as isValidBinding, du as navigate, dv as normalizeTraitRef, dw as notify, dx as parseAssetKey, dy as parseBinding, dz as parseEntityRef, dA as parseImportedTraitRef, dB as parseOrbitalSchema, dC as parsePageRef, dD as parseServiceRef, dE as persist, dF as ref, dG as renderUI, dH as safeParseOrbitalSchema, dI as set, dJ as sexpr, dK as spawn, dL as swap, dM as validateAssetAnimations, dN as walkSExpr, dO as watch } from './schema-BFnZrBhm.js';
|
|
3
|
-
import { ResolvedIR, ResolvedEntity, ResolvedPage, ResolvedTrait, SchemaChange, CategorizedRemovals, PageContentReduction } from './types/index.js';
|
|
4
|
-
export { AgentCodeSearchResult, AgentCompactResult, AgentCompactStrategy, AgentContext, AgentGenerateOptions, AgentMemoryCategory, AgentMemoryRecord, AppSummary, BINDING_CONTEXT_RULES, BINDING_DOCS, BindingContext, BindingSchema, ChangeAuthor, ChangeSetDocument, ChangeSummary, CreateFlow, DEFAULT_INTERACTION_MODELS, DeleteFlow, EditFlow, GitHubLink, HistoryMeta, InteractionModel, InteractionModelInput, InteractionModelSchema, LazyService, ListInteraction, OperatorName, PatternTypeSchema, PersistActionName, ResolvedEntityBinding, ResolvedField, ResolvedNavigation, ResolvedPattern, ResolvedSection, ResolvedSectionEvent, ResolvedTraitBinding, ResolvedTraitDataEntity, ResolvedTraitEvent, ResolvedTraitGuard, ResolvedTraitListener, ResolvedTraitState, ResolvedTraitTick, ResolvedTraitTransition, ResolvedTraitUIBinding, SaveOptions, SaveResult, ServiceAction, ServiceActionName, ServiceContract, ServiceEvents, SnapshotDocument, StatsView, StoreContract, StoreFilter, StoreFilterOp, TransitionFrom, ValidationDocument, ValidationIssue, ValidationMeta, ValidationResults, ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllOperators, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isResolvedIR, validateBindingInContext } from './types/index.js';
|
|
3
|
+
import { ResolvedIR, ResolvedEntity, ResolvedPage, ResolvedTrait, SchemaChange, CategorizedRemovals, PageContentReduction, SemanticSchemaChange } from './types/index.js';
|
|
4
|
+
export { AgentCodeSearchResult, AgentCompactResult, AgentCompactStrategy, AgentContext, AgentGenerateOptions, AgentMemoryCategory, AgentMemoryRecord, AppSummary, BINDING_CONTEXT_RULES, BINDING_DOCS, BindingContext, BindingSchema, ChangeAuthor, ChangeSetDocument, ChangeSummary, CreateFlow, DEFAULT_INTERACTION_MODELS, DeleteFlow, EditFlow, GitHubLink, HistoryMeta, InteractionModel, InteractionModelInput, InteractionModelSchema, LazyService, ListInteraction, OperatorName, PatternTypeSchema, PersistActionName, ResolvedEntityBinding, ResolvedField, ResolvedNavigation, ResolvedPattern, ResolvedSection, ResolvedSectionEvent, ResolvedTraitBinding, ResolvedTraitDataEntity, ResolvedTraitEvent, ResolvedTraitGuard, ResolvedTraitListener, ResolvedTraitState, ResolvedTraitTick, ResolvedTraitTransition, ResolvedTraitUIBinding, SaveOptions, SaveResult, SemanticChangeKind, ServiceAction, ServiceActionName, ServiceContract, ServiceEvents, SnapshotDocument, StatsView, StoreContract, StoreFilter, StoreFilterOp, TransitionFrom, ValidationDocument, ValidationIssue, ValidationMeta, ValidationResults, ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllOperators, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isResolvedIR, validateBindingInContext } from './types/index.js';
|
|
5
5
|
export { ASTNode, ComparisonCondition, ComparisonOperator, DomainBehavior, DomainChunk, DomainDocument, DomainEffect, DomainEntity, DomainField, DomainFieldType, DomainGuard, DomainPage, DomainPageAction, DomainPageSection, DomainRelationship, DomainTick, DomainToSchemaResult, DomainTransition, EFFECT_REGISTRY, EffectMapping, EffectType, FIELD_TYPE_REGISTRY, FieldCheckCondition, FieldReference, FieldTypeMapping, GUARD_REGISTRY, GuardCondition, GuardMapping, KEYWORDS, Lexer, LogicalCondition, LogicalOperator, MULTI_WORD_KEYWORDS, MappingStore, MergeResult, ParseError, ParseResult, RelationshipType, SchemaToDomainResult, SectionMapping, SourceLocation, SourceRange, Token, TokenType, UserCheckCondition, applySectionUpdate, computeSchemaHash, convertDomainToSchema, convertEntitiesToDomain, convertPagesToDomain, convertSchemaToDomain, convertTraitsToDomain, createMappingStore, deleteSection, detectChanges, domainKeywordToSchemaType, findMapping, findMappingByPath, findMappingsByType, formatBehaviorToDomain, formatBehaviorToSchema, formatDomainGuardToSchema, formatEntityToDomain, formatEntityToSchema, formatGuardConditionToDomain, formatGuardToDomain, formatGuardToSchema, formatMergeSummary, formatPageToDomain, formatPageToSchema, formatSchemaEntityToDomain, formatSchemaGuardToDomain, formatSchemaPageToDomain, formatSchemaTraitToDomain, generateDomainLanguageReference, generateSectionId, getEffectMapping, getFieldTypeMapping, getGuardMapping, getRegisteredEffects, getRegisteredFieldTypes, getRegisteredGuards, getRegistryStats, getSchemaPath, hasSchemaChanged, isEffectRegistered, isFieldTypeRegistered, isGuardRegistered, mergeDomainChunks, parseBehavior, parseDomainEffect, parseDomainEffects, parseDomainGuard, parseEntity, parseGuard, parsePage, parseSectionId, removeMapping, resolveConflict, schemaEntityToDomainEntity, schemaPageToDomainPage, schemaTraitToDomainBehavior, schemaTypeToDomainKeyword, tokenize, updateMappingRange, updateSchemaHash, upsertMapping, validateDomainChunk } from './domain-language/index.js';
|
|
6
6
|
export { C as ComposeBehaviorsInput, a as ComposeBehaviorsResult, E as EventWiringEntry, L as LayoutStrategy, b as applyEventWiring, c as composeBehaviors, d as detectLayoutStrategy } from './compose-behaviors-CQC8hsaL.js';
|
|
7
7
|
export { BFSNode, BFSPathNode, EdgeWalkTransition, GraphTransition, GuardPayload, ReplayStep, ReplayTransition, StateEdge, WalkStep, buildEdgeCoveringWalk, buildGuardPayloads, buildReplayPaths, buildStateGraph, collectReachableStates, extractPayloadFieldRef, walkStatePairs } from './state-machine/index.js';
|
|
@@ -138,6 +138,14 @@ declare function detectPageContentReduction(beforePages: unknown[], afterPages:
|
|
|
138
138
|
* Check if page content reductions are significant.
|
|
139
139
|
*/
|
|
140
140
|
declare function hasSignificantPageReduction(reductions: PageContentReduction[]): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Semantic diff: what .orb CONCEPTS changed between two schema versions.
|
|
143
|
+
*
|
|
144
|
+
* Unlike `diffSchemas()` which produces operational CRUD changes for persistence,
|
|
145
|
+
* this produces concept-level changes (guard-changed, render-ui-changed, etc.)
|
|
146
|
+
* for canvas focus derivation, CLI narration, and selective re-verification.
|
|
147
|
+
*/
|
|
148
|
+
declare function diffSchemaSemantics(before: OrbitalSchema, after: OrbitalSchema): SemanticSchemaChange[];
|
|
141
149
|
|
|
142
150
|
/**
|
|
143
151
|
* Orbital Summarization
|
|
@@ -180,4 +188,4 @@ declare function summarizeOrbital(orbital: OrbitalDefinition): OrbitalDefinition
|
|
|
180
188
|
*/
|
|
181
189
|
declare function summarizeSchema(schema: OrbitalSchema): OrbitalSchema;
|
|
182
190
|
|
|
183
|
-
export { OrbitalSchema as AppSchema, CategorizedRemovals, OrbitalDefinition, OrbitalSchema, PageContentReduction, ResolvedEntity, ResolvedIR, ResolvedPage, ResolvedTrait, SchemaChange, State, categorizeRemovals, classifyWorkflow, clearSchemaCache, detectPageContentReduction, diffSchemas, getEntity, getPage, getPages, getRemovals, getSchemaCacheStats, getTrait, hasSignificantPageReduction, isDestructiveChange, requiresConfirmation, schemaToIR, summarizeOrbital, summarizeSchema };
|
|
191
|
+
export { OrbitalSchema as AppSchema, CategorizedRemovals, OrbitalDefinition, OrbitalSchema, PageContentReduction, ResolvedEntity, ResolvedIR, ResolvedPage, ResolvedTrait, SchemaChange, SemanticSchemaChange, State, categorizeRemovals, classifyWorkflow, clearSchemaCache, detectPageContentReduction, diffSchemaSemantics, diffSchemas, getEntity, getPage, getPages, getRemovals, getSchemaCacheStats, getTrait, hasSignificantPageReduction, isDestructiveChange, requiresConfirmation, schemaToIR, summarizeOrbital, summarizeSchema };
|
package/dist/index.js
CHANGED
|
@@ -1601,6 +1601,159 @@ function detectPageContentReduction(beforePages, afterPages) {
|
|
|
1601
1601
|
function hasSignificantPageReduction(reductions) {
|
|
1602
1602
|
return reductions.some((r) => r.isSignificant);
|
|
1603
1603
|
}
|
|
1604
|
+
function jsonEqual(a, b) {
|
|
1605
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
1606
|
+
}
|
|
1607
|
+
function setsEqual(a, b) {
|
|
1608
|
+
if (a.size !== b.size) return false;
|
|
1609
|
+
for (const item of a) {
|
|
1610
|
+
if (!b.has(item)) return false;
|
|
1611
|
+
}
|
|
1612
|
+
return true;
|
|
1613
|
+
}
|
|
1614
|
+
function inlineTraitMap(refs) {
|
|
1615
|
+
const map = /* @__PURE__ */ new Map();
|
|
1616
|
+
for (const r of refs) {
|
|
1617
|
+
if (isInlineTrait(r)) map.set(r.name, r);
|
|
1618
|
+
}
|
|
1619
|
+
return map;
|
|
1620
|
+
}
|
|
1621
|
+
function inlinePageMap(refs) {
|
|
1622
|
+
const map = /* @__PURE__ */ new Map();
|
|
1623
|
+
for (const r of refs) {
|
|
1624
|
+
if (typeof r === "string") continue;
|
|
1625
|
+
if ("ref" in r && !("name" in r)) continue;
|
|
1626
|
+
const page = r;
|
|
1627
|
+
if (page.path) map.set(page.path, page);
|
|
1628
|
+
}
|
|
1629
|
+
return map;
|
|
1630
|
+
}
|
|
1631
|
+
function isRenderUIEffect(effect) {
|
|
1632
|
+
if (!Array.isArray(effect)) return false;
|
|
1633
|
+
return String(effect[0]) === "render-ui" || String(effect[0]) === "renderUI";
|
|
1634
|
+
}
|
|
1635
|
+
function tKey(t) {
|
|
1636
|
+
return `${t.from ?? ""}+${t.event}`;
|
|
1637
|
+
}
|
|
1638
|
+
function diffSemanticTransitions(orbitalName, traitName, before, after) {
|
|
1639
|
+
const changes = [];
|
|
1640
|
+
const bMap = new Map(before.map((t) => [tKey(t), t]));
|
|
1641
|
+
const aMap = new Map(after.map((t) => [tKey(t), t]));
|
|
1642
|
+
for (const [key, aT] of aMap) {
|
|
1643
|
+
const bT = bMap.get(key);
|
|
1644
|
+
if (!bT) continue;
|
|
1645
|
+
if (!jsonEqual(bT.guard, aT.guard)) {
|
|
1646
|
+
changes.push({ kind: "guard-changed", orbitalName, traitName, transitionEvent: aT.event });
|
|
1647
|
+
}
|
|
1648
|
+
if (!jsonEqual(bT.effects, aT.effects)) {
|
|
1649
|
+
const bEffects = bT.effects ?? [];
|
|
1650
|
+
const aEffects = aT.effects ?? [];
|
|
1651
|
+
const bRUI = bEffects.filter(isRenderUIEffect);
|
|
1652
|
+
const aRUI = aEffects.filter(isRenderUIEffect);
|
|
1653
|
+
if (bRUI.length !== aRUI.length || !jsonEqual(bRUI, aRUI)) {
|
|
1654
|
+
changes.push({ kind: "render-ui-changed", orbitalName, traitName, transitionEvent: aT.event });
|
|
1655
|
+
} else {
|
|
1656
|
+
changes.push({ kind: "effect-changed", orbitalName, traitName, transitionEvent: aT.event });
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
return changes;
|
|
1661
|
+
}
|
|
1662
|
+
function diffSemanticOrbital(name, before, after) {
|
|
1663
|
+
const changes = [];
|
|
1664
|
+
const bEntity = typeof before.entity === "object" ? before.entity : null;
|
|
1665
|
+
const aEntity = typeof after.entity === "object" ? after.entity : null;
|
|
1666
|
+
if (bEntity && aEntity) {
|
|
1667
|
+
if (!jsonEqual(bEntity.fields, aEntity.fields)) {
|
|
1668
|
+
changes.push({ kind: "entity-fields-changed", orbitalName: name });
|
|
1669
|
+
}
|
|
1670
|
+
} else if (bEntity !== aEntity) {
|
|
1671
|
+
changes.push({ kind: "entity-fields-changed", orbitalName: name });
|
|
1672
|
+
}
|
|
1673
|
+
const bTraits = inlineTraitMap(before.traits ?? []);
|
|
1674
|
+
const aTraits = inlineTraitMap(after.traits ?? []);
|
|
1675
|
+
for (const [tName] of aTraits) {
|
|
1676
|
+
if (!bTraits.has(tName)) changes.push({ kind: "trait-added", orbitalName: name, traitName: tName });
|
|
1677
|
+
}
|
|
1678
|
+
for (const [tName] of bTraits) {
|
|
1679
|
+
if (!aTraits.has(tName)) changes.push({ kind: "trait-removed", orbitalName: name, traitName: tName });
|
|
1680
|
+
}
|
|
1681
|
+
for (const [tName, aTrait] of aTraits) {
|
|
1682
|
+
const bTrait = bTraits.get(tName);
|
|
1683
|
+
if (!bTrait) continue;
|
|
1684
|
+
const bSM = bTrait.stateMachine;
|
|
1685
|
+
const aSM = aTrait.stateMachine;
|
|
1686
|
+
if (!bSM && !aSM) continue;
|
|
1687
|
+
if (!bSM || !aSM) {
|
|
1688
|
+
changes.push({ kind: "state-machine-changed", orbitalName: name, traitName: tName });
|
|
1689
|
+
continue;
|
|
1690
|
+
}
|
|
1691
|
+
const bStates = new Set((bSM.states ?? []).map((s) => s.name));
|
|
1692
|
+
const aStates = new Set((aSM.states ?? []).map((s) => s.name));
|
|
1693
|
+
if (!setsEqual(bStates, aStates)) {
|
|
1694
|
+
changes.push({ kind: "state-machine-changed", orbitalName: name, traitName: tName });
|
|
1695
|
+
}
|
|
1696
|
+
const bTKeys = new Set((bSM.transitions ?? []).map(tKey));
|
|
1697
|
+
const aTKeys = new Set((aSM.transitions ?? []).map(tKey));
|
|
1698
|
+
if (!setsEqual(bTKeys, aTKeys)) {
|
|
1699
|
+
if (!changes.some((c) => c.kind === "state-machine-changed" && c.traitName === tName)) {
|
|
1700
|
+
changes.push({ kind: "state-machine-changed", orbitalName: name, traitName: tName });
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
changes.push(...diffSemanticTransitions(name, tName, bSM.transitions ?? [], aSM.transitions ?? []));
|
|
1704
|
+
if (!jsonEqual(bTrait.emits, aTrait.emits) || !jsonEqual(bTrait.listens, aTrait.listens)) {
|
|
1705
|
+
changes.push({ kind: "event-wiring-changed", orbitalName: name, traitName: tName });
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
const bPages = inlinePageMap(before.pages ?? []);
|
|
1709
|
+
const aPages = inlinePageMap(after.pages ?? []);
|
|
1710
|
+
const bPaths = new Set(bPages.keys());
|
|
1711
|
+
const aPaths = new Set(aPages.keys());
|
|
1712
|
+
if (!setsEqual(bPaths, aPaths)) {
|
|
1713
|
+
changes.push({ kind: "page-changed", orbitalName: name });
|
|
1714
|
+
} else {
|
|
1715
|
+
for (const [path, aPage] of aPages) {
|
|
1716
|
+
if (!jsonEqual(bPages.get(path), aPage)) {
|
|
1717
|
+
changes.push({ kind: "page-changed", orbitalName: name });
|
|
1718
|
+
break;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
return changes;
|
|
1723
|
+
}
|
|
1724
|
+
function diffSchemaSemantics(before, after) {
|
|
1725
|
+
const changes = [];
|
|
1726
|
+
const bOrbitals = /* @__PURE__ */ new Map();
|
|
1727
|
+
for (const o of before.orbitals ?? []) {
|
|
1728
|
+
const orb = o;
|
|
1729
|
+
bOrbitals.set(orb.name, orb);
|
|
1730
|
+
}
|
|
1731
|
+
const aOrbitals = /* @__PURE__ */ new Map();
|
|
1732
|
+
for (const o of after.orbitals ?? []) {
|
|
1733
|
+
const orb = o;
|
|
1734
|
+
aOrbitals.set(orb.name, orb);
|
|
1735
|
+
}
|
|
1736
|
+
const added = [];
|
|
1737
|
+
for (const [name] of aOrbitals) {
|
|
1738
|
+
if (!bOrbitals.has(name)) {
|
|
1739
|
+
changes.push({ kind: "orbital-added", orbitalName: name });
|
|
1740
|
+
added.push(name);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
for (const [name] of bOrbitals) {
|
|
1744
|
+
if (!aOrbitals.has(name)) {
|
|
1745
|
+
changes.push({ kind: "orbital-removed", orbitalName: name });
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
if (added.length > 1) {
|
|
1749
|
+
changes.push({ kind: "behavior-composed", orbitalName: added[0] });
|
|
1750
|
+
}
|
|
1751
|
+
for (const [name, aOrb] of aOrbitals) {
|
|
1752
|
+
const bOrb = bOrbitals.get(name);
|
|
1753
|
+
if (bOrb) changes.push(...diffSemanticOrbital(name, bOrb, aOrb));
|
|
1754
|
+
}
|
|
1755
|
+
return changes;
|
|
1756
|
+
}
|
|
1604
1757
|
|
|
1605
1758
|
// src/summarize.ts
|
|
1606
1759
|
var CRUD_STATES = /* @__PURE__ */ new Set(["browsing", "creating", "editing", "viewing", "deleting"]);
|
|
@@ -8248,6 +8401,6 @@ function buildPayloadForEdge(transition, guardCase) {
|
|
|
8248
8401
|
return {};
|
|
8249
8402
|
}
|
|
8250
8403
|
|
|
8251
|
-
export { AGENT_DOMAIN_CATEGORIES, ALLOWED_CUSTOM_COMPONENTS, AgentDomainCategorySchema, AnimationDefSchema, AssetMapSchema, AssetMappingSchema, BINDING_CONTEXT_RULES, BINDING_DOCS, BindingSchema, CORE_BINDINGS, ComputedEventContractSchema, ComputedEventListenerSchema, CustomPatternDefinitionSchema, CustomPatternMapSchema, DEFAULT_INTERACTION_MODELS, DesignPreferencesSchema, DesignTokensSchema, DomainCategorySchema, DomainContextSchema, DomainVocabularySchema, EFFECT_REGISTRY, ENTITY_ROLES, EffectSchema, EntityFieldSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntitySchema, EntitySemanticRoleSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpressionSchema, FIELD_TYPE_REGISTRY, FieldFormatSchema, FieldSchema, FieldTypeSchema, GAME_TYPES, GUARD_REGISTRY, GameSubCategorySchema, GameTypeSchema, GuardSchema, InteractionModelSchema, KEYWORDS, Lexer, MULTI_WORD_KEYWORDS, McpServiceDefSchema, 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, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SocketEventsSchema, SocketServiceDefSchema, StateMachineSchema, StateSchema, StateSemanticRoleSchema, SuggestedGuardSchema, ThemeDefinitionSchema, ThemeRefSchema, ThemeRefStringSchema, ThemeTokensSchema, ThemeVariantSchema, TokenType, TraitCategorySchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TransitionSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, applyEventWiring, applySectionUpdate, atomic, buildEdgeCoveringWalk, buildGuardPayloads, buildReplayPaths, buildStateGraph, callService, categorizeRemovals, classifyWorkflow, clearSchemaCache, collectBindings, collectReachableStates, composeBehaviors, computeSchemaHash, convertDomainToSchema, convertEntitiesToDomain, convertPagesToDomain, convertSchemaToDomain, convertTraitsToDomain, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createMappingStore, createResolvedField, createTypedEventBus, deleteSection, deref, deriveCollection, despawn, detectChanges, detectLayoutStrategy, detectPageContentReduction, diffSchemas, doEffects, domainKeywordToSchemaType, emit, extractPayloadFieldRef, findMapping, findMappingByPath, findMappingsByType, findService, formatBehaviorToDomain, formatBehaviorToSchema, formatDomainGuardToSchema, formatEntityToDomain, formatEntityToSchema, formatGuardConditionToDomain, formatGuardToDomain, formatGuardToSchema, formatMergeSummary, formatPageToDomain, formatPageToSchema, formatSchemaEntityToDomain, formatSchemaGuardToDomain, formatSchemaPageToDomain, formatSchemaTraitToDomain, generateDomainLanguageReference, generateSectionId, getAllOperators, getAllPatternTypes, getArgs, getBindingExamples, getDefaultAnimationsForRole, getEffectMapping, getEntity, getFieldTypeMapping, getGuardMapping, getInteractionModelForDomain, getOperator, getPage, getPages, getRegisteredEffects, getRegisteredFieldTypes, getRegisteredGuards, getRegistryStats, getRemovals, getSchemaCacheStats, getSchemaPath, getServiceNames, getTrait, getTraitConfig, getTraitName, hasSchemaChanged, hasService, hasSignificantPageReduction, inferTsType, isBinding, isCircuitEvent, isDestructiveChange, isEffect, isEffectRegistered, isEntityReference, isFieldTypeRegistered, isGuardRegistered, isImportedTraitRef, isInlineTrait, isMcpService, isOrbitalDefinition, isPageReference, isPageReferenceObject, isPageReferenceString, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isServiceReference, isSingletonEntity, isSocketService, isThemeReference, isValidBinding, mergeDomainChunks, navigate, normalizeTraitRef, notify, parseAssetKey, parseBehavior, parseBinding, parseDomainEffect, parseDomainEffects, parseDomainGuard, parseEntity, parseEntityRef, parseGuard, parseImportedTraitRef, parseOrbitalSchema, parsePage, parsePageRef, parseSectionId, parseServiceRef, persist, ref, removeMapping, renderUI, requiresConfirmation, resolveConflict, safeParseOrbitalSchema, schemaEntityToDomainEntity, schemaPageToDomainPage, schemaToIR, schemaTraitToDomainBehavior, schemaTypeToDomainKeyword, set, sexpr, spawn, summarizeOrbital, summarizeSchema, swap, tokenize, updateMappingRange, updateSchemaHash, upsertMapping, validateAssetAnimations, validateBindingInContext, validateDomainChunk, walkSExpr, walkStatePairs, watch };
|
|
8404
|
+
export { AGENT_DOMAIN_CATEGORIES, ALLOWED_CUSTOM_COMPONENTS, AgentDomainCategorySchema, AnimationDefSchema, AssetMapSchema, AssetMappingSchema, BINDING_CONTEXT_RULES, BINDING_DOCS, BindingSchema, CORE_BINDINGS, ComputedEventContractSchema, ComputedEventListenerSchema, CustomPatternDefinitionSchema, CustomPatternMapSchema, DEFAULT_INTERACTION_MODELS, DesignPreferencesSchema, DesignTokensSchema, DomainCategorySchema, DomainContextSchema, DomainVocabularySchema, EFFECT_REGISTRY, ENTITY_ROLES, EffectSchema, EntityFieldSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntitySchema, EntitySemanticRoleSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpressionSchema, FIELD_TYPE_REGISTRY, FieldFormatSchema, FieldSchema, FieldTypeSchema, GAME_TYPES, GUARD_REGISTRY, GameSubCategorySchema, GameTypeSchema, GuardSchema, InteractionModelSchema, KEYWORDS, Lexer, MULTI_WORD_KEYWORDS, McpServiceDefSchema, 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, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SocketEventsSchema, SocketServiceDefSchema, StateMachineSchema, StateSchema, StateSemanticRoleSchema, SuggestedGuardSchema, ThemeDefinitionSchema, ThemeRefSchema, ThemeRefStringSchema, ThemeTokensSchema, ThemeVariantSchema, TokenType, TraitCategorySchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TransitionSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, applyEventWiring, applySectionUpdate, atomic, buildEdgeCoveringWalk, buildGuardPayloads, buildReplayPaths, buildStateGraph, callService, categorizeRemovals, classifyWorkflow, clearSchemaCache, collectBindings, collectReachableStates, composeBehaviors, computeSchemaHash, convertDomainToSchema, convertEntitiesToDomain, convertPagesToDomain, convertSchemaToDomain, convertTraitsToDomain, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createMappingStore, createResolvedField, createTypedEventBus, deleteSection, deref, deriveCollection, despawn, detectChanges, detectLayoutStrategy, detectPageContentReduction, diffSchemaSemantics, diffSchemas, doEffects, domainKeywordToSchemaType, emit, extractPayloadFieldRef, findMapping, findMappingByPath, findMappingsByType, findService, formatBehaviorToDomain, formatBehaviorToSchema, formatDomainGuardToSchema, formatEntityToDomain, formatEntityToSchema, formatGuardConditionToDomain, formatGuardToDomain, formatGuardToSchema, formatMergeSummary, formatPageToDomain, formatPageToSchema, formatSchemaEntityToDomain, formatSchemaGuardToDomain, formatSchemaPageToDomain, formatSchemaTraitToDomain, generateDomainLanguageReference, generateSectionId, getAllOperators, getAllPatternTypes, getArgs, getBindingExamples, getDefaultAnimationsForRole, getEffectMapping, getEntity, getFieldTypeMapping, getGuardMapping, getInteractionModelForDomain, getOperator, getPage, getPages, getRegisteredEffects, getRegisteredFieldTypes, getRegisteredGuards, getRegistryStats, getRemovals, getSchemaCacheStats, getSchemaPath, getServiceNames, getTrait, getTraitConfig, getTraitName, hasSchemaChanged, hasService, hasSignificantPageReduction, inferTsType, isBinding, isCircuitEvent, isDestructiveChange, isEffect, isEffectRegistered, isEntityReference, isFieldTypeRegistered, isGuardRegistered, isImportedTraitRef, isInlineTrait, isMcpService, isOrbitalDefinition, isPageReference, isPageReferenceObject, isPageReferenceString, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isServiceReference, isSingletonEntity, isSocketService, isThemeReference, isValidBinding, mergeDomainChunks, navigate, normalizeTraitRef, notify, parseAssetKey, parseBehavior, parseBinding, parseDomainEffect, parseDomainEffects, parseDomainGuard, parseEntity, parseEntityRef, parseGuard, parseImportedTraitRef, parseOrbitalSchema, parsePage, parsePageRef, parseSectionId, parseServiceRef, persist, ref, removeMapping, renderUI, requiresConfirmation, resolveConflict, safeParseOrbitalSchema, schemaEntityToDomainEntity, schemaPageToDomainPage, schemaToIR, schemaTraitToDomainBehavior, schemaTypeToDomainKeyword, set, sexpr, spawn, summarizeOrbital, summarizeSchema, swap, tokenize, updateMappingRange, updateSchemaHash, upsertMapping, validateAssetAnimations, validateBindingInContext, validateDomainChunk, walkSExpr, walkStatePairs, watch };
|
|
8252
8405
|
//# sourceMappingURL=index.js.map
|
|
8253
8406
|
//# sourceMappingURL=index.js.map
|