@almadar/core 10.129.0 → 11.0.1

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.
Files changed (135) hide show
  1. package/dist/behavior-package.d.ts +49 -11
  2. package/dist/behavior-package.js +1 -1
  3. package/dist/{orbital-CkFdDS9f.d.ts → builders-BdgbY7Th.d.ts} +5828 -6917
  4. package/dist/builders.d.ts +6 -6
  5. package/dist/builders.js +7 -6
  6. package/dist/{bus-CcbB__oo.d.ts → bus-C0hFDNFR.d.ts} +262 -354
  7. package/dist/chunk-347APWFM.js +286 -0
  8. package/dist/chunk-347APWFM.js.map +1 -0
  9. package/dist/chunk-5WQ3U7NJ.js +2363 -0
  10. package/dist/chunk-5WQ3U7NJ.js.map +1 -0
  11. package/dist/chunk-5YTPYMPZ.js +99 -0
  12. package/dist/chunk-5YTPYMPZ.js.map +1 -0
  13. package/dist/chunk-66Q5VX2F.js +3810 -0
  14. package/dist/chunk-66Q5VX2F.js.map +1 -0
  15. package/dist/chunk-7GHJU5WI.js +39 -0
  16. package/dist/chunk-7GHJU5WI.js.map +1 -0
  17. package/dist/chunk-B4MNHGBP.js +8 -0
  18. package/dist/chunk-B4MNHGBP.js.map +1 -0
  19. package/dist/chunk-E4T2MQAV.js +24 -0
  20. package/dist/chunk-E4T2MQAV.js.map +1 -0
  21. package/dist/chunk-ENOCKYGA.js +412 -0
  22. package/dist/chunk-ENOCKYGA.js.map +1 -0
  23. package/dist/chunk-FGT5OS2Y.js +918 -0
  24. package/dist/chunk-FGT5OS2Y.js.map +1 -0
  25. package/dist/chunk-GF7KCLNR.js +3284 -0
  26. package/dist/chunk-GF7KCLNR.js.map +1 -0
  27. package/dist/chunk-PNGFWLHD.js +1567 -0
  28. package/dist/chunk-PNGFWLHD.js.map +1 -0
  29. package/dist/{chunk-X4SC7FGF.js → chunk-RGACZEYC.js} +99 -96
  30. package/dist/chunk-RGACZEYC.js.map +1 -0
  31. package/dist/{chunk-RYPVOI6H.js → chunk-SNZYN7UA.js} +2541 -433
  32. package/dist/{chunk-RYPVOI6H.js.map → chunk-SNZYN7UA.js.map} +1 -1
  33. package/dist/{chunk-KDMV222Q.js → chunk-TDNQT3M3.js} +304 -373
  34. package/dist/chunk-TDNQT3M3.js.map +1 -0
  35. package/dist/chunk-VG7BRFUD.js +152 -0
  36. package/dist/chunk-VG7BRFUD.js.map +1 -0
  37. package/dist/chunk-Z7BI7DE7.js +1293 -0
  38. package/dist/chunk-Z7BI7DE7.js.map +1 -0
  39. package/dist/{domain-Dz3jP-UM.d.ts → domain-Cpmja5ak.d.ts} +55 -55
  40. package/dist/{effect-CiEVLsZz.d.ts → effect-DZaXwSAz.d.ts} +283 -453
  41. package/dist/{effect-result-Bebwu9yT.d.ts → effect-result-1HpXgeBc.d.ts} +656 -851
  42. package/dist/{expression-D0Fs0riG.d.ts → expression-DirYKz-f.d.ts} +5 -13
  43. package/dist/factory/index.d.ts +7 -144
  44. package/dist/factory/index.js +8 -8
  45. package/dist/factory-runtime/index.d.ts +7 -6
  46. package/dist/factory-runtime/index.js +527 -8
  47. package/dist/factory-runtime/index.js.map +1 -1
  48. package/dist/fixtures.d.ts +9 -11
  49. package/dist/fixtures.js +12 -8
  50. package/dist/fixtures.js.map +1 -1
  51. package/dist/i18n/index.d.ts +15 -19
  52. package/dist/i18n/index.js +2 -1
  53. package/dist/{index-BC-Jycqj.d.ts → index-D7SxwNdv.d.ts} +34 -734
  54. package/dist/index.d.ts +92 -247
  55. package/dist/index.js +322 -986
  56. package/dist/index.js.map +1 -1
  57. package/dist/kernel-wire.d.ts +3 -3
  58. package/dist/kernel-wire.js +3 -79
  59. package/dist/kernel-wire.js.map +1 -1
  60. package/dist/language/constructs.json +22 -2
  61. package/dist/language/program-types.json +203 -22
  62. package/dist/language/protocols.json +46 -0
  63. package/dist/language/ui-vocabulary.json +1697 -0
  64. package/dist/language/validation-codes.json +1222 -1212
  65. package/dist/language/vocabulary.json +44 -8
  66. package/dist/language-data.d.ts +7 -4
  67. package/dist/language-data.js +20 -14
  68. package/dist/language-data.js.map +1 -1
  69. package/dist/patterns/component-mapping.json +11 -1
  70. package/dist/patterns/definitions.d.ts +2 -2
  71. package/dist/patterns/definitions.js +1 -1
  72. package/dist/patterns/event-contracts.json +1 -15
  73. package/dist/patterns/game-font-families.json +13 -0
  74. package/dist/patterns/index.d.ts +24 -120
  75. package/dist/patterns/index.js +3 -3
  76. package/dist/patterns/pattern-tile-geometry.json +1065 -0
  77. package/dist/patterns/patterns-registry.json +2539 -431
  78. package/dist/patterns/registry.json +2539 -431
  79. package/dist/trait-sRjIivFq.d.ts +3519 -0
  80. package/dist/types/index.d.ts +9 -10
  81. package/dist/types/index.js +11 -5
  82. package/dist/{types-DGwrltUF.d.ts → types-C6_yPMpn.d.ts} +3 -3
  83. package/fixtures/events-wire/client-effects-by-trait/response.json +0 -18
  84. package/fixtures/events-wire/client-effects-provenance/response.json +0 -18
  85. package/fixtures/events-wire/effect-results-every-kind/response.json +2 -27
  86. package/fixtures/events-wire/navigate-1/response.json +8 -5
  87. package/fixtures/events-wire/navigate-2/response.json +11 -8
  88. package/fixtures/events-wire/navigate-3/response.json +14 -11
  89. package/fixtures/events-wire/navigate-back/response.json +7 -4
  90. package/fixtures/events-wire/render-ui-3/response.json +12 -9
  91. package/fixtures/events-wire/render-ui-clear/response.json +0 -7
  92. package/fixtures/events-wire/sse-stream/response.json +0 -20
  93. package/fixtures/events-wire/sse-stream/stream.json +0 -20
  94. package/fixtures/events-wire/stateless-traits/response.json +14 -5
  95. package/fixtures/kernel-wire/golden/basic-entity.json +1687 -0
  96. package/fixtures/kernel-wire/golden/entity-rerender.json +743 -0
  97. package/fixtures/kernel-wire/golden/rollback.json +793 -0
  98. package/fixtures/kernel-wire/golden/tick-counter.json +1538 -0
  99. package/fixtures/kernel-wire/golden/two-orbital-chore.json +847 -0
  100. package/fixtures/kernel-wire/golden/two-orbital-task.json +457 -0
  101. package/fixtures/kernel-wire/played-step.json +136 -0
  102. package/fixtures/kernel-wire/scripts/basic-entity.json +28 -0
  103. package/fixtures/kernel-wire/scripts/entity-rerender.json +13 -0
  104. package/fixtures/kernel-wire/scripts/rollback.json +53 -0
  105. package/fixtures/kernel-wire/scripts/tick-counter.json +26 -0
  106. package/fixtures/kernel-wire/scripts/two-orbital-chore.json +9 -0
  107. package/fixtures/kernel-wire/scripts/two-orbital-task.json +9 -0
  108. package/package.json +28 -19
  109. package/dist/builders-DmZE5By0.d.ts +0 -2663
  110. package/dist/chunk-45I2O4SJ.js +0 -4646
  111. package/dist/chunk-45I2O4SJ.js.map +0 -1
  112. package/dist/chunk-6LR43Z5E.js +0 -3061
  113. package/dist/chunk-6LR43Z5E.js.map +0 -1
  114. package/dist/chunk-GIUA3NUJ.js +0 -809
  115. package/dist/chunk-GIUA3NUJ.js.map +0 -1
  116. package/dist/chunk-GTY53NS5.js +0 -1908
  117. package/dist/chunk-GTY53NS5.js.map +0 -1
  118. package/dist/chunk-JOHDVS6J.js +0 -1614
  119. package/dist/chunk-JOHDVS6J.js.map +0 -1
  120. package/dist/chunk-KDMV222Q.js.map +0 -1
  121. package/dist/chunk-QRHJUS3D.js +0 -23
  122. package/dist/chunk-QRHJUS3D.js.map +0 -1
  123. package/dist/chunk-QUOTJULD.js +0 -4009
  124. package/dist/chunk-QUOTJULD.js.map +0 -1
  125. package/dist/chunk-V5VNGRVU.js +0 -66
  126. package/dist/chunk-V5VNGRVU.js.map +0 -1
  127. package/dist/chunk-X4SC7FGF.js.map +0 -1
  128. package/dist/entityAccess-BPSz1i2n.d.ts +0 -80
  129. package/dist/mock/index.d.ts +0 -153
  130. package/dist/mock/index.js +0 -190
  131. package/dist/mock/index.js.map +0 -1
  132. package/dist/schema-T5RT5s6H.d.ts +0 -282
  133. package/dist/state-machine/index.d.ts +0 -359
  134. package/dist/state-machine/index.js +0 -3
  135. package/dist/state-machine/index.js.map +0 -1
