@almadar/core 10.29.0 → 10.30.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,4 +1,4 @@
1
- import { A as AnyPatternConfig, b as EntityRow, c as Entity, E as EntityField } from './pattern-types-JZordBZv.js';
1
+ import { A as AnyPatternConfig, b as EntityRow, c as EventId, T as TraitId, O as OrbitalId, d as EntityId, P as PageId, e as Entity, E as EntityField } from './pattern-types-CLcOXOmW.js';
2
2
  import { S as SExpr, E as EventPayload, a as Expression } from './expression-CB9R3KWk.js';
3
3
  import { z } from 'zod';
4
4
 
@@ -800,6 +800,17 @@ type RenderUIEffect = ['render-ui', UISlot, AnyPatternConfig] | ['render-ui', UI
800
800
  * @example ["fn", "item", { "type": "stack", "children": [{ "type": "typography", "content": "@item.title" }] }]
801
801
  */
802
802
  type RenderItemLambda = ['fn', string, AnyPatternConfig];
803
+ /**
804
+ * Dynamic-collection children entry: renders one child per item of a collection
805
+ * expression, authored inline in a `children:` position and kept verbatim as IR
806
+ * (no new node kind). The collection expression is an {@link SExpr} evaluated at
807
+ * render time; the {@link RenderItemLambda} body is instantiated per item with
808
+ * the lambda param bound as an `@item`-scope binding. Both execution paths lower
809
+ * onto the one lambda + `@item` + splice machinery.
810
+ *
811
+ * @example ["array/map", "@entity.tasks", ["fn", "item", { "type": "typography", "content": "@item.title" }]]
812
+ */
813
+ type RenderChildrenMap = ['array/map', SExpr, RenderItemLambda];
803
814
  /**
804
815
  * Navigate effect - navigates to an internal page path or an external URL.
805
816
  * @example ['navigate', '/tasks'] or ['navigate', '/tasks/:id', { id: '123' }]
@@ -1433,7 +1444,10 @@ interface ResolvedPatternProps {
1433
1444
  interface RenderUINode {
1434
1445
  type: string;
1435
1446
  props?: ResolvedPatternProps;
1436
- children?: RenderUINode[];
1447
+ /** Static child nodes and/or dynamic-collection map entries. A
1448
+ * {@link RenderChildrenMap} entry expands at render time into resolved
1449
+ * `RenderUINode`s, so components always receive a flat, fully-resolved list. */
1450
+ children?: Array<RenderUINode | RenderChildrenMap>;
1437
1451
  content?: string;
1438
1452
  entity?: string;
1439
1453
  renderItem?: RenderUINode;
@@ -1507,6 +1521,8 @@ declare const PayloadFieldSchema: z.ZodType<PayloadField>;
1507
1521
  interface Event {
1508
1522
  /** Event key (UPPER_SNAKE_CASE) */
1509
1523
  key: string;
1524
+ /** V4 dual-carry id sibling of `key` — optional until the Phase-7 flip. */
1525
+ id?: EventId;
1510
1526
  /** Human-readable name */
1511
1527
  name: string;
1512
1528
  /** Description (authored `@description` on the emit/listen). */
@@ -1525,6 +1541,7 @@ interface Event {
1525
1541
  }
1526
1542
  declare const EventSchema: z.ZodObject<{
1527
1543
  key: z.ZodString;
1544
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
1528
1545
  name: z.ZodString;
1529
1546
  description: z.ZodOptional<z.ZodString>;
1530
1547
  synonyms: z.ZodOptional<z.ZodString>;
@@ -1535,6 +1552,7 @@ declare const EventSchema: z.ZodObject<{
1535
1552
  }, "strip", z.ZodTypeAny, {
1536
1553
  name: string;
1537
1554
  key: string;
1555
+ id?: EventId | undefined;
1538
1556
  description?: string | undefined;
1539
1557
  synonyms?: string | undefined;
1540
1558
  tier?: string | undefined;
@@ -1544,6 +1562,7 @@ declare const EventSchema: z.ZodObject<{
1544
1562
  }, {
1545
1563
  name: string;
1546
1564
  key: string;
1565
+ id?: string | undefined;
1547
1566
  description?: string | undefined;
1548
1567
  synonyms?: string | undefined;
1549
1568
  tier?: string | undefined;
@@ -1604,6 +1623,8 @@ interface Transition {
1604
1623
  to: string;
1605
1624
  /** Event key that triggers this transition */
1606
1625
  event: string;
1626
+ /** V4 dual-carry id sibling of `event` — optional until the Phase-7 flip. */
1627
+ eventId?: EventId;
1607
1628
  /** Guard expression - S-expression array */
1608
1629
  guard?: Expression | null;
1609
1630
  /** Effects to execute - S-expression arrays */
@@ -1615,6 +1636,7 @@ declare const TransitionSchema: z.ZodObject<{
1615
1636
  from: z.ZodString;
1616
1637
  to: z.ZodString;
1617
1638
  event: z.ZodString;
1639
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
1618
1640
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
1619
1641
  effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
1620
1642
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1623,6 +1645,7 @@ declare const TransitionSchema: z.ZodObject<{
1623
1645
  from: string;
1624
1646
  to: string;
1625
1647
  description?: string | null | undefined;
1648
+ eventId?: EventId | undefined;
1626
1649
  guard?: SExpr | undefined;
1627
1650
  effects?: unknown[][] | undefined;
1628
1651
  }, {
@@ -1630,6 +1653,7 @@ declare const TransitionSchema: z.ZodObject<{
1630
1653
  from: string;
1631
1654
  to: string;
1632
1655
  description?: string | null | undefined;
1656
+ eventId?: string | undefined;
1633
1657
  guard?: SExpr | undefined;
1634
1658
  effects?: unknown[][] | undefined;
1635
1659
  }>;
@@ -1674,6 +1698,7 @@ declare const StateMachineSchema: z.ZodObject<{
1674
1698
  }>, "many">;
1675
1699
  events: z.ZodArray<z.ZodObject<{
1676
1700
  key: z.ZodString;
1701
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
1677
1702
  name: z.ZodString;
1678
1703
  description: z.ZodOptional<z.ZodString>;
1679
1704
  synonyms: z.ZodOptional<z.ZodString>;
@@ -1684,6 +1709,7 @@ declare const StateMachineSchema: z.ZodObject<{
1684
1709
  }, "strip", z.ZodTypeAny, {
1685
1710
  name: string;
1686
1711
  key: string;
1712
+ id?: EventId | undefined;
1687
1713
  description?: string | undefined;
1688
1714
  synonyms?: string | undefined;
1689
1715
  tier?: string | undefined;
@@ -1693,6 +1719,7 @@ declare const StateMachineSchema: z.ZodObject<{
1693
1719
  }, {
1694
1720
  name: string;
1695
1721
  key: string;
1722
+ id?: string | undefined;
1696
1723
  description?: string | undefined;
1697
1724
  synonyms?: string | undefined;
1698
1725
  tier?: string | undefined;
@@ -1704,6 +1731,7 @@ declare const StateMachineSchema: z.ZodObject<{
1704
1731
  from: z.ZodString;
1705
1732
  to: z.ZodString;
1706
1733
  event: z.ZodString;
1734
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
1707
1735
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
1708
1736
  effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
1709
1737
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1712,6 +1740,7 @@ declare const StateMachineSchema: z.ZodObject<{
1712
1740
  from: string;
1713
1741
  to: string;
1714
1742
  description?: string | null | undefined;
1743
+ eventId?: EventId | undefined;
1715
1744
  guard?: SExpr | undefined;
1716
1745
  effects?: unknown[][] | undefined;
1717
1746
  }, {
@@ -1719,6 +1748,7 @@ declare const StateMachineSchema: z.ZodObject<{
1719
1748
  from: string;
1720
1749
  to: string;
1721
1750
  description?: string | null | undefined;
1751
+ eventId?: string | undefined;
1722
1752
  guard?: SExpr | undefined;
1723
1753
  effects?: unknown[][] | undefined;
1724
1754
  }>, "many">;
@@ -1739,6 +1769,7 @@ declare const StateMachineSchema: z.ZodObject<{
1739
1769
  events: {
1740
1770
  name: string;
1741
1771
  key: string;
1772
+ id?: EventId | undefined;
1742
1773
  description?: string | undefined;
1743
1774
  synonyms?: string | undefined;
1744
1775
  tier?: string | undefined;
@@ -1760,6 +1791,7 @@ declare const StateMachineSchema: z.ZodObject<{
1760
1791
  from: string;
1761
1792
  to: string;
1762
1793
  description?: string | null | undefined;
1794
+ eventId?: EventId | undefined;
1763
1795
  guard?: SExpr | undefined;
1764
1796
  effects?: unknown[][] | undefined;
1765
1797
  }[];
@@ -1772,6 +1804,7 @@ declare const StateMachineSchema: z.ZodObject<{
1772
1804
  events: {
1773
1805
  name: string;
1774
1806
  key: string;
1807
+ id?: string | undefined;
1775
1808
  description?: string | undefined;
1776
1809
  synonyms?: string | undefined;
1777
1810
  tier?: string | undefined;
@@ -1793,6 +1826,7 @@ declare const StateMachineSchema: z.ZodObject<{
1793
1826
  from: string;
1794
1827
  to: string;
1795
1828
  description?: string | null | undefined;
1829
+ eventId?: string | undefined;
1796
1830
  guard?: SExpr | undefined;
1797
1831
  effects?: unknown[][] | undefined;
1798
1832
  }[];
@@ -1900,9 +1934,29 @@ declare function normalizeCallSiteConfigToValues(config: CallSiteConfig | undefi
1900
1934
  * the enum member list through lowering — consumed by config-driven UI
1901
1935
  * (e.g. the playground property inspector) to render typed controls.
1902
1936
  */
1937
+ /**
1938
+ * The reference config-field types (V4-W5). A config knob typed `entity`,
1939
+ * `trait`, or `event` holds a REFERENCE (an entity/trait/event name), not a
1940
+ * plain value — so the stamp records the referenced node's id on the field
1941
+ * (`ConfigFieldDeclaration.refId`) and both execution paths resolve the value to
1942
+ * the node's CURRENT name by id, exactly like `entityRefIds`/`traitEmbedIds`.
1943
+ * This is the deterministic, source-tagged contract that lets a declaration-only
1944
+ * rename flow through a config value without any name-scanning heuristic.
1945
+ */
1946
+ declare const REFERENCE_CONFIG_TYPES: readonly ["entity", "trait", "event"];
1947
+ type ReferenceConfigType = (typeof REFERENCE_CONFIG_TYPES)[number];
1948
+ /** True when a config field's `type` marks its value as an entity/trait/event reference. */
1949
+ declare function isReferenceConfigType(type: string): type is ReferenceConfigType;
1903
1950
  interface ConfigFieldDeclaration {
1904
1951
  readonly type: string;
1905
1952
  readonly default?: TraitConfigValue;
1953
+ /**
1954
+ * V4-W5 dual-carry id — set by the stamp when `type` is a reference config
1955
+ * type (`entity`/`trait`/`event`): the stable id of the entity/trait/event
1956
+ * the field's value names. Readers resolve the value to that node's current
1957
+ * name by id (rename-proof); absent for non-reference fields.
1958
+ */
1959
+ readonly refId?: string;
1906
1960
  /** Marks the knob as mandatory at every call site (own-page binding exempt). `required` + `default` may coexist — the default only serves the trait's own demo page. */
1907
1961
  readonly required?: boolean;
1908
1962
  /** `@label` — human-readable control label. */
@@ -2012,6 +2066,8 @@ interface TraitTick {
2012
2066
  interval: string | number;
2013
2067
  appliesTo?: string[];
2014
2068
  pages?: string[];
2069
+ /** V4 dual-carry id sibling of `pages` — optional until the Phase-7 flip. */
2070
+ pageIds?: PageId[];
2015
2071
  /** Guard expression - string (legacy) or S-expression array */
2016
2072
  guard?: Expression;
2017
2073
  /** Effects to execute (S-expressions) */
@@ -2022,6 +2078,8 @@ interface TraitTick {
2022
2078
  * Used for validation and documentation.
2023
2079
  */
2024
2080
  emits?: string[];
2081
+ /** V4 dual-carry id sibling of `emits` — optional until the Phase-7 flip. */
2082
+ emitIds?: EventId[];
2025
2083
  }
2026
2084
  declare const TraitTickSchema: z.ZodObject<{
2027
2085
  name: z.ZodString;
@@ -2030,9 +2088,11 @@ declare const TraitTickSchema: z.ZodObject<{
2030
2088
  interval: z.ZodUnion<[z.ZodLiteral<"frame">, z.ZodNumber]>;
2031
2089
  appliesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2032
2090
  pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2091
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, PageId, string>, "many">>;
2033
2092
  guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
2034
2093
  effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">;
2035
2094
  emits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2095
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, EventId, string>, "many">>;
2036
2096
  }, "strip", z.ZodTypeAny, {
2037
2097
  name: string;
2038
2098
  effects: unknown[][];
@@ -2042,7 +2102,9 @@ declare const TraitTickSchema: z.ZodObject<{
2042
2102
  guard?: SExpr | undefined;
2043
2103
  priority?: number | undefined;
2044
2104
  appliesTo?: string[] | undefined;
2105
+ pageIds?: PageId[] | undefined;
2045
2106
  emits?: string[] | undefined;
2107
+ emitIds?: EventId[] | undefined;
2046
2108
  }, {
2047
2109
  name: string;
2048
2110
  effects: unknown[][];
@@ -2052,7 +2114,9 @@ declare const TraitTickSchema: z.ZodObject<{
2052
2114
  guard?: SExpr | undefined;
2053
2115
  priority?: number | undefined;
2054
2116
  appliesTo?: string[] | undefined;
2117
+ pageIds?: string[] | undefined;
2055
2118
  emits?: string[] | undefined;
2119
+ emitIds?: string[] | undefined;
2056
2120
  }>;
2057
2121
  /**
2058
2122
  * Event scope determines visibility:
@@ -2097,6 +2161,8 @@ declare const EventPayloadFieldSchema: z.ZodType<EventPayloadField>;
2097
2161
  interface TraitEventContract {
2098
2162
  /** Event name (UPPER_SNAKE_CASE) */
2099
2163
  event: string;
2164
+ /** V4 dual-carry id sibling of `event` — optional until the Phase-7 flip. */
2165
+ eventId?: EventId;
2100
2166
  /** Human-readable description */
2101
2167
  description?: string;
2102
2168
  /** User-vocabulary synonyms (comma-separated) — the per-event analogue of a
@@ -2153,6 +2219,7 @@ declare const TraitEventContractSchema: z.ZodObject<{
2153
2219
  * knob's effective literal before codegen/runtime consume it.
2154
2220
  */
2155
2221
  event: z.ZodString;
2222
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2156
2223
  description: z.ZodOptional<z.ZodString>;
2157
2224
  synonyms: z.ZodOptional<z.ZodString>;
2158
2225
  tier: z.ZodOptional<z.ZodString>;
@@ -2165,6 +2232,7 @@ declare const TraitEventContractSchema: z.ZodObject<{
2165
2232
  scope?: "internal" | "external" | undefined;
2166
2233
  tier?: string | undefined;
2167
2234
  payloadSchema?: EventPayloadField[] | undefined;
2235
+ eventId?: EventId | undefined;
2168
2236
  }, {
2169
2237
  event: string;
2170
2238
  description?: string | undefined;
@@ -2172,6 +2240,7 @@ declare const TraitEventContractSchema: z.ZodObject<{
2172
2240
  scope?: "internal" | "external" | undefined;
2173
2241
  tier?: string | undefined;
2174
2242
  payloadSchema?: EventPayloadField[] | undefined;
2243
+ eventId?: string | undefined;
2175
2244
  }>;
2176
2245
  /**
2177
2246
  * Event listener for trait communication.
@@ -2196,10 +2265,16 @@ type ListenSource = {
2196
2265
  } | {
2197
2266
  kind: 'trait';
2198
2267
  trait: string;
2268
+ /** V4 dual-carry id sibling of `trait` — optional until the Phase-7 flip. */
2269
+ traitId?: TraitId;
2199
2270
  } | {
2200
2271
  kind: 'orbital';
2201
2272
  orbital: string;
2202
2273
  trait: string;
2274
+ /** V4 dual-carry id sibling of `orbital` — optional until the Phase-7 flip. */
2275
+ orbitalId?: OrbitalId;
2276
+ /** V4 dual-carry id sibling of `trait` — optional until the Phase-7 flip. */
2277
+ traitId?: TraitId;
2203
2278
  };
2204
2279
  declare const ListenSourceSchema: z.ZodUnion<[z.ZodObject<{
2205
2280
  kind: z.ZodLiteral<"any">;
@@ -2210,30 +2285,43 @@ declare const ListenSourceSchema: z.ZodUnion<[z.ZodObject<{
2210
2285
  }>, z.ZodObject<{
2211
2286
  kind: z.ZodLiteral<"trait">;
2212
2287
  trait: z.ZodString;
2288
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2213
2289
  }, "strip", z.ZodTypeAny, {
2214
2290
  trait: string;
2215
2291
  kind: "trait";
2292
+ traitId?: TraitId | undefined;
2216
2293
  }, {
2217
2294
  trait: string;
2218
2295
  kind: "trait";
2296
+ traitId?: string | undefined;
2219
2297
  }>, z.ZodObject<{
2220
2298
  kind: z.ZodLiteral<"orbital">;
2221
2299
  orbital: z.ZodString;
2222
2300
  trait: z.ZodString;
2301
+ orbitalId: z.ZodOptional<z.ZodEffects<z.ZodString, OrbitalId, string>>;
2302
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2223
2303
  }, "strip", z.ZodTypeAny, {
2304
+ orbital: string;
2224
2305
  trait: string;
2225
2306
  kind: "orbital";
2226
- orbital: string;
2307
+ traitId?: TraitId | undefined;
2308
+ orbitalId?: OrbitalId | undefined;
2227
2309
  }, {
2310
+ orbital: string;
2228
2311
  trait: string;
2229
2312
  kind: "orbital";
2230
- orbital: string;
2313
+ traitId?: string | undefined;
2314
+ orbitalId?: string | undefined;
2231
2315
  }>]>;
2232
2316
  interface TraitEventListener {
2233
2317
  /** Event key to listen for (bare event name, no source prefix in the new shape) */
2234
2318
  event: string;
2319
+ /** V4 dual-carry id sibling of `event` — optional until the Phase-7 flip. */
2320
+ eventId?: EventId;
2235
2321
  /** State machine event to trigger */
2236
2322
  triggers: string;
2323
+ /** V4 dual-carry id sibling of `triggers` — optional until the Phase-7 flip. */
2324
+ triggersId?: EventId;
2237
2325
  /** Human-readable description (authored `@description` on the listen). */
2238
2326
  description?: string;
2239
2327
  /** User-vocabulary synonyms (comma-separated). */
@@ -2258,7 +2346,9 @@ interface TraitEventListener {
2258
2346
  }
2259
2347
  declare const TraitEventListenerSchema: z.ZodObject<{
2260
2348
  event: z.ZodString;
2349
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2261
2350
  triggers: z.ZodString;
2351
+ triggersId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2262
2352
  description: z.ZodOptional<z.ZodString>;
2263
2353
  synonyms: z.ZodOptional<z.ZodString>;
2264
2354
  tier: z.ZodOptional<z.ZodString>;
@@ -2274,24 +2364,33 @@ declare const TraitEventListenerSchema: z.ZodObject<{
2274
2364
  }>, z.ZodObject<{
2275
2365
  kind: z.ZodLiteral<"trait">;
2276
2366
  trait: z.ZodString;
2367
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2277
2368
  }, "strip", z.ZodTypeAny, {
2278
2369
  trait: string;
2279
2370
  kind: "trait";
2371
+ traitId?: TraitId | undefined;
2280
2372
  }, {
2281
2373
  trait: string;
2282
2374
  kind: "trait";
2375
+ traitId?: string | undefined;
2283
2376
  }>, z.ZodObject<{
2284
2377
  kind: z.ZodLiteral<"orbital">;
2285
2378
  orbital: z.ZodString;
2286
2379
  trait: z.ZodString;
2380
+ orbitalId: z.ZodOptional<z.ZodEffects<z.ZodString, OrbitalId, string>>;
2381
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2287
2382
  }, "strip", z.ZodTypeAny, {
2383
+ orbital: string;
2288
2384
  trait: string;
2289
2385
  kind: "orbital";
2290
- orbital: string;
2386
+ traitId?: TraitId | undefined;
2387
+ orbitalId?: OrbitalId | undefined;
2291
2388
  }, {
2389
+ orbital: string;
2292
2390
  trait: string;
2293
2391
  kind: "orbital";
2294
- orbital: string;
2392
+ traitId?: string | undefined;
2393
+ orbitalId?: string | undefined;
2295
2394
  }>]>>;
2296
2395
  }, "strip", z.ZodTypeAny, {
2297
2396
  event: string;
@@ -2303,14 +2402,19 @@ declare const TraitEventListenerSchema: z.ZodObject<{
2303
2402
  } | {
2304
2403
  trait: string;
2305
2404
  kind: "trait";
2405
+ traitId?: TraitId | undefined;
2306
2406
  } | {
2407
+ orbital: string;
2307
2408
  trait: string;
2308
2409
  kind: "orbital";
2309
- orbital: string;
2410
+ traitId?: TraitId | undefined;
2411
+ orbitalId?: OrbitalId | undefined;
2310
2412
  } | undefined;
2311
2413
  scope?: "internal" | "external" | undefined;
2312
2414
  tier?: string | undefined;
2415
+ eventId?: EventId | undefined;
2313
2416
  guard?: SExpr | undefined;
2417
+ triggersId?: EventId | undefined;
2314
2418
  payloadMapping?: Record<string, string> | undefined;
2315
2419
  }, {
2316
2420
  event: string;
@@ -2322,14 +2426,19 @@ declare const TraitEventListenerSchema: z.ZodObject<{
2322
2426
  } | {
2323
2427
  trait: string;
2324
2428
  kind: "trait";
2429
+ traitId?: string | undefined;
2325
2430
  } | {
2431
+ orbital: string;
2326
2432
  trait: string;
2327
2433
  kind: "orbital";
2328
- orbital: string;
2434
+ traitId?: string | undefined;
2435
+ orbitalId?: string | undefined;
2329
2436
  } | undefined;
2330
2437
  scope?: "internal" | "external" | undefined;
2331
2438
  tier?: string | undefined;
2439
+ eventId?: string | undefined;
2332
2440
  guard?: SExpr | undefined;
2441
+ triggersId?: string | undefined;
2333
2442
  payloadMapping?: Record<string, string> | undefined;
2334
2443
  }>;
2335
2444
  /**
@@ -2345,11 +2454,11 @@ declare const RequiredFieldSchema: z.ZodObject<{
2345
2454
  type: z.ZodEnum<["string", "number", "boolean", "date", "array", "object", "timestamp", "datetime", "enum"]>;
2346
2455
  description: z.ZodOptional<z.ZodString>;
2347
2456
  }, "strip", z.ZodTypeAny, {
2348
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
2457
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
2349
2458
  name: string;
2350
2459
  description?: string | undefined;
2351
2460
  }, {
2352
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
2461
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
2353
2462
  name: string;
2354
2463
  description?: string | undefined;
2355
2464
  }>;
@@ -2363,6 +2472,16 @@ declare const RequiredFieldSchema: z.ZodObject<{
2363
2472
  */
2364
2473
  interface TraitReference {
2365
2474
  ref: string;
2475
+ /** V4 dual-carry id sibling of `ref` — optional until the Phase-7 flip. */
2476
+ refId?: TraitId;
2477
+ /**
2478
+ * V4 LOCAL DECLARATION id — the identity of this trait AS DECLARED in its
2479
+ * orbital (`trait X = Alias.traits.Y` declares node X; `refId` carries
2480
+ * Y's id). Minted by the stamp so page trait refs and `@trait.X` embeds
2481
+ * resolve by id across `name:` renames (the composed-organism surface was
2482
+ * the one declaration class without an id).
2483
+ */
2484
+ id?: TraitId;
2366
2485
  /**
2367
2486
  * Phase 1.2: optional registry path disambiguator. Pairs with `ref` to
2368
2487
  * explicitly name which `uses` entry the alias was imported from
@@ -2372,10 +2491,14 @@ interface TraitReference {
2372
2491
  */
2373
2492
  from?: string;
2374
2493
  linkedEntity?: string;
2494
+ /** V4 dual-carry id sibling of `linkedEntity` — optional until the Phase-7 flip. */
2495
+ linkedEntityId?: EntityId;
2375
2496
  /** Phase F: rename the inlined trait at the call site */
2376
2497
  name?: string;
2377
2498
  /** Phase F: rename atom event keys at the call site, e.g. {OPEN: "ADD_ITEM"} */
2378
2499
  events?: Record<string, string>;
2500
+ /** V4 dual-carry id sibling of `events` (keys = baked event names resolved to ids) — optional until the Phase-7 flip. */
2501
+ eventIds?: Record<string, EventId>;
2379
2502
  /**
2380
2503
  * Entity-field remap: rewrite the inlined trait's canonical `@entity.X` /
2381
2504
  * `@payload.row.X` field references to the consumer entity's field names,
@@ -2439,10 +2562,14 @@ interface TraitReference {
2439
2562
  }
2440
2563
  declare const TraitReferenceSchema: z.ZodEffects<z.ZodObject<{
2441
2564
  ref: z.ZodString;
2565
+ refId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2566
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2442
2567
  from: z.ZodOptional<z.ZodString>;
2443
2568
  linkedEntity: z.ZodOptional<z.ZodString>;
2569
+ linkedEntityId: z.ZodOptional<z.ZodEffects<z.ZodString, EntityId, string>>;
2444
2570
  name: z.ZodOptional<z.ZodString>;
2445
2571
  events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2572
+ eventIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, EventId, string>>>;
2446
2573
  fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2447
2574
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodType<ConfigFieldDeclaration, z.ZodTypeDef, ConfigFieldDeclaration>, z.ZodType<TraitConfigValue, z.ZodTypeDef, TraitConfigValue>]>>>;
2448
2575
  appliesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -2451,50 +2578,66 @@ declare const TraitReferenceSchema: z.ZodEffects<z.ZodObject<{
2451
2578
  effects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown, "many">>>;
2452
2579
  }, "strip", z.ZodTypeAny, {
2453
2580
  ref: string;
2581
+ id?: TraitId | undefined;
2582
+ from?: string | undefined;
2454
2583
  name?: string | undefined;
2455
2584
  fields?: Record<string, string> | undefined;
2456
2585
  config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
2457
2586
  events?: Record<string, string> | undefined;
2458
- from?: string | undefined;
2459
2587
  effects?: Record<string, unknown[]> | undefined;
2588
+ refId?: TraitId | undefined;
2460
2589
  appliesTo?: string[] | undefined;
2461
2590
  linkedEntity?: string | undefined;
2591
+ linkedEntityId?: EntityId | undefined;
2592
+ eventIds?: Record<string, EventId> | undefined;
2462
2593
  listens?: unknown[] | undefined;
2463
2594
  emitsScope?: "internal" | "external" | undefined;
2464
2595
  }, {
2465
2596
  ref: string;
2597
+ id?: string | undefined;
2598
+ from?: string | undefined;
2466
2599
  name?: string | undefined;
2467
2600
  fields?: Record<string, string> | undefined;
2468
2601
  config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
2469
2602
  events?: Record<string, string> | undefined;
2470
- from?: string | undefined;
2471
2603
  effects?: Record<string, unknown[]> | undefined;
2604
+ refId?: string | undefined;
2472
2605
  appliesTo?: string[] | undefined;
2473
2606
  linkedEntity?: string | undefined;
2607
+ linkedEntityId?: string | undefined;
2608
+ eventIds?: Record<string, string> | undefined;
2474
2609
  listens?: unknown[] | undefined;
2475
2610
  emitsScope?: "internal" | "external" | undefined;
2476
2611
  }>, {
2477
2612
  ref: string;
2613
+ id?: TraitId | undefined;
2614
+ from?: string | undefined;
2478
2615
  name?: string | undefined;
2479
2616
  fields?: Record<string, string> | undefined;
2480
2617
  config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
2481
2618
  events?: Record<string, string> | undefined;
2482
- from?: string | undefined;
2483
2619
  effects?: Record<string, unknown[]> | undefined;
2620
+ refId?: TraitId | undefined;
2484
2621
  appliesTo?: string[] | undefined;
2485
2622
  linkedEntity?: string | undefined;
2623
+ linkedEntityId?: EntityId | undefined;
2624
+ eventIds?: Record<string, EventId> | undefined;
2486
2625
  listens?: unknown[] | undefined;
2487
2626
  emitsScope?: "internal" | "external" | undefined;
2488
2627
  }, {
2489
2628
  ref: string;
2629
+ id?: string | undefined;
2630
+ from?: string | undefined;
2490
2631
  name?: string | undefined;
2491
2632
  fields?: Record<string, string> | undefined;
2492
2633
  config?: Record<string, TraitConfigValue | ConfigFieldDeclaration> | undefined;
2493
2634
  events?: Record<string, string> | undefined;
2494
- from?: string | undefined;
2495
2635
  effects?: Record<string, unknown[]> | undefined;
2636
+ refId?: string | undefined;
2496
2637
  appliesTo?: string[] | undefined;
2497
2638
  linkedEntity?: string | undefined;
2639
+ linkedEntityId?: string | undefined;
2640
+ eventIds?: Record<string, string> | undefined;
2498
2641
  listens?: unknown[] | undefined;
2499
2642
  emitsScope?: "internal" | "external" | undefined;
2500
2643
  }>;
@@ -2575,6 +2718,8 @@ declare const EntityFieldContractSchema: z.ZodObject<{
2575
2718
  provides: string[];
2576
2719
  }>;
2577
2720
  interface Trait {
2721
+ /** V4 dual-carry id sibling of `name` — optional until the Phase-7 flip. */
2722
+ id?: TraitId;
2578
2723
  name: string;
2579
2724
  description?: string;
2580
2725
  description_visual_prompt?: string;
@@ -2623,6 +2768,23 @@ interface Trait {
2623
2768
  * Required for inline trait definitions within an orbital.
2624
2769
  */
2625
2770
  linkedEntity?: string;
2771
+ /** V4 dual-carry id sibling of `linkedEntity` — optional until the Phase-7 flip. */
2772
+ linkedEntityId?: EntityId;
2773
+ /**
2774
+ * V4 leverage-ids — id side-map for `@entity.<Name>` binding tokens + positional
2775
+ * entity args (`fetch`/`ref`/`persist`/`spawn`) in this trait's guards/effects/
2776
+ * ticks/listens. Maps the referenced entity NAME → its stable id, so readers
2777
+ * resolve these bare-string positions by id (else name) and an entity rename never
2778
+ * strands them — the coverage that lets the entity name-rewriter be deleted.
2779
+ */
2780
+ entityRefIds?: Record<string, EntityId>;
2781
+ /**
2782
+ * V4 leverage-ids — id side-map for `@trait.<Name>` embed tokens (render-ui embeds /
2783
+ * effect-tree sibling refs). Maps the embed token NAME → the embedded trait's stable
2784
+ * id, so readers splice embeds by id (else name) — the coverage that lets the
2785
+ * `@trait.` name-rewriter be deleted.
2786
+ */
2787
+ traitEmbedIds?: Record<string, TraitId>;
2626
2788
  requiredFields?: RequiredField[];
2627
2789
  dataEntities?: TraitDataEntity[];
2628
2790
  stateMachine?: StateMachine;
@@ -2680,6 +2842,7 @@ interface SourceBehaviorMetadata {
2680
2842
  originalName: string;
2681
2843
  }
2682
2844
  declare const TraitSchema: z.ZodObject<{
2845
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2683
2846
  name: z.ZodString;
2684
2847
  description: z.ZodOptional<z.ZodString>;
2685
2848
  description_visual_prompt: z.ZodOptional<z.ZodString>;
@@ -2700,16 +2863,19 @@ declare const TraitSchema: z.ZodObject<{
2700
2863
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2701
2864
  scope: z.ZodEnum<["instance", "collection"]>;
2702
2865
  linkedEntity: z.ZodOptional<z.ZodString>;
2866
+ linkedEntityId: z.ZodOptional<z.ZodEffects<z.ZodString, EntityId, string>>;
2867
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, EntityId, string>>>;
2868
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, TraitId, string>>>;
2703
2869
  requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2704
2870
  name: z.ZodString;
2705
2871
  type: z.ZodEnum<["string", "number", "boolean", "date", "array", "object", "timestamp", "datetime", "enum"]>;
2706
2872
  description: z.ZodOptional<z.ZodString>;
2707
2873
  }, "strip", z.ZodTypeAny, {
2708
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
2874
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
2709
2875
  name: string;
2710
2876
  description?: string | undefined;
2711
2877
  }, {
2712
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
2878
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
2713
2879
  name: string;
2714
2880
  description?: string | undefined;
2715
2881
  }>, "many">>;
@@ -2769,6 +2935,7 @@ declare const TraitSchema: z.ZodObject<{
2769
2935
  }>, "many">;
2770
2936
  events: z.ZodArray<z.ZodObject<{
2771
2937
  key: z.ZodString;
2938
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2772
2939
  name: z.ZodString;
2773
2940
  description: z.ZodOptional<z.ZodString>;
2774
2941
  synonyms: z.ZodOptional<z.ZodString>;
@@ -2779,6 +2946,7 @@ declare const TraitSchema: z.ZodObject<{
2779
2946
  }, "strip", z.ZodTypeAny, {
2780
2947
  name: string;
2781
2948
  key: string;
2949
+ id?: EventId | undefined;
2782
2950
  description?: string | undefined;
2783
2951
  synonyms?: string | undefined;
2784
2952
  tier?: string | undefined;
@@ -2788,6 +2956,7 @@ declare const TraitSchema: z.ZodObject<{
2788
2956
  }, {
2789
2957
  name: string;
2790
2958
  key: string;
2959
+ id?: string | undefined;
2791
2960
  description?: string | undefined;
2792
2961
  synonyms?: string | undefined;
2793
2962
  tier?: string | undefined;
@@ -2799,6 +2968,7 @@ declare const TraitSchema: z.ZodObject<{
2799
2968
  from: z.ZodString;
2800
2969
  to: z.ZodString;
2801
2970
  event: z.ZodString;
2971
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2802
2972
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
2803
2973
  effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
2804
2974
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -2807,6 +2977,7 @@ declare const TraitSchema: z.ZodObject<{
2807
2977
  from: string;
2808
2978
  to: string;
2809
2979
  description?: string | null | undefined;
2980
+ eventId?: EventId | undefined;
2810
2981
  guard?: SExpr | undefined;
2811
2982
  effects?: unknown[][] | undefined;
2812
2983
  }, {
@@ -2814,6 +2985,7 @@ declare const TraitSchema: z.ZodObject<{
2814
2985
  from: string;
2815
2986
  to: string;
2816
2987
  description?: string | null | undefined;
2988
+ eventId?: string | undefined;
2817
2989
  guard?: SExpr | undefined;
2818
2990
  effects?: unknown[][] | undefined;
2819
2991
  }>, "many">;
@@ -2834,6 +3006,7 @@ declare const TraitSchema: z.ZodObject<{
2834
3006
  events: {
2835
3007
  name: string;
2836
3008
  key: string;
3009
+ id?: EventId | undefined;
2837
3010
  description?: string | undefined;
2838
3011
  synonyms?: string | undefined;
2839
3012
  tier?: string | undefined;
@@ -2855,6 +3028,7 @@ declare const TraitSchema: z.ZodObject<{
2855
3028
  from: string;
2856
3029
  to: string;
2857
3030
  description?: string | null | undefined;
3031
+ eventId?: EventId | undefined;
2858
3032
  guard?: SExpr | undefined;
2859
3033
  effects?: unknown[][] | undefined;
2860
3034
  }[];
@@ -2867,6 +3041,7 @@ declare const TraitSchema: z.ZodObject<{
2867
3041
  events: {
2868
3042
  name: string;
2869
3043
  key: string;
3044
+ id?: string | undefined;
2870
3045
  description?: string | undefined;
2871
3046
  synonyms?: string | undefined;
2872
3047
  tier?: string | undefined;
@@ -2888,6 +3063,7 @@ declare const TraitSchema: z.ZodObject<{
2888
3063
  from: string;
2889
3064
  to: string;
2890
3065
  description?: string | null | undefined;
3066
+ eventId?: string | undefined;
2891
3067
  guard?: SExpr | undefined;
2892
3068
  effects?: unknown[][] | undefined;
2893
3069
  }[];
@@ -2905,9 +3081,11 @@ declare const TraitSchema: z.ZodObject<{
2905
3081
  interval: z.ZodUnion<[z.ZodLiteral<"frame">, z.ZodNumber]>;
2906
3082
  appliesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2907
3083
  pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3084
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, PageId, string>, "many">>;
2908
3085
  guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
2909
3086
  effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">;
2910
3087
  emits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3088
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, EventId, string>, "many">>;
2911
3089
  }, "strip", z.ZodTypeAny, {
2912
3090
  name: string;
2913
3091
  effects: unknown[][];
@@ -2917,7 +3095,9 @@ declare const TraitSchema: z.ZodObject<{
2917
3095
  guard?: SExpr | undefined;
2918
3096
  priority?: number | undefined;
2919
3097
  appliesTo?: string[] | undefined;
3098
+ pageIds?: PageId[] | undefined;
2920
3099
  emits?: string[] | undefined;
3100
+ emitIds?: EventId[] | undefined;
2921
3101
  }, {
2922
3102
  name: string;
2923
3103
  effects: unknown[][];
@@ -2927,7 +3107,9 @@ declare const TraitSchema: z.ZodObject<{
2927
3107
  guard?: SExpr | undefined;
2928
3108
  priority?: number | undefined;
2929
3109
  appliesTo?: string[] | undefined;
3110
+ pageIds?: string[] | undefined;
2930
3111
  emits?: string[] | undefined;
3112
+ emitIds?: string[] | undefined;
2931
3113
  }>, "many">>;
2932
3114
  emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
2933
3115
  /**
@@ -2940,6 +3122,7 @@ declare const TraitSchema: z.ZodObject<{
2940
3122
  * knob's effective literal before codegen/runtime consume it.
2941
3123
  */
2942
3124
  event: z.ZodString;
3125
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2943
3126
  description: z.ZodOptional<z.ZodString>;
2944
3127
  synonyms: z.ZodOptional<z.ZodString>;
2945
3128
  tier: z.ZodOptional<z.ZodString>;
@@ -2952,6 +3135,7 @@ declare const TraitSchema: z.ZodObject<{
2952
3135
  scope?: "internal" | "external" | undefined;
2953
3136
  tier?: string | undefined;
2954
3137
  payloadSchema?: EventPayloadField[] | undefined;
3138
+ eventId?: EventId | undefined;
2955
3139
  }, {
2956
3140
  event: string;
2957
3141
  description?: string | undefined;
@@ -2959,10 +3143,13 @@ declare const TraitSchema: z.ZodObject<{
2959
3143
  scope?: "internal" | "external" | undefined;
2960
3144
  tier?: string | undefined;
2961
3145
  payloadSchema?: EventPayloadField[] | undefined;
3146
+ eventId?: string | undefined;
2962
3147
  }>, "many">>;
2963
3148
  listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
2964
3149
  event: z.ZodString;
3150
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2965
3151
  triggers: z.ZodString;
3152
+ triggersId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
2966
3153
  description: z.ZodOptional<z.ZodString>;
2967
3154
  synonyms: z.ZodOptional<z.ZodString>;
2968
3155
  tier: z.ZodOptional<z.ZodString>;
@@ -2978,24 +3165,33 @@ declare const TraitSchema: z.ZodObject<{
2978
3165
  }>, z.ZodObject<{
2979
3166
  kind: z.ZodLiteral<"trait">;
2980
3167
  trait: z.ZodString;
3168
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2981
3169
  }, "strip", z.ZodTypeAny, {
2982
3170
  trait: string;
2983
3171
  kind: "trait";
3172
+ traitId?: TraitId | undefined;
2984
3173
  }, {
2985
3174
  trait: string;
2986
3175
  kind: "trait";
3176
+ traitId?: string | undefined;
2987
3177
  }>, z.ZodObject<{
2988
3178
  kind: z.ZodLiteral<"orbital">;
2989
3179
  orbital: z.ZodString;
2990
3180
  trait: z.ZodString;
3181
+ orbitalId: z.ZodOptional<z.ZodEffects<z.ZodString, OrbitalId, string>>;
3182
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
2991
3183
  }, "strip", z.ZodTypeAny, {
3184
+ orbital: string;
2992
3185
  trait: string;
2993
3186
  kind: "orbital";
2994
- orbital: string;
3187
+ traitId?: TraitId | undefined;
3188
+ orbitalId?: OrbitalId | undefined;
2995
3189
  }, {
3190
+ orbital: string;
2996
3191
  trait: string;
2997
3192
  kind: "orbital";
2998
- orbital: string;
3193
+ traitId?: string | undefined;
3194
+ orbitalId?: string | undefined;
2999
3195
  }>]>>;
3000
3196
  }, "strip", z.ZodTypeAny, {
3001
3197
  event: string;
@@ -3007,14 +3203,19 @@ declare const TraitSchema: z.ZodObject<{
3007
3203
  } | {
3008
3204
  trait: string;
3009
3205
  kind: "trait";
3206
+ traitId?: TraitId | undefined;
3010
3207
  } | {
3208
+ orbital: string;
3011
3209
  trait: string;
3012
3210
  kind: "orbital";
3013
- orbital: string;
3211
+ traitId?: TraitId | undefined;
3212
+ orbitalId?: OrbitalId | undefined;
3014
3213
  } | undefined;
3015
3214
  scope?: "internal" | "external" | undefined;
3016
3215
  tier?: string | undefined;
3216
+ eventId?: EventId | undefined;
3017
3217
  guard?: SExpr | undefined;
3218
+ triggersId?: EventId | undefined;
3018
3219
  payloadMapping?: Record<string, string> | undefined;
3019
3220
  }, {
3020
3221
  event: string;
@@ -3026,14 +3227,19 @@ declare const TraitSchema: z.ZodObject<{
3026
3227
  } | {
3027
3228
  trait: string;
3028
3229
  kind: "trait";
3230
+ traitId?: string | undefined;
3029
3231
  } | {
3232
+ orbital: string;
3030
3233
  trait: string;
3031
3234
  kind: "orbital";
3032
- orbital: string;
3235
+ traitId?: string | undefined;
3236
+ orbitalId?: string | undefined;
3033
3237
  } | undefined;
3034
3238
  scope?: "internal" | "external" | undefined;
3035
3239
  tier?: string | undefined;
3240
+ eventId?: string | undefined;
3036
3241
  guard?: SExpr | undefined;
3242
+ triggersId?: string | undefined;
3037
3243
  payloadMapping?: Record<string, string> | undefined;
3038
3244
  }>, "many">>;
3039
3245
  ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -3131,6 +3337,7 @@ declare const TraitSchema: z.ZodObject<{
3131
3337
  }, "strip", z.ZodTypeAny, {
3132
3338
  name: string;
3133
3339
  scope: "collection" | "instance";
3340
+ id?: TraitId | undefined;
3134
3341
  description?: string | undefined;
3135
3342
  ui?: Record<string, unknown> | undefined;
3136
3343
  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;
@@ -3150,6 +3357,7 @@ declare const TraitSchema: z.ZodObject<{
3150
3357
  events: {
3151
3358
  name: string;
3152
3359
  key: string;
3360
+ id?: EventId | undefined;
3153
3361
  description?: string | undefined;
3154
3362
  synonyms?: string | undefined;
3155
3363
  tier?: string | undefined;
@@ -3171,6 +3379,7 @@ declare const TraitSchema: z.ZodObject<{
3171
3379
  from: string;
3172
3380
  to: string;
3173
3381
  description?: string | null | undefined;
3382
+ eventId?: EventId | undefined;
3174
3383
  guard?: SExpr | undefined;
3175
3384
  effects?: unknown[][] | undefined;
3176
3385
  }[];
@@ -3187,8 +3396,10 @@ declare const TraitSchema: z.ZodObject<{
3187
3396
  scope?: "internal" | "external" | undefined;
3188
3397
  tier?: string | undefined;
3189
3398
  payloadSchema?: EventPayloadField[] | undefined;
3399
+ eventId?: EventId | undefined;
3190
3400
  }[] | undefined;
3191
3401
  linkedEntity?: string | undefined;
3402
+ linkedEntityId?: EntityId | undefined;
3192
3403
  listens?: {
3193
3404
  event: string;
3194
3405
  triggers: string;
@@ -3199,14 +3410,19 @@ declare const TraitSchema: z.ZodObject<{
3199
3410
  } | {
3200
3411
  trait: string;
3201
3412
  kind: "trait";
3413
+ traitId?: TraitId | undefined;
3202
3414
  } | {
3415
+ orbital: string;
3203
3416
  trait: string;
3204
3417
  kind: "orbital";
3205
- orbital: string;
3418
+ traitId?: TraitId | undefined;
3419
+ orbitalId?: OrbitalId | undefined;
3206
3420
  } | undefined;
3207
3421
  scope?: "internal" | "external" | undefined;
3208
3422
  tier?: string | undefined;
3423
+ eventId?: EventId | undefined;
3209
3424
  guard?: SExpr | undefined;
3425
+ triggersId?: EventId | undefined;
3210
3426
  payloadMapping?: Record<string, string> | undefined;
3211
3427
  }[] | undefined;
3212
3428
  description_visual_prompt?: string | undefined;
@@ -3217,8 +3433,10 @@ declare const TraitSchema: z.ZodObject<{
3217
3433
  } | undefined;
3218
3434
  entityBindingDescription?: string | undefined;
3219
3435
  entityBindingSynonyms?: string | undefined;
3436
+ entityRefIds?: Record<string, EntityId> | undefined;
3437
+ traitEmbedIds?: Record<string, TraitId> | undefined;
3220
3438
  requiredFields?: {
3221
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
3439
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
3222
3440
  name: string;
3223
3441
  description?: string | undefined;
3224
3442
  }[] | undefined;
@@ -3232,7 +3450,9 @@ declare const TraitSchema: z.ZodObject<{
3232
3450
  guard?: SExpr | undefined;
3233
3451
  priority?: number | undefined;
3234
3452
  appliesTo?: string[] | undefined;
3453
+ pageIds?: PageId[] | undefined;
3235
3454
  emits?: string[] | undefined;
3455
+ emitIds?: EventId[] | undefined;
3236
3456
  }[] | undefined;
3237
3457
  sourceBehavior?: {
3238
3458
  behavior: string;
@@ -3263,6 +3483,7 @@ declare const TraitSchema: z.ZodObject<{
3263
3483
  }, {
3264
3484
  name: string;
3265
3485
  scope: "collection" | "instance";
3486
+ id?: string | undefined;
3266
3487
  description?: string | undefined;
3267
3488
  ui?: Record<string, unknown> | undefined;
3268
3489
  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;
@@ -3282,6 +3503,7 @@ declare const TraitSchema: z.ZodObject<{
3282
3503
  events: {
3283
3504
  name: string;
3284
3505
  key: string;
3506
+ id?: string | undefined;
3285
3507
  description?: string | undefined;
3286
3508
  synonyms?: string | undefined;
3287
3509
  tier?: string | undefined;
@@ -3303,6 +3525,7 @@ declare const TraitSchema: z.ZodObject<{
3303
3525
  from: string;
3304
3526
  to: string;
3305
3527
  description?: string | null | undefined;
3528
+ eventId?: string | undefined;
3306
3529
  guard?: SExpr | undefined;
3307
3530
  effects?: unknown[][] | undefined;
3308
3531
  }[];
@@ -3319,8 +3542,10 @@ declare const TraitSchema: z.ZodObject<{
3319
3542
  scope?: "internal" | "external" | undefined;
3320
3543
  tier?: string | undefined;
3321
3544
  payloadSchema?: EventPayloadField[] | undefined;
3545
+ eventId?: string | undefined;
3322
3546
  }[] | undefined;
3323
3547
  linkedEntity?: string | undefined;
3548
+ linkedEntityId?: string | undefined;
3324
3549
  listens?: {
3325
3550
  event: string;
3326
3551
  triggers: string;
@@ -3331,14 +3556,19 @@ declare const TraitSchema: z.ZodObject<{
3331
3556
  } | {
3332
3557
  trait: string;
3333
3558
  kind: "trait";
3559
+ traitId?: string | undefined;
3334
3560
  } | {
3561
+ orbital: string;
3335
3562
  trait: string;
3336
3563
  kind: "orbital";
3337
- orbital: string;
3564
+ traitId?: string | undefined;
3565
+ orbitalId?: string | undefined;
3338
3566
  } | undefined;
3339
3567
  scope?: "internal" | "external" | undefined;
3340
3568
  tier?: string | undefined;
3569
+ eventId?: string | undefined;
3341
3570
  guard?: SExpr | undefined;
3571
+ triggersId?: string | undefined;
3342
3572
  payloadMapping?: Record<string, string> | undefined;
3343
3573
  }[] | undefined;
3344
3574
  description_visual_prompt?: string | undefined;
@@ -3349,8 +3579,10 @@ declare const TraitSchema: z.ZodObject<{
3349
3579
  } | undefined;
3350
3580
  entityBindingDescription?: string | undefined;
3351
3581
  entityBindingSynonyms?: string | undefined;
3582
+ entityRefIds?: Record<string, string> | undefined;
3583
+ traitEmbedIds?: Record<string, string> | undefined;
3352
3584
  requiredFields?: {
3353
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
3585
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
3354
3586
  name: string;
3355
3587
  description?: string | undefined;
3356
3588
  }[] | undefined;
@@ -3364,7 +3596,9 @@ declare const TraitSchema: z.ZodObject<{
3364
3596
  guard?: SExpr | undefined;
3365
3597
  priority?: number | undefined;
3366
3598
  appliesTo?: string[] | undefined;
3599
+ pageIds?: string[] | undefined;
3367
3600
  emits?: string[] | undefined;
3601
+ emitIds?: string[] | undefined;
3368
3602
  }[] | undefined;
3369
3603
  sourceBehavior?: {
3370
3604
  behavior: string;
@@ -3412,6 +3646,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3412
3646
  events?: Record<string, string> | undefined;
3413
3647
  linkedEntity?: string | undefined;
3414
3648
  }>, z.ZodObject<{
3649
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
3415
3650
  name: z.ZodString;
3416
3651
  description: z.ZodOptional<z.ZodString>;
3417
3652
  description_visual_prompt: z.ZodOptional<z.ZodString>;
@@ -3432,16 +3667,19 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3432
3667
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3433
3668
  scope: z.ZodEnum<["instance", "collection"]>;
3434
3669
  linkedEntity: z.ZodOptional<z.ZodString>;
3670
+ linkedEntityId: z.ZodOptional<z.ZodEffects<z.ZodString, EntityId, string>>;
3671
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, EntityId, string>>>;
3672
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, TraitId, string>>>;
3435
3673
  requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
3436
3674
  name: z.ZodString;
3437
3675
  type: z.ZodEnum<["string", "number", "boolean", "date", "array", "object", "timestamp", "datetime", "enum"]>;
3438
3676
  description: z.ZodOptional<z.ZodString>;
3439
3677
  }, "strip", z.ZodTypeAny, {
3440
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
3678
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
3441
3679
  name: string;
3442
3680
  description?: string | undefined;
3443
3681
  }, {
3444
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
3682
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
3445
3683
  name: string;
3446
3684
  description?: string | undefined;
3447
3685
  }>, "many">>;
@@ -3501,6 +3739,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3501
3739
  }>, "many">;
3502
3740
  events: z.ZodArray<z.ZodObject<{
3503
3741
  key: z.ZodString;
3742
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
3504
3743
  name: z.ZodString;
3505
3744
  description: z.ZodOptional<z.ZodString>;
3506
3745
  synonyms: z.ZodOptional<z.ZodString>;
@@ -3511,6 +3750,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3511
3750
  }, "strip", z.ZodTypeAny, {
3512
3751
  name: string;
3513
3752
  key: string;
3753
+ id?: EventId | undefined;
3514
3754
  description?: string | undefined;
3515
3755
  synonyms?: string | undefined;
3516
3756
  tier?: string | undefined;
@@ -3520,6 +3760,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3520
3760
  }, {
3521
3761
  name: string;
3522
3762
  key: string;
3763
+ id?: string | undefined;
3523
3764
  description?: string | undefined;
3524
3765
  synonyms?: string | undefined;
3525
3766
  tier?: string | undefined;
@@ -3531,6 +3772,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3531
3772
  from: z.ZodString;
3532
3773
  to: z.ZodString;
3533
3774
  event: z.ZodString;
3775
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
3534
3776
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
3535
3777
  effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
3536
3778
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -3539,6 +3781,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3539
3781
  from: string;
3540
3782
  to: string;
3541
3783
  description?: string | null | undefined;
3784
+ eventId?: EventId | undefined;
3542
3785
  guard?: SExpr | undefined;
3543
3786
  effects?: unknown[][] | undefined;
3544
3787
  }, {
@@ -3546,6 +3789,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3546
3789
  from: string;
3547
3790
  to: string;
3548
3791
  description?: string | null | undefined;
3792
+ eventId?: string | undefined;
3549
3793
  guard?: SExpr | undefined;
3550
3794
  effects?: unknown[][] | undefined;
3551
3795
  }>, "many">;
@@ -3566,6 +3810,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3566
3810
  events: {
3567
3811
  name: string;
3568
3812
  key: string;
3813
+ id?: EventId | undefined;
3569
3814
  description?: string | undefined;
3570
3815
  synonyms?: string | undefined;
3571
3816
  tier?: string | undefined;
@@ -3587,6 +3832,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3587
3832
  from: string;
3588
3833
  to: string;
3589
3834
  description?: string | null | undefined;
3835
+ eventId?: EventId | undefined;
3590
3836
  guard?: SExpr | undefined;
3591
3837
  effects?: unknown[][] | undefined;
3592
3838
  }[];
@@ -3599,6 +3845,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3599
3845
  events: {
3600
3846
  name: string;
3601
3847
  key: string;
3848
+ id?: string | undefined;
3602
3849
  description?: string | undefined;
3603
3850
  synonyms?: string | undefined;
3604
3851
  tier?: string | undefined;
@@ -3620,6 +3867,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3620
3867
  from: string;
3621
3868
  to: string;
3622
3869
  description?: string | null | undefined;
3870
+ eventId?: string | undefined;
3623
3871
  guard?: SExpr | undefined;
3624
3872
  effects?: unknown[][] | undefined;
3625
3873
  }[];
@@ -3637,9 +3885,11 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3637
3885
  interval: z.ZodUnion<[z.ZodLiteral<"frame">, z.ZodNumber]>;
3638
3886
  appliesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3639
3887
  pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3888
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, PageId, string>, "many">>;
3640
3889
  guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
3641
3890
  effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">;
3642
3891
  emits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3892
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, EventId, string>, "many">>;
3643
3893
  }, "strip", z.ZodTypeAny, {
3644
3894
  name: string;
3645
3895
  effects: unknown[][];
@@ -3649,7 +3899,9 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3649
3899
  guard?: SExpr | undefined;
3650
3900
  priority?: number | undefined;
3651
3901
  appliesTo?: string[] | undefined;
3902
+ pageIds?: PageId[] | undefined;
3652
3903
  emits?: string[] | undefined;
3904
+ emitIds?: EventId[] | undefined;
3653
3905
  }, {
3654
3906
  name: string;
3655
3907
  effects: unknown[][];
@@ -3659,7 +3911,9 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3659
3911
  guard?: SExpr | undefined;
3660
3912
  priority?: number | undefined;
3661
3913
  appliesTo?: string[] | undefined;
3914
+ pageIds?: string[] | undefined;
3662
3915
  emits?: string[] | undefined;
3916
+ emitIds?: string[] | undefined;
3663
3917
  }>, "many">>;
3664
3918
  emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
3665
3919
  /**
@@ -3672,6 +3926,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3672
3926
  * knob's effective literal before codegen/runtime consume it.
3673
3927
  */
3674
3928
  event: z.ZodString;
3929
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
3675
3930
  description: z.ZodOptional<z.ZodString>;
3676
3931
  synonyms: z.ZodOptional<z.ZodString>;
3677
3932
  tier: z.ZodOptional<z.ZodString>;
@@ -3684,6 +3939,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3684
3939
  scope?: "internal" | "external" | undefined;
3685
3940
  tier?: string | undefined;
3686
3941
  payloadSchema?: EventPayloadField[] | undefined;
3942
+ eventId?: EventId | undefined;
3687
3943
  }, {
3688
3944
  event: string;
3689
3945
  description?: string | undefined;
@@ -3691,10 +3947,13 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3691
3947
  scope?: "internal" | "external" | undefined;
3692
3948
  tier?: string | undefined;
3693
3949
  payloadSchema?: EventPayloadField[] | undefined;
3950
+ eventId?: string | undefined;
3694
3951
  }>, "many">>;
3695
3952
  listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
3696
3953
  event: z.ZodString;
3954
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
3697
3955
  triggers: z.ZodString;
3956
+ triggersId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
3698
3957
  description: z.ZodOptional<z.ZodString>;
3699
3958
  synonyms: z.ZodOptional<z.ZodString>;
3700
3959
  tier: z.ZodOptional<z.ZodString>;
@@ -3710,24 +3969,33 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3710
3969
  }>, z.ZodObject<{
3711
3970
  kind: z.ZodLiteral<"trait">;
3712
3971
  trait: z.ZodString;
3972
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
3713
3973
  }, "strip", z.ZodTypeAny, {
3714
3974
  trait: string;
3715
3975
  kind: "trait";
3976
+ traitId?: TraitId | undefined;
3716
3977
  }, {
3717
3978
  trait: string;
3718
3979
  kind: "trait";
3980
+ traitId?: string | undefined;
3719
3981
  }>, z.ZodObject<{
3720
3982
  kind: z.ZodLiteral<"orbital">;
3721
3983
  orbital: z.ZodString;
3722
3984
  trait: z.ZodString;
3985
+ orbitalId: z.ZodOptional<z.ZodEffects<z.ZodString, OrbitalId, string>>;
3986
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
3723
3987
  }, "strip", z.ZodTypeAny, {
3988
+ orbital: string;
3724
3989
  trait: string;
3725
3990
  kind: "orbital";
3726
- orbital: string;
3991
+ traitId?: TraitId | undefined;
3992
+ orbitalId?: OrbitalId | undefined;
3727
3993
  }, {
3994
+ orbital: string;
3728
3995
  trait: string;
3729
3996
  kind: "orbital";
3730
- orbital: string;
3997
+ traitId?: string | undefined;
3998
+ orbitalId?: string | undefined;
3731
3999
  }>]>>;
3732
4000
  }, "strip", z.ZodTypeAny, {
3733
4001
  event: string;
@@ -3739,14 +4007,19 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3739
4007
  } | {
3740
4008
  trait: string;
3741
4009
  kind: "trait";
4010
+ traitId?: TraitId | undefined;
3742
4011
  } | {
4012
+ orbital: string;
3743
4013
  trait: string;
3744
4014
  kind: "orbital";
3745
- orbital: string;
4015
+ traitId?: TraitId | undefined;
4016
+ orbitalId?: OrbitalId | undefined;
3746
4017
  } | undefined;
3747
4018
  scope?: "internal" | "external" | undefined;
3748
4019
  tier?: string | undefined;
4020
+ eventId?: EventId | undefined;
3749
4021
  guard?: SExpr | undefined;
4022
+ triggersId?: EventId | undefined;
3750
4023
  payloadMapping?: Record<string, string> | undefined;
3751
4024
  }, {
3752
4025
  event: string;
@@ -3758,14 +4031,19 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3758
4031
  } | {
3759
4032
  trait: string;
3760
4033
  kind: "trait";
4034
+ traitId?: string | undefined;
3761
4035
  } | {
4036
+ orbital: string;
3762
4037
  trait: string;
3763
4038
  kind: "orbital";
3764
- orbital: string;
4039
+ traitId?: string | undefined;
4040
+ orbitalId?: string | undefined;
3765
4041
  } | undefined;
3766
4042
  scope?: "internal" | "external" | undefined;
3767
4043
  tier?: string | undefined;
4044
+ eventId?: string | undefined;
3768
4045
  guard?: SExpr | undefined;
4046
+ triggersId?: string | undefined;
3769
4047
  payloadMapping?: Record<string, string> | undefined;
3770
4048
  }>, "many">>;
3771
4049
  ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -3863,6 +4141,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3863
4141
  }, "strip", z.ZodTypeAny, {
3864
4142
  name: string;
3865
4143
  scope: "collection" | "instance";
4144
+ id?: TraitId | undefined;
3866
4145
  description?: string | undefined;
3867
4146
  ui?: Record<string, unknown> | undefined;
3868
4147
  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;
@@ -3882,6 +4161,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3882
4161
  events: {
3883
4162
  name: string;
3884
4163
  key: string;
4164
+ id?: EventId | undefined;
3885
4165
  description?: string | undefined;
3886
4166
  synonyms?: string | undefined;
3887
4167
  tier?: string | undefined;
@@ -3903,6 +4183,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3903
4183
  from: string;
3904
4184
  to: string;
3905
4185
  description?: string | null | undefined;
4186
+ eventId?: EventId | undefined;
3906
4187
  guard?: SExpr | undefined;
3907
4188
  effects?: unknown[][] | undefined;
3908
4189
  }[];
@@ -3919,8 +4200,10 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3919
4200
  scope?: "internal" | "external" | undefined;
3920
4201
  tier?: string | undefined;
3921
4202
  payloadSchema?: EventPayloadField[] | undefined;
4203
+ eventId?: EventId | undefined;
3922
4204
  }[] | undefined;
3923
4205
  linkedEntity?: string | undefined;
4206
+ linkedEntityId?: EntityId | undefined;
3924
4207
  listens?: {
3925
4208
  event: string;
3926
4209
  triggers: string;
@@ -3931,14 +4214,19 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3931
4214
  } | {
3932
4215
  trait: string;
3933
4216
  kind: "trait";
4217
+ traitId?: TraitId | undefined;
3934
4218
  } | {
4219
+ orbital: string;
3935
4220
  trait: string;
3936
4221
  kind: "orbital";
3937
- orbital: string;
4222
+ traitId?: TraitId | undefined;
4223
+ orbitalId?: OrbitalId | undefined;
3938
4224
  } | undefined;
3939
4225
  scope?: "internal" | "external" | undefined;
3940
4226
  tier?: string | undefined;
4227
+ eventId?: EventId | undefined;
3941
4228
  guard?: SExpr | undefined;
4229
+ triggersId?: EventId | undefined;
3942
4230
  payloadMapping?: Record<string, string> | undefined;
3943
4231
  }[] | undefined;
3944
4232
  description_visual_prompt?: string | undefined;
@@ -3949,8 +4237,10 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3949
4237
  } | undefined;
3950
4238
  entityBindingDescription?: string | undefined;
3951
4239
  entityBindingSynonyms?: string | undefined;
4240
+ entityRefIds?: Record<string, EntityId> | undefined;
4241
+ traitEmbedIds?: Record<string, TraitId> | undefined;
3952
4242
  requiredFields?: {
3953
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
4243
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
3954
4244
  name: string;
3955
4245
  description?: string | undefined;
3956
4246
  }[] | undefined;
@@ -3964,7 +4254,9 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3964
4254
  guard?: SExpr | undefined;
3965
4255
  priority?: number | undefined;
3966
4256
  appliesTo?: string[] | undefined;
4257
+ pageIds?: PageId[] | undefined;
3967
4258
  emits?: string[] | undefined;
4259
+ emitIds?: EventId[] | undefined;
3968
4260
  }[] | undefined;
3969
4261
  sourceBehavior?: {
3970
4262
  behavior: string;
@@ -3995,6 +4287,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
3995
4287
  }, {
3996
4288
  name: string;
3997
4289
  scope: "collection" | "instance";
4290
+ id?: string | undefined;
3998
4291
  description?: string | undefined;
3999
4292
  ui?: Record<string, unknown> | undefined;
4000
4293
  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;
@@ -4014,6 +4307,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4014
4307
  events: {
4015
4308
  name: string;
4016
4309
  key: string;
4310
+ id?: string | undefined;
4017
4311
  description?: string | undefined;
4018
4312
  synonyms?: string | undefined;
4019
4313
  tier?: string | undefined;
@@ -4035,6 +4329,7 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4035
4329
  from: string;
4036
4330
  to: string;
4037
4331
  description?: string | null | undefined;
4332
+ eventId?: string | undefined;
4038
4333
  guard?: SExpr | undefined;
4039
4334
  effects?: unknown[][] | undefined;
4040
4335
  }[];
@@ -4051,8 +4346,10 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4051
4346
  scope?: "internal" | "external" | undefined;
4052
4347
  tier?: string | undefined;
4053
4348
  payloadSchema?: EventPayloadField[] | undefined;
4349
+ eventId?: string | undefined;
4054
4350
  }[] | undefined;
4055
4351
  linkedEntity?: string | undefined;
4352
+ linkedEntityId?: string | undefined;
4056
4353
  listens?: {
4057
4354
  event: string;
4058
4355
  triggers: string;
@@ -4063,14 +4360,19 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4063
4360
  } | {
4064
4361
  trait: string;
4065
4362
  kind: "trait";
4363
+ traitId?: string | undefined;
4066
4364
  } | {
4365
+ orbital: string;
4067
4366
  trait: string;
4068
4367
  kind: "orbital";
4069
- orbital: string;
4368
+ traitId?: string | undefined;
4369
+ orbitalId?: string | undefined;
4070
4370
  } | undefined;
4071
4371
  scope?: "internal" | "external" | undefined;
4072
4372
  tier?: string | undefined;
4373
+ eventId?: string | undefined;
4073
4374
  guard?: SExpr | undefined;
4375
+ triggersId?: string | undefined;
4074
4376
  payloadMapping?: Record<string, string> | undefined;
4075
4377
  }[] | undefined;
4076
4378
  description_visual_prompt?: string | undefined;
@@ -4081,8 +4383,10 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4081
4383
  } | undefined;
4082
4384
  entityBindingDescription?: string | undefined;
4083
4385
  entityBindingSynonyms?: string | undefined;
4386
+ entityRefIds?: Record<string, string> | undefined;
4387
+ traitEmbedIds?: Record<string, string> | undefined;
4084
4388
  requiredFields?: {
4085
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
4389
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
4086
4390
  name: string;
4087
4391
  description?: string | undefined;
4088
4392
  }[] | undefined;
@@ -4096,7 +4400,9 @@ declare const TraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4096
4400
  guard?: SExpr | undefined;
4097
4401
  priority?: number | undefined;
4098
4402
  appliesTo?: string[] | undefined;
4403
+ pageIds?: string[] | undefined;
4099
4404
  emits?: string[] | undefined;
4405
+ emitIds?: string[] | undefined;
4100
4406
  }[] | undefined;
4101
4407
  sourceBehavior?: {
4102
4408
  behavior: string;
@@ -4214,6 +4520,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4214
4520
  events?: Record<string, string> | undefined;
4215
4521
  linkedEntity?: string | undefined;
4216
4522
  }>, z.ZodObject<{
4523
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
4217
4524
  name: z.ZodString;
4218
4525
  description: z.ZodOptional<z.ZodString>;
4219
4526
  description_visual_prompt: z.ZodOptional<z.ZodString>;
@@ -4234,16 +4541,19 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4234
4541
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4235
4542
  scope: z.ZodEnum<["instance", "collection"]>;
4236
4543
  linkedEntity: z.ZodOptional<z.ZodString>;
4544
+ linkedEntityId: z.ZodOptional<z.ZodEffects<z.ZodString, EntityId, string>>;
4545
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, EntityId, string>>>;
4546
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, TraitId, string>>>;
4237
4547
  requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
4238
4548
  name: z.ZodString;
4239
4549
  type: z.ZodEnum<["string", "number", "boolean", "date", "array", "object", "timestamp", "datetime", "enum"]>;
4240
4550
  description: z.ZodOptional<z.ZodString>;
4241
4551
  }, "strip", z.ZodTypeAny, {
4242
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
4552
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
4243
4553
  name: string;
4244
4554
  description?: string | undefined;
4245
4555
  }, {
4246
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
4556
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
4247
4557
  name: string;
4248
4558
  description?: string | undefined;
4249
4559
  }>, "many">>;
@@ -4303,6 +4613,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4303
4613
  }>, "many">;
4304
4614
  events: z.ZodArray<z.ZodObject<{
4305
4615
  key: z.ZodString;
4616
+ id: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
4306
4617
  name: z.ZodString;
4307
4618
  description: z.ZodOptional<z.ZodString>;
4308
4619
  synonyms: z.ZodOptional<z.ZodString>;
@@ -4313,6 +4624,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4313
4624
  }, "strip", z.ZodTypeAny, {
4314
4625
  name: string;
4315
4626
  key: string;
4627
+ id?: EventId | undefined;
4316
4628
  description?: string | undefined;
4317
4629
  synonyms?: string | undefined;
4318
4630
  tier?: string | undefined;
@@ -4322,6 +4634,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4322
4634
  }, {
4323
4635
  name: string;
4324
4636
  key: string;
4637
+ id?: string | undefined;
4325
4638
  description?: string | undefined;
4326
4639
  synonyms?: string | undefined;
4327
4640
  tier?: string | undefined;
@@ -4333,6 +4646,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4333
4646
  from: z.ZodString;
4334
4647
  to: z.ZodString;
4335
4648
  event: z.ZodString;
4649
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
4336
4650
  guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>>;
4337
4651
  effects: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">>;
4338
4652
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -4341,6 +4655,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4341
4655
  from: string;
4342
4656
  to: string;
4343
4657
  description?: string | null | undefined;
4658
+ eventId?: EventId | undefined;
4344
4659
  guard?: SExpr | undefined;
4345
4660
  effects?: unknown[][] | undefined;
4346
4661
  }, {
@@ -4348,6 +4663,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4348
4663
  from: string;
4349
4664
  to: string;
4350
4665
  description?: string | null | undefined;
4666
+ eventId?: string | undefined;
4351
4667
  guard?: SExpr | undefined;
4352
4668
  effects?: unknown[][] | undefined;
4353
4669
  }>, "many">;
@@ -4368,6 +4684,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4368
4684
  events: {
4369
4685
  name: string;
4370
4686
  key: string;
4687
+ id?: EventId | undefined;
4371
4688
  description?: string | undefined;
4372
4689
  synonyms?: string | undefined;
4373
4690
  tier?: string | undefined;
@@ -4389,6 +4706,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4389
4706
  from: string;
4390
4707
  to: string;
4391
4708
  description?: string | null | undefined;
4709
+ eventId?: EventId | undefined;
4392
4710
  guard?: SExpr | undefined;
4393
4711
  effects?: unknown[][] | undefined;
4394
4712
  }[];
@@ -4401,6 +4719,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4401
4719
  events: {
4402
4720
  name: string;
4403
4721
  key: string;
4722
+ id?: string | undefined;
4404
4723
  description?: string | undefined;
4405
4724
  synonyms?: string | undefined;
4406
4725
  tier?: string | undefined;
@@ -4422,6 +4741,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4422
4741
  from: string;
4423
4742
  to: string;
4424
4743
  description?: string | null | undefined;
4744
+ eventId?: string | undefined;
4425
4745
  guard?: SExpr | undefined;
4426
4746
  effects?: unknown[][] | undefined;
4427
4747
  }[];
@@ -4439,9 +4759,11 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4439
4759
  interval: z.ZodUnion<[z.ZodLiteral<"frame">, z.ZodNumber]>;
4440
4760
  appliesTo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4441
4761
  pages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4762
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, PageId, string>, "many">>;
4442
4763
  guard: z.ZodOptional<z.ZodType<SExpr, z.ZodTypeDef, SExpr>>;
4443
4764
  effects: z.ZodArray<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, unknown[], unknown[]>, "many">;
4444
4765
  emits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4766
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, EventId, string>, "many">>;
4445
4767
  }, "strip", z.ZodTypeAny, {
4446
4768
  name: string;
4447
4769
  effects: unknown[][];
@@ -4451,7 +4773,9 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4451
4773
  guard?: SExpr | undefined;
4452
4774
  priority?: number | undefined;
4453
4775
  appliesTo?: string[] | undefined;
4776
+ pageIds?: PageId[] | undefined;
4454
4777
  emits?: string[] | undefined;
4778
+ emitIds?: EventId[] | undefined;
4455
4779
  }, {
4456
4780
  name: string;
4457
4781
  effects: unknown[][];
@@ -4461,7 +4785,9 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4461
4785
  guard?: SExpr | undefined;
4462
4786
  priority?: number | undefined;
4463
4787
  appliesTo?: string[] | undefined;
4788
+ pageIds?: string[] | undefined;
4464
4789
  emits?: string[] | undefined;
4790
+ emitIds?: string[] | undefined;
4465
4791
  }>, "many">>;
4466
4792
  emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
4467
4793
  /**
@@ -4474,6 +4800,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4474
4800
  * knob's effective literal before codegen/runtime consume it.
4475
4801
  */
4476
4802
  event: z.ZodString;
4803
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
4477
4804
  description: z.ZodOptional<z.ZodString>;
4478
4805
  synonyms: z.ZodOptional<z.ZodString>;
4479
4806
  tier: z.ZodOptional<z.ZodString>;
@@ -4486,6 +4813,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4486
4813
  scope?: "internal" | "external" | undefined;
4487
4814
  tier?: string | undefined;
4488
4815
  payloadSchema?: EventPayloadField[] | undefined;
4816
+ eventId?: EventId | undefined;
4489
4817
  }, {
4490
4818
  event: string;
4491
4819
  description?: string | undefined;
@@ -4493,10 +4821,13 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4493
4821
  scope?: "internal" | "external" | undefined;
4494
4822
  tier?: string | undefined;
4495
4823
  payloadSchema?: EventPayloadField[] | undefined;
4824
+ eventId?: string | undefined;
4496
4825
  }>, "many">>;
4497
4826
  listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
4498
4827
  event: z.ZodString;
4828
+ eventId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
4499
4829
  triggers: z.ZodString;
4830
+ triggersId: z.ZodOptional<z.ZodEffects<z.ZodString, EventId, string>>;
4500
4831
  description: z.ZodOptional<z.ZodString>;
4501
4832
  synonyms: z.ZodOptional<z.ZodString>;
4502
4833
  tier: z.ZodOptional<z.ZodString>;
@@ -4512,24 +4843,33 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4512
4843
  }>, z.ZodObject<{
4513
4844
  kind: z.ZodLiteral<"trait">;
4514
4845
  trait: z.ZodString;
4846
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
4515
4847
  }, "strip", z.ZodTypeAny, {
4516
4848
  trait: string;
4517
4849
  kind: "trait";
4850
+ traitId?: TraitId | undefined;
4518
4851
  }, {
4519
4852
  trait: string;
4520
4853
  kind: "trait";
4854
+ traitId?: string | undefined;
4521
4855
  }>, z.ZodObject<{
4522
4856
  kind: z.ZodLiteral<"orbital">;
4523
4857
  orbital: z.ZodString;
4524
4858
  trait: z.ZodString;
4859
+ orbitalId: z.ZodOptional<z.ZodEffects<z.ZodString, OrbitalId, string>>;
4860
+ traitId: z.ZodOptional<z.ZodEffects<z.ZodString, TraitId, string>>;
4525
4861
  }, "strip", z.ZodTypeAny, {
4862
+ orbital: string;
4526
4863
  trait: string;
4527
4864
  kind: "orbital";
4528
- orbital: string;
4865
+ traitId?: TraitId | undefined;
4866
+ orbitalId?: OrbitalId | undefined;
4529
4867
  }, {
4868
+ orbital: string;
4530
4869
  trait: string;
4531
4870
  kind: "orbital";
4532
- orbital: string;
4871
+ traitId?: string | undefined;
4872
+ orbitalId?: string | undefined;
4533
4873
  }>]>>;
4534
4874
  }, "strip", z.ZodTypeAny, {
4535
4875
  event: string;
@@ -4541,14 +4881,19 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4541
4881
  } | {
4542
4882
  trait: string;
4543
4883
  kind: "trait";
4884
+ traitId?: TraitId | undefined;
4544
4885
  } | {
4886
+ orbital: string;
4545
4887
  trait: string;
4546
4888
  kind: "orbital";
4547
- orbital: string;
4889
+ traitId?: TraitId | undefined;
4890
+ orbitalId?: OrbitalId | undefined;
4548
4891
  } | undefined;
4549
4892
  scope?: "internal" | "external" | undefined;
4550
4893
  tier?: string | undefined;
4894
+ eventId?: EventId | undefined;
4551
4895
  guard?: SExpr | undefined;
4896
+ triggersId?: EventId | undefined;
4552
4897
  payloadMapping?: Record<string, string> | undefined;
4553
4898
  }, {
4554
4899
  event: string;
@@ -4560,14 +4905,19 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4560
4905
  } | {
4561
4906
  trait: string;
4562
4907
  kind: "trait";
4908
+ traitId?: string | undefined;
4563
4909
  } | {
4910
+ orbital: string;
4564
4911
  trait: string;
4565
4912
  kind: "orbital";
4566
- orbital: string;
4913
+ traitId?: string | undefined;
4914
+ orbitalId?: string | undefined;
4567
4915
  } | undefined;
4568
4916
  scope?: "internal" | "external" | undefined;
4569
4917
  tier?: string | undefined;
4918
+ eventId?: string | undefined;
4570
4919
  guard?: SExpr | undefined;
4920
+ triggersId?: string | undefined;
4571
4921
  payloadMapping?: Record<string, string> | undefined;
4572
4922
  }>, "many">>;
4573
4923
  ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -4665,6 +5015,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4665
5015
  }, "strip", z.ZodTypeAny, {
4666
5016
  name: string;
4667
5017
  scope: "collection" | "instance";
5018
+ id?: TraitId | undefined;
4668
5019
  description?: string | undefined;
4669
5020
  ui?: Record<string, unknown> | undefined;
4670
5021
  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;
@@ -4684,6 +5035,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4684
5035
  events: {
4685
5036
  name: string;
4686
5037
  key: string;
5038
+ id?: EventId | undefined;
4687
5039
  description?: string | undefined;
4688
5040
  synonyms?: string | undefined;
4689
5041
  tier?: string | undefined;
@@ -4705,6 +5057,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4705
5057
  from: string;
4706
5058
  to: string;
4707
5059
  description?: string | null | undefined;
5060
+ eventId?: EventId | undefined;
4708
5061
  guard?: SExpr | undefined;
4709
5062
  effects?: unknown[][] | undefined;
4710
5063
  }[];
@@ -4721,8 +5074,10 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4721
5074
  scope?: "internal" | "external" | undefined;
4722
5075
  tier?: string | undefined;
4723
5076
  payloadSchema?: EventPayloadField[] | undefined;
5077
+ eventId?: EventId | undefined;
4724
5078
  }[] | undefined;
4725
5079
  linkedEntity?: string | undefined;
5080
+ linkedEntityId?: EntityId | undefined;
4726
5081
  listens?: {
4727
5082
  event: string;
4728
5083
  triggers: string;
@@ -4733,14 +5088,19 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4733
5088
  } | {
4734
5089
  trait: string;
4735
5090
  kind: "trait";
5091
+ traitId?: TraitId | undefined;
4736
5092
  } | {
5093
+ orbital: string;
4737
5094
  trait: string;
4738
5095
  kind: "orbital";
4739
- orbital: string;
5096
+ traitId?: TraitId | undefined;
5097
+ orbitalId?: OrbitalId | undefined;
4740
5098
  } | undefined;
4741
5099
  scope?: "internal" | "external" | undefined;
4742
5100
  tier?: string | undefined;
5101
+ eventId?: EventId | undefined;
4743
5102
  guard?: SExpr | undefined;
5103
+ triggersId?: EventId | undefined;
4744
5104
  payloadMapping?: Record<string, string> | undefined;
4745
5105
  }[] | undefined;
4746
5106
  description_visual_prompt?: string | undefined;
@@ -4751,8 +5111,10 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4751
5111
  } | undefined;
4752
5112
  entityBindingDescription?: string | undefined;
4753
5113
  entityBindingSynonyms?: string | undefined;
5114
+ entityRefIds?: Record<string, EntityId> | undefined;
5115
+ traitEmbedIds?: Record<string, TraitId> | undefined;
4754
5116
  requiredFields?: {
4755
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
5117
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
4756
5118
  name: string;
4757
5119
  description?: string | undefined;
4758
5120
  }[] | undefined;
@@ -4766,7 +5128,9 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4766
5128
  guard?: SExpr | undefined;
4767
5129
  priority?: number | undefined;
4768
5130
  appliesTo?: string[] | undefined;
5131
+ pageIds?: PageId[] | undefined;
4769
5132
  emits?: string[] | undefined;
5133
+ emitIds?: EventId[] | undefined;
4770
5134
  }[] | undefined;
4771
5135
  sourceBehavior?: {
4772
5136
  behavior: string;
@@ -4797,6 +5161,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4797
5161
  }, {
4798
5162
  name: string;
4799
5163
  scope: "collection" | "instance";
5164
+ id?: string | undefined;
4800
5165
  description?: string | undefined;
4801
5166
  ui?: Record<string, unknown> | undefined;
4802
5167
  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;
@@ -4816,6 +5181,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4816
5181
  events: {
4817
5182
  name: string;
4818
5183
  key: string;
5184
+ id?: string | undefined;
4819
5185
  description?: string | undefined;
4820
5186
  synonyms?: string | undefined;
4821
5187
  tier?: string | undefined;
@@ -4837,6 +5203,7 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4837
5203
  from: string;
4838
5204
  to: string;
4839
5205
  description?: string | null | undefined;
5206
+ eventId?: string | undefined;
4840
5207
  guard?: SExpr | undefined;
4841
5208
  effects?: unknown[][] | undefined;
4842
5209
  }[];
@@ -4853,8 +5220,10 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4853
5220
  scope?: "internal" | "external" | undefined;
4854
5221
  tier?: string | undefined;
4855
5222
  payloadSchema?: EventPayloadField[] | undefined;
5223
+ eventId?: string | undefined;
4856
5224
  }[] | undefined;
4857
5225
  linkedEntity?: string | undefined;
5226
+ linkedEntityId?: string | undefined;
4858
5227
  listens?: {
4859
5228
  event: string;
4860
5229
  triggers: string;
@@ -4865,14 +5234,19 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4865
5234
  } | {
4866
5235
  trait: string;
4867
5236
  kind: "trait";
5237
+ traitId?: string | undefined;
4868
5238
  } | {
5239
+ orbital: string;
4869
5240
  trait: string;
4870
5241
  kind: "orbital";
4871
- orbital: string;
5242
+ traitId?: string | undefined;
5243
+ orbitalId?: string | undefined;
4872
5244
  } | undefined;
4873
5245
  scope?: "internal" | "external" | undefined;
4874
5246
  tier?: string | undefined;
5247
+ eventId?: string | undefined;
4875
5248
  guard?: SExpr | undefined;
5249
+ triggersId?: string | undefined;
4876
5250
  payloadMapping?: Record<string, string> | undefined;
4877
5251
  }[] | undefined;
4878
5252
  description_visual_prompt?: string | undefined;
@@ -4883,8 +5257,10 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4883
5257
  } | undefined;
4884
5258
  entityBindingDescription?: string | undefined;
4885
5259
  entityBindingSynonyms?: string | undefined;
5260
+ entityRefIds?: Record<string, string> | undefined;
5261
+ traitEmbedIds?: Record<string, string> | undefined;
4886
5262
  requiredFields?: {
4887
- type: "string" | "number" | "boolean" | "object" | "date" | "timestamp" | "datetime" | "array" | "enum";
5263
+ type: "string" | "number" | "boolean" | "object" | "date" | "array" | "timestamp" | "datetime" | "enum";
4888
5264
  name: string;
4889
5265
  description?: string | undefined;
4890
5266
  }[] | undefined;
@@ -4898,7 +5274,9 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4898
5274
  guard?: SExpr | undefined;
4899
5275
  priority?: number | undefined;
4900
5276
  appliesTo?: string[] | undefined;
5277
+ pageIds?: string[] | undefined;
4901
5278
  emits?: string[] | undefined;
5279
+ emitIds?: string[] | undefined;
4902
5280
  }[] | undefined;
4903
5281
  sourceBehavior?: {
4904
5282
  behavior: string;
@@ -4928,4 +5306,4 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
4928
5306
  } | undefined;
4929
5307
  }>]>;
4930
5308
 
4931
- export { type LogEffect as $, type AgentEffect as A, type BehaviorEffect as B, type CallSiteConfig as C, type DeclaredTraitConfig as D, type Effect as E, type EvaluateConfig as F, type EvaluateEffect as G, type Event as H, type EventInput as I, type EventPayloadField as J, EventPayloadFieldSchema as K, EventSchema as L, type EventScope as M, EventScopeSchema as N, type FetchEffect as O, type FetchOptions as P, type FetchResult as Q, type ForwardConfig as R, type State as S, type TraitEventListener as T, type ForwardEffect as U, type Guard as V, type GuardInput as W, GuardSchema as X, type ListenSource as Y, ListenSourceSchema as Z, type LlmEffect as _, type TraitReference as a, TraitDataEntitySchema as a$, type McpServiceDef as a0, McpServiceDefSchema as a1, type MemoryEffect as a2, type NavigateEffect as a3, type NnConfig as a4, type NnLayer as a5, type NotifyEffect as a6, type OrbitalTraitRef as a7, OrbitalTraitRefSchema as a8, type OsEffect as a9, ServiceRefSchema as aA, ServiceRefStringSchema as aB, type ServiceType as aC, ServiceTypeSchema as aD, type SessionEffect as aE, type SetEffect as aF, type SocketEvents as aG, SocketEventsSchema as aH, type SocketServiceDef as aI, SocketServiceDefSchema as aJ, type SpawnEffect as aK, type StateInput as aL, type StateMachine as aM, type StateMachineInput as aN, StateMachineSchema as aO, StateSchema as aP, type SwapEffect as aQ, type TraceEffect as aR, type TrainConfig as aS, type TrainEffect as aT, type TraitCategory as aU, TraitCategorySchema as aV, type TraitConfigObject as aW, TraitConfigSchema as aX, type TraitConfigValue as aY, TraitConfigValueSchema as aZ, type TraitDataEntity as a_, type PayloadField as aa, PayloadFieldSchema as ab, type PersistData as ac, type PersistEffect as ad, type PersistEmitConfig as ae, type PresentationType as af, type RefEffect as ag, type RenderBinding as ah, type RenderItemLambda as ai, type RenderUIEffect as aj, type RenderUINode as ak, type RequiredField as al, RequiredFieldSchema as am, type ResolvedPatternProps as an, type RestAuthConfig as ao, RestAuthConfigSchema as ap, type RestServiceDef as aq, RestServiceDefSchema as ar, SERVICE_TYPES as as, type ServiceDefinition as at, ServiceDefinitionSchema as au, type ServiceParams as av, type ServiceParamsValue as aw, type ServiceRef as ax, type ServiceRefObject as ay, ServiceRefObjectSchema as az, type CallSiteConfigEntry as b, type TraitEntityField as b0, TraitEntityFieldSchema as b1, type TraitEventContract as b2, TraitEventContractSchema as b3, TraitEventListenerSchema as b4, type TraitInput as b5, type TraitRef as b6, TraitRefSchema as b7, type TraitReferenceInput as b8, TraitReferenceSchema as b9, isCallSiteConfigDeclaration as bA, isCircuitEvent as bB, isEffect as bC, isInlineTrait as bD, isMcpService as bE, isRestService as bF, isSExprEffect as bG, isServiceReference as bH, isServiceReferenceObject as bI, isSocketService as bJ, navigate as bK, normalizeCallSiteConfigToValues as bL, normalizeTraitRef as bM, notify as bN, parseServiceRef as bO, persist as bP, ref as bQ, renderUI as bR, resolveConfigRefEventName as bS, set as bT, spawn as bU, swap as bV, watch as bW, type TraitScope as bX, TraitSchema as ba, type TraitTick as bb, TraitTickSchema as bc, type TraitUIBinding as bd, type Transition as be, type TransitionInput as bf, TransitionSchema as bg, type TypedEffect as bh, type UISlot as bi, UISlotSchema as bj, UI_SLOTS as bk, type ValidateEffect as bl, type WatchEffect as bm, type WatchOptions as bn, atomic as bo, callService as bp, configRefEventKnob as bq, deref as br, despawn as bs, doEffects as bt, emit as bu, findService as bv, getServiceNames as bw, getTraitConfig as bx, getTraitName as by, hasService as bz, type Trait as c, type TraitConfig as d, type ApplicationEffect as e, type AtomicEffect as f, CONFIG_REF_EVENT_PATTERN as g, type CallServiceConfig as h, type CallServiceEffect as i, type CheckpointLoadEffect as j, type CheckpointSaveEffect as k, type ComposeEffect as l, type ConfigFieldDeclaration as m, ConfigFieldDeclarationSchema as n, type ConfigFieldItemsDeclaration as o, type ConfigRefEventError as p, DeclaredTraitConfigSchema as q, type DerefEffect as r, type DespawnEffect as s, type DoEffect as t, type EffectInput as u, EffectSchema as v, type EmitConfig as w, type EmitEffect as x, type EntityFieldContract as y, EntityFieldContractSchema as z };
5309
+ export { type LogEffect as $, type AgentEffect as A, type BehaviorEffect as B, type CallSiteConfig as C, type DeclaredTraitConfig as D, type Effect as E, type EvaluateConfig as F, type EvaluateEffect as G, type Event as H, type EventInput as I, type EventPayloadField as J, EventPayloadFieldSchema as K, EventSchema as L, type EventScope as M, EventScopeSchema as N, type FetchEffect as O, type FetchOptions as P, type FetchResult as Q, type ForwardConfig as R, type State as S, type TraitEventListener as T, type ForwardEffect as U, type Guard as V, type GuardInput as W, GuardSchema as X, type ListenSource as Y, ListenSourceSchema as Z, type LlmEffect as _, type TraitReference as a, type TraitConfigValue as a$, type McpServiceDef as a0, McpServiceDefSchema as a1, type MemoryEffect as a2, type NavigateEffect as a3, type NnConfig as a4, type NnLayer as a5, type NotifyEffect as a6, type OrbitalTraitRef as a7, OrbitalTraitRefSchema as a8, type OsEffect as a9, type ServiceRef as aA, type ServiceRefObject as aB, ServiceRefObjectSchema as aC, ServiceRefSchema as aD, ServiceRefStringSchema as aE, type ServiceType as aF, ServiceTypeSchema as aG, type SessionEffect as aH, type SetEffect as aI, type SocketEvents as aJ, SocketEventsSchema as aK, type SocketServiceDef as aL, SocketServiceDefSchema as aM, type SpawnEffect as aN, type StateInput as aO, type StateMachine as aP, type StateMachineInput as aQ, StateMachineSchema as aR, StateSchema as aS, type SwapEffect as aT, type TraceEffect as aU, type TrainConfig as aV, type TrainEffect as aW, type TraitCategory as aX, TraitCategorySchema as aY, type TraitConfigObject as aZ, TraitConfigSchema as a_, type PayloadField as aa, PayloadFieldSchema as ab, type PersistData as ac, type PersistEffect as ad, type PersistEmitConfig as ae, type PresentationType as af, REFERENCE_CONFIG_TYPES as ag, type RefEffect as ah, type ReferenceConfigType as ai, type RenderBinding as aj, type RenderChildrenMap as ak, type RenderItemLambda as al, type RenderUIEffect as am, type RenderUINode as an, type RequiredField as ao, RequiredFieldSchema as ap, type ResolvedPatternProps as aq, type RestAuthConfig as ar, RestAuthConfigSchema as as, type RestServiceDef as at, RestServiceDefSchema as au, SERVICE_TYPES as av, type ServiceDefinition as aw, ServiceDefinitionSchema as ax, type ServiceParams as ay, type ServiceParamsValue as az, type CallSiteConfigEntry as b, type TraitScope as b$, TraitConfigValueSchema as b0, type TraitDataEntity as b1, TraitDataEntitySchema as b2, type TraitEntityField as b3, TraitEntityFieldSchema as b4, type TraitEventContract as b5, TraitEventContractSchema as b6, TraitEventListenerSchema as b7, type TraitInput as b8, type TraitRef as b9, getTraitConfig as bA, getTraitName as bB, hasService as bC, isCallSiteConfigDeclaration as bD, isCircuitEvent as bE, isEffect as bF, isInlineTrait as bG, isMcpService as bH, isReferenceConfigType as bI, isRestService as bJ, isSExprEffect as bK, isServiceReference as bL, isServiceReferenceObject as bM, isSocketService as bN, navigate as bO, normalizeCallSiteConfigToValues as bP, normalizeTraitRef as bQ, notify as bR, parseServiceRef as bS, persist as bT, ref as bU, renderUI as bV, resolveConfigRefEventName as bW, set as bX, spawn as bY, swap as bZ, watch as b_, TraitRefSchema as ba, type TraitReferenceInput as bb, TraitReferenceSchema as bc, TraitSchema as bd, type TraitTick as be, TraitTickSchema as bf, type TraitUIBinding as bg, type Transition as bh, type TransitionInput as bi, TransitionSchema as bj, type TypedEffect as bk, type UISlot as bl, UISlotSchema as bm, UI_SLOTS as bn, type ValidateEffect as bo, type WatchEffect as bp, type WatchOptions as bq, atomic as br, callService as bs, configRefEventKnob as bt, deref as bu, despawn as bv, doEffects as bw, emit as bx, findService as by, getServiceNames as bz, type Trait as c, type TraitConfig as d, type ApplicationEffect as e, type AtomicEffect as f, CONFIG_REF_EVENT_PATTERN as g, type CallServiceConfig as h, type CallServiceEffect as i, type CheckpointLoadEffect as j, type CheckpointSaveEffect as k, type ComposeEffect as l, type ConfigFieldDeclaration as m, ConfigFieldDeclarationSchema as n, type ConfigFieldItemsDeclaration as o, type ConfigRefEventError as p, DeclaredTraitConfigSchema as q, type DerefEffect as r, type DespawnEffect as s, type DoEffect as t, type EffectInput as u, EffectSchema as v, type EmitConfig as w, type EmitEffect as x, type EntityFieldContract as y, EntityFieldContractSchema as z };