@almadar/core 10.41.0 → 10.43.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,7 +1,6 @@
1
- import { c as EventId, T as TraitId, O as OrbitalId, d as EntityId, P as PageId, e as Entity, a as EntityField } from './entity-DfD-iXkn.js';
2
- import { E as Expression, S as SExpr } from './expression-DpAj1RzP.js';
1
+ import { b as EventId, c as Effect, T as TraitId, O as OrbitalId, d as EntityId, P as PageId, A as AnyPatternConfig, e as Entity, E as EntityField } from './effect-NbTgX2yB.js';
2
+ import { E as Expression, S as SExpr, J as JsonValue } from './expression-Yf7qvvOs.js';
3
3
  import { z } from 'zod';
4
- import { E as Effect, A as AnyPatternConfig } from './effect-DSbx6joe.js';
5
4
 
6
5
  /**
7
6
  * Represents a state in the state machine
@@ -188,7 +187,7 @@ declare const TransitionSchema: z.ZodObject<{
188
187
  event: z.ZodString;
189
188
  eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
190
189
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
191
- effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
190
+ effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">>;
192
191
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
193
192
  }, "strip", z.ZodTypeAny, {
194
193
  event: string;
@@ -197,7 +196,7 @@ declare const TransitionSchema: z.ZodObject<{
197
196
  description?: string | null | undefined;
198
197
  eventId?: EventId | undefined;
199
198
  guard?: SExpr | undefined;
200
- effects?: unknown[][] | undefined;
199
+ effects?: SExpr[][] | undefined;
201
200
  }, {
202
201
  event: string;
203
202
  from: string;
@@ -205,7 +204,7 @@ declare const TransitionSchema: z.ZodObject<{
205
204
  description?: string | null | undefined;
206
205
  eventId?: string | undefined;
207
206
  guard?: SExpr | undefined;
208
- effects?: unknown[][] | undefined;
207
+ effects?: SExpr[][] | undefined;
209
208
  }>;
210
209
  /**
211
210
  * Complete state machine definition
@@ -283,7 +282,7 @@ declare const StateMachineSchema: z.ZodObject<{
283
282
  event: z.ZodString;
284
283
  eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
285
284
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
286
- effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
285
+ effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">>;
287
286
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
288
287
  }, "strip", z.ZodTypeAny, {
289
288
  event: string;
@@ -292,7 +291,7 @@ declare const StateMachineSchema: z.ZodObject<{
292
291
  description?: string | null | undefined;
293
292
  eventId?: EventId | undefined;
294
293
  guard?: SExpr | undefined;
295
- effects?: unknown[][] | undefined;
294
+ effects?: SExpr[][] | undefined;
296
295
  }, {
297
296
  event: string;
298
297
  from: string;
@@ -300,7 +299,7 @@ declare const StateMachineSchema: z.ZodObject<{
300
299
  description?: string | null | undefined;
301
300
  eventId?: string | undefined;
302
301
  guard?: SExpr | undefined;
303
- effects?: unknown[][] | undefined;
302
+ effects?: SExpr[][] | undefined;
304
303
  }>, "many">;
305
304
  guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
306
305
  name: z.ZodString;
@@ -343,7 +342,7 @@ declare const StateMachineSchema: z.ZodObject<{
343
342
  description?: string | null | undefined;
344
343
  eventId?: EventId | undefined;
345
344
  guard?: SExpr | undefined;
346
- effects?: unknown[][] | undefined;
345
+ effects?: SExpr[][] | undefined;
347
346
  }[];
348
347
  guards?: {
349
348
  name: string;
@@ -378,7 +377,7 @@ declare const StateMachineSchema: z.ZodObject<{
378
377
  description?: string | null | undefined;
379
378
  eventId?: string | undefined;
380
379
  guard?: SExpr | undefined;
381
- effects?: unknown[][] | undefined;
380
+ effects?: SExpr[][] | undefined;
382
381
  }[];
383
382
  guards?: {
384
383
  name: string;
@@ -669,12 +668,12 @@ declare const TraitTickSchema: z.ZodObject<{
669
668
  pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
670
669
  pageIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, PageId, string>, "many">>;
671
670
  guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
672
- effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">;
671
+ effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">;
673
672
  emits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
674
673
  emitIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, EventId, string>, "many">>;
675
674
  }, "strip", z.ZodTypeAny, {
676
675
  name: string;
677
- effects: unknown[][];
676
+ effects: SExpr[][];
678
677
  interval: string | number;
679
678
  description?: string | undefined;
680
679
  pages?: string[] | undefined;
@@ -686,7 +685,7 @@ declare const TraitTickSchema: z.ZodObject<{
686
685
  emitIds?: EventId[] | undefined;
687
686
  }, {
688
687
  name: string;
689
- effects: unknown[][];
688
+ effects: SExpr[][];
690
689
  interval: string | number;
691
690
  description?: string | undefined;
692
691
  pages?: string[] | undefined;
@@ -1157,7 +1156,103 @@ declare const TraitReferenceSchema: z.ZodEffects<z.ZodObject<{
1157
1156
  fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1158
1157
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodType<ConfigFieldDeclaration, z.ZodTypeDef, ConfigFieldDeclaration>, z.ZodType<TraitConfigValue, z.ZodTypeDef, TraitConfigValue>]>>>;
1159
1158
  appliesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1160
- listens: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
1159
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1160
+ event: z.ZodString;
1161
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
1162
+ triggers: z.ZodString;
1163
+ triggersId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
1164
+ description: z.ZodOptional<z.ZodString>;
1165
+ synonyms: z.ZodOptional<z.ZodString>;
1166
+ tier: z.ZodOptional<z.ZodString>;
1167
+ guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
1168
+ scope: z.ZodOptional<z.ZodEnum<["internal", "external"]>>;
1169
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
1170
+ source: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1171
+ kind: z.ZodLiteral<"any">;
1172
+ }, "strip", z.ZodTypeAny, {
1173
+ kind: "any";
1174
+ }, {
1175
+ kind: "any";
1176
+ }>, z.ZodObject<{
1177
+ kind: z.ZodLiteral<"trait">;
1178
+ trait: z.ZodString;
1179
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
1180
+ }, "strip", z.ZodTypeAny, {
1181
+ trait: string;
1182
+ kind: "trait";
1183
+ traitId?: TraitId | undefined;
1184
+ }, {
1185
+ trait: string;
1186
+ kind: "trait";
1187
+ traitId?: string | undefined;
1188
+ }>, z.ZodObject<{
1189
+ kind: z.ZodLiteral<"orbital">;
1190
+ orbital: z.ZodString;
1191
+ trait: z.ZodString;
1192
+ orbitalId: z.ZodOptional<z.ZodEffects<z.ZodString, OrbitalId, string>>;
1193
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
1194
+ }, "strip", z.ZodTypeAny, {
1195
+ orbital: string;
1196
+ trait: string;
1197
+ kind: "orbital";
1198
+ traitId?: TraitId | undefined;
1199
+ orbitalId?: OrbitalId | undefined;
1200
+ }, {
1201
+ orbital: string;
1202
+ trait: string;
1203
+ kind: "orbital";
1204
+ traitId?: string | undefined;
1205
+ orbitalId?: string | undefined;
1206
+ }>]>>;
1207
+ }, "strip", z.ZodTypeAny, {
1208
+ event: string;
1209
+ triggers: string;
1210
+ description?: string | undefined;
1211
+ synonyms?: string | undefined;
1212
+ source?: {
1213
+ kind: "any";
1214
+ } | {
1215
+ trait: string;
1216
+ kind: "trait";
1217
+ traitId?: TraitId | undefined;
1218
+ } | {
1219
+ orbital: string;
1220
+ trait: string;
1221
+ kind: "orbital";
1222
+ traitId?: TraitId | undefined;
1223
+ orbitalId?: OrbitalId | undefined;
1224
+ } | undefined;
1225
+ scope?: "internal" | "external" | undefined;
1226
+ tier?: string | undefined;
1227
+ eventId?: EventId | undefined;
1228
+ guard?: SExpr | undefined;
1229
+ triggersId?: EventId | undefined;
1230
+ payloadMapping?: Record<string, SExpr> | undefined;
1231
+ }, {
1232
+ event: string;
1233
+ triggers: string;
1234
+ description?: string | undefined;
1235
+ synonyms?: string | undefined;
1236
+ source?: {
1237
+ kind: "any";
1238
+ } | {
1239
+ trait: string;
1240
+ kind: "trait";
1241
+ traitId?: string | undefined;
1242
+ } | {
1243
+ orbital: string;
1244
+ trait: string;
1245
+ kind: "orbital";
1246
+ traitId?: string | undefined;
1247
+ orbitalId?: string | undefined;
1248
+ } | undefined;
1249
+ scope?: "internal" | "external" | undefined;
1250
+ tier?: string | undefined;
1251
+ eventId?: string | undefined;
1252
+ guard?: SExpr | undefined;
1253
+ triggersId?: string | undefined;
1254
+ payloadMapping?: Record<string, SExpr> | undefined;
1255
+ }>, "many">>;
1161
1256
  emitsScope: z.ZodOptional<z.ZodEnum<["internal", "external"]>>;
1162
1257
  effects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">>>;
1163
1258
  }, "strip", z.ZodTypeAny, {
@@ -1174,7 +1269,31 @@ declare const TraitReferenceSchema: z.ZodEffects<z.ZodObject<{
1174
1269
  linkedEntity?: string | undefined;
1175
1270
  linkedEntityId?: EntityId | undefined;
1176
1271
  eventIds?: Record<string, EventId> | undefined;
1177
- listens?: unknown[] | undefined;
1272
+ listens?: {
1273
+ event: string;
1274
+ triggers: string;
1275
+ description?: string | undefined;
1276
+ synonyms?: string | undefined;
1277
+ source?: {
1278
+ kind: "any";
1279
+ } | {
1280
+ trait: string;
1281
+ kind: "trait";
1282
+ traitId?: TraitId | undefined;
1283
+ } | {
1284
+ orbital: string;
1285
+ trait: string;
1286
+ kind: "orbital";
1287
+ traitId?: TraitId | undefined;
1288
+ orbitalId?: OrbitalId | undefined;
1289
+ } | undefined;
1290
+ scope?: "internal" | "external" | undefined;
1291
+ tier?: string | undefined;
1292
+ eventId?: EventId | undefined;
1293
+ guard?: SExpr | undefined;
1294
+ triggersId?: EventId | undefined;
1295
+ payloadMapping?: Record<string, SExpr> | undefined;
1296
+ }[] | undefined;
1178
1297
  emitsScope?: "internal" | "external" | undefined;
1179
1298
  }, {
1180
1299
  ref: string;
@@ -1190,7 +1309,31 @@ declare const TraitReferenceSchema: z.ZodEffects<z.ZodObject<{
1190
1309
  linkedEntity?: string | undefined;
1191
1310
  linkedEntityId?: string | undefined;
1192
1311
  eventIds?: Record<string, string> | undefined;
1193
- listens?: unknown[] | undefined;
1312
+ listens?: {
1313
+ event: string;
1314
+ triggers: string;
1315
+ description?: string | undefined;
1316
+ synonyms?: string | undefined;
1317
+ source?: {
1318
+ kind: "any";
1319
+ } | {
1320
+ trait: string;
1321
+ kind: "trait";
1322
+ traitId?: string | undefined;
1323
+ } | {
1324
+ orbital: string;
1325
+ trait: string;
1326
+ kind: "orbital";
1327
+ traitId?: string | undefined;
1328
+ orbitalId?: string | undefined;
1329
+ } | undefined;
1330
+ scope?: "internal" | "external" | undefined;
1331
+ tier?: string | undefined;
1332
+ eventId?: string | undefined;
1333
+ guard?: SExpr | undefined;
1334
+ triggersId?: string | undefined;
1335
+ payloadMapping?: Record<string, SExpr> | undefined;
1336
+ }[] | undefined;
1194
1337
  emitsScope?: "internal" | "external" | undefined;
1195
1338
  }>, {
1196
1339
  ref: string;
@@ -1206,7 +1349,31 @@ declare const TraitReferenceSchema: z.ZodEffects<z.ZodObject<{
1206
1349
  linkedEntity?: string | undefined;
1207
1350
  linkedEntityId?: EntityId | undefined;
1208
1351
  eventIds?: Record<string, EventId> | undefined;
1209
- listens?: unknown[] | undefined;
1352
+ listens?: {
1353
+ event: string;
1354
+ triggers: string;
1355
+ description?: string | undefined;
1356
+ synonyms?: string | undefined;
1357
+ source?: {
1358
+ kind: "any";
1359
+ } | {
1360
+ trait: string;
1361
+ kind: "trait";
1362
+ traitId?: TraitId | undefined;
1363
+ } | {
1364
+ orbital: string;
1365
+ trait: string;
1366
+ kind: "orbital";
1367
+ traitId?: TraitId | undefined;
1368
+ orbitalId?: OrbitalId | undefined;
1369
+ } | undefined;
1370
+ scope?: "internal" | "external" | undefined;
1371
+ tier?: string | undefined;
1372
+ eventId?: EventId | undefined;
1373
+ guard?: SExpr | undefined;
1374
+ triggersId?: EventId | undefined;
1375
+ payloadMapping?: Record<string, SExpr> | undefined;
1376
+ }[] | undefined;
1210
1377
  emitsScope?: "internal" | "external" | undefined;
1211
1378
  }, {
1212
1379
  ref: string;
@@ -1222,7 +1389,31 @@ declare const TraitReferenceSchema: z.ZodEffects<z.ZodObject<{
1222
1389
  linkedEntity?: string | undefined;
1223
1390
  linkedEntityId?: string | undefined;
1224
1391
  eventIds?: Record<string, string> | undefined;
1225
- listens?: unknown[] | undefined;
1392
+ listens?: {
1393
+ event: string;
1394
+ triggers: string;
1395
+ description?: string | undefined;
1396
+ synonyms?: string | undefined;
1397
+ source?: {
1398
+ kind: "any";
1399
+ } | {
1400
+ trait: string;
1401
+ kind: "trait";
1402
+ traitId?: string | undefined;
1403
+ } | {
1404
+ orbital: string;
1405
+ trait: string;
1406
+ kind: "orbital";
1407
+ traitId?: string | undefined;
1408
+ orbitalId?: string | undefined;
1409
+ } | undefined;
1410
+ scope?: "internal" | "external" | undefined;
1411
+ tier?: string | undefined;
1412
+ eventId?: string | undefined;
1413
+ guard?: SExpr | undefined;
1414
+ triggersId?: string | undefined;
1415
+ payloadMapping?: Record<string, SExpr> | undefined;
1416
+ }[] | undefined;
1226
1417
  emitsScope?: "internal" | "external" | undefined;
1227
1418
  }>;
1228
1419
  /**
@@ -1258,6 +1449,70 @@ type TraitUIBinding = {
1258
1449
  };
1259
1450
  };
1260
1451
  };
1452
+ /**
1453
+ * Zod schema for {@link TraitUIBinding}. `content` is a pattern config (or
1454
+ * list of them); pattern configs have no dedicated zod schema in core, so
1455
+ * they are validated as JSON objects here and narrowed by downstream
1456
+ * pattern-aware consumers.
1457
+ */
1458
+ declare const TraitUIBindingSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
1459
+ presentation: z.ZodEnum<["modal", "drawer", "popover", "inline", "confirm-dialog"]>;
1460
+ content: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, "many">]>;
1461
+ props: z.ZodOptional<z.ZodObject<{
1462
+ size: z.ZodOptional<z.ZodEnum<["sm", "md", "lg", "xl", "full"]>>;
1463
+ position: z.ZodOptional<z.ZodEnum<["left", "right", "top", "bottom", "center"]>>;
1464
+ title: z.ZodOptional<z.ZodString>;
1465
+ closable: z.ZodOptional<z.ZodBoolean>;
1466
+ width: z.ZodOptional<z.ZodString>;
1467
+ showProgress: z.ZodOptional<z.ZodBoolean>;
1468
+ step: z.ZodOptional<z.ZodNumber>;
1469
+ totalSteps: z.ZodOptional<z.ZodNumber>;
1470
+ }, "strip", z.ZodTypeAny, {
1471
+ width?: string | undefined;
1472
+ title?: string | undefined;
1473
+ totalSteps?: number | undefined;
1474
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
1475
+ step?: number | undefined;
1476
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
1477
+ showProgress?: boolean | undefined;
1478
+ closable?: boolean | undefined;
1479
+ }, {
1480
+ width?: string | undefined;
1481
+ title?: string | undefined;
1482
+ totalSteps?: number | undefined;
1483
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
1484
+ step?: number | undefined;
1485
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
1486
+ showProgress?: boolean | undefined;
1487
+ closable?: boolean | undefined;
1488
+ }>>;
1489
+ }, "strip", z.ZodTypeAny, {
1490
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
1491
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
1492
+ props?: {
1493
+ width?: string | undefined;
1494
+ title?: string | undefined;
1495
+ totalSteps?: number | undefined;
1496
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
1497
+ step?: number | undefined;
1498
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
1499
+ showProgress?: boolean | undefined;
1500
+ closable?: boolean | undefined;
1501
+ } | undefined;
1502
+ }, {
1503
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
1504
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
1505
+ props?: {
1506
+ width?: string | undefined;
1507
+ title?: string | undefined;
1508
+ totalSteps?: number | undefined;
1509
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
1510
+ step?: number | undefined;
1511
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
1512
+ showProgress?: boolean | undefined;
1513
+ closable?: boolean | undefined;
1514
+ } | undefined;
1515
+ }>>;
1261
1516
  /**
1262
1517
  * A Trait is a reusable behavioral module with state machine.
1263
1518
  *
@@ -1554,7 +1809,7 @@ declare const TraitSchema: z.ZodObject<{
1554
1809
  event: z.ZodString;
1555
1810
  eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
1556
1811
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
1557
- effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
1812
+ effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">>;
1558
1813
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1559
1814
  }, "strip", z.ZodTypeAny, {
1560
1815
  event: string;
@@ -1563,7 +1818,7 @@ declare const TraitSchema: z.ZodObject<{
1563
1818
  description?: string | null | undefined;
1564
1819
  eventId?: EventId | undefined;
1565
1820
  guard?: SExpr | undefined;
1566
- effects?: unknown[][] | undefined;
1821
+ effects?: SExpr[][] | undefined;
1567
1822
  }, {
1568
1823
  event: string;
1569
1824
  from: string;
@@ -1571,7 +1826,7 @@ declare const TraitSchema: z.ZodObject<{
1571
1826
  description?: string | null | undefined;
1572
1827
  eventId?: string | undefined;
1573
1828
  guard?: SExpr | undefined;
1574
- effects?: unknown[][] | undefined;
1829
+ effects?: SExpr[][] | undefined;
1575
1830
  }>, "many">;
1576
1831
  guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
1577
1832
  name: z.ZodString;
@@ -1614,7 +1869,7 @@ declare const TraitSchema: z.ZodObject<{
1614
1869
  description?: string | null | undefined;
1615
1870
  eventId?: EventId | undefined;
1616
1871
  guard?: SExpr | undefined;
1617
- effects?: unknown[][] | undefined;
1872
+ effects?: SExpr[][] | undefined;
1618
1873
  }[];
1619
1874
  guards?: {
1620
1875
  name: string;
@@ -1649,7 +1904,7 @@ declare const TraitSchema: z.ZodObject<{
1649
1904
  description?: string | null | undefined;
1650
1905
  eventId?: string | undefined;
1651
1906
  guard?: SExpr | undefined;
1652
- effects?: unknown[][] | undefined;
1907
+ effects?: SExpr[][] | undefined;
1653
1908
  }[];
1654
1909
  guards?: {
1655
1910
  name: string;
@@ -1657,7 +1912,7 @@ declare const TraitSchema: z.ZodObject<{
1657
1912
  description?: string | undefined;
1658
1913
  }[] | undefined;
1659
1914
  }>>;
1660
- initialEffects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
1915
+ initialEffects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">>;
1661
1916
  ticks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1662
1917
  name: z.ZodString;
1663
1918
  description: z.ZodOptional<z.ZodString>;
@@ -1667,12 +1922,12 @@ declare const TraitSchema: z.ZodObject<{
1667
1922
  pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1668
1923
  pageIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, PageId, string>, "many">>;
1669
1924
  guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
1670
- effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">;
1925
+ effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">;
1671
1926
  emits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1672
1927
  emitIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, EventId, string>, "many">>;
1673
1928
  }, "strip", z.ZodTypeAny, {
1674
1929
  name: string;
1675
- effects: unknown[][];
1930
+ effects: SExpr[][];
1676
1931
  interval: string | number;
1677
1932
  description?: string | undefined;
1678
1933
  pages?: string[] | undefined;
@@ -1684,7 +1939,7 @@ declare const TraitSchema: z.ZodObject<{
1684
1939
  emitIds?: EventId[] | undefined;
1685
1940
  }, {
1686
1941
  name: string;
1687
- effects: unknown[][];
1942
+ effects: SExpr[][];
1688
1943
  interval: string | number;
1689
1944
  description?: string | undefined;
1690
1945
  pages?: string[] | undefined;
@@ -1826,7 +2081,64 @@ declare const TraitSchema: z.ZodObject<{
1826
2081
  triggersId?: string | undefined;
1827
2082
  payloadMapping?: Record<string, SExpr> | undefined;
1828
2083
  }>, "many">>;
1829
- ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2084
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2085
+ presentation: z.ZodEnum<["modal", "drawer", "popover", "inline", "confirm-dialog"]>;
2086
+ content: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, "many">]>;
2087
+ props: z.ZodOptional<z.ZodObject<{
2088
+ size: z.ZodOptional<z.ZodEnum<["sm", "md", "lg", "xl", "full"]>>;
2089
+ position: z.ZodOptional<z.ZodEnum<["left", "right", "top", "bottom", "center"]>>;
2090
+ title: z.ZodOptional<z.ZodString>;
2091
+ closable: z.ZodOptional<z.ZodBoolean>;
2092
+ width: z.ZodOptional<z.ZodString>;
2093
+ showProgress: z.ZodOptional<z.ZodBoolean>;
2094
+ step: z.ZodOptional<z.ZodNumber>;
2095
+ totalSteps: z.ZodOptional<z.ZodNumber>;
2096
+ }, "strip", z.ZodTypeAny, {
2097
+ width?: string | undefined;
2098
+ title?: string | undefined;
2099
+ totalSteps?: number | undefined;
2100
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
2101
+ step?: number | undefined;
2102
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
2103
+ showProgress?: boolean | undefined;
2104
+ closable?: boolean | undefined;
2105
+ }, {
2106
+ width?: string | undefined;
2107
+ title?: string | undefined;
2108
+ totalSteps?: number | undefined;
2109
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
2110
+ step?: number | undefined;
2111
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
2112
+ showProgress?: boolean | undefined;
2113
+ closable?: boolean | undefined;
2114
+ }>>;
2115
+ }, "strip", z.ZodTypeAny, {
2116
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
2117
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
2118
+ props?: {
2119
+ width?: string | undefined;
2120
+ title?: string | undefined;
2121
+ totalSteps?: number | undefined;
2122
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
2123
+ step?: number | undefined;
2124
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
2125
+ showProgress?: boolean | undefined;
2126
+ closable?: boolean | undefined;
2127
+ } | undefined;
2128
+ }, {
2129
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
2130
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
2131
+ props?: {
2132
+ width?: string | undefined;
2133
+ title?: string | undefined;
2134
+ totalSteps?: number | undefined;
2135
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
2136
+ step?: number | undefined;
2137
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
2138
+ showProgress?: boolean | undefined;
2139
+ closable?: boolean | undefined;
2140
+ } | undefined;
2141
+ }>>>;
1830
2142
  config: z.ZodOptional<z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, z.ZodTypeDef, Readonly<Record<string, ConfigFieldDeclaration>>>>;
1831
2143
  sourceBehavior: z.ZodOptional<z.ZodObject<{
1832
2144
  behavior: z.ZodString;
@@ -1848,7 +2160,7 @@ declare const TraitSchema: z.ZodObject<{
1848
2160
  identity: z.ZodOptional<z.ZodBoolean>;
1849
2161
  collection: z.ZodOptional<z.ZodString>;
1850
2162
  fields: z.ZodArray<z.ZodType<EntityField, z.ZodTypeDef, unknown>, "many">;
1851
- instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
2163
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, "many">>;
1852
2164
  timestamps: z.ZodOptional<z.ZodBoolean>;
1853
2165
  softDelete: z.ZodOptional<z.ZodBoolean>;
1854
2166
  description: z.ZodOptional<z.ZodString>;
@@ -1886,7 +2198,7 @@ declare const TraitSchema: z.ZodObject<{
1886
2198
  shared?: boolean | undefined;
1887
2199
  identity?: boolean | undefined;
1888
2200
  collection?: string | undefined;
1889
- instances?: Record<string, unknown>[] | undefined;
2201
+ instances?: Record<string, JsonValue>[] | undefined;
1890
2202
  timestamps?: boolean | undefined;
1891
2203
  softDelete?: boolean | undefined;
1892
2204
  visual_prompt?: string | undefined;
@@ -1907,7 +2219,7 @@ declare const TraitSchema: z.ZodObject<{
1907
2219
  shared?: boolean | undefined;
1908
2220
  identity?: boolean | undefined;
1909
2221
  collection?: string | undefined;
1910
- instances?: Record<string, unknown>[] | undefined;
2222
+ instances?: Record<string, JsonValue>[] | undefined;
1911
2223
  timestamps?: boolean | undefined;
1912
2224
  softDelete?: boolean | undefined;
1913
2225
  visual_prompt?: string | undefined;
@@ -1926,7 +2238,20 @@ declare const TraitSchema: z.ZodObject<{
1926
2238
  scope: "collection" | "instance";
1927
2239
  id?: TraitId | undefined;
1928
2240
  description?: string | undefined;
1929
- ui?: Record<string, unknown> | undefined;
2241
+ ui?: Record<string, {
2242
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
2243
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
2244
+ props?: {
2245
+ width?: string | undefined;
2246
+ title?: string | undefined;
2247
+ totalSteps?: number | undefined;
2248
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
2249
+ step?: number | undefined;
2250
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
2251
+ showProgress?: boolean | undefined;
2252
+ closable?: boolean | undefined;
2253
+ } | undefined;
2254
+ }> | undefined;
1930
2255
  category?: "validation" | "notification" | "lifecycle" | "temporal" | "integration" | "interaction" | "agent" | "game-core" | "game-character" | "game-ai" | "game-combat" | "game-items" | "game-cards" | "game-board" | "game-puzzle" | undefined;
1931
2256
  config?: Readonly<Record<string, ConfigFieldDeclaration>> | undefined;
1932
2257
  capabilities?: string[] | undefined;
@@ -1968,7 +2293,7 @@ declare const TraitSchema: z.ZodObject<{
1968
2293
  description?: string | null | undefined;
1969
2294
  eventId?: EventId | undefined;
1970
2295
  guard?: SExpr | undefined;
1971
- effects?: unknown[][] | undefined;
2296
+ effects?: SExpr[][] | undefined;
1972
2297
  }[];
1973
2298
  guards?: {
1974
2299
  name: string;
@@ -2027,10 +2352,10 @@ declare const TraitSchema: z.ZodObject<{
2027
2352
  name: string;
2028
2353
  description?: string | undefined;
2029
2354
  }[] | undefined;
2030
- initialEffects?: unknown[][] | undefined;
2355
+ initialEffects?: SExpr[][] | undefined;
2031
2356
  ticks?: {
2032
2357
  name: string;
2033
- effects: unknown[][];
2358
+ effects: SExpr[][];
2034
2359
  interval: string | number;
2035
2360
  description?: string | undefined;
2036
2361
  pages?: string[] | undefined;
@@ -2054,7 +2379,7 @@ declare const TraitSchema: z.ZodObject<{
2054
2379
  shared?: boolean | undefined;
2055
2380
  identity?: boolean | undefined;
2056
2381
  collection?: string | undefined;
2057
- instances?: Record<string, unknown>[] | undefined;
2382
+ instances?: Record<string, JsonValue>[] | undefined;
2058
2383
  timestamps?: boolean | undefined;
2059
2384
  softDelete?: boolean | undefined;
2060
2385
  visual_prompt?: string | undefined;
@@ -2073,7 +2398,20 @@ declare const TraitSchema: z.ZodObject<{
2073
2398
  scope: "collection" | "instance";
2074
2399
  id?: string | undefined;
2075
2400
  description?: string | undefined;
2076
- ui?: Record<string, unknown> | undefined;
2401
+ ui?: Record<string, {
2402
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
2403
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
2404
+ props?: {
2405
+ width?: string | undefined;
2406
+ title?: string | undefined;
2407
+ totalSteps?: number | undefined;
2408
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
2409
+ step?: number | undefined;
2410
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
2411
+ showProgress?: boolean | undefined;
2412
+ closable?: boolean | undefined;
2413
+ } | undefined;
2414
+ }> | undefined;
2077
2415
  category?: "validation" | "notification" | "lifecycle" | "temporal" | "integration" | "interaction" | "agent" | "game-core" | "game-character" | "game-ai" | "game-combat" | "game-items" | "game-cards" | "game-board" | "game-puzzle" | undefined;
2078
2416
  config?: Readonly<Record<string, ConfigFieldDeclaration>> | undefined;
2079
2417
  capabilities?: string[] | undefined;
@@ -2115,7 +2453,7 @@ declare const TraitSchema: z.ZodObject<{
2115
2453
  description?: string | null | undefined;
2116
2454
  eventId?: string | undefined;
2117
2455
  guard?: SExpr | undefined;
2118
- effects?: unknown[][] | undefined;
2456
+ effects?: SExpr[][] | undefined;
2119
2457
  }[];
2120
2458
  guards?: {
2121
2459
  name: string;
@@ -2174,10 +2512,10 @@ declare const TraitSchema: z.ZodObject<{
2174
2512
  name: string;
2175
2513
  description?: string | undefined;
2176
2514
  }[] | undefined;
2177
- initialEffects?: unknown[][] | undefined;
2515
+ initialEffects?: SExpr[][] | undefined;
2178
2516
  ticks?: {
2179
2517
  name: string;
2180
- effects: unknown[][];
2518
+ effects: SExpr[][];
2181
2519
  interval: string | number;
2182
2520
  description?: string | undefined;
2183
2521
  pages?: string[] | undefined;
@@ -2201,7 +2539,7 @@ declare const TraitSchema: z.ZodObject<{
2201
2539
  shared?: boolean | undefined;
2202
2540
  identity?: boolean | undefined;
2203
2541
  collection?: string | undefined;
2204
- instances?: Record<string, unknown>[] | undefined;
2542
+ instances?: Record<string, JsonValue>[] | undefined;
2205
2543
  timestamps?: boolean | undefined;
2206
2544
  softDelete?: boolean | undefined;
2207
2545
  visual_prompt?: string | undefined;
@@ -2216,49 +2554,303 @@ declare const TraitSchema: z.ZodObject<{
2216
2554
  } | undefined;
2217
2555
  } | undefined;
2218
2556
  }>;
2219
- declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2557
+ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodObject<{
2220
2558
  ref: z.ZodString;
2221
- config: z.ZodOptional<z.ZodType<TraitConfigObject, z.ZodTypeDef, TraitConfigObject>>;
2222
- linkedEntity: z.ZodOptional<z.ZodString>;
2223
- name: z.ZodOptional<z.ZodString>;
2224
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2225
- }, "strip", z.ZodTypeAny, {
2226
- ref: string;
2227
- name?: string | undefined;
2228
- config?: TraitConfigObject | undefined;
2229
- events?: Record<string, string> | undefined;
2230
- linkedEntity?: string | undefined;
2231
- }, {
2232
- ref: string;
2233
- name?: string | undefined;
2234
- config?: TraitConfigObject | undefined;
2235
- events?: Record<string, string> | undefined;
2236
- linkedEntity?: string | undefined;
2237
- }>, z.ZodObject<{
2559
+ refId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2238
2560
  id: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2239
- name: z.ZodString;
2240
- description: z.ZodOptional<z.ZodString>;
2241
- description_visual_prompt: z.ZodOptional<z.ZodString>;
2242
- category: z.ZodOptional<z.ZodEnum<["lifecycle", "temporal", "validation", "notification", "integration", "interaction", "agent", "game-core", "game-character", "game-ai", "game-combat", "game-items", "game-cards", "game-board", "game-puzzle"]>>;
2243
- entityRebindable: z.ZodOptional<z.ZodBoolean>;
2244
- entityContract: z.ZodOptional<z.ZodObject<{
2245
- requires: z.ZodArray<z.ZodString, "many">;
2246
- provides: z.ZodArray<z.ZodString, "many">;
2247
- }, "strip", z.ZodTypeAny, {
2248
- requires: string[];
2249
- provides: string[];
2250
- }, {
2251
- requires: string[];
2252
- provides: string[];
2253
- }>>;
2254
- entityBindingDescription: z.ZodOptional<z.ZodString>;
2255
- entityBindingSynonyms: z.ZodOptional<z.ZodString>;
2256
- capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2257
- scope: z.ZodEnum<["instance", "collection"]>;
2561
+ from: z.ZodOptional<z.ZodString>;
2258
2562
  linkedEntity: z.ZodOptional<z.ZodString>;
2259
2563
  linkedEntityId: z.ZodOptional<z.ZodEffects<z.ZodString, EntityId, string>>;
2260
- entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, EntityId, string>>>;
2261
- traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, TraitId, string>>>;
2564
+ name: z.ZodOptional<z.ZodString>;
2565
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2566
+ eventIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, EventId, string>>>;
2567
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2568
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodType<ConfigFieldDeclaration, z.ZodTypeDef, ConfigFieldDeclaration>, z.ZodType<TraitConfigValue, z.ZodTypeDef, TraitConfigValue>]>>>;
2569
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2570
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
2571
+ event: z.ZodString;
2572
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2573
+ triggers: z.ZodString;
2574
+ triggersId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2575
+ description: z.ZodOptional<z.ZodString>;
2576
+ synonyms: z.ZodOptional<z.ZodString>;
2577
+ tier: z.ZodOptional<z.ZodString>;
2578
+ guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
2579
+ scope: z.ZodOptional<z.ZodEnum<["internal", "external"]>>;
2580
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
2581
+ source: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
2582
+ kind: z.ZodLiteral<"any">;
2583
+ }, "strip", z.ZodTypeAny, {
2584
+ kind: "any";
2585
+ }, {
2586
+ kind: "any";
2587
+ }>, z.ZodObject<{
2588
+ kind: z.ZodLiteral<"trait">;
2589
+ trait: z.ZodString;
2590
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2591
+ }, "strip", z.ZodTypeAny, {
2592
+ trait: string;
2593
+ kind: "trait";
2594
+ traitId?: TraitId | undefined;
2595
+ }, {
2596
+ trait: string;
2597
+ kind: "trait";
2598
+ traitId?: string | undefined;
2599
+ }>, z.ZodObject<{
2600
+ kind: z.ZodLiteral<"orbital">;
2601
+ orbital: z.ZodString;
2602
+ trait: z.ZodString;
2603
+ orbitalId: z.ZodOptional<z.ZodEffects<z.ZodString, OrbitalId, string>>;
2604
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2605
+ }, "strip", z.ZodTypeAny, {
2606
+ orbital: string;
2607
+ trait: string;
2608
+ kind: "orbital";
2609
+ traitId?: TraitId | undefined;
2610
+ orbitalId?: OrbitalId | undefined;
2611
+ }, {
2612
+ orbital: string;
2613
+ trait: string;
2614
+ kind: "orbital";
2615
+ traitId?: string | undefined;
2616
+ orbitalId?: string | undefined;
2617
+ }>]>>;
2618
+ }, "strip", z.ZodTypeAny, {
2619
+ event: string;
2620
+ triggers: string;
2621
+ description?: string | undefined;
2622
+ synonyms?: string | undefined;
2623
+ source?: {
2624
+ kind: "any";
2625
+ } | {
2626
+ trait: string;
2627
+ kind: "trait";
2628
+ traitId?: TraitId | undefined;
2629
+ } | {
2630
+ orbital: string;
2631
+ trait: string;
2632
+ kind: "orbital";
2633
+ traitId?: TraitId | undefined;
2634
+ orbitalId?: OrbitalId | undefined;
2635
+ } | undefined;
2636
+ scope?: "internal" | "external" | undefined;
2637
+ tier?: string | undefined;
2638
+ eventId?: EventId | undefined;
2639
+ guard?: SExpr | undefined;
2640
+ triggersId?: EventId | undefined;
2641
+ payloadMapping?: Record<string, SExpr> | undefined;
2642
+ }, {
2643
+ event: string;
2644
+ triggers: string;
2645
+ description?: string | undefined;
2646
+ synonyms?: string | undefined;
2647
+ source?: {
2648
+ kind: "any";
2649
+ } | {
2650
+ trait: string;
2651
+ kind: "trait";
2652
+ traitId?: string | undefined;
2653
+ } | {
2654
+ orbital: string;
2655
+ trait: string;
2656
+ kind: "orbital";
2657
+ traitId?: string | undefined;
2658
+ orbitalId?: string | undefined;
2659
+ } | undefined;
2660
+ scope?: "internal" | "external" | undefined;
2661
+ tier?: string | undefined;
2662
+ eventId?: string | undefined;
2663
+ guard?: SExpr | undefined;
2664
+ triggersId?: string | undefined;
2665
+ payloadMapping?: Record<string, SExpr> | undefined;
2666
+ }>, "many">>;
2667
+ emitsScope: z.ZodOptional<z.ZodEnum<["internal", "external"]>>;
2668
+ effects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">>>;
2669
+ }, "strip", z.ZodTypeAny, {
2670
+ ref: string;
2671
+ id?: TraitId | undefined;
2672
+ from?: string | undefined;
2673
+ name?: string | undefined;
2674
+ fields?: Record<string, string> | undefined;
2675
+ config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
2676
+ events?: Record<string, string> | undefined;
2677
+ effects?: Record<string, SExpr[]> | undefined;
2678
+ refId?: TraitId | undefined;
2679
+ appliesTo?: string[] | undefined;
2680
+ linkedEntity?: string | undefined;
2681
+ linkedEntityId?: EntityId | undefined;
2682
+ eventIds?: Record<string, EventId> | undefined;
2683
+ listens?: {
2684
+ event: string;
2685
+ triggers: string;
2686
+ description?: string | undefined;
2687
+ synonyms?: string | undefined;
2688
+ source?: {
2689
+ kind: "any";
2690
+ } | {
2691
+ trait: string;
2692
+ kind: "trait";
2693
+ traitId?: TraitId | undefined;
2694
+ } | {
2695
+ orbital: string;
2696
+ trait: string;
2697
+ kind: "orbital";
2698
+ traitId?: TraitId | undefined;
2699
+ orbitalId?: OrbitalId | undefined;
2700
+ } | undefined;
2701
+ scope?: "internal" | "external" | undefined;
2702
+ tier?: string | undefined;
2703
+ eventId?: EventId | undefined;
2704
+ guard?: SExpr | undefined;
2705
+ triggersId?: EventId | undefined;
2706
+ payloadMapping?: Record<string, SExpr> | undefined;
2707
+ }[] | undefined;
2708
+ emitsScope?: "internal" | "external" | undefined;
2709
+ }, {
2710
+ ref: string;
2711
+ id?: string | undefined;
2712
+ from?: string | undefined;
2713
+ name?: string | undefined;
2714
+ fields?: Record<string, string> | undefined;
2715
+ config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
2716
+ events?: Record<string, string> | undefined;
2717
+ effects?: Record<string, SExpr[]> | undefined;
2718
+ refId?: string | undefined;
2719
+ appliesTo?: string[] | undefined;
2720
+ linkedEntity?: string | undefined;
2721
+ linkedEntityId?: string | undefined;
2722
+ eventIds?: Record<string, string> | undefined;
2723
+ listens?: {
2724
+ event: string;
2725
+ triggers: string;
2726
+ description?: string | undefined;
2727
+ synonyms?: string | undefined;
2728
+ source?: {
2729
+ kind: "any";
2730
+ } | {
2731
+ trait: string;
2732
+ kind: "trait";
2733
+ traitId?: string | undefined;
2734
+ } | {
2735
+ orbital: string;
2736
+ trait: string;
2737
+ kind: "orbital";
2738
+ traitId?: string | undefined;
2739
+ orbitalId?: string | undefined;
2740
+ } | undefined;
2741
+ scope?: "internal" | "external" | undefined;
2742
+ tier?: string | undefined;
2743
+ eventId?: string | undefined;
2744
+ guard?: SExpr | undefined;
2745
+ triggersId?: string | undefined;
2746
+ payloadMapping?: Record<string, SExpr> | undefined;
2747
+ }[] | undefined;
2748
+ emitsScope?: "internal" | "external" | undefined;
2749
+ }>, {
2750
+ ref: string;
2751
+ id?: TraitId | undefined;
2752
+ from?: string | undefined;
2753
+ name?: string | undefined;
2754
+ fields?: Record<string, string> | undefined;
2755
+ config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
2756
+ events?: Record<string, string> | undefined;
2757
+ effects?: Record<string, SExpr[]> | undefined;
2758
+ refId?: TraitId | undefined;
2759
+ appliesTo?: string[] | undefined;
2760
+ linkedEntity?: string | undefined;
2761
+ linkedEntityId?: EntityId | undefined;
2762
+ eventIds?: Record<string, EventId> | undefined;
2763
+ listens?: {
2764
+ event: string;
2765
+ triggers: string;
2766
+ description?: string | undefined;
2767
+ synonyms?: string | undefined;
2768
+ source?: {
2769
+ kind: "any";
2770
+ } | {
2771
+ trait: string;
2772
+ kind: "trait";
2773
+ traitId?: TraitId | undefined;
2774
+ } | {
2775
+ orbital: string;
2776
+ trait: string;
2777
+ kind: "orbital";
2778
+ traitId?: TraitId | undefined;
2779
+ orbitalId?: OrbitalId | undefined;
2780
+ } | undefined;
2781
+ scope?: "internal" | "external" | undefined;
2782
+ tier?: string | undefined;
2783
+ eventId?: EventId | undefined;
2784
+ guard?: SExpr | undefined;
2785
+ triggersId?: EventId | undefined;
2786
+ payloadMapping?: Record<string, SExpr> | undefined;
2787
+ }[] | undefined;
2788
+ emitsScope?: "internal" | "external" | undefined;
2789
+ }, {
2790
+ ref: string;
2791
+ id?: string | undefined;
2792
+ from?: string | undefined;
2793
+ name?: string | undefined;
2794
+ fields?: Record<string, string> | undefined;
2795
+ config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
2796
+ events?: Record<string, string> | undefined;
2797
+ effects?: Record<string, SExpr[]> | undefined;
2798
+ refId?: string | undefined;
2799
+ appliesTo?: string[] | undefined;
2800
+ linkedEntity?: string | undefined;
2801
+ linkedEntityId?: string | undefined;
2802
+ eventIds?: Record<string, string> | undefined;
2803
+ listens?: {
2804
+ event: string;
2805
+ triggers: string;
2806
+ description?: string | undefined;
2807
+ synonyms?: string | undefined;
2808
+ source?: {
2809
+ kind: "any";
2810
+ } | {
2811
+ trait: string;
2812
+ kind: "trait";
2813
+ traitId?: string | undefined;
2814
+ } | {
2815
+ orbital: string;
2816
+ trait: string;
2817
+ kind: "orbital";
2818
+ traitId?: string | undefined;
2819
+ orbitalId?: string | undefined;
2820
+ } | undefined;
2821
+ scope?: "internal" | "external" | undefined;
2822
+ tier?: string | undefined;
2823
+ eventId?: string | undefined;
2824
+ guard?: SExpr | undefined;
2825
+ triggersId?: string | undefined;
2826
+ payloadMapping?: Record<string, SExpr> | undefined;
2827
+ }[] | undefined;
2828
+ emitsScope?: "internal" | "external" | undefined;
2829
+ }>, z.ZodObject<{
2830
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2831
+ name: z.ZodString;
2832
+ description: z.ZodOptional<z.ZodString>;
2833
+ description_visual_prompt: z.ZodOptional<z.ZodString>;
2834
+ category: z.ZodOptional<z.ZodEnum<["lifecycle", "temporal", "validation", "notification", "integration", "interaction", "agent", "game-core", "game-character", "game-ai", "game-combat", "game-items", "game-cards", "game-board", "game-puzzle"]>>;
2835
+ entityRebindable: z.ZodOptional<z.ZodBoolean>;
2836
+ entityContract: z.ZodOptional<z.ZodObject<{
2837
+ requires: z.ZodArray<z.ZodString, "many">;
2838
+ provides: z.ZodArray<z.ZodString, "many">;
2839
+ }, "strip", z.ZodTypeAny, {
2840
+ requires: string[];
2841
+ provides: string[];
2842
+ }, {
2843
+ requires: string[];
2844
+ provides: string[];
2845
+ }>>;
2846
+ entityBindingDescription: z.ZodOptional<z.ZodString>;
2847
+ entityBindingSynonyms: z.ZodOptional<z.ZodString>;
2848
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2849
+ scope: z.ZodEnum<["instance", "collection"]>;
2850
+ linkedEntity: z.ZodOptional<z.ZodString>;
2851
+ linkedEntityId: z.ZodOptional<z.ZodEffects<z.ZodString, EntityId, string>>;
2852
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, EntityId, string>>>;
2853
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, TraitId, string>>>;
2262
2854
  requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2263
2855
  name: z.ZodString;
2264
2856
  type: z.ZodEnum<["string", "number", "boolean", "date", "array", "object", "timestamp", "datetime", "enum", "email", "url", "phone", "uuid", "image"]>;
@@ -2363,7 +2955,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2363
2955
  event: z.ZodString;
2364
2956
  eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2365
2957
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
2366
- effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
2958
+ effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">>;
2367
2959
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2368
2960
  }, "strip", z.ZodTypeAny, {
2369
2961
  event: string;
@@ -2372,7 +2964,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2372
2964
  description?: string | null | undefined;
2373
2965
  eventId?: EventId | undefined;
2374
2966
  guard?: SExpr | undefined;
2375
- effects?: unknown[][] | undefined;
2967
+ effects?: SExpr[][] | undefined;
2376
2968
  }, {
2377
2969
  event: string;
2378
2970
  from: string;
@@ -2380,7 +2972,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2380
2972
  description?: string | null | undefined;
2381
2973
  eventId?: string | undefined;
2382
2974
  guard?: SExpr | undefined;
2383
- effects?: unknown[][] | undefined;
2975
+ effects?: SExpr[][] | undefined;
2384
2976
  }>, "many">;
2385
2977
  guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
2386
2978
  name: z.ZodString;
@@ -2423,7 +3015,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2423
3015
  description?: string | null | undefined;
2424
3016
  eventId?: EventId | undefined;
2425
3017
  guard?: SExpr | undefined;
2426
- effects?: unknown[][] | undefined;
3018
+ effects?: SExpr[][] | undefined;
2427
3019
  }[];
2428
3020
  guards?: {
2429
3021
  name: string;
@@ -2458,7 +3050,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2458
3050
  description?: string | null | undefined;
2459
3051
  eventId?: string | undefined;
2460
3052
  guard?: SExpr | undefined;
2461
- effects?: unknown[][] | undefined;
3053
+ effects?: SExpr[][] | undefined;
2462
3054
  }[];
2463
3055
  guards?: {
2464
3056
  name: string;
@@ -2466,7 +3058,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2466
3058
  description?: string | undefined;
2467
3059
  }[] | undefined;
2468
3060
  }>>;
2469
- initialEffects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
3061
+ initialEffects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">>;
2470
3062
  ticks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2471
3063
  name: z.ZodString;
2472
3064
  description: z.ZodOptional<z.ZodString>;
@@ -2476,12 +3068,12 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2476
3068
  pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2477
3069
  pageIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, PageId, string>, "many">>;
2478
3070
  guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
2479
- effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">;
3071
+ effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">;
2480
3072
  emits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2481
3073
  emitIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, EventId, string>, "many">>;
2482
3074
  }, "strip", z.ZodTypeAny, {
2483
3075
  name: string;
2484
- effects: unknown[][];
3076
+ effects: SExpr[][];
2485
3077
  interval: string | number;
2486
3078
  description?: string | undefined;
2487
3079
  pages?: string[] | undefined;
@@ -2493,7 +3085,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2493
3085
  emitIds?: EventId[] | undefined;
2494
3086
  }, {
2495
3087
  name: string;
2496
- effects: unknown[][];
3088
+ effects: SExpr[][];
2497
3089
  interval: string | number;
2498
3090
  description?: string | undefined;
2499
3091
  pages?: string[] | undefined;
@@ -2635,7 +3227,64 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2635
3227
  triggersId?: string | undefined;
2636
3228
  payloadMapping?: Record<string, SExpr> | undefined;
2637
3229
  }>, "many">>;
2638
- ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3230
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3231
+ presentation: z.ZodEnum<["modal", "drawer", "popover", "inline", "confirm-dialog"]>;
3232
+ content: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, "many">]>;
3233
+ props: z.ZodOptional<z.ZodObject<{
3234
+ size: z.ZodOptional<z.ZodEnum<["sm", "md", "lg", "xl", "full"]>>;
3235
+ position: z.ZodOptional<z.ZodEnum<["left", "right", "top", "bottom", "center"]>>;
3236
+ title: z.ZodOptional<z.ZodString>;
3237
+ closable: z.ZodOptional<z.ZodBoolean>;
3238
+ width: z.ZodOptional<z.ZodString>;
3239
+ showProgress: z.ZodOptional<z.ZodBoolean>;
3240
+ step: z.ZodOptional<z.ZodNumber>;
3241
+ totalSteps: z.ZodOptional<z.ZodNumber>;
3242
+ }, "strip", z.ZodTypeAny, {
3243
+ width?: string | undefined;
3244
+ title?: string | undefined;
3245
+ totalSteps?: number | undefined;
3246
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
3247
+ step?: number | undefined;
3248
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
3249
+ showProgress?: boolean | undefined;
3250
+ closable?: boolean | undefined;
3251
+ }, {
3252
+ width?: string | undefined;
3253
+ title?: string | undefined;
3254
+ totalSteps?: number | undefined;
3255
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
3256
+ step?: number | undefined;
3257
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
3258
+ showProgress?: boolean | undefined;
3259
+ closable?: boolean | undefined;
3260
+ }>>;
3261
+ }, "strip", z.ZodTypeAny, {
3262
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
3263
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
3264
+ props?: {
3265
+ width?: string | undefined;
3266
+ title?: string | undefined;
3267
+ totalSteps?: number | undefined;
3268
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
3269
+ step?: number | undefined;
3270
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
3271
+ showProgress?: boolean | undefined;
3272
+ closable?: boolean | undefined;
3273
+ } | undefined;
3274
+ }, {
3275
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
3276
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
3277
+ props?: {
3278
+ width?: string | undefined;
3279
+ title?: string | undefined;
3280
+ totalSteps?: number | undefined;
3281
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
3282
+ step?: number | undefined;
3283
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
3284
+ showProgress?: boolean | undefined;
3285
+ closable?: boolean | undefined;
3286
+ } | undefined;
3287
+ }>>>;
2639
3288
  config: z.ZodOptional<z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, z.ZodTypeDef, Readonly<Record<string, ConfigFieldDeclaration>>>>;
2640
3289
  sourceBehavior: z.ZodOptional<z.ZodObject<{
2641
3290
  behavior: z.ZodString;
@@ -2657,7 +3306,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2657
3306
  identity: z.ZodOptional<z.ZodBoolean>;
2658
3307
  collection: z.ZodOptional<z.ZodString>;
2659
3308
  fields: z.ZodArray<z.ZodType<EntityField, z.ZodTypeDef, unknown>, "many">;
2660
- instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
3309
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, "many">>;
2661
3310
  timestamps: z.ZodOptional<z.ZodBoolean>;
2662
3311
  softDelete: z.ZodOptional<z.ZodBoolean>;
2663
3312
  description: z.ZodOptional<z.ZodString>;
@@ -2695,7 +3344,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2695
3344
  shared?: boolean | undefined;
2696
3345
  identity?: boolean | undefined;
2697
3346
  collection?: string | undefined;
2698
- instances?: Record<string, unknown>[] | undefined;
3347
+ instances?: Record<string, JsonValue>[] | undefined;
2699
3348
  timestamps?: boolean | undefined;
2700
3349
  softDelete?: boolean | undefined;
2701
3350
  visual_prompt?: string | undefined;
@@ -2716,7 +3365,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2716
3365
  shared?: boolean | undefined;
2717
3366
  identity?: boolean | undefined;
2718
3367
  collection?: string | undefined;
2719
- instances?: Record<string, unknown>[] | undefined;
3368
+ instances?: Record<string, JsonValue>[] | undefined;
2720
3369
  timestamps?: boolean | undefined;
2721
3370
  softDelete?: boolean | undefined;
2722
3371
  visual_prompt?: string | undefined;
@@ -2735,7 +3384,20 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2735
3384
  scope: "collection" | "instance";
2736
3385
  id?: TraitId | undefined;
2737
3386
  description?: string | undefined;
2738
- ui?: Record<string, unknown> | undefined;
3387
+ ui?: Record<string, {
3388
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
3389
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
3390
+ props?: {
3391
+ width?: string | undefined;
3392
+ title?: string | undefined;
3393
+ totalSteps?: number | undefined;
3394
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
3395
+ step?: number | undefined;
3396
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
3397
+ showProgress?: boolean | undefined;
3398
+ closable?: boolean | undefined;
3399
+ } | undefined;
3400
+ }> | undefined;
2739
3401
  category?: "validation" | "notification" | "lifecycle" | "temporal" | "integration" | "interaction" | "agent" | "game-core" | "game-character" | "game-ai" | "game-combat" | "game-items" | "game-cards" | "game-board" | "game-puzzle" | undefined;
2740
3402
  config?: Readonly<Record<string, ConfigFieldDeclaration>> | undefined;
2741
3403
  capabilities?: string[] | undefined;
@@ -2777,7 +3439,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2777
3439
  description?: string | null | undefined;
2778
3440
  eventId?: EventId | undefined;
2779
3441
  guard?: SExpr | undefined;
2780
- effects?: unknown[][] | undefined;
3442
+ effects?: SExpr[][] | undefined;
2781
3443
  }[];
2782
3444
  guards?: {
2783
3445
  name: string;
@@ -2816,9 +3478,169 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2816
3478
  } | undefined;
2817
3479
  scope?: "internal" | "external" | undefined;
2818
3480
  tier?: string | undefined;
2819
- eventId?: EventId | undefined;
3481
+ eventId?: EventId | undefined;
3482
+ guard?: SExpr | undefined;
3483
+ triggersId?: EventId | undefined;
3484
+ payloadMapping?: Record<string, SExpr> | undefined;
3485
+ }[] | undefined;
3486
+ description_visual_prompt?: string | undefined;
3487
+ entityRebindable?: boolean | undefined;
3488
+ entityContract?: {
3489
+ requires: string[];
3490
+ provides: string[];
3491
+ } | undefined;
3492
+ entityBindingDescription?: string | undefined;
3493
+ entityBindingSynonyms?: string | undefined;
3494
+ entityRefIds?: Record<string, EntityId> | undefined;
3495
+ traitEmbedIds?: Record<string, TraitId> | undefined;
3496
+ requiredFields?: {
3497
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "email" | "url" | "phone" | "uuid" | "image" | "enum";
3498
+ name: string;
3499
+ description?: string | undefined;
3500
+ }[] | undefined;
3501
+ initialEffects?: SExpr[][] | undefined;
3502
+ ticks?: {
3503
+ name: string;
3504
+ effects: SExpr[][];
3505
+ interval: string | number;
3506
+ description?: string | undefined;
3507
+ pages?: string[] | undefined;
3508
+ guard?: SExpr | undefined;
3509
+ priority?: number | undefined;
3510
+ appliesTo?: string[] | undefined;
3511
+ pageIds?: PageId[] | undefined;
3512
+ emits?: string[] | undefined;
3513
+ emitIds?: EventId[] | undefined;
3514
+ }[] | undefined;
3515
+ sourceBehavior?: {
3516
+ behavior: string;
3517
+ alias: string;
3518
+ originalName: string;
3519
+ } | undefined;
3520
+ sourceEntityDefinition?: {
3521
+ name: string;
3522
+ persistence: "persistent" | "runtime";
3523
+ fields: EntityField[];
3524
+ description?: string | undefined;
3525
+ shared?: boolean | undefined;
3526
+ identity?: boolean | undefined;
3527
+ collection?: string | undefined;
3528
+ instances?: Record<string, JsonValue>[] | undefined;
3529
+ timestamps?: boolean | undefined;
3530
+ softDelete?: boolean | undefined;
3531
+ visual_prompt?: string | undefined;
3532
+ assetRef?: {
3533
+ role: string;
3534
+ category: string;
3535
+ animations?: string[] | undefined;
3536
+ style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
3537
+ variant?: string | undefined;
3538
+ dimension?: "2d" | "3d" | undefined;
3539
+ aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
3540
+ } | undefined;
3541
+ } | undefined;
3542
+ }, {
3543
+ name: string;
3544
+ scope: "collection" | "instance";
3545
+ id?: string | undefined;
3546
+ description?: string | undefined;
3547
+ ui?: Record<string, {
3548
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
3549
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
3550
+ props?: {
3551
+ width?: string | undefined;
3552
+ title?: string | undefined;
3553
+ totalSteps?: number | undefined;
3554
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
3555
+ step?: number | undefined;
3556
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
3557
+ showProgress?: boolean | undefined;
3558
+ closable?: boolean | undefined;
3559
+ } | undefined;
3560
+ }> | undefined;
3561
+ category?: "validation" | "notification" | "lifecycle" | "temporal" | "integration" | "interaction" | "agent" | "game-core" | "game-character" | "game-ai" | "game-combat" | "game-items" | "game-cards" | "game-board" | "game-puzzle" | undefined;
3562
+ config?: Readonly<Record<string, ConfigFieldDeclaration>> | undefined;
3563
+ capabilities?: string[] | undefined;
3564
+ dataEntities?: {
3565
+ name: string;
3566
+ fields: TraitEntityField[];
3567
+ description?: string | undefined;
3568
+ runtime?: boolean | undefined;
3569
+ collection?: string | undefined;
3570
+ timestamps?: boolean | undefined;
3571
+ pages?: string[] | undefined;
3572
+ singleton?: boolean | undefined;
3573
+ }[] | undefined;
3574
+ stateMachine?: {
3575
+ events: {
3576
+ name: string;
3577
+ key: string;
3578
+ id?: string | undefined;
3579
+ description?: string | undefined;
3580
+ synonyms?: string | undefined;
3581
+ tier?: string | undefined;
3582
+ payloadSchema?: PayloadField[] | undefined;
3583
+ classification?: "domain" | "system" | undefined;
3584
+ semanticRole?: string | undefined;
3585
+ }[];
3586
+ states: {
3587
+ name: string;
3588
+ description?: string | undefined;
3589
+ isInitial?: boolean | undefined;
3590
+ isTerminal?: boolean | undefined;
3591
+ isFinal?: boolean | undefined;
3592
+ onEntry?: string[] | undefined;
3593
+ onExit?: string[] | undefined;
3594
+ }[];
3595
+ transitions: {
3596
+ event: string;
3597
+ from: string;
3598
+ to: string;
3599
+ description?: string | null | undefined;
3600
+ eventId?: string | undefined;
3601
+ guard?: SExpr | undefined;
3602
+ effects?: SExpr[][] | undefined;
3603
+ }[];
3604
+ guards?: {
3605
+ name: string;
3606
+ expression: SExpr;
3607
+ description?: string | undefined;
3608
+ }[] | undefined;
3609
+ } | undefined;
3610
+ emits?: {
3611
+ event: string;
3612
+ description?: string | undefined;
3613
+ synonyms?: string | undefined;
3614
+ scope?: "internal" | "external" | undefined;
3615
+ tier?: string | undefined;
3616
+ payloadSchema?: EventPayloadField[] | undefined;
3617
+ eventId?: string | undefined;
3618
+ }[] | undefined;
3619
+ linkedEntity?: string | undefined;
3620
+ linkedEntityId?: string | undefined;
3621
+ listens?: {
3622
+ event: string;
3623
+ triggers: string;
3624
+ description?: string | undefined;
3625
+ synonyms?: string | undefined;
3626
+ source?: {
3627
+ kind: "any";
3628
+ } | {
3629
+ trait: string;
3630
+ kind: "trait";
3631
+ traitId?: string | undefined;
3632
+ } | {
3633
+ orbital: string;
3634
+ trait: string;
3635
+ kind: "orbital";
3636
+ traitId?: string | undefined;
3637
+ orbitalId?: string | undefined;
3638
+ } | undefined;
3639
+ scope?: "internal" | "external" | undefined;
3640
+ tier?: string | undefined;
3641
+ eventId?: string | undefined;
2820
3642
  guard?: SExpr | undefined;
2821
- triggersId?: EventId | undefined;
3643
+ triggersId?: string | undefined;
2822
3644
  payloadMapping?: Record<string, SExpr> | undefined;
2823
3645
  }[] | undefined;
2824
3646
  description_visual_prompt?: string | undefined;
@@ -2829,26 +3651,26 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2829
3651
  } | undefined;
2830
3652
  entityBindingDescription?: string | undefined;
2831
3653
  entityBindingSynonyms?: string | undefined;
2832
- entityRefIds?: Record<string, EntityId> | undefined;
2833
- traitEmbedIds?: Record<string, TraitId> | undefined;
3654
+ entityRefIds?: Record<string, string> | undefined;
3655
+ traitEmbedIds?: Record<string, string> | undefined;
2834
3656
  requiredFields?: {
2835
3657
  type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "email" | "url" | "phone" | "uuid" | "image" | "enum";
2836
3658
  name: string;
2837
3659
  description?: string | undefined;
2838
3660
  }[] | undefined;
2839
- initialEffects?: unknown[][] | undefined;
3661
+ initialEffects?: SExpr[][] | undefined;
2840
3662
  ticks?: {
2841
3663
  name: string;
2842
- effects: unknown[][];
3664
+ effects: SExpr[][];
2843
3665
  interval: string | number;
2844
3666
  description?: string | undefined;
2845
3667
  pages?: string[] | undefined;
2846
3668
  guard?: SExpr | undefined;
2847
3669
  priority?: number | undefined;
2848
3670
  appliesTo?: string[] | undefined;
2849
- pageIds?: PageId[] | undefined;
3671
+ pageIds?: string[] | undefined;
2850
3672
  emits?: string[] | undefined;
2851
- emitIds?: EventId[] | undefined;
3673
+ emitIds?: string[] | undefined;
2852
3674
  }[] | undefined;
2853
3675
  sourceBehavior?: {
2854
3676
  behavior: string;
@@ -2857,13 +3679,13 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2857
3679
  } | undefined;
2858
3680
  sourceEntityDefinition?: {
2859
3681
  name: string;
2860
- persistence: "persistent" | "runtime";
2861
- fields: EntityField[];
3682
+ fields: unknown[];
2862
3683
  description?: string | undefined;
3684
+ persistence?: "persistent" | "runtime" | undefined;
2863
3685
  shared?: boolean | undefined;
2864
3686
  identity?: boolean | undefined;
2865
3687
  collection?: string | undefined;
2866
- instances?: Record<string, unknown>[] | undefined;
3688
+ instances?: Record<string, JsonValue>[] | undefined;
2867
3689
  timestamps?: boolean | undefined;
2868
3690
  softDelete?: boolean | undefined;
2869
3691
  visual_prompt?: string | undefined;
@@ -2877,72 +3699,243 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2877
3699
  aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
2878
3700
  } | undefined;
2879
3701
  } | undefined;
2880
- }, {
2881
- name: string;
2882
- scope: "collection" | "instance";
2883
- id?: string | undefined;
2884
- description?: string | undefined;
2885
- ui?: Record<string, unknown> | undefined;
2886
- category?: "validation" | "notification" | "lifecycle" | "temporal" | "integration" | "interaction" | "agent" | "game-core" | "game-character" | "game-ai" | "game-combat" | "game-items" | "game-cards" | "game-board" | "game-puzzle" | undefined;
2887
- config?: Readonly<Record<string, ConfigFieldDeclaration>> | undefined;
2888
- capabilities?: string[] | undefined;
2889
- dataEntities?: {
2890
- name: string;
2891
- fields: TraitEntityField[];
3702
+ }>]>;
3703
+ /**
3704
+ * Check if a trait ref is an inline Trait definition
3705
+ */
3706
+ /**
3707
+ * Checks if a trait reference is an inline trait definition.
3708
+ *
3709
+ * Type guard to determine if a TraitRef is an inline trait object
3710
+ * (with 'name' property) rather than a string reference or object reference.
3711
+ *
3712
+ * @param {TraitRef} traitRef - Trait reference to check
3713
+ * @returns {boolean} True if traitRef is an inline trait, false otherwise
3714
+ *
3715
+ * @example
3716
+ * isInlineTrait({ name: 'MyTrait' }); // returns true (inline)
3717
+ * isInlineTrait('MyTrait'); // returns false (string reference)
3718
+ * isInlineTrait({ ref: 'MyTrait' }); // returns false (object reference)
3719
+ */
3720
+ declare function isInlineTrait(traitRef: TraitRef): traitRef is Trait;
3721
+ /**
3722
+ * Extracts the trait name from a trait reference.
3723
+ *
3724
+ * Handles all trait reference formats (string, inline object, object reference)
3725
+ * and returns the canonical trait name.
3726
+ *
3727
+ * @param {TraitRef} traitRef - Trait reference to extract name from
3728
+ * @returns {string} Trait name
3729
+ *
3730
+ * @example
3731
+ * getTraitName('MyTrait'); // returns 'MyTrait'
3732
+ * getTraitName({ name: 'MyTrait' }); // returns 'MyTrait'
3733
+ * getTraitName({ ref: 'MyTrait' }); // returns 'MyTrait'
3734
+ */
3735
+ declare function getTraitName(traitRef: TraitRef): string;
3736
+ /**
3737
+ * Extracts the configuration from a trait reference.
3738
+ *
3739
+ * Returns the configuration object for trait references that support it
3740
+ * (object references with 'config' property). Returns undefined for
3741
+ * string references and inline traits.
3742
+ *
3743
+ * @param {TraitRef} traitRef - Trait reference to extract config from
3744
+ * @returns {TraitConfig | undefined} Trait configuration or undefined
3745
+ *
3746
+ * @example
3747
+ * getTraitConfig('MyTrait'); // returns undefined
3748
+ * getTraitConfig({ name: 'MyTrait' }); // returns undefined
3749
+ * getTraitConfig({ ref: 'MyTrait', config: { option: 'value' } }); // returns config object
3750
+ */
3751
+ declare function getTraitConfig(traitRef: TraitRef): CallSiteConfig | undefined;
3752
+ /**
3753
+ * Normalizes a trait reference to object form.
3754
+ *
3755
+ * Converts any trait reference format (string, inline, object) to a
3756
+ * standardized object format with 'ref' and optional 'config' properties.
3757
+ *
3758
+ * @param {TraitRef} traitRef - Trait reference to normalize
3759
+ * @returns {{ ref: string; config?: TraitConfig }} Normalized trait reference
3760
+ *
3761
+ * @example
3762
+ * normalizeTraitRef('MyTrait'); // returns { ref: 'MyTrait' }
3763
+ * normalizeTraitRef({ name: 'MyTrait' }); // returns { ref: 'MyTrait' }
3764
+ * normalizeTraitRef({ ref: 'MyTrait', config: {...} }); // returns original
3765
+ */
3766
+ declare function normalizeTraitRef(traitRef: TraitRef): {
3767
+ ref: string;
3768
+ config?: CallSiteConfig;
3769
+ };
3770
+ type TraitInput = z.input<typeof TraitSchema>;
3771
+ type TraitReferenceInput = z.input<typeof TraitReferenceSchema>;
3772
+ type OrbitalTraitRef = TraitRef;
3773
+ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodObject<{
3774
+ ref: z.ZodString;
3775
+ refId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
3776
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
3777
+ from: z.ZodOptional<z.ZodString>;
3778
+ linkedEntity: z.ZodOptional<z.ZodString>;
3779
+ linkedEntityId: z.ZodOptional<z.ZodEffects<z.ZodString, EntityId, string>>;
3780
+ name: z.ZodOptional<z.ZodString>;
3781
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3782
+ eventIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, EventId, string>>>;
3783
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3784
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodType<ConfigFieldDeclaration, z.ZodTypeDef, ConfigFieldDeclaration>, z.ZodType<TraitConfigValue, z.ZodTypeDef, TraitConfigValue>]>>>;
3785
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3786
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
3787
+ event: z.ZodString;
3788
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
3789
+ triggers: z.ZodString;
3790
+ triggersId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
3791
+ description: z.ZodOptional<z.ZodString>;
3792
+ synonyms: z.ZodOptional<z.ZodString>;
3793
+ tier: z.ZodOptional<z.ZodString>;
3794
+ guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
3795
+ scope: z.ZodOptional<z.ZodEnum<["internal", "external"]>>;
3796
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
3797
+ source: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
3798
+ kind: z.ZodLiteral<"any">;
3799
+ }, "strip", z.ZodTypeAny, {
3800
+ kind: "any";
3801
+ }, {
3802
+ kind: "any";
3803
+ }>, z.ZodObject<{
3804
+ kind: z.ZodLiteral<"trait">;
3805
+ trait: z.ZodString;
3806
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
3807
+ }, "strip", z.ZodTypeAny, {
3808
+ trait: string;
3809
+ kind: "trait";
3810
+ traitId?: TraitId | undefined;
3811
+ }, {
3812
+ trait: string;
3813
+ kind: "trait";
3814
+ traitId?: string | undefined;
3815
+ }>, z.ZodObject<{
3816
+ kind: z.ZodLiteral<"orbital">;
3817
+ orbital: z.ZodString;
3818
+ trait: z.ZodString;
3819
+ orbitalId: z.ZodOptional<z.ZodEffects<z.ZodString, OrbitalId, string>>;
3820
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
3821
+ }, "strip", z.ZodTypeAny, {
3822
+ orbital: string;
3823
+ trait: string;
3824
+ kind: "orbital";
3825
+ traitId?: TraitId | undefined;
3826
+ orbitalId?: OrbitalId | undefined;
3827
+ }, {
3828
+ orbital: string;
3829
+ trait: string;
3830
+ kind: "orbital";
3831
+ traitId?: string | undefined;
3832
+ orbitalId?: string | undefined;
3833
+ }>]>>;
3834
+ }, "strip", z.ZodTypeAny, {
3835
+ event: string;
3836
+ triggers: string;
2892
3837
  description?: string | undefined;
2893
- runtime?: boolean | undefined;
2894
- collection?: string | undefined;
2895
- timestamps?: boolean | undefined;
2896
- pages?: string[] | undefined;
2897
- singleton?: boolean | undefined;
2898
- }[] | undefined;
2899
- stateMachine?: {
2900
- events: {
2901
- name: string;
2902
- key: string;
2903
- id?: string | undefined;
2904
- description?: string | undefined;
2905
- synonyms?: string | undefined;
2906
- tier?: string | undefined;
2907
- payloadSchema?: PayloadField[] | undefined;
2908
- classification?: "domain" | "system" | undefined;
2909
- semanticRole?: string | undefined;
2910
- }[];
2911
- states: {
2912
- name: string;
2913
- description?: string | undefined;
2914
- isInitial?: boolean | undefined;
2915
- isTerminal?: boolean | undefined;
2916
- isFinal?: boolean | undefined;
2917
- onEntry?: string[] | undefined;
2918
- onExit?: string[] | undefined;
2919
- }[];
2920
- transitions: {
2921
- event: string;
2922
- from: string;
2923
- to: string;
2924
- description?: string | null | undefined;
2925
- eventId?: string | undefined;
2926
- guard?: SExpr | undefined;
2927
- effects?: unknown[][] | undefined;
2928
- }[];
2929
- guards?: {
2930
- name: string;
2931
- expression: SExpr;
2932
- description?: string | undefined;
2933
- }[] | undefined;
2934
- } | undefined;
2935
- emits?: {
3838
+ synonyms?: string | undefined;
3839
+ source?: {
3840
+ kind: "any";
3841
+ } | {
3842
+ trait: string;
3843
+ kind: "trait";
3844
+ traitId?: TraitId | undefined;
3845
+ } | {
3846
+ orbital: string;
3847
+ trait: string;
3848
+ kind: "orbital";
3849
+ traitId?: TraitId | undefined;
3850
+ orbitalId?: OrbitalId | undefined;
3851
+ } | undefined;
3852
+ scope?: "internal" | "external" | undefined;
3853
+ tier?: string | undefined;
3854
+ eventId?: EventId | undefined;
3855
+ guard?: SExpr | undefined;
3856
+ triggersId?: EventId | undefined;
3857
+ payloadMapping?: Record<string, SExpr> | undefined;
3858
+ }, {
3859
+ event: string;
3860
+ triggers: string;
3861
+ description?: string | undefined;
3862
+ synonyms?: string | undefined;
3863
+ source?: {
3864
+ kind: "any";
3865
+ } | {
3866
+ trait: string;
3867
+ kind: "trait";
3868
+ traitId?: string | undefined;
3869
+ } | {
3870
+ orbital: string;
3871
+ trait: string;
3872
+ kind: "orbital";
3873
+ traitId?: string | undefined;
3874
+ orbitalId?: string | undefined;
3875
+ } | undefined;
3876
+ scope?: "internal" | "external" | undefined;
3877
+ tier?: string | undefined;
3878
+ eventId?: string | undefined;
3879
+ guard?: SExpr | undefined;
3880
+ triggersId?: string | undefined;
3881
+ payloadMapping?: Record<string, SExpr> | undefined;
3882
+ }>, "many">>;
3883
+ emitsScope: z.ZodOptional<z.ZodEnum<["internal", "external"]>>;
3884
+ effects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">>>;
3885
+ }, "strip", z.ZodTypeAny, {
3886
+ ref: string;
3887
+ id?: TraitId | undefined;
3888
+ from?: string | undefined;
3889
+ name?: string | undefined;
3890
+ fields?: Record<string, string> | undefined;
3891
+ config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
3892
+ events?: Record<string, string> | undefined;
3893
+ effects?: Record<string, SExpr[]> | undefined;
3894
+ refId?: TraitId | undefined;
3895
+ appliesTo?: string[] | undefined;
3896
+ linkedEntity?: string | undefined;
3897
+ linkedEntityId?: EntityId | undefined;
3898
+ eventIds?: Record<string, EventId> | undefined;
3899
+ listens?: {
2936
3900
  event: string;
3901
+ triggers: string;
2937
3902
  description?: string | undefined;
2938
3903
  synonyms?: string | undefined;
3904
+ source?: {
3905
+ kind: "any";
3906
+ } | {
3907
+ trait: string;
3908
+ kind: "trait";
3909
+ traitId?: TraitId | undefined;
3910
+ } | {
3911
+ orbital: string;
3912
+ trait: string;
3913
+ kind: "orbital";
3914
+ traitId?: TraitId | undefined;
3915
+ orbitalId?: OrbitalId | undefined;
3916
+ } | undefined;
2939
3917
  scope?: "internal" | "external" | undefined;
2940
3918
  tier?: string | undefined;
2941
- payloadSchema?: EventPayloadField[] | undefined;
2942
- eventId?: string | undefined;
3919
+ eventId?: EventId | undefined;
3920
+ guard?: SExpr | undefined;
3921
+ triggersId?: EventId | undefined;
3922
+ payloadMapping?: Record<string, SExpr> | undefined;
2943
3923
  }[] | undefined;
3924
+ emitsScope?: "internal" | "external" | undefined;
3925
+ }, {
3926
+ ref: string;
3927
+ id?: string | undefined;
3928
+ from?: string | undefined;
3929
+ name?: string | undefined;
3930
+ fields?: Record<string, string> | undefined;
3931
+ config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
3932
+ events?: Record<string, string> | undefined;
3933
+ effects?: Record<string, SExpr[]> | undefined;
3934
+ refId?: string | undefined;
3935
+ appliesTo?: string[] | undefined;
2944
3936
  linkedEntity?: string | undefined;
2945
3937
  linkedEntityId?: string | undefined;
3938
+ eventIds?: Record<string, string> | undefined;
2946
3939
  listens?: {
2947
3940
  event: string;
2948
3941
  triggers: string;
@@ -2968,151 +3961,87 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2968
3961
  triggersId?: string | undefined;
2969
3962
  payloadMapping?: Record<string, SExpr> | undefined;
2970
3963
  }[] | undefined;
2971
- description_visual_prompt?: string | undefined;
2972
- entityRebindable?: boolean | undefined;
2973
- entityContract?: {
2974
- requires: string[];
2975
- provides: string[];
2976
- } | undefined;
2977
- entityBindingDescription?: string | undefined;
2978
- entityBindingSynonyms?: string | undefined;
2979
- entityRefIds?: Record<string, string> | undefined;
2980
- traitEmbedIds?: Record<string, string> | undefined;
2981
- requiredFields?: {
2982
- type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "email" | "url" | "phone" | "uuid" | "image" | "enum";
2983
- name: string;
2984
- description?: string | undefined;
2985
- }[] | undefined;
2986
- initialEffects?: unknown[][] | undefined;
2987
- ticks?: {
2988
- name: string;
2989
- effects: unknown[][];
2990
- interval: string | number;
2991
- description?: string | undefined;
2992
- pages?: string[] | undefined;
2993
- guard?: SExpr | undefined;
2994
- priority?: number | undefined;
2995
- appliesTo?: string[] | undefined;
2996
- pageIds?: string[] | undefined;
2997
- emits?: string[] | undefined;
2998
- emitIds?: string[] | undefined;
2999
- }[] | undefined;
3000
- sourceBehavior?: {
3001
- behavior: string;
3002
- alias: string;
3003
- originalName: string;
3004
- } | undefined;
3005
- sourceEntityDefinition?: {
3006
- name: string;
3007
- fields: unknown[];
3008
- description?: string | undefined;
3009
- persistence?: "persistent" | "runtime" | undefined;
3010
- shared?: boolean | undefined;
3011
- identity?: boolean | undefined;
3012
- collection?: string | undefined;
3013
- instances?: Record<string, unknown>[] | undefined;
3014
- timestamps?: boolean | undefined;
3015
- softDelete?: boolean | undefined;
3016
- visual_prompt?: string | undefined;
3017
- assetRef?: {
3018
- role: string;
3019
- category: string;
3020
- animations?: string[] | undefined;
3021
- style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
3022
- variant?: string | undefined;
3023
- dimension?: "2d" | "3d" | undefined;
3024
- aspect?: "1:1" | "16:9" | "5:7" | "8:1" | undefined;
3025
- } | undefined;
3026
- } | undefined;
3027
- }>]>;
3028
- /**
3029
- * Check if a trait ref is an inline Trait definition
3030
- */
3031
- /**
3032
- * Checks if a trait reference is an inline trait definition.
3033
- *
3034
- * Type guard to determine if a TraitRef is an inline trait object
3035
- * (with 'name' property) rather than a string reference or object reference.
3036
- *
3037
- * @param {TraitRef} traitRef - Trait reference to check
3038
- * @returns {boolean} True if traitRef is an inline trait, false otherwise
3039
- *
3040
- * @example
3041
- * isInlineTrait({ name: 'MyTrait' }); // returns true (inline)
3042
- * isInlineTrait('MyTrait'); // returns false (string reference)
3043
- * isInlineTrait({ ref: 'MyTrait' }); // returns false (object reference)
3044
- */
3045
- declare function isInlineTrait(traitRef: TraitRef): traitRef is Trait;
3046
- /**
3047
- * Extracts the trait name from a trait reference.
3048
- *
3049
- * Handles all trait reference formats (string, inline object, object reference)
3050
- * and returns the canonical trait name.
3051
- *
3052
- * @param {TraitRef} traitRef - Trait reference to extract name from
3053
- * @returns {string} Trait name
3054
- *
3055
- * @example
3056
- * getTraitName('MyTrait'); // returns 'MyTrait'
3057
- * getTraitName({ name: 'MyTrait' }); // returns 'MyTrait'
3058
- * getTraitName({ ref: 'MyTrait' }); // returns 'MyTrait'
3059
- */
3060
- declare function getTraitName(traitRef: TraitRef): string;
3061
- /**
3062
- * Extracts the configuration from a trait reference.
3063
- *
3064
- * Returns the configuration object for trait references that support it
3065
- * (object references with 'config' property). Returns undefined for
3066
- * string references and inline traits.
3067
- *
3068
- * @param {TraitRef} traitRef - Trait reference to extract config from
3069
- * @returns {TraitConfig | undefined} Trait configuration or undefined
3070
- *
3071
- * @example
3072
- * getTraitConfig('MyTrait'); // returns undefined
3073
- * getTraitConfig({ name: 'MyTrait' }); // returns undefined
3074
- * getTraitConfig({ ref: 'MyTrait', config: { option: 'value' } }); // returns config object
3075
- */
3076
- declare function getTraitConfig(traitRef: TraitRef): CallSiteConfig | undefined;
3077
- /**
3078
- * Normalizes a trait reference to object form.
3079
- *
3080
- * Converts any trait reference format (string, inline, object) to a
3081
- * standardized object format with 'ref' and optional 'config' properties.
3082
- *
3083
- * @param {TraitRef} traitRef - Trait reference to normalize
3084
- * @returns {{ ref: string; config?: TraitConfig }} Normalized trait reference
3085
- *
3086
- * @example
3087
- * normalizeTraitRef('MyTrait'); // returns { ref: 'MyTrait' }
3088
- * normalizeTraitRef({ name: 'MyTrait' }); // returns { ref: 'MyTrait' }
3089
- * normalizeTraitRef({ ref: 'MyTrait', config: {...} }); // returns original
3090
- */
3091
- declare function normalizeTraitRef(traitRef: TraitRef): {
3092
- ref: string;
3093
- config?: CallSiteConfig;
3094
- };
3095
- type TraitInput = z.input<typeof TraitSchema>;
3096
- type TraitReferenceInput = z.input<typeof TraitReferenceSchema>;
3097
- type OrbitalTraitRef = TraitRef;
3098
- declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3099
- ref: z.ZodString;
3100
- config: z.ZodOptional<z.ZodType<TraitConfigObject, z.ZodTypeDef, TraitConfigObject>>;
3101
- linkedEntity: z.ZodOptional<z.ZodString>;
3102
- name: z.ZodOptional<z.ZodString>;
3103
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3104
- }, "strip", z.ZodTypeAny, {
3964
+ emitsScope?: "internal" | "external" | undefined;
3965
+ }>, {
3105
3966
  ref: string;
3967
+ id?: TraitId | undefined;
3968
+ from?: string | undefined;
3106
3969
  name?: string | undefined;
3107
- config?: TraitConfigObject | undefined;
3970
+ fields?: Record<string, string> | undefined;
3971
+ config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
3108
3972
  events?: Record<string, string> | undefined;
3973
+ effects?: Record<string, SExpr[]> | undefined;
3974
+ refId?: TraitId | undefined;
3975
+ appliesTo?: string[] | undefined;
3109
3976
  linkedEntity?: string | undefined;
3977
+ linkedEntityId?: EntityId | undefined;
3978
+ eventIds?: Record<string, EventId> | undefined;
3979
+ listens?: {
3980
+ event: string;
3981
+ triggers: string;
3982
+ description?: string | undefined;
3983
+ synonyms?: string | undefined;
3984
+ source?: {
3985
+ kind: "any";
3986
+ } | {
3987
+ trait: string;
3988
+ kind: "trait";
3989
+ traitId?: TraitId | undefined;
3990
+ } | {
3991
+ orbital: string;
3992
+ trait: string;
3993
+ kind: "orbital";
3994
+ traitId?: TraitId | undefined;
3995
+ orbitalId?: OrbitalId | undefined;
3996
+ } | undefined;
3997
+ scope?: "internal" | "external" | undefined;
3998
+ tier?: string | undefined;
3999
+ eventId?: EventId | undefined;
4000
+ guard?: SExpr | undefined;
4001
+ triggersId?: EventId | undefined;
4002
+ payloadMapping?: Record<string, SExpr> | undefined;
4003
+ }[] | undefined;
4004
+ emitsScope?: "internal" | "external" | undefined;
3110
4005
  }, {
3111
4006
  ref: string;
4007
+ id?: string | undefined;
4008
+ from?: string | undefined;
3112
4009
  name?: string | undefined;
3113
- config?: TraitConfigObject | undefined;
4010
+ fields?: Record<string, string> | undefined;
4011
+ config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
3114
4012
  events?: Record<string, string> | undefined;
4013
+ effects?: Record<string, SExpr[]> | undefined;
4014
+ refId?: string | undefined;
4015
+ appliesTo?: string[] | undefined;
3115
4016
  linkedEntity?: string | undefined;
4017
+ linkedEntityId?: string | undefined;
4018
+ eventIds?: Record<string, string> | undefined;
4019
+ listens?: {
4020
+ event: string;
4021
+ triggers: string;
4022
+ description?: string | undefined;
4023
+ synonyms?: string | undefined;
4024
+ source?: {
4025
+ kind: "any";
4026
+ } | {
4027
+ trait: string;
4028
+ kind: "trait";
4029
+ traitId?: string | undefined;
4030
+ } | {
4031
+ orbital: string;
4032
+ trait: string;
4033
+ kind: "orbital";
4034
+ traitId?: string | undefined;
4035
+ orbitalId?: string | undefined;
4036
+ } | undefined;
4037
+ scope?: "internal" | "external" | undefined;
4038
+ tier?: string | undefined;
4039
+ eventId?: string | undefined;
4040
+ guard?: SExpr | undefined;
4041
+ triggersId?: string | undefined;
4042
+ payloadMapping?: Record<string, SExpr> | undefined;
4043
+ }[] | undefined;
4044
+ emitsScope?: "internal" | "external" | undefined;
3116
4045
  }>, z.ZodObject<{
3117
4046
  id: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
3118
4047
  name: z.ZodString;
@@ -3242,7 +4171,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3242
4171
  event: z.ZodString;
3243
4172
  eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
3244
4173
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
3245
- effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
4174
+ effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">>;
3246
4175
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3247
4176
  }, "strip", z.ZodTypeAny, {
3248
4177
  event: string;
@@ -3251,7 +4180,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3251
4180
  description?: string | null | undefined;
3252
4181
  eventId?: EventId | undefined;
3253
4182
  guard?: SExpr | undefined;
3254
- effects?: unknown[][] | undefined;
4183
+ effects?: SExpr[][] | undefined;
3255
4184
  }, {
3256
4185
  event: string;
3257
4186
  from: string;
@@ -3259,7 +4188,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3259
4188
  description?: string | null | undefined;
3260
4189
  eventId?: string | undefined;
3261
4190
  guard?: SExpr | undefined;
3262
- effects?: unknown[][] | undefined;
4191
+ effects?: SExpr[][] | undefined;
3263
4192
  }>, "many">;
