@almadar/core 10.40.0 → 10.42.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.
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
2
  import { S as SExpr, a as EventPayload, E as Expression } from './expression-DpAj1RzP.js';
3
- import { F as FieldValue, b as EntityRow } from './entity-DfD-iXkn.js';
4
3
 
5
4
  /**
6
5
  * Service Types for Orbital Schema
@@ -746,13 +745,1582 @@ type ServiceParams = {
746
745
  [key: string]: ServiceParamsValue;
747
746
  };
748
747
 
748
+ /**
749
+ * Identity model (Almadar Rabit V4, Phase 1 — types only).
750
+ *
751
+ * Branded, prefix-tagged node ids + a workspace-scoped name ledger. Ids are
752
+ * the durable edge keys of the identity-keyed schema graph; the ledger is the
753
+ * sole name↔id map (names are display labels, one row per rename). This module
754
+ * is pure: no I/O, no side effects. Minting is the only impurity (clock +
755
+ * crypto randomness for the ULID suffix).
756
+ *
757
+ * @packageDocumentation
758
+ */
759
+
760
+ type Branded<K extends string> = string & {
761
+ readonly __idBrand: K;
762
+ };
763
+ type OrbitalId = Branded<'OrbitalId'>;
764
+ type EntityId = Branded<'EntityId'>;
765
+ type TraitId = Branded<'TraitId'>;
766
+ type EventId = Branded<'EventId'>;
767
+ type PageId = Branded<'PageId'>;
768
+ type ServiceId = Branded<'ServiceId'>;
769
+ type ThemeId = Branded<'ThemeId'>;
770
+ type PaletteEntryId = Branded<'PaletteEntryId'>;
771
+ /** Node kind ↔ id-prefix table. The single source of truth for every prefix. */
772
+ declare const ID_PREFIXES: {
773
+ readonly orbital: "orb_";
774
+ readonly entity: "ent_";
775
+ readonly trait: "trt_";
776
+ readonly event: "evt_";
777
+ readonly page: "pag_";
778
+ readonly service: "svc_";
779
+ readonly theme: "thm_";
780
+ readonly palette: "pal_";
781
+ };
782
+ type IdKind = keyof typeof ID_PREFIXES;
783
+ /** Compile-time map from kind to its branded id type. */
784
+ interface IdForKind {
785
+ orbital: OrbitalId;
786
+ entity: EntityId;
787
+ trait: TraitId;
788
+ event: EventId;
789
+ page: PageId;
790
+ service: ServiceId;
791
+ theme: ThemeId;
792
+ palette: PaletteEntryId;
793
+ }
794
+ declare const isOrbitalId: (value: string) => value is OrbitalId;
795
+ declare const asOrbitalId: (value: string) => OrbitalId;
796
+ declare const isEntityId: (value: string) => value is EntityId;
797
+ declare const asEntityId: (value: string) => EntityId;
798
+ declare const isTraitId: (value: string) => value is TraitId;
799
+ declare const asTraitId: (value: string) => TraitId;
800
+ declare const isEventId: (value: string) => value is EventId;
801
+ declare const asEventId: (value: string) => EventId;
802
+ declare const isPageId: (value: string) => value is PageId;
803
+ declare const asPageId: (value: string) => PageId;
804
+ declare const isServiceId: (value: string) => value is ServiceId;
805
+ declare const asServiceId: (value: string) => ServiceId;
806
+ declare const isThemeId: (value: string) => value is ThemeId;
807
+ declare const asThemeId: (value: string) => ThemeId;
808
+ declare const isPaletteEntryId: (value: string) => value is PaletteEntryId;
809
+ declare const asPaletteEntryId: (value: string) => PaletteEntryId;
810
+ /**
811
+ * The id-prefix for a node kind (`'entity' → 'ent_'`). The JS mirror of the
812
+ * Rust `IdKind::prefix`. Single source of truth is {@link ID_PREFIXES}.
813
+ */
814
+ declare function idPrefix(kind: IdKind): string;
815
+ /**
816
+ * The node kind an id's prefix denotes, or `null` for an unrecognized /
817
+ * bare-prefix string. The JS mirror of the Rust `id_kind_of`. Prefixes are
818
+ * mutually non-overlapping, so match order is irrelevant.
819
+ */
820
+ declare function idKindOf(id: string): IdKind | null;
821
+ /** Mint a fresh, opaque, kind-tagged id: `<prefix><ULID>`. */
822
+ declare function mintId<K extends IdKind>(kind: K): IdForKind[K];
823
+ /** Ledger row kind. `palette` entries are manifest ids, not name-ledger rows. */
824
+ type LedgerKind = 'orbital' | 'entity' | 'trait' | 'event' | 'page' | 'service' | 'theme';
825
+ /**
826
+ * One ledger row: the workspace's name history for a single node id.
827
+ *
828
+ * For kind `'event'` the row is minted per-(trait, declared event) per the
829
+ * Phase-0 freeze — the owning trait is recorded in `parent`; a call-site event
830
+ * rename is a one-row edit on this same id (the baked-vs-current key namespaces
831
+ * collapse into `bakedName` vs `curName`).
832
+ */
833
+ interface LedgerEntry {
834
+ id: string;
835
+ kind: LedgerKind;
836
+ bakedName: string;
837
+ curName: string;
838
+ renames: ReadonlyArray<{
839
+ from: string;
840
+ to: string;
841
+ at: string;
842
+ }>;
843
+ owner: 'std' | 'io' | 'workspace';
844
+ /** Owning trait for kind `'event'` (per-trait event-id namespace). */
845
+ parent?: TraitId;
846
+ }
847
+ interface IdentityLedger {
848
+ schemaVersion: 1;
849
+ entries: Record<string, LedgerEntry>;
850
+ }
851
+ /** Resolve a name to its id via exact `curName` match within `kind`, else null. */
852
+ declare function ledgerResolveName(ledger: IdentityLedger, kind: LedgerKind, name: string): string | null;
853
+ /** Immutable rename: returns a new ledger with the id's `curName` + `renames` updated. */
854
+ declare function ledgerRename(ledger: IdentityLedger, id: string, to: string, at: string): IdentityLedger;
855
+ /** Current display name for an id, or null when the id is not in the ledger. */
856
+ declare function ledgerCurName(ledger: IdentityLedger, id: string): string | null;
857
+ /**
858
+ * Prefix-checked, kind-tagged id schemas. Each narrows a validated string to
859
+ * its branded id type via the module's own kind guard, so a schema that reads
860
+ * `TraitIdSchema.optional()` yields `TraitId | undefined` with no cast. The
861
+ * guard is the single source of prefix truth (`ID_PREFIXES`); the schema is a
862
+ * thin zod wrapper over it.
863
+ */
864
+ declare const OrbitalIdSchema: z.ZodEffects<z.ZodString, OrbitalId, string>;
865
+ declare const EntityIdSchema: z.ZodEffects<z.ZodString, EntityId, string>;
866
+ declare const TraitIdSchema: z.ZodEffects<z.ZodString, TraitId, string>;
867
+ declare const EventIdSchema: z.ZodEffects<z.ZodString, EventId, string>;
868
+ declare const PageIdSchema: z.ZodEffects<z.ZodString, PageId, string>;
869
+ declare const ServiceIdSchema: z.ZodEffects<z.ZodString, ServiceId, string>;
870
+ declare const ThemeIdSchema: z.ZodEffects<z.ZodString, ThemeId, string>;
871
+ declare const PaletteEntryIdSchema: z.ZodEffects<z.ZodString, PaletteEntryId, string>;
872
+ declare const LedgerKindSchema: z.ZodEnum<["orbital", "entity", "trait", "event", "page", "service", "theme"]>;
873
+ declare const LedgerEntrySchema: z.ZodObject<{
874
+ id: z.ZodString;
875
+ kind: z.ZodEnum<["orbital", "entity", "trait", "event", "page", "service", "theme"]>;
876
+ bakedName: z.ZodString;
877
+ curName: z.ZodString;
878
+ renames: z.ZodArray<z.ZodObject<{
879
+ from: z.ZodString;
880
+ to: z.ZodString;
881
+ at: z.ZodString;
882
+ }, "strip", z.ZodTypeAny, {
883
+ at: string;
884
+ from: string;
885
+ to: string;
886
+ }, {
887
+ at: string;
888
+ from: string;
889
+ to: string;
890
+ }>, "many">;
891
+ owner: z.ZodEnum<["std", "io", "workspace"]>;
892
+ parent: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
893
+ }, "strip", z.ZodTypeAny, {
894
+ id: string;
895
+ kind: "orbital" | "entity" | "trait" | "event" | "page" | "service" | "theme";
896
+ bakedName: string;
897
+ curName: string;
898
+ renames: {
899
+ at: string;
900
+ from: string;
901
+ to: string;
902
+ }[];
903
+ owner: "std" | "io" | "workspace";
904
+ parent?: TraitId | undefined;
905
+ }, {
906
+ id: string;
907
+ kind: "orbital" | "entity" | "trait" | "event" | "page" | "service" | "theme";
908
+ bakedName: string;
909
+ curName: string;
910
+ renames: {
911
+ at: string;
912
+ from: string;
913
+ to: string;
914
+ }[];
915
+ owner: "std" | "io" | "workspace";
916
+ parent?: string | undefined;
917
+ }>;
918
+ declare const IdentityLedgerSchema: z.ZodObject<{
919
+ schemaVersion: z.ZodLiteral<1>;
920
+ entries: z.ZodRecord<z.ZodString, z.ZodObject<{
921
+ id: z.ZodString;
922
+ kind: z.ZodEnum<["orbital", "entity", "trait", "event", "page", "service", "theme"]>;
923
+ bakedName: z.ZodString;
924
+ curName: z.ZodString;
925
+ renames: z.ZodArray<z.ZodObject<{
926
+ from: z.ZodString;
927
+ to: z.ZodString;
928
+ at: z.ZodString;
929
+ }, "strip", z.ZodTypeAny, {
930
+ at: string;
931
+ from: string;
932
+ to: string;
933
+ }, {
934
+ at: string;
935
+ from: string;
936
+ to: string;
937
+ }>, "many">;
938
+ owner: z.ZodEnum<["std", "io", "workspace"]>;
939
+ parent: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
940
+ }, "strip", z.ZodTypeAny, {
941
+ id: string;
942
+ kind: "orbital" | "entity" | "trait" | "event" | "page" | "service" | "theme";
943
+ bakedName: string;
944
+ curName: string;
945
+ renames: {
946
+ at: string;
947
+ from: string;
948
+ to: string;
949
+ }[];
950
+ owner: "std" | "io" | "workspace";
951
+ parent?: TraitId | undefined;
952
+ }, {
953
+ id: string;
954
+ kind: "orbital" | "entity" | "trait" | "event" | "page" | "service" | "theme";
955
+ bakedName: string;
956
+ curName: string;
957
+ renames: {
958
+ at: string;
959
+ from: string;
960
+ to: string;
961
+ }[];
962
+ owner: "std" | "io" | "workspace";
963
+ parent?: string | undefined;
964
+ }>>;
965
+ }, "strip", z.ZodTypeAny, {
966
+ entries: Record<string, {
967
+ id: string;
968
+ kind: "orbital" | "entity" | "trait" | "event" | "page" | "service" | "theme";
969
+ bakedName: string;
970
+ curName: string;
971
+ renames: {
972
+ at: string;
973
+ from: string;
974
+ to: string;
975
+ }[];
976
+ owner: "std" | "io" | "workspace";
977
+ parent?: TraitId | undefined;
978
+ }>;
979
+ schemaVersion: 1;
980
+ }, {
981
+ entries: Record<string, {
982
+ id: string;
983
+ kind: "orbital" | "entity" | "trait" | "event" | "page" | "service" | "theme";
984
+ bakedName: string;
985
+ curName: string;
986
+ renames: {
987
+ at: string;
988
+ from: string;
989
+ to: string;
990
+ }[];
991
+ owner: "std" | "io" | "workspace";
992
+ parent?: string | undefined;
993
+ }>;
994
+ schemaVersion: 1;
995
+ }>;
996
+
997
+ /**
998
+ * JSON primitives — the universal "data crossed a boundary" type.
999
+ *
1000
+ * Every value that arrives over the wire from an LLM (tool-call args),
1001
+ * from disk (workspace files), or from an HTTP body before
1002
+ * domain-specific validation is a `JsonValue`. Narrow with a typed
1003
+ * predicate (`is`-guard) at the boundary; don't widen back to `unknown`.
1004
+ *
1005
+ * `JsonObject` and `ToolArgs` are aliases for the common
1006
+ * `Record<string, JsonValue>` shape. `ToolArgs` is the name the
1007
+ * agent surface uses for LLM-emitted tool-call arguments; `JsonObject`
1008
+ * is the general-purpose alias. They are the same type — the alias
1009
+ * exists so call sites read at the right semantic level.
1010
+ *
1011
+ * Why not `Record<string, unknown>`? Two reasons. (1) `unknown` widens
1012
+ * back to anything, which defeats the purpose of typing the boundary.
1013
+ * (2) The `@almadar/eslint-plugin/no-record-string-unknown` rule blocks
1014
+ * the wider form — `JsonValue`-based records are the typed answer.
1015
+ *
1016
+ * @packageDocumentation
1017
+ */
1018
+
1019
+ /**
1020
+ * Recursive JSON value union — every shape JSON can carry.
1021
+ */
1022
+ type JsonValue = string | number | boolean | null | JsonValue[] | {
1023
+ [key: string]: JsonValue;
1024
+ };
1025
+ /**
1026
+ * JSON object — keyed string→JsonValue. The wire form of arbitrary
1027
+ * structured data. Replaces `Record<string, unknown>` at typed
1028
+ * boundaries (LLM emits, file reads, HTTP bodies).
1029
+ */
1030
+ type JsonObject = {
1031
+ [key: string]: JsonValue;
1032
+ };
1033
+ /**
1034
+ * LLM tool-call arguments — same shape as `JsonObject`, named for the
1035
+ * agent-surface call site. Each tool's `execute(args: ToolArgs)`
1036
+ * receives this and narrows via an `is`-guard predicate before any
1037
+ * field access.
1038
+ */
1039
+ type ToolArgs = JsonObject;
1040
+ /**
1041
+ * Type guard: is the given value a JSON primitive (non-array,
1042
+ * non-object)? Used by walkers that decide whether to recurse.
1043
+ */
1044
+ declare function isJsonPrimitive(value: JsonValue): value is string | number | boolean | null;
1045
+ /**
1046
+ * Type guard: is the given value a JSON object (non-array, non-null)?
1047
+ */
1048
+ declare function isJsonObject(value: JsonValue): value is JsonObject;
1049
+ /**
1050
+ * Type guard: is the given value a JSON array?
1051
+ */
1052
+ declare function isJsonArray(value: JsonValue): value is JsonValue[];
1053
+
1054
+ /**
1055
+ * Field Types for Orbital Units
1056
+ *
1057
+ * Extracted from schema/data-entities.ts for the orbitals module.
1058
+ * These types define the field structure within orbital entities.
1059
+ *
1060
+ * @packageDocumentation
1061
+ */
1062
+
1063
+ /**
1064
+ * Supported field types for entity fields.
1065
+ *
1066
+ * @example
1067
+ * { name: 'status', type: 'enum', values: ['draft', 'published'] }
1068
+ * { name: 'authorId', type: 'relation', relation: { entity: 'User', cardinality: 'one' } }
1069
+ */
1070
+ type FieldType = 'string' | 'number' | 'boolean' | 'date' | 'timestamp' | 'datetime' | 'email' | 'url' | 'phone' | 'uuid' | 'image' | 'array' | 'object' | 'enum' | 'relation' | 'trait' | 'slot' | 'pattern';
1071
+ /** Every `FieldType`, as a runtime array. Downstream imports this instead of
1072
+ * re-listing the union — five copies had already drifted apart. */
1073
+ declare const FIELD_TYPES: readonly ["string", "number", "boolean", "date", "timestamp", "datetime", "email", "url", "phone", "uuid", "image", "array", "object", "enum", "relation", "trait", "slot", "pattern"];
1074
+ /** The semantic string domains — constrained strings, validatable by value. */
1075
+ declare const SEMANTIC_STRING_TYPES: readonly ["email", "url", "phone", "uuid", "image"];
1076
+ type SemanticStringType = (typeof SEMANTIC_STRING_TYPES)[number];
1077
+ /** Is this a semantic string domain (as opposed to a bare `string`)? */
1078
+ declare function isSemanticStringType(type: FieldType): type is SemanticStringType;
1079
+ declare const FieldTypeSchema: z.ZodEnum<["string", "number", "boolean", "date", "timestamp", "datetime", "email", "url", "phone", "uuid", "image", "array", "object", "enum", "relation", "trait", "slot", "pattern"]>;
1080
+ /**
1081
+ * Cardinality for relation fields.
1082
+ * Matches Rust compiler's Cardinality enum.
1083
+ */
1084
+ type RelationCardinality = 'one' | 'many' | 'one-to-many' | 'many-to-one' | 'many-to-many';
1085
+ /**
1086
+ * Configuration for relation fields (foreign keys).
1087
+ * Matches Rust compiler's RelationDefinition format.
1088
+ */
1089
+ type RelationConfig = {
1090
+ /** Target entity name (e.g., 'User', 'Task') - matches Rust's `entity` field */
1091
+ entity: string;
1092
+ /** V4 dual-carry id sibling of `entity` — optional until the Phase-7 flip. */
1093
+ entityId?: EntityId;
1094
+ /** Field on target entity (defaults to 'id') */
1095
+ field?: string;
1096
+ /**
1097
+ * Cardinality: one, many, one-to-many, many-to-one, many-to-many
1098
+ * Matches Rust compiler's cardinality format
1099
+ */
1100
+ cardinality?: RelationCardinality;
1101
+ /** Delete behavior */
1102
+ onDelete?: 'cascade' | 'nullify' | 'restrict';
1103
+ /**
1104
+ * Foreign key field name (for legacy compatibility).
1105
+ * @deprecated Use field instead
1106
+ */
1107
+ foreignKey?: string;
1108
+ /**
1109
+ * Target entity name (for legacy compatibility).
1110
+ * @deprecated Use entity instead
1111
+ */
1112
+ target?: string;
1113
+ /**
1114
+ * Cardinality type alias (for legacy compatibility).
1115
+ * @deprecated Use cardinality instead
1116
+ */
1117
+ type?: RelationCardinality;
1118
+ };
1119
+ declare const RelationConfigSchema: z.ZodEffects<z.ZodObject<{
1120
+ entity: z.ZodString;
1121
+ entityId: z.ZodOptional<z.ZodEffects<z.ZodString, EntityId, string>>;
1122
+ field: z.ZodOptional<z.ZodString>;
1123
+ cardinality: z.ZodOptional<z.ZodEnum<["one", "many", "one-to-many", "many-to-one", "many-to-many"]>>;
1124
+ onDelete: z.ZodOptional<z.ZodEnum<["cascade", "nullify", "restrict"]>>;
1125
+ foreignKey: z.ZodOptional<z.ZodString>;
1126
+ target: z.ZodOptional<z.ZodString>;
1127
+ type: z.ZodOptional<z.ZodEnum<["one", "many", "one-to-many", "many-to-one", "many-to-many"]>>;
1128
+ }, "strip", z.ZodTypeAny, {
1129
+ entity: string;
1130
+ type?: "many" | "one" | "one-to-many" | "many-to-one" | "many-to-many" | undefined;
1131
+ entityId?: EntityId | undefined;
1132
+ field?: string | undefined;
1133
+ cardinality?: "many" | "one" | "one-to-many" | "many-to-one" | "many-to-many" | undefined;
1134
+ onDelete?: "cascade" | "nullify" | "restrict" | undefined;
1135
+ foreignKey?: string | undefined;
1136
+ target?: string | undefined;
1137
+ }, {
1138
+ entity: string;
1139
+ type?: "many" | "one" | "one-to-many" | "many-to-one" | "many-to-many" | undefined;
1140
+ entityId?: string | undefined;
1141
+ field?: string | undefined;
1142
+ cardinality?: "many" | "one" | "one-to-many" | "many-to-one" | "many-to-many" | undefined;
1143
+ onDelete?: "cascade" | "nullify" | "restrict" | undefined;
1144
+ foreignKey?: string | undefined;
1145
+ target?: string | undefined;
1146
+ }>, RelationConfig, {
1147
+ entity: string;
1148
+ type?: "many" | "one" | "one-to-many" | "many-to-one" | "many-to-many" | undefined;
1149
+ entityId?: string | undefined;
1150
+ field?: string | undefined;
1151
+ cardinality?: "many" | "one" | "one-to-many" | "many-to-one" | "many-to-many" | undefined;
1152
+ onDelete?: "cascade" | "nullify" | "restrict" | undefined;
1153
+ foreignKey?: string | undefined;
1154
+ target?: string | undefined;
1155
+ }>;
1156
+ declare function isEmailValue(value: string): boolean;
1157
+ declare function isUrlValue(value: string): boolean;
1158
+ declare function isPhoneValue(value: string): boolean;
1159
+ declare function isUuidValue(value: string): boolean;
1160
+ /** Does `value` satisfy the declared semantic domain? `image` is a URL. */
1161
+ declare function isSemanticStringValue(type: SemanticStringType, value: string): boolean;
1162
+ /**
1163
+ * Field-type tags that don't carry a type-dependent payload. The base
1164
+ * `EntityField` shape applies as-is.
1165
+ */
1166
+ type ScalarFieldType = 'string' | 'number' | 'boolean' | 'date' | 'timestamp' | 'datetime' | 'email' | 'url' | 'phone' | 'uuid' | 'image' | 'trait' | 'slot' | 'pattern';
1167
+ /** Fields shared across every variant. */
1168
+ type EntityFieldBase = {
1169
+ /**
1170
+ * Field name (camelCase). Optional for nested item/property descriptors
1171
+ * where the name is implied by the parent (`items`, `properties[k]`).
1172
+ * Mirrors Rust's `FieldDefinition.name: Option<String>`.
1173
+ */
1174
+ name?: string;
1175
+ /** Whether the field is required */
1176
+ required?: boolean;
1177
+ /** Default value — parsed from `.orb`, always JSON-shaped. */
1178
+ default?: JsonValue;
1179
+ /** Minimum value (for number) or length (for string) */
1180
+ min?: number;
1181
+ /** Maximum value or length */
1182
+ max?: number;
1183
+ /** Object property schemas keyed by property name (for object type).
1184
+ * Mirrors Rust's `FieldDefinition.properties: Option<HashMap<String,
1185
+ * FieldDefinition>>`. Populated by the lolo lowerer when a field /
1186
+ * config slot's type expression resolves to a struct shape
1187
+ * (`TypeExpr::Object`), including named-type aliases like `[MetricSpec]`. */
1188
+ properties?: Record<string, EntityField>;
1189
+ /** Runtime-managed widget state (authored `@intrinsic` in `.lolo`). Exempt
1190
+ * from the explicit-binding rule and never a domain-data bind target. */
1191
+ intrinsic?: boolean;
1192
+ /** Human/semantic description (authored `@description "..."` in `.lolo`).
1193
+ * Authoring/build-time metadata — factory-signature catalog, embeddings,
1194
+ * curation field-matching; the runtime ignores it. */
1195
+ description?: string;
1196
+ /** User-vocabulary synonyms (authored `@synonyms "..."` in `.lolo`).
1197
+ * Free text feeding catalog search / curation field-matching. */
1198
+ synonyms?: string;
1199
+ };
1200
+ /**
1201
+ * Scalar / structural fields — no type-dependent payload required.
1202
+ * `values?` is permitted as an OPTIONAL UI/validation hint (e.g. lolo's
1203
+ * `'a' | 'b' | 'c'` string-union sugar lowers to `type: 'string', values:
1204
+ * [...]`). Only `EnumEntityField` MANDATES values.
1205
+ */
1206
+ type ScalarEntityField = EntityFieldBase & {
1207
+ type: ScalarFieldType;
1208
+ /** Optional vocabulary hint for scalar fields (e.g. string unions
1209
+ * authored as `'a'|'b'|'c'` in lolo). Not required at this variant. */
1210
+ values?: string[];
1211
+ };
1212
+ /** `type: 'enum'` REQUIRES the closed vocabulary in `values`. */
1213
+ type EnumEntityField = EntityFieldBase & {
1214
+ type: 'enum';
1215
+ /** Closed string vocabulary the field accepts. */
1216
+ values: string[];
1217
+ };
1218
+ /** `type: 'relation'` REQUIRES the relation target binding. */
1219
+ type RelationEntityField = EntityFieldBase & {
1220
+ type: 'relation';
1221
+ /** Relation target binding (entity + cardinality). */
1222
+ relation: RelationConfig;
1223
+ };
1224
+ /** `type: 'array'` — element schema in `items` strongly preferred but
1225
+ * optional for legacy compatibility with codegen-emitted scalar-array
1226
+ * fields (e.g. `{type: 'array', default: []}`). The lolo lowerer + Rust
1227
+ * validator catch typed-element-required cases downstream. */
1228
+ type ArrayEntityField = EntityFieldBase & {
1229
+ type: 'array';
1230
+ /** Element schema for the array. */
1231
+ items?: EntityField;
1232
+ };
1233
+ /**
1234
+ * `type: 'object'` — a fixed-key struct (fields in `properties`) OR a
1235
+ * dynamic-key map (`Map K V` in `.lolo`; the uniform value schema lives in
1236
+ * `items`, mirroring an array's element schema). A distinct variant so `items`
1237
+ * is statically allowed only on object/array fields, never on scalars.
1238
+ */
1239
+ type ObjectEntityField = EntityFieldBase & {
1240
+ type: 'object';
1241
+ /** Uniform value schema for a dynamic-key map (`Map K V`). */
1242
+ items?: EntityField;
1243
+ };
1244
+ /**
1245
+ * Entity field definition — discriminated union by `type`. Each variant
1246
+ * statically enforces its dependent payload (`values` for enum,
1247
+ * `relation` for relation, `items` for array) so TS / Zod / JSON Schema
1248
+ * consumers all agree on the dependency, not just the Rust validator.
1249
+ *
1250
+ * @example
1251
+ * { name: 'status', type: 'enum', values: ['draft', 'published'] }
1252
+ * { name: 'authorId', type: 'relation', relation: { entity: 'User', cardinality: 'one' } }
1253
+ * { name: 'tags', type: 'array', items: { type: 'string' } }
1254
+ */
1255
+ type EntityField = ScalarEntityField | EnumEntityField | RelationEntityField | ArrayEntityField | ObjectEntityField;
1256
+ /**
1257
+ * Zod schema for `EntityField`. Preprocess normalizes:
1258
+ * - legacy `type` aliases (text → string, int → number, etc.)
1259
+ * - legacy `enum: string[]` alias → `values: string[]`
1260
+ *
1261
+ * Branches on `type` so TS narrows the parsed output to the matching
1262
+ * discriminated-union variant.
1263
+ */
1264
+ declare const EntityFieldSchema: z.ZodType<EntityField, z.ZodTypeDef, unknown>;
1265
+ type EntityFieldInput = z.input<typeof EntityFieldSchema>;
1266
+ /** Alias for EntityField - preferred name */
1267
+ type Field = EntityField;
1268
+ /** Alias for EntityFieldSchema - preferred name */
1269
+ declare const FieldSchema: z.ZodType<EntityField, z.ZodTypeDef, unknown>;
1270
+
1271
+ /**
1272
+ * Asset Types for Semantic Asset References
1273
+ *
1274
+ * Defines types for abstracting asset paths into semantic references.
1275
+ * Assets are resolved from SemanticAssetRef to actual paths at compile time.
1276
+ *
1277
+ * @packageDocumentation
1278
+ */
1279
+
1280
+ /**
1281
+ * Entity roles in game contexts
1282
+ */
1283
+ declare const ENTITY_ROLES: readonly ["player", "enemy", "npc", "item", "tile", "projectile", "effect", "ui", "decoration", "vehicle"];
1284
+ type EntityRole = (typeof ENTITY_ROLES)[number];
1285
+ declare const EntityRoleSchema: z.ZodEnum<["player", "enemy", "npc", "item", "tile", "projectile", "effect", "ui", "decoration", "vehicle"]>;
1286
+ /**
1287
+ * Visual art styles for games
1288
+ */
1289
+ declare const VISUAL_STYLES: readonly ["pixel", "vector", "hd", "1-bit", "isometric"];
1290
+ type VisualStyle = (typeof VISUAL_STYLES)[number];
1291
+ declare const VisualStyleSchema: z.ZodEnum<["pixel", "vector", "hd", "1-bit", "isometric"]>;
1292
+ /**
1293
+ * Whether the asset is a 2D sprite/image or a 3D model. Set by the consuming
1294
+ * canvas: the same entity role is a 2D sprite-sheet on a tile board and a 3D
1295
+ * rigged model on a 3D board.
1296
+ */
1297
+ declare const ASSET_DIMENSIONS: readonly ["2d", "3d"];
1298
+ type AssetDimension = (typeof ASSET_DIMENSIONS)[number];
1299
+ declare const AssetDimensionSchema: z.ZodEnum<["2d", "3d"]>;
1300
+ /**
1301
+ * Rendering aspect ratio of an asset: square (tiles/sprites/portraits/icons),
1302
+ * 16:9 (scene backdrops), 5:7 (cards), 8:1 (effect frame strips).
1303
+ */
1304
+ declare const ASSET_ASPECTS: readonly ["1:1", "16:9", "5:7", "8:1"];
1305
+ type AssetAspect = (typeof ASSET_ASPECTS)[number];
1306
+ declare const AssetAspectSchema: z.ZodEnum<["1:1", "16:9", "5:7", "8:1"]>;
1307
+ /**
1308
+ * Animation names matching a sprite sheet's row layout. Canonical home for
1309
+ * this vocabulary — `@almadar/ui`'s `spriteAnimationTypes.ts` re-exports it
1310
+ * rather than redeclaring, so board `.lolo` config and the render library
1311
+ * agree on one enum.
1312
+ */
1313
+ declare const ANIMATION_NAMES: readonly ["idle", "walk", "attack", "hit", "death"];
1314
+ type AnimationName = (typeof ANIMATION_NAMES)[number];
1315
+ declare const AnimationNameSchema: z.ZodEnum<["idle", "walk", "attack", "hit", "death"]>;
1316
+ /** Sheet file directions (physical PNG files a sprite sheet ships as). */
1317
+ declare const SPRITE_DIRECTIONS: readonly ["se", "sw"];
1318
+ type SpriteDirection = (typeof SPRITE_DIRECTIONS)[number];
1319
+ declare const SpriteDirectionSchema: z.ZodEnum<["se", "sw"]>;
1320
+ /**
1321
+ * Definition for a single named animation within a sprite sheet: which row
1322
+ * it occupies, how many frames it has, and its playback rate. This is the
1323
+ * shape actually consumed by `@almadar/ui`'s sprite-sheet renderer
1324
+ * (`spriteAnimation.ts`'s `frameRect`/`getCurrentFrameFromDef`) — moved here
1325
+ * verbatim rather than reconciled with a differently-shaped guess, since
1326
+ * `@almadar/ui`'s version is the one with real production consumers.
1327
+ */
1328
+ interface AnimationDef {
1329
+ /** Row index in the sprite sheet (0-based; each animation occupies one row). */
1330
+ row: number;
1331
+ /** Number of frames in this animation. */
1332
+ frames: number;
1333
+ /** Frames per second. */
1334
+ frameRate: number;
1335
+ /** Whether the animation loops. */
1336
+ loop: boolean;
1337
+ }
1338
+ declare const AnimationDefSchema: z.ZodObject<{
1339
+ row: z.ZodNumber;
1340
+ frames: z.ZodNumber;
1341
+ frameRate: z.ZodNumber;
1342
+ loop: z.ZodBoolean;
1343
+ }, "strip", z.ZodTypeAny, {
1344
+ row: number;
1345
+ frames: number;
1346
+ frameRate: number;
1347
+ loop: boolean;
1348
+ }, {
1349
+ row: number;
1350
+ frames: number;
1351
+ frameRate: number;
1352
+ loop: boolean;
1353
+ }>;
1354
+ /**
1355
+ * Parsed sprite-sheet atlas JSON — the contract a `spriteSheet`-role `Asset.url`
1356
+ * resolves to when fetched (see `Asset.url` usage in `@almadar/ui`'s
1357
+ * `useUnitSpriteAtlas`). A unit's `sprite?: Asset` stays the static single-pose
1358
+ * image; `spriteSheet?: Asset` is a SEPARATE reference whose URL points at a
1359
+ * `SpriteSheetAtlas`-shaped JSON manifest (e.g. `.../guardian-sprite-sheet.json`),
1360
+ * not a PNG. Frame-cutting geometry lives here, not inlined onto `Asset` — an
1361
+ * `Asset` traveling through `render-ui` every tick stays small.
1362
+ */
1363
+ interface SpriteSheetAtlas {
1364
+ /** Unit archetype key. */
1365
+ unit?: string;
1366
+ /** Visual type key. */
1367
+ type?: string;
1368
+ /** Width of a single frame in pixels. */
1369
+ frameWidth: number;
1370
+ /** Height of a single frame in pixels. */
1371
+ frameHeight: number;
1372
+ /** Number of columns (frames per row). */
1373
+ columns: number;
1374
+ /** Number of rows (animations). */
1375
+ rows: number;
1376
+ /** Directions present as physical PNG files. */
1377
+ directions: SpriteDirection[];
1378
+ /** Relative PNG sheet paths per direction. */
1379
+ sheets: Partial<Record<SpriteDirection, string>>;
1380
+ /** Animation row layout keyed by animation name. */
1381
+ animations: Partial<Record<AnimationName, AnimationDef>>;
1382
+ }
1383
+ declare const SpriteSheetAtlasSchema: z.ZodObject<{
1384
+ unit: z.ZodOptional<z.ZodString>;
1385
+ type: z.ZodOptional<z.ZodString>;
1386
+ frameWidth: z.ZodNumber;
1387
+ frameHeight: z.ZodNumber;
1388
+ columns: z.ZodNumber;
1389
+ rows: z.ZodNumber;
1390
+ directions: z.ZodArray<z.ZodEnum<["se", "sw"]>, "many">;
1391
+ sheets: z.ZodRecord<z.ZodEnum<["se", "sw"]>, z.ZodString>;
1392
+ animations: z.ZodRecord<z.ZodEnum<["idle", "walk", "attack", "hit", "death"]>, z.ZodObject<{
1393
+ row: z.ZodNumber;
1394
+ frames: z.ZodNumber;
1395
+ frameRate: z.ZodNumber;
1396
+ loop: z.ZodBoolean;
1397
+ }, "strip", z.ZodTypeAny, {
1398
+ row: number;
1399
+ frames: number;
1400
+ frameRate: number;
1401
+ loop: boolean;
1402
+ }, {
1403
+ row: number;
1404
+ frames: number;
1405
+ frameRate: number;
1406
+ loop: boolean;
1407
+ }>>;
1408
+ }, "strip", z.ZodTypeAny, {
1409
+ frameWidth: number;
1410
+ frameHeight: number;
1411
+ columns: number;
1412
+ rows: number;
1413
+ directions: ("se" | "sw")[];
1414
+ sheets: Partial<Record<"se" | "sw", string>>;
1415
+ animations: Partial<Record<"idle" | "walk" | "attack" | "hit" | "death", {
1416
+ row: number;
1417
+ frames: number;
1418
+ frameRate: number;
1419
+ loop: boolean;
1420
+ }>>;
1421
+ type?: string | undefined;
1422
+ unit?: string | undefined;
1423
+ }, {
1424
+ frameWidth: number;
1425
+ frameHeight: number;
1426
+ columns: number;
1427
+ rows: number;
1428
+ directions: ("se" | "sw")[];
1429
+ sheets: Partial<Record<"se" | "sw", string>>;
1430
+ animations: Partial<Record<"idle" | "walk" | "attack" | "hit" | "death", {
1431
+ row: number;
1432
+ frames: number;
1433
+ frameRate: number;
1434
+ loop: boolean;
1435
+ }>>;
1436
+ type?: string | undefined;
1437
+ unit?: string | undefined;
1438
+ }>;
1439
+ /**
1440
+ * One named sub-rectangle inside a packed sheet. Mirrors the ShoeBox /
1441
+ * TexturePacker `<SubTexture>` element every Kenney `Spritesheet/*.xml` ships
1442
+ * (`x`/`y`/`width`/`height` = the rect in the sheet PNG; `frameX`/`frameY`/
1443
+ * `frameWidth`/`frameHeight` = the trim/pad offsets for sprites packed with
1444
+ * transparent edges removed — optional, present only on trimmed atlases).
1445
+ */
1446
+ interface SubTexture {
1447
+ x: number;
1448
+ y: number;
1449
+ width: number;
1450
+ height: number;
1451
+ frameX?: number;
1452
+ frameY?: number;
1453
+ frameWidth?: number;
1454
+ frameHeight?: number;
1455
+ }
1456
+ declare const SubTextureSchema: z.ZodObject<{
1457
+ x: z.ZodNumber;
1458
+ y: z.ZodNumber;
1459
+ width: z.ZodNumber;
1460
+ height: z.ZodNumber;
1461
+ frameX: z.ZodOptional<z.ZodNumber>;
1462
+ frameY: z.ZodOptional<z.ZodNumber>;
1463
+ frameWidth: z.ZodOptional<z.ZodNumber>;
1464
+ frameHeight: z.ZodOptional<z.ZodNumber>;
1465
+ }, "strip", z.ZodTypeAny, {
1466
+ x: number;
1467
+ y: number;
1468
+ width: number;
1469
+ height: number;
1470
+ frameWidth?: number | undefined;
1471
+ frameHeight?: number | undefined;
1472
+ frameX?: number | undefined;
1473
+ frameY?: number | undefined;
1474
+ }, {
1475
+ x: number;
1476
+ y: number;
1477
+ width: number;
1478
+ height: number;
1479
+ frameWidth?: number | undefined;
1480
+ frameHeight?: number | undefined;
1481
+ frameX?: number | undefined;
1482
+ frameY?: number | undefined;
1483
+ }>;
1484
+ /**
1485
+ * A packed sheet + its named sub-rectangles — the canonical parse target for a
1486
+ * Kenney `Spritesheet/*.xml` atlas. A STATIC tile/prop/UI Asset references one
1487
+ * of these: `{ url: <sheet.png>, atlas: <this.json>, sprite: "grass.png" }` →
1488
+ * the renderer fetches the sheet + atlas ONCE and blits the named sub-rect,
1489
+ * instead of loading N individual PNGs. (Animated actors use `SpriteSheetAtlas`
1490
+ * instead; a uniform-grid tile page uses `Tilesheet`.)
1491
+ */
1492
+ interface TextureAtlas {
1493
+ /** Relative path to the sheet PNG the sub-rects index into (the atlas's own `imagePath`). */
1494
+ imagePath: string;
1495
+ /** Sub-rectangles keyed by their atlas name (e.g. `"grass.png"`). */
1496
+ subTextures: Record<string, SubTexture>;
1497
+ }
1498
+ declare const TextureAtlasSchema: z.ZodObject<{
1499
+ imagePath: z.ZodString;
1500
+ subTextures: z.ZodRecord<z.ZodString, z.ZodObject<{
1501
+ x: z.ZodNumber;
1502
+ y: z.ZodNumber;
1503
+ width: z.ZodNumber;
1504
+ height: z.ZodNumber;
1505
+ frameX: z.ZodOptional<z.ZodNumber>;
1506
+ frameY: z.ZodOptional<z.ZodNumber>;
1507
+ frameWidth: z.ZodOptional<z.ZodNumber>;
1508
+ frameHeight: z.ZodOptional<z.ZodNumber>;
1509
+ }, "strip", z.ZodTypeAny, {
1510
+ x: number;
1511
+ y: number;
1512
+ width: number;
1513
+ height: number;
1514
+ frameWidth?: number | undefined;
1515
+ frameHeight?: number | undefined;
1516
+ frameX?: number | undefined;
1517
+ frameY?: number | undefined;
1518
+ }, {
1519
+ x: number;
1520
+ y: number;
1521
+ width: number;
1522
+ height: number;
1523
+ frameWidth?: number | undefined;
1524
+ frameHeight?: number | undefined;
1525
+ frameX?: number | undefined;
1526
+ frameY?: number | undefined;
1527
+ }>>;
1528
+ }, "strip", z.ZodTypeAny, {
1529
+ imagePath: string;
1530
+ subTextures: Record<string, {
1531
+ x: number;
1532
+ y: number;
1533
+ width: number;
1534
+ height: number;
1535
+ frameWidth?: number | undefined;
1536
+ frameHeight?: number | undefined;
1537
+ frameX?: number | undefined;
1538
+ frameY?: number | undefined;
1539
+ }>;
1540
+ }, {
1541
+ imagePath: string;
1542
+ subTextures: Record<string, {
1543
+ x: number;
1544
+ y: number;
1545
+ width: number;
1546
+ height: number;
1547
+ frameWidth?: number | undefined;
1548
+ frameHeight?: number | undefined;
1549
+ frameX?: number | undefined;
1550
+ frameY?: number | undefined;
1551
+ }>;
1552
+ }>;
1553
+ /**
1554
+ * A uniform-grid tile page — the shape a Kenney `Tilesheet/` sheet takes (e.g.
1555
+ * Pirate Pack: "each tile is 64×64, no margin"). Tiles are cut by `(col,row)`
1556
+ * index rather than by named rect. `names` is present only when a sibling
1557
+ * `.xml`/`.txt` supplies an index→name list; otherwise a tile is addressed by
1558
+ * its `"col,row"` (or flat index) via `Asset.sprite`.
1559
+ */
1560
+ interface Tilesheet {
1561
+ /** Relative path to the tile sheet PNG. */
1562
+ imagePath: string;
1563
+ /** Width of one tile cell in pixels. */
1564
+ tileWidth: number;
1565
+ /** Height of one tile cell in pixels. */
1566
+ tileHeight: number;
1567
+ /** Number of columns in the grid. */
1568
+ columns: number;
1569
+ /** Number of rows in the grid. */
1570
+ rows: number;
1571
+ /** Outer margin before the first tile, in pixels (default 0). */
1572
+ margin?: number;
1573
+ /** Gap between adjacent tiles, in pixels (default 0). */
1574
+ spacing?: number;
1575
+ /** Optional index→name labels when a descriptor supplies them. */
1576
+ names?: string[];
1577
+ }
1578
+ declare const TilesheetSchema: z.ZodObject<{
1579
+ imagePath: z.ZodString;
1580
+ tileWidth: z.ZodNumber;
1581
+ tileHeight: z.ZodNumber;
1582
+ columns: z.ZodNumber;
1583
+ rows: z.ZodNumber;
1584
+ margin: z.ZodOptional<z.ZodNumber>;
1585
+ spacing: z.ZodOptional<z.ZodNumber>;
1586
+ names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1587
+ }, "strip", z.ZodTypeAny, {
1588
+ columns: number;
1589
+ rows: number;
1590
+ imagePath: string;
1591
+ tileWidth: number;
1592
+ tileHeight: number;
1593
+ margin?: number | undefined;
1594
+ spacing?: number | undefined;
1595
+ names?: string[] | undefined;
1596
+ }, {
1597
+ columns: number;
1598
+ rows: number;
1599
+ imagePath: string;
1600
+ tileWidth: number;
1601
+ tileHeight: number;
1602
+ margin?: number | undefined;
1603
+ spacing?: number | undefined;
1604
+ names?: string[] | undefined;
1605
+ }>;
1606
+ /**
1607
+ * Semantic reference to an asset (not a hardcoded path).
1608
+ * Resolved to actual paths at compile time via asset maps.
1609
+ */
1610
+ type SemanticAssetRef = {
1611
+ /**
1612
+ * Entity role — a free string. Core no longer constrains the vocabulary to
1613
+ * `EntityRole` (that enum stays an exported shared reference for the asset
1614
+ * tool + renderer); genre boards may use their own roles (`boss`, `tower`, …).
1615
+ */
1616
+ role: string;
1617
+ /** Sub-category within role (hero, slime, coin, etc.) */
1618
+ category: string;
1619
+ /** Required animations for this entity */
1620
+ animations?: string[];
1621
+ /** Visual style preference */
1622
+ style?: VisualStyle;
1623
+ /** Variant identifier (for multiple versions) */
1624
+ variant?: string;
1625
+ /** 2D sprite vs 3D model — the rendering dimension the consuming canvas needs. */
1626
+ dimension?: AssetDimension;
1627
+ /** Rendering aspect ratio (square sprite/portrait/tile, 16:9 backdrop, 5:7 card, 8:1 fx-strip). */
1628
+ aspect?: AssetAspect;
1629
+ };
1630
+ declare const SemanticAssetRefSchema: z.ZodObject<{
1631
+ role: z.ZodString;
1632
+ category: z.ZodString;
1633
+ animations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1634
+ style: z.ZodOptional<z.ZodEnum<["pixel", "vector", "hd", "1-bit", "isometric"]>>;
1635
+ variant: z.ZodOptional<z.ZodString>;
1636
+ dimension: z.ZodOptional<z.ZodEnum<["2d", "3d"]>>;
1637
+ aspect: z.ZodOptional<z.ZodEnum<["1:1", "16:9", "5:7", "8:1"]>>;
1638
+ }, "strip", z.ZodTypeAny, {
1639
+ role: string;
1640
+ category: string;
1641
+ animations?: string[] | undefined;
1642
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
1643
+ variant?: string | undefined;
1644
+ dimension?: "2d" | "3d" | undefined;
1645
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
1646
+ }, {
1647
+ role: string;
1648
+ category: string;
1649
+ animations?: string[] | undefined;
1650
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
1651
+ variant?: string | undefined;
1652
+ dimension?: "2d" | "3d" | undefined;
1653
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
1654
+ }>;
1655
+ /**
1656
+ * The single asset type: a `SemanticAssetRef` (role/dimension/animations/aspect/style)
1657
+ * WITH its resolved URL folded in. Used everywhere an asset is referenced — a lolo
1658
+ * board `assetManifest` (`Map string Asset`), every `@almadar/ui` game prop, the
1659
+ * asset-workflow's resolved/pool assets, and the inspector picker. Replaces the bare
1660
+ * `AssetUrl`-string asset field so the render metadata travels WITH the asset (no
1661
+ * pixel-dimension or filename heuristics needed to know sheet-vs-frame / 2d-vs-3d).
1662
+ */
1663
+ interface Asset extends SemanticAssetRef {
1664
+ /** The resolved asset URL. When `atlas`/`sprite` are set this is the SHEET png; otherwise a standalone image. */
1665
+ url: AssetUrl;
1666
+ /**
1667
+ * Optional atlas JSON (a `TextureAtlas` or `Tilesheet`) that slices `url`.
1668
+ * When present with `sprite`, the renderer fetches sheet + atlas once and
1669
+ * blits one sub-rect instead of loading a standalone PNG. Absent → `url` is
1670
+ * a plain whole-image asset (the existing, non-atlas path).
1671
+ */
1672
+ atlas?: AssetUrl;
1673
+ /**
1674
+ * The sub-texture selector within `atlas`: a `SubTexture` name for a
1675
+ * `TextureAtlas` (e.g. `"grass.png"`), or a `"col,row"`/flat index for a
1676
+ * `Tilesheet`. Only meaningful alongside `atlas`.
1677
+ */
1678
+ sprite?: string;
1679
+ /** Optional display name (inspector picker). */
1680
+ name?: string;
1681
+ /** Optional thumbnail URL (inspector picker grid). */
1682
+ thumbnailUrl?: string;
1683
+ }
1684
+ declare const AssetSchema: z.ZodObject<{
1685
+ role: z.ZodString;
1686
+ category: z.ZodString;
1687
+ animations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1688
+ style: z.ZodOptional<z.ZodEnum<["pixel", "vector", "hd", "1-bit", "isometric"]>>;
1689
+ variant: z.ZodOptional<z.ZodString>;
1690
+ dimension: z.ZodOptional<z.ZodEnum<["2d", "3d"]>>;
1691
+ aspect: z.ZodOptional<z.ZodEnum<["1:1", "16:9", "5:7", "8:1"]>>;
1692
+ } & {
1693
+ url: z.ZodString;
1694
+ atlas: z.ZodOptional<z.ZodString>;
1695
+ sprite: z.ZodOptional<z.ZodString>;
1696
+ name: z.ZodOptional<z.ZodString>;
1697
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
1698
+ }, "strip", z.ZodTypeAny, {
1699
+ url: string;
1700
+ role: string;
1701
+ category: string;
1702
+ name?: string | undefined;
1703
+ animations?: string[] | undefined;
1704
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
1705
+ variant?: string | undefined;
1706
+ dimension?: "2d" | "3d" | undefined;
1707
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
1708
+ atlas?: string | undefined;
1709
+ sprite?: string | undefined;
1710
+ thumbnailUrl?: string | undefined;
1711
+ }, {
1712
+ url: string;
1713
+ role: string;
1714
+ category: string;
1715
+ name?: string | undefined;
1716
+ animations?: string[] | undefined;
1717
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
1718
+ variant?: string | undefined;
1719
+ dimension?: "2d" | "3d" | undefined;
1720
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
1721
+ atlas?: string | undefined;
1722
+ sprite?: string | undefined;
1723
+ thumbnailUrl?: string | undefined;
1724
+ }>;
1725
+ /**
1726
+ * Single browsable asset in the inspector picker catalog.
1727
+ * Backs the asset/icon pickers — a flat list the inspector renders for
1728
+ * the user to choose from when a config field's type is `'asset'`.
1729
+ */
1730
+ interface AssetCatalogEntry {
1731
+ /** Resolvable URL to the asset. */
1732
+ url: string;
1733
+ /** Display name for the asset. */
1734
+ name: string;
1735
+ /** Grouping category within the catalog. */
1736
+ category: string;
1737
+ /** Asset kind the picker dispatches on. */
1738
+ kind: 'image' | 'spritesheet' | 'audio' | 'scene' | 'portrait' | 'model' | 'other';
1739
+ /** Optional thumbnail URL for grid previews. */
1740
+ thumbnailUrl?: string;
1741
+ /** 2D sprite vs 3D model — the asset's actual rendering dimension. */
1742
+ dimension?: AssetDimension;
1743
+ /** The asset's actual rendering aspect ratio. */
1744
+ aspect?: AssetAspect;
1745
+ }
1746
+ declare const AssetCatalogEntrySchema: z.ZodObject<{
1747
+ url: z.ZodString;
1748
+ name: z.ZodString;
1749
+ category: z.ZodString;
1750
+ kind: z.ZodEnum<["image", "spritesheet", "audio", "scene", "portrait", "model", "other"]>;
1751
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
1752
+ dimension: z.ZodOptional<z.ZodEnum<["2d", "3d"]>>;
1753
+ aspect: z.ZodOptional<z.ZodEnum<["1:1", "16:9", "5:7", "8:1"]>>;
1754
+ }, "strip", z.ZodTypeAny, {
1755
+ kind: "image" | "spritesheet" | "audio" | "scene" | "portrait" | "model" | "other";
1756
+ url: string;
1757
+ name: string;
1758
+ category: string;
1759
+ dimension?: "2d" | "3d" | undefined;
1760
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
1761
+ thumbnailUrl?: string | undefined;
1762
+ }, {
1763
+ kind: "image" | "spritesheet" | "audio" | "scene" | "portrait" | "model" | "other";
1764
+ url: string;
1765
+ name: string;
1766
+ category: string;
1767
+ dimension?: "2d" | "3d" | undefined;
1768
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
1769
+ thumbnailUrl?: string | undefined;
1770
+ }>;
1771
+ /**
1772
+ * Flat list of browsable assets surfaced by the inspector pickers.
1773
+ */
1774
+ type AssetCatalog = AssetCatalogEntry[];
1775
+ declare const AssetCatalogSchema: z.ZodArray<z.ZodObject<{
1776
+ url: z.ZodString;
1777
+ name: z.ZodString;
1778
+ category: z.ZodString;
1779
+ kind: z.ZodEnum<["image", "spritesheet", "audio", "scene", "portrait", "model", "other"]>;
1780
+ thumbnailUrl: z.ZodOptional<z.ZodString>;
1781
+ dimension: z.ZodOptional<z.ZodEnum<["2d", "3d"]>>;
1782
+ aspect: z.ZodOptional<z.ZodEnum<["1:1", "16:9", "5:7", "8:1"]>>;
1783
+ }, "strip", z.ZodTypeAny, {
1784
+ kind: "image" | "spritesheet" | "audio" | "scene" | "portrait" | "model" | "other";
1785
+ url: string;
1786
+ name: string;
1787
+ category: string;
1788
+ dimension?: "2d" | "3d" | undefined;
1789
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
1790
+ thumbnailUrl?: string | undefined;
1791
+ }, {
1792
+ kind: "image" | "spritesheet" | "audio" | "scene" | "portrait" | "model" | "other";
1793
+ url: string;
1794
+ name: string;
1795
+ category: string;
1796
+ dimension?: "2d" | "3d" | undefined;
1797
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
1798
+ thumbnailUrl?: string | undefined;
1799
+ }>, "many">;
1800
+ /**
1801
+ * Asset-reference URL marker. A plain alias over `string` — the value is a
1802
+ * resolvable asset URL — but the named type lets the pattern-sync tool
1803
+ * (`tools/almadar-pattern-sync/parser.ts`) detect a component prop as an asset
1804
+ * field (tagged `asset`) the same way `EventKey`/`LucideIcon` are detected by
1805
+ * type identity. Components annotate image/url props as `AssetUrl` (`src`,
1806
+ * `backgroundImage`, `avatar`, …); the generator emits a `string` config knob
1807
+ * declared as the `asset` config type, which the property inspector dispatches
1808
+ * an AssetPicker on. Not branded — asset urls originate from user data, so cast
1809
+ * friction would buy nothing; the value is the marker the tool finds.
1810
+ */
1811
+ type AssetUrl = string;
1812
+ /**
1813
+ * A neutral position in scene space: 2D (`x`,`y`) or optionally 3D (`x`,`y`,`z`).
1814
+ * The single coordinate type shared by every drawable descriptor and camera pose
1815
+ * across the 2D and 3D canvas hosts, so a scene composes from the same `{x,y,z?}`
1816
+ * regardless of projection or painter. Logical, not pixel — the host's projector
1817
+ * maps a `ScenePos` to screen space.
1818
+ */
1819
+ interface ScenePos {
1820
+ x: number;
1821
+ y: number;
1822
+ z?: number;
1823
+ }
1824
+ declare const ScenePosSchema: z.ZodObject<{
1825
+ x: z.ZodNumber;
1826
+ y: z.ZodNumber;
1827
+ z: z.ZodOptional<z.ZodNumber>;
1828
+ }, "strip", z.ZodTypeAny, {
1829
+ x: number;
1830
+ y: number;
1831
+ z?: number | undefined;
1832
+ }, {
1833
+ x: number;
1834
+ y: number;
1835
+ z?: number | undefined;
1836
+ }>;
1837
+ /**
1838
+ * Camera behaviors, unifying the former per-host vocab (2D `camera` string +
1839
+ * 3D `cameraMode`). `isometric`/`top-down` are fixed framings; `follow`/`chase`
1840
+ * track a target; `perspective` is the 3D dramatic framing.
1841
+ */
1842
+ declare const CAMERA_MODES: readonly ["isometric", "perspective", "top-down", "follow", "chase"];
1843
+ type CameraMode = (typeof CAMERA_MODES)[number];
1844
+ declare const CameraModeSchema: z.ZodEnum<["isometric", "perspective", "top-down", "follow", "chase"]>;
1845
+ /**
1846
+ * A neutral camera pose shared by the 2D and 3D canvas hosts, so `type: canvas`
1847
+ * carries one camera object regardless of painter. `pos`/`target` are `ScenePos`
1848
+ * (logical scene space, not pixels); `zoom` scales the view (the former `scale`);
1849
+ * `fov` is the 3D field of view; `mode` selects the framing/tracking behavior.
1850
+ * Every field is optional — an omitted camera means the host's default framing.
1851
+ */
1852
+ interface Camera {
1853
+ pos?: ScenePos;
1854
+ target?: ScenePos;
1855
+ zoom?: number;
1856
+ fov?: number;
1857
+ mode?: CameraMode;
1858
+ }
1859
+ declare const CameraSchema: z.ZodObject<{
1860
+ pos: z.ZodOptional<z.ZodObject<{
1861
+ x: z.ZodNumber;
1862
+ y: z.ZodNumber;
1863
+ z: z.ZodOptional<z.ZodNumber>;
1864
+ }, "strip", z.ZodTypeAny, {
1865
+ x: number;
1866
+ y: number;
1867
+ z?: number | undefined;
1868
+ }, {
1869
+ x: number;
1870
+ y: number;
1871
+ z?: number | undefined;
1872
+ }>>;
1873
+ target: z.ZodOptional<z.ZodObject<{
1874
+ x: z.ZodNumber;
1875
+ y: z.ZodNumber;
1876
+ z: z.ZodOptional<z.ZodNumber>;
1877
+ }, "strip", z.ZodTypeAny, {
1878
+ x: number;
1879
+ y: number;
1880
+ z?: number | undefined;
1881
+ }, {
1882
+ x: number;
1883
+ y: number;
1884
+ z?: number | undefined;
1885
+ }>>;
1886
+ zoom: z.ZodOptional<z.ZodNumber>;
1887
+ fov: z.ZodOptional<z.ZodNumber>;
1888
+ mode: z.ZodOptional<z.ZodEnum<["isometric", "perspective", "top-down", "follow", "chase"]>>;
1889
+ }, "strip", z.ZodTypeAny, {
1890
+ target?: {
1891
+ x: number;
1892
+ y: number;
1893
+ z?: number | undefined;
1894
+ } | undefined;
1895
+ pos?: {
1896
+ x: number;
1897
+ y: number;
1898
+ z?: number | undefined;
1899
+ } | undefined;
1900
+ zoom?: number | undefined;
1901
+ fov?: number | undefined;
1902
+ mode?: "isometric" | "perspective" | "top-down" | "follow" | "chase" | undefined;
1903
+ }, {
1904
+ target?: {
1905
+ x: number;
1906
+ y: number;
1907
+ z?: number | undefined;
1908
+ } | undefined;
1909
+ pos?: {
1910
+ x: number;
1911
+ y: number;
1912
+ z?: number | undefined;
1913
+ } | undefined;
1914
+ zoom?: number | undefined;
1915
+ fov?: number | undefined;
1916
+ mode?: "isometric" | "perspective" | "top-down" | "follow" | "chase" | undefined;
1917
+ }>;
1918
+ type SemanticAssetRefInput = z.input<typeof SemanticAssetRefSchema>;
1919
+ type AnimationDefInput = z.input<typeof AnimationDefSchema>;
1920
+ type AssetCatalogEntryInput = z.input<typeof AssetCatalogEntrySchema>;
1921
+ type SpriteSheetAtlasInput = z.input<typeof SpriteSheetAtlasSchema>;
1922
+ /**
1923
+ * Creates a semantic asset key from role and category.
1924
+ *
1925
+ * Generates a unique asset identifier by combining role and category
1926
+ * with a colon separator. Used for asset management and lookup.
1927
+ *
1928
+ * @param {EntityRole} role - Entity role (e.g., 'player', 'enemy')
1929
+ * @param {string} category - Asset category (e.g., 'sprite', 'animation')
1930
+ * @returns {string} Asset key in format 'role:category'
1931
+ *
1932
+ * @example
1933
+ * createAssetKey('player', 'sprite'); // returns 'player:sprite'
1934
+ * createAssetKey('enemy', 'animation'); // returns 'enemy:animation'
1935
+ */
1936
+ declare function createAssetKey(role: EntityRole, category: string): string;
1937
+ /**
1938
+ * Parses an asset key into role and category components.
1939
+ *
1940
+ * Deconstructs an asset key string (format 'role:category') into its
1941
+ * constituent parts. Returns null if the key format is invalid.
1942
+ *
1943
+ * @param {string} key - Asset key in format 'role:category'
1944
+ * @returns {{ role: string; category: string } | null} Parsed components or null
1945
+ *
1946
+ * @example
1947
+ * parseAssetKey('player:sprite'); // returns { role: 'player', category: 'sprite' }
1948
+ * parseAssetKey('enemy:animation'); // returns { role: 'enemy', category: 'animation' }
1949
+ * parseAssetKey('invalid'); // returns null
1950
+ */
1951
+ declare function parseAssetKey(key: string): {
1952
+ role: string;
1953
+ category: string;
1954
+ } | null;
1955
+ /**
1956
+ * Gets common animations for an entity role.
1957
+ *
1958
+ * Returns an array of default animation names appropriate for the
1959
+ * specified entity role. Used for asset configuration and validation.
1960
+ *
1961
+ * @param {EntityRole} role - Entity role
1962
+ * @returns {string[]} Array of default animation names
1963
+ *
1964
+ * @example
1965
+ * getDefaultAnimationsForRole('player'); // returns ['idle', 'run', 'jump', 'fall', 'attack', 'hurt', 'die']
1966
+ * getDefaultAnimationsForRole('enemy'); // returns ['idle', 'walk', 'attack', 'hurt', 'die']
1967
+ */
1968
+ declare function getDefaultAnimationsForRole(role: EntityRole): string[];
1969
+ /**
1970
+ * Validates that an asset reference has required animations.
1971
+ *
1972
+ * Checks if an asset reference contains all required animations.
1973
+ * Returns an error message if validation fails, or null if valid.
1974
+ *
1975
+ * @param {SemanticAssetRef} assetRef - Asset reference to validate
1976
+ * @param {string[]} requiredAnimations - Required animation names
1977
+ * @returns {string | null} Error message or null if valid
1978
+ *
1979
+ * @example
1980
+ * validateAssetAnimations(assetRef, ['idle', 'run']); // returns null if valid
1981
+ * validateAssetAnimations(assetRef, ['missing-animation']); // returns error message
1982
+ */
1983
+ declare function validateAssetAnimations(assetRef: SemanticAssetRef, requiredAnimations: string[]): {
1984
+ valid: boolean;
1985
+ missing: string[];
1986
+ };
1987
+
1988
+ /**
1989
+ * Entity Types for Orbital Units
1990
+ *
1991
+ * Defines the OrbitalEntity type - the nucleus of an Orbital Unit.
1992
+ *
1993
+ * @packageDocumentation
1994
+ */
1995
+
1996
+ /**
1997
+ * Entity persistence types.
1998
+ *
1999
+ * - persistent: Stored in database (has collection)
2000
+ * - runtime: Exists only at runtime (not persisted)
2001
+ */
2002
+ type EntityPersistence = 'persistent' | 'runtime';
2003
+ declare const EntityPersistenceSchema: z.ZodEnum<["persistent", "runtime"]>;
2004
+ /**
2005
+ * OrbitalEntity - the nucleus of an Orbital Unit.
2006
+ *
2007
+ * This is a simplified entity definition optimized for orbital composition.
2008
+ * Collection names are derived automatically from persistence type if not provided.
2009
+ */
2010
+ type OrbitalEntity = {
2011
+ /** V4 dual-carry id sibling of `name` — optional until the Phase-7 flip. */
2012
+ id?: EntityId;
2013
+ /** Entity name (PascalCase, e.g., "Task", "User") */
2014
+ name: string;
2015
+ /** Entity persistence type (defaults to 'persistent' if not specified) */
2016
+ persistence?: EntityPersistence;
2017
+ /** Whether this entity's state is shared across all bound traits (vs per-trait copy). Orthogonal to persistence. */
2018
+ shared?: boolean;
2019
+ /**
2020
+ * Whether this entity types the ambient `@user` viewer. Orthogonal to both
2021
+ * `persistence` and `shared`: `[persistent: people, identity]` is an
2022
+ * app-owned user directory, `[runtime, identity]` the provider-supplied
2023
+ * current viewer. At most one per composed program.
2024
+ */
2025
+ identity?: boolean;
2026
+ /** Collection name (auto-derived if not provided for persistent entities) */
2027
+ collection?: string;
2028
+ /** Entity fields */
2029
+ fields: EntityField[];
2030
+ /** Pre-authored instances (seed data or static reference data) */
2031
+ instances?: EntityRow[];
2032
+ /** Auto-add createdAt/updatedAt timestamps */
2033
+ timestamps?: boolean;
2034
+ /** Soft delete support */
2035
+ softDelete?: boolean;
2036
+ /** Human-readable description */
2037
+ description?: string;
2038
+ /** Visual prompt for AI generation */
2039
+ visual_prompt?: string;
2040
+ /** Semantic asset reference for visual representation (games) */
2041
+ assetRef?: SemanticAssetRef;
2042
+ };
2043
+ declare const OrbitalEntitySchema: z.ZodObject<{
2044
+ name: z.ZodString;
2045
+ persistence: z.ZodDefault<z.ZodEnum<["persistent", "runtime"]>>;
2046
+ shared: z.ZodOptional<z.ZodBoolean>;
2047
+ identity: z.ZodOptional<z.ZodBoolean>;
2048
+ collection: z.ZodOptional<z.ZodString>;
2049
+ fields: z.ZodArray<z.ZodType<EntityField, z.ZodTypeDef, unknown>, "many">;
2050
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2051
+ timestamps: z.ZodOptional<z.ZodBoolean>;
2052
+ softDelete: z.ZodOptional<z.ZodBoolean>;
2053
+ description: z.ZodOptional<z.ZodString>;
2054
+ visual_prompt: z.ZodOptional<z.ZodString>;
2055
+ assetRef: z.ZodOptional<z.ZodObject<{
2056
+ role: z.ZodString;
2057
+ category: z.ZodString;
2058
+ animations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2059
+ style: z.ZodOptional<z.ZodEnum<["pixel", "vector", "hd", "1-bit", "isometric"]>>;
2060
+ variant: z.ZodOptional<z.ZodString>;
2061
+ dimension: z.ZodOptional<z.ZodEnum<["2d", "3d"]>>;
2062
+ aspect: z.ZodOptional<z.ZodEnum<["1:1", "16:9", "5:7", "8:1"]>>;
2063
+ }, "strip", z.ZodTypeAny, {
2064
+ role: string;
2065
+ category: string;
2066
+ animations?: string[] | undefined;
2067
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
2068
+ variant?: string | undefined;
2069
+ dimension?: "2d" | "3d" | undefined;
2070
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
2071
+ }, {
2072
+ role: string;
2073
+ category: string;
2074
+ animations?: string[] | undefined;
2075
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
2076
+ variant?: string | undefined;
2077
+ dimension?: "2d" | "3d" | undefined;
2078
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
2079
+ }>>;
2080
+ }, "strip", z.ZodTypeAny, {
2081
+ name: string;
2082
+ persistence: "persistent" | "runtime";
2083
+ fields: EntityField[];
2084
+ description?: string | undefined;
2085
+ shared?: boolean | undefined;
2086
+ identity?: boolean | undefined;
2087
+ collection?: string | undefined;
2088
+ instances?: Record<string, unknown>[] | undefined;
2089
+ timestamps?: boolean | undefined;
2090
+ softDelete?: boolean | undefined;
2091
+ visual_prompt?: string | undefined;
2092
+ assetRef?: {
2093
+ role: string;
2094
+ category: string;
2095
+ animations?: string[] | undefined;
2096
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
2097
+ variant?: string | undefined;
2098
+ dimension?: "2d" | "3d" | undefined;
2099
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
2100
+ } | undefined;
2101
+ }, {
2102
+ name: string;
2103
+ fields: unknown[];
2104
+ description?: string | undefined;
2105
+ persistence?: "persistent" | "runtime" | undefined;
2106
+ shared?: boolean | undefined;
2107
+ identity?: boolean | undefined;
2108
+ collection?: string | undefined;
2109
+ instances?: Record<string, unknown>[] | undefined;
2110
+ timestamps?: boolean | undefined;
2111
+ softDelete?: boolean | undefined;
2112
+ visual_prompt?: string | undefined;
2113
+ assetRef?: {
2114
+ role: string;
2115
+ category: string;
2116
+ animations?: string[] | undefined;
2117
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
2118
+ variant?: string | undefined;
2119
+ dimension?: "2d" | "3d" | undefined;
2120
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
2121
+ } | undefined;
2122
+ }>;
2123
+ type OrbitalEntityInput = z.input<typeof OrbitalEntitySchema>;
2124
+ /** Alias for OrbitalEntity - preferred name */
2125
+ type Entity = OrbitalEntity;
2126
+ /** Alias for OrbitalEntitySchema - preferred name */
2127
+ declare const EntitySchema: z.ZodObject<{
2128
+ name: z.ZodString;
2129
+ persistence: z.ZodDefault<z.ZodEnum<["persistent", "runtime"]>>;
2130
+ shared: z.ZodOptional<z.ZodBoolean>;
2131
+ identity: z.ZodOptional<z.ZodBoolean>;
2132
+ collection: z.ZodOptional<z.ZodString>;
2133
+ fields: z.ZodArray<z.ZodType<EntityField, z.ZodTypeDef, unknown>, "many">;
2134
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2135
+ timestamps: z.ZodOptional<z.ZodBoolean>;
2136
+ softDelete: z.ZodOptional<z.ZodBoolean>;
2137
+ description: z.ZodOptional<z.ZodString>;
2138
+ visual_prompt: z.ZodOptional<z.ZodString>;
2139
+ assetRef: z.ZodOptional<z.ZodObject<{
2140
+ role: z.ZodString;
2141
+ category: z.ZodString;
2142
+ animations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2143
+ style: z.ZodOptional<z.ZodEnum<["pixel", "vector", "hd", "1-bit", "isometric"]>>;
2144
+ variant: z.ZodOptional<z.ZodString>;
2145
+ dimension: z.ZodOptional<z.ZodEnum<["2d", "3d"]>>;
2146
+ aspect: z.ZodOptional<z.ZodEnum<["1:1", "16:9", "5:7", "8:1"]>>;
2147
+ }, "strip", z.ZodTypeAny, {
2148
+ role: string;
2149
+ category: string;
2150
+ animations?: string[] | undefined;
2151
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
2152
+ variant?: string | undefined;
2153
+ dimension?: "2d" | "3d" | undefined;
2154
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
2155
+ }, {
2156
+ role: string;
2157
+ category: string;
2158
+ animations?: string[] | undefined;
2159
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
2160
+ variant?: string | undefined;
2161
+ dimension?: "2d" | "3d" | undefined;
2162
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
2163
+ }>>;
2164
+ }, "strip", z.ZodTypeAny, {
2165
+ name: string;
2166
+ persistence: "persistent" | "runtime";
2167
+ fields: EntityField[];
2168
+ description?: string | undefined;
2169
+ shared?: boolean | undefined;
2170
+ identity?: boolean | undefined;
2171
+ collection?: string | undefined;
2172
+ instances?: Record<string, unknown>[] | undefined;
2173
+ timestamps?: boolean | undefined;
2174
+ softDelete?: boolean | undefined;
2175
+ visual_prompt?: string | undefined;
2176
+ assetRef?: {
2177
+ role: string;
2178
+ category: string;
2179
+ animations?: string[] | undefined;
2180
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
2181
+ variant?: string | undefined;
2182
+ dimension?: "2d" | "3d" | undefined;
2183
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
2184
+ } | undefined;
2185
+ }, {
2186
+ name: string;
2187
+ fields: unknown[];
2188
+ description?: string | undefined;
2189
+ persistence?: "persistent" | "runtime" | undefined;
2190
+ shared?: boolean | undefined;
2191
+ identity?: boolean | undefined;
2192
+ collection?: string | undefined;
2193
+ instances?: Record<string, unknown>[] | undefined;
2194
+ timestamps?: boolean | undefined;
2195
+ softDelete?: boolean | undefined;
2196
+ visual_prompt?: string | undefined;
2197
+ assetRef?: {
2198
+ role: string;
2199
+ category: string;
2200
+ animations?: string[] | undefined;
2201
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
2202
+ variant?: string | undefined;
2203
+ dimension?: "2d" | "3d" | undefined;
2204
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
2205
+ } | undefined;
2206
+ }>;
2207
+ /**
2208
+ * Derives the collection name for a persistent entity.
2209
+ *
2210
+ * Generates the database collection name by converting the entity name
2211
+ * to lowercase and adding an 's' suffix (simple pluralization).
2212
+ * Returns undefined for non-persistent (runtime) entities.
2213
+ *
2214
+ * @param {OrbitalEntity} entity - Entity to derive collection name for
2215
+ * @returns {string | undefined} Collection name or undefined for non-persistent entities
2216
+ *
2217
+ * @example
2218
+ * deriveCollection({ name: 'User', persistence: 'persistent' }); // returns 'users'
2219
+ * deriveCollection({ name: 'Task', persistence: 'runtime' }); // returns undefined
2220
+ */
2221
+ declare function deriveCollection(entity: OrbitalEntity): string | undefined;
2222
+ /**
2223
+ * Checks if an entity is runtime-only (not persisted).
2224
+ *
2225
+ * Type guard to determine if an entity exists only at runtime
2226
+ * and is not stored in the database.
2227
+ *
2228
+ * @param {OrbitalEntity} entity - Entity to check
2229
+ * @returns {boolean} True if entity is runtime-only, false otherwise
2230
+ *
2231
+ * @example
2232
+ * isRuntimeEntity({ persistence: 'runtime' }); // returns true
2233
+ * isRuntimeEntity({ persistence: 'persistent' }); // returns false
2234
+ */
2235
+ declare function isRuntimeEntity(entity: OrbitalEntity): boolean;
2236
+ /**
2237
+ * Checks whether an entity's persistence mode allows `persistence` /
2238
+ * `collection` overrides at the factory call site.
2239
+ *
2240
+ * Only `persistent` entities (explicit or default) support these overrides.
2241
+ * Runtime entities are fixed; callers must not expose `persistence` or
2242
+ * `collection` params for them.
2243
+ *
2244
+ * @param persistence - The entity persistence mode (undefined = default persistent)
2245
+ * @returns True when overrides are allowed, false otherwise
2246
+ *
2247
+ * @example
2248
+ * persistenceModeAllowsOverrides('persistent'); // returns true
2249
+ * persistenceModeAllowsOverrides('runtime'); // returns false
2250
+ * persistenceModeAllowsOverrides(undefined); // returns true (default persistent)
2251
+ */
2252
+ declare function persistenceModeAllowsOverrides(persistence: EntityPersistence | undefined): boolean;
2253
+ /**
2254
+ * A single field value at runtime.
2255
+ * Union of all possible types from FieldType: string, number, boolean, date, array, nested.
2256
+ * The nested-record branch's index signature tolerates `undefined` so that
2257
+ * TypeScript optional properties (`x?: string`, carrying `string | undefined`)
2258
+ * on EntityRow extenders typecheck without ceremony. At JSON serialization
2259
+ * time `undefined` is equivalent to "key absent" and never appears on the
2260
+ * wire; the inclusion here is a pure type-surface accommodation.
2261
+ */
2262
+ type FieldValue = string | number | boolean | Date | null | string[] | FieldValue[] | {
2263
+ [key: string]: FieldValue | undefined;
2264
+ };
2265
+ /**
2266
+ * Runtime guard for `FieldValue` — narrows interpreter-produced `unknown`
2267
+ * values at typed substrate boundaries (e.g. `IntegrationContext.http` body).
2268
+ */
2269
+ declare function isFieldValue(value: unknown): value is FieldValue;
2270
+ /**
2271
+ * One instance of an entity with actual field values.
2272
+ * The shape is determined by the Entity definition at schema time.
2273
+ *
2274
+ * @example
2275
+ * // Entity defines: Patient { fullName: string, age: number, active: boolean }
2276
+ * // EntityRow is: { id: "p1", fullName: "Sarah", age: 34, active: true }
2277
+ */
2278
+ type EntityRow = {
2279
+ id?: string;
2280
+ } & Record<string, FieldValue | undefined>;
2281
+ /**
2282
+ * A field-TYPED `EntityRow` — the SINGLE entity type, refined with a concrete
2283
+ * field SHAPE `S`. Non-optional members of `S` are REQUIRED, each with its real
2284
+ * type; the result stays `& EntityRow`, so the index signature is intact and
2285
+ * every other field is still field-open — any domain entity that provides those
2286
+ * fields satisfies it.
2287
+ *
2288
+ * One declaration, two jobs: (1) TypeScript enforces the bound entity has the
2289
+ * fields WITH their types (a behavior binding a thinner/mistyped entity fails to
2290
+ * typecheck); and (2) pattern-sync reads the same type and writes the entity
2291
+ * prop's field shape (`properties` + `requiredFields`) onto the registry, so
2292
+ * lolo-ui emits a COMPLETE `entity { … }` (every field, typed + demo-seeded) and
2293
+ * the `ORB_X_ENTITY_PROP_CONTRACT` validator rejects an incompatible bind at
2294
+ * `orbital validate`. (A raw `EntityRow & { rating: number }` intersection is
2295
+ * equivalent for one-off shapes.)
2296
+ *
2297
+ * @example
2298
+ * // HeroOrganism renders entity.title / entity.subtitle:
2299
+ * entity?: EntityWith<{ title: string; subtitle?: string }>;
2300
+ * // entity.title → string (required)
2301
+ * // entity.subtitle → string | undefined (optional)
2302
+ * // entity.other → FieldValue | undefined (still field-open)
2303
+ */
2304
+ type EntityWith<S extends object> = EntityRow & S;
2305
+ /**
2306
+ * Collection of entity instances keyed by entity name.
2307
+ * Used by OrbPreview mockData, OrbitalServerRuntime state, data grids, etc.
2308
+ *
2309
+ * @example
2310
+ * const data: EntityData = {
2311
+ * Patient: [{ id: "1", fullName: "Sarah", age: 34 }],
2312
+ * QueueEntry: [{ id: "1", patientName: "Sarah", waitMinutes: 12 }],
2313
+ * };
2314
+ */
2315
+ type EntityData = Record<string, EntityRow[]>;
2316
+
749
2317
  /**
750
2318
  * Pattern Types (Auto-Generated)
751
2319
  *
752
2320
  * DO NOT EDIT MANUALLY — regenerated by almadar-pattern-sync `patterns` command.
753
2321
  *
754
- * Generated: 2026-07-28T10:40:00.682Z
755
- * Pattern count: 266
2322
+ * Generated: 2026-07-28T16:34:50.910Z
2323
+ * Pattern count: 267
756
2324
  */