@@ -0,0 +1,3519 @@
1
+ import { S as SExpr, b as Expression, J as JsonValue } from './expression-DirYKz-f.js';
2
+ import { z } from 'zod';
3
+ import { b as EventId, F as FieldProjection, d as Effect, e as TypedEffect, T as TraitId, O as OrbitalId, E as EntityField, f as TypeVariable, g as EntityId, P as PageId, A as AnyPatternConfig, h as Entity } from './effect-DZaXwSAz.js';
4
+
5
+ /**
6
+ * Awaiting-server skeletons — the platform-neutral contract.
7
+ *
8
+ * A server-backed trait renders through a server round trip (on entering the
9
+ * screen and on events that open a new view). While it waits, an empty slot
10
+ * (or embedded frame) shows a skeleton shaped like what the server WILL render:
11
+ * - every data pattern declares its natural shape as the default of its
12
+ * universal `skeleton` prop, and a `.lolo` element may override it
13
+ * (`skeleton: list`, `skeleton: { variant: table, rows: 6 }`, `skeleton: none`);
14
+ * - orbital-compiler (enrich, resolve/codegen only — never persisted) folds the
15
+ * render a transition's server effects lead to into a `SkeletonNode` and
16
+ * attaches it to the transition as `awaitRender`;
17
+ * - each execution engine marks a trait as awaiting from server-leg send until
18
+ * fold or error (`AwaitingTrait`), and the shell draws the node.
19
+ */
20
+
21
+ /** The skeleton shapes every shell can draw. */
22
+ declare const SKELETON_VARIANTS: readonly ["header", "table", "list", "grid", "detail", "stats", "form", "card", "text"];
23
+ type SkeletonVariant = (typeof SKELETON_VARIANTS)[number];
24
+ declare const SkeletonVariantSchema: z.ZodEnum<{
25
+ header: "header";
26
+ form: "form";
27
+ detail: "detail";
28
+ grid: "grid";
29
+ card: "card";
30
+ list: "list";
31
+ text: "text";
32
+ stats: "stats";
33
+ table: "table";
34
+ }>;
35
+ /** A sized shape. `rows` for table/list/text, cards for grid, field pairs for detail; `columns` for table/stats; `fields` for form. */
36
+ type SkeletonShape = {
37
+ variant: SkeletonVariant;
38
+ rows?: number;
39
+ columns?: number;
40
+ fields?: number;
41
+ };
42
+ declare const SkeletonShapeSchema: z.ZodObject<{
43
+ variant: z.ZodEnum<{
44
+ header: "header";
45
+ form: "form";
46
+ detail: "detail";
47
+ grid: "grid";
48
+ card: "card";
49
+ list: "list";
50
+ text: "text";
51
+ stats: "stats";
52
+ table: "table";
53
+ }>;
54
+ rows: z.ZodOptional<z.ZodNumber>;
55
+ columns: z.ZodOptional<z.ZodNumber>;
56
+ fields: z.ZodOptional<z.ZodNumber>;
57
+ }, z.core.$strip>;
58
+ /**
59
+ * The universal `skeleton` prop value on a render-ui node: a shape name, a
60
+ * sized shape, or `none` (this element contributes no skeleton).
61
+ */
62
+ type SkeletonSpec = SkeletonVariant | "none" | SkeletonShape;
63
+ declare const SkeletonSpecSchema: z.ZodUnion<readonly [z.ZodEnum<{
64
+ header: "header";
65
+ form: "form";
66
+ detail: "detail";
67
+ grid: "grid";
68
+ card: "card";
69
+ list: "list";
70
+ text: "text";
71
+ stats: "stats";
72
+ table: "table";
73
+ }>, z.ZodLiteral<"none">, z.ZodObject<{
74
+ variant: z.ZodEnum<{
75
+ header: "header";
76
+ form: "form";
77
+ detail: "detail";
78
+ grid: "grid";
79
+ card: "card";
80
+ list: "list";
81
+ text: "text";
82
+ stats: "stats";
83
+ table: "table";
84
+ }>;
85
+ rows: z.ZodOptional<z.ZodNumber>;
86
+ columns: z.ZodOptional<z.ZodNumber>;
87
+ fields: z.ZodOptional<z.ZodNumber>;
88
+ }, z.core.$strip>]>;
89
+ /** A predicted skeleton: one shape, or a vertical stack of nodes (a container's children). */
90
+ type SkeletonNode = {
91
+ shape: SkeletonShape;
92
+ } | {
93
+ stack: SkeletonNode[];
94
+ };
95
+ declare const SkeletonNodeSchema: z.ZodType<SkeletonNode>;
96
+ /**
97
+ * One predicted render a transition's server effects lead to: `trait` (the seed
98
+ * itself, or a listener reached across the declared listens graph) will render
99
+ * into `slot` something shaped like `skeleton`.
100
+ */
101
+ type AwaitRender = {
102
+ trait: string;
103
+ slot: string;
104
+ skeleton: SkeletonNode;
105
+ };
106
+ declare const AwaitRenderSchema: z.ZodObject<{
107
+ trait: z.ZodString;
108
+ slot: z.ZodString;
109
+ skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
110
+ }, z.core.$strip>;
111
+
112
+ /**
113
+ * Represents a state in the state machine
114
+ */
115
+ type State = {
116
+ /** State name (unique identifier) */
117
+ name: string;
118
+ /** Whether this is the initial state */
119
+ isInitial?: boolean;
120
+ /** Whether this is a terminal state (no outgoing transitions expected) */
121
+ isTerminal?: boolean;
122
+ /** Whether this is a final state (legacy alias for isTerminal) */
123
+ isFinal?: boolean;
124
+ /** Human-readable description */
125
+ description?: string;
126
+ /** Effect names to run on entry */
127
+ onEntry?: string[];
128
+ /** Effect names to run on exit */
129
+ onExit?: string[];
130
+ /** `@holds <expr>`: the trait's `@entity` satisfies it whenever the trait is in this state, proved by `orb validate`. No runtime effect. */
131
+ holds?: SExpr;
132
+ };
133
+ declare const StateSchema: z.ZodObject<{
134
+ name: z.ZodString;
135
+ isInitial: z.ZodOptional<z.ZodBoolean>;
136
+ isTerminal: z.ZodOptional<z.ZodBoolean>;
137
+ isFinal: z.ZodOptional<z.ZodBoolean>;
138
+ description: z.ZodOptional<z.ZodString>;
139
+ onEntry: z.ZodOptional<z.ZodArray<z.ZodString>>;
140
+ onExit: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
+ holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
142
+ }, z.core.$strip>;
143
+ /**
144
+ * Payload field definition for events
145
+ */
146
+ /**
147
+ * One condition of a payload field's `typeWhen` conditional list: "when
148
+ * config knob `knob` resolves to the literal whose string spelling is
149
+ * `equals`, this field's type is `type`". Declared DATA — authored in
150
+ * `.lolo` as a type-level `match` block (§25 — REPLACED the `@typeWhen`
151
+ * annotation spelling outright) — never a compiler-side predicate over a
152
+ * specific knob name. This wire shape is `match`'s lowered form, unchanged.
153
+ * Mirrors Rust `PayloadTypeWhen`.
154
+ */
155
+ type PayloadTypeWhen = {
156
+ knob: string;
157
+ equals: string;
158
+ type: string;
159
+ };
160
+ declare const PayloadTypeWhenSchema: z.ZodType<PayloadTypeWhen>;
161
+ type PayloadField = {
162
+ name: string;
163
+ /**
164
+ * Field type. Mirrors the Rust validator's acceptance: any non-empty
165
+ * string. Primitives ('string' | 'number' | 'boolean' | 'object' |
166
+ * 'array') are the canonical values; entity-name references like
167
+ * 'CartItem' and array-of-entity references like '[CartItem]' are also
168
+ * valid because the Rust IR's PayloadField.field_type is just a String.
169
+ */
170
+ type: string;
171
+ required?: boolean;
172
+ nullable?: boolean;
173
+ /** Human-readable description. Mirrors Rust `PayloadField.description`. */
174
+ description?: string;
175
+ additionalProperties?: PayloadField;
176
+ /** Closed value set (`"a" | "b"`) — element-wise for an array type. Mirrors Rust `PayloadField.values`. */
177
+ values?: ReadonlyArray<string>;
178
+ /** Structured property schema for object-typed payload fields (recursive). */
179
+ properties?: ReadonlyArray<PayloadField>;
180
+ /**
181
+ * Declared knob-conditional type list (`match` in `.lolo`, §25). Resolved
182
+ * and cleared once composed — the emitted `.orb` carries only the
183
+ * resolved truth, never the conditional.
184
+ */
185
+ typeWhen?: ReadonlyArray<PayloadTypeWhen>;
186
+ /**
187
+ * The declared entity this field's value IS an instance of — stamped by
188
+ * lowering when an entity-typed payload field (`row: Note`, scalar or
189
+ * `[Note]` array — the array form names the element entity) is flattened
190
+ * into `type: "object"`/`"[object]"` + `properties`. Mirrors Rust
191
+ * `PayloadField.entity`. Absent for an anonymous struct/object field with
192
+ * no declared entity — never inferred from shape or name.
193
+ */
194
+ entity?: string;
195
+ /**
196
+ * `.lolo` `T.f` / `[T.f]`: the declared field this field's value — each
197
+ * element's, for an array type — was projected from. Mirrors Rust
198
+ * `PayloadField.projected_from`.
199
+ */
200
+ projectedFrom?: FieldProjection;
201
+ /**
202
+ * The element type of an `array` field whose element is itself a typed field (a union of named types:
203
+ * `[(Adv | string)]`), the nested form an entity field's `items` takes. Mirrors Rust `PayloadField.items`.
204
+ */
205
+ items?: PayloadField;
206
+ };
207
+ /**
208
+ * The container a payload field's `type` string declares. `[X]` (and the
209
+ * bare `array` primitive) is an array of `X`; `Map<K,V>` carries key/value
210
+ * types; `object` is a plain object;
211
+ * every other spelling — scalars, entity names, `@entity`, type variables,
212
+ * unions — is opaque to a container check.
213
+ */
214
+ type PayloadTypeContainer = {
215
+ kind: 'array';
216
+ element: string;
217
+ } | {
218
+ kind: 'map';
219
+ key: string;
220
+ value: string;
221
+ } | {
222
+ kind: 'object';
223
+ } | {
224
+ kind: 'opaque';
225
+ };
226
+ declare function payloadTypeContainer(type: string): PayloadTypeContainer;
227
+ declare const PayloadFieldSchema: z.ZodType<PayloadField>;
228
+ /** What an inbound event declares: the hook name it receives and the event whose payload answers the request. */
229
+ type InboundDeclaration = {
230
+ name: string;
231
+ answers: string;
232
+ /** The sender check the runtime makes before the handler runs; its result is the payload's `verified`. */
233
+ verifies?: InboundVerification;
234
+ };
235
+ /** `verifies "<header>" "<CREDENTIAL>"`: the request header that must equal the named credential (compared in constant time, never exposed to program data). */
236
+ type InboundVerification = {
237
+ header: string;
238
+ credential: string;
239
+ };
240
+ /**
241
+ * Represents an event that can trigger transitions
242
+ */
243
+ type Event = {
244
+ /** Event key (UPPER_SNAKE_CASE) */
245
+ key: string;
246
+ /** V4 dual-carry id sibling of `key` — optional until the Phase-7 flip. */
247
+ id?: EventId;
248
+ /** Human-readable name */
249
+ name: string;
250
+ /** Description (authored `@description` on the emit/listen). */
251
+ description?: string;
252
+ /** User-vocabulary synonyms (comma-separated) — per-event analogue of a
253
+ * field/config `@synonyms`. Feeds the curation event matcher. */
254
+ synonyms?: string;
255
+ /** Authoring tier (`essential`/`customization`/`advanced`/`internal`). */
256
+ tier?: string;
257
+ /** Expected payload structure */
258
+ payloadSchema?: PayloadField[];
259
+ /**
260
+ * The entity this WHOLE payload was declared as (`type X = Event
261
+ * <EntityName>`, the bare/concrete form) — mirrors Rust
262
+ * `EventDefinition.payload_entity` (G4, `Almadar_Compiler_Gaps.md` §82).
263
+ * Distinct from `PayloadField.entity` (a single NESTED field's value is
264
+ * an entity instance): this marks the payload schema ITSELF as a 1:1
265
+ * mirror of that entity's CURRENT fields. Consumed by
266
+ * `resolveTraitTypeParamSentinels` (`resolver/sentinel-resolution.ts`)
267
+ * to re-derive `payloadSchema` from the entity's post-`fields{}`/
268
+ * `extend{}` shape once an orbital-import or trait-reference override
269
+ * has materialized; kept in sync across entity renames the same one
270
+ * owner `PayloadField.entity` already uses
271
+ * (`renamePayloadEntityMarkers`, `reference-resolver.ts`).
272
+ */
273
+ payloadEntity?: string;
274
+ /**
275
+ * A declared input (`listens { EVENT -> input { … } }`): a client
276
+ * outside the program (an API, an agent, an MCP client) may send this event to
277
+ * the trait. Absent = not an input. Mirrors Rust `EventDefinition.input`.
278
+ */
279
+ input?: boolean;
280
+ /**
281
+ * Declared in the trait's own `listens { EVENT … }` block (the local form, input or
282
+ * not): an input the author offers to the program. Absent = not declared there.
283
+ * Mirrors Rust `EventDefinition.listened`.
284
+ */
285
+ listened?: boolean;
286
+ /**
287
+ * A declared inbound delivery (`listens { EVENT -> inbound "name" answers ANSWER { … } }`): the
288
+ * host carries the request at `/api/hooks/<name>` and the kernel delivers it to this event; the
289
+ * handler's emit of `answers` (`{ status, body }`) is the HTTP answer. Mirrors Rust
290
+ * `EventDefinition.inbound`.
291
+ */
292
+ inbound?: InboundDeclaration;
293
+ /** Domain vs System classification (optional, for analysis) */
294
+ classification?: "domain" | "system";
295
+ /** Semantic role of this event (optional, for analysis) */
296
+ semanticRole?: string;
297
+ };
298
+ declare const EventSchema: z.ZodObject<{
299
+ key: z.ZodString;
300
+ id: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
301
+ name: z.ZodString;
302
+ description: z.ZodOptional<z.ZodString>;
303
+ synonyms: z.ZodOptional<z.ZodString>;
304
+ tier: z.ZodOptional<z.ZodString>;
305
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
306
+ payloadEntity: z.ZodOptional<z.ZodString>;
307
+ input: z.ZodOptional<z.ZodBoolean>;
308
+ listened: z.ZodOptional<z.ZodBoolean>;
309
+ inbound: z.ZodOptional<z.ZodObject<{
310
+ name: z.ZodString;
311
+ answers: z.ZodString;
312
+ verifies: z.ZodOptional<z.ZodObject<{
313
+ header: z.ZodString;
314
+ credential: z.ZodString;
315
+ }, z.core.$strip>>;
316
+ }, z.core.$strip>>;
317
+ classification: z.ZodOptional<z.ZodEnum<{
318
+ domain: "domain";
319
+ system: "system";
320
+ }>>;
321
+ semanticRole: z.ZodOptional<z.ZodString>;
322
+ }, z.core.$strip>;
323
+ /**
324
+ * Represents a named guard condition.
325
+ * Expression must be an S-expression.
326
+ *
327
+ * @example
328
+ * {
329
+ * name: "hasHealth",
330
+ * expression: [">", "@entity.health", 0],
331
+ * description: "Check if entity has health remaining"
332
+ * }
333
+ */
334
+ type Guard = {
335
+ name: string;
336
+ /** Guard expression - S-expression array only */
337
+ expression: Expression;
338
+ description?: string;
339
+ };
340
+ declare const GuardSchema: z.ZodObject<{
341
+ name: z.ZodString;
342
+ expression: z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>;
343
+ description: z.ZodOptional<z.ZodString>;
344
+ }, z.core.$strip>;
345
+ /**
346
+ * Represents a transition between states.
347
+ * Guards and effects must be S-expressions.
348
+ *
349
+ * @example
350
+ * {
351
+ * from: "idle",
352
+ * to: "running",
353
+ * event: "START",
354
+ * guard: [">", "@entity.fuel", 0],
355
+ * effects: [
356
+ * ["set", "@entity.status", "running"],
357
+ * ["emit", "ENGINE_STARTED"]
358
+ * ]
359
+ * }
360
+ */
361
+ type Transition = {
362
+ /** Source state name */
363
+ from: string;
364
+ /** Target state name */
365
+ to: string;
366
+ /** Event key that triggers this transition */
367
+ event: string;
368
+ /** V4 dual-carry id sibling of `event` — optional until the Phase-7 flip. */
369
+ eventId?: EventId;
370
+ /** Guard expression - S-expression array */
371
+ guard?: Expression | null;
372
+ /** Effects to execute - S-expression arrays */
373
+ effects?: Effect[];
374
+ /** `@ensures <expr>`: the outcome contract owed at this transition (`@fromEntity` is the row before it); proved by `orb validate`, judged by `orb verify`. No runtime effect. */
375
+ ensures?: SExpr[];
376
+ /** Description */
377
+ description?: string | null;
378
+ /**
379
+ * Predicted renders this transition's server effects lead to, used to draw
380
+ * awaiting-server skeletons. Computed by orbital-compiler (enrich) in the
381
+ * resolved schema only — never authored, never persisted in a registry `.orb`.
382
+ */
383
+ awaitRender?: AwaitRender[];
384
+ };
385
+ declare const TransitionSchema: z.ZodObject<{
386
+ from: z.ZodString;
387
+ to: z.ZodString;
388
+ event: z.ZodString;
389
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
390
+ guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
391
+ effects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
392
+ ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
393
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
394
+ awaitRender: z.ZodOptional<z.ZodArray<z.ZodObject<{
395
+ trait: z.ZodString;
396
+ slot: z.ZodString;
397
+ skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
398
+ }, z.core.$strip>>>;
399
+ }, z.core.$strip>;
400
+ /**
401
+ * Complete state machine definition
402
+ */
403
+ type StateMachine = {
404
+ /** All states in the machine */
405
+ states: State[];
406
+ /** All events that can be triggered */
407
+ events: Event[];
408
+ /** All transitions between states */
409
+ transitions: Transition[];
410
+ /** Named guard definitions */
411
+ guards?: Guard[];
412
+ };
413
+ declare const StateMachineSchema: z.ZodObject<{
414
+ states: z.ZodArray<z.ZodObject<{
415
+ name: z.ZodString;
416
+ isInitial: z.ZodOptional<z.ZodBoolean>;
417
+ isTerminal: z.ZodOptional<z.ZodBoolean>;
418
+ isFinal: z.ZodOptional<z.ZodBoolean>;
419
+ description: z.ZodOptional<z.ZodString>;
420
+ onEntry: z.ZodOptional<z.ZodArray<z.ZodString>>;
421
+ onExit: z.ZodOptional<z.ZodArray<z.ZodString>>;
422
+ holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
423
+ }, z.core.$strip>>;
424
+ events: z.ZodArray<z.ZodObject<{
425
+ key: z.ZodString;
426
+ id: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
427
+ name: z.ZodString;
428
+ description: z.ZodOptional<z.ZodString>;
429
+ synonyms: z.ZodOptional<z.ZodString>;
430
+ tier: z.ZodOptional<z.ZodString>;
431
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
432
+ payloadEntity: z.ZodOptional<z.ZodString>;
433
+ input: z.ZodOptional<z.ZodBoolean>;
434
+ listened: z.ZodOptional<z.ZodBoolean>;
435
+ inbound: z.ZodOptional<z.ZodObject<{
436
+ name: z.ZodString;
437
+ answers: z.ZodString;
438
+ verifies: z.ZodOptional<z.ZodObject<{
439
+ header: z.ZodString;
440
+ credential: z.ZodString;
441
+ }, z.core.$strip>>;
442
+ }, z.core.$strip>>;
443
+ classification: z.ZodOptional<z.ZodEnum<{
444
+ domain: "domain";
445
+ system: "system";
446
+ }>>;
447
+ semanticRole: z.ZodOptional<z.ZodString>;
448
+ }, z.core.$strip>>;
449
+ transitions: z.ZodArray<z.ZodObject<{
450
+ from: z.ZodString;
451
+ to: z.ZodString;
452
+ event: z.ZodString;
453
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
454
+ guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
455
+ effects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
456
+ ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
457
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
458
+ awaitRender: z.ZodOptional<z.ZodArray<z.ZodObject<{
459
+ trait: z.ZodString;
460
+ slot: z.ZodString;
461
+ skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
462
+ }, z.core.$strip>>>;
463
+ }, z.core.$strip>>;
464
+ guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
465
+ name: z.ZodString;
466
+ expression: z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>;
467
+ description: z.ZodOptional<z.ZodString>;
468
+ }, z.core.$strip>>>;
469
+ }, z.core.$strip>;
470
+ type StateInput = z.input<typeof StateSchema>;
471
+ type EventInput = z.input<typeof EventSchema>;
472
+ type GuardInput = z.input<typeof GuardSchema>;
473
+ type TransitionInput = z.input<typeof TransitionSchema>;
474
+ type StateMachineInput = z.input<typeof StateMachineSchema>;
475
+ /**
476
+ * Check if an event is a circuit event (not internal/system event).
477
+ * Circuit events are user-defined events that participate in the closed circuit pattern.
478
+ * Internal/system events start with underscore (e.g., _INIT, _TICK, _TIMER).
479
+ *
480
+ * @param {string} event - Event name to check
481
+ * @returns {boolean} true if event is a circuit event (doesn't start with underscore)
482
+ *
483
+ * @example
484
+ * isCircuitEvent('CREATE') // true
485
+ * isCircuitEvent('SAVE') // true
486
+ * isCircuitEvent('_INIT') // false (internal)
487
+ * isCircuitEvent('_TICK') // false (internal)
488
+ */
489
+ declare function isCircuitEvent(event: string): boolean;
490
+
491
+ /**
492
+ * A single value in a trait's call-site `config: { ... }` block. Supports
493
+ * scalars (string, number, boolean, null), arrays (e.g. `fields: ["name",
494
+ * "description"]`), and nested objects. This is the authoring surface for
495
+ * molecules to parameterize imported atoms: the atom's render-ui reads back
496
+ * via `@config.<key>` bindings.
497
+ */
498
+ type TraitConfigValue = string | number | boolean | null | ReadonlyArray<TraitConfigValue> | TraitConfigObject;
499
+ type TraitConfigObject = {
500
+ readonly [key: string]: TraitConfigValue;
501
+ };
502
+ type TraitConfig = TraitConfigObject;
503
+ /** Zod schema for TraitConfig. Recursive via z.lazy to allow nested structures. */
504
+ declare const TraitConfigValueSchema: z.ZodType<TraitConfigValue>;
505
+ declare const TraitConfigSchema: z.ZodType<TraitConfig>;
506
+ /**
507
+ * A single entry in a call-site `config { }` override block. Either a plain
508
+ * wiring value (`TraitConfigValue` — string, number, bool, array, object) or
509
+ * a fully-annotated re-declaration (`ConfigFieldDeclaration` — carries `type`,
510
+ * optional `label`/`description`/`synonyms`/`tier`). Disambiguated at runtime
511
+ * by `isCallSiteConfigDeclaration`: the presence of a `"type"` string key
512
+ * marks the annotated form.
513
+ *
514
+ * The `.orb` compiler emits plain values for wiring entries and
515
+ * `{ type, default, ... }` objects for annotated entries. Consumers that only
516
+ * need the value (e.g. `apply-params-to-orb.ts`) read `entry` directly for
517
+ * primitives or `entry.default` for the declaration form.
518
+ */
519
+ type CallSiteConfigEntry = TraitConfigValue | ConfigFieldDeclaration;
520
+ /** Typed map of call-site config entries (one per knob). */
521
+ type CallSiteConfig = Readonly<Record<string, CallSiteConfigEntry>>;
522
+ /**
523
+ * Type guard: returns `true` when `entry` is an annotated `ConfigFieldDeclaration`
524
+ * (a config-field SCHEMA: a `"type"` string key AND a `"default"` value slot)
525
+ * rather than a plain wiring value or a render value object.
526
+ *
527
+ * The `"default"` requirement disambiguates a declaration from a `render-ui`
528
+ * VALUE object (e.g. `{ type: "tabs", items: "@entity.items", ... }`) that
529
+ * coincidentally carries a UI-component `type` key — such a value has no
530
+ * `default` slot and is a `TraitConfigValue`, not a schema declaration. Every
531
+ * annotated config field lowered from `.lolo` carries a `default`; misreading a
532
+ * render value as a declaration drops it straight into the `config` map where
533
+ * Rust's `serde` rejects its inner fields (e.g. `items` is a binding string,
534
+ * not a `FieldDefinition`).
535
+ */
536
+ declare function isCallSiteConfigDeclaration(entry: CallSiteConfigEntry): entry is ConfigFieldDeclaration;
537
+ /**
538
+ * Whether a call-site config entry RE-DECLARES its knob (legal for a knob the trait does not
539
+ * declare) rather than setting a value. Twin of orbital-core `ConfigField::is_declaration_form`:
540
+ * a value wrapped as `{ type: 'unknown', default }` (what `mergeCallSiteConfigOverrides` builds)
541
+ * is a value; a typed declaration, or one carrying `label`/`description`/`synonyms`/`tier`, is not.
542
+ */
543
+ declare function isConfigRedeclaration(entry: CallSiteConfigEntry): boolean;
544
+ /**
545
+ * Type guard: `entry` is a declared config-field SCHEMA — a string `type` plus
546
+ * EITHER a `default` slot OR declaration metadata (`label`/`description`/
547
+ * `tier`/`synonyms`/`values`). Broader than `isCallSiteConfigDeclaration`,
548
+ * which requires a `default`: a field declared with no default (e.g.
549
+ * `leftIcon : icon` → `{ type: "icon", label, description, tier }`) is still a
550
+ * schema, and its runtime VALUE is its (absent → `undefined`) default, NOT the
551
+ * schema object itself. A render-value object that coincidentally has a `type`
552
+ * key (e.g. `{ type: "tabs", items: … }`) carries none of these metadata keys
553
+ * and is therefore left untouched as a plain value.
554
+ */
555
+ declare function isConfigFieldSchema(entry: CallSiteConfigEntry): entry is ConfigFieldDeclaration;
556
+ /**
557
+ * Convert a call-site config map into plain runtime values.
558
+ *
559
+ * A `CallSiteConfig` may contain either plain wiring values
560
+ * (`TraitConfigValue`) or annotated `ConfigFieldDeclaration` objects
561
+ * (`{ type, default, label, ... }`). Both the JS interpreter
562
+ * (`@almadar/runtime`) and the render substrate (`@almadar/ui`) need this
563
+ * extraction, so it lives here — the most-upstream package they share —
564
+ * rather than being duplicated in each.
565
+ *
566
+ * A declared field with no `default` yields no value (dropped), as the
567
+ * kernel reads it. Leaking such a schema object through as a
568
+ * value made `@config.leftIcon` resolve to `{ type: "icon", … }`, which the
569
+ * render substrate then mounted as an element and passed to `Input`'s icon
570
+ * slot → "Element type is invalid: got <SlotContentRenderer />".
571
+ */
572
+ declare function normalizeCallSiteConfigToValues(config: CallSiteConfig | undefined): TraitConfig | undefined;
573
+ /**
574
+ * Merge call-site config overrides onto a base `CallSiteConfig`. Every entry
575
+ * in the result is a `ConfigField` (Rust's `HashMap<String, ConfigField>`):
576
+ * bare values — base AND override — are wrapped as `{ type: 'unknown', default }`
577
+ * when not already a declaration. Override folds into an existing declaration's
578
+ * `default` field.
579
+ */
580
+ declare function mergeCallSiteConfigOverrides(base: CallSiteConfig, overrides: CallSiteConfig): Record<string, ConfigFieldDeclaration>;
581
+ /**
582
+ * Per-field entry in a trait's DECLARED `config { }` schema as it lives
583
+ * on the `.orb` JSON: `{ type: "string" | "[string]" | "object" | ...,
584
+ * default?: <value> }`. Distinct from `TraitConfigValue` (which is the
585
+ * resolved runtime value). The runtime reads `default` to seed the
586
+ * `@config.X` binding context when no call-site override is supplied.
587
+ *
588
+ * Authored as `config { foo : string = "bar" }` in `.lolo`; lowered to
589
+ * `{ foo: { type: "string", default: "bar" } }` in `.orb`. The optional
590
+ * metadata fields below (`label`/`description`/`tier`/`values`/`synonyms`)
591
+ * carry the `.lolo` `@label`/`@description`/`@tier`/`@synonyms` annotations and
592
+ * the enum member list through lowering — consumed by config-driven UI
593
+ * (e.g. the playground property inspector) to render typed controls.
594
+ */
595
+ /**
596
+ * The reference config-field types (V4-W5). A config knob typed `entity`,
597
+ * `trait`, or `event` holds a REFERENCE (an entity/trait/event name), not a
598
+ * plain value — so the stamp records the referenced node's id on the field
599
+ * (`ConfigFieldDeclaration.refId`) and both execution paths resolve the value to
600
+ * the node's CURRENT name by id, exactly like `entityRefIds`/`traitEmbedIds`.
601
+ * This is the deterministic, source-tagged contract that lets a declaration-only
602
+ * rename flow through a config value without any name-scanning heuristic.
603
+ */
604
+ declare const REFERENCE_CONFIG_TYPES: readonly ["entity", "trait", "event"];
605
+ type ReferenceConfigType = (typeof REFERENCE_CONFIG_TYPES)[number];
606
+ /** True when a config field's `type` marks its value as an entity/trait/event reference. */
607
+ declare function isReferenceConfigType(type: string): type is ReferenceConfigType;
608
+ /**
609
+ * The secret config-field types. A config knob typed `secret` holds a
610
+ * credential REFERENCE (an env-var key name for `resolveCredentialRef`) —
611
+ * and, as defense-in-depth against a host wrongly inlining material, its
612
+ * VALUE must never flow into spec.json, traces, plan snapshots, or factory
613
+ * bakes in cleartext: consumers mask it (see `maskSecretConfigValues`) and
614
+ * UI password-renders the knob. `.lolo` accepts `: secret` as a config-field
615
+ * type (I-29, 2026-08-23 — previously the parser silently read it as a
616
+ * meaningless named type); this contract is the single deterministic source
617
+ * downstream consumers (studio, verifiers, rabit bakes) key on.
618
+ */
619
+ declare const SECRET_CONFIG_TYPES: readonly ["secret"];
620
+ type SecretConfigType = (typeof SECRET_CONFIG_TYPES)[number];
621
+ /** True when a config field's `type` marks its value as a credential to be masked. */
622
+ declare function isSecretConfigType(type: string): type is SecretConfigType;
623
+ /**
624
+ * Return `values` with every `secret`-declared field's string value masked to
625
+ * its last 4 characters (shorter values fully masked). Non-secret fields and
626
+ * non-string values pass through untouched. Use before echoing call-site
627
+ * config into traces, spec snapshots, or logs.
628
+ */
629
+ declare function maskSecretConfigValues(config: DeclaredTraitConfig, values: TraitConfig): TraitConfig;
630
+ /**
631
+ * Fold an override value map onto a `DeclaredTraitConfig`'s per-knob
632
+ * `default`, mirroring the compiler's `ORB_O_CONFIG_UNKNOWN_KEY` check.
633
+ * Single owner for the factory-runtime overlay (`applyParamsToOrb` folding
634
+ * `OrbitalFactoryParams.config`) and the runtime's `OrbitalRefObject.config`
635
+ * fold (`reference-resolver.ts`) — same operation, two call sites.
636
+ *
637
+ * Throws when `overrides` names a key `declared` does not declare. Callers
638
+ * validate the override keys against the manifest / upstream config first
639
+ * (`validateOrbitalFactoryParams`, the resolver's own pre-check), so this is
640
+ * a should-never-happen guard, not a user-facing error path.
641
+ */
642
+ declare function overrideDeclaredKnobs(declared: DeclaredTraitConfig, overrides: Readonly<Record<string, TraitConfigValue>>): DeclaredTraitConfig;
643
+ type ConfigFieldDeclaration = {
644
+ readonly nullable?: boolean;
645
+ readonly additionalProperties?: EntityField;
646
+ readonly type: string;
647
+ readonly default?: TraitConfigValue;
648
+ /**
649
+ * V4-W5 dual-carry id — set by the stamp when `type` is a reference config
650
+ * type (`entity`/`trait`/`event`): the stable id of the entity/trait/event
651
+ * the field's value names. Readers resolve the value to that node's current
652
+ * name by id (rename-proof); absent for non-reference fields.
653
+ */
654
+ readonly refId?: string;
655
+ /** 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. */
656
+ readonly required?: boolean;
657
+ /** `@label` — human-readable control label. */
658
+ readonly label?: string;
659
+ /** `@description` — help/tooltip text for the field. */
660
+ readonly description?: string;
661
+ /** `@tier` — disclosure tier: `presentation`|`domain`|`policy`|`infra`|`internal`. */
662
+ readonly tier?: string;
663
+ /** Enum members when the field's type is a string union — drives a select control. */
664
+ readonly values?: ReadonlyArray<string>;
665
+ /** `@synonyms` — comma-separated vocabulary synonyms (metadata). */
666
+ readonly synonyms?: string;
667
+ /** Structured per-item schema for array-of-object fields — `edges : [{from: string!, …}]` in `.lolo` lowers to `{ type: "object", properties: {…} }`. */
668
+ readonly items?: ConfigFieldItemsDeclaration;
669
+ /** Structured property schema for object-typed config fields (no items wrapper). */
670
+ readonly properties?: Readonly<Record<string, TraitEntityField>>;
671
+ /**
672
+ * Provenance for a collapsed knob forward. The L2 inline phase (and the
673
+ * runtime resolver) fold a trait's `default: "@config.<knob>"` (or a
674
+ * call-site override of the same shape) down to the resolved value, so
675
+ * the resolved schema no longer carries the literal `@config.<knob>`
676
+ * token anywhere. `forwardedFrom` records that token — the original
677
+ * app/orbital-level knob name this field's value came from — so a
678
+ * dead-knob check (`ORB_O_CONFIG_DEAD_KNOB` / `orbital-config-knob-unforwarded`)
679
+ * can still recognize the knob as forwarded on an already-resolved
680
+ * schema. Absent when the field's `default`/value was authored directly
681
+ * (not a forward), or on an unresolved schema where the `@config.<knob>`
682
+ * token itself is still present.
683
+ */
684
+ readonly forwardedFrom?: string;
685
+ /**
686
+ * The `@config.<knob>` tokens nested INSIDE this field's value (an array
687
+ * element or object member, e.g. `metrics[].target`) that the resolver
688
+ * folded to their values — the list twin of `forwardedFrom`, so the
689
+ * dead-knob check still sees those knobs as read. Absent when nothing
690
+ * nested resolved. Compiled-path wire key `nestedForwardedFrom`.
691
+ */
692
+ readonly nestedForwardedFrom?: ReadonlyArray<string>;
693
+ /**
694
+ * The definer knob this field is the payload companion of, when its
695
+ * declared type was `@payload(<knob>)`: the L2 sigil pass rewrites the
696
+ * sentinel to the resolved payload type and records the knob here, the
697
+ * same way `forwardedFrom` keeps a provenance the resolved `default` /
698
+ * `type` can no longer show. Absent for any field that was never a
699
+ * `@payload(<knob>)` sentinel. Compiled-path wire key `payloadFor`.
700
+ */
701
+ readonly payloadFor?: string;
702
+ /** `.lolo` `T.f`: the declared field this knob's type was projected from. */
703
+ readonly projectedFrom?: FieldProjection;
704
+ /** `field R T`: the record `R` as a type string (`@entity`, `@payload(knob)`, an entity or alias name, `$r`). */
705
+ readonly record?: string;
706
+ /** A call-site entry that wires a value into a knob the trait declares; `type` then carries the SOURCE knob's type (`unknown` for a literal). */
707
+ readonly wired?: boolean;
708
+ };
709
+ type ConfigFieldItemsDeclaration = {
710
+ readonly nullable?: boolean;
711
+ readonly additionalProperties?: EntityField;
712
+ readonly type?: string;
713
+ /** Absent for arrays of scalars (`items: { type: "string" }`). */
714
+ readonly properties?: Readonly<Record<string, TraitEntityField>>;
715
+ /** Nested per-item schema for arrays of arrays (recursive). */
716
+ readonly items?: ConfigFieldItemsDeclaration;
717
+ /** Union member names when the item type is a union — including a by-name recursive back-reference. */
718
+ readonly values?: ReadonlyArray<string>;
719
+ };
720
+ declare const ConfigFieldDeclarationSchema: z.ZodType<ConfigFieldDeclaration, object>;
721
+ /**
722
+ * Map of declared config fields keyed by name. Lives on `Trait.config`
723
+ * for atoms/molecules that expose typed configuration to consumers.
724
+ */
725
+ type DeclaredTraitConfig = Readonly<Record<string, ConfigFieldDeclaration>>;
726
+ declare const DeclaredTraitConfigSchema: z.ZodType<DeclaredTraitConfig, Record<string, object>>;
727
+ /**
728
+ * Field types for trait data entities
729
+ */
730
+ type TraitFieldType = 'string' | 'number' | 'boolean' | 'date' | 'array' | 'object' | 'timestamp' | 'datetime' | 'instant' | 'enum' | 'email' | 'url' | 'phone' | 'uuid' | 'image' | 'bytes' | 'trait' | 'slot' | 'pattern' | 'node' | 'event' | 'EventAddress' | 'CallKey' | 'SExpr' | 'union' | 'tuple' | 'field' | TypeVariable;
731
+ /**
732
+ * Simplified field for trait data entities
733
+ */
734
+ type TraitEntityField = {
735
+ nullable?: boolean;
736
+ additionalProperties?: EntityField;
737
+ name: string;
738
+ type: TraitFieldType;
739
+ required?: boolean;
740
+ /** Field default parsed from `.orb` — always a JSON-shaped value. */
741
+ default?: TraitConfigValue;
742
+ values?: string[];
743
+ /** Structured per-item schema for array-of-object fields (recursive). */
744
+ items?: ConfigFieldItemsDeclaration;
745
+ /** Structured property schema for object-typed entity fields. */
746
+ properties?: Readonly<Record<string, TraitEntityField>>;
747
+ /** `@payload(.<sibling>)`: an `object` with no `properties` is the declared payload of the event its sibling member names. */
748
+ record?: string;
749
+ };
750
+ declare const TraitEntityFieldSchema: z.ZodType<TraitEntityField, object>;
751
+ /**
752
+ * Simplified data entity for traits
753
+ */
754
+ type TraitDataEntity = {
755
+ name: string;
756
+ collection?: string;
757
+ fields: TraitEntityField[];
758
+ timestamps?: boolean;
759
+ description?: string;
760
+ runtime?: boolean;
761
+ singleton?: boolean;
762
+ pages?: string[];
763
+ };
764
+ declare const TraitDataEntitySchema: z.ZodObject<{
765
+ name: z.ZodString;
766
+ collection: z.ZodOptional<z.ZodString>;
767
+ fields: z.ZodArray<z.ZodType<TraitEntityField, object, z.core.$ZodTypeInternals<TraitEntityField, object>>>;
768
+ timestamps: z.ZodOptional<z.ZodBoolean>;
769
+ description: z.ZodOptional<z.ZodString>;
770
+ runtime: z.ZodOptional<z.ZodBoolean>;
771
+ singleton: z.ZodOptional<z.ZodBoolean>;
772
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
773
+ }, z.core.$strip>;
774
+ /**
775
+ * Tick rule for traits.
776
+ * Guards can be legacy strings or S-expressions.
777
+ * Effects can be typed Effect objects or S-expressions.
778
+ */
779
+ type TraitTick = {
780
+ name: string;
781
+ description?: string;
782
+ priority?: number;
783
+ interval: string | number;
784
+ appliesTo?: string[];
785
+ /** `[background]`: runs with no client mounted; otherwise paused while no client has the trait mounted. */
786
+ runsInBackground?: boolean;
787
+ /** `[visible]`: a browser tick that pauses while its trait's rendered output is off screen. */
788
+ whileVisible?: boolean;
789
+ pages?: string[];
790
+ /** V4 dual-carry id sibling of `pages` — optional until the Phase-7 flip. */
791
+ pageIds?: PageId[];
792
+ /** Guard expression - string (legacy) or S-expression array */
793
+ guard?: Expression;
794
+ /** Effects to execute (S-expressions) */
795
+ effects: Effect[];
796
+ /**
797
+ * Events this tick emits.
798
+ * Must reference events defined in trait's emits array.
799
+ * Used for validation and documentation.
800
+ */
801
+ emits?: string[];
802
+ /** V4 dual-carry id sibling of `emits` — optional until the Phase-7 flip. */
803
+ emitIds?: EventId[];
804
+ };
805
+ /**
806
+ * A tick's cadence: `"frame"`, a positive number of milliseconds, a duration
807
+ * string, or a cron expression.
808
+ *
809
+ * This schema previously accepted only `"frame"` or a number, while `TraitTick`
810
+ * declared `string | number` and the kernel's tick clock already parsed durations and cron
811
+ * (`TickClock` → `cron::parse_cron`).
812
+ * The gate therefore rejected every cron/duration tick before its runtime could
813
+ * run it — `std-data-erasure`'s hourly `executionScan` made the whole orbital
814
+ * unloadable in the interpreter with only `traits.N: Invalid input` to go on.
815
+ */
816
+ declare const TickIntervalSchema: z.ZodUnion<readonly [z.ZodLiteral<"frame">, z.ZodNumber, z.ZodString]>;
817
+ declare const TraitTickSchema: z.ZodObject<{
818
+ name: z.ZodString;
819
+ description: z.ZodOptional<z.ZodString>;
820
+ priority: z.ZodOptional<z.ZodNumber>;
821
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"frame">, z.ZodNumber, z.ZodString]>;
822
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
823
+ runsInBackground: z.ZodOptional<z.ZodBoolean>;
824
+ whileVisible: z.ZodOptional<z.ZodBoolean>;
825
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
826
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<PageId, string, z.core.$ZodTypeInternals<PageId, string>>>>;
827
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
828
+ effects: z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>;
829
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
830
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
831
+ }, z.core.$strip>;
832
+ /**
833
+ * Event scope determines visibility:
834
+ * - 'internal': Trait-to-trait within same orbital (default)
835
+ * - 'external': Exposed for cross-orbital communication
836
+ */
837
+ type EventScope = 'internal' | 'external';
838
+ declare const EventScopeSchema: z.ZodEnum<{
839
+ external: "external";
840
+ internal: "internal";
841
+ }>;
842
+ /**
843
+ * Payload field definition for events: the one {@link PayloadField} (Rust `PayloadField`),
844
+ * re-exported under the event-contract name.
845
+ */
846
+ type EventPayloadField = PayloadField;
847
+ declare const EventPayloadFieldSchema: z.ZodType<EventPayloadField>;
848
+ /**
849
+ * Event contract for events a trait emits.
850
+ * Declares the event name, scope, and payload schema.
851
+ */
852
+ type TraitEventContract = {
853
+ /** Event name (UPPER_SNAKE_CASE) */
854
+ event: string;
855
+ /** V4 dual-carry id sibling of `event` — optional until the Phase-7 flip. */
856
+ eventId?: EventId;
857
+ /** Human-readable description */
858
+ description?: string;
859
+ /** User-vocabulary synonyms (comma-separated) — the per-event analogue of a
860
+ * field/config `@synonyms`. Feeds the curation event matcher. */
861
+ synonyms?: string;
862
+ /** Authoring tier (`essential`/`customization`/`advanced`/`internal`). */
863
+ tier?: string;
864
+ /**
865
+ * The config knob whose value DEFINES this event's name, when the emit was
866
+ * authored as `emits { @config.<knob> }`. Captured at L1, where the
867
+ * `@config.X` spelling still exists — after inlining, `event` holds the
868
+ * resolved literal and the fact that it came from a knob is otherwise
869
+ * unrecoverable.
870
+ *
871
+ * A definer knob CREATES an event name rather than referencing one, which
872
+ * is why consumers must not pin such a knob to the trait's existing event
873
+ * vocabulary: doing so forbids the very name it exists to introduce.
874
+ */
875
+ definerKnob?: string;
876
+ /**
877
+ * `true` when `scope` was set by a CALL-SITE `emitsScope` override (the
878
+ * inline phase applies it), not by the source atom's own `-> external`
879
+ * declaration. An atom declaring its emits external is an unexamined
880
+ * default (nearly every atom does), while a composition restating it is
881
+ * the consumer's own deferral — the dead-control check honours it as an
882
+ * exemption. See ORB-X-EXTERNAL-EMIT-EXEMPTION.
883
+ */
884
+ scopeOverridden?: boolean;
885
+ /** Payload schema — declarative type info for the event's payload.
886
+ * Distinct from the runtime payload value (`@payload.X` bindings,
887
+ * `EventPayload`) which is a separate concept. */
888
+ payloadSchema?: EventPayloadField[];
889
+ /**
890
+ * Same marker as `Event.payloadEntity` (`state-machine.ts`) — this
891
+ * emit's payload was declared `type X = Event <EntityName>` and is a
892
+ * flat mirror of that entity's fields. See that field's doc for the
893
+ * full contract (G4, `Almadar_Compiler_Gaps.md` §82).
894
+ */
895
+ payloadEntity?: string;
896
+ /**
897
+ * Event scope:
898
+ * - 'internal': Trait-to-trait within same orbital (default)
899
+ * - 'external': Exposed for cross-orbital communication
900
+ */
901
+ scope?: EventScope;
902
+ };
903
+ /**
904
+ * `@config.<knob>` is the only legal reference form for an emit/listen
905
+ * event name (Option B — the declared event name resolves to a
906
+ * `string`- or `event`-typed config knob's value at inline/resolve time).
907
+ * Matches the Rust lexer's dotted-sigil body (`config.<ident>`, no further
908
+ * dots).
909
+ */
910
+ declare const CONFIG_REF_EVENT_PATTERN: RegExp;
911
+ /** Returns the knob identifier when `event` is a `@config.<knob>` reference, else `undefined`. */
912
+ declare function configRefEventKnob(event: string): string | undefined;
913
+ /** Why a `@config.<knob>` emit/listen event-name reference failed to resolve. */
914
+ type ConfigRefEventError = 'unknown-knob' | 'not-string' | 'no-default';
915
+ /**
916
+ * Resolve a `@config.<knob>` emit/listen event-name reference to its
917
+ * concrete literal, given the trait's declared config schema and the
918
+ * effective config value map (call-site override folded over declared
919
+ * default — same precedence the Rust inline phase's `effective_config`
920
+ * uses). The single JS-side owner of this resolution rule; mirrors
921
+ * `resolve_config_ref_event_name` in `orbital-core::schema` (Rust).
922
+ * Returns the resolved literal, or the specific contract clause that failed.
923
+ */
924
+ declare function resolveConfigRefEventName(event: string, declaredConfig: DeclaredTraitConfig | undefined, effectiveConfig: Readonly<Record<string, TraitConfigValue>>): {
925
+ readonly ok: true;
926
+ readonly value: string;
927
+ } | {
928
+ readonly ok: false;
929
+ readonly error: ConfigRefEventError;
930
+ };
931
+ declare const TraitEventContractSchema: z.ZodObject<{
932
+ event: z.ZodString;
933
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
934
+ description: z.ZodOptional<z.ZodString>;
935
+ synonyms: z.ZodOptional<z.ZodString>;
936
+ tier: z.ZodOptional<z.ZodString>;
937
+ definerKnob: z.ZodOptional<z.ZodString>;
938
+ scopeOverridden: z.ZodOptional<z.ZodBoolean>;
939
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
940
+ payloadEntity: z.ZodOptional<z.ZodString>;
941
+ scope: z.ZodOptional<z.ZodEnum<{
942
+ external: "external";
943
+ internal: "internal";
944
+ }>>;
945
+ }, z.core.$strip>;
946
+ /**
947
+ * Event listener for trait communication.
948
+ * Guards can be legacy strings or S-expressions.
949
+ * Enhanced with scope and payloadMapping for cross-orbital communication.
950
+ */
951
+ /**
952
+ * Source-scoping for a `listens {}` entry. Determines which emitters the
953
+ * listener responds to.
954
+ *
955
+ * - `{ kind: "any" }`: wildcard (`* EVENT -> TRIGGER`). Any trait, any orbital.
956
+ * - `{ kind: "trait", trait: "X" }`: intra-orbital (`X EVENT -> TRIGGER`).
957
+ * Only emits from the same orbital's trait `X`.
958
+ * - `{ kind: "orbital", orbital: "O", trait: "X" }`: cross-orbital
959
+ * (`O.X EVENT -> TRIGGER`). Only emits from orbital `O`'s trait `X`.
960
+ *
961
+ * Absent (undefined) means the listener is a local payload-declaration only
962
+ * — pure type metadata, no bus subscription.
963
+ */
964
+ type ListenSource = {
965
+ kind: 'any';
966
+ } | {
967
+ kind: 'trait';
968
+ trait: string;
969
+ /** V4 dual-carry id sibling of `trait` — optional until the Phase-7 flip. */
970
+ traitId?: TraitId;
971
+ } | {
972
+ kind: 'orbital';
973
+ orbital: string;
974
+ trait: string;
975
+ /** V4 dual-carry id sibling of `orbital` — optional until the Phase-7 flip. */
976
+ orbitalId?: OrbitalId;
977
+ /** V4 dual-carry id sibling of `trait` — optional until the Phase-7 flip. */
978
+ traitId?: TraitId;
979
+ };
980
+ declare const ListenSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
981
+ kind: z.ZodLiteral<"any">;
982
+ }, z.core.$strip>, z.ZodObject<{
983
+ kind: z.ZodLiteral<"trait">;
984
+ trait: z.ZodString;
985
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
986
+ }, z.core.$strip>, z.ZodObject<{
987
+ kind: z.ZodLiteral<"orbital">;
988
+ orbital: z.ZodString;
989
+ trait: z.ZodString;
990
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
991
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
992
+ }, z.core.$strip>]>;
993
+ /**
994
+ * Split a `listens`-addressed event (`EVENT`, `Trait.EVENT`, `*.EVENT`,
995
+ * `Orbital.Trait.EVENT`) into the bare event and its source. The one parser of
996
+ * the address form, shared by `listens` and event-typed values. Mirrors
997
+ * `orbital-core` `split_event_address`.
998
+ */
999
+ declare function splitEventAddress(raw: string): {
1000
+ event: string;
1001
+ source?: ListenSource;
1002
+ };
1003
+ /** Inverse of {@link splitEventAddress}. */
1004
+ declare function joinEventAddress(event: string, source?: ListenSource): string;
1005
+ type TraitEventListener = {
1006
+ /** Event key to listen for (bare event name, no source prefix in the new shape) */
1007
+ event: string;
1008
+ /** V4 dual-carry id sibling of `event` — optional until the Phase-7 flip. */
1009
+ eventId?: EventId;
1010
+ /** State machine event to trigger */
1011
+ triggers: string;
1012
+ /** V4 dual-carry id sibling of `triggers` — optional until the Phase-7 flip. */
1013
+ triggersId?: EventId;
1014
+ /** Human-readable description (authored `@description` on the listen). */
1015
+ description?: string;
1016
+ /** User-vocabulary synonyms (comma-separated). */
1017
+ synonyms?: string;
1018
+ /** Authoring tier (`essential`/`customization`/`advanced`/`internal`). */
1019
+ tier?: string;
1020
+ /** Guard expression - string (legacy) or S-expression array */
1021
+ guard?: Expression;
1022
+ /**
1023
+ * Listener scope:
1024
+ * - 'internal': Listen to events within same orbital (default)
1025
+ * - 'external': Listen to events from other orbitals
1026
+ */
1027
+ scope?: EventScope;
1028
+ /**
1029
+ * `with { ... }` payload rewrite: `{ targetField: SExpr }`. Each value is a
1030
+ * full s-expression evaluated against the source payload — a `@payload.<field>`
1031
+ * read, a literal, or an operator list. The kernel applies it
1032
+ * (`applyListenMapping` crosses into it).
1033
+ */
1034
+ payloadMapping?: Record<string, SExpr>;
1035
+ /**
1036
+ * `per <expr>`: the row of the listening entity this delivery steps, an s-expression over the source payload that
1037
+ * must evaluate to a non-empty string. The kernel evaluates it and creates the row on first use.
1038
+ */
1039
+ key?: SExpr;
1040
+ /**
1041
+ * Source scoping (see `ListenSource`). Undefined when the listen entry is
1042
+ * a local payload declaration rather than a bus subscription.
1043
+ */
1044
+ source?: ListenSource;
1045
+ };
1046
+ declare const TraitEventListenerSchema: z.ZodObject<{
1047
+ event: z.ZodString;
1048
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1049
+ triggers: z.ZodString;
1050
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1051
+ description: z.ZodOptional<z.ZodString>;
1052
+ synonyms: z.ZodOptional<z.ZodString>;
1053
+ tier: z.ZodOptional<z.ZodString>;
1054
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1055
+ scope: z.ZodOptional<z.ZodEnum<{
1056
+ external: "external";
1057
+ internal: "internal";
1058
+ }>>;
1059
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1060
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1061
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1062
+ kind: z.ZodLiteral<"any">;
1063
+ }, z.core.$strip>, z.ZodObject<{
1064
+ kind: z.ZodLiteral<"trait">;
1065
+ trait: z.ZodString;
1066
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1067
+ }, z.core.$strip>, z.ZodObject<{
1068
+ kind: z.ZodLiteral<"orbital">;
1069
+ orbital: z.ZodString;
1070
+ trait: z.ZodString;
1071
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1072
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1073
+ }, z.core.$strip>]>>;
1074
+ }, z.core.$strip>;
1075
+ /**
1076
+ * Field required by a trait from its linkedEntity
1077
+ */
1078
+ type RequiredField = {
1079
+ name: string;
1080
+ type: TraitFieldType;
1081
+ description?: string;
1082
+ };
1083
+ declare const RequiredFieldSchema: z.ZodObject<{
1084
+ name: z.ZodString;
1085
+ type: z.ZodUnion<readonly [z.ZodEnum<{
1086
+ string: "string";
1087
+ number: "number";
1088
+ boolean: "boolean";
1089
+ object: "object";
1090
+ date: "date";
1091
+ array: "array";
1092
+ tuple: "tuple";
1093
+ union: "union";
1094
+ enum: "enum";
1095
+ pattern: "pattern";
1096
+ trait: "trait";
1097
+ event: "event";
1098
+ node: "node";
1099
+ url: "url";
1100
+ field: "field";
1101
+ timestamp: "timestamp";
1102
+ image: "image";
1103
+ slot: "slot";
1104
+ datetime: "datetime";
1105
+ instant: "instant";
1106
+ email: "email";
1107
+ phone: "phone";
1108
+ uuid: "uuid";
1109
+ bytes: "bytes";
1110
+ EventAddress: "EventAddress";
1111
+ CallKey: "CallKey";
1112
+ SExpr: "SExpr";
1113
+ }>, z.ZodCustom<`$${string}`, `$${string}`>]>;
1114
+ description: z.ZodOptional<z.ZodString>;
1115
+ }, z.core.$strip>;
1116
+ /**
1117
+ * Reference to a trait from an entity or page.
1118
+ *
1119
+ * Phase F treats a trait reference as a function call: `ref` names the
1120
+ * imported trait and the sibling fields are arguments. The compiler's
1121
+ * identifier-substitution pass uses these arguments to rewrite the
1122
+ * inlined trait clone before lowering.
1123
+ */
1124
+ type TraitReference = {
1125
+ ref: string;
1126
+ /** V4 dual-carry id sibling of `ref` — optional until the Phase-7 flip. */
1127
+ refId?: TraitId;
1128
+ /**
1129
+ * V4 LOCAL DECLARATION id — the identity of this trait AS DECLARED in its
1130
+ * orbital (`trait X = Alias.traits.Y` declares node X; `refId` carries
1131
+ * Y's id). Minted by the stamp so page trait refs and `@trait.X` embeds
1132
+ * resolve by id across `name:` renames (the composed-organism surface was
1133
+ * the one declaration class without an id).
1134
+ */
1135
+ id?: TraitId;
1136
+ /**
1137
+ * Phase 1.2: optional registry path disambiguator. Pairs with `ref` to
1138
+ * explicitly name which `uses` entry the alias was imported from
1139
+ * (e.g. "std/behaviors/atoms/std-browse"). Helpful for programmatic
1140
+ * descriptor construction and inline-phase disambiguation when multiple
1141
+ * registries expose the same alias prefix.
1142
+ */
1143
+ from?: string;
1144
+ linkedEntity?: string;
1145
+ /** V4 dual-carry id sibling of `linkedEntity` — optional until the Phase-7 flip. */
1146
+ linkedEntityId?: EntityId;
1147
+ /** Phase F: rename the inlined trait at the call site */
1148
+ name?: string;
1149
+ /** Phase F: rename atom event keys at the call site, e.g. {OPEN: "ADD_ITEM"} */
1150
+ events?: Record<string, string>;
1151
+ /**
1152
+ * 3-II trait type-parameter arguments (`:: p SomeType` in `.lolo`):
1153
+ * declared-param name → type-vocabulary name (an entity, a primitive incl.
1154
+ * `scalar`, or a struct alias from the AUTHORING file's `types` map).
1155
+ * Present on pre-inline registry references only — the inline phase
1156
+ * consumes it while resolving `$<name>` payload sentinels and it never
1157
+ * appears in a final composed `.orb`.
1158
+ */
1159
+ typeArgs?: Record<string, string>;
1160
+ /** Preprocess-output carrier: the fully resolved trait this reference stands
1161
+ * for (`@almadar/runtime` `preprocessSchema` output only; never in a `.orb`). */
1162
+ _resolved?: Trait;
1163
+ /** V4 dual-carry id sibling of `events` (keys = baked event names resolved to ids) — optional until the Phase-7 flip. */
1164
+ eventIds?: Record<string, EventId>;
1165
+ /**
1166
+ * Entity-field remap: rewrite the inlined trait's canonical `@entity.X` /
1167
+ * `@payload.row.X` field references to the consumer entity's field names,
1168
+ * e.g. `{ name: "title", folder: "parentId" }`. Mirrors `events` for
1169
+ * fields. Applied during inline substitution alongside `linkedEntity`.
1170
+ */
1171
+ fields?: Record<string, string>;
1172
+ /**
1173
+ * Call-site config overrides. Each entry is either a plain wiring value
1174
+ * (`TraitConfigValue`) or a fully-annotated re-declaration
1175
+ * (`ConfigFieldDeclaration` with `type`, optional `label`/`description`/
1176
+ * `synonyms`/`tier`). Use `isCallSiteConfigDeclaration` to discriminate.
1177
+ *
1178
+ * Plain wiring (existing callers): `config: { icon: "star", count: 5 }`.
1179
+ * Annotated (new): `config: { icon: { type: "string", default: "star",
1180
+ * label: "Icon", tier: "presentation" } }`.
1181
+ */
1182
+ config?: CallSiteConfig;
1183
+ appliesTo?: string[];
1184
+ /**
1185
+ * Phase F.7: replace the imported trait's `listens` array with the
1186
+ * caller-supplied list. Empty array clears all upstream listens. The
1187
+ * inliner applies this AFTER substitution, overwriting whatever the
1188
+ * upstream declared. Use sparingly: this drops external event wiring.
1189
+ */
1190
+ listens?: TraitEventListener[];
1191
+ /**
1192
+ * Phase F.7: set every emit's `scope` to the caller-supplied value.
1193
+ * `'internal'` confines emits to the orbital's internal bus; `'external'`
1194
+ * broadcasts them. Applied after substitution and listens replacement.
1195
+ */
1196
+ emitsScope?: 'internal' | 'external';
1197
+ /**
1198
+ * Phase F.8: per-transition effects override. The map's keys are event
1199
+ * names (the transition triggers, AFTER any rename via `events`). The
1200
+ * values are the SExpression effect lists that REPLACE the matching
1201
+ * transitions' `effects[]` arrays.
1202
+ *
1203
+ * This is the unified content + effect override mechanism. Whether the
1204
+ * override list contains `["render-ui", ...]` (visual content),
1205
+ * `["fetch", ...]` (data load), `["persist", ...]` (mutation), or any
1206
+ * combination, the inliner just substitutes the whole list. Identifier
1207
+ * substitution (entity refs, event refs) still runs over the merged
1208
+ * trait body, so override effects can use either upstream or caller
1209
+ * identifiers and the F.3 walker will rewrite them consistently.
1210
+ *
1211
+ * Example:
1212
+ * ```json
1213
+ * "effects": {
1214
+ * "ADD_ITEM": [
1215
+ * ["fetch", "CartItem"],
1216
+ * ["render-ui", "main", { ... }]
1217
+ * ],
1218
+ * "SAVE": [
1219
+ * ["persist", "create", "CartItem", "@payload.data"]
1220
+ * ]
1221
+ * }
1222
+ * ```
1223
+ */
1224
+ effects?: Record<string, SExpr[]>;
1225
+ };
1226
+ declare const TraitReferenceSchema: z.ZodObject<{
1227
+ ref: z.ZodString;
1228
+ refId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1229
+ id: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1230
+ from: z.ZodOptional<z.ZodString>;
1231
+ linkedEntity: z.ZodOptional<z.ZodString>;
1232
+ linkedEntityId: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
1233
+ name: z.ZodOptional<z.ZodString>;
1234
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1235
+ eventIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
1236
+ _resolved: z.ZodOptional<z.ZodLazy<z.ZodObject<{
1237
+ id: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1238
+ name: z.ZodString;
1239
+ description: z.ZodOptional<z.ZodString>;
1240
+ description_visual_prompt: z.ZodOptional<z.ZodString>;
1241
+ entityRebindable: z.ZodOptional<z.ZodBoolean>;
1242
+ entityContract: z.ZodOptional<z.ZodObject<{
1243
+ requires: z.ZodArray<z.ZodString>;
1244
+ provides: z.ZodArray<z.ZodString>;
1245
+ }, z.core.$strip>>;
1246
+ effectRow: z.ZodOptional<z.ZodArray<z.ZodObject<{
1247
+ kind: z.ZodString;
1248
+ resource: z.ZodOptional<z.ZodString>;
1249
+ resolved: z.ZodOptional<z.ZodBoolean>;
1250
+ site: z.ZodOptional<z.ZodEnum<{
1251
+ transition: "transition";
1252
+ tick: "tick";
1253
+ }>>;
1254
+ }, z.core.$strip>>>;
1255
+ entityBindingDescription: z.ZodOptional<z.ZodString>;
1256
+ entityBindingSynonyms: z.ZodOptional<z.ZodString>;
1257
+ dispatch: z.ZodOptional<z.ZodEnum<{
1258
+ client: "client";
1259
+ optimistic: "optimistic";
1260
+ server: "server";
1261
+ }>>;
1262
+ linkedEntity: z.ZodOptional<z.ZodString>;
1263
+ linkedEntityId: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
1264
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>>;
1265
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>>;
1266
+ requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1267
+ name: z.ZodString;
1268
+ type: z.ZodUnion<readonly [z.ZodEnum<{
1269
+ string: "string";
1270
+ number: "number";
1271
+ boolean: "boolean";
1272
+ object: "object";
1273
+ date: "date";
1274
+ array: "array";
1275
+ tuple: "tuple";
1276
+ union: "union";
1277
+ enum: "enum";
1278
+ pattern: "pattern";
1279
+ trait: "trait";
1280
+ event: "event";
1281
+ node: "node";
1282
+ url: "url";
1283
+ field: "field";
1284
+ timestamp: "timestamp";
1285
+ image: "image";
1286
+ slot: "slot";
1287
+ datetime: "datetime";
1288
+ instant: "instant";
1289
+ email: "email";
1290
+ phone: "phone";
1291
+ uuid: "uuid";
1292
+ bytes: "bytes";
1293
+ EventAddress: "EventAddress";
1294
+ CallKey: "CallKey";
1295
+ SExpr: "SExpr";
1296
+ }>, z.ZodCustom<`$${string}`, `$${string}`>]>;
1297
+ description: z.ZodOptional<z.ZodString>;
1298
+ }, z.core.$strip>>>;
1299
+ dataEntities: z.ZodOptional<z.ZodArray<z.ZodObject<{
1300
+ name: z.ZodString;
1301
+ collection: z.ZodOptional<z.ZodString>;
1302
+ fields: z.ZodArray<z.ZodType<TraitEntityField, object, z.core.$ZodTypeInternals<TraitEntityField, object>>>;
1303
+ timestamps: z.ZodOptional<z.ZodBoolean>;
1304
+ description: z.ZodOptional<z.ZodString>;
1305
+ runtime: z.ZodOptional<z.ZodBoolean>;
1306
+ singleton: z.ZodOptional<z.ZodBoolean>;
1307
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
1308
+ }, z.core.$strip>>>;
1309
+ stateMachine: z.ZodOptional<z.ZodObject<{
1310
+ states: z.ZodArray<z.ZodObject<{
1311
+ name: z.ZodString;
1312
+ isInitial: z.ZodOptional<z.ZodBoolean>;
1313
+ isTerminal: z.ZodOptional<z.ZodBoolean>;
1314
+ isFinal: z.ZodOptional<z.ZodBoolean>;
1315
+ description: z.ZodOptional<z.ZodString>;
1316
+ onEntry: z.ZodOptional<z.ZodArray<z.ZodString>>;
1317
+ onExit: z.ZodOptional<z.ZodArray<z.ZodString>>;
1318
+ holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1319
+ }, z.core.$strip>>;
1320
+ events: z.ZodArray<z.ZodObject<{
1321
+ key: z.ZodString;
1322
+ id: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1323
+ name: z.ZodString;
1324
+ description: z.ZodOptional<z.ZodString>;
1325
+ synonyms: z.ZodOptional<z.ZodString>;
1326
+ tier: z.ZodOptional<z.ZodString>;
1327
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
1328
+ payloadEntity: z.ZodOptional<z.ZodString>;
1329
+ input: z.ZodOptional<z.ZodBoolean>;
1330
+ listened: z.ZodOptional<z.ZodBoolean>;
1331
+ inbound: z.ZodOptional<z.ZodObject<{
1332
+ name: z.ZodString;
1333
+ answers: z.ZodString;
1334
+ verifies: z.ZodOptional<z.ZodObject<{
1335
+ header: z.ZodString;
1336
+ credential: z.ZodString;
1337
+ }, z.core.$strip>>;
1338
+ }, z.core.$strip>>;
1339
+ classification: z.ZodOptional<z.ZodEnum<{
1340
+ domain: "domain";
1341
+ system: "system";
1342
+ }>>;
1343
+ semanticRole: z.ZodOptional<z.ZodString>;
1344
+ }, z.core.$strip>>;
1345
+ transitions: z.ZodArray<z.ZodObject<{
1346
+ from: z.ZodString;
1347
+ to: z.ZodString;
1348
+ event: z.ZodString;
1349
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1350
+ guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1351
+ effects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
1352
+ ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
1353
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1354
+ awaitRender: z.ZodOptional<z.ZodArray<z.ZodObject<{
1355
+ trait: z.ZodString;
1356
+ slot: z.ZodString;
1357
+ skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
1358
+ }, z.core.$strip>>>;
1359
+ }, z.core.$strip>>;
1360
+ guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
1361
+ name: z.ZodString;
1362
+ expression: z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>;
1363
+ description: z.ZodOptional<z.ZodString>;
1364
+ }, z.core.$strip>>>;
1365
+ }, z.core.$strip>>;
1366
+ initialEffects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
1367
+ ticks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1368
+ name: z.ZodString;
1369
+ description: z.ZodOptional<z.ZodString>;
1370
+ priority: z.ZodOptional<z.ZodNumber>;
1371
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"frame">, z.ZodNumber, z.ZodString]>;
1372
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
1373
+ runsInBackground: z.ZodOptional<z.ZodBoolean>;
1374
+ whileVisible: z.ZodOptional<z.ZodBoolean>;
1375
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
1376
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<PageId, string, z.core.$ZodTypeInternals<PageId, string>>>>;
1377
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1378
+ effects: z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>;
1379
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
1380
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
1381
+ }, z.core.$strip>>>;
1382
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
1383
+ event: z.ZodString;
1384
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1385
+ description: z.ZodOptional<z.ZodString>;
1386
+ synonyms: z.ZodOptional<z.ZodString>;
1387
+ tier: z.ZodOptional<z.ZodString>;
1388
+ definerKnob: z.ZodOptional<z.ZodString>;
1389
+ scopeOverridden: z.ZodOptional<z.ZodBoolean>;
1390
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
1391
+ payloadEntity: z.ZodOptional<z.ZodString>;
1392
+ scope: z.ZodOptional<z.ZodEnum<{
1393
+ external: "external";
1394
+ internal: "internal";
1395
+ }>>;
1396
+ }, z.core.$strip>>>;
1397
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1398
+ event: z.ZodString;
1399
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1400
+ triggers: z.ZodString;
1401
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1402
+ description: z.ZodOptional<z.ZodString>;
1403
+ synonyms: z.ZodOptional<z.ZodString>;
1404
+ tier: z.ZodOptional<z.ZodString>;
1405
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1406
+ scope: z.ZodOptional<z.ZodEnum<{
1407
+ external: "external";
1408
+ internal: "internal";
1409
+ }>>;
1410
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1411
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1412
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1413
+ kind: z.ZodLiteral<"any">;
1414
+ }, z.core.$strip>, z.ZodObject<{
1415
+ kind: z.ZodLiteral<"trait">;
1416
+ trait: z.ZodString;
1417
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1418
+ }, z.core.$strip>, z.ZodObject<{
1419
+ kind: z.ZodLiteral<"orbital">;
1420
+ orbital: z.ZodString;
1421
+ trait: z.ZodString;
1422
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1423
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1424
+ }, z.core.$strip>]>>;
1425
+ }, z.core.$strip>>>;
1426
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1427
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1428
+ presentation: z.ZodEnum<{
1429
+ modal: "modal";
1430
+ drawer: "drawer";
1431
+ "confirm-dialog": "confirm-dialog";
1432
+ popover: "popover";
1433
+ inline: "inline";
1434
+ }>;
1435
+ content: z.ZodUnion<readonly [z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>, z.ZodArray<z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>>]>;
1436
+ props: z.ZodOptional<z.ZodObject<{
1437
+ size: z.ZodOptional<z.ZodEnum<{
1438
+ md: "md";
1439
+ sm: "sm";
1440
+ full: "full";
1441
+ lg: "lg";
1442
+ xl: "xl";
1443
+ }>>;
1444
+ position: z.ZodOptional<z.ZodEnum<{
1445
+ right: "right";
1446
+ center: "center";
1447
+ top: "top";
1448
+ bottom: "bottom";
1449
+ left: "left";
1450
+ }>>;
1451
+ title: z.ZodOptional<z.ZodString>;
1452
+ closable: z.ZodOptional<z.ZodBoolean>;
1453
+ width: z.ZodOptional<z.ZodString>;
1454
+ showProgress: z.ZodOptional<z.ZodBoolean>;
1455
+ step: z.ZodOptional<z.ZodNumber>;
1456
+ totalSteps: z.ZodOptional<z.ZodNumber>;
1457
+ }, z.core.$strip>>;
1458
+ }, z.core.$strip>>>;
1459
+ config: z.ZodOptional<z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>>;
1460
+ sourceBehavior: z.ZodOptional<z.ZodObject<{
1461
+ behavior: z.ZodString;
1462
+ alias: z.ZodString;
1463
+ originalName: z.ZodString;
1464
+ }, z.core.$strip>>;
1465
+ sourceDeclaration: z.ZodOptional<z.ZodObject<{
1466
+ traitId: z.ZodString;
1467
+ fingerprint: z.ZodString;
1468
+ }, z.core.$strip>>;
1469
+ sourceEntityDefinition: z.ZodOptional<z.ZodObject<{
1470
+ name: z.ZodString;
1471
+ id: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
1472
+ persistence: z.ZodDefault<z.ZodEnum<{
1473
+ persistent: "persistent";
1474
+ runtime: "runtime";
1475
+ }>>;
1476
+ shared: z.ZodOptional<z.ZodBoolean>;
1477
+ identity: z.ZodOptional<z.ZodBoolean>;
1478
+ browser: z.ZodOptional<z.ZodBoolean>;
1479
+ store: z.ZodOptional<z.ZodString>;
1480
+ read_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1481
+ create_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1482
+ update_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1483
+ delete_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1484
+ access_waivers: z.ZodOptional<z.ZodObject<{
1485
+ read: z.ZodOptional<z.ZodString>;
1486
+ create: z.ZodOptional<z.ZodString>;
1487
+ update: z.ZodOptional<z.ZodString>;
1488
+ delete: z.ZodOptional<z.ZodString>;
1489
+ }, z.core.$strip>>;
1490
+ invariants: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
1491
+ indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1492
+ fields: z.ZodArray<z.ZodString>;
1493
+ orderBy: z.ZodOptional<z.ZodString>;
1494
+ }, z.core.$strict>>>;
1495
+ collection: z.ZodOptional<z.ZodString>;
1496
+ fields: z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>;
1497
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
1498
+ localeInstances: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>>;
1499
+ timestamps: z.ZodOptional<z.ZodBoolean>;
1500
+ softDelete: z.ZodOptional<z.ZodBoolean>;
1501
+ description: z.ZodOptional<z.ZodString>;
1502
+ visual_prompt: z.ZodOptional<z.ZodString>;
1503
+ assetRef: z.ZodOptional<z.ZodObject<{
1504
+ role: z.ZodString;
1505
+ category: z.ZodString;
1506
+ animations: z.ZodOptional<z.ZodArray<z.ZodString>>;
1507
+ style: z.ZodOptional<z.ZodEnum<{
1508
+ isometric: "isometric";
1509
+ pixel: "pixel";
1510
+ vector: "vector";
1511
+ hd: "hd";
1512
+ "1-bit": "1-bit";
1513
+ }>>;
1514
+ variant: z.ZodOptional<z.ZodString>;
1515
+ dimension: z.ZodOptional<z.ZodEnum<{
1516
+ "2d": "2d";
1517
+ "3d": "3d";
1518
+ }>>;
1519
+ aspect: z.ZodOptional<z.ZodEnum<{
1520
+ "1:1": "1:1";
1521
+ "16:9": "16:9";
1522
+ "5:7": "5:7";
1523
+ "8:1": "8:1";
1524
+ "4:1": "4:1";
1525
+ "5:3": "5:3";
1526
+ "1:2": "1:2";
1527
+ }>>;
1528
+ }, z.core.$strip>>;
1529
+ }, z.core.$strip>>;
1530
+ typeParams: z.ZodOptional<z.ZodArray<z.ZodType<TraitTypeParamDef, unknown, z.core.$ZodTypeInternals<TraitTypeParamDef, unknown>>>>;
1531
+ }, z.core.$strip>>>;
1532
+ typeArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1533
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1534
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodType<ConfigFieldDeclaration, object, z.core.$ZodTypeInternals<ConfigFieldDeclaration, object>>, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>]>>>;
1535
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
1536
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1537
+ event: z.ZodString;
1538
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1539
+ triggers: z.ZodString;
1540
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1541
+ description: z.ZodOptional<z.ZodString>;
1542
+ synonyms: z.ZodOptional<z.ZodString>;
1543
+ tier: z.ZodOptional<z.ZodString>;
1544
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1545
+ scope: z.ZodOptional<z.ZodEnum<{
1546
+ external: "external";
1547
+ internal: "internal";
1548
+ }>>;
1549
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1550
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1551
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1552
+ kind: z.ZodLiteral<"any">;
1553
+ }, z.core.$strip>, z.ZodObject<{
1554
+ kind: z.ZodLiteral<"trait">;
1555
+ trait: z.ZodString;
1556
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1557
+ }, z.core.$strip>, z.ZodObject<{
1558
+ kind: z.ZodLiteral<"orbital">;
1559
+ orbital: z.ZodString;
1560
+ trait: z.ZodString;
1561
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1562
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1563
+ }, z.core.$strip>]>>;
1564
+ }, z.core.$strip>>>;
1565
+ emitsScope: z.ZodOptional<z.ZodEnum<{
1566
+ external: "external";
1567
+ internal: "internal";
1568
+ }>>;
1569
+ effects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>>;
1570
+ }, z.core.$strip>;
1571
+ /**
1572
+ * Simplified trait reference - supports string, reference object, or inline Trait definition
1573
+ * - string: "TraitName" - reference to a trait by name
1574
+ * - { ref: "TraitName" }: reference object with optional config / overrides
1575
+ * - { name: "TraitName", stateMachine: {...} }: inline trait definition
1576
+ *
1577
+ * Phase F adds `name` and `events` to the reference object form so callers
1578
+ * can rename the trait and remap atom event keys.
1579
+ */
1580
+ /** A trait in an orbital: a bare name, a reference (the full `TraitReference` the wire carries), or an inline trait. */
1581
+ type TraitRef = string | TraitReference | Trait;
1582
+ type PresentationType = 'modal' | 'drawer' | 'popover' | 'inline' | 'confirm-dialog';
1583
+ type TraitUIBinding = {
1584
+ [stateName: string]: {
1585
+ presentation: PresentationType;
1586
+ content: AnyPatternConfig | AnyPatternConfig[];
1587
+ props?: {
1588
+ size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
1589
+ position?: 'left' | 'right' | 'top' | 'bottom' | 'center';
1590
+ title?: string;
1591
+ closable?: boolean;
1592
+ width?: string;
1593
+ showProgress?: boolean;
1594
+ step?: number;
1595
+ totalSteps?: number;
1596
+ };
1597
+ };
1598
+ };
1599
+ /**
1600
+ * Zod schema for {@link TraitUIBinding}. `content` is a pattern config (or
1601
+ * list of them), validated as pattern objects by {@link PatternObjectSchema}
1602
+ * (the registry checks props at validate time).
1603
+ */
1604
+ declare const TraitUIBindingSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
1605
+ presentation: z.ZodEnum<{
1606
+ modal: "modal";
1607
+ drawer: "drawer";
1608
+ "confirm-dialog": "confirm-dialog";
1609
+ popover: "popover";
1610
+ inline: "inline";
1611
+ }>;
1612
+ content: z.ZodUnion<readonly [z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>, z.ZodArray<z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>>]>;
1613
+ props: z.ZodOptional<z.ZodObject<{
1614
+ size: z.ZodOptional<z.ZodEnum<{
1615
+ md: "md";
1616
+ sm: "sm";
1617
+ full: "full";
1618
+ lg: "lg";
1619
+ xl: "xl";
1620
+ }>>;
1621
+ position: z.ZodOptional<z.ZodEnum<{
1622
+ right: "right";
1623
+ center: "center";
1624
+ top: "top";
1625
+ bottom: "bottom";
1626
+ left: "left";
1627
+ }>>;
1628
+ title: z.ZodOptional<z.ZodString>;
1629
+ closable: z.ZodOptional<z.ZodBoolean>;
1630
+ width: z.ZodOptional<z.ZodString>;
1631
+ showProgress: z.ZodOptional<z.ZodBoolean>;
1632
+ step: z.ZodOptional<z.ZodNumber>;
1633
+ totalSteps: z.ZodOptional<z.ZodNumber>;
1634
+ }, z.core.$strip>>;
1635
+ }, z.core.$strip>>;
1636
+ /**
1637
+ * A Trait is a reusable behavioral module with state machine.
1638
+ *
1639
+ * Traits declare their event contracts via `emits` and `listens`:
1640
+ * - `emits`: Events this trait can emit (with scope and payload schema)
1641
+ * - `listens`: Events this trait listens for (with optional payloadMapping)
1642
+ */
1643
+ /**
1644
+ * Inferred field contract for a `@rebindable` trait binding. `requires` =
1645
+ * entity fields the trait READS via `@entity.<field>`; `provides` = fields it
1646
+ * WRITES via `(set @entity.<field> ...)`. A consumer that rebinds the trait
1647
+ * (`linkedEntity`) must point at an entity whose fields ⊇ `requires`. Inferred
1648
+ * by the lolo lowerer from the trait's own SExpr usage; the orbital-rust L2
1649
+ * validator enforces it (`ORB_T_REBIND_MISSING_FIELDS`). Mirrors the Rust
1650
+ * `EntityFieldContract` serde shape exactly.
1651
+ */
1652
+ type EntityFieldContract = {
1653
+ requires: string[];
1654
+ provides: string[];
1655
+ };
1656
+ declare const EntityFieldContractSchema: z.ZodObject<{
1657
+ requires: z.ZodArray<z.ZodString>;
1658
+ provides: z.ZodArray<z.ZodString>;
1659
+ }, z.core.$strip>;
1660
+ /**
1661
+ * Where in a trait an effect is declared. The distinction is load-bearing: a
1662
+ * `render-ui` in a transition fires when that transition fires, but one inside a
1663
+ * `ticks` block repaints every frame, so two tick writers on one slot paint
1664
+ * together where two transition writers routinely alternate.
1665
+ */
1666
+ type EffectSite = 'transition' | 'tick';
1667
+ /**
1668
+ * One effect a trait produces, with the resource it acts on — the slot for
1669
+ * `render-ui`, the entity for `persist`/`fetch`, the event for `emit`, the
1670
+ * binding path for `set`. `resource` is recorded verbatim as authored; when the
1671
+ * author deferred it to a call site (`@config.surface`) the reference is kept as
1672
+ * written and `resolved` is false. Mirrors the Rust `EffectUse` serde shape.
1673
+ */
1674
+ type EffectUse = {
1675
+ kind: string;
1676
+ resource?: string;
1677
+ /** Absent means true — only an unresolved `@config.*` resource sets it. */
1678
+ resolved?: boolean;
1679
+ /** Absent means `'transition'`. */
1680
+ site?: EffectSite;
1681
+ };
1682
+ /**
1683
+ * Every effect a trait produces — what composing it actually brings along.
1684
+ *
1685
+ * Inferred by the lolo lowerer from the trait's own effects (never authored, the
1686
+ * way {@link EntityFieldContract} is never authored), then re-derived
1687
+ * post-inline once call-site config makes `@config.*` resources concrete. A
1688
+ * trait's type used to say nothing about its effects, which is why "is this safe
1689
+ * to compose?" could only be answered by reading the atom.
1690
+ */
1691
+ type EffectRow = EffectUse[];
1692
+ /**
1693
+ * Client dispatch strategy for a trait's transitions — the ONE rule,
1694
+ * computed from declared facts only, never inferred from a trait's effects
1695
+ * (`docs/Almadar_LOLO.md` §7). Mirrors `orbital-core`'s
1696
+ * `runtime::dispatch_mode::DispatchMode` serde shape exactly (the enum both
1697
+ * `OirTrait::dispatch_mode` (compiled path) and `TraitDefinition::dispatch_mode`
1698
+ * (runtime kernel) return) — same variant spellings, so a value round-trips
1699
+ * on the wire unchanged.
1700
+ */
1701
+ type DispatchMode = 'persistedAwaited' | 'hybridClientOnly' | 'runtimeOptimistic';
1702
+ declare const DispatchModeSchema: z.ZodEnum<{
1703
+ persistedAwaited: "persistedAwaited";
1704
+ hybridClientOnly: "hybridClientOnly";
1705
+ runtimeOptimistic: "runtimeOptimistic";
1706
+ }>;
1707
+ /** The `[client]` / `[optimistic]` / `[server]` trait-header word; absent = server dispatch, `server` is the explicit spelling that overrides an atom's mode. Mirrors Rust `DispatchMode` (serde lowercase). */
1708
+ type TraitDispatchMode = 'client' | 'optimistic' | 'server';
1709
+ declare const TraitDispatchModeSchema: z.ZodEnum<{
1710
+ client: "client";
1711
+ optimistic: "optimistic";
1712
+ server: "server";
1713
+ }>;
1714
+ type Trait = {
1715
+ /** V4 dual-carry id sibling of `name` — optional until the Phase-7 flip. */
1716
+ id?: TraitId;
1717
+ name: string;
1718
+ description?: string;
1719
+ description_visual_prompt?: string;
1720
+ /**
1721
+ * Opt-in marker authored as `-> @rebindable Entity` in `.lolo`. When
1722
+ * `true`, a consuming molecule/organism may rebind this trait's entity via
1723
+ * `linkedEntity`; otherwise the binding is fixed and the validator rejects
1724
+ * any rebind (`ORB_T_ENTITY_NOT_REBINDABLE`). Absent on traits that don't
1725
+ * bind an entity.
1726
+ */
1727
+ entityRebindable?: boolean;
1728
+ /**
1729
+ * Inferred field contract a rebind target must satisfy. Emitted only
1730
+ * alongside `entityRebindable: true`. See {@link EntityFieldContract}.
1731
+ */
1732
+ entityContract?: EntityFieldContract;
1733
+ /**
1734
+ * Inferred effect surface. Absent on traits that produce no effects at all.
1735
+ * See {@link EffectRow}.
1736
+ */
1737
+ effectRow?: EffectRow;
1738
+ /**
1739
+ * `@description "..."` authored on the `@rebindable` binding in `.lolo`.
1740
+ * Surfaced to catalog prose + knob-embeddings so the LLM can reach for the
1741
+ * binding from intent vocabulary (binding-discovery). Absent when unmarked.
1742
+ */
1743
+ entityBindingDescription?: string;
1744
+ /** `@synonyms "..."` authored on the `@rebindable` binding in `.lolo`. */
1745
+ entityBindingSynonyms?: string;
1746
+ /**
1747
+ * Dispatch mode authored as `[client]` / `[optimistic]` / `[server]` on the `.lolo` trait
1748
+ * header. Absent means server dispatch. Mirrors the Rust
1749
+ * `TraitDefinition.dispatch` field; never inferred from effects.
1750
+ */
1751
+ dispatch?: TraitDispatchMode;
1752
+ /**
1753
+ * The entity this trait is linked to.
1754
+ * Required for inline trait definitions within an orbital.
1755
+ */
1756
+ linkedEntity?: string;
1757
+ /** V4 dual-carry id sibling of `linkedEntity` — optional until the Phase-7 flip. */
1758
+ linkedEntityId?: EntityId;
1759
+ /**
1760
+ * V4 leverage-ids — id side-map for `@entity.<Name>` binding tokens + positional
1761
+ * entity args (`fetch`/`ref`/`persist`/`spawn`) in this trait's guards/effects/
1762
+ * ticks/listens. Maps the referenced entity NAME → its stable id, so readers
1763
+ * resolve these bare-string positions by id (else name) and an entity rename never
1764
+ * strands them — the coverage that lets the entity name-rewriter be deleted.
1765
+ */
1766
+ entityRefIds?: Record<string, EntityId>;
1767
+ /**
1768
+ * V4 leverage-ids — id side-map for `@trait.<Name>` embed tokens (render-ui embeds /
1769
+ * effect-tree sibling refs). Maps the embed token NAME → the embedded trait's stable
1770
+ * id, so readers splice embeds by id (else name) — the coverage that lets the
1771
+ * `@trait.` name-rewriter be deleted.
1772
+ */
1773
+ traitEmbedIds?: Record<string, TraitId>;
1774
+ requiredFields?: RequiredField[];
1775
+ dataEntities?: TraitDataEntity[];
1776
+ stateMachine?: StateMachine;
1777
+ initialEffects?: Effect[];
1778
+ ticks?: TraitTick[];
1779
+ /**
1780
+ * Events this trait emits.
1781
+ * Each event can be scoped as internal or external.
1782
+ * External events are namespaced at orbital level (TraitName.EVENT_NAME).
1783
+ */
1784
+ emits?: TraitEventContract[];
1785
+ /**
1786
+ * Events this trait listens for.
1787
+ * External listeners reference namespaced events (TraitName.EVENT_NAME).
1788
+ */
1789
+ listens?: TraitEventListener[];
1790
+ /**
1791
+ * `events { ACTION: CONFIRM_VOID }` — the call-site rename map that binds a
1792
+ * pattern's own event slot (the key, e.g. a Button's `ACTION`) to the app
1793
+ * event it fires (the value). Emitted into the IR by the inliner and read
1794
+ * by wiring analysis: without it, an affordance whose event lives here
1795
+ * rather than in the render payload looks like it fires nothing.
1796
+ */
1797
+ events?: Readonly<Record<string, string>>;
1798
+ ui?: TraitUIBinding;
1799
+ /**
1800
+ * Declared `config { }` schema authored on the trait. Drives
1801
+ * `@config.X` substitution: each field's `default` seeds the
1802
+ * binding context behind any caller-supplied call-site
1803
+ * `config: { ... }` override.
1804
+ */
1805
+ config?: DeclaredTraitConfig;
1806
+ /**
1807
+ * Set by the resolve/inline phase when this trait was cloned from a
1808
+ * `uses[]` import. Absent for traits authored directly on the
1809
+ * orbital. Viewport-only metadata — runtime and codegen ignore it.
1810
+ * Drives Studio's L2 grouping (imported traits collapse under one
1811
+ * card per alias) and L3 drill (alias → that behavior's transitions).
1812
+ */
1813
+ sourceBehavior?: SourceBehaviorMetadata;
1814
+ sourceDeclaration?: SourceDeclarationMetadata;
1815
+ /**
1816
+ * Set by the resolve/inline phase alongside `sourceBehavior`. Carries
1817
+ * the resolved `Entity` definition of the imported behavior so the
1818
+ * client-side mock-data generator can produce rows for the trait's
1819
+ * `linkedEntity` without re-walking the import graph at runtime.
1820
+ */
1821
+ sourceEntityDefinition?: Entity;
1822
+ /**
1823
+ * Increment 3-II: this trait's own declared type parameters. Present
1824
+ * only on an atom's DECLARING inline trait (never authored on a
1825
+ * reference); survives cloning into a consumer's composed schema.
1826
+ */
1827
+ typeParams?: TraitTypeParamDef[];
1828
+ };
1829
+ /**
1830
+ * Provenance attached to a trait that was cloned from a `uses[]` import
1831
+ * during the inline phase. The resolved schema carries this so Studio
1832
+ * can group L2 cards by source behavior and offer an L3 drill into the
1833
+ * import's own transitions.
1834
+ */
1835
+ type SourceBehaviorMetadata = {
1836
+ /** Behavior name (e.g. "std-stat-card") — the resolved `from:` value. */
1837
+ behavior: string;
1838
+ /** Alias used at the import site (e.g. "Stat"). Multiple imports of
1839
+ * the same atom group by alias, not by behavior. */
1840
+ alias: string;
1841
+ /** Original trait name inside the imported behavior, before any
1842
+ * call-site `name:` rename. */
1843
+ originalName: string;
1844
+ };
1845
+ type SourceDeclarationMetadata = {
1846
+ traitId: string;
1847
+ fingerprint: string;
1848
+ };
1849
+ /**
1850
+ * One trait-level type parameter — `(V : Type, R : Type)` in
1851
+ * `trait Name (V : Type, R : Type) -> Entity { ... }`. Present only on an
1852
+ * atom's DECLARING inline trait; survives cloning into a consumer's composed
1853
+ * schema so the inline phase can read each param's `kind` when resolving a
1854
+ * surviving `"$<name>"` payload sentinel. `kind` is one of the six alias
1855
+ * type-parameter kind names (`Type`, `Entity`, `Trait`, `Page`, `Orbital`,
1856
+ * `Event`) — in practice `Type` and `Entity` are the two meaningful kinds
1857
+ * for a trait param today.
1858
+ */
1859
+ type TraitTypeParamDef = {
1860
+ name: string;
1861
+ kind: string;
1862
+ /**
1863
+ * Declaration default (`(r : Type = <name>)`) — a primitive name (incl.
1864
+ * `scalar`), an entity name, or a struct-alias name, all resolved in
1865
+ * the atom's own file. Consulted only when no call-site `::` arg was
1866
+ * supplied (and, for Entity-kind, only when `linkedEntity` also gave no
1867
+ * default).
1868
+ */
1869
+ default?: string;
1870
+ };
1871
+ declare const TraitSchema: z.ZodObject<{
1872
+ id: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1873
+ name: z.ZodString;
1874
+ description: z.ZodOptional<z.ZodString>;
1875
+ description_visual_prompt: z.ZodOptional<z.ZodString>;
1876
+ entityRebindable: z.ZodOptional<z.ZodBoolean>;
1877
+ entityContract: z.ZodOptional<z.ZodObject<{
1878
+ requires: z.ZodArray<z.ZodString>;
1879
+ provides: z.ZodArray<z.ZodString>;
1880
+ }, z.core.$strip>>;
1881
+ effectRow: z.ZodOptional<z.ZodArray<z.ZodObject<{
1882
+ kind: z.ZodString;
1883
+ resource: z.ZodOptional<z.ZodString>;
1884
+ resolved: z.ZodOptional<z.ZodBoolean>;
1885
+ site: z.ZodOptional<z.ZodEnum<{
1886
+ transition: "transition";
1887
+ tick: "tick";
1888
+ }>>;
1889
+ }, z.core.$strip>>>;
1890
+ entityBindingDescription: z.ZodOptional<z.ZodString>;
1891
+ entityBindingSynonyms: z.ZodOptional<z.ZodString>;
1892
+ dispatch: z.ZodOptional<z.ZodEnum<{
1893
+ client: "client";
1894
+ optimistic: "optimistic";
1895
+ server: "server";
1896
+ }>>;
1897
+ linkedEntity: z.ZodOptional<z.ZodString>;
1898
+ linkedEntityId: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
1899
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>>;
1900
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>>;
1901
+ requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1902
+ name: z.ZodString;
1903
+ type: z.ZodUnion<readonly [z.ZodEnum<{
1904
+ string: "string";
1905
+ number: "number";
1906
+ boolean: "boolean";
1907
+ object: "object";
1908
+ date: "date";
1909
+ array: "array";
1910
+ tuple: "tuple";
1911
+ union: "union";
1912
+ enum: "enum";
1913
+ pattern: "pattern";
1914
+ trait: "trait";
1915
+ event: "event";
1916
+ node: "node";
1917
+ url: "url";
1918
+ field: "field";
1919
+ timestamp: "timestamp";
1920
+ image: "image";
1921
+ slot: "slot";
1922
+ datetime: "datetime";
1923
+ instant: "instant";
1924
+ email: "email";
1925
+ phone: "phone";
1926
+ uuid: "uuid";
1927
+ bytes: "bytes";
1928
+ EventAddress: "EventAddress";
1929
+ CallKey: "CallKey";
1930
+ SExpr: "SExpr";
1931
+ }>, z.ZodCustom<`$${string}`, `$${string}`>]>;
1932
+ description: z.ZodOptional<z.ZodString>;
1933
+ }, z.core.$strip>>>;
1934
+ dataEntities: z.ZodOptional<z.ZodArray<z.ZodObject<{
1935
+ name: z.ZodString;
1936
+ collection: z.ZodOptional<z.ZodString>;
1937
+ fields: z.ZodArray<z.ZodType<TraitEntityField, object, z.core.$ZodTypeInternals<TraitEntityField, object>>>;
1938
+ timestamps: z.ZodOptional<z.ZodBoolean>;
1939
+ description: z.ZodOptional<z.ZodString>;
1940
+ runtime: z.ZodOptional<z.ZodBoolean>;
1941
+ singleton: z.ZodOptional<z.ZodBoolean>;
1942
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
1943
+ }, z.core.$strip>>>;
1944
+ stateMachine: z.ZodOptional<z.ZodObject<{
1945
+ states: z.ZodArray<z.ZodObject<{
1946
+ name: z.ZodString;
1947
+ isInitial: z.ZodOptional<z.ZodBoolean>;
1948
+ isTerminal: z.ZodOptional<z.ZodBoolean>;
1949
+ isFinal: z.ZodOptional<z.ZodBoolean>;
1950
+ description: z.ZodOptional<z.ZodString>;
1951
+ onEntry: z.ZodOptional<z.ZodArray<z.ZodString>>;
1952
+ onExit: z.ZodOptional<z.ZodArray<z.ZodString>>;
1953
+ holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1954
+ }, z.core.$strip>>;
1955
+ events: z.ZodArray<z.ZodObject<{
1956
+ key: z.ZodString;
1957
+ id: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1958
+ name: z.ZodString;
1959
+ description: z.ZodOptional<z.ZodString>;
1960
+ synonyms: z.ZodOptional<z.ZodString>;
1961
+ tier: z.ZodOptional<z.ZodString>;
1962
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
1963
+ payloadEntity: z.ZodOptional<z.ZodString>;
1964
+ input: z.ZodOptional<z.ZodBoolean>;
1965
+ listened: z.ZodOptional<z.ZodBoolean>;
1966
+ inbound: z.ZodOptional<z.ZodObject<{
1967
+ name: z.ZodString;
1968
+ answers: z.ZodString;
1969
+ verifies: z.ZodOptional<z.ZodObject<{
1970
+ header: z.ZodString;
1971
+ credential: z.ZodString;
1972
+ }, z.core.$strip>>;
1973
+ }, z.core.$strip>>;
1974
+ classification: z.ZodOptional<z.ZodEnum<{
1975
+ domain: "domain";
1976
+ system: "system";
1977
+ }>>;
1978
+ semanticRole: z.ZodOptional<z.ZodString>;
1979
+ }, z.core.$strip>>;
1980
+ transitions: z.ZodArray<z.ZodObject<{
1981
+ from: z.ZodString;
1982
+ to: z.ZodString;
1983
+ event: z.ZodString;
1984
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1985
+ guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1986
+ effects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
1987
+ ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
1988
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1989
+ awaitRender: z.ZodOptional<z.ZodArray<z.ZodObject<{
1990
+ trait: z.ZodString;
1991
+ slot: z.ZodString;
1992
+ skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
1993
+ }, z.core.$strip>>>;
1994
+ }, z.core.$strip>>;
1995
+ guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
1996
+ name: z.ZodString;
1997
+ expression: z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>;
1998
+ description: z.ZodOptional<z.ZodString>;
1999
+ }, z.core.$strip>>>;
2000
+ }, z.core.$strip>>;
2001
+ initialEffects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
2002
+ ticks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2003
+ name: z.ZodString;
2004
+ description: z.ZodOptional<z.ZodString>;
2005
+ priority: z.ZodOptional<z.ZodNumber>;
2006
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"frame">, z.ZodNumber, z.ZodString]>;
2007
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
2008
+ runsInBackground: z.ZodOptional<z.ZodBoolean>;
2009
+ whileVisible: z.ZodOptional<z.ZodBoolean>;
2010
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
2011
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<PageId, string, z.core.$ZodTypeInternals<PageId, string>>>>;
2012
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2013
+ effects: z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>;
2014
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
2015
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
2016
+ }, z.core.$strip>>>;
2017
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
2018
+ event: z.ZodString;
2019
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2020
+ description: z.ZodOptional<z.ZodString>;
2021
+ synonyms: z.ZodOptional<z.ZodString>;
2022
+ tier: z.ZodOptional<z.ZodString>;
2023
+ definerKnob: z.ZodOptional<z.ZodString>;
2024
+ scopeOverridden: z.ZodOptional<z.ZodBoolean>;
2025
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
2026
+ payloadEntity: z.ZodOptional<z.ZodString>;
2027
+ scope: z.ZodOptional<z.ZodEnum<{
2028
+ external: "external";
2029
+ internal: "internal";
2030
+ }>>;
2031
+ }, z.core.$strip>>>;
2032
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
2033
+ event: z.ZodString;
2034
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2035
+ triggers: z.ZodString;
2036
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2037
+ description: z.ZodOptional<z.ZodString>;
2038
+ synonyms: z.ZodOptional<z.ZodString>;
2039
+ tier: z.ZodOptional<z.ZodString>;
2040
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2041
+ scope: z.ZodOptional<z.ZodEnum<{
2042
+ external: "external";
2043
+ internal: "internal";
2044
+ }>>;
2045
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
2046
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2047
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2048
+ kind: z.ZodLiteral<"any">;
2049
+ }, z.core.$strip>, z.ZodObject<{
2050
+ kind: z.ZodLiteral<"trait">;
2051
+ trait: z.ZodString;
2052
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2053
+ }, z.core.$strip>, z.ZodObject<{
2054
+ kind: z.ZodLiteral<"orbital">;
2055
+ orbital: z.ZodString;
2056
+ trait: z.ZodString;
2057
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
2058
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2059
+ }, z.core.$strip>]>>;
2060
+ }, z.core.$strip>>>;
2061
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2062
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2063
+ presentation: z.ZodEnum<{
2064
+ modal: "modal";
2065
+ drawer: "drawer";
2066
+ "confirm-dialog": "confirm-dialog";
2067
+ popover: "popover";
2068
+ inline: "inline";
2069
+ }>;
2070
+ content: z.ZodUnion<readonly [z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>, z.ZodArray<z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>>]>;
2071
+ props: z.ZodOptional<z.ZodObject<{
2072
+ size: z.ZodOptional<z.ZodEnum<{
2073
+ md: "md";
2074
+ sm: "sm";
2075
+ full: "full";
2076
+ lg: "lg";
2077
+ xl: "xl";
2078
+ }>>;
2079
+ position: z.ZodOptional<z.ZodEnum<{
2080
+ right: "right";
2081
+ center: "center";
2082
+ top: "top";
2083
+ bottom: "bottom";
2084
+ left: "left";
2085
+ }>>;
2086
+ title: z.ZodOptional<z.ZodString>;
2087
+ closable: z.ZodOptional<z.ZodBoolean>;
2088
+ width: z.ZodOptional<z.ZodString>;
2089
+ showProgress: z.ZodOptional<z.ZodBoolean>;
2090
+ step: z.ZodOptional<z.ZodNumber>;
2091
+ totalSteps: z.ZodOptional<z.ZodNumber>;
2092
+ }, z.core.$strip>>;
2093
+ }, z.core.$strip>>>;
2094
+ config: z.ZodOptional<z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>>;
2095
+ sourceBehavior: z.ZodOptional<z.ZodObject<{
2096
+ behavior: z.ZodString;
2097
+ alias: z.ZodString;
2098
+ originalName: z.ZodString;
2099
+ }, z.core.$strip>>;
2100
+ sourceDeclaration: z.ZodOptional<z.ZodObject<{
2101
+ traitId: z.ZodString;
2102
+ fingerprint: z.ZodString;
2103
+ }, z.core.$strip>>;
2104
+ sourceEntityDefinition: z.ZodOptional<z.ZodObject<{
2105
+ name: z.ZodString;
2106
+ id: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
2107
+ persistence: z.ZodDefault<z.ZodEnum<{
2108
+ persistent: "persistent";
2109
+ runtime: "runtime";
2110
+ }>>;
2111
+ shared: z.ZodOptional<z.ZodBoolean>;
2112
+ identity: z.ZodOptional<z.ZodBoolean>;
2113
+ browser: z.ZodOptional<z.ZodBoolean>;
2114
+ store: z.ZodOptional<z.ZodString>;
2115
+ read_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2116
+ create_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2117
+ update_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2118
+ delete_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2119
+ access_waivers: z.ZodOptional<z.ZodObject<{
2120
+ read: z.ZodOptional<z.ZodString>;
2121
+ create: z.ZodOptional<z.ZodString>;
2122
+ update: z.ZodOptional<z.ZodString>;
2123
+ delete: z.ZodOptional<z.ZodString>;
2124
+ }, z.core.$strip>>;
2125
+ invariants: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
2126
+ indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2127
+ fields: z.ZodArray<z.ZodString>;
2128
+ orderBy: z.ZodOptional<z.ZodString>;
2129
+ }, z.core.$strict>>>;
2130
+ collection: z.ZodOptional<z.ZodString>;
2131
+ fields: z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>;
2132
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
2133
+ localeInstances: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>>;
2134
+ timestamps: z.ZodOptional<z.ZodBoolean>;
2135
+ softDelete: z.ZodOptional<z.ZodBoolean>;
2136
+ description: z.ZodOptional<z.ZodString>;
2137
+ visual_prompt: z.ZodOptional<z.ZodString>;
2138
+ assetRef: z.ZodOptional<z.ZodObject<{
2139
+ role: z.ZodString;
2140
+ category: z.ZodString;
2141
+ animations: z.ZodOptional<z.ZodArray<z.ZodString>>;
2142
+ style: z.ZodOptional<z.ZodEnum<{
2143
+ isometric: "isometric";
2144
+ pixel: "pixel";
2145
+ vector: "vector";
2146
+ hd: "hd";
2147
+ "1-bit": "1-bit";
2148
+ }>>;
2149
+ variant: z.ZodOptional<z.ZodString>;
2150
+ dimension: z.ZodOptional<z.ZodEnum<{
2151
+ "2d": "2d";
2152
+ "3d": "3d";
2153
+ }>>;
2154
+ aspect: z.ZodOptional<z.ZodEnum<{
2155
+ "1:1": "1:1";
2156
+ "16:9": "16:9";
2157
+ "5:7": "5:7";
2158
+ "8:1": "8:1";
2159
+ "4:1": "4:1";
2160
+ "5:3": "5:3";
2161
+ "1:2": "1:2";
2162
+ }>>;
2163
+ }, z.core.$strip>>;
2164
+ }, z.core.$strip>>;
2165
+ typeParams: z.ZodOptional<z.ZodArray<z.ZodType<TraitTypeParamDef, unknown, z.core.$ZodTypeInternals<TraitTypeParamDef, unknown>>>>;
2166
+ }, z.core.$strip>;
2167
+ declare const TraitRefSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2168
+ ref: z.ZodString;
2169
+ refId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2170
+ id: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2171
+ from: z.ZodOptional<z.ZodString>;
2172
+ linkedEntity: z.ZodOptional<z.ZodString>;
2173
+ linkedEntityId: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
2174
+ name: z.ZodOptional<z.ZodString>;
2175
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2176
+ eventIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
2177
+ _resolved: z.ZodOptional<z.ZodLazy<z.ZodObject<{
2178
+ id: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2179
+ name: z.ZodString;
2180
+ description: z.ZodOptional<z.ZodString>;
2181
+ description_visual_prompt: z.ZodOptional<z.ZodString>;
2182
+ entityRebindable: z.ZodOptional<z.ZodBoolean>;
2183
+ entityContract: z.ZodOptional<z.ZodObject<{
2184
+ requires: z.ZodArray<z.ZodString>;
2185
+ provides: z.ZodArray<z.ZodString>;
2186
+ }, z.core.$strip>>;
2187
+ effectRow: z.ZodOptional<z.ZodArray<z.ZodObject<{
2188
+ kind: z.ZodString;
2189
+ resource: z.ZodOptional<z.ZodString>;
2190
+ resolved: z.ZodOptional<z.ZodBoolean>;
2191
+ site: z.ZodOptional<z.ZodEnum<{
2192
+ transition: "transition";
2193
+ tick: "tick";
2194
+ }>>;
2195
+ }, z.core.$strip>>>;
2196
+ entityBindingDescription: z.ZodOptional<z.ZodString>;
2197
+ entityBindingSynonyms: z.ZodOptional<z.ZodString>;
2198
+ dispatch: z.ZodOptional<z.ZodEnum<{
2199
+ client: "client";
2200
+ optimistic: "optimistic";
2201
+ server: "server";
2202
+ }>>;
2203
+ linkedEntity: z.ZodOptional<z.ZodString>;
2204
+ linkedEntityId: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
2205
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>>;
2206
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>>;
2207
+ requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2208
+ name: z.ZodString;
2209
+ type: z.ZodUnion<readonly [z.ZodEnum<{
2210
+ string: "string";
2211
+ number: "number";
2212
+ boolean: "boolean";
2213
+ object: "object";
2214
+ date: "date";
2215
+ array: "array";
2216
+ tuple: "tuple";
2217
+ union: "union";
2218
+ enum: "enum";
2219
+ pattern: "pattern";
2220
+ trait: "trait";
2221
+ event: "event";
2222
+ node: "node";
2223
+ url: "url";
2224
+ field: "field";
2225
+ timestamp: "timestamp";
2226
+ image: "image";
2227
+ slot: "slot";
2228
+ datetime: "datetime";
2229
+ instant: "instant";
2230
+ email: "email";
2231
+ phone: "phone";
2232
+ uuid: "uuid";
2233
+ bytes: "bytes";
2234
+ EventAddress: "EventAddress";
2235
+ CallKey: "CallKey";
2236
+ SExpr: "SExpr";
2237
+ }>, z.ZodCustom<`$${string}`, `$${string}`>]>;
2238
+ description: z.ZodOptional<z.ZodString>;
2239
+ }, z.core.$strip>>>;
2240
+ dataEntities: z.ZodOptional<z.ZodArray<z.ZodObject<{
2241
+ name: z.ZodString;
2242
+ collection: z.ZodOptional<z.ZodString>;
2243
+ fields: z.ZodArray<z.ZodType<TraitEntityField, object, z.core.$ZodTypeInternals<TraitEntityField, object>>>;
2244
+ timestamps: z.ZodOptional<z.ZodBoolean>;
2245
+ description: z.ZodOptional<z.ZodString>;
2246
+ runtime: z.ZodOptional<z.ZodBoolean>;
2247
+ singleton: z.ZodOptional<z.ZodBoolean>;
2248
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
2249
+ }, z.core.$strip>>>;
2250
+ stateMachine: z.ZodOptional<z.ZodObject<{
2251
+ states: z.ZodArray<z.ZodObject<{
2252
+ name: z.ZodString;
2253
+ isInitial: z.ZodOptional<z.ZodBoolean>;
2254
+ isTerminal: z.ZodOptional<z.ZodBoolean>;
2255
+ isFinal: z.ZodOptional<z.ZodBoolean>;
2256
+ description: z.ZodOptional<z.ZodString>;
2257
+ onEntry: z.ZodOptional<z.ZodArray<z.ZodString>>;
2258
+ onExit: z.ZodOptional<z.ZodArray<z.ZodString>>;
2259
+ holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2260
+ }, z.core.$strip>>;
2261
+ events: z.ZodArray<z.ZodObject<{
2262
+ key: z.ZodString;
2263
+ id: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2264
+ name: z.ZodString;
2265
+ description: z.ZodOptional<z.ZodString>;
2266
+ synonyms: z.ZodOptional<z.ZodString>;
2267
+ tier: z.ZodOptional<z.ZodString>;
2268
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
2269
+ payloadEntity: z.ZodOptional<z.ZodString>;
2270
+ input: z.ZodOptional<z.ZodBoolean>;
2271
+ listened: z.ZodOptional<z.ZodBoolean>;
2272
+ inbound: z.ZodOptional<z.ZodObject<{
2273
+ name: z.ZodString;
2274
+ answers: z.ZodString;
2275
+ verifies: z.ZodOptional<z.ZodObject<{
2276
+ header: z.ZodString;
2277
+ credential: z.ZodString;
2278
+ }, z.core.$strip>>;
2279
+ }, z.core.$strip>>;
2280
+ classification: z.ZodOptional<z.ZodEnum<{
2281
+ domain: "domain";
2282
+ system: "system";
2283
+ }>>;
2284
+ semanticRole: z.ZodOptional<z.ZodString>;
2285
+ }, z.core.$strip>>;
2286
+ transitions: z.ZodArray<z.ZodObject<{
2287
+ from: z.ZodString;
2288
+ to: z.ZodString;
2289
+ event: z.ZodString;
2290
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2291
+ guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
2292
+ effects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
2293
+ ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
2294
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2295
+ awaitRender: z.ZodOptional<z.ZodArray<z.ZodObject<{
2296
+ trait: z.ZodString;
2297
+ slot: z.ZodString;
2298
+ skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
2299
+ }, z.core.$strip>>>;
2300
+ }, z.core.$strip>>;
2301
+ guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
2302
+ name: z.ZodString;
2303
+ expression: z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>;
2304
+ description: z.ZodOptional<z.ZodString>;
2305
+ }, z.core.$strip>>>;
2306
+ }, z.core.$strip>>;
2307
+ initialEffects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
2308
+ ticks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2309
+ name: z.ZodString;
2310
+ description: z.ZodOptional<z.ZodString>;
2311
+ priority: z.ZodOptional<z.ZodNumber>;
2312
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"frame">, z.ZodNumber, z.ZodString]>;
2313
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
2314
+ runsInBackground: z.ZodOptional<z.ZodBoolean>;
2315
+ whileVisible: z.ZodOptional<z.ZodBoolean>;
2316
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
2317
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<PageId, string, z.core.$ZodTypeInternals<PageId, string>>>>;
2318
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2319
+ effects: z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>;
2320
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
2321
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
2322
+ }, z.core.$strip>>>;
2323
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
2324
+ event: z.ZodString;
2325
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2326
+ description: z.ZodOptional<z.ZodString>;
2327
+ synonyms: z.ZodOptional<z.ZodString>;
2328
+ tier: z.ZodOptional<z.ZodString>;
2329
+ definerKnob: z.ZodOptional<z.ZodString>;
2330
+ scopeOverridden: z.ZodOptional<z.ZodBoolean>;
2331
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
2332
+ payloadEntity: z.ZodOptional<z.ZodString>;
2333
+ scope: z.ZodOptional<z.ZodEnum<{
2334
+ external: "external";
2335
+ internal: "internal";
2336
+ }>>;
2337
+ }, z.core.$strip>>>;
2338
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
2339
+ event: z.ZodString;
2340
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2341
+ triggers: z.ZodString;
2342
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2343
+ description: z.ZodOptional<z.ZodString>;
2344
+ synonyms: z.ZodOptional<z.ZodString>;
2345
+ tier: z.ZodOptional<z.ZodString>;
2346
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2347
+ scope: z.ZodOptional<z.ZodEnum<{
2348
+ external: "external";
2349
+ internal: "internal";
2350
+ }>>;
2351
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
2352
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2353
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2354
+ kind: z.ZodLiteral<"any">;
2355
+ }, z.core.$strip>, z.ZodObject<{
2356
+ kind: z.ZodLiteral<"trait">;
2357
+ trait: z.ZodString;
2358
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2359
+ }, z.core.$strip>, z.ZodObject<{
2360
+ kind: z.ZodLiteral<"orbital">;
2361
+ orbital: z.ZodString;
2362
+ trait: z.ZodString;
2363
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
2364
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2365
+ }, z.core.$strip>]>>;
2366
+ }, z.core.$strip>>>;
2367
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2368
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2369
+ presentation: z.ZodEnum<{
2370
+ modal: "modal";
2371
+ drawer: "drawer";
2372
+ "confirm-dialog": "confirm-dialog";
2373
+ popover: "popover";
2374
+ inline: "inline";
2375
+ }>;
2376
+ content: z.ZodUnion<readonly [z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>, z.ZodArray<z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>>]>;
2377
+ props: z.ZodOptional<z.ZodObject<{
2378
+ size: z.ZodOptional<z.ZodEnum<{
2379
+ md: "md";
2380
+ sm: "sm";
2381
+ full: "full";
2382
+ lg: "lg";
2383
+ xl: "xl";
2384
+ }>>;
2385
+ position: z.ZodOptional<z.ZodEnum<{
2386
+ right: "right";
2387
+ center: "center";
2388
+ top: "top";
2389
+ bottom: "bottom";
2390
+ left: "left";
2391
+ }>>;
2392
+ title: z.ZodOptional<z.ZodString>;
2393
+ closable: z.ZodOptional<z.ZodBoolean>;
2394
+ width: z.ZodOptional<z.ZodString>;
2395
+ showProgress: z.ZodOptional<z.ZodBoolean>;
2396
+ step: z.ZodOptional<z.ZodNumber>;
2397
+ totalSteps: z.ZodOptional<z.ZodNumber>;
2398
+ }, z.core.$strip>>;
2399
+ }, z.core.$strip>>>;
2400
+ config: z.ZodOptional<z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>>;
2401
+ sourceBehavior: z.ZodOptional<z.ZodObject<{
2402
+ behavior: z.ZodString;
2403
+ alias: z.ZodString;
2404
+ originalName: z.ZodString;
2405
+ }, z.core.$strip>>;
2406
+ sourceDeclaration: z.ZodOptional<z.ZodObject<{
2407
+ traitId: z.ZodString;
2408
+ fingerprint: z.ZodString;
2409
+ }, z.core.$strip>>;
2410
+ sourceEntityDefinition: z.ZodOptional<z.ZodObject<{
2411
+ name: z.ZodString;
2412
+ id: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
2413
+ persistence: z.ZodDefault<z.ZodEnum<{
2414
+ persistent: "persistent";
2415
+ runtime: "runtime";
2416
+ }>>;
2417
+ shared: z.ZodOptional<z.ZodBoolean>;
2418
+ identity: z.ZodOptional<z.ZodBoolean>;
2419
+ browser: z.ZodOptional<z.ZodBoolean>;
2420
+ store: z.ZodOptional<z.ZodString>;
2421
+ read_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2422
+ create_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2423
+ update_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2424
+ delete_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2425
+ access_waivers: z.ZodOptional<z.ZodObject<{
2426
+ read: z.ZodOptional<z.ZodString>;
2427
+ create: z.ZodOptional<z.ZodString>;
2428
+ update: z.ZodOptional<z.ZodString>;
2429
+ delete: z.ZodOptional<z.ZodString>;
2430
+ }, z.core.$strip>>;
2431
+ invariants: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
2432
+ indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2433
+ fields: z.ZodArray<z.ZodString>;
2434
+ orderBy: z.ZodOptional<z.ZodString>;
2435
+ }, z.core.$strict>>>;
2436
+ collection: z.ZodOptional<z.ZodString>;
2437
+ fields: z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>;
2438
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
2439
+ localeInstances: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>>;
2440
+ timestamps: z.ZodOptional<z.ZodBoolean>;
2441
+ softDelete: z.ZodOptional<z.ZodBoolean>;
2442
+ description: z.ZodOptional<z.ZodString>;
2443
+ visual_prompt: z.ZodOptional<z.ZodString>;
2444
+ assetRef: z.ZodOptional<z.ZodObject<{
2445
+ role: z.ZodString;
2446
+ category: z.ZodString;
2447
+ animations: z.ZodOptional<z.ZodArray<z.ZodString>>;
2448
+ style: z.ZodOptional<z.ZodEnum<{
2449
+ isometric: "isometric";
2450
+ pixel: "pixel";
2451
+ vector: "vector";
2452
+ hd: "hd";
2453
+ "1-bit": "1-bit";
2454
+ }>>;
2455
+ variant: z.ZodOptional<z.ZodString>;
2456
+ dimension: z.ZodOptional<z.ZodEnum<{
2457
+ "2d": "2d";
2458
+ "3d": "3d";
2459
+ }>>;
2460
+ aspect: z.ZodOptional<z.ZodEnum<{
2461
+ "1:1": "1:1";
2462
+ "16:9": "16:9";
2463
+ "5:7": "5:7";
2464
+ "8:1": "8:1";
2465
+ "4:1": "4:1";
2466
+ "5:3": "5:3";
2467
+ "1:2": "1:2";
2468
+ }>>;
2469
+ }, z.core.$strip>>;
2470
+ }, z.core.$strip>>;
2471
+ typeParams: z.ZodOptional<z.ZodArray<z.ZodType<TraitTypeParamDef, unknown, z.core.$ZodTypeInternals<TraitTypeParamDef, unknown>>>>;
2472
+ }, z.core.$strip>>>;
2473
+ typeArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2474
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2475
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodType<ConfigFieldDeclaration, object, z.core.$ZodTypeInternals<ConfigFieldDeclaration, object>>, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>]>>>;
2476
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
2477
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
2478
+ event: z.ZodString;
2479
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2480
+ triggers: z.ZodString;
2481
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2482
+ description: z.ZodOptional<z.ZodString>;
2483
+ synonyms: z.ZodOptional<z.ZodString>;
2484
+ tier: z.ZodOptional<z.ZodString>;
2485
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2486
+ scope: z.ZodOptional<z.ZodEnum<{
2487
+ external: "external";
2488
+ internal: "internal";
2489
+ }>>;
2490
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
2491
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2492
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2493
+ kind: z.ZodLiteral<"any">;
2494
+ }, z.core.$strip>, z.ZodObject<{
2495
+ kind: z.ZodLiteral<"trait">;
2496
+ trait: z.ZodString;
2497
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2498
+ }, z.core.$strip>, z.ZodObject<{
2499
+ kind: z.ZodLiteral<"orbital">;
2500
+ orbital: z.ZodString;
2501
+ trait: z.ZodString;
2502
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
2503
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2504
+ }, z.core.$strip>]>>;
2505
+ }, z.core.$strip>>>;
2506
+ emitsScope: z.ZodOptional<z.ZodEnum<{
2507
+ external: "external";
2508
+ internal: "internal";
2509
+ }>>;
2510
+ effects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>>;
2511
+ }, z.core.$strip>, z.ZodObject<{
2512
+ id: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2513
+ name: z.ZodString;
2514
+ description: z.ZodOptional<z.ZodString>;
2515
+ description_visual_prompt: z.ZodOptional<z.ZodString>;
2516
+ entityRebindable: z.ZodOptional<z.ZodBoolean>;
2517
+ entityContract: z.ZodOptional<z.ZodObject<{
2518
+ requires: z.ZodArray<z.ZodString>;
2519
+ provides: z.ZodArray<z.ZodString>;
2520
+ }, z.core.$strip>>;
2521
+ effectRow: z.ZodOptional<z.ZodArray<z.ZodObject<{
2522
+ kind: z.ZodString;
2523
+ resource: z.ZodOptional<z.ZodString>;
2524
+ resolved: z.ZodOptional<z.ZodBoolean>;
2525
+ site: z.ZodOptional<z.ZodEnum<{
2526
+ transition: "transition";
2527
+ tick: "tick";
2528
+ }>>;
2529
+ }, z.core.$strip>>>;
2530
+ entityBindingDescription: z.ZodOptional<z.ZodString>;
2531
+ entityBindingSynonyms: z.ZodOptional<z.ZodString>;
2532
+ dispatch: z.ZodOptional<z.ZodEnum<{
2533
+ client: "client";
2534
+ optimistic: "optimistic";
2535
+ server: "server";
2536
+ }>>;
2537
+ linkedEntity: z.ZodOptional<z.ZodString>;
2538
+ linkedEntityId: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
2539
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>>;
2540
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>>;
2541
+ requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2542
+ name: z.ZodString;
2543
+ type: z.ZodUnion<readonly [z.ZodEnum<{
2544
+ string: "string";
2545
+ number: "number";
2546
+ boolean: "boolean";
2547
+ object: "object";
2548
+ date: "date";
2549
+ array: "array";
2550
+ tuple: "tuple";
2551
+ union: "union";
2552
+ enum: "enum";
2553
+ pattern: "pattern";
2554
+ trait: "trait";
2555
+ event: "event";
2556
+ node: "node";
2557
+ url: "url";
2558
+ field: "field";
2559
+ timestamp: "timestamp";
2560
+ image: "image";
2561
+ slot: "slot";
2562
+ datetime: "datetime";
2563
+ instant: "instant";
2564
+ email: "email";
2565
+ phone: "phone";
2566
+ uuid: "uuid";
2567
+ bytes: "bytes";
2568
+ EventAddress: "EventAddress";
2569
+ CallKey: "CallKey";
2570
+ SExpr: "SExpr";
2571
+ }>, z.ZodCustom<`$${string}`, `$${string}`>]>;
2572
+ description: z.ZodOptional<z.ZodString>;
2573
+ }, z.core.$strip>>>;
2574
+ dataEntities: z.ZodOptional<z.ZodArray<z.ZodObject<{
2575
+ name: z.ZodString;
2576
+ collection: z.ZodOptional<z.ZodString>;
2577
+ fields: z.ZodArray<z.ZodType<TraitEntityField, object, z.core.$ZodTypeInternals<TraitEntityField, object>>>;
2578
+ timestamps: z.ZodOptional<z.ZodBoolean>;
2579
+ description: z.ZodOptional<z.ZodString>;
2580
+ runtime: z.ZodOptional<z.ZodBoolean>;
2581
+ singleton: z.ZodOptional<z.ZodBoolean>;
2582
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
2583
+ }, z.core.$strip>>>;
2584
+ stateMachine: z.ZodOptional<z.ZodObject<{
2585
+ states: z.ZodArray<z.ZodObject<{
2586
+ name: z.ZodString;
2587
+ isInitial: z.ZodOptional<z.ZodBoolean>;
2588
+ isTerminal: z.ZodOptional<z.ZodBoolean>;
2589
+ isFinal: z.ZodOptional<z.ZodBoolean>;
2590
+ description: z.ZodOptional<z.ZodString>;
2591
+ onEntry: z.ZodOptional<z.ZodArray<z.ZodString>>;
2592
+ onExit: z.ZodOptional<z.ZodArray<z.ZodString>>;
2593
+ holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2594
+ }, z.core.$strip>>;
2595
+ events: z.ZodArray<z.ZodObject<{
2596
+ key: z.ZodString;
2597
+ id: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2598
+ name: z.ZodString;
2599
+ description: z.ZodOptional<z.ZodString>;
2600
+ synonyms: z.ZodOptional<z.ZodString>;
2601
+ tier: z.ZodOptional<z.ZodString>;
2602
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
2603
+ payloadEntity: z.ZodOptional<z.ZodString>;
2604
+ input: z.ZodOptional<z.ZodBoolean>;
2605
+ listened: z.ZodOptional<z.ZodBoolean>;
2606
+ inbound: z.ZodOptional<z.ZodObject<{
2607
+ name: z.ZodString;
2608
+ answers: z.ZodString;
2609
+ verifies: z.ZodOptional<z.ZodObject<{
2610
+ header: z.ZodString;
2611
+ credential: z.ZodString;
2612
+ }, z.core.$strip>>;
2613
+ }, z.core.$strip>>;
2614
+ classification: z.ZodOptional<z.ZodEnum<{
2615
+ domain: "domain";
2616
+ system: "system";
2617
+ }>>;
2618
+ semanticRole: z.ZodOptional<z.ZodString>;
2619
+ }, z.core.$strip>>;
2620
+ transitions: z.ZodArray<z.ZodObject<{
2621
+ from: z.ZodString;
2622
+ to: z.ZodString;
2623
+ event: z.ZodString;
2624
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2625
+ guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
2626
+ effects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
2627
+ ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
2628
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2629
+ awaitRender: z.ZodOptional<z.ZodArray<z.ZodObject<{
2630
+ trait: z.ZodString;
2631
+ slot: z.ZodString;
2632
+ skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
2633
+ }, z.core.$strip>>>;
2634
+ }, z.core.$strip>>;
2635
+ guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
2636
+ name: z.ZodString;
2637
+ expression: z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>;
2638
+ description: z.ZodOptional<z.ZodString>;
2639
+ }, z.core.$strip>>>;
2640
+ }, z.core.$strip>>;
2641
+ initialEffects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
2642
+ ticks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2643
+ name: z.ZodString;
2644
+ description: z.ZodOptional<z.ZodString>;
2645
+ priority: z.ZodOptional<z.ZodNumber>;
2646
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"frame">, z.ZodNumber, z.ZodString]>;
2647
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
2648
+ runsInBackground: z.ZodOptional<z.ZodBoolean>;
2649
+ whileVisible: z.ZodOptional<z.ZodBoolean>;
2650
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
2651
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<PageId, string, z.core.$ZodTypeInternals<PageId, string>>>>;
2652
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2653
+ effects: z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>;
2654
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
2655
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
2656
+ }, z.core.$strip>>>;
2657
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
2658
+ event: z.ZodString;
2659
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2660
+ description: z.ZodOptional<z.ZodString>;
2661
+ synonyms: z.ZodOptional<z.ZodString>;
2662
+ tier: z.ZodOptional<z.ZodString>;
2663
+ definerKnob: z.ZodOptional<z.ZodString>;
2664
+ scopeOverridden: z.ZodOptional<z.ZodBoolean>;
2665
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
2666
+ payloadEntity: z.ZodOptional<z.ZodString>;
2667
+ scope: z.ZodOptional<z.ZodEnum<{
2668
+ external: "external";
2669
+ internal: "internal";
2670
+ }>>;
2671
+ }, z.core.$strip>>>;
2672
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
2673
+ event: z.ZodString;
2674
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2675
+ triggers: z.ZodString;
2676
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2677
+ description: z.ZodOptional<z.ZodString>;
2678
+ synonyms: z.ZodOptional<z.ZodString>;
2679
+ tier: z.ZodOptional<z.ZodString>;
2680
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2681
+ scope: z.ZodOptional<z.ZodEnum<{
2682
+ external: "external";
2683
+ internal: "internal";
2684
+ }>>;
2685
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
2686
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2687
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2688
+ kind: z.ZodLiteral<"any">;
2689
+ }, z.core.$strip>, z.ZodObject<{
2690
+ kind: z.ZodLiteral<"trait">;
2691
+ trait: z.ZodString;
2692
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2693
+ }, z.core.$strip>, z.ZodObject<{
2694
+ kind: z.ZodLiteral<"orbital">;
2695
+ orbital: z.ZodString;
2696
+ trait: z.ZodString;
2697
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
2698
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2699
+ }, z.core.$strip>]>>;
2700
+ }, z.core.$strip>>>;
2701
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2702
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2703
+ presentation: z.ZodEnum<{
2704
+ modal: "modal";
2705
+ drawer: "drawer";
2706
+ "confirm-dialog": "confirm-dialog";
2707
+ popover: "popover";
2708
+ inline: "inline";
2709
+ }>;
2710
+ content: z.ZodUnion<readonly [z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>, z.ZodArray<z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>>]>;
2711
+ props: z.ZodOptional<z.ZodObject<{
2712
+ size: z.ZodOptional<z.ZodEnum<{
2713
+ md: "md";
2714
+ sm: "sm";
2715
+ full: "full";
2716
+ lg: "lg";
2717
+ xl: "xl";
2718
+ }>>;
2719
+ position: z.ZodOptional<z.ZodEnum<{
2720
+ right: "right";
2721
+ center: "center";
2722
+ top: "top";
2723
+ bottom: "bottom";
2724
+ left: "left";
2725
+ }>>;
2726
+ title: z.ZodOptional<z.ZodString>;
2727
+ closable: z.ZodOptional<z.ZodBoolean>;
2728
+ width: z.ZodOptional<z.ZodString>;
2729
+ showProgress: z.ZodOptional<z.ZodBoolean>;
2730
+ step: z.ZodOptional<z.ZodNumber>;
2731
+ totalSteps: z.ZodOptional<z.ZodNumber>;
2732
+ }, z.core.$strip>>;
2733
+ }, z.core.$strip>>>;
2734
+ config: z.ZodOptional<z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>>;
2735
+ sourceBehavior: z.ZodOptional<z.ZodObject<{
2736
+ behavior: z.ZodString;
2737
+ alias: z.ZodString;
2738
+ originalName: z.ZodString;
2739
+ }, z.core.$strip>>;
2740
+ sourceDeclaration: z.ZodOptional<z.ZodObject<{
2741
+ traitId: z.ZodString;
2742
+ fingerprint: z.ZodString;
2743
+ }, z.core.$strip>>;
2744
+ sourceEntityDefinition: z.ZodOptional<z.ZodObject<{
2745
+ name: z.ZodString;
2746
+ id: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
2747
+ persistence: z.ZodDefault<z.ZodEnum<{
2748
+ persistent: "persistent";
2749
+ runtime: "runtime";
2750
+ }>>;
2751
+ shared: z.ZodOptional<z.ZodBoolean>;
2752
+ identity: z.ZodOptional<z.ZodBoolean>;
2753
+ browser: z.ZodOptional<z.ZodBoolean>;
2754
+ store: z.ZodOptional<z.ZodString>;
2755
+ read_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2756
+ create_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2757
+ update_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2758
+ delete_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2759
+ access_waivers: z.ZodOptional<z.ZodObject<{
2760
+ read: z.ZodOptional<z.ZodString>;
2761
+ create: z.ZodOptional<z.ZodString>;
2762
+ update: z.ZodOptional<z.ZodString>;
2763
+ delete: z.ZodOptional<z.ZodString>;
2764
+ }, z.core.$strip>>;
2765
+ invariants: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
2766
+ indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2767
+ fields: z.ZodArray<z.ZodString>;
2768
+ orderBy: z.ZodOptional<z.ZodString>;
2769
+ }, z.core.$strict>>>;
2770
+ collection: z.ZodOptional<z.ZodString>;
2771
+ fields: z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>;
2772
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
2773
+ localeInstances: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>>;
2774
+ timestamps: z.ZodOptional<z.ZodBoolean>;
2775
+ softDelete: z.ZodOptional<z.ZodBoolean>;
2776
+ description: z.ZodOptional<z.ZodString>;
2777
+ visual_prompt: z.ZodOptional<z.ZodString>;
2778
+ assetRef: z.ZodOptional<z.ZodObject<{
2779
+ role: z.ZodString;
2780
+ category: z.ZodString;
2781
+ animations: z.ZodOptional<z.ZodArray<z.ZodString>>;
2782
+ style: z.ZodOptional<z.ZodEnum<{
2783
+ isometric: "isometric";
2784
+ pixel: "pixel";
2785
+ vector: "vector";
2786
+ hd: "hd";
2787
+ "1-bit": "1-bit";
2788
+ }>>;
2789
+ variant: z.ZodOptional<z.ZodString>;
2790
+ dimension: z.ZodOptional<z.ZodEnum<{
2791
+ "2d": "2d";
2792
+ "3d": "3d";
2793
+ }>>;
2794
+ aspect: z.ZodOptional<z.ZodEnum<{
2795
+ "1:1": "1:1";
2796
+ "16:9": "16:9";
2797
+ "5:7": "5:7";
2798
+ "8:1": "8:1";
2799
+ "4:1": "4:1";
2800
+ "5:3": "5:3";
2801
+ "1:2": "1:2";
2802
+ }>>;
2803
+ }, z.core.$strip>>;
2804
+ }, z.core.$strip>>;
2805
+ typeParams: z.ZodOptional<z.ZodArray<z.ZodType<TraitTypeParamDef, unknown, z.core.$ZodTypeInternals<TraitTypeParamDef, unknown>>>>;
2806
+ }, z.core.$strip>]>;
2807
+ /**
2808
+ * Check if a trait ref is an inline Trait definition
2809
+ */
2810
+ /**
2811
+ * Checks if a trait reference is an inline trait definition.
2812
+ *
2813
+ * Type guard to determine if a TraitRef is an inline trait object
2814
+ * (with 'name' property) rather than a string reference or object reference.
2815
+ *
2816
+ * @param {TraitRef} traitRef - Trait reference to check
2817
+ * @returns {boolean} True if traitRef is an inline trait, false otherwise
2818
+ *
2819
+ * @example
2820
+ * isInlineTrait({ name: 'MyTrait' }); // returns true (inline)
2821
+ * isInlineTrait('MyTrait'); // returns false (string reference)
2822
+ * isInlineTrait({ ref: 'MyTrait' }); // returns false (object reference)
2823
+ */
2824
+ declare function isInlineTrait(traitRef: TraitRef): traitRef is Trait;
2825
+ /**
2826
+ * Extracts the trait name from a trait reference.
2827
+ *
2828
+ * Handles all trait reference formats (string, inline object, object reference)
2829
+ * and returns the canonical trait name.
2830
+ *
2831
+ * @param {TraitRef} traitRef - Trait reference to extract name from
2832
+ * @returns {string} Trait name
2833
+ *
2834
+ * @example
2835
+ * getTraitName('MyTrait'); // returns 'MyTrait'
2836
+ * getTraitName({ name: 'MyTrait' }); // returns 'MyTrait'
2837
+ * getTraitName({ ref: 'MyTrait' }); // returns 'MyTrait'
2838
+ */
2839
+ declare function getTraitName(traitRef: TraitRef): string;
2840
+ /**
2841
+ * Extracts the configuration from a trait reference.
2842
+ *
2843
+ * Returns the configuration object for trait references that support it
2844
+ * (object references with 'config' property). Returns undefined for
2845
+ * string references and inline traits.
2846
+ *
2847
+ * @param {TraitRef} traitRef - Trait reference to extract config from
2848
+ * @returns {TraitConfig | undefined} Trait configuration or undefined
2849
+ *
2850
+ * @example
2851
+ * getTraitConfig('MyTrait'); // returns undefined
2852
+ * getTraitConfig({ name: 'MyTrait' }); // returns undefined
2853
+ * getTraitConfig({ ref: 'MyTrait', config: { option: 'value' } }); // returns config object
2854
+ */
2855
+ declare function getTraitConfig(traitRef: TraitRef): CallSiteConfig | undefined;
2856
+ /**
2857
+ * Normalizes a trait reference to object form.
2858
+ *
2859
+ * Converts any trait reference format (string, inline, object) to a
2860
+ * standardized object format with 'ref' and optional 'config' properties.
2861
+ *
2862
+ * @param {TraitRef} traitRef - Trait reference to normalize
2863
+ * @returns {{ ref: string; config?: TraitConfig }} Normalized trait reference
2864
+ *
2865
+ * @example
2866
+ * normalizeTraitRef('MyTrait'); // returns { ref: 'MyTrait' }
2867
+ * normalizeTraitRef({ name: 'MyTrait' }); // returns { ref: 'MyTrait' }
2868
+ * normalizeTraitRef({ ref: 'MyTrait', config: {...} }); // returns original
2869
+ */
2870
+ declare function normalizeTraitRef(traitRef: TraitRef): {
2871
+ ref: string;
2872
+ config?: CallSiteConfig;
2873
+ };
2874
+ type TraitInput = z.input<typeof TraitSchema>;
2875
+ type TraitReferenceInput = z.input<typeof TraitReferenceSchema>;
2876
+ type OrbitalTraitRef = TraitRef;
2877
+ declare const OrbitalTraitRefSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2878
+ ref: z.ZodString;
2879
+ refId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2880
+ id: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2881
+ from: z.ZodOptional<z.ZodString>;
2882
+ linkedEntity: z.ZodOptional<z.ZodString>;
2883
+ linkedEntityId: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
2884
+ name: z.ZodOptional<z.ZodString>;
2885
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2886
+ eventIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
2887
+ _resolved: z.ZodOptional<z.ZodLazy<z.ZodObject<{
2888
+ id: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
2889
+ name: z.ZodString;
2890
+ description: z.ZodOptional<z.ZodString>;
2891
+ description_visual_prompt: z.ZodOptional<z.ZodString>;
2892
+ entityRebindable: z.ZodOptional<z.ZodBoolean>;
2893
+ entityContract: z.ZodOptional<z.ZodObject<{
2894
+ requires: z.ZodArray<z.ZodString>;
2895
+ provides: z.ZodArray<z.ZodString>;
2896
+ }, z.core.$strip>>;
2897
+ effectRow: z.ZodOptional<z.ZodArray<z.ZodObject<{
2898
+ kind: z.ZodString;
2899
+ resource: z.ZodOptional<z.ZodString>;
2900
+ resolved: z.ZodOptional<z.ZodBoolean>;
2901
+ site: z.ZodOptional<z.ZodEnum<{
2902
+ transition: "transition";
2903
+ tick: "tick";
2904
+ }>>;
2905
+ }, z.core.$strip>>>;
2906
+ entityBindingDescription: z.ZodOptional<z.ZodString>;
2907
+ entityBindingSynonyms: z.ZodOptional<z.ZodString>;
2908
+ dispatch: z.ZodOptional<z.ZodEnum<{
2909
+ client: "client";
2910
+ optimistic: "optimistic";
2911
+ server: "server";
2912
+ }>>;
2913
+ linkedEntity: z.ZodOptional<z.ZodString>;
2914
+ linkedEntityId: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
2915
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>>;
2916
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>>;
2917
+ requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2918
+ name: z.ZodString;
2919
+ type: z.ZodUnion<readonly [z.ZodEnum<{
2920
+ string: "string";
2921
+ number: "number";
2922
+ boolean: "boolean";
2923
+ object: "object";
2924
+ date: "date";
2925
+ array: "array";
2926
+ tuple: "tuple";
2927
+ union: "union";
2928
+ enum: "enum";
2929
+ pattern: "pattern";
2930
+ trait: "trait";
2931
+ event: "event";
2932
+ node: "node";
2933
+ url: "url";
2934
+ field: "field";
2935
+ timestamp: "timestamp";
2936
+ image: "image";
2937
+ slot: "slot";
2938
+ datetime: "datetime";
2939
+ instant: "instant";
2940
+ email: "email";
2941
+ phone: "phone";
2942
+ uuid: "uuid";
2943
+ bytes: "bytes";
2944
+ EventAddress: "EventAddress";
2945
+ CallKey: "CallKey";
2946
+ SExpr: "SExpr";
2947
+ }>, z.ZodCustom<`$${string}`, `$${string}`>]>;
2948
+ description: z.ZodOptional<z.ZodString>;
2949
+ }, z.core.$strip>>>;
2950
+ dataEntities: z.ZodOptional<z.ZodArray<z.ZodObject<{
2951
+ name: z.ZodString;
2952
+ collection: z.ZodOptional<z.ZodString>;
2953
+ fields: z.ZodArray<z.ZodType<TraitEntityField, object, z.core.$ZodTypeInternals<TraitEntityField, object>>>;
2954
+ timestamps: z.ZodOptional<z.ZodBoolean>;
2955
+ description: z.ZodOptional<z.ZodString>;
2956
+ runtime: z.ZodOptional<z.ZodBoolean>;
2957
+ singleton: z.ZodOptional<z.ZodBoolean>;
2958
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
2959
+ }, z.core.$strip>>>;
2960
+ stateMachine: z.ZodOptional<z.ZodObject<{
2961
+ states: z.ZodArray<z.ZodObject<{
2962
+ name: z.ZodString;
2963
+ isInitial: z.ZodOptional<z.ZodBoolean>;
2964
+ isTerminal: z.ZodOptional<z.ZodBoolean>;
2965
+ isFinal: z.ZodOptional<z.ZodBoolean>;
2966
+ description: z.ZodOptional<z.ZodString>;
2967
+ onEntry: z.ZodOptional<z.ZodArray<z.ZodString>>;
2968
+ onExit: z.ZodOptional<z.ZodArray<z.ZodString>>;
2969
+ holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2970
+ }, z.core.$strip>>;
2971
+ events: z.ZodArray<z.ZodObject<{
2972
+ key: z.ZodString;
2973
+ id: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
2974
+ name: z.ZodString;
2975
+ description: z.ZodOptional<z.ZodString>;
2976
+ synonyms: z.ZodOptional<z.ZodString>;
2977
+ tier: z.ZodOptional<z.ZodString>;
2978
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
2979
+ payloadEntity: z.ZodOptional<z.ZodString>;
2980
+ input: z.ZodOptional<z.ZodBoolean>;
2981
+ listened: z.ZodOptional<z.ZodBoolean>;
2982
+ inbound: z.ZodOptional<z.ZodObject<{
2983
+ name: z.ZodString;
2984
+ answers: z.ZodString;
2985
+ verifies: z.ZodOptional<z.ZodObject<{
2986
+ header: z.ZodString;
2987
+ credential: z.ZodString;
2988
+ }, z.core.$strip>>;
2989
+ }, z.core.$strip>>;
2990
+ classification: z.ZodOptional<z.ZodEnum<{
2991
+ domain: "domain";
2992
+ system: "system";
2993
+ }>>;
2994
+ semanticRole: z.ZodOptional<z.ZodString>;
2995
+ }, z.core.$strip>>;
2996
+ transitions: z.ZodArray<z.ZodObject<{
2997
+ from: z.ZodString;
2998
+ to: z.ZodString;
2999
+ event: z.ZodString;
3000
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3001
+ guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
3002
+ effects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
3003
+ ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
3004
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3005
+ awaitRender: z.ZodOptional<z.ZodArray<z.ZodObject<{
3006
+ trait: z.ZodString;
3007
+ slot: z.ZodString;
3008
+ skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
3009
+ }, z.core.$strip>>>;
3010
+ }, z.core.$strip>>;
3011
+ guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
3012
+ name: z.ZodString;
3013
+ expression: z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>;
3014
+ description: z.ZodOptional<z.ZodString>;
3015
+ }, z.core.$strip>>>;
3016
+ }, z.core.$strip>>;
3017
+ initialEffects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
3018
+ ticks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3019
+ name: z.ZodString;
3020
+ description: z.ZodOptional<z.ZodString>;
3021
+ priority: z.ZodOptional<z.ZodNumber>;
3022
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"frame">, z.ZodNumber, z.ZodString]>;
3023
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
3024
+ runsInBackground: z.ZodOptional<z.ZodBoolean>;
3025
+ whileVisible: z.ZodOptional<z.ZodBoolean>;
3026
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
3027
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<PageId, string, z.core.$ZodTypeInternals<PageId, string>>>>;
3028
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3029
+ effects: z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>;
3030
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
3031
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
3032
+ }, z.core.$strip>>>;
3033
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
3034
+ event: z.ZodString;
3035
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3036
+ description: z.ZodOptional<z.ZodString>;
3037
+ synonyms: z.ZodOptional<z.ZodString>;
3038
+ tier: z.ZodOptional<z.ZodString>;
3039
+ definerKnob: z.ZodOptional<z.ZodString>;
3040
+ scopeOverridden: z.ZodOptional<z.ZodBoolean>;
3041
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
3042
+ payloadEntity: z.ZodOptional<z.ZodString>;
3043
+ scope: z.ZodOptional<z.ZodEnum<{
3044
+ external: "external";
3045
+ internal: "internal";
3046
+ }>>;
3047
+ }, z.core.$strip>>>;
3048
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
3049
+ event: z.ZodString;
3050
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3051
+ triggers: z.ZodString;
3052
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3053
+ description: z.ZodOptional<z.ZodString>;
3054
+ synonyms: z.ZodOptional<z.ZodString>;
3055
+ tier: z.ZodOptional<z.ZodString>;
3056
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3057
+ scope: z.ZodOptional<z.ZodEnum<{
3058
+ external: "external";
3059
+ internal: "internal";
3060
+ }>>;
3061
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
3062
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3063
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3064
+ kind: z.ZodLiteral<"any">;
3065
+ }, z.core.$strip>, z.ZodObject<{
3066
+ kind: z.ZodLiteral<"trait">;
3067
+ trait: z.ZodString;
3068
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
3069
+ }, z.core.$strip>, z.ZodObject<{
3070
+ kind: z.ZodLiteral<"orbital">;
3071
+ orbital: z.ZodString;
3072
+ trait: z.ZodString;
3073
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
3074
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
3075
+ }, z.core.$strip>]>>;
3076
+ }, z.core.$strip>>>;
3077
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3078
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3079
+ presentation: z.ZodEnum<{
3080
+ modal: "modal";
3081
+ drawer: "drawer";
3082
+ "confirm-dialog": "confirm-dialog";
3083
+ popover: "popover";
3084
+ inline: "inline";
3085
+ }>;
3086
+ content: z.ZodUnion<readonly [z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>, z.ZodArray<z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>>]>;
3087
+ props: z.ZodOptional<z.ZodObject<{
3088
+ size: z.ZodOptional<z.ZodEnum<{
3089
+ md: "md";
3090
+ sm: "sm";
3091
+ full: "full";
3092
+ lg: "lg";
3093
+ xl: "xl";
3094
+ }>>;
3095
+ position: z.ZodOptional<z.ZodEnum<{
3096
+ right: "right";
3097
+ center: "center";
3098
+ top: "top";
3099
+ bottom: "bottom";
3100
+ left: "left";
3101
+ }>>;
3102
+ title: z.ZodOptional<z.ZodString>;
3103
+ closable: z.ZodOptional<z.ZodBoolean>;
3104
+ width: z.ZodOptional<z.ZodString>;
3105
+ showProgress: z.ZodOptional<z.ZodBoolean>;
3106
+ step: z.ZodOptional<z.ZodNumber>;
3107
+ totalSteps: z.ZodOptional<z.ZodNumber>;
3108
+ }, z.core.$strip>>;
3109
+ }, z.core.$strip>>>;
3110
+ config: z.ZodOptional<z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>>;
3111
+ sourceBehavior: z.ZodOptional<z.ZodObject<{
3112
+ behavior: z.ZodString;
3113
+ alias: z.ZodString;
3114
+ originalName: z.ZodString;
3115
+ }, z.core.$strip>>;
3116
+ sourceDeclaration: z.ZodOptional<z.ZodObject<{
3117
+ traitId: z.ZodString;
3118
+ fingerprint: z.ZodString;
3119
+ }, z.core.$strip>>;
3120
+ sourceEntityDefinition: z.ZodOptional<z.ZodObject<{
3121
+ name: z.ZodString;
3122
+ id: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
3123
+ persistence: z.ZodDefault<z.ZodEnum<{
3124
+ persistent: "persistent";
3125
+ runtime: "runtime";
3126
+ }>>;
3127
+ shared: z.ZodOptional<z.ZodBoolean>;
3128
+ identity: z.ZodOptional<z.ZodBoolean>;
3129
+ browser: z.ZodOptional<z.ZodBoolean>;
3130
+ store: z.ZodOptional<z.ZodString>;
3131
+ read_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3132
+ create_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3133
+ update_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3134
+ delete_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3135
+ access_waivers: z.ZodOptional<z.ZodObject<{
3136
+ read: z.ZodOptional<z.ZodString>;
3137
+ create: z.ZodOptional<z.ZodString>;
3138
+ update: z.ZodOptional<z.ZodString>;
3139
+ delete: z.ZodOptional<z.ZodString>;
3140
+ }, z.core.$strip>>;
3141
+ invariants: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
3142
+ indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3143
+ fields: z.ZodArray<z.ZodString>;
3144
+ orderBy: z.ZodOptional<z.ZodString>;
3145
+ }, z.core.$strict>>>;
3146
+ collection: z.ZodOptional<z.ZodString>;
3147
+ fields: z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>;
3148
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
3149
+ localeInstances: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>>;
3150
+ timestamps: z.ZodOptional<z.ZodBoolean>;
3151
+ softDelete: z.ZodOptional<z.ZodBoolean>;
3152
+ description: z.ZodOptional<z.ZodString>;
3153
+ visual_prompt: z.ZodOptional<z.ZodString>;
3154
+ assetRef: z.ZodOptional<z.ZodObject<{
3155
+ role: z.ZodString;
3156
+ category: z.ZodString;
3157
+ animations: z.ZodOptional<z.ZodArray<z.ZodString>>;
3158
+ style: z.ZodOptional<z.ZodEnum<{
3159
+ isometric: "isometric";
3160
+ pixel: "pixel";
3161
+ vector: "vector";
3162
+ hd: "hd";
3163
+ "1-bit": "1-bit";
3164
+ }>>;
3165
+ variant: z.ZodOptional<z.ZodString>;
3166
+ dimension: z.ZodOptional<z.ZodEnum<{
3167
+ "2d": "2d";
3168
+ "3d": "3d";
3169
+ }>>;
3170
+ aspect: z.ZodOptional<z.ZodEnum<{
3171
+ "1:1": "1:1";
3172
+ "16:9": "16:9";
3173
+ "5:7": "5:7";
3174
+ "8:1": "8:1";
3175
+ "4:1": "4:1";
3176
+ "5:3": "5:3";
3177
+ "1:2": "1:2";
3178
+ }>>;
3179
+ }, z.core.$strip>>;
3180
+ }, z.core.$strip>>;
3181
+ typeParams: z.ZodOptional<z.ZodArray<z.ZodType<TraitTypeParamDef, unknown, z.core.$ZodTypeInternals<TraitTypeParamDef, unknown>>>>;
3182
+ }, z.core.$strip>>>;
3183
+ typeArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3184
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3185
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodType<ConfigFieldDeclaration, object, z.core.$ZodTypeInternals<ConfigFieldDeclaration, object>>, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>]>>>;
3186
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
3187
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
3188
+ event: z.ZodString;
3189
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3190
+ triggers: z.ZodString;
3191
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3192
+ description: z.ZodOptional<z.ZodString>;
3193
+ synonyms: z.ZodOptional<z.ZodString>;
3194
+ tier: z.ZodOptional<z.ZodString>;
3195
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3196
+ scope: z.ZodOptional<z.ZodEnum<{
3197
+ external: "external";
3198
+ internal: "internal";
3199
+ }>>;
3200
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
3201
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3202
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3203
+ kind: z.ZodLiteral<"any">;
3204
+ }, z.core.$strip>, z.ZodObject<{
3205
+ kind: z.ZodLiteral<"trait">;
3206
+ trait: z.ZodString;
3207
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
3208
+ }, z.core.$strip>, z.ZodObject<{
3209
+ kind: z.ZodLiteral<"orbital">;
3210
+ orbital: z.ZodString;
3211
+ trait: z.ZodString;
3212
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
3213
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
3214
+ }, z.core.$strip>]>>;
3215
+ }, z.core.$strip>>>;
3216
+ emitsScope: z.ZodOptional<z.ZodEnum<{
3217
+ external: "external";
3218
+ internal: "internal";
3219
+ }>>;
3220
+ effects: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>>;
3221
+ }, z.core.$strip>, z.ZodObject<{
3222
+ id: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
3223
+ name: z.ZodString;
3224
+ description: z.ZodOptional<z.ZodString>;
3225
+ description_visual_prompt: z.ZodOptional<z.ZodString>;
3226
+ entityRebindable: z.ZodOptional<z.ZodBoolean>;
3227
+ entityContract: z.ZodOptional<z.ZodObject<{
3228
+ requires: z.ZodArray<z.ZodString>;
3229
+ provides: z.ZodArray<z.ZodString>;
3230
+ }, z.core.$strip>>;
3231
+ effectRow: z.ZodOptional<z.ZodArray<z.ZodObject<{
3232
+ kind: z.ZodString;
3233
+ resource: z.ZodOptional<z.ZodString>;
3234
+ resolved: z.ZodOptional<z.ZodBoolean>;
3235
+ site: z.ZodOptional<z.ZodEnum<{
3236
+ transition: "transition";
3237
+ tick: "tick";
3238
+ }>>;
3239
+ }, z.core.$strip>>>;
3240
+ entityBindingDescription: z.ZodOptional<z.ZodString>;
3241
+ entityBindingSynonyms: z.ZodOptional<z.ZodString>;
3242
+ dispatch: z.ZodOptional<z.ZodEnum<{
3243
+ client: "client";
3244
+ optimistic: "optimistic";
3245
+ server: "server";
3246
+ }>>;
3247
+ linkedEntity: z.ZodOptional<z.ZodString>;
3248
+ linkedEntityId: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
3249
+ entityRefIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>>;
3250
+ traitEmbedIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>>;
3251
+ requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
3252
+ name: z.ZodString;
3253
+ type: z.ZodUnion<readonly [z.ZodEnum<{
3254
+ string: "string";
3255
+ number: "number";
3256
+ boolean: "boolean";
3257
+ object: "object";
3258
+ date: "date";
3259
+ array: "array";
3260
+ tuple: "tuple";
3261
+ union: "union";
3262
+ enum: "enum";
3263
+ pattern: "pattern";
3264
+ trait: "trait";
3265
+ event: "event";
3266
+ node: "node";
3267
+ url: "url";
3268
+ field: "field";
3269
+ timestamp: "timestamp";
3270
+ image: "image";
3271
+ slot: "slot";
3272
+ datetime: "datetime";
3273
+ instant: "instant";
3274
+ email: "email";
3275
+ phone: "phone";
3276
+ uuid: "uuid";
3277
+ bytes: "bytes";
3278
+ EventAddress: "EventAddress";
3279
+ CallKey: "CallKey";
3280
+ SExpr: "SExpr";
3281
+ }>, z.ZodCustom<`$${string}`, `$${string}`>]>;
3282
+ description: z.ZodOptional<z.ZodString>;
3283
+ }, z.core.$strip>>>;
3284
+ dataEntities: z.ZodOptional<z.ZodArray<z.ZodObject<{
3285
+ name: z.ZodString;
3286
+ collection: z.ZodOptional<z.ZodString>;
3287
+ fields: z.ZodArray<z.ZodType<TraitEntityField, object, z.core.$ZodTypeInternals<TraitEntityField, object>>>;
3288
+ timestamps: z.ZodOptional<z.ZodBoolean>;
3289
+ description: z.ZodOptional<z.ZodString>;
3290
+ runtime: z.ZodOptional<z.ZodBoolean>;
3291
+ singleton: z.ZodOptional<z.ZodBoolean>;
3292
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
3293
+ }, z.core.$strip>>>;
3294
+ stateMachine: z.ZodOptional<z.ZodObject<{
3295
+ states: z.ZodArray<z.ZodObject<{
3296
+ name: z.ZodString;
3297
+ isInitial: z.ZodOptional<z.ZodBoolean>;
3298
+ isTerminal: z.ZodOptional<z.ZodBoolean>;
3299
+ isFinal: z.ZodOptional<z.ZodBoolean>;
3300
+ description: z.ZodOptional<z.ZodString>;
3301
+ onEntry: z.ZodOptional<z.ZodArray<z.ZodString>>;
3302
+ onExit: z.ZodOptional<z.ZodArray<z.ZodString>>;
3303
+ holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3304
+ }, z.core.$strip>>;
3305
+ events: z.ZodArray<z.ZodObject<{
3306
+ key: z.ZodString;
3307
+ id: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3308
+ name: z.ZodString;
3309
+ description: z.ZodOptional<z.ZodString>;
3310
+ synonyms: z.ZodOptional<z.ZodString>;
3311
+ tier: z.ZodOptional<z.ZodString>;
3312
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
3313
+ payloadEntity: z.ZodOptional<z.ZodString>;
3314
+ input: z.ZodOptional<z.ZodBoolean>;
3315
+ listened: z.ZodOptional<z.ZodBoolean>;
3316
+ inbound: z.ZodOptional<z.ZodObject<{
3317
+ name: z.ZodString;
3318
+ answers: z.ZodString;
3319
+ verifies: z.ZodOptional<z.ZodObject<{
3320
+ header: z.ZodString;
3321
+ credential: z.ZodString;
3322
+ }, z.core.$strip>>;
3323
+ }, z.core.$strip>>;
3324
+ classification: z.ZodOptional<z.ZodEnum<{
3325
+ domain: "domain";
3326
+ system: "system";
3327
+ }>>;
3328
+ semanticRole: z.ZodOptional<z.ZodString>;
3329
+ }, z.core.$strip>>;
3330
+ transitions: z.ZodArray<z.ZodObject<{
3331
+ from: z.ZodString;
3332
+ to: z.ZodString;
3333
+ event: z.ZodString;
3334
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3335
+ guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
3336
+ effects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
3337
+ ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
3338
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3339
+ awaitRender: z.ZodOptional<z.ZodArray<z.ZodObject<{
3340
+ trait: z.ZodString;
3341
+ slot: z.ZodString;
3342
+ skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
3343
+ }, z.core.$strip>>>;
3344
+ }, z.core.$strip>>;
3345
+ guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
3346
+ name: z.ZodString;
3347
+ expression: z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>;
3348
+ description: z.ZodOptional<z.ZodString>;
3349
+ }, z.core.$strip>>>;
3350
+ }, z.core.$strip>>;
3351
+ initialEffects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
3352
+ ticks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3353
+ name: z.ZodString;
3354
+ description: z.ZodOptional<z.ZodString>;
3355
+ priority: z.ZodOptional<z.ZodNumber>;
3356
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"frame">, z.ZodNumber, z.ZodString]>;
3357
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
3358
+ runsInBackground: z.ZodOptional<z.ZodBoolean>;
3359
+ whileVisible: z.ZodOptional<z.ZodBoolean>;
3360
+ pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
3361
+ pageIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<PageId, string, z.core.$ZodTypeInternals<PageId, string>>>>;
3362
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3363
+ effects: z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>;
3364
+ emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
3365
+ emitIds: z.ZodOptional<z.ZodArray<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>>;
3366
+ }, z.core.$strip>>>;
3367
+ emits: z.ZodOptional<z.ZodArray<z.ZodObject<{
3368
+ event: z.ZodString;
3369
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3370
+ description: z.ZodOptional<z.ZodString>;
3371
+ synonyms: z.ZodOptional<z.ZodString>;
3372
+ tier: z.ZodOptional<z.ZodString>;
3373
+ definerKnob: z.ZodOptional<z.ZodString>;
3374
+ scopeOverridden: z.ZodOptional<z.ZodBoolean>;
3375
+ payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
3376
+ payloadEntity: z.ZodOptional<z.ZodString>;
3377
+ scope: z.ZodOptional<z.ZodEnum<{
3378
+ external: "external";
3379
+ internal: "internal";
3380
+ }>>;
3381
+ }, z.core.$strip>>>;
3382
+ listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
3383
+ event: z.ZodString;
3384
+ eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3385
+ triggers: z.ZodString;
3386
+ triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
3387
+ description: z.ZodOptional<z.ZodString>;
3388
+ synonyms: z.ZodOptional<z.ZodString>;
3389
+ tier: z.ZodOptional<z.ZodString>;
3390
+ guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3391
+ scope: z.ZodOptional<z.ZodEnum<{
3392
+ external: "external";
3393
+ internal: "internal";
3394
+ }>>;
3395
+ payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
3396
+ key: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3397
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3398
+ kind: z.ZodLiteral<"any">;
3399
+ }, z.core.$strip>, z.ZodObject<{
3400
+ kind: z.ZodLiteral<"trait">;
3401
+ trait: z.ZodString;
3402
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
3403
+ }, z.core.$strip>, z.ZodObject<{
3404
+ kind: z.ZodLiteral<"orbital">;
3405
+ orbital: z.ZodString;
3406
+ trait: z.ZodString;
3407
+ orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
3408
+ traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
3409
+ }, z.core.$strip>]>>;
3410
+ }, z.core.$strip>>>;
3411
+ events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3412
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
3413
+ presentation: z.ZodEnum<{
3414
+ modal: "modal";
3415
+ drawer: "drawer";
3416
+ "confirm-dialog": "confirm-dialog";
3417
+ popover: "popover";
3418
+ inline: "inline";
3419
+ }>;
3420
+ content: z.ZodUnion<readonly [z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>, z.ZodArray<z.ZodType<AnyPatternConfig, unknown, z.core.$ZodTypeInternals<AnyPatternConfig, unknown>>>]>;
3421
+ props: z.ZodOptional<z.ZodObject<{
3422
+ size: z.ZodOptional<z.ZodEnum<{
3423
+ md: "md";
3424
+ sm: "sm";
3425
+ full: "full";
3426
+ lg: "lg";
3427
+ xl: "xl";
3428
+ }>>;
3429
+ position: z.ZodOptional<z.ZodEnum<{
3430
+ right: "right";
3431
+ center: "center";
3432
+ top: "top";
3433
+ bottom: "bottom";
3434
+ left: "left";
3435
+ }>>;
3436
+ title: z.ZodOptional<z.ZodString>;
3437
+ closable: z.ZodOptional<z.ZodBoolean>;
3438
+ width: z.ZodOptional<z.ZodString>;
3439
+ showProgress: z.ZodOptional<z.ZodBoolean>;
3440
+ step: z.ZodOptional<z.ZodNumber>;
3441
+ totalSteps: z.ZodOptional<z.ZodNumber>;
3442
+ }, z.core.$strip>>;
3443
+ }, z.core.$strip>>>;
3444
+ config: z.ZodOptional<z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>>;
3445
+ sourceBehavior: z.ZodOptional<z.ZodObject<{
3446
+ behavior: z.ZodString;
3447
+ alias: z.ZodString;
3448
+ originalName: z.ZodString;
3449
+ }, z.core.$strip>>;
3450
+ sourceDeclaration: z.ZodOptional<z.ZodObject<{
3451
+ traitId: z.ZodString;
3452
+ fingerprint: z.ZodString;
3453
+ }, z.core.$strip>>;
3454
+ sourceEntityDefinition: z.ZodOptional<z.ZodObject<{
3455
+ name: z.ZodString;
3456
+ id: z.ZodOptional<z.ZodString & z.ZodType<EntityId, string, z.core.$ZodTypeInternals<EntityId, string>>>;
3457
+ persistence: z.ZodDefault<z.ZodEnum<{
3458
+ persistent: "persistent";
3459
+ runtime: "runtime";
3460
+ }>>;
3461
+ shared: z.ZodOptional<z.ZodBoolean>;
3462
+ identity: z.ZodOptional<z.ZodBoolean>;
3463
+ browser: z.ZodOptional<z.ZodBoolean>;
3464
+ store: z.ZodOptional<z.ZodString>;
3465
+ read_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3466
+ create_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3467
+ update_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3468
+ delete_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
3469
+ access_waivers: z.ZodOptional<z.ZodObject<{
3470
+ read: z.ZodOptional<z.ZodString>;
3471
+ create: z.ZodOptional<z.ZodString>;
3472
+ update: z.ZodOptional<z.ZodString>;
3473
+ delete: z.ZodOptional<z.ZodString>;
3474
+ }, z.core.$strip>>;
3475
+ invariants: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
3476
+ indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3477
+ fields: z.ZodArray<z.ZodString>;
3478
+ orderBy: z.ZodOptional<z.ZodString>;
3479
+ }, z.core.$strict>>>;
3480
+ collection: z.ZodOptional<z.ZodString>;
3481
+ fields: z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>;
3482
+ instances: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>;
3483
+ localeInstances: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>>>;
3484
+ timestamps: z.ZodOptional<z.ZodBoolean>;
3485
+ softDelete: z.ZodOptional<z.ZodBoolean>;
3486
+ description: z.ZodOptional<z.ZodString>;
3487
+ visual_prompt: z.ZodOptional<z.ZodString>;
3488
+ assetRef: z.ZodOptional<z.ZodObject<{
3489
+ role: z.ZodString;
3490
+ category: z.ZodString;
3491
+ animations: z.ZodOptional<z.ZodArray<z.ZodString>>;
3492
+ style: z.ZodOptional<z.ZodEnum<{
3493
+ isometric: "isometric";
3494
+ pixel: "pixel";
3495
+ vector: "vector";
3496
+ hd: "hd";
3497
+ "1-bit": "1-bit";
3498
+ }>>;
3499
+ variant: z.ZodOptional<z.ZodString>;
3500
+ dimension: z.ZodOptional<z.ZodEnum<{
3501
+ "2d": "2d";
3502
+ "3d": "3d";
3503
+ }>>;
3504
+ aspect: z.ZodOptional<z.ZodEnum<{
3505
+ "1:1": "1:1";
3506
+ "16:9": "16:9";
3507
+ "5:7": "5:7";
3508
+ "8:1": "8:1";
3509
+ "4:1": "4:1";
3510
+ "5:3": "5:3";
3511
+ "1:2": "1:2";
3512
+ }>>;
3513
+ }, z.core.$strip>>;
3514
+ }, z.core.$strip>>;
3515
+ typeParams: z.ZodOptional<z.ZodArray<z.ZodType<TraitTypeParamDef, unknown, z.core.$ZodTypeInternals<TraitTypeParamDef, unknown>>>>;
3516
+ }, z.core.$strip>]>;
3517
+
3518
+ export { EventPayloadFieldSchema as F, EventSchema as G, EventScopeSchema as H, GuardSchema as K, ListenSourceSchema as O, OrbitalTraitRefSchema as R, PayloadFieldSchema as U, PayloadTypeWhenSchema as X, REFERENCE_CONFIG_TYPES as Z, RequiredFieldSchema as a0, SECRET_CONFIG_TYPES as a1, SKELETON_VARIANTS as a2, SkeletonNodeSchema as a4, SkeletonShapeSchema as a6, SkeletonSpecSchema as a8, TransitionSchema as aA, configRefEventKnob as aB, getTraitConfig as aC, getTraitName as aD, isCallSiteConfigDeclaration as aE, isCircuitEvent as aF, isConfigFieldSchema as aG, isConfigRedeclaration as aH, isInlineTrait as aI, isReferenceConfigType as aJ, isSecretConfigType as aK, joinEventAddress as aL, maskSecretConfigValues as aM, normalizeCallSiteConfigToValues as aN, normalizeTraitRef as aO, overrideDeclaredKnobs as aP, payloadTypeContainer as aQ, resolveConfigRefEventName as aR, splitEventAddress as aS, SkeletonVariantSchema as aa, StateMachineSchema as ae, StateSchema as af, TickIntervalSchema as ag, TraitConfigSchema as ah, TraitConfigValueSchema as ai, TraitDataEntitySchema as ak, TraitDispatchModeSchema as al, TraitEntityFieldSchema as am, TraitEventContractSchema as an, TraitEventListenerSchema as ao, TraitRefSchema as aq, TraitReferenceSchema as as, TraitSchema as at, TraitTickSchema as av, TraitUIBindingSchema as ax, mergeCallSiteConfigOverrides as m, AwaitRenderSchema as p, CONFIG_REF_EVENT_PATTERN as q, ConfigFieldDeclarationSchema as s, DeclaredTraitConfigSchema as v, DispatchModeSchema as w, EntityFieldContractSchema as y };
3519
+ export type { RequiredField as $, AwaitRender as A, EventInput as B, ConfigFieldDeclaration as C, DeclaredTraitConfig as D, EventPayloadField as E, Guard as I, GuardInput as J, InboundDeclaration as L, InboundVerification as M, ListenSource as N, PayloadField as P, OrbitalTraitRef as Q, SkeletonNode as S, TraitEventListener as T, PayloadTypeContainer as V, PayloadTypeWhen as W, PresentationType as Y, ReferenceConfigType as _, TraitReference as a, SecretConfigType as a3, SkeletonShape as a5, SkeletonSpec as a7, SkeletonVariant as a9, State as ab, StateInput as ac, StateMachineInput as ad, TraitDataEntity as aj, TraitInput as ap, TraitReferenceInput as ar, TraitTick as au, TraitUIBinding as aw, Transition as ay, TransitionInput as az, TraitConfigValue as b, Trait as c, TraitConfig as d, TraitConfigObject as e, TraitRef as f, EventScope as g, TraitDispatchMode as h, DispatchMode as i, TraitEntityField as j, TraitTypeParamDef as k, CallSiteConfig as l, StateMachine as n, TraitEventContract as o, CallSiteConfigEntry as r, ConfigFieldItemsDeclaration as t, ConfigRefEventError as u, EntityFieldContract as x, Event as z };