3264
4193
  guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
3265
4194
  name: z.ZodString;
@@ -3302,7 +4231,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3302
4231
  description?: string | null | undefined;
3303
4232
  eventId?: EventId | undefined;
3304
4233
  guard?: SExpr | undefined;
3305
- effects?: unknown[][] | undefined;
4234
+ effects?: SExpr[][] | undefined;
3306
4235
  }[];
3307
4236
  guards?: {
3308
4237
  name: string;
@@ -3337,7 +4266,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3337
4266
  description?: string | null | undefined;
3338
4267
  eventId?: string | undefined;
3339
4268
  guard?: SExpr | undefined;
3340
- effects?: unknown[][] | undefined;
4269
+ effects?: SExpr[][] | undefined;
3341
4270
  }[];
3342
4271
  guards?: {
3343
4272
  name: string;
@@ -3345,7 +4274,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3345
4274
  description?: string | undefined;
3346
4275
  }[] | undefined;
3347
4276
  }>>;
3348
- initialEffects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
4277
+ initialEffects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">>;
3349
4278
  ticks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3350
4279
  name: z.ZodString;
3351
4280
  description: z.ZodOptional<z.ZodString>;
@@ -3355,12 +4284,12 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3355
4284
  pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3356
4285
  pageIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, PageId, string>, "many">>;