757
2325
 
758
2326
  /**
@@ -764,7 +2332,7 @@ type PatternPropValue = Record<string, FieldValue | undefined>;
764
2332
  * All valid pattern type names from @almadar/core/patterns registry.
765
2333
  * Use this type in render-ui effects for compile-time validation.
766
2334
  */
767
- type PatternType = 'about-page-template' | 'accordion' | 'action-palette' | 'action-tile' | 'activation-block' | 'alert' | 'algorithm-canvas' | 'animated-counter' | 'animated-graphic' | 'animated-reveal' | 'article-section' | 'aside' | 'atlas-image' | 'atlas-panel' | 'auth-layout' | 'avatar' | 'badge' | 'behavior-view' | 'biology-canvas' | 'bloom-quiz-block' | 'book-chapter-view' | 'book-cover-page' | 'book-nav-bar' | 'book-table-of-contents' | 'book-viewer' | 'box' | 'branching-logic-builder' | 'breadcrumb' | 'button' | 'calendar-grid' | 'canvas' | 'canvas-2d' | 'card' | 'carousel' | 'case-study-card' | 'case-study-organism' | 'center' | 'chart' | 'chart-legend' | 'chat-bar' | 'checkbox' | 'chemistry-canvas' | 'choice-button' | 'code-block' | 'code-runner-panel' | 'community-links' | 'conditional-wrapper' | 'confetti-effect' | 'confirm-dialog' | 'connection-block' | 'container' | 'content-renderer' | 'content-section' | 'control-button' | 'control-grid' | 'counter-template' | 'cta-banner' | 'dashboard-grid' | 'dashboard-layout' | 'data-grid' | 'data-list' | 'date-range-picker' | 'date-range-selector' | 'day-cell' | 'detail-panel' | 'dialog' | 'dialogue-bubble' | 'divider' | 'doc-breadcrumb' | 'doc-pagination' | 'doc-search' | 'doc-sidebar' | 'doc-toc' | 'document-viewer' | 'draw-shape' | 'draw-shape-layer' | 'draw-sprite' | 'draw-sprite-layer' | 'draw-text' | 'draw-text-layer' | 'drawer' | 'drawer-slot' | 'edge-decoration' | 'empty-state' | 'entity-cards' | 'entity-list' | 'entity-table' | 'error-boundary' | 'error-state' | 'feature-card' | 'feature-detail-page-template' | 'feature-grid' | 'feature-grid-organism' | 'file-tree' | 'filter-group' | 'filter-pill' | 'flex' | 'flip-card' | 'flip-container' | 'floating-action-button' | 'form' | 'form-actions' | 'form-field' | 'form-layout' | 'form-section' | 'form-section-header' | 'game-audio-toggle' | 'game-hud' | 'game-icon' | 'game-menu' | 'game-shell' | 'generic-app-template' | 'geometric-pattern' | 'gradient-divider' | 'graph-canvas' | 'graph-view' | 'grid' | 'header' | 'health-bar' | 'hero-organism' | 'hero-section' | 'hstack' | 'icon' | 'import-preview-tree' | 'import-progress' | 'import-source-picker' | 'infinite-scroll-sentinel' | 'input' | 'input-group' | 'install-box' | 'jazari-state-machine' | 'label' | 'landing-page-template' | 'law-reference-tooltip' | 'learning-canvas' | 'lightbox' | 'likert-scale' | 'line-chart' | 'loading-state' | 'map-view' | 'markdown-content' | 'marketing-footer' | 'marketing-stat-card' | 'master-detail' | 'master-detail-layout' | 'math-canvas' | 'matrix-question' | 'media-gallery' | 'menu' | 'meter' | 'modal' | 'modal-slot' | 'module-card' | 'navigation' | 'notification' | 'number-stepper' | 'option-constraint-group' | 'orbital-visualization' | 'overlay' | 'page-header' | 'page-transition' | 'pagination' | 'pattern-tile' | 'physics-canvas' | 'popover' | 'positioned-canvas' | 'presence' | 'pricing-card' | 'pricing-grid' | 'pricing-organism' | 'pricing-page-template' | 'progress-bar' | 'progress-dots' | 'pull-quote' | 'pull-to-refresh' | 'qr-scanner' | 'quiz-block' | 'radio' | 'range-slider' | 'reflection-block' | 'relation-select' | 'repeatable-form-section' | 'reply-tree' | 'rich-block-editor' | 'runtime-debugger' | 'scaled-diagram' | 'score-display' | 'search-input' | 'section' | 'section-header' | 'segment-renderer' | 'select' | 'sequence-bar' | 'service-catalog' | 'showcase-card' | 'showcase-organism' | 'side-panel' | 'sidebar' | 'signature-pad' | 'simple-grid' | 'skeleton' | 'social-proof' | 'sortable-list' | 'spacer' | 'sparkline' | 'spinner' | 'split' | 'split-pane' | 'split-section' | 'stack' | 'star-rating' | 'stat-badge' | 'stat-card' | 'stat-display' | 'state-graph' | 'state-json-view' | 'state-machine-view' | 'stats-grid' | 'stats-organism' | 'status-dot' | 'step-flow' | 'step-flow-organism' | 'subagent-trace-panel' | 'svg-branch' | 'svg-connection' | 'svg-flow' | 'svg-grid' | 'svg-lobe' | 'svg-mesh' | 'svg-morph' | 'svg-node' | 'svg-pulse' | 'svg-ring' | 'svg-shield' | 'svg-stack' | 'swipeable-row' | 'switch' | 'tabbed-container' | 'table-view' | 'tabs' | 'tag-cloud' | 'tag-input' | 'team-card' | 'team-organism' | 'text-highlight' | 'textarea' | 'theme-toggle' | 'time-slot-cell' | 'timeline' | 'timer-display' | 'toast-slot' | 'tooltip' | 'trait-frame' | 'trait-slot' | 'trend-indicator' | 'typewriter-text' | 'typography' | 'ui-slot-renderer' | 'upload-drop-zone' | 'version-diff' | 'violation-alert' | 'vote-stack' | 'vstack' | 'wizard-container' | 'wizard-navigation' | 'wizard-progress';
2335
+ type PatternType = 'about-page-template' | 'accordion' | 'action-palette' | 'action-tile' | 'activation-block' | 'alert' | 'algorithm-canvas' | 'animated-counter' | 'animated-graphic' | 'animated-reveal' | 'article-section' | 'aside' | 'atlas-image' | 'atlas-panel' | 'auth-layout' | 'avatar' | 'badge' | 'behavior-view' | 'biology-canvas' | 'bloom-quiz-block' | 'book-chapter-view' | 'book-cover-page' | 'book-nav-bar' | 'book-table-of-contents' | 'book-viewer' | 'box' | 'branching-logic-builder' | 'breadcrumb' | 'button' | 'calendar-grid' | 'canvas' | 'canvas-2d' | 'card' | 'carousel' | 'case-study-card' | 'case-study-organism' | 'center' | 'chart' | 'chart-legend' | 'chat-bar' | 'checkbox' | 'chemistry-canvas' | 'choice-button' | 'code-block' | 'code-runner-panel' | 'community-links' | 'conditional-wrapper' | 'confetti-effect' | 'confirm-dialog' | 'connection-block' | 'container' | 'content-renderer' | 'content-section' | 'control-button' | 'control-grid' | 'counter-template' | 'cta-banner' | 'dashboard-grid' | 'dashboard-layout' | 'data-grid' | 'data-list' | 'date-range-picker' | 'date-range-selector' | 'day-cell' | 'detail-panel' | 'dialog' | 'dialogue-bubble' | 'divider' | 'doc-breadcrumb' | 'doc-pagination' | 'doc-search' | 'doc-sidebar' | 'doc-toc' | 'document-viewer' | 'draw-group' | 'draw-shape' | 'draw-shape-layer' | 'draw-sprite' | 'draw-sprite-layer' | 'draw-text' | 'draw-text-layer' | 'drawer' | 'drawer-slot' | 'edge-decoration' | 'empty-state' | 'entity-cards' | 'entity-list' | 'entity-table' | 'error-boundary' | 'error-state' | 'feature-card' | 'feature-detail-page-template' | 'feature-grid' | 'feature-grid-organism' | 'file-tree' | 'filter-group' | 'filter-pill' | 'flex' | 'flip-card' | 'flip-container' | 'floating-action-button' | 'form' | 'form-actions' | 'form-field' | 'form-layout' | 'form-section' | 'form-section-header' | 'game-audio-toggle' | 'game-hud' | 'game-icon' | 'game-menu' | 'game-shell' | 'generic-app-template' | 'geometric-pattern' | 'gradient-divider' | 'graph-canvas' | 'graph-view' | 'grid' | 'header' | 'health-bar' | 'hero-organism' | 'hero-section' | 'hstack' | 'icon' | 'import-preview-tree' | 'import-progress' | 'import-source-picker' | 'infinite-scroll-sentinel' | 'input' | 'input-group' | 'install-box' | 'jazari-state-machine' | 'label' | 'landing-page-template' | 'law-reference-tooltip' | 'learning-canvas' | 'lightbox' | 'likert-scale' | 'line-chart' | 'loading-state' | 'map-view' | 'markdown-content' | 'marketing-footer' | 'marketing-stat-card' | 'master-detail' | 'master-detail-layout' | 'math-canvas' | 'matrix-question' | 'media-gallery' | 'menu' | 'meter' | 'modal' | 'modal-slot' | 'module-card' | 'navigation' | 'notification' | 'number-stepper' | 'option-constraint-group' | 'orbital-visualization' | 'overlay' | 'page-header' | 'page-transition' | 'pagination' | 'pattern-tile' | 'physics-canvas' | 'popover' | 'positioned-canvas' | 'presence' | 'pricing-card' | 'pricing-grid' | 'pricing-organism' | 'pricing-page-template' | 'progress-bar' | 'progress-dots' | 'pull-quote' | 'pull-to-refresh' | 'qr-scanner' | 'quiz-block' | 'radio' | 'range-slider' | 'reflection-block' | 'relation-select' | 'repeatable-form-section' | 'reply-tree' | 'rich-block-editor' | 'runtime-debugger' | 'scaled-diagram' | 'score-display' | 'search-input' | 'section' | 'section-header' | 'segment-renderer' | 'select' | 'sequence-bar' | 'service-catalog' | 'showcase-card' | 'showcase-organism' | 'side-panel' | 'sidebar' | 'signature-pad' | 'simple-grid' | 'skeleton' | 'social-proof' | 'sortable-list' | 'spacer' | 'sparkline' | 'spinner' | 'split' | 'split-pane' | 'split-section' | 'stack' | 'star-rating' | 'stat-badge' | 'stat-card' | 'stat-display' | 'state-graph' | 'state-json-view' | 'state-machine-view' | 'stats-grid' | 'stats-organism' | 'status-dot' | 'step-flow' | 'step-flow-organism' | 'subagent-trace-panel' | 'svg-branch' | 'svg-connection' | 'svg-flow' | 'svg-grid' | 'svg-lobe' | 'svg-mesh' | 'svg-morph' | 'svg-node' | 'svg-pulse' | 'svg-ring' | 'svg-shield' | 'svg-stack' | 'swipeable-row' | 'switch' | 'tabbed-container' | 'table-view' | 'tabs' | 'tag-cloud' | 'tag-input' | 'team-card' | 'team-organism' | 'text-highlight' | 'textarea' | 'theme-toggle' | 'time-slot-cell' | 'timeline' | 'timer-display' | 'toast-slot' | 'tooltip' | 'trait-frame' | 'trait-slot' | 'trend-indicator' | 'typewriter-text' | 'typography' | 'ui-slot-renderer' | 'upload-drop-zone' | 'version-diff' | 'violation-alert' | 'vote-stack' | 'vstack' | 'wizard-container' | 'wizard-navigation' | 'wizard-progress';
768
2336
  /**
769
2337
  * Pattern props map — each pattern type maps to its valid props interface.
770
2338
  */
