@almadar/core 2.6.4 → 2.8.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.d.ts +2 -2
- package/dist/builders.js.map +1 -1
- package/dist/{compose-behaviors-CnJ5Hn4p.d.ts → compose-behaviors-j53THIou.d.ts} +1 -1
- package/dist/domain-language/index.d.ts +1 -1
- package/dist/domain-language/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +29 -14
- package/dist/index.js.map +1 -1
- package/dist/{schema-obC5T1Jm.d.ts → schema-BNBpNxGb.d.ts} +137 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +26 -11
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1239,6 +1239,66 @@ type LogEffect = ['log', ...unknown[]];
|
|
|
1239
1239
|
* @example ['wait', 1000] - wait 1 second
|
|
1240
1240
|
*/
|
|
1241
1241
|
type WaitEffect = ['wait', number];
|
|
1242
|
+
/**
|
|
1243
|
+
* Ref effect - creates a reactive entity subscription.
|
|
1244
|
+
* Returns a reactive reference that auto-updates when the entity changes.
|
|
1245
|
+
* @example ['ref', '@entity.health'] - reactive subscription to health
|
|
1246
|
+
* @example ['ref', 'User', { id: '@payload.userId' }] - reactive ref to specific user
|
|
1247
|
+
*/
|
|
1248
|
+
type RefEffect = ['ref', string] | ['ref', string, Record<string, unknown>];
|
|
1249
|
+
/**
|
|
1250
|
+
* Deref effect - snapshot read of an entity value.
|
|
1251
|
+
* Returns the current value without subscribing to changes.
|
|
1252
|
+
* @example ['deref', '@entity.health'] - read current health value
|
|
1253
|
+
* @example ['deref', 'User', { id: '@payload.userId' }] - read specific user snapshot
|
|
1254
|
+
*/
|
|
1255
|
+
type DerefEffect = ['deref', string] | ['deref', string, Record<string, unknown>];
|
|
1256
|
+
/**
|
|
1257
|
+
* Swap! effect - atomic compare-and-swap on an entity field.
|
|
1258
|
+
* Only updates if the current value matches the expected value.
|
|
1259
|
+
* @example ['swap!', '@entity.health', ['fn', ['old'], ['-', 'old', '@payload.damage']]]
|
|
1260
|
+
* @example ['swap!', '@entity.counter', ['+', '@entity.counter', 1]]
|
|
1261
|
+
*/
|
|
1262
|
+
type SwapEffect = ['swap!', string, SExpr];
|
|
1263
|
+
/**
|
|
1264
|
+
* Watch effect - registers a callback for entity changes.
|
|
1265
|
+
* Emits an event whenever the watched binding changes.
|
|
1266
|
+
* @example ['watch', '@entity.health', 'HEALTH_CHANGED']
|
|
1267
|
+
* @example ['watch', '@entity.status', 'STATUS_UPDATED', { debounce: 100 }]
|
|
1268
|
+
*/
|
|
1269
|
+
type WatchEffect = ['watch', string, string] | ['watch', string, string, Record<string, unknown>];
|
|
1270
|
+
/**
|
|
1271
|
+
* Atomic effect - groups multiple effects into an atomic transaction.
|
|
1272
|
+
* All effects either succeed together or are rolled back.
|
|
1273
|
+
* @example ['atomic', ['set', '@entity.x', 10], ['set', '@entity.y', 20]]
|
|
1274
|
+
* @example ['atomic', ['persist', 'update', 'User', { balance: 100 }], ['emit', 'BALANCE_UPDATED']]
|
|
1275
|
+
*/
|
|
1276
|
+
type AtomicEffect = ['atomic', ...SExpr[]];
|
|
1277
|
+
/**
|
|
1278
|
+
* Forward effect - runs a neural network forward pass (Python backend).
|
|
1279
|
+
* @example ['forward', 'primary', { architecture: [...], input: '@payload.input', 'on-complete': 'PREDICTION_READY' }]
|
|
1280
|
+
*/
|
|
1281
|
+
type ForwardEffect = ['forward', string, Record<string, unknown>];
|
|
1282
|
+
/**
|
|
1283
|
+
* Train effect - runs a training loop (Python backend).
|
|
1284
|
+
* @example ['train', { architecture: [...], dataset: '@entity.data', config: { epochs: 10 }, 'on-complete': 'TRAINING_DONE' }]
|
|
1285
|
+
*/
|
|
1286
|
+
type TrainEffect = ['train', Record<string, unknown>];
|
|
1287
|
+
/**
|
|
1288
|
+
* Evaluate effect - runs model evaluation (Python backend).
|
|
1289
|
+
* @example ['evaluate', { architecture: [...], dataset: '@entity.testData', metrics: ['accuracy'], 'on-complete': 'EVAL_DONE' }]
|
|
1290
|
+
*/
|
|
1291
|
+
type EvaluateEffect = ['evaluate', Record<string, unknown>];
|
|
1292
|
+
/**
|
|
1293
|
+
* Checkpoint save effect - saves model weights.
|
|
1294
|
+
* @example ['checkpoint/save', '/path/to/model.pt', '@entity.weights']
|
|
1295
|
+
*/
|
|
1296
|
+
type CheckpointSaveEffect = ['checkpoint/save', string, unknown];
|
|
1297
|
+
/**
|
|
1298
|
+
* Checkpoint load effect - loads model weights.
|
|
1299
|
+
* @example ['checkpoint/load', '/path/to/model.pt']
|
|
1300
|
+
*/
|
|
1301
|
+
type CheckpointLoadEffect = ['checkpoint/load', string];
|
|
1242
1302
|
/**
|
|
1243
1303
|
* Async delay effect - wait then execute effects.
|
|
1244
1304
|
* @example ['async/delay', 2000, ['emit', 'TIMEOUT']]
|
|
@@ -1281,7 +1341,7 @@ type AsyncSequenceEffect = ['async/sequence', ...Effect[]];
|
|
|
1281
1341
|
* Union of all typed effects.
|
|
1282
1342
|
* Provides compile-time validation for common effect types.
|
|
1283
1343
|
*/
|
|
1284
|
-
type TypedEffect = RenderUIEffect | NavigateEffect | EmitEffect | SetEffect | PersistEffect | CallServiceEffect | SpawnEffect | DespawnEffect | DoEffect | NotifyEffect | FetchEffect | IfEffect | WhenEffect | LetEffect | LogEffect | WaitEffect | AsyncDelayEffect | AsyncDebounceEffect | AsyncThrottleEffect | AsyncIntervalEffect | AsyncRaceEffect | AsyncAllEffect | AsyncSequenceEffect;
|
|
1344
|
+
type TypedEffect = RenderUIEffect | NavigateEffect | EmitEffect | SetEffect | PersistEffect | CallServiceEffect | SpawnEffect | DespawnEffect | DoEffect | NotifyEffect | FetchEffect | IfEffect | WhenEffect | LetEffect | LogEffect | WaitEffect | RefEffect | DerefEffect | SwapEffect | WatchEffect | AtomicEffect | AsyncDelayEffect | AsyncDebounceEffect | AsyncThrottleEffect | AsyncIntervalEffect | AsyncRaceEffect | AsyncAllEffect | AsyncSequenceEffect | ForwardEffect | TrainEffect | EvaluateEffect | CheckpointSaveEffect | CheckpointLoadEffect;
|
|
1285
1345
|
/**
|
|
1286
1346
|
* Effect type - typed S-expression format.
|
|
1287
1347
|
*
|
|
@@ -1422,6 +1482,81 @@ declare function doEffects(...effects: SExpr[]): DoEffect;
|
|
|
1422
1482
|
*/
|
|
1423
1483
|
declare function notify(channel: 'email' | 'push' | 'sms' | 'in_app', message: string): NotifyEffect;
|
|
1424
1484
|
declare function notify(channel: 'email' | 'push' | 'sms' | 'in_app', message: string, recipient: string): NotifyEffect;
|
|
1485
|
+
/**
|
|
1486
|
+
* Create a ref effect (reactive entity subscription).
|
|
1487
|
+
*
|
|
1488
|
+
* @param {string} binding - Binding or entity name to subscribe to
|
|
1489
|
+
* @param {Record<string, unknown>} [selector] - Optional selector for specific entity
|
|
1490
|
+
* @returns {RefEffect} Ref effect array
|
|
1491
|
+
*
|
|
1492
|
+
* @example
|
|
1493
|
+
* ref('@entity.health'); // returns ["ref", "@entity.health"]
|
|
1494
|
+
* ref('User', { id: '@payload.userId' }); // returns ["ref", "User", { id: "@payload.userId" }]
|
|
1495
|
+
*/
|
|
1496
|
+
declare function ref(binding: string): RefEffect;
|
|
1497
|
+
declare function ref(binding: string, selector: Record<string, unknown>): RefEffect;
|
|
1498
|
+
/**
|
|
1499
|
+
* Create a deref effect (snapshot read).
|
|
1500
|
+
*
|
|
1501
|
+
* @param {string} binding - Binding or entity name to read
|
|
1502
|
+
* @param {Record<string, unknown>} [selector] - Optional selector for specific entity
|
|
1503
|
+
* @returns {DerefEffect} Deref effect array
|
|
1504
|
+
*
|
|
1505
|
+
* @example
|
|
1506
|
+
* deref('@entity.health'); // returns ["deref", "@entity.health"]
|
|
1507
|
+
* deref('User', { id: '@payload.userId' }); // returns ["deref", "User", { id: "@payload.userId" }]
|
|
1508
|
+
*/
|
|
1509
|
+
declare function deref(binding: string): DerefEffect;
|
|
1510
|
+
declare function deref(binding: string, selector: Record<string, unknown>): DerefEffect;
|
|
1511
|
+
/**
|
|
1512
|
+
* Create a swap! effect (atomic compare-and-swap).
|
|
1513
|
+
*
|
|
1514
|
+
* @param {string} binding - Binding to atomically update
|
|
1515
|
+
* @param {SExpr} transform - Transformation expression applied to the current value
|
|
1516
|
+
* @returns {SwapEffect} Swap effect array
|
|
1517
|
+
*
|
|
1518
|
+
* @example
|
|
1519
|
+
* swap('@entity.counter', ['+', '@entity.counter', 1]);
|
|
1520
|
+
* // returns ["swap!", "@entity.counter", ["+", "@entity.counter", 1]]
|
|
1521
|
+
*/
|
|
1522
|
+
declare function swap(binding: string, transform: SExpr): SwapEffect;
|
|
1523
|
+
/**
|
|
1524
|
+
* Options for watch effect
|
|
1525
|
+
*/
|
|
1526
|
+
interface WatchOptions {
|
|
1527
|
+
/** Debounce duration in milliseconds */
|
|
1528
|
+
debounce?: number;
|
|
1529
|
+
/** Allow additional properties */
|
|
1530
|
+
[key: string]: unknown;
|
|
1531
|
+
}
|
|
1532
|
+
/**
|
|
1533
|
+
* Create a watch effect (entity change callback).
|
|
1534
|
+
*
|
|
1535
|
+
* @param {string} binding - Binding to watch for changes
|
|
1536
|
+
* @param {string} event - Event name to emit on change
|
|
1537
|
+
* @param {WatchOptions} [options] - Optional watch configuration
|
|
1538
|
+
* @returns {WatchEffect} Watch effect array
|
|
1539
|
+
*
|
|
1540
|
+
* @example
|
|
1541
|
+
* watch('@entity.health', 'HEALTH_CHANGED');
|
|
1542
|
+
* // returns ["watch", "@entity.health", "HEALTH_CHANGED"]
|
|
1543
|
+
*
|
|
1544
|
+
* watch('@entity.status', 'STATUS_UPDATED', { debounce: 100 });
|
|
1545
|
+
* // returns ["watch", "@entity.status", "STATUS_UPDATED", { debounce: 100 }]
|
|
1546
|
+
*/
|
|
1547
|
+
declare function watch(binding: string, event: string): WatchEffect;
|
|
1548
|
+
declare function watch(binding: string, event: string, options: WatchOptions): WatchEffect;
|
|
1549
|
+
/**
|
|
1550
|
+
* Create an atomic effect (transaction group).
|
|
1551
|
+
*
|
|
1552
|
+
* @param {...SExpr[]} effects - Effects to execute atomically
|
|
1553
|
+
* @returns {AtomicEffect} Atomic effect array
|
|
1554
|
+
*
|
|
1555
|
+
* @example
|
|
1556
|
+
* atomic(['set', '@entity.x', 10], ['set', '@entity.y', 20]);
|
|
1557
|
+
* // returns ["atomic", ["set", "@entity.x", 10], ["set", "@entity.y", 20]]
|
|
1558
|
+
*/
|
|
1559
|
+
declare function atomic(...effects: SExpr[]): AtomicEffect;
|
|
1425
1560
|
|
|
1426
1561
|
/**
|
|
1427
1562
|
* Represents a state in the state machine
|
|
@@ -14421,4 +14556,4 @@ declare function safeParseOrbitalSchema(data: unknown): z.SafeParseReturnType<{
|
|
|
14421
14556
|
type OrbitalSchemaInput = z.input<typeof OrbitalSchemaSchema>;
|
|
14422
14557
|
type OrbitalConfigInput = z.input<typeof OrbitalConfigSchema>;
|
|
14423
14558
|
|
|
14424
|
-
export { type
|
|
14559
|
+
export { type EffectInput as $, AGENT_DOMAIN_CATEGORIES as A, CustomPatternDefinitionSchema as B, CORE_BINDINGS as C, type CustomPatternMap as D, type EntityField as E, type CustomPatternMapInput as F, CustomPatternMapSchema as G, type DerefEffect as H, type DesignPreferences as I, type DesignPreferencesInput as J, DesignPreferencesSchema as K, type DesignTokens as L, type DesignTokensInput as M, DesignTokensSchema as N, type OrbitalDefinition as O, type Page as P, type DomainCategory as Q, DomainCategorySchema as R, type State as S, type TraitEventContract as T, type DomainContext as U, type DomainContextInput as V, DomainContextSchema as W, type DomainVocabulary as X, DomainVocabularySchema as Y, ENTITY_ROLES as Z, type Effect as _, type EntityPersistence as a, OrbitalTraitRefSchema as a$, EffectSchema as a0, type EntityFieldInput as a1, EntityFieldSchema as a2, EntityPersistenceSchema as a3, type EntityRef as a4, EntityRefSchema as a5, EntityRefStringSchema as a6, type EntityRole as a7, EntityRoleSchema as a8, EntitySchema as a9, type GameSubCategory as aA, GameSubCategorySchema as aB, type GameType as aC, GameTypeSchema as aD, type Guard as aE, type GuardInput as aF, GuardSchema as aG, type McpServiceDef as aH, McpServiceDefSchema as aI, type NodeClassification as aJ, NodeClassificationSchema as aK, type OrbitalConfig as aL, type OrbitalConfigInput as aM, OrbitalConfigSchema as aN, OrbitalDefinitionSchema as aO, type OrbitalEntity as aP, type OrbitalEntityInput as aQ, OrbitalEntitySchema as aR, type OrbitalInput as aS, type OrbitalPage as aT, type OrbitalPageInput as aU, OrbitalPageSchema as aV, type OrbitalPageStrictInput as aW, OrbitalPageStrictSchema as aX, type OrbitalSchemaInput as aY, OrbitalSchemaSchema as aZ, type OrbitalTraitRef as a_, type EntitySemanticRole as aa, EntitySemanticRoleSchema as ab, type Event as ac, type EventInput as ad, type EventListener as ae, EventListenerSchema as af, type EventPayloadField as ag, EventPayloadFieldSchema as ah, EventSchema as ai, type EventScope as aj, EventScopeSchema as ak, type EventSemanticRole as al, EventSemanticRoleSchema as am, type EventSource as an, EventSourceSchema as ao, type Expression as ap, type ExpressionInput as aq, ExpressionSchema as ar, type Field as as, type FieldFormat as at, FieldFormatSchema as au, FieldSchema as av, type FieldType as aw, FieldTypeSchema as ax, type Orbital as ay, GAME_TYPES as az, type OrbitalSchema as b, ThemeRefSchema as b$, type OrbitalUnit as b0, OrbitalUnitSchema as b1, OrbitalSchema$1 as b2, type PageRef as b3, type PageRefObject as b4, PageRefObjectSchema as b5, PageRefSchema as b6, PageRefStringSchema as b7, PageSchema as b8, type PageTraitRef as b9, type SemanticAssetRef as bA, type SemanticAssetRefInput as bB, SemanticAssetRefSchema as bC, type ServiceDefinition as bD, ServiceDefinitionSchema as bE, type ServiceRef as bF, ServiceRefSchema as bG, ServiceRefStringSchema as bH, type ServiceType as bI, ServiceTypeSchema as bJ, type SocketEvents as bK, SocketEventsSchema as bL, type SocketServiceDef as bM, SocketServiceDefSchema as bN, type StateInput as bO, type StateMachine as bP, type StateMachineInput as bQ, StateMachineSchema as bR, StateSchema as bS, type StateSemanticRole as bT, StateSemanticRoleSchema as bU, type SuggestedGuard as bV, SuggestedGuardSchema as bW, type SwapEffect as bX, type ThemeDefinition as bY, ThemeDefinitionSchema as bZ, type ThemeRef as b_, PageTraitRefSchema as ba, type ParsedBinding as bb, type PayloadField as bc, PayloadFieldSchema as bd, type PresentationType as be, type RefEffect as bf, type RelatedLink as bg, RelatedLinkSchema as bh, type RelationConfig as bi, RelationConfigSchema as bj, type RenderUIConfig as bk, type RequiredField as bl, RequiredFieldSchema as bm, type ResolvedAsset as bn, type ResolvedAssetInput as bo, ResolvedAssetSchema as bp, type RestAuthConfig as bq, RestAuthConfigSchema as br, type RestServiceDef as bs, RestServiceDefSchema as bt, SERVICE_TYPES as bu, type SExpr as bv, type SExprAtom as bw, SExprAtomSchema as bx, type SExprInput as by, SExprSchema as bz, type Trait as c, isEffect as c$, ThemeRefStringSchema as c0, type ThemeTokens as c1, ThemeTokensSchema as c2, type ThemeVariant as c3, ThemeVariantSchema as c4, type TraitCategory as c5, TraitCategorySchema as c6, type TraitDataEntity as c7, TraitDataEntitySchema as c8, type TraitEntityField as c9, UserPersonaSchema as cA, VISUAL_STYLES as cB, type ViewType as cC, ViewTypeSchema as cD, type VisualStyle as cE, VisualStyleSchema as cF, type WatchEffect as cG, type WatchOptions as cH, atomic as cI, callService as cJ, collectBindings as cK, createAssetKey as cL, deref as cM, deriveCollection as cN, despawn as cO, doEffects as cP, emit as cQ, findService as cR, getArgs as cS, getDefaultAnimationsForRole as cT, getOperator as cU, getServiceNames as cV, getTraitConfig as cW, getTraitName as cX, hasService as cY, isBinding as cZ, isCircuitEvent as c_, TraitEntityFieldSchema as ca, TraitEventContractSchema as cb, type TraitEventListener as cc, TraitEventListenerSchema as cd, type TraitInput as ce, type TraitRef as cf, TraitRefSchema as cg, type TraitReference as ch, type TraitReferenceInput as ci, TraitReferenceSchema as cj, TraitSchema as ck, type TraitTick as cl, TraitTickSchema as cm, type TraitUIBinding as cn, type Transition as co, type TransitionInput as cp, TransitionSchema as cq, type UISlot as cr, UISlotSchema as cs, UI_SLOTS as ct, type UXHints as cu, UXHintsSchema as cv, type UseDeclaration as cw, UseDeclarationSchema as cx, type UserPersona as cy, type UserPersonaInput as cz, type Entity as d, isEntityReference as d0, isImportedTraitRef as d1, isInlineTrait as d2, isMcpService as d3, isOrbitalDefinition as d4, isPageReference as d5, isPageReferenceObject as d6, isPageReferenceString as d7, isRestService as d8, isRuntimeEntity as d9, spawn as dA, swap as dB, validateAssetAnimations as dC, walkSExpr as dD, watch as dE, isSExpr as da, isSExprAtom as db, isSExprCall as dc, isSExprEffect as dd, isServiceReference as de, isSingletonEntity as df, isSocketService as dg, isThemeReference as dh, isValidBinding as di, navigate as dj, normalizeTraitRef as dk, notify as dl, parseAssetKey as dm, parseBinding as dn, parseEntityRef as dp, parseImportedTraitRef as dq, parseOrbitalSchema as dr, parsePageRef as ds, parseServiceRef as dt, persist as du, ref as dv, renderUI as dw, safeParseOrbitalSchema as dx, set as dy, sexpr as dz, ALLOWED_CUSTOM_COMPONENTS as e, type AgentDomainCategory as f, AgentDomainCategorySchema as g, type AllowedCustomComponent as h, type AnimationDef as i, type AnimationDefInput as j, AnimationDefSchema as k, type AssetMap as l, type AssetMapInput as m, AssetMapSchema as n, type AssetMapping as o, type AssetMappingInput as p, AssetMappingSchema as q, type AtomicEffect as r, type CallServiceConfig as s, type ComputedEventContract as t, ComputedEventContractSchema as u, type ComputedEventListener as v, ComputedEventListenerSchema as w, type CoreBinding as x, type CustomPatternDefinition as y, type CustomPatternDefinitionInput as z };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AGENT_DOMAIN_CATEGORIES, e as ALLOWED_CUSTOM_COMPONENTS, f as AgentDomainCategory, g as AgentDomainCategorySchema, h as AllowedCustomComponent, i as AnimationDef, j as AnimationDefInput, k as AnimationDefSchema, b as AppSchema, l as AssetMap, m as AssetMapInput, n as AssetMapSchema, o as AssetMapping, p as AssetMappingInput, q as AssetMappingSchema, C as CORE_BINDINGS,
|
|
1
|
+
import { bv as SExpr } from '../schema-BNBpNxGb.js';
|
|
2
|
+
export { A as AGENT_DOMAIN_CATEGORIES, e as ALLOWED_CUSTOM_COMPONENTS, f as AgentDomainCategory, g as AgentDomainCategorySchema, h as AllowedCustomComponent, i as AnimationDef, j as AnimationDefInput, k as AnimationDefSchema, b as AppSchema, l as AssetMap, m as AssetMapInput, n as AssetMapSchema, o as AssetMapping, p as AssetMappingInput, q as AssetMappingSchema, r as AtomicEffect, C as CORE_BINDINGS, s as CallServiceConfig, t as ComputedEventContract, u as ComputedEventContractSchema, v as ComputedEventListener, w as ComputedEventListenerSchema, x as CoreBinding, y as CustomPatternDefinition, z as CustomPatternDefinitionInput, B as CustomPatternDefinitionSchema, D as CustomPatternMap, F as CustomPatternMapInput, G as CustomPatternMapSchema, H as DerefEffect, I as DesignPreferences, J as DesignPreferencesInput, K as DesignPreferencesSchema, L as DesignTokens, M as DesignTokensInput, N as DesignTokensSchema, Q as DomainCategory, R as DomainCategorySchema, U as DomainContext, V as DomainContextInput, W as DomainContextSchema, X as DomainVocabulary, Y as DomainVocabularySchema, Z as ENTITY_ROLES, _ as Effect, $ as EffectInput, a0 as EffectSchema, d as Entity, E as EntityField, a1 as EntityFieldInput, a2 as EntityFieldSchema, a as EntityPersistence, a3 as EntityPersistenceSchema, a4 as EntityRef, a5 as EntityRefSchema, a6 as EntityRefStringSchema, a7 as EntityRole, a8 as EntityRoleSchema, a9 as EntitySchema, aa as EntitySemanticRole, ab as EntitySemanticRoleSchema, ac as Event, ad as EventInput, ae as EventListener, af as EventListenerSchema, ag as EventPayloadField, ah as EventPayloadFieldSchema, ai as EventSchema, aj as EventScope, ak as EventScopeSchema, al as EventSemanticRole, am as EventSemanticRoleSchema, an as EventSource, ao as EventSourceSchema, ap as Expression, aq as ExpressionInput, ar as ExpressionSchema, as as Field, at as FieldFormat, au as FieldFormatSchema, av as FieldSchema, aw as FieldType, ax as FieldTypeSchema, ay as FullOrbitalUnit, az as GAME_TYPES, aA as GameSubCategory, aB as GameSubCategorySchema, aC as GameType, aD as GameTypeSchema, aE as Guard, aF as GuardInput, aG as GuardSchema, aH as McpServiceDef, aI as McpServiceDefSchema, aJ as NodeClassification, aK as NodeClassificationSchema, ay as Orbital, aL as OrbitalConfig, aM as OrbitalConfigInput, aN as OrbitalConfigSchema, O as OrbitalDefinition, aO as OrbitalDefinitionSchema, aP as OrbitalEntity, aQ as OrbitalEntityInput, aR as OrbitalEntitySchema, aS as OrbitalInput, aT as OrbitalPage, aU as OrbitalPageInput, aV as OrbitalPageSchema, aW as OrbitalPageStrictInput, aX as OrbitalPageStrictSchema, b as OrbitalSchema, aY as OrbitalSchemaInput, aZ as OrbitalSchemaSchema, a_ as OrbitalTraitRef, a$ as OrbitalTraitRefSchema, b0 as OrbitalUnit, b1 as OrbitalUnitSchema, b2 as OrbitalZodSchema, P as Page, b3 as PageRef, b4 as PageRefObject, b5 as PageRefObjectSchema, b6 as PageRefSchema, b7 as PageRefStringSchema, b8 as PageSchema, b9 as PageTraitRef, ba as PageTraitRefSchema, bb as ParsedBinding, bc as PayloadField, bd as PayloadFieldSchema, be as PresentationType, bf as RefEffect, bg as RelatedLink, bh as RelatedLinkSchema, bi as RelationConfig, bj as RelationConfigSchema, bk as RenderUIConfig, bl as RequiredField, bm as RequiredFieldSchema, bn as ResolvedAsset, bo as ResolvedAssetInput, bp as ResolvedAssetSchema, bq as RestAuthConfig, br as RestAuthConfigSchema, bs as RestServiceDef, bt as RestServiceDefSchema, bu as SERVICE_TYPES, bw as SExprAtom, bx as SExprAtomSchema, by as SExprInput, bz as SExprSchema, bA as SemanticAssetRef, bB as SemanticAssetRefInput, bC as SemanticAssetRefSchema, bD as ServiceDefinition, bE as ServiceDefinitionSchema, bF as ServiceRef, bG as ServiceRefSchema, bH as ServiceRefStringSchema, bI as ServiceType, bJ as ServiceTypeSchema, bK as SocketEvents, bL as SocketEventsSchema, bM as SocketServiceDef, bN as SocketServiceDefSchema, S as State, bO as StateInput, bP as StateMachine, bQ as StateMachineInput, bR as StateMachineSchema, bS as StateSchema, bT as StateSemanticRole, bU as StateSemanticRoleSchema, bV as SuggestedGuard, bW as SuggestedGuardSchema, bX as SwapEffect, bY as ThemeDefinition, bZ as ThemeDefinitionSchema, b_ as ThemeRef, b$ as ThemeRefSchema, c0 as ThemeRefStringSchema, c1 as ThemeTokens, c2 as ThemeTokensSchema, c3 as ThemeVariant, c4 as ThemeVariantSchema, c as Trait, c5 as TraitCategory, c6 as TraitCategorySchema, c7 as TraitDataEntity, c8 as TraitDataEntitySchema, c9 as TraitEntityField, ca as TraitEntityFieldSchema, T as TraitEventContract, cb as TraitEventContractSchema, cc as TraitEventListener, cd as TraitEventListenerSchema, ce as TraitInput, cf as TraitRef, cg as TraitRefSchema, ch as TraitReference, ci as TraitReferenceInput, cj as TraitReferenceSchema, ck as TraitSchema, cl as TraitTick, cm as TraitTickSchema, cn as TraitUIBinding, co as Transition, cp as TransitionInput, cq as TransitionSchema, cr as UISlot, cs as UISlotSchema, ct as UI_SLOTS, cu as UXHints, cv as UXHintsSchema, cw as UseDeclaration, cx as UseDeclarationSchema, cy as UserPersona, cz as UserPersonaInput, cA as UserPersonaSchema, cB as VISUAL_STYLES, cC as ViewType, cD as ViewTypeSchema, cE as VisualStyle, cF as VisualStyleSchema, cG as WatchEffect, cH as WatchOptions, cI as atomic, cJ as callService, cK as collectBindings, cL as createAssetKey, cM as deref, cN as deriveCollection, cO as despawn, cP as doEffects, cQ as emit, cR as findService, cS as getArgs, cT as getDefaultAnimationsForRole, cU as getOperator, cV as getServiceNames, cW as getTraitConfig, cX as getTraitName, cY as hasService, cZ as isBinding, c_ as isCircuitEvent, c$ as isEffect, d0 as isEntityReference, d1 as isImportedTraitRef, d2 as isInlineTrait, d3 as isMcpService, d4 as isOrbitalDefinition, d5 as isPageReference, d6 as isPageReferenceObject, d7 as isPageReferenceString, d8 as isRestService, d9 as isRuntimeEntity, da as isSExpr, db as isSExprAtom, dc as isSExprCall, dd as isSExprEffect, de as isServiceReference, df as isSingletonEntity, dg as isSocketService, dh as isThemeReference, di as isValidBinding, dj as navigate, dk as normalizeTraitRef, dl as notify, dm as parseAssetKey, dn as parseBinding, dp as parseEntityRef, dq as parseImportedTraitRef, dr as parseOrbitalSchema, ds as parsePageRef, dt as parseServiceRef, du as persist, dv as ref, dw as renderUI, dx as safeParseOrbitalSchema, dy as set, dz as sexpr, dA as spawn, dB as swap, dC as validateAssetAnimations, dD as walkSExpr, dE as watch } from '../schema-BNBpNxGb.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
export { CATEGORIES, CategoryMeta, OPERATORS, OPERATORS_SCHEMA, OPERATOR_NAMES, OperatorCategory, OperatorMeta, OperatorStats, OperatorsSchema, TargetPlatform, getOperatorMeta, getOperatorStats, getOperatorsByCategory, getOperatorsForTarget, isEffectOperator, isGuardOperator, isKnownOperator, validateOperatorArity } from '@almadar/operators';
|
|
5
5
|
export { PATTERN_TYPES, PatternConfig, PatternType, isValidPatternType } from '@almadar/patterns';
|
package/dist/types/index.js
CHANGED
|
@@ -301,6 +301,21 @@ function doEffects(...effects) {
|
|
|
301
301
|
function notify(channel, message, recipient) {
|
|
302
302
|
return recipient ? ["notify", channel, message, recipient] : ["notify", channel, message];
|
|
303
303
|
}
|
|
304
|
+
function ref(binding, selector) {
|
|
305
|
+
return selector ? ["ref", binding, selector] : ["ref", binding];
|
|
306
|
+
}
|
|
307
|
+
function deref(binding, selector) {
|
|
308
|
+
return selector ? ["deref", binding, selector] : ["deref", binding];
|
|
309
|
+
}
|
|
310
|
+
function swap(binding, transform) {
|
|
311
|
+
return ["swap!", binding, transform];
|
|
312
|
+
}
|
|
313
|
+
function watch(binding, event, options) {
|
|
314
|
+
return options ? ["watch", binding, event, options] : ["watch", binding, event];
|
|
315
|
+
}
|
|
316
|
+
function atomic(...effects) {
|
|
317
|
+
return ["atomic", ...effects];
|
|
318
|
+
}
|
|
304
319
|
var SExprAtomSchema = z.union([
|
|
305
320
|
z.string(),
|
|
306
321
|
z.number(),
|
|
@@ -822,8 +837,8 @@ var ServiceRefSchema = z.union([
|
|
|
822
837
|
ServiceDefinitionSchema,
|
|
823
838
|
ServiceRefStringSchema
|
|
824
839
|
]);
|
|
825
|
-
function parseServiceRef(
|
|
826
|
-
const match =
|
|
840
|
+
function parseServiceRef(ref2) {
|
|
841
|
+
const match = ref2.match(
|
|
827
842
|
/^([A-Z][a-zA-Z0-9]*)\.services\.([a-zA-Z][a-zA-Z0-9]*)$/
|
|
828
843
|
);
|
|
829
844
|
if (!match) return null;
|
|
@@ -890,21 +905,21 @@ z.string().regex(
|
|
|
890
905
|
/^([A-Z][a-zA-Z0-9]*\.traits\.)?[A-Z][a-zA-Z0-9]*$/,
|
|
891
906
|
'Trait reference must be "TraitName" or "Alias.traits.TraitName"'
|
|
892
907
|
);
|
|
893
|
-
function isImportedTraitRef(
|
|
894
|
-
return /^[A-Z][a-zA-Z0-9]*\.traits\.[A-Z][a-zA-Z0-9]*$/.test(
|
|
908
|
+
function isImportedTraitRef(ref2) {
|
|
909
|
+
return /^[A-Z][a-zA-Z0-9]*\.traits\.[A-Z][a-zA-Z0-9]*$/.test(ref2);
|
|
895
910
|
}
|
|
896
|
-
function parseImportedTraitRef(
|
|
897
|
-
const match =
|
|
911
|
+
function parseImportedTraitRef(ref2) {
|
|
912
|
+
const match = ref2.match(/^([A-Z][a-zA-Z0-9]*)\.traits\.([A-Z][a-zA-Z0-9]*)$/);
|
|
898
913
|
if (!match) return null;
|
|
899
914
|
return { alias: match[1], traitName: match[2] };
|
|
900
915
|
}
|
|
901
|
-
function parseEntityRef(
|
|
902
|
-
const match =
|
|
916
|
+
function parseEntityRef(ref2) {
|
|
917
|
+
const match = ref2.match(/^([A-Z][a-zA-Z0-9]*)\.entity$/);
|
|
903
918
|
if (!match) return null;
|
|
904
919
|
return { alias: match[1] };
|
|
905
920
|
}
|
|
906
|
-
function parsePageRef(
|
|
907
|
-
const match =
|
|
921
|
+
function parsePageRef(ref2) {
|
|
922
|
+
const match = ref2.match(/^([A-Z][a-zA-Z0-9]*)\.pages\.([A-Z][a-zA-Z0-9]*)$/);
|
|
908
923
|
if (!match) return null;
|
|
909
924
|
return { alias: match[1], pageName: match[2] };
|
|
910
925
|
}
|
|
@@ -1212,6 +1227,6 @@ function isResolvedIR(ir) {
|
|
|
1212
1227
|
return typeof r.appName === "string" && r.traits instanceof Map && r.pages instanceof Map;
|
|
1213
1228
|
}
|
|
1214
1229
|
|
|
1215
|
-
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, ENTITY_ROLES, EffectSchema, EntityFieldSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntitySchema, EntitySemanticRoleSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpressionSchema, FieldFormatSchema, FieldSchema, FieldTypeSchema, GAME_TYPES, GameSubCategorySchema, GameTypeSchema, GuardSchema, InteractionModelSchema, 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, TraitCategorySchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TransitionSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, callService, collectBindings, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, deriveCollection, despawn, doEffects, emit, findService, getAllOperators, getAllPatternTypes, getArgs, getBindingExamples, getDefaultAnimationsForRole, getInteractionModelForDomain, getOperator, getServiceNames, getTraitConfig, getTraitName, hasService, inferTsType, isBinding, isCircuitEvent, isEffect, isEntityReference, isImportedTraitRef, isInlineTrait, isMcpService, isOrbitalDefinition, isPageReference, isPageReferenceObject, isPageReferenceString, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isServiceReference, isSingletonEntity, isSocketService, isThemeReference, isValidBinding, navigate, normalizeTraitRef, notify, parseAssetKey, parseBinding, parseEntityRef, parseImportedTraitRef, parseOrbitalSchema, parsePageRef, parseServiceRef, persist, renderUI, safeParseOrbitalSchema, set, sexpr, spawn, validateAssetAnimations, validateBindingInContext, walkSExpr };
|
|
1230
|
+
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, ENTITY_ROLES, EffectSchema, EntityFieldSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntitySchema, EntitySemanticRoleSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpressionSchema, FieldFormatSchema, FieldSchema, FieldTypeSchema, GAME_TYPES, GameSubCategorySchema, GameTypeSchema, GuardSchema, InteractionModelSchema, 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, TraitCategorySchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TransitionSchema, 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, getAllOperators, getAllPatternTypes, getArgs, getBindingExamples, getDefaultAnimationsForRole, getInteractionModelForDomain, getOperator, getServiceNames, getTraitConfig, getTraitName, hasService, inferTsType, isBinding, isCircuitEvent, isEffect, isEntityReference, isImportedTraitRef, isInlineTrait, isMcpService, isOrbitalDefinition, isPageReference, isPageReferenceObject, isPageReferenceString, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isServiceReference, isSingletonEntity, isSocketService, isThemeReference, isValidBinding, navigate, normalizeTraitRef, notify, parseAssetKey, parseBinding, parseEntityRef, parseImportedTraitRef, parseOrbitalSchema, parsePageRef, parseServiceRef, persist, ref, renderUI, safeParseOrbitalSchema, set, sexpr, spawn, swap, validateAssetAnimations, validateBindingInContext, walkSExpr, watch };
|
|
1216
1231
|
//# sourceMappingURL=index.js.map
|
|
1217
1232
|
//# sourceMappingURL=index.js.map
|