3357
4286
  guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
3358
- effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">;
4287
+ effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodType<SExpr, z.ZodTypeDef, SExpr>, "many">, SExpr[], SExpr[]>, "many">;
3359
4288
  emits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3360
4289
  emitIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, EventId, string>, "many">>;
3361
4290
  }, "strip", z.ZodTypeAny, {
3362
4291
  name: string;
3363
- effects: unknown[][];
4292
+ effects: SExpr[][];
3364
4293
  interval: string | number;
3365
4294
  description?: string | undefined;
3366
4295
  pages?: string[] | undefined;
@@ -3372,7 +4301,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3372
4301
  emitIds?: EventId[] | undefined;
3373
4302
  }, {
3374
4303
  name: string;
3375
- effects: unknown[][];
4304
+ effects: SExpr[][];
3376
4305
  interval: string | number;
3377
4306
  description?: string | undefined;
3378
4307
  pages?: string[] | undefined;
@@ -3514,7 +4443,64 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3514
4443
  triggersId?: string | undefined;
3515
4444
  payloadMapping?: Record<string, SExpr> | undefined;
3516
4445
  }>, "many">>;
3517
- ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4446
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
4447
+ presentation: z.ZodEnum<["modal", "drawer", "popover", "inline", "confirm-dialog"]>;
4448
+ content: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, "many">]>;
4449
+ props: z.ZodOptional<z.ZodObject<{
4450
+ size: z.ZodOptional<z.ZodEnum<["sm", "md", "lg", "xl", "full"]>>;
4451
+ position: z.ZodOptional<z.ZodEnum<["left", "right", "top", "bottom", "center"]>>;
4452
+ title: z.ZodOptional<z.ZodString>;
4453
+ closable: z.ZodOptional<z.ZodBoolean>;
4454
+ width: z.ZodOptional<z.ZodString>;
4455
+ showProgress: z.ZodOptional<z.ZodBoolean>;
4456
+ step: z.ZodOptional<z.ZodNumber>;
4457
+ totalSteps: z.ZodOptional<z.ZodNumber>;
4458
+ }, "strip", z.ZodTypeAny, {
4459
+ width?: string | undefined;
4460
+ title?: string | undefined;
4461
+ totalSteps?: number | undefined;
4462
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
4463
+ step?: number | undefined;
4464
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
4465
+ showProgress?: boolean | undefined;
4466
+ closable?: boolean | undefined;
4467
+ }, {
4468
+ width?: string | undefined;
4469
+ title?: string | undefined;
4470
+ totalSteps?: number | undefined;
4471
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
4472
+ step?: number | undefined;
4473
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
4474
+ showProgress?: boolean | undefined;
4475
+ closable?: boolean | undefined;
4476
+ }>>;
4477
+ }, "strip", z.ZodTypeAny, {
4478
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
4479
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
4480
+ props?: {
4481
+ width?: string | undefined;
4482
+ title?: string | undefined;
4483
+ totalSteps?: number | undefined;
4484
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
4485
+ step?: number | undefined;
4486
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
4487
+ showProgress?: boolean | undefined;
4488
+ closable?: boolean | undefined;
4489
+ } | undefined;
4490
+ }, {
4491
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
4492
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
4493
+ props?: {
4494
+ width?: string | undefined;
4495
+ title?: string | undefined;
4496
+ totalSteps?: number | undefined;
4497
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
4498
+ step?: number | undefined;
4499
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
4500
+ showProgress?: boolean | undefined;
4501
+ closable?: boolean | undefined;
4502
+ } | undefined;
4503
+ }>>>;
3518
4504
  config: z.ZodOptional<z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, z.ZodTypeDef, Readonly<Record<string, ConfigFieldDeclaration>>>>;