@@ -1599,6 +3167,8 @@ interface PatternPropsMap {
1599
3167
  children?: ((...args: unknown[]) => unknown) | string | SExpr;
1600
3168
  renderItem?: ((...args: unknown[]) => unknown) | string | SExpr;
1601
3169
  pageSize?: number | string | SExpr;
3170
+ sortBy?: string | SExpr;
3171
+ sortDirection?: string | SExpr;
1602
3172
  look?: string | SExpr;
1603
3173
  };
1604
3174
  'date-range-picker': {
@@ -1725,6 +3295,15 @@ interface PatternPropsMap {
1725
3295
  error?: PatternPropValue | string | SExpr;
1726
3296
  className?: string | SExpr;
1727
3297
  };
3298
+ 'draw-group': {
3299
+ type: 'draw-group';
3300
+ id?: string | SExpr;
3301
+ position: PatternPropValue | string | SExpr;
3302
+ scale?: number | string | SExpr;
3303
+ rotate?: number | string | SExpr;
3304
+ opacity?: number | string | SExpr;
3305
+ items: unknown[] | string | SExpr;
3306
+ };
1728
3307
  'draw-shape': {
1729
3308
  type: 'draw-shape';
1730
3309
  id?: string | SExpr;
@@ -1738,6 +3317,7 @@ interface PatternPropsMap {
1738
3317
  offsetX?: number | string | SExpr;
1739
3318
  offsetY?: number | string | SExpr;
1740
3319
  points?: unknown[] | string | SExpr;
3320
+ d?: string | SExpr;
1741
3321
  fill?: string | SExpr;
1742
3322
  stroke?: string | SExpr;
1743
3323
  strokeWidth?: number | string | SExpr;
@@ -4894,4 +6474,4 @@ interface RenderUINode {
4894
6474
  renderItem?: RenderUINode;
4895
6475
  }
4896
6476
 
4897
- export { RestServiceDefSchema as $, type AnyPatternConfig as A, type BehaviorEffect as B, type CallServiceConfig as C, type DerefEffect as D, type Effect as E, type FetchEffect as F, type PatternProps as G, type PatternPropsMap as H, type PatternType as I, type PersistData as J, type PersistEffect as K, type LlmEffect as L, type McpServiceDef as M, type NavigateEffect as N, type OsEffect as O, PATTERN_TYPES as P, type PersistEmitConfig as Q, type RefEffect as R, type RenderBinding as S, type RenderChildrenMap as T, type RenderItemLambda as U, type RenderUIEffect as V, type RenderUINode as W, type ResolvedPatternProps as X, type RestAuthConfig as Y, RestAuthConfigSchema as Z, type RestServiceDef as _, type AgentEffect as a, SERVICE_TYPES as a0, type ServiceDefinition as a1, ServiceDefinitionSchema as a2, type ServiceParams as a3, type ServiceParamsValue as a4, type ServiceRef as a5, type ServiceRefObject as a6, ServiceRefObjectSchema as a7, ServiceRefSchema as a8, ServiceRefStringSchema as a9, findService as aA, getServiceNames as aB, hasService as aC, isEffect as aD, isMcpService as aE, isRestService as aF, isSExprEffect as aG, isServiceReference as aH, isServiceReferenceObject as aI, isSocketService as aJ, isValidPatternType as aK, navigate as aL, notify as aM, parseServiceRef as aN, persist as aO, ref as aP, renderUI as aQ, set as aR, spawn as aS, swap as aT, watch as aU, type ServiceType as aa, ServiceTypeSchema as ab, type SessionEffect as ac, type SetEffect as ad, type SocketEvents as ae, SocketEventsSchema as af, type SocketServiceDef as ag, SocketServiceDefSchema as ah, type SpawnEffect as ai, type SwapEffect as aj, type TraceEffect as ak, type TrainConfig as al, type TrainEffect as am, type TypedEffect as an, type UISlot as ao, UISlotSchema as ap, UI_SLOTS as aq, type ValidateEffect as ar, type WatchEffect as as, type WatchOptions as at, atomic as au, callService as av, deref as aw, despawn as ax, doEffects as ay, emit as az, type ApplicationEffect as b, type AtomicEffect as c, type CallServiceEffect as d, type CheckpointLoadEffect as e, type CheckpointSaveEffect as f, type ComposeEffect as g, type DespawnEffect as h, type DoEffect as i, type EffectInput as j, EffectSchema as k, type EmitConfig as l, type EmitEffect as m, type EvaluateConfig as n, type EvaluateEffect as o, type FetchOptions as p, type FetchResult as q, type ForwardConfig as r, type ForwardEffect as s, type LogEffect as t, McpServiceDefSchema as u, type MemoryEffect as v, type NnConfig as w, type NnLayer as x, type NotifyEffect as y, type PatternConfig as z };
6477
+ export { type CheckpointLoadEffect as $, type AnyPatternConfig as A, type AssetCatalogEntryInput as B, AssetCatalogEntrySchema as C, AssetCatalogSchema as D, type EntityField as E, type FieldValue as F, type AssetDimension as G, AssetDimensionSchema as H, type IdentityLedger as I, type JsonValue as J, AssetSchema as K, type AssetUrl as L, type AtomicEffect as M, type BehaviorEffect as N, type OrbitalId as O, type PageId as P, CAMERA_MODES as Q, type RelationConfig as R, type ServiceRef as S, type TraitId as T, type UISlot as U, type CallServiceConfig as V, type CallServiceEffect as W, type Camera as X, type CameraMode as Y, CameraModeSchema as Z, CameraSchema as _, type EntityPersistence as a, type PatternType as a$, type CheckpointSaveEffect as a0, type ComposeEffect as a1, type DerefEffect as a2, type DespawnEffect as a3, type DoEffect as a4, ENTITY_ROLES as a5, type EffectInput as a6, EffectSchema as a7, type EmitConfig as a8, type EmitEffect as a9, type JsonObject as aA, type LedgerEntry as aB, LedgerEntrySchema as aC, type LedgerKind as aD, LedgerKindSchema as aE, type LlmEffect as aF, type LogEffect as aG, type McpServiceDef as aH, McpServiceDefSchema as aI, type MemoryEffect as aJ, type NavigateEffect as aK, type NnConfig as aL, type NnLayer as aM, type NotifyEffect as aN, type ObjectEntityField as aO, type OrbitalEntity as aP, type OrbitalEntityInput as aQ, OrbitalEntitySchema as aR, OrbitalIdSchema as aS, type OsEffect as aT, PATTERN_TYPES as aU, PageIdSchema as aV, type PaletteEntryId as aW, PaletteEntryIdSchema as aX, type PatternConfig as aY, type PatternProps as aZ, type PatternPropsMap as a_, type EntityData as aa, type EntityFieldInput as ab, EntityFieldSchema as ac, EntityIdSchema as ad, EntityPersistenceSchema as ae, type EntityRole as af, EntityRoleSchema as ag, EntitySchema as ah, type EntityWith as ai, type EnumEntityField as aj, type EvaluateConfig as ak, type EvaluateEffect as al, EventIdSchema as am, FIELD_TYPES as an, type FetchEffect as ao, type FetchOptions as ap, type FetchResult as aq, type Field as ar, FieldSchema as as, type FieldType as at, FieldTypeSchema as au, type ForwardConfig as av, type ForwardEffect as aw, type IdForKind as ax, type IdKind as ay, IdentityLedgerSchema as az, type EventId as b, VISUAL_STYLES as b$, type PersistData as b0, type PersistEffect as b1, type PersistEmitConfig as b2, type RefEffect as b3, RelationConfigSchema as b4, type RelationEntityField as b5, type RenderChildrenMap as b6, type RenderItemLambda as b7, type RenderUINode as b8, type ResolvedPatternProps as b9, type SetEffect as bA, type SocketEvents as bB, SocketEventsSchema as bC, type SocketServiceDef as bD, SocketServiceDefSchema as bE, type SpawnEffect as bF, type SpriteDirection as bG, SpriteDirectionSchema as bH, type SpriteSheetAtlas as bI, type SpriteSheetAtlasInput as bJ, SpriteSheetAtlasSchema as bK, type SubTexture as bL, SubTextureSchema as bM, type SwapEffect as bN, type TextureAtlas as bO, TextureAtlasSchema as bP, type ThemeId as bQ, ThemeIdSchema as bR, type Tilesheet as bS, TilesheetSchema as bT, type TraceEffect as bU, type TrainConfig as bV, type TrainEffect as bW, TraitIdSchema as bX, type TypedEffect as bY, UISlotSchema as bZ, UI_SLOTS as b_, type RestAuthConfig as ba, RestAuthConfigSchema as bb, type RestServiceDef as bc, RestServiceDefSchema as bd, SEMANTIC_STRING_TYPES as be, SERVICE_TYPES as bf, SPRITE_DIRECTIONS as bg, type ScalarEntityField as bh, type ScenePos as bi, ScenePosSchema as bj, type SemanticAssetRef as bk, type SemanticAssetRefInput as bl, SemanticAssetRefSchema as bm, type SemanticStringType as bn, ServiceDefinitionSchema as bo, type ServiceId as bp, ServiceIdSchema as bq, type ServiceParams as br, type ServiceParamsValue as bs, type ServiceRefObject as bt, ServiceRefObjectSchema as bu, ServiceRefSchema as bv, ServiceRefStringSchema as bw, type ServiceType as bx, ServiceTypeSchema as by, type SessionEffect as bz, type Effect as c, persistenceModeAllowsOverrides as c$, type ValidateEffect as c0, type VisualStyle as c1, VisualStyleSchema as c2, type WatchEffect as c3, type WatchOptions as c4, asEntityId as c5, asEventId as c6, asOrbitalId as c7, asPageId as c8, asPaletteEntryId as c9, isOrbitalId as cA, isPageId as cB, isPaletteEntryId as cC, isPhoneValue as cD, isRestService as cE, isRuntimeEntity as cF, isSExprEffect as cG, isSemanticStringType as cH, isSemanticStringValue as cI, isServiceId as cJ, isServiceReference as cK, isServiceReferenceObject as cL, isSocketService as cM, isThemeId as cN, isTraitId as cO, isUrlValue as cP, isUuidValue as cQ, isValidPatternType as cR, ledgerCurName as cS, ledgerRename as cT, ledgerResolveName as cU, mintId as cV, navigate as cW, notify as cX, parseAssetKey as cY, parseServiceRef as cZ, persist as c_, asServiceId as ca, asThemeId as cb, asTraitId as cc, atomic as cd, callService as ce, createAssetKey as cf, deref as cg, deriveCollection as ch, despawn as ci, doEffects as cj, emit as ck, findService as cl, getDefaultAnimationsForRole as cm, getServiceNames as cn, hasService as co, idKindOf as cp, idPrefix as cq, isEffect as cr, isEmailValue as cs, isEntityId as ct, isEventId as cu, isFieldValue as cv, isJsonArray as cw, isJsonObject as cx, isJsonPrimitive as cy, isMcpService as cz, type EntityId as d, ref as d0, renderUI as d1, set as d2, spawn as d3, swap as d4, validateAssetAnimations as d5, watch as d6, type Entity as e, type EntityRow as f, type ServiceDefinition as g, type RenderBinding as h, type RenderUIEffect as i, type ToolArgs as j, ANIMATION_NAMES as k, ASSET_ASPECTS as l, ASSET_DIMENSIONS as m, type AgentEffect as n, type AnimationDef as o, type AnimationDefInput as p, AnimationDefSchema as q, type AnimationName as r, AnimationNameSchema as s, type ApplicationEffect as t, type ArrayEntityField as u, type Asset as v, type AssetAspect as w, AssetAspectSchema as x, type AssetCatalog as y, type AssetCatalogEntry as z };