@almadar/core 1.0.17 → 1.0.18
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/domain-language/index.d.ts +12 -2
- package/dist/domain-language/index.js +156 -2
- package/dist/domain-language/index.js.map +1 -1
- package/dist/index.d.ts +40 -4
- package/dist/index.js +294 -2
- package/dist/index.js.map +1 -1
- package/dist/{schema-DYj-zJWb.d.ts → schema-N46ASk3M.d.ts} +2 -2
- package/dist/types/index.d.ts +19 -2
- package/dist/types/index.js +16 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1040,7 +1040,7 @@ interface CallServiceConfig {
|
|
|
1040
1040
|
* Render UI effect - displays a pattern in a UI slot.
|
|
1041
1041
|
* @example ['render-ui', 'main', { patternType: 'entity-table', columns: ['name'] }]
|
|
1042
1042
|
*/
|
|
1043
|
-
type RenderUIEffect = ['render-ui', UISlot, AnyPatternConfig] | ['render-ui', UISlot, AnyPatternConfig, Record<string, unknown>];
|
|
1043
|
+
type RenderUIEffect = ['render-ui', UISlot, AnyPatternConfig] | ['render-ui', UISlot, AnyPatternConfig, Record<string, unknown>] | ['render-ui', UISlot, null];
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Navigate effect - navigates to a path.
|
|
1046
1046
|
* @example ['navigate', '/tasks'] or ['navigate', '/tasks/:id', { id: '123' }]
|
|
@@ -14022,4 +14022,4 @@ declare function safeParseOrbitalSchema(data: unknown): z.SafeParseReturnType<{
|
|
|
14022
14022
|
type OrbitalSchemaInput = z.input<typeof OrbitalSchemaSchema>;
|
|
14023
14023
|
type OrbitalConfigInput = z.input<typeof OrbitalConfigSchema>;
|
|
14024
14024
|
|
|
14025
|
-
export {
|
|
14025
|
+
export { type EntityRef as $, AGENT_DOMAIN_CATEGORIES as A, type DesignPreferencesInput as B, CORE_BINDINGS as C, type DesignPreferences as D, DesignPreferencesSchema as E, type DesignTokens as F, type DesignTokensInput as G, DesignTokensSchema as H, type DomainCategory as I, DomainCategorySchema as J, type DomainContext as K, type DomainContextInput as L, DomainContextSchema as M, type DomainVocabulary as N, type OrbitalSchema as O, DomainVocabularySchema as P, ENTITY_ROLES as Q, type Effect as R, type State as S, type EffectInput as T, EffectSchema as U, type Entity as V, type EntityField as W, type EntityFieldInput as X, EntityFieldSchema as Y, type EntityPersistence as Z, EntityPersistenceSchema as _, type OrbitalDefinition as a, type PageRef as a$, EntityRefSchema as a0, EntityRefStringSchema as a1, type EntityRole as a2, EntityRoleSchema as a3, EntitySchema as a4, type EntitySemanticRole as a5, EntitySemanticRoleSchema as a6, type Event as a7, type EventInput as a8, type EventListener as a9, type GuardInput as aA, GuardSchema as aB, type McpServiceDef as aC, McpServiceDefSchema as aD, type NodeClassification as aE, NodeClassificationSchema as aF, type OrbitalConfig as aG, type OrbitalConfigInput as aH, OrbitalConfigSchema as aI, OrbitalDefinitionSchema as aJ, type OrbitalEntity as aK, type OrbitalEntityInput as aL, OrbitalEntitySchema as aM, type OrbitalInput as aN, type OrbitalPage as aO, type OrbitalPageInput as aP, OrbitalPageSchema as aQ, type OrbitalPageStrictInput as aR, OrbitalPageStrictSchema as aS, type OrbitalSchemaInput as aT, OrbitalSchemaSchema as aU, type OrbitalTraitRef as aV, OrbitalTraitRefSchema as aW, type OrbitalUnit as aX, OrbitalUnitSchema as aY, OrbitalSchema$1 as aZ, type Page as a_, EventListenerSchema as aa, type EventPayloadField as ab, EventPayloadFieldSchema as ac, EventSchema as ad, type EventScope as ae, EventScopeSchema as af, type EventSemanticRole as ag, EventSemanticRoleSchema as ah, type EventSource as ai, EventSourceSchema as aj, type Expression as ak, type ExpressionInput as al, ExpressionSchema as am, type Field as an, type FieldFormat as ao, FieldFormatSchema as ap, FieldSchema as aq, type FieldType as ar, FieldTypeSchema as as, type Orbital as at, GAME_TYPES as au, type GameSubCategory as av, GameSubCategorySchema as aw, type GameType as ax, GameTypeSchema as ay, type Guard as az, ALLOWED_CUSTOM_COMPONENTS as b, type Trait as b$, type PageRefObject as b0, PageRefObjectSchema as b1, PageRefSchema as b2, PageRefStringSchema as b3, PageSchema as b4, type PageTraitRef as b5, PageTraitRefSchema as b6, type ParsedBinding as b7, type PayloadField as b8, PayloadFieldSchema as b9, type ServiceRef as bA, ServiceRefSchema as bB, ServiceRefStringSchema as bC, type ServiceType as bD, ServiceTypeSchema as bE, type SocketEvents as bF, SocketEventsSchema as bG, type SocketServiceDef as bH, SocketServiceDefSchema as bI, type StateInput as bJ, type StateMachine as bK, type StateMachineInput as bL, StateMachineSchema as bM, StateSchema as bN, type StateSemanticRole as bO, StateSemanticRoleSchema as bP, type SuggestedGuard as bQ, SuggestedGuardSchema as bR, type ThemeDefinition as bS, ThemeDefinitionSchema as bT, type ThemeRef as bU, ThemeRefSchema as bV, ThemeRefStringSchema as bW, type ThemeTokens as bX, ThemeTokensSchema as bY, type ThemeVariant as bZ, ThemeVariantSchema as b_, type PresentationType as ba, type RelatedLink as bb, RelatedLinkSchema as bc, type RelationConfig as bd, RelationConfigSchema as be, type RenderUIConfig as bf, type RequiredField as bg, RequiredFieldSchema as bh, type ResolvedAsset as bi, type ResolvedAssetInput as bj, ResolvedAssetSchema as bk, type RestAuthConfig as bl, RestAuthConfigSchema as bm, type RestServiceDef as bn, RestServiceDefSchema as bo, SERVICE_TYPES as bp, type SExpr as bq, type SExprAtom as br, SExprAtomSchema as bs, type SExprInput as bt, SExprSchema as bu, type SemanticAssetRef as bv, type SemanticAssetRefInput as bw, SemanticAssetRefSchema as bx, type ServiceDefinition as by, ServiceDefinitionSchema as bz, type AgentDomainCategory as c, isPageReferenceString as c$, type TraitCategory as c0, TraitCategorySchema as c1, type TraitDataEntity as c2, TraitDataEntitySchema as c3, type TraitEntityField as c4, TraitEntityFieldSchema as c5, type TraitEventContract as c6, TraitEventContractSchema as c7, type TraitEventListener as c8, TraitEventListenerSchema as c9, type VisualStyle as cA, VisualStyleSchema as cB, callService as cC, collectBindings as cD, createAssetKey as cE, deriveCollection as cF, despawn as cG, doEffects as cH, emit as cI, findService as cJ, getArgs as cK, getDefaultAnimationsForRole as cL, getOperator as cM, getServiceNames as cN, getTraitConfig as cO, getTraitName as cP, hasService as cQ, isBinding as cR, isCircuitEvent as cS, isEffect as cT, isEntityReference as cU, isImportedTraitRef as cV, isInlineTrait as cW, isMcpService as cX, isOrbitalDefinition as cY, isPageReference as cZ, isPageReferenceObject as c_, type TraitInput as ca, type TraitRef as cb, TraitRefSchema as cc, type TraitReference as cd, type TraitReferenceInput as ce, TraitReferenceSchema as cf, TraitSchema as cg, type TraitTick as ch, TraitTickSchema as ci, type TraitUIBinding as cj, type Transition as ck, type TransitionInput as cl, TransitionSchema as cm, type UISlot as cn, UISlotSchema as co, UI_SLOTS as cp, type UXHints as cq, UXHintsSchema as cr, type UseDeclaration as cs, UseDeclarationSchema as ct, type UserPersona as cu, type UserPersonaInput as cv, UserPersonaSchema as cw, VISUAL_STYLES as cx, type ViewType as cy, ViewTypeSchema as cz, AgentDomainCategorySchema as d, isRestService as d0, isRuntimeEntity as d1, isSExpr as d2, isSExprAtom as d3, isSExprCall as d4, isSExprEffect as d5, isServiceReference as d6, isSingletonEntity as d7, isSocketService as d8, isThemeReference as d9, isValidBinding as da, navigate as db, normalizeTraitRef as dc, notify as dd, parseAssetKey as de, parseBinding as df, parseEntityRef as dg, parseImportedTraitRef as dh, parseOrbitalSchema as di, parsePageRef as dj, parseServiceRef as dk, persist as dl, renderUI as dm, safeParseOrbitalSchema as dn, set as dp, sexpr as dq, spawn as dr, validateAssetAnimations as ds, walkSExpr as dt, type AllowedCustomComponent as e, type AnimationDef as f, type AnimationDefInput as g, AnimationDefSchema as h, type AssetMap as i, type AssetMapInput as j, AssetMapSchema as k, type AssetMapping as l, type AssetMappingInput as m, AssetMappingSchema as n, type CallServiceConfig as o, type ComputedEventContract as p, ComputedEventContractSchema as q, type ComputedEventListener as r, ComputedEventListenerSchema as s, type CoreBinding as t, type CustomPatternDefinition as u, type CustomPatternDefinitionInput as v, CustomPatternDefinitionSchema as w, type CustomPatternMap as x, type CustomPatternMapInput as y, CustomPatternMapSchema as z };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AGENT_DOMAIN_CATEGORIES,
|
|
1
|
+
import { bq as SExpr } from '../schema-N46ASk3M.js';
|
|
2
|
+
export { A as AGENT_DOMAIN_CATEGORIES, b as ALLOWED_CUSTOM_COMPONENTS, c as AgentDomainCategory, d as AgentDomainCategorySchema, e as AllowedCustomComponent, f as AnimationDef, g as AnimationDefInput, h as AnimationDefSchema, O as AppSchema, i as AssetMap, j as AssetMapInput, k as AssetMapSchema, l as AssetMapping, m as AssetMappingInput, n as AssetMappingSchema, C as CORE_BINDINGS, o as CallServiceConfig, p as ComputedEventContract, q as ComputedEventContractSchema, r as ComputedEventListener, s as ComputedEventListenerSchema, t as CoreBinding, u as CustomPatternDefinition, v as CustomPatternDefinitionInput, w as CustomPatternDefinitionSchema, x as CustomPatternMap, y as CustomPatternMapInput, z as CustomPatternMapSchema, D as DesignPreferences, B as DesignPreferencesInput, E as DesignPreferencesSchema, F as DesignTokens, G as DesignTokensInput, H as DesignTokensSchema, I as DomainCategory, J as DomainCategorySchema, K as DomainContext, L as DomainContextInput, M as DomainContextSchema, N as DomainVocabulary, P as DomainVocabularySchema, Q as ENTITY_ROLES, R as Effect, T as EffectInput, U as EffectSchema, V as Entity, W as EntityField, X as EntityFieldInput, Y as EntityFieldSchema, Z as EntityPersistence, _ as EntityPersistenceSchema, $ as EntityRef, a0 as EntityRefSchema, a1 as EntityRefStringSchema, a2 as EntityRole, a3 as EntityRoleSchema, a4 as EntitySchema, a5 as EntitySemanticRole, a6 as EntitySemanticRoleSchema, a7 as Event, a8 as EventInput, a9 as EventListener, aa as EventListenerSchema, ab as EventPayloadField, ac as EventPayloadFieldSchema, ad as EventSchema, ae as EventScope, af as EventScopeSchema, ag as EventSemanticRole, ah as EventSemanticRoleSchema, ai as EventSource, aj as EventSourceSchema, ak as Expression, al as ExpressionInput, am as ExpressionSchema, an as Field, ao as FieldFormat, ap as FieldFormatSchema, aq as FieldSchema, ar as FieldType, as as FieldTypeSchema, at as FullOrbitalUnit, au as GAME_TYPES, av as GameSubCategory, aw as GameSubCategorySchema, ax as GameType, ay as GameTypeSchema, az as Guard, aA as GuardInput, aB as GuardSchema, aC as McpServiceDef, aD as McpServiceDefSchema, aE as NodeClassification, aF as NodeClassificationSchema, at as Orbital, aG as OrbitalConfig, aH as OrbitalConfigInput, aI as OrbitalConfigSchema, a as OrbitalDefinition, aJ as OrbitalDefinitionSchema, aK as OrbitalEntity, aL as OrbitalEntityInput, aM as OrbitalEntitySchema, aN as OrbitalInput, aO as OrbitalPage, aP as OrbitalPageInput, aQ as OrbitalPageSchema, aR as OrbitalPageStrictInput, aS as OrbitalPageStrictSchema, O as OrbitalSchema, aT as OrbitalSchemaInput, aU as OrbitalSchemaSchema, aV as OrbitalTraitRef, aW as OrbitalTraitRefSchema, aX as OrbitalUnit, aY as OrbitalUnitSchema, aZ as OrbitalZodSchema, a_ as Page, a$ as PageRef, b0 as PageRefObject, b1 as PageRefObjectSchema, b2 as PageRefSchema, b3 as PageRefStringSchema, b4 as PageSchema, b5 as PageTraitRef, b6 as PageTraitRefSchema, b7 as ParsedBinding, b8 as PayloadField, b9 as PayloadFieldSchema, ba as PresentationType, bb as RelatedLink, bc as RelatedLinkSchema, bd as RelationConfig, be as RelationConfigSchema, bf as RenderUIConfig, bg as RequiredField, bh as RequiredFieldSchema, bi as ResolvedAsset, bj as ResolvedAssetInput, bk as ResolvedAssetSchema, bl as RestAuthConfig, bm as RestAuthConfigSchema, bn as RestServiceDef, bo as RestServiceDefSchema, bp as SERVICE_TYPES, br as SExprAtom, bs as SExprAtomSchema, bt as SExprInput, bu as SExprSchema, bv as SemanticAssetRef, bw as SemanticAssetRefInput, bx as SemanticAssetRefSchema, by as ServiceDefinition, bz as ServiceDefinitionSchema, bA as ServiceRef, bB as ServiceRefSchema, bC as ServiceRefStringSchema, bD as ServiceType, bE as ServiceTypeSchema, bF as SocketEvents, bG as SocketEventsSchema, bH as SocketServiceDef, bI as SocketServiceDefSchema, S as State, bJ as StateInput, bK as StateMachine, bL as StateMachineInput, bM as StateMachineSchema, bN as StateSchema, bO as StateSemanticRole, bP as StateSemanticRoleSchema, bQ as SuggestedGuard, bR as SuggestedGuardSchema, bS as ThemeDefinition, bT as ThemeDefinitionSchema, bU as ThemeRef, bV as ThemeRefSchema, bW as ThemeRefStringSchema, bX as ThemeTokens, bY as ThemeTokensSchema, bZ as ThemeVariant, b_ as ThemeVariantSchema, b$ as Trait, c0 as TraitCategory, c1 as TraitCategorySchema, c2 as TraitDataEntity, c3 as TraitDataEntitySchema, c4 as TraitEntityField, c5 as TraitEntityFieldSchema, c6 as TraitEventContract, c7 as TraitEventContractSchema, c8 as TraitEventListener, c9 as TraitEventListenerSchema, ca as TraitInput, cb as TraitRef, cc as TraitRefSchema, cd as TraitReference, ce as TraitReferenceInput, cf as TraitReferenceSchema, cg as TraitSchema, ch as TraitTick, ci as TraitTickSchema, cj as TraitUIBinding, ck as Transition, cl as TransitionInput, cm as TransitionSchema, cn as UISlot, co as UISlotSchema, cp as UI_SLOTS, cq as UXHints, cr as UXHintsSchema, cs as UseDeclaration, ct as UseDeclarationSchema, cu as UserPersona, cv as UserPersonaInput, cw as UserPersonaSchema, cx as VISUAL_STYLES, cy as ViewType, cz as ViewTypeSchema, cA as VisualStyle, cB as VisualStyleSchema, cC as callService, cD as collectBindings, cE as createAssetKey, cF as deriveCollection, cG as despawn, cH as doEffects, cI as emit, cJ as findService, cK as getArgs, cL as getDefaultAnimationsForRole, cM as getOperator, cN as getServiceNames, cO as getTraitConfig, cP as getTraitName, cQ as hasService, cR as isBinding, cS as isCircuitEvent, cT as isEffect, cU as isEntityReference, cV as isImportedTraitRef, cW as isInlineTrait, cX as isMcpService, cY as isOrbitalDefinition, cZ as isPageReference, c_ as isPageReferenceObject, c$ as isPageReferenceString, d0 as isRestService, d1 as isRuntimeEntity, d2 as isSExpr, d3 as isSExprAtom, d4 as isSExprCall, d5 as isSExprEffect, d6 as isServiceReference, d7 as isSingletonEntity, d8 as isSocketService, d9 as isThemeReference, da as isValidBinding, db as navigate, dc as normalizeTraitRef, dd as notify, de as parseAssetKey, df as parseBinding, dg as parseEntityRef, dh as parseImportedTraitRef, di as parseOrbitalSchema, dj as parsePageRef, dk as parseServiceRef, dl as persist, dm as renderUI, dn as safeParseOrbitalSchema, dp as set, dq as sexpr, dr as spawn, ds as validateAssetAnimations, dt as walkSExpr } from '../schema-N46ASk3M.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';
|
|
@@ -41,6 +41,8 @@ type OperatorName = string;
|
|
|
41
41
|
declare const BindingSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
42
42
|
/**
|
|
43
43
|
* Binding documentation for LLM prompts and validation messages.
|
|
44
|
+
*
|
|
45
|
+
* IMPORTANT: Keep synchronized with CORE_BINDINGS in expression.ts
|
|
44
46
|
*/
|
|
45
47
|
declare const BINDING_DOCS: {
|
|
46
48
|
readonly entity: {
|
|
@@ -63,6 +65,21 @@ declare const BINDING_DOCS: {
|
|
|
63
65
|
readonly examples: readonly ["@now"];
|
|
64
66
|
readonly requiresPath: false;
|
|
65
67
|
};
|
|
68
|
+
readonly config: {
|
|
69
|
+
readonly description: "Trait configuration values";
|
|
70
|
+
readonly examples: readonly ["@config.apiEndpoint", "@config.theme"];
|
|
71
|
+
readonly requiresPath: true;
|
|
72
|
+
};
|
|
73
|
+
readonly computed: {
|
|
74
|
+
readonly description: "Computed/calculated values";
|
|
75
|
+
readonly examples: readonly ["@computed.total", "@computed.isValid"];
|
|
76
|
+
readonly requiresPath: true;
|
|
77
|
+
};
|
|
78
|
+
readonly trait: {
|
|
79
|
+
readonly description: "Trait context data";
|
|
80
|
+
readonly examples: readonly ["@trait.name", "@trait.category"];
|
|
81
|
+
readonly requiresPath: true;
|
|
82
|
+
};
|
|
66
83
|
};
|
|
67
84
|
/**
|
|
68
85
|
* Validation rules for bindings in different contexts.
|
package/dist/types/index.js
CHANGED
|
@@ -996,7 +996,7 @@ var BindingSchema = z.string().refine(
|
|
|
996
996
|
if (!val.startsWith("@")) return false;
|
|
997
997
|
const parts = val.slice(1).split(".");
|
|
998
998
|
if (parts.length === 0 || parts[0] === "") return false;
|
|
999
|
-
return parts.every((part) => /^[
|
|
999
|
+
return parts.every((part) => /^[\p{L}_][\p{L}0-9_]*$/u.test(part));
|
|
1000
1000
|
},
|
|
1001
1001
|
{ message: "Invalid binding format. Must be @name or @name.path.to.field" }
|
|
1002
1002
|
);
|
|
@@ -1020,6 +1020,21 @@ var BINDING_DOCS = {
|
|
|
1020
1020
|
description: "Current timestamp in milliseconds",
|
|
1021
1021
|
examples: ["@now"],
|
|
1022
1022
|
requiresPath: false
|
|
1023
|
+
},
|
|
1024
|
+
config: {
|
|
1025
|
+
description: "Trait configuration values",
|
|
1026
|
+
examples: ["@config.apiEndpoint", "@config.theme"],
|
|
1027
|
+
requiresPath: true
|
|
1028
|
+
},
|
|
1029
|
+
computed: {
|
|
1030
|
+
description: "Computed/calculated values",
|
|
1031
|
+
examples: ["@computed.total", "@computed.isValid"],
|
|
1032
|
+
requiresPath: true
|
|
1033
|
+
},
|
|
1034
|
+
trait: {
|
|
1035
|
+
description: "Trait context data",
|
|
1036
|
+
examples: ["@trait.name", "@trait.category"],
|
|
1037
|
+
requiresPath: true
|
|
1023
1038
|
}
|
|
1024
1039
|
};
|
|
1025
1040
|
var BINDING_CONTEXT_RULES = {
|