3519
4505
  sourceBehavior: z.ZodOptional<z.ZodObject<{
3520
4506
  behavior: z.ZodString;
@@ -3536,7 +4522,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3536
4522
  identity: z.ZodOptional<z.ZodBoolean>;
3537
4523
  collection: z.ZodOptional<z.ZodString>;
3538
4524
  fields: z.ZodArray<z.ZodType<EntityField, z.ZodTypeDef, unknown>, "many">;
3539
- instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
4525
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>, "many">>;
3540
4526
  timestamps: z.ZodOptional<z.ZodBoolean>;
3541
4527
  softDelete: z.ZodOptional<z.ZodBoolean>;
3542
4528
  description: z.ZodOptional<z.ZodString>;
@@ -3574,7 +4560,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3574
4560
  shared?: boolean | undefined;
3575
4561
  identity?: boolean | undefined;
3576
4562
  collection?: string | undefined;
3577
- instances?: Record<string, unknown>[] | undefined;
4563
+ instances?: Record<string, JsonValue>[] | undefined;
3578
4564
  timestamps?: boolean | undefined;
3579
4565
  softDelete?: boolean | undefined;
3580
4566
  visual_prompt?: string | undefined;
@@ -3595,7 +4581,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3595
4581
  shared?: boolean | undefined;
3596
4582
  identity?: boolean | undefined;
3597
4583
  collection?: string | undefined;
3598
- instances?: Record<string, unknown>[] | undefined;
4584
+ instances?: Record<string, JsonValue>[] | undefined;
3599
4585
  timestamps?: boolean | undefined;
3600
4586
  softDelete?: boolean | undefined;
3601
4587
  visual_prompt?: string | undefined;
@@ -3614,7 +4600,20 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3614
4600
  scope: "collection" | "instance";
3615
4601
  id?: TraitId | undefined;
3616
4602
  description?: string | undefined;
3617
- ui?: Record<string, unknown> | undefined;
4603
+ ui?: Record<string, {
4604
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
4605
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
4606
+ props?: {
4607
+ width?: string | undefined;
4608
+ title?: string | undefined;
4609
+ totalSteps?: number | undefined;
4610
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
4611
+ step?: number | undefined;
4612
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
4613
+ showProgress?: boolean | undefined;
4614
+ closable?: boolean | undefined;
4615
+ } | undefined;
4616
+ }> | undefined;
3618
4617
  category?: "validation" | "notification" | "lifecycle" | "temporal" | "integration" | "interaction" | "agent" | "game-core" | "game-character" | "game-ai" | "game-combat" | "game-items" | "game-cards" | "game-board" | "game-puzzle" | undefined;
3619
4618
  config?: Readonly<Record<string, ConfigFieldDeclaration>> | undefined;
3620
4619
  capabilities?: string[] | undefined;
@@ -3656,7 +4655,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3656
4655
  description?: string | null | undefined;
3657
4656
  eventId?: EventId | undefined;
3658
4657
  guard?: SExpr | undefined;
3659
- effects?: unknown[][] | undefined;
4658
+ effects?: SExpr[][] | undefined;
3660
4659
  }[];
3661
4660
  guards?: {
3662
4661
  name: string;
@@ -3715,10 +4714,10 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3715
4714
  name: string;
3716
4715
  description?: string | undefined;
3717
4716
  }[] | undefined;
3718
- initialEffects?: unknown[][] | undefined;
4717
+ initialEffects?: SExpr[][] | undefined;
3719
4718
  ticks?: {
3720
4719
  name: string;
3721
- effects: unknown[][];
4720
+ effects: SExpr[][];
3722
4721
  interval: string | number;
3723
4722
  description?: string | undefined;
3724
4723
  pages?: string[] | undefined;
@@ -3742,7 +4741,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3742
4741
  shared?: boolean | undefined;
3743
4742
  identity?: boolean | undefined;
3744
4743
  collection?: string | undefined;
3745
- instances?: Record<string, unknown>[] | undefined;
4744
+ instances?: Record<string, JsonValue>[] | undefined;
3746
4745
  timestamps?: boolean | undefined;
3747
4746
  softDelete?: boolean | undefined;
3748
4747
  visual_prompt?: string | undefined;
@@ -3761,7 +4760,20 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3761
4760
  scope: "collection" | "instance";
3762
4761
  id?: string | undefined;
3763
4762
  description?: string | undefined;
3764
- ui?: Record<string, unknown> | undefined;
4763
+ ui?: Record<string, {
4764
+ content: Record<string, JsonValue> | Record<string, JsonValue>[];
4765
+ presentation: "inline" | "modal" | "drawer" | "confirm-dialog" | "popover";
4766
+ props?: {
4767
+ width?: string | undefined;
4768
+ title?: string | undefined;
4769
+ totalSteps?: number | undefined;
4770
+ size?: "sm" | "md" | "lg" | "xl" | "full" | undefined;
4771
+ step?: number | undefined;
4772
+ position?: "center" | "left" | "right" | "top" | "bottom" | undefined;
4773
+ showProgress?: boolean | undefined;
4774
+ closable?: boolean | undefined;
4775
+ } | undefined;
4776
+ }> | undefined;
3765
4777
  category?: "validation" | "notification" | "lifecycle" | "temporal" | "integration" | "interaction" | "agent" | "game-core" | "game-character" | "game-ai" | "game-combat" | "game-items" | "game-cards" | "game-board" | "game-puzzle" | undefined;
3766
4778
  config?: Readonly<Record<string, ConfigFieldDeclaration>> | undefined;
3767
4779
  capabilities?: string[] | undefined;
@@ -3803,7 +4815,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3803
4815
  description?: string | null | undefined;
3804
4816
  eventId?: string | undefined;
3805
4817
  guard?: SExpr | undefined;
3806
- effects?: unknown[][] | undefined;
4818
+ effects?: SExpr[][] | undefined;
3807
4819
  }[];
3808
4820
  guards?: {
3809
4821
  name: string;
@@ -3862,10 +4874,10 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3862
4874
  name: string;
3863
4875
  description?: string | undefined;
3864
4876
  }[] | undefined;
3865
- initialEffects?: unknown[][] | undefined;
4877
+ initialEffects?: SExpr[][] | undefined;
3866
4878
  ticks?: {
3867
4879
  name: string;
3868
- effects: unknown[][];
4880
+ effects: SExpr[][];
3869
4881
  interval: string | number;
3870
4882
  description?: string | undefined;
3871
4883
  pages?: string[] | undefined;
@@ -3889,7 +4901,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3889
4901
  shared?: boolean | undefined;
3890
4902
  identity?: boolean | undefined;
3891
4903
  collection?: string | undefined;
3892
- instances?: Record<string, unknown>[] | undefined;
4904
+ instances?: Record<string, JsonValue>[] | undefined;
3893
4905
  timestamps?: boolean | undefined;
3894
4906
  softDelete?: boolean | undefined;
3895
4907
  visual_prompt?: string | undefined;
@@ -3905,4 +4917,4 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3905
4917
  } | undefined;
3906
4918
  }>]>;
3907
4919
 
3908
- export { type TraitEntityField as $, RequiredFieldSchema as A, SECRET_CONFIG_TYPES as B, type CallSiteConfig as C, type DeclaredTraitConfig as D, type EntityFieldContract as E, type SecretConfigType as F, type Guard as G, type StateInput as H, type StateMachine as I, type StateMachineInput as J, StateMachineSchema as K, type ListenSource as L, StateSchema as M, TickIntervalSchema as N, type OrbitalTraitRef as O, type PayloadField as P, type TraitCategory as Q, REFERENCE_CONFIG_TYPES as R, type State as S, type TraitEventListener as T, TraitCategorySchema as U, type TraitConfigObject as V, TraitConfigSchema as W, type TraitConfigValue as X, TraitConfigValueSchema as Y, type TraitDataEntity as Z, TraitDataEntitySchema as _, type TraitReference as a, TraitEntityFieldSchema as a0, type TraitEventContract as a1, TraitEventContractSchema as a2, TraitEventListenerSchema as a3, type TraitInput as a4, type TraitRef as a5, TraitRefSchema as a6, type TraitReferenceInput as a7, TraitReferenceSchema as a8, TraitSchema as a9, type TraitTick as aa, TraitTickSchema as ab, type TraitUIBinding as ac, type Transition as ad, type TransitionInput as ae, TransitionSchema as af, configRefEventKnob as ag, getTraitConfig as ah, getTraitName as ai, isCallSiteConfigDeclaration as aj, isCircuitEvent as ak, isInlineTrait as al, isReferenceConfigType as am, isSecretConfigType as an, normalizeCallSiteConfigToValues as ao, normalizeTraitRef as ap, resolveConfigRefEventName as aq, type TraitScope as ar, type CallSiteConfigEntry as b, type Trait as c, type TraitConfig as d, CONFIG_REF_EVENT_PATTERN as e, type ConfigFieldDeclaration as f, ConfigFieldDeclarationSchema as g, type ConfigFieldItemsDeclaration as h, type ConfigRefEventError as i, DeclaredTraitConfigSchema as j, EntityFieldContractSchema as k, type Event as l, type EventInput as m, type EventPayloadField as n, EventPayloadFieldSchema as o, EventSchema as p, type EventScope as q, EventScopeSchema as r, type GuardInput as s, GuardSchema as t, ListenSourceSchema as u, OrbitalTraitRefSchema as v, PayloadFieldSchema as w, type PresentationType as x, type ReferenceConfigType as y, type RequiredField as z };
4920
+ export { TraitConfigValueSchema as $, OrbitalTraitRefSchema as A, PayloadFieldSchema as B, type ConfigFieldDeclaration as C, type DeclaredTraitConfig as D, type EventPayloadField as E, type PresentationType as F, type Guard as G, type ReferenceConfigType as H, type RequiredField as I, RequiredFieldSchema as J, SECRET_CONFIG_TYPES as K, type ListenSource as L, type SecretConfigType as M, type StateInput as N, type OrbitalTraitRef as O, type PayloadField as P, type StateMachine as Q, REFERENCE_CONFIG_TYPES as R, type State as S, type TraitEventListener as T, type StateMachineInput as U, StateMachineSchema as V, StateSchema as W, TickIntervalSchema as X, type TraitCategory as Y, TraitCategorySchema as Z, TraitConfigSchema as _, type TraitReference as a, type TraitDataEntity as a0, TraitDataEntitySchema as a1, TraitEntityFieldSchema as a2, TraitEventContractSchema as a3, TraitEventListenerSchema as a4, type TraitInput as a5, TraitRefSchema as a6, type TraitReferenceInput as a7, TraitReferenceSchema as a8, TraitSchema as a9, type TraitTick as aa, TraitTickSchema as ab, type TraitUIBinding as ac, TraitUIBindingSchema as ad, type Transition as ae, type TransitionInput as af, TransitionSchema as ag, configRefEventKnob as ah, getTraitConfig as ai, getTraitName as aj, isCallSiteConfigDeclaration as ak, isCircuitEvent as al, isInlineTrait as am, isReferenceConfigType as an, isSecretConfigType as ao, normalizeCallSiteConfigToValues as ap, normalizeTraitRef as aq, resolveConfigRefEventName as ar, type TraitScope as as, type TraitConfig as b, type TraitConfigObject as c, type TraitRef as d, type TraitConfigValue as e, type TraitEntityField as f, type Trait as g, type CallSiteConfig as h, type CallSiteConfigEntry as i, type TraitEventContract as j, CONFIG_REF_EVENT_PATTERN as k, ConfigFieldDeclarationSchema as l, type ConfigFieldItemsDeclaration as m, type ConfigRefEventError as n, DeclaredTraitConfigSchema as o, type EntityFieldContract as p, EntityFieldContractSchema as q, type Event as r, type EventInput as s, EventPayloadFieldSchema as t, EventSchema as u, type EventScope as v, EventScopeSchema as w, type GuardInput as x, GuardSchema as y, ListenSourceSchema as z };