@almadar/core 10.129.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) 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-BhnofAik.d.ts} +5966 -7116
  4. package/dist/builders.d.ts +6 -6
  5. package/dist/builders.js +7 -6
  6. package/dist/{bus-CcbB__oo.d.ts → bus-BrRFWDQK.d.ts} +270 -354
  7. package/dist/chunk-347APWFM.js +286 -0
  8. package/dist/chunk-347APWFM.js.map +1 -0
  9. package/dist/chunk-3URQAGD7.js +98 -0
  10. package/dist/chunk-3URQAGD7.js.map +1 -0
  11. package/dist/chunk-7GHJU5WI.js +39 -0
  12. package/dist/chunk-7GHJU5WI.js.map +1 -0
  13. package/dist/chunk-B4MNHGBP.js +8 -0
  14. package/dist/chunk-B4MNHGBP.js.map +1 -0
  15. package/dist/{chunk-KDMV222Q.js → chunk-F6KHUW7T.js} +304 -373
  16. package/dist/chunk-F6KHUW7T.js.map +1 -0
  17. package/dist/chunk-FGT5OS2Y.js +918 -0
  18. package/dist/chunk-FGT5OS2Y.js.map +1 -0
  19. package/dist/chunk-FQLEAMAB.js +24 -0
  20. package/dist/chunk-FQLEAMAB.js.map +1 -0
  21. package/dist/chunk-HEXOGHQ4.js +3264 -0
  22. package/dist/chunk-HEXOGHQ4.js.map +1 -0
  23. package/dist/chunk-JCD6GLBX.js +412 -0
  24. package/dist/chunk-JCD6GLBX.js.map +1 -0
  25. package/dist/{chunk-QUOTJULD.js → chunk-MGLG2XLD.js} +20 -219
  26. package/dist/chunk-MGLG2XLD.js.map +1 -0
  27. package/dist/chunk-MTBEBSNO.js +1293 -0
  28. package/dist/chunk-MTBEBSNO.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-UZPYYI37.js} +524 -26
  32. package/dist/{chunk-RYPVOI6H.js.map → chunk-UZPYYI37.js.map} +1 -1
  33. package/dist/chunk-VG7BRFUD.js +152 -0
  34. package/dist/chunk-VG7BRFUD.js.map +1 -0
  35. package/dist/chunk-Y2DYZPP5.js +2329 -0
  36. package/dist/chunk-Y2DYZPP5.js.map +1 -0
  37. package/dist/chunk-ZEI7C32D.js +1566 -0
  38. package/dist/chunk-ZEI7C32D.js.map +1 -0
  39. package/dist/{domain-Dz3jP-UM.d.ts → domain-CfKPpXCP.d.ts} +51 -51
  40. package/dist/{effect-result-Bebwu9yT.d.ts → effect-result-DPERsn_v.d.ts} +641 -851
  41. package/dist/{effect-CiEVLsZz.d.ts → effect-wP-IdRt2.d.ts} +236 -443
  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-DomgmRBG.d.ts} +29 -729
  54. package/dist/index.d.ts +69 -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 +1205 -1215
  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/index.d.ts +24 -120
  74. package/dist/patterns/index.js +3 -3
  75. package/dist/patterns/patterns-registry.json +522 -24
  76. package/dist/patterns/registry.json +522 -24
  77. package/dist/trait-CzG9M89M.d.ts +3519 -0
  78. package/dist/types/index.d.ts +9 -10
  79. package/dist/types/index.js +11 -5
  80. package/dist/{types-DGwrltUF.d.ts → types-BHlTjwWd.d.ts} +3 -3
  81. package/fixtures/events-wire/client-effects-by-trait/response.json +0 -18
  82. package/fixtures/events-wire/client-effects-provenance/response.json +0 -18
  83. package/fixtures/events-wire/effect-results-every-kind/response.json +2 -27
  84. package/fixtures/events-wire/navigate-1/response.json +8 -5
  85. package/fixtures/events-wire/navigate-2/response.json +11 -8
  86. package/fixtures/events-wire/navigate-3/response.json +14 -11
  87. package/fixtures/events-wire/navigate-back/response.json +7 -4
  88. package/fixtures/events-wire/render-ui-3/response.json +12 -9
  89. package/fixtures/events-wire/render-ui-clear/response.json +0 -7
  90. package/fixtures/events-wire/sse-stream/response.json +0 -20
  91. package/fixtures/events-wire/sse-stream/stream.json +0 -20
  92. package/fixtures/events-wire/stateless-traits/response.json +14 -5
  93. package/fixtures/kernel-wire/golden/basic-entity.json +1687 -0
  94. package/fixtures/kernel-wire/golden/entity-rerender.json +743 -0
  95. package/fixtures/kernel-wire/golden/rollback.json +793 -0
  96. package/fixtures/kernel-wire/golden/tick-counter.json +1538 -0
  97. package/fixtures/kernel-wire/golden/two-orbital-chore.json +847 -0
  98. package/fixtures/kernel-wire/golden/two-orbital-task.json +457 -0
  99. package/fixtures/kernel-wire/played-step.json +136 -0
  100. package/fixtures/kernel-wire/scripts/basic-entity.json +28 -0
  101. package/fixtures/kernel-wire/scripts/entity-rerender.json +13 -0
  102. package/fixtures/kernel-wire/scripts/rollback.json +53 -0
  103. package/fixtures/kernel-wire/scripts/tick-counter.json +26 -0
  104. package/fixtures/kernel-wire/scripts/two-orbital-chore.json +9 -0
  105. package/fixtures/kernel-wire/scripts/two-orbital-task.json +9 -0
  106. package/package.json +28 -19
  107. package/dist/builders-DmZE5By0.d.ts +0 -2663
  108. package/dist/chunk-45I2O4SJ.js +0 -4646
  109. package/dist/chunk-45I2O4SJ.js.map +0 -1
  110. package/dist/chunk-6LR43Z5E.js +0 -3061
  111. package/dist/chunk-6LR43Z5E.js.map +0 -1
  112. package/dist/chunk-GIUA3NUJ.js +0 -809
  113. package/dist/chunk-GIUA3NUJ.js.map +0 -1
  114. package/dist/chunk-GTY53NS5.js +0 -1908
  115. package/dist/chunk-GTY53NS5.js.map +0 -1
  116. package/dist/chunk-JOHDVS6J.js +0 -1614
  117. package/dist/chunk-JOHDVS6J.js.map +0 -1
  118. package/dist/chunk-KDMV222Q.js.map +0 -1
  119. package/dist/chunk-QRHJUS3D.js +0 -23
  120. package/dist/chunk-QRHJUS3D.js.map +0 -1
  121. package/dist/chunk-QUOTJULD.js.map +0 -1
  122. package/dist/chunk-V5VNGRVU.js +0 -66
  123. package/dist/chunk-V5VNGRVU.js.map +0 -1
  124. package/dist/chunk-X4SC7FGF.js.map +0 -1
  125. package/dist/entityAccess-BPSz1i2n.d.ts +0 -80
  126. package/dist/mock/index.d.ts +0 -153
  127. package/dist/mock/index.js +0 -190
  128. package/dist/mock/index.js.map +0 -1
  129. package/dist/schema-T5RT5s6H.d.ts +0 -282
  130. package/dist/state-machine/index.d.ts +0 -359
  131. package/dist/state-machine/index.js +0 -3
  132. package/dist/state-machine/index.js.map +0 -1
@@ -1,2663 +0,0 @@
1
- import { I as IdentityLedger, E as EntityField, m as Entity, c as EventId, T as TraitId, b as OrbitalId, i as TypedEffect, A as AnyPatternConfig, U as UISlot, h as Effect, o as RenderBinding, p as RenderUIEffect, k as EntityId, a as EntityPersistence, d as EntityRow } from './effect-CiEVLsZz.js';
2
- import { O as OrbitalDefinition, T as Trait, c as DeclaredTraitConfig, C as ConfigFieldDeclaration, f as TraitConfigValue, E as EventPayloadField, e as TraitReference, g as OrbitalRefObject, S as StateMachine, P as PayloadField, h as SkeletonNode, i as TraitConfig, d as TraitEventListener, j as CallSiteConfig, k as TraitEventContract, U as UseDeclaration, l as EntityRef, n as ExpectDeclaration, o as TraitRef, p as PageRef, q as Page, r as PageRefObject } from './orbital-CkFdDS9f.js';
3
- import { O as OrbitalSchema } from './schema-T5RT5s6H.js';
4
- import { J as JsonValue, S as SExpr, R as RuntimeValue } from './expression-D0Fs0riG.js';
5
- import { z } from 'zod';
6
-
7
- /**
8
- * Event Wiring
9
- *
10
- * Applies cross-orbital event wiring to orbital definitions.
11
- * Adds emits/listens declarations to traits so they can communicate
12
- * across orbital boundaries.
13
- *
14
- * @packageDocumentation
15
- */
16
-
17
- /**
18
- * A single event wiring entry connecting two traits across orbitals.
19
- */
20
- interface EventWiringEntry {
21
- /** Source trait name or orbital name */
22
- from: string;
23
- /** Event name (UPPER_SNAKE_CASE) */
24
- event: string;
25
- /** Target trait name or orbital name */
26
- to: string;
27
- /** Event to trigger on the listener side */
28
- triggers: string;
29
- }
30
- /**
31
- * Apply event wiring to orbital definitions.
32
- *
33
- * For each wiring entry:
34
- * 1. Find the source trait and add an external emit (if not already present)
35
- * 2. Find the target trait and add an external listen (if not already present)
36
- *
37
- * Returns a new array of orbitals with wiring applied (deep-cloned).
38
- */
39
- declare function applyEventWiring(orbitals: OrbitalDefinition[], wiring: EventWiringEntry[]): OrbitalDefinition[];
40
-
41
- /**
42
- * Layout Strategy Detection
43
- *
44
- * Auto-detects the best layout strategy for a composed application
45
- * based on the number of orbitals and their event wiring topology.
46
- *
47
- * @packageDocumentation
48
- */
49
-
50
- /**
51
- * Layout strategy for the composed application.
52
- *
53
- * - 'single': One orbital, one page
54
- * - 'tabs': 2-4 orbitals with no sequential chain
55
- * - 'sidebar': 5+ orbitals (navigation-heavy)
56
- * - 'dashboard': Single page with all orbitals visible
57
- * - 'wizard-flow': Sequential event chain detected (A -> B -> C)
58
- */
59
- type LayoutStrategy = 'sidebar' | 'tabs' | 'dashboard' | 'wizard-flow' | 'single';
60
- /**
61
- * Detect the best layout strategy based on orbital count and event wiring.
62
- *
63
- * Heuristic:
64
- * 1. Sequential event chain detected -> 'wizard-flow'
65
- * 2. 1 orbital -> 'single'
66
- * 3. 2-4 orbitals -> 'tabs'
67
- * 4. 5+ orbitals -> 'sidebar'
68
- */
69
- declare function detectLayoutStrategy(orbitals: OrbitalDefinition[], eventWiring?: EventWiringEntry[]): LayoutStrategy;
70
-
71
- /**
72
- * Compose Behaviors
73
- *
74
- * Main entry point for composing multiple orbital definitions into
75
- * a single OrbitalSchema application. Handles event wiring, layout
76
- * strategy detection, and page generation.
77
- *
78
- * @packageDocumentation
79
- */
80
-
81
- /**
82
- * Union the identity ledgers of the schema-shaped inputs (V4 Phase 6, runtime
83
- * mirror of the Rust compose ledger merge). Bare OrbitalDefinition inputs and
84
- * ledger-less schemas contribute nothing (pre-V4 back-compat: no ledger in →
85
- * no ledger out). Entries are keyed by id; first occurrence in input order wins
86
- * for a duplicate id — the rows share one identity, so a `curName` divergence
87
- * across slices resolves deterministically to the earliest input's row. Output
88
- * entries are sorted by id for stable, order-independent composition.
89
- */
90
- declare function mergeLedgers(inputs: (OrbitalDefinition | OrbitalSchema)[]): IdentityLedger | undefined;
91
- /**
92
- * Input for composing behaviors into an application.
93
- */
94
- interface ComposeBehaviorsInput {
95
- /** Application name */
96
- appName: string;
97
- /** Orbital definitions (or schemas) to compose */
98
- orbitals: (OrbitalDefinition | OrbitalSchema)[];
99
- /** Layout strategy override, or 'auto' to detect */
100
- layoutStrategy?: LayoutStrategy | 'auto';
101
- /** Cross-orbital event wiring */
102
- eventWiring?: EventWiringEntry[];
103
- /** Optional entity name mappings (original -> renamed) */
104
- entityMappings?: Record<string, string>;
105
- }
106
- /**
107
- * Result of composing behaviors.
108
- */
109
- interface ComposeBehaviorsResult {
110
- /** The composed OrbitalSchema */
111
- schema: OrbitalSchema;
112
- /** Layout metadata */
113
- layout: {
114
- strategy: LayoutStrategy;
115
- pageCount: number;
116
- };
117
- /** Wiring metadata */
118
- wiring: {
119
- connections: number;
120
- };
121
- }
122
- /**
123
- * Compose multiple orbital definitions into a single application schema.
124
- *
125
- * Steps:
126
- * 1. Apply event wiring (adds emits/listens to traits)
127
- * 2. Detect or use provided layout strategy
128
- * 3. Generate pages based on the strategy
129
- * 4. Build the final OrbitalSchema
130
- */
131
- declare function composeBehaviors(input: ComposeBehaviorsInput): ComposeBehaviorsResult;
132
-
133
- /**
134
- * One structural rename of an entity across a set of orbitals — the positions the compiler's
135
- * visitors read an entity name from (`orbital-core/src/stamp.rs`, `orbital-compiler`'s
136
- * `inline/rewrite.rs` `visit_entity_slots` + `ENTITY_VALUED_PROPS`, `rename_entities_in_trait`,
137
- * relation/page/expects passes), never a text search:
138
- *
139
- * - declarations: an object carrying `name` + `fields` (primary/auxiliary entities, a trait's
140
- * `sourceEntityDefinition` and `dataEntities`), optionally given a new `collection`;
141
- * - `@Name` / `@Name.<path>` tokens anywhere (guards, effects, ticks, listens, policies, config);
142
- * - the entity slot of `["fetch", N]`, `["persist", create|update|delete, N]`, `["ref", N]`
143
- * (exactly two elements) and `["spawn", N]`;
144
- * - entity-valued keys (`entity`, `source`, `entityType`, `linkedEntity`, `primaryEntity`,
145
- * `payloadEntity`, `extends`) and payload `type` references (`N`, `[N]`, `projectedFrom.type`);
146
- * - config fields typed `entity`, `expects` entries, and the `entityRefIds` key (its id stays);
147
- * - an effect-row use's `resource` when its `kind` is `persist` or `fetch`.
148
- *
149
- * Ids are kept, so readers that resolve by id still land on the renamed declaration. Pure: the
150
- * input is not mutated. Used where an app namespaces a colliding organism (`compose-app.ts`).
151
- */
152
-
153
- interface RenameEntityOptions {
154
- /** The renamed declaration's collection, set explicitly (the compiler and runtime derive differently). */
155
- collection?: string;
156
- /**
157
- * The atom's own declaration of the trait a reference names (`Alias.traits.T`, resolved through
158
- * the orbital's `uses`). A call site restates knob values and type arguments without their types,
159
- * so the atom is the only source for which knobs are `entity`-typed (`targetEntity : entity`) and
160
- * which type parameters are Entity-kind; callers that hold the registry supply it. Without it
161
- * such values are left as they are.
162
- */
163
- atomTraitOf?: (orbital: OrbitalDefinition, traitRef: string) => Trait | undefined;
164
- }
165
- /** `orbitals` with entity `from` renamed `to` at every position an entity name is read from. */
166
- declare function renameEntity(orbitals: ReadonlyArray<OrbitalDefinition>, from: string, to: string, options?: RenameEntityOptions): OrbitalDefinition[];
167
- /** `renameEntity` over a whole schema: its orbitals, and the ledger rows of the renamed declarations. */
168
- declare function renameEntityInSchema(schema: OrbitalSchema, from: string, to: string, options?: RenameEntityOptions, at?: string): OrbitalSchema;
169
- /** A reference trait whose atom fixes its entity binding (not `@rebindable`). */
170
- interface EntityRenameBlocker {
171
- orbitalName: string;
172
- traitName: string;
173
- traitRef: string;
174
- }
175
- /**
176
- * The reference traits that pin entity `name`: an atom that does not mark its binding
177
- * `@rebindable` owns the entity it binds, so renaming it is `ORB_T_ENTITY_NOT_REBINDABLE`. An atom
178
- * the resolver cannot find pins it too — rebindability is never assumed.
179
- */
180
- declare function entityRenameBlockers(orbitals: ReadonlyArray<OrbitalDefinition>, name: string, atomTraitOf: (orbital: OrbitalDefinition, traitRef: string) => Trait | undefined): EntityRenameBlocker[];
181
- /**
182
- * `atomTraitOf` for a registry: `Alias.traits.T` resolved through the orbital's `uses` to the
183
- * behavior it imports (the last segment of `from`, `std/behaviors/std-x` → `std-x`), then to that
184
- * behavior's declaration of trait `T`. `loadBehaviorOrb` is the caller's registry; each behavior
185
- * is loaded once.
186
- */
187
- declare function atomTraitResolver(loadBehaviorOrb: (behaviorName: string) => OrbitalSchema | null): (orbital: OrbitalDefinition, traitRef: string) => Trait | undefined;
188
- /**
189
- * `orbitals` with orbital `from` held as `to`: its declaration and every listen sourced from it
190
- * (`{ kind: 'orbital', orbital, trait }`, the compiler's listen-source rewrite). For an app that
191
- * holds an organism's orbital under that organism's prefix, applied over the organism's own files.
192
- */
193
- declare function renameOrbital(orbitals: ReadonlyArray<OrbitalDefinition>, from: string, to: string): OrbitalDefinition[];
194
-
195
- /** One compose-time deterministic rename applied to break a global collision. */
196
- interface SurfaceRename {
197
- orbitalName: string;
198
- from: string;
199
- to: string;
200
- /** V4 id of the renamed declaration (traits only), for ledger sync. */
201
- id?: string;
202
- }
203
- /** One compose-time identity demotion: an entity that lost the `@user` directive. */
204
- interface IdentityDemotion {
205
- orbitalName: string;
206
- entityName: string;
207
- }
208
- /**
209
- * FIX-K — literals unioned into the winning `[identity]` entity's
210
- * closed-vocabulary field because a demoted identity's organism baked
211
- * `*_policy` S-expressions comparing `@user.<field>` against its own role
212
- * vocabulary (after the demotion every `@user` resolves to the winner, so a
213
- * literal the winner's field cannot carry is a dead branch —
214
- * `ORB_S_ROLE_LITERAL_NOT_MEMBER`).
215
- */
216
- interface IdentityRoleUnion {
217
- /** Winning identity's orbital. */
218
- orbitalName: string;
219
- /** Winning identity entity that grew the literals. */
220
- entityName: string;
221
- field: string;
222
- addedLiterals: string[];
223
- }
224
- /**
225
- * FIX-L — a composed-surface `expects identity X` rewritten to
226
- * `expects entity X` because X lost the `[identity]` tag in this compose
227
- * (the entity is still provided, so the link-check passes; the compiled
228
- * path's own `ORB_S_EXPECTATION_PROVIDER_MISMATCH` suggestion is exactly
229
- * this rewrite).
230
- */
231
- interface IdentityExpectsRewrite {
232
- /** Consumer orbital whose declaration was rewritten. */
233
- orbitalName: string;
234
- /** Demoted entity the declaration named. */
235
- entityName: string;
236
- }
237
- /**
238
- * FIX-N — a relation field retargeted from a demoted identity to the
239
- * surviving one because the composed surface compares that field to
240
- * `@user.id` (an access directive's owner form, or a `persist` payload
241
- * stamping the viewer's key onto it). Owner-compared fields ONLY — a
242
- * blanket retarget would corrupt legitimate data relations
243
- * (`Sprint.members: [TeamMember]`).
244
- */
245
- interface IdentityRelationRetarget {
246
- /** Orbital owning the entity definition that was retargeted. */
247
- orbitalName: string;
248
- /** Entity owning the relation field. */
249
- entityName: string;
250
- field: string;
251
- fromEntity: string;
252
- toEntity: string;
253
- }
254
- interface IdentityDedupeResult {
255
- demotions: IdentityDemotion[];
256
- roleUnions: IdentityRoleUnion[];
257
- expectsRewrites: IdentityExpectsRewrite[];
258
- relationsRetargeted: IdentityRelationRetarget[];
259
- }
260
- /** One `navItems` narrowing outcome: entries dropped from a single trait's config. */
261
- interface NavItemsNarrowResult {
262
- orbitalName: string;
263
- traitName: string;
264
- droppedHrefs: string[];
265
- }
266
- /**
267
- * Compose-time backstop for the two global-uniqueness collision classes a
268
- * per-orbital free-compose subagent cannot see (it authors its `.orb` in
269
- * isolation): duplicate page routes (`PageDuplicatePath`) and duplicate inline
270
- * trait names (`ORB_T_DUPLICATE_NAME`). Deterministic, keyed on the composed
271
- * `orbitals[]` order (`listOrbitals()` is sorted): the FIRST orbital to claim a
272
- * route/trait name keeps it, later claimants are re-slugged / orbital-prefixed
273
- * with references rewritten in lockstep — the declaration's own `name`, page
274
- * trait refs, `source.trait`, AND every `@trait.<old>` token anywhere in the
275
- * orbital JSON (config values at any depth, state-machine trees — the same
276
- * coverage as the factory path's `applyDeclarationTraitRenames`, whose
277
- * exported walker is reused here; FIX-M: a `children` default holding
278
- * `"@trait.InlineIconRender6"` otherwise dangles with
279
- * `ORB_BINDING_TRAIT_UNKNOWN` on every recompose). Mutates the passed array
280
- * in place and returns the applied renames so the caller can emit typed
281
- * trace events. A clean plan (distinct routes, distinct trait names) is a
282
- * no-op.
283
- */
284
- declare function dedupeComposedSurface(orbitals: OrbitalDefinition[]): {
285
- routes: SurfaceRename[];
286
- traits: SurfaceRename[];
287
- pageNames: SurfaceRename[];
288
- };
289
- /**
290
- * Compose-time backstop: keep exactly ONE `[identity]` entity in the composed
291
- * surface. Every organism bakes its own `@user` entity (`OnlineUser`,
292
- * `TeamMember`, …), so any multi-organism roster collides on
293
- * `ORB_S_IDENTITY_NOT_UNIQUE` — an error no per-orbital subagent can see and
294
- * plan-repair could only "fix" by rewriting a sibling's source (battery
295
- * 2026-08-06 edit-in-complex-app: repair stubbed the 9-trait factory
296
- * `OnlineUserOrbital` down to 1 trait to strip its identity). Roster order
297
- * decides the winner (deterministic); losers are demoted in the composed
298
- * surface only — per-orbital files stay untouched, same contract as
299
- * `dedupeComposedSurface`.
300
- *
301
- * A demotion has two deterministic follow-ons, applied in the same pass:
302
- *
303
- * - FIX-K — the loser's organism compares `@user.<field>` against the LOSER's
304
- * role vocabulary — in baked `*_policy` S-expressions, and through config
305
- * (an atom's `allowedRoles`) where compose cannot see the comparison.
306
- * Post-dedupe every `@user` resolves to the winner schema-wide, so the
307
- * loser's declared vocabulary and every literal it compares join the
308
- * winner's closed vocabulary (the loser's users keep their roles; owner
309
- * ruling 2026-10-04).
310
- * A literal compared against a field the winner does not declare is a
311
- * shape mismatch: compose fails with a deterministic error rather than
312
- * silently shipping dead policy branches.
313
- * A loser is a demoted identity, or an identity an orbital `expects` by name that no orbital
314
- * provides as identity (composed from another organism): its role vocabulary joins the winner's,
315
- * and its expectation is rewritten when the app holds it as a plain record.
316
- *
317
- * - FIX-L — a composed `expects identity <Loser>` would fail the link-check
318
- * (`ORB_S_EXPECTATION_PROVIDER_MISMATCH`) on every recompose; it is
319
- * rewritten to `expects entity <Loser>` — the compiled path's own
320
- * suggestion — which the still-provided demoted entity satisfies.
321
- * - FIX-N — relation fields targeting the demoted identity that the composed
322
- * surface compares to `@user.id` (owner form in a baked access directive,
323
- * or a `persist` payload stamping the viewer's key) fail
324
- * `ORB_S_OWNER_FIELD_NOT_IDENTITY_TYPED` once `@user` resolves to the
325
- * winner; their `relation.entity` is retargeted to the winner. Owner-
326
- * compared fields ONLY — a blanket retarget would corrupt legitimate data
327
- * relations (`Sprint.members: [TeamMember]`).
328
- */
329
- declare function dedupeComposedIdentity(orbitals: OrbitalDefinition[]): IdentityDedupeResult;
330
- interface IdentityVocabularyDelta {
331
- /** The identity's closed-vocabulary fields, widened — a same-named field delta replaces the canonical one. */
332
- fields: EntityField[];
333
- added: Array<{
334
- field: string;
335
- literals: string[];
336
- }>;
337
- }
338
- /**
339
- * The literals other orbitals compare `@user.<field>` against that the identity's closed vocabulary
340
- * lacks, as a field delta the plan applies to the identity line (G-RABIT-036).
341
- */
342
- declare function identityVocabularyDelta(identity: Entity, others: ReadonlyArray<OrbitalDefinition>): IdentityVocabularyDelta;
343
- /**
344
- * Narrow `OrbitalDefinition['entity']` to the object form carrying
345
- * `name` + `fields` — same accessor shape as `per-orbital-build.ts`'s
346
- * `asEntityObject`; the bare string-ref form declares no fields.
347
- */
348
- declare function asEntityObject(entity: OrbitalDefinition['entity']): {
349
- name?: string;
350
- fields?: ReadonlyArray<EntityField>;
351
- } | null;
352
- /** The entity an orbital DECLARES (object form only — a bare string ref owns nothing here). */
353
- declare function orbitalEntityName(def: OrbitalDefinition): string | null;
354
- /**
355
- * `organismOrderOf` for a registry: an orbital's position among its organism's declared orbitals,
356
- * by the catalog orbital it was built from (`catalogOrbitalOf`, rename-stable). Each organism is
357
- * loaded once.
358
- */
359
- declare function organismOrderResolver(catalogOrbitalOf: (orbitalName: string) => {
360
- organism: string;
361
- orbital: string;
362
- } | undefined, loadOrganism: (organism: string) => OrbitalSchema | null): (orbitalName: string) => number | undefined;
363
- /**
364
- * `importedOrbitalOf` for a registry: an import's `reference.ref` (`Alias.orbitals.Name`)
365
- * resolved through the orbital's `uses` to the behavior it imports, then to that behavior's
366
- * orbital `Name`. `loadBehaviorOrb` is the caller's registry; each behavior is loaded once.
367
- */
368
- declare function orbitalImportResolver(loadBehaviorOrb: (behaviorName: string) => OrbitalSchema | null): (orbital: OrbitalDefinition) => OrbitalDefinition | undefined;
369
- /** A `[NavItem]` list dropped entries from the organisms' unioned config (`config.<knob>`). */
370
- interface ConfigNavItemsNarrowResult {
371
- knob: string;
372
- droppedHrefs: string[];
373
- }
374
- /** An organism's landing page given a nav entry because it no longer boots the app. */
375
- interface LandingNavResult {
376
- organism: string;
377
- href: string;
378
- }
379
- /** The app surface composed from its files: deduped orbitals, unioned config and ledger. */
380
- interface ComposedSurface {
381
- orbitals: OrbitalDefinition[];
382
- config?: DeclaredTraitConfig;
383
- ledger?: IdentityLedger;
384
- surfaceRenames: {
385
- routes: SurfaceRename[];
386
- traits: SurfaceRename[];
387
- pageNames: SurfaceRename[];
388
- };
389
- identity: IdentityDedupeResult;
390
- navItemsNarrowed: NavItemsNarrowResult[];
391
- configNavItemsNarrowed: ConfigNavItemsNarrowResult[];
392
- landingNavAdded: LandingNavResult[];
393
- organismRenames: OrganismRename[];
394
- unrenamableCollisions: UnrenamableCollision[];
395
- }
396
- /**
397
- * The app's surface from its per-orbital files, in the files' order (roster order decides every
398
- * collision): routes and inline trait names deduped, one `[identity]`, the organisms' config and
399
- * ledgers unioned (ledger rows follow the trait renames), every `navItems` list narrowed to pages
400
- * the app owns. No pages or layout are generated. The caller's files are not mutated.
401
- */
402
- /** The names a later organism took under its prefix because an earlier one owned them. */
403
- interface OrganismRename {
404
- organism: string;
405
- entities: Array<{
406
- from: string;
407
- to: string;
408
- }>;
409
- collections: Array<{
410
- from: string;
411
- to: string;
412
- }>;
413
- /** Route roots moved under the organism's own path (`/projects` → `/project-manager/projects`). */
414
- routes: Array<{
415
- from: string;
416
- to: string;
417
- }>;
418
- }
419
- /** A colliding entity an atom's fixed binding pins: it keeps its name, and the collision stands. */
420
- interface UnrenamableCollision {
421
- organism: string;
422
- entity: string;
423
- blockers: EntityRenameBlocker[];
424
- }
425
- interface ComposeSurfaceOptions {
426
- /**
427
- * The organism an orbital came from (its spec's `organism`). A page route renamed on compose is
428
- * then renamed in the nav of every file of that organism; without it, only the renamed orbital's
429
- * own file follows.
430
- */
431
- organismOf?: (orbitalName: string) => string | undefined;
432
- /**
433
- * An orbital's position in its organism's declared orbitals. The first declared orbital boots
434
- * the organism standalone, so composed behind another organism it is the landing page the nav
435
- * must link; without it, the first composed orbital of the organism stands in.
436
- */
437
- organismOrderOf?: (orbitalName: string) => number | undefined;
438
- /** The atom's declaration of a referenced trait (see `RenameEntityOptions.atomTraitOf`); namespacing reads it. */
439
- atomTraitOf?: (orbital: OrbitalDefinition, traitRef: string) => Trait | undefined;
440
- /** An orbital import's source orbital (`orbitalImportResolver`); its pages count as owned when nav is narrowed. */
441
- importedOrbitalOf?: (orbital: OrbitalDefinition) => OrbitalDefinition | undefined;
442
- }
443
- declare function composeOrbitalSurface(files: ReadonlyArray<OrbitalDefinition | OrbitalSchema>, options?: ComposeSurfaceOptions): ComposedSurface;
444
- interface ComposeAppFromFilesOptions extends ComposeSurfaceOptions {
445
- appName: string;
446
- layoutStrategy?: LayoutStrategy | 'auto';
447
- eventWiring?: EventWiringEntry[];
448
- /** The program an import orbital takes its source from: its `inbound` hooks and `egress` origins join the app's. */
449
- importedProgramOf?: (orbital: OrbitalDefinition) => OrbitalSchema | undefined;
450
- }
451
- interface ComposeAppFromFilesResult extends Omit<ComposedSurface, 'orbitals' | 'config' | 'ledger'> {
452
- schema: OrbitalSchema;
453
- layout: ComposeBehaviorsResult['layout'];
454
- wiring: ComposeBehaviorsResult['wiring'];
455
- }
456
- /**
457
- * A whole app from its per-orbital files: `composeOrbitalSurface`, then `composeBehaviors` for
458
- * pages, layout and wiring, with the surface's unioned config and ledger on the schema. Bare
459
- * definitions compose exactly as `composeBehaviors` composes them.
460
- */
461
- declare function composeAppFromFiles(inputs: ReadonlyArray<OrbitalDefinition | OrbitalSchema>, options: ComposeAppFromFilesOptions): ComposeAppFromFilesResult;
462
-
463
- /**
464
- * Deterministic page-route slug for an orbital. The plan owns the global
465
- * route namespace: the primary/landing leg keeps `/`, every other leg is
466
- * assigned `/<orbital-slug>` so a multi-orbital plan never composes two
467
- * `path: "/"` pages (the global `PageDuplicatePath` class). The same slug is
468
- * the compose-time backstop's re-slug target, so guidance and backstop agree.
469
- *
470
- * `ExpenseDashboardOrbital` → `expense-dashboard`. The trailing `Orbital`
471
- * suffix (when present) is dropped to match the trait-dedup prefix convention
472
- * in `computeCrossOrbitalTraitRenames`.
473
- */
474
- declare function orbitalRouteSlug(orbitalName: string): string;
475
-
476
- /**
477
- * Collect the page paths and trait names an orbital's `.orb` owns. Shared by
478
- * rabit's delete-turn dangling-ref cleanup and
479
- * compose-time nav narrowing (`compose-app.ts`) — one walker,
480
- * two consumers, so the page↔orbital ownership map never drifts between them.
481
- */
482
- declare function collectOwnedSurface(node: JsonValue, pages: Set<string>, traits: Set<string>): void;
483
- /**
484
- * The inverse walker: references in a SURVIVING orbital that point at a
485
- * deleted orbital's surface. Two kinds, and only two — a `navigate` to a page
486
- * the deleted orbital owned, and a `listens` entry sourced from one of its
487
- * traits that the survivor does not own itself.
488
- *
489
- * Lives beside `collectOwnedSurface` for the same reason that one does: it has
490
- * two consumers now (`collectDeleteCleanupEdits` in the coordinator, and the
491
- * e2e delete-cascade case, which has to find an orbital worth deleting before
492
- * it can test the cleanup). A second copy would answer a slightly different
493
- * question and quietly test nothing — measured: a substring-matching stand-in
494
- * reported 7–14 "references" per orbital on an organism where these rules find
495
- * zero.
496
- */
497
- declare function findDanglingRefs(node: JsonValue, deletedPages: ReadonlySet<string>, deletedTraits: ReadonlySet<string>, ownTraits: ReadonlySet<string>, out: Set<string>): void;
498
-
499
- /**
500
- * Baked S-expression field-comparison literal walk — one owner for the
501
- * consumers that must agree with the compiled path's
502
- * `ORB_S_ROLE_LITERAL_NOT_MEMBER` check (`user_identity.rs`) and
503
- * `ORB_S_OWNER_FIELD_NOT_IDENTITY_TYPED` check (`entity_access.rs`): rabit's
504
- * param-fill enum-delta guard (FIX-J) and the compose-time identity dedupe
505
- * passes (`compose-app.ts`, FIX-K/FIX-N).
506
- */
507
- interface FieldBindingContext {
508
- entityName: string;
509
- isIdentity: boolean;
510
- /** Primary entity of the orbital being walked (`@entity` resolves to it). */
511
- scopeEntityName: string | null;
512
- field: string;
513
- }
514
- /**
515
- * Every string literal compared against `<entity>.<field>` inside `node` —
516
- * equality ops (`=` `==` `!=` `!==` `eq` `neq`) over either operand, plus
517
- * `array/includes` with the field binding as the haystack.
518
- */
519
- declare function collectFieldComparisonLiterals(node: unknown, ctx: FieldBindingContext, out: Set<string>): void;
520
- /**
521
- * Every field read off the candidate row in the owner-comparison form the
522
- * compiled path's `ORB_S_OWNER_FIELD_NOT_IDENTITY_TYPED` check enforces: a
523
- * `=`/`==` comparison with `@user.id` on one side and `@entity.<F>` on the
524
- * other, at any nesting depth (`or`/`and` clauses included). `id` itself is
525
- * excluded — an identity entity comparing its own key to the viewer is the
526
- * self-read shape, not an owner column.
527
- */
528
- declare function collectOwnerComparedFields(node: unknown, out: Set<string>): void;
529
- /**
530
- * The create/update-effect twin of the owner form: a `persist` payload entry
531
- * `"F": "@user.id"` stamping the viewer's identity key onto field `F` of the
532
- * named entity. Returns entity name → stamped field names. A trailing payload
533
- * object carrying `emit` is the resolver's options bag, not data (same
534
- * convention as `effect/persist.rs`).
535
- */
536
- declare function collectOwnerStampedFields(node: unknown, out: Map<string, Set<string>>): void;
537
-
538
- /** The §8 call-site override surface a trait value records (`behavior/apply`). */
539
- type TraitOverrides = Pick<TraitReference, 'config' | 'events' | 'fields' | 'listens' | 'emitsScope' | 'linkedEntity'>;
540
- /** A trait of an installed behavior, plus the overrides applied to it. */
541
- type TraitValue = TraitOverrides & {
542
- /** The behavior's specifier: canonical `<prefix>/<name>` (the compiler and `behavior/catalog` emit it), `std/behaviors/<name>` as authored, or workspace-relative `./orbitals/<name>` (what `program/eval` wrote). */
543
- readonly behavior: string;
544
- /** The trait's upstream name. */
545
- readonly trait: string;
546
- };
547
- /** Parse `<prefix>/<name>.traits.<Trait>`; undefined for anything else (a local `@trait.X` included). */
548
- declare function parseTraitValueLiteral(raw: string): TraitValue | undefined;
549
- /** Parse `<prefix>/<name>.orbitals.<Orbital>`; undefined for anything else. */
550
- declare function parseOrbitalValueLiteral(raw: string): OrbitalValue | undefined;
551
- /** Parse either literal form. */
552
- declare function parseBehaviorValueLiteral(raw: string): BehaviorValue | undefined;
553
- /** Inverse of {@link parseTraitValueLiteral}; drops overrides (they have no literal form). */
554
- declare function formatTraitValueLiteral(value: Pick<TraitValue, 'behavior' | 'trait'>): string;
555
- /** Inverse of {@link parseOrbitalValueLiteral}; drops the recorded import body. */
556
- declare function formatOrbitalValueLiteral(value: Pick<OrbitalValue, 'behavior' | 'orbital'>): string;
557
- /** Either literal form, by kind. */
558
- declare function formatBehaviorValueLiteral(value: BehaviorValue): string;
559
- /** Validates the §8 override object `behavior/apply` takes; unknown keys are rejected. */
560
- declare const TraitOverridesSchema: z.ZodObject<{
561
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
562
- 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>>]>>>;
563
- linkedEntity: z.ZodOptional<z.ZodString>;
564
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
565
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
566
- event: z.ZodString;
567
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
568
- triggers: z.ZodString;
569
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
570
- description: z.ZodOptional<z.ZodString>;
571
- synonyms: z.ZodOptional<z.ZodString>;
572
- tier: z.ZodOptional<z.ZodString>;
573
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
574
- scope: z.ZodOptional<z.ZodEnum<{
575
- external: "external";
576
- internal: "internal";
577
- }>>;
578
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
579
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
580
- kind: z.ZodLiteral<"any">;
581
- }, z.core.$strip>, z.ZodObject<{
582
- kind: z.ZodLiteral<"trait">;
583
- trait: z.ZodString;
584
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
585
- }, z.core.$strip>, z.ZodObject<{
586
- kind: z.ZodLiteral<"orbital">;
587
- orbital: z.ZodString;
588
- trait: z.ZodString;
589
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
590
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
591
- }, z.core.$strip>]>>;
592
- }, z.core.$strip>>>;
593
- emitsScope: z.ZodOptional<z.ZodEnum<{
594
- external: "external";
595
- internal: "internal";
596
- }>>;
597
- }, z.core.$strict>;
598
- /** Validates a trait value carried as data: identity plus the recorded overrides. */
599
- declare const TraitValueSchema: z.ZodObject<{
600
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
601
- 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>>]>>>;
602
- linkedEntity: z.ZodOptional<z.ZodString>;
603
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
604
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
605
- event: z.ZodString;
606
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
607
- triggers: z.ZodString;
608
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
609
- description: z.ZodOptional<z.ZodString>;
610
- synonyms: z.ZodOptional<z.ZodString>;
611
- tier: z.ZodOptional<z.ZodString>;
612
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
613
- scope: z.ZodOptional<z.ZodEnum<{
614
- external: "external";
615
- internal: "internal";
616
- }>>;
617
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
618
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
619
- kind: z.ZodLiteral<"any">;
620
- }, z.core.$strip>, z.ZodObject<{
621
- kind: z.ZodLiteral<"trait">;
622
- trait: z.ZodString;
623
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
624
- }, z.core.$strip>, z.ZodObject<{
625
- kind: z.ZodLiteral<"orbital">;
626
- orbital: z.ZodString;
627
- trait: z.ZodString;
628
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
629
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
630
- }, z.core.$strip>]>>;
631
- }, z.core.$strip>>>;
632
- emitsScope: z.ZodOptional<z.ZodEnum<{
633
- external: "external";
634
- internal: "internal";
635
- }>>;
636
- behavior: z.ZodString;
637
- trait: z.ZodString;
638
- }, z.core.$strict>;
639
- /**
640
- * The §8b import body an orbital value records. Config holds plain values, as at
641
- * a trait call site; the import builder wraps them into the IR's declaration form.
642
- * `name` is the orbital's name in the importing program (default: the upstream name).
643
- */
644
- type OrbitalOverrides = Omit<OrbitalRefObject, 'ref' | 'refId' | 'config' | 'traits'> & {
645
- readonly name?: string;
646
- /** The source behavior's app-level knobs (its top-level `config {}`), as `uses Source { config }` sets them. */
647
- readonly app?: Readonly<Record<string, TraitConfigValue>>;
648
- readonly config?: Readonly<Record<string, TraitConfigValue>>;
649
- readonly traits?: Readonly<Record<string, TraitOverrides>>;
650
- /** Imports the value's sibling traits compose from, beside its own source. */
651
- readonly uses?: readonly OrbitalValueUse[];
652
- /** Traits the import orbital declares beside the imported ones, mountable through `mounts`. */
653
- readonly siblings?: readonly OrbitalValueSibling[];
654
- };
655
- /** An orbital of an installed behavior, plus the import body applied to it. */
656
- type OrbitalValue = OrbitalOverrides & {
657
- readonly behavior: string;
658
- /** The orbital's upstream name. */
659
- readonly orbital: string;
660
- };
661
- /** A trait value or an orbital value. */
662
- type BehaviorValue = TraitValue | OrbitalValue;
663
- /** One import the value's own sibling traits compose from (`uses <as> from <from>` on the import orbital). */
664
- declare const OrbitalValueUseSchema: z.ZodObject<{
665
- from: z.ZodString;
666
- as: z.ZodString;
667
- }, z.core.$strict>;
668
- type OrbitalValueUse = z.infer<typeof OrbitalValueUseSchema>;
669
- /** A trait the import orbital declares beside the imported ones (`trait <name> = <ref> { config }`), mountable through `mounts`. */
670
- declare const OrbitalValueSiblingSchema: z.ZodObject<{
671
- name: z.ZodString;
672
- ref: z.ZodString;
673
- linkedEntity: z.ZodOptional<z.ZodString>;
674
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
675
- }, z.core.$strict>;
676
- type OrbitalValueSibling = z.infer<typeof OrbitalValueSiblingSchema>;
677
- /** Validates the §8b body `behavior/apply` takes for an orbital value; unknown keys are rejected. */
678
- declare const OrbitalOverridesSchema: z.ZodObject<{
679
- entity: z.ZodOptional<z.ZodString>;
680
- persistence: z.ZodOptional<z.ZodEnum<{
681
- persistent: "persistent";
682
- runtime: "runtime";
683
- }>>;
684
- shared: z.ZodOptional<z.ZodBoolean>;
685
- identity: z.ZodOptional<z.ZodBoolean>;
686
- browser: z.ZodOptional<z.ZodBoolean>;
687
- collection: z.ZodOptional<z.ZodString>;
688
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
689
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
690
- pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
691
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
692
- event: z.ZodString;
693
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
694
- triggers: z.ZodString;
695
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
696
- description: z.ZodOptional<z.ZodString>;
697
- synonyms: z.ZodOptional<z.ZodString>;
698
- tier: z.ZodOptional<z.ZodString>;
699
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
700
- scope: z.ZodOptional<z.ZodEnum<{
701
- external: "external";
702
- internal: "internal";
703
- }>>;
704
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
705
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
706
- kind: z.ZodLiteral<"any">;
707
- }, z.core.$strip>, z.ZodObject<{
708
- kind: z.ZodLiteral<"trait">;
709
- trait: z.ZodString;
710
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
711
- }, z.core.$strip>, z.ZodObject<{
712
- kind: z.ZodLiteral<"orbital">;
713
- orbital: z.ZodString;
714
- trait: z.ZodString;
715
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
716
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
717
- }, z.core.$strip>]>>;
718
- trait: z.ZodString;
719
- }, z.core.$strip>>>;
720
- roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
721
- pageModifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
722
- access: z.ZodOptional<z.ZodEnum<{
723
- public: "public";
724
- authenticated: "authenticated";
725
- }>>;
726
- indexing: z.ZodOptional<z.ZodEnum<{
727
- index: "index";
728
- noindex: "noindex";
729
- }>>;
730
- title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
731
- description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
732
- translationOf: z.ZodOptional<z.ZodString>;
733
- label: z.ZodOptional<z.ZodString>;
734
- icon: z.ZodOptional<z.ZodString>;
735
- roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
736
- }, z.core.$strict>>>;
737
- omit: z.ZodOptional<z.ZodArray<z.ZodString>>;
738
- only: z.ZodOptional<z.ZodArray<z.ZodString>>;
739
- entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
740
- mounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
741
- extend: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
742
- mock: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
743
- retype: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
744
- name: z.ZodOptional<z.ZodString>;
745
- app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
746
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
747
- traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
748
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
749
- 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>>]>>>;
750
- linkedEntity: z.ZodOptional<z.ZodString>;
751
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
752
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
753
- event: z.ZodString;
754
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
755
- triggers: z.ZodString;
756
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
757
- description: z.ZodOptional<z.ZodString>;
758
- synonyms: z.ZodOptional<z.ZodString>;
759
- tier: z.ZodOptional<z.ZodString>;
760
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
761
- scope: z.ZodOptional<z.ZodEnum<{
762
- external: "external";
763
- internal: "internal";
764
- }>>;
765
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
766
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
767
- kind: z.ZodLiteral<"any">;
768
- }, z.core.$strip>, z.ZodObject<{
769
- kind: z.ZodLiteral<"trait">;
770
- trait: z.ZodString;
771
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
772
- }, z.core.$strip>, z.ZodObject<{
773
- kind: z.ZodLiteral<"orbital">;
774
- orbital: z.ZodString;
775
- trait: z.ZodString;
776
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
777
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
778
- }, z.core.$strip>]>>;
779
- }, z.core.$strip>>>;
780
- emitsScope: z.ZodOptional<z.ZodEnum<{
781
- external: "external";
782
- internal: "internal";
783
- }>>;
784
- }, z.core.$strict>>>;
785
- uses: z.ZodOptional<z.ZodArray<z.ZodObject<{
786
- from: z.ZodString;
787
- as: z.ZodString;
788
- }, z.core.$strict>>>;
789
- siblings: z.ZodOptional<z.ZodArray<z.ZodObject<{
790
- name: z.ZodString;
791
- ref: z.ZodString;
792
- linkedEntity: z.ZodOptional<z.ZodString>;
793
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
794
- }, z.core.$strict>>>;
795
- }, z.core.$strict>;
796
- /** Validates an orbital value carried as data. */
797
- declare const OrbitalValueSchema: z.ZodObject<{
798
- entity: z.ZodOptional<z.ZodString>;
799
- persistence: z.ZodOptional<z.ZodEnum<{
800
- persistent: "persistent";
801
- runtime: "runtime";
802
- }>>;
803
- shared: z.ZodOptional<z.ZodBoolean>;
804
- identity: z.ZodOptional<z.ZodBoolean>;
805
- browser: z.ZodOptional<z.ZodBoolean>;
806
- collection: z.ZodOptional<z.ZodString>;
807
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
808
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
809
- pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
810
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
811
- event: z.ZodString;
812
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
813
- triggers: z.ZodString;
814
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
815
- description: z.ZodOptional<z.ZodString>;
816
- synonyms: z.ZodOptional<z.ZodString>;
817
- tier: z.ZodOptional<z.ZodString>;
818
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
819
- scope: z.ZodOptional<z.ZodEnum<{
820
- external: "external";
821
- internal: "internal";
822
- }>>;
823
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
824
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
825
- kind: z.ZodLiteral<"any">;
826
- }, z.core.$strip>, z.ZodObject<{
827
- kind: z.ZodLiteral<"trait">;
828
- trait: z.ZodString;
829
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
830
- }, z.core.$strip>, z.ZodObject<{
831
- kind: z.ZodLiteral<"orbital">;
832
- orbital: z.ZodString;
833
- trait: z.ZodString;
834
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
835
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
836
- }, z.core.$strip>]>>;
837
- trait: z.ZodString;
838
- }, z.core.$strip>>>;
839
- roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
840
- pageModifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
841
- access: z.ZodOptional<z.ZodEnum<{
842
- public: "public";
843
- authenticated: "authenticated";
844
- }>>;
845
- indexing: z.ZodOptional<z.ZodEnum<{
846
- index: "index";
847
- noindex: "noindex";
848
- }>>;
849
- title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
850
- description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
851
- translationOf: z.ZodOptional<z.ZodString>;
852
- label: z.ZodOptional<z.ZodString>;
853
- icon: z.ZodOptional<z.ZodString>;
854
- roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
855
- }, z.core.$strict>>>;
856
- omit: z.ZodOptional<z.ZodArray<z.ZodString>>;
857
- only: z.ZodOptional<z.ZodArray<z.ZodString>>;
858
- entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
859
- mounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
860
- extend: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
861
- mock: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
862
- retype: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
863
- name: z.ZodOptional<z.ZodString>;
864
- app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
865
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
866
- traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
867
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
868
- 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>>]>>>;
869
- linkedEntity: z.ZodOptional<z.ZodString>;
870
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
871
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
872
- event: z.ZodString;
873
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
874
- triggers: z.ZodString;
875
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
876
- description: z.ZodOptional<z.ZodString>;
877
- synonyms: z.ZodOptional<z.ZodString>;
878
- tier: z.ZodOptional<z.ZodString>;
879
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
880
- scope: z.ZodOptional<z.ZodEnum<{
881
- external: "external";
882
- internal: "internal";
883
- }>>;
884
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
885
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
886
- kind: z.ZodLiteral<"any">;
887
- }, z.core.$strip>, z.ZodObject<{
888
- kind: z.ZodLiteral<"trait">;
889
- trait: z.ZodString;
890
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
891
- }, z.core.$strip>, z.ZodObject<{
892
- kind: z.ZodLiteral<"orbital">;
893
- orbital: z.ZodString;
894
- trait: z.ZodString;
895
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
896
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
897
- }, z.core.$strip>]>>;
898
- }, z.core.$strip>>>;
899
- emitsScope: z.ZodOptional<z.ZodEnum<{
900
- external: "external";
901
- internal: "internal";
902
- }>>;
903
- }, z.core.$strict>>>;
904
- uses: z.ZodOptional<z.ZodArray<z.ZodObject<{
905
- from: z.ZodString;
906
- as: z.ZodString;
907
- }, z.core.$strict>>>;
908
- siblings: z.ZodOptional<z.ZodArray<z.ZodObject<{
909
- name: z.ZodString;
910
- ref: z.ZodString;
911
- linkedEntity: z.ZodOptional<z.ZodString>;
912
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
913
- }, z.core.$strict>>>;
914
- behavior: z.ZodString;
915
- orbital: z.ZodString;
916
- }, z.core.$strict>;
917
- /** Validates either kind. */
918
- declare const BehaviorValueSchema: z.ZodUnion<readonly [z.ZodObject<{
919
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
920
- 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>>]>>>;
921
- linkedEntity: z.ZodOptional<z.ZodString>;
922
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
923
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
924
- event: z.ZodString;
925
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
926
- triggers: z.ZodString;
927
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
928
- description: z.ZodOptional<z.ZodString>;
929
- synonyms: z.ZodOptional<z.ZodString>;
930
- tier: z.ZodOptional<z.ZodString>;
931
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
932
- scope: z.ZodOptional<z.ZodEnum<{
933
- external: "external";
934
- internal: "internal";
935
- }>>;
936
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
937
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
938
- kind: z.ZodLiteral<"any">;
939
- }, z.core.$strip>, z.ZodObject<{
940
- kind: z.ZodLiteral<"trait">;
941
- trait: z.ZodString;
942
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
943
- }, z.core.$strip>, z.ZodObject<{
944
- kind: z.ZodLiteral<"orbital">;
945
- orbital: z.ZodString;
946
- trait: z.ZodString;
947
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
948
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
949
- }, z.core.$strip>]>>;
950
- }, z.core.$strip>>>;
951
- emitsScope: z.ZodOptional<z.ZodEnum<{
952
- external: "external";
953
- internal: "internal";
954
- }>>;
955
- behavior: z.ZodString;
956
- trait: z.ZodString;
957
- }, z.core.$strict>, z.ZodObject<{
958
- entity: z.ZodOptional<z.ZodString>;
959
- persistence: z.ZodOptional<z.ZodEnum<{
960
- persistent: "persistent";
961
- runtime: "runtime";
962
- }>>;
963
- shared: z.ZodOptional<z.ZodBoolean>;
964
- identity: z.ZodOptional<z.ZodBoolean>;
965
- browser: z.ZodOptional<z.ZodBoolean>;
966
- collection: z.ZodOptional<z.ZodString>;
967
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
968
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
969
- pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
970
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
971
- event: z.ZodString;
972
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
973
- triggers: z.ZodString;
974
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
975
- description: z.ZodOptional<z.ZodString>;
976
- synonyms: z.ZodOptional<z.ZodString>;
977
- tier: z.ZodOptional<z.ZodString>;
978
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
979
- scope: z.ZodOptional<z.ZodEnum<{
980
- external: "external";
981
- internal: "internal";
982
- }>>;
983
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
984
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
985
- kind: z.ZodLiteral<"any">;
986
- }, z.core.$strip>, z.ZodObject<{
987
- kind: z.ZodLiteral<"trait">;
988
- trait: z.ZodString;
989
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
990
- }, z.core.$strip>, z.ZodObject<{
991
- kind: z.ZodLiteral<"orbital">;
992
- orbital: z.ZodString;
993
- trait: z.ZodString;
994
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
995
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
996
- }, z.core.$strip>]>>;
997
- trait: z.ZodString;
998
- }, z.core.$strip>>>;
999
- roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1000
- pageModifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1001
- access: z.ZodOptional<z.ZodEnum<{
1002
- public: "public";
1003
- authenticated: "authenticated";
1004
- }>>;
1005
- indexing: z.ZodOptional<z.ZodEnum<{
1006
- index: "index";
1007
- noindex: "noindex";
1008
- }>>;
1009
- title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
1010
- description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
1011
- translationOf: z.ZodOptional<z.ZodString>;
1012
- label: z.ZodOptional<z.ZodString>;
1013
- icon: z.ZodOptional<z.ZodString>;
1014
- roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
1015
- }, z.core.$strict>>>;
1016
- omit: z.ZodOptional<z.ZodArray<z.ZodString>>;
1017
- only: z.ZodOptional<z.ZodArray<z.ZodString>>;
1018
- entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1019
- mounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1020
- extend: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1021
- mock: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1022
- retype: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1023
- name: z.ZodOptional<z.ZodString>;
1024
- app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1025
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1026
- traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1027
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1028
- 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>>]>>>;
1029
- linkedEntity: z.ZodOptional<z.ZodString>;
1030
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1031
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1032
- event: z.ZodString;
1033
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1034
- triggers: z.ZodString;
1035
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1036
- description: z.ZodOptional<z.ZodString>;
1037
- synonyms: z.ZodOptional<z.ZodString>;
1038
- tier: z.ZodOptional<z.ZodString>;
1039
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1040
- scope: z.ZodOptional<z.ZodEnum<{
1041
- external: "external";
1042
- internal: "internal";
1043
- }>>;
1044
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1045
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1046
- kind: z.ZodLiteral<"any">;
1047
- }, z.core.$strip>, z.ZodObject<{
1048
- kind: z.ZodLiteral<"trait">;
1049
- trait: z.ZodString;
1050
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1051
- }, z.core.$strip>, z.ZodObject<{
1052
- kind: z.ZodLiteral<"orbital">;
1053
- orbital: z.ZodString;
1054
- trait: z.ZodString;
1055
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1056
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1057
- }, z.core.$strip>]>>;
1058
- }, z.core.$strip>>>;
1059
- emitsScope: z.ZodOptional<z.ZodEnum<{
1060
- external: "external";
1061
- internal: "internal";
1062
- }>>;
1063
- }, z.core.$strict>>>;
1064
- uses: z.ZodOptional<z.ZodArray<z.ZodObject<{
1065
- from: z.ZodString;
1066
- as: z.ZodString;
1067
- }, z.core.$strict>>>;
1068
- siblings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1069
- name: z.ZodString;
1070
- ref: z.ZodString;
1071
- linkedEntity: z.ZodOptional<z.ZodString>;
1072
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1073
- }, z.core.$strict>>>;
1074
- behavior: z.ZodString;
1075
- orbital: z.ZodString;
1076
- }, z.core.$strict>]>;
1077
- /**
1078
- * `behavior/apply` on a trait value: `config`, `events` and `fields` merge
1079
- * key-wise with the later value winning; `listens`, `emitsScope` and
1080
- * `linkedEntity` replace. Pure — the input is not mutated.
1081
- */
1082
- declare function applyTraitOverrides(value: TraitValue, overrides: TraitOverrides): TraitValue;
1083
- /**
1084
- * `behavior/apply` on an orbital value — the §8b merge table. Maps
1085
- * (`config`, `events`, `fields`, `pages`, `pageModifiers`, `roles`, `entities`,
1086
- * `mounts`, `mock`) merge key-wise, later wins; `traits` merges per trait with the
1087
- * trait-value rules; `extend` and `retype` merge by field name; everything else
1088
- * (`name`, `entity`, `persistence`, `collection`, `only`, `omit`, `listens`, the
1089
- * flags) replaces. Pure.
1090
- */
1091
- declare function applyOrbitalOverrides(value: OrbitalValue, overrides: OrbitalOverrides): OrbitalValue;
1092
- /** `behavior/apply` for either kind; the overrides are validated against the value's kind. */
1093
- declare function applyBehaviorOverrides(value: BehaviorValue, overrides: JsonValue): BehaviorValue;
1094
- /** Structural guard for a trait value carried as data. */
1095
- declare function isTraitValue(value: RuntimeValue): value is TraitValue;
1096
- /** Structural guard for an orbital value carried as data. */
1097
- declare function isOrbitalValue(value: RuntimeValue): value is OrbitalValue;
1098
- /** A whole behavior as a value (`.lolo` type `behavior`): what `behavior/ref` builds and a render embed runs. */
1099
- declare function behaviorRef(specifier: string): BehaviorRef;
1100
- /** Structural guard for a behavior value: a specifier and, optionally, its declared bridge (a trait or orbital value names a member too). */
1101
- declare function isBehaviorRefValue(value: RuntimeValue): value is BehaviorRef;
1102
- /**
1103
- * A `behavior/catalog` scope: registry folders `<prefix>/<topic>[/<tier>]` (the
1104
- * tree packages ship as `<registry>/<topic>/<tier>/<name>.orb`), optionally
1105
- * narrowed by exposure.
1106
- */
1107
- declare const CatalogScopeSchema: z.ZodObject<{
1108
- paths: z.ZodArray<z.ZodString>;
1109
- exposure: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1110
- palette: "palette";
1111
- internal: "internal";
1112
- app: "app";
1113
- experience: "experience";
1114
- both: "both";
1115
- }>>>;
1116
- }, z.core.$strict>;
1117
- type CatalogScope = z.infer<typeof CatalogScopeSchema>;
1118
- /**
1119
- * The events an embedded behavior exchanges with the page that embeds it: `listens` are the
1120
- * host's events delivered into it (to every trait that handles one), `emits` are its own
1121
- * `external` events re-emitted on the host. Nothing else crosses; without a bridge it runs isolated.
1122
- */
1123
- declare const BehaviorBridgeSchema: z.ZodObject<{
1124
- listens: z.ZodArray<z.ZodString>;
1125
- emits: z.ZodArray<z.ZodString>;
1126
- }, z.core.$strict>;
1127
- type BehaviorBridge = z.infer<typeof BehaviorBridgeSchema>;
1128
- /**
1129
- * A behavior named by itself, with no trait or orbital picked (what `behavior/describe` takes for a whole behavior), the
1130
- * bridge its embed declares, if any, and optionally `resolved`: the behavior's resolved program as JSON, validated by
1131
- * whoever set it, which an embed runs as it is instead of asking the host to mount the behavior.
1132
- */
1133
- declare const BehaviorRefSchema: z.ZodObject<{
1134
- behavior: z.ZodString;
1135
- bridge: z.ZodOptional<z.ZodObject<{
1136
- listens: z.ZodArray<z.ZodString>;
1137
- emits: z.ZodArray<z.ZodString>;
1138
- }, z.core.$strict>>;
1139
- resolved: z.ZodOptional<z.ZodString>;
1140
- }, z.core.$strict>;
1141
- type BehaviorRef = z.infer<typeof BehaviorRefSchema>;
1142
- /** The overrides `behavior/apply` takes for a whole behavior value: its bridge. */
1143
- declare const BehaviorRefOverridesSchema: z.ZodObject<{
1144
- bridge: z.ZodObject<{
1145
- listens: z.ZodArray<z.ZodString>;
1146
- emits: z.ZodArray<z.ZodString>;
1147
- }, z.core.$strict>;
1148
- }, z.core.$strict>;
1149
- /** `behavior/apply` on a behavior value: records (replaces) its bridge. Pure. */
1150
- declare function applyBehaviorRefOverrides(value: BehaviorRef, overrides: JsonValue): BehaviorRef;
1151
- /** One behavior `behavior/catalog` returns (`orb behaviors catalog --json`). */
1152
- declare const CatalogEntrySchema: z.ZodObject<{
1153
- behavior: z.ZodString;
1154
- package: z.ZodString;
1155
- topic: z.ZodString;
1156
- level: z.ZodEnum<{
1157
- atom: "atom";
1158
- organism: "organism";
1159
- molecule: "molecule";
1160
- }>;
1161
- exposure: z.ZodOptional<z.ZodEnum<{
1162
- palette: "palette";
1163
- internal: "internal";
1164
- app: "app";
1165
- experience: "experience";
1166
- both: "both";
1167
- }>>;
1168
- pattern: z.ZodOptional<z.ZodString>;
1169
- description: z.ZodString;
1170
- capabilities: z.ZodArray<z.ZodString>;
1171
- traits: z.ZodArray<z.ZodObject<{
1172
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1173
- 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>>]>>>;
1174
- linkedEntity: z.ZodOptional<z.ZodString>;
1175
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1176
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1177
- event: z.ZodString;
1178
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1179
- triggers: z.ZodString;
1180
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1181
- description: z.ZodOptional<z.ZodString>;
1182
- synonyms: z.ZodOptional<z.ZodString>;
1183
- tier: z.ZodOptional<z.ZodString>;
1184
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1185
- scope: z.ZodOptional<z.ZodEnum<{
1186
- external: "external";
1187
- internal: "internal";
1188
- }>>;
1189
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1190
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1191
- kind: z.ZodLiteral<"any">;
1192
- }, z.core.$strip>, z.ZodObject<{
1193
- kind: z.ZodLiteral<"trait">;
1194
- trait: z.ZodString;
1195
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1196
- }, z.core.$strip>, z.ZodObject<{
1197
- kind: z.ZodLiteral<"orbital">;
1198
- orbital: z.ZodString;
1199
- trait: z.ZodString;
1200
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1201
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1202
- }, z.core.$strip>]>>;
1203
- }, z.core.$strip>>>;
1204
- emitsScope: z.ZodOptional<z.ZodEnum<{
1205
- external: "external";
1206
- internal: "internal";
1207
- }>>;
1208
- behavior: z.ZodString;
1209
- trait: z.ZodString;
1210
- }, z.core.$strict>>;
1211
- value: z.ZodObject<{
1212
- behavior: z.ZodString;
1213
- bridge: z.ZodOptional<z.ZodObject<{
1214
- listens: z.ZodArray<z.ZodString>;
1215
- emits: z.ZodArray<z.ZodString>;
1216
- }, z.core.$strict>>;
1217
- resolved: z.ZodOptional<z.ZodString>;
1218
- }, z.core.$strict>;
1219
- vectors: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNumber>>;
1220
- model: z.ZodString;
1221
- }, z.core.$strict>;
1222
- type CatalogEntry = z.infer<typeof CatalogEntrySchema>;
1223
- /** One knob of a described trait, with its shipped embedding vector. */
1224
- type TraitKnob = {
1225
- key: string;
1226
- type: string;
1227
- default?: TraitConfigValue;
1228
- label?: string;
1229
- description?: string;
1230
- tier?: string;
1231
- vector?: number[];
1232
- };
1233
- declare const TraitKnobSchema: z.ZodType<TraitKnob>;
1234
- /** A described trait's events: what it emits, listens to and transitions on, and which of those its source declares `@tier "domain"`. */
1235
- type TraitEvents = {
1236
- emits: string[];
1237
- listens: string[];
1238
- /** Events the trait's own transitions fire on — the only valid `listens` triggers. */
1239
- transitions: string[];
1240
- domain?: string[];
1241
- };
1242
- declare const TraitEventsSchema: z.ZodType<TraitEvents>;
1243
- /** A described trait's state machine as the program runs it (resolved: composition and renames applied). */
1244
- type TraitMachine = {
1245
- linkedEntity?: string;
1246
- stateMachine: StateMachine;
1247
- };
1248
- declare const TraitMachineObject: z.ZodObject<{
1249
- linkedEntity: z.ZodOptional<z.ZodString>;
1250
- stateMachine: z.ZodObject<{
1251
- states: z.ZodArray<z.ZodObject<{
1252
- name: z.ZodString;
1253
- isInitial: z.ZodOptional<z.ZodBoolean>;
1254
- isTerminal: z.ZodOptional<z.ZodBoolean>;
1255
- isFinal: z.ZodOptional<z.ZodBoolean>;
1256
- description: z.ZodOptional<z.ZodString>;
1257
- onEntry: z.ZodOptional<z.ZodArray<z.ZodString>>;
1258
- onExit: z.ZodOptional<z.ZodArray<z.ZodString>>;
1259
- holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1260
- }, z.core.$strip>>;
1261
- events: z.ZodArray<z.ZodObject<{
1262
- key: z.ZodString;
1263
- id: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1264
- name: z.ZodString;
1265
- description: z.ZodOptional<z.ZodString>;
1266
- synonyms: z.ZodOptional<z.ZodString>;
1267
- tier: z.ZodOptional<z.ZodString>;
1268
- payloadSchema: z.ZodOptional<z.ZodArray<z.ZodType<PayloadField, unknown, z.core.$ZodTypeInternals<PayloadField, unknown>>>>;
1269
- payloadEntity: z.ZodOptional<z.ZodString>;
1270
- input: z.ZodOptional<z.ZodBoolean>;
1271
- listened: z.ZodOptional<z.ZodBoolean>;
1272
- inbound: z.ZodOptional<z.ZodObject<{
1273
- name: z.ZodString;
1274
- answers: z.ZodString;
1275
- verifies: z.ZodOptional<z.ZodObject<{
1276
- header: z.ZodString;
1277
- credential: z.ZodString;
1278
- }, z.core.$strip>>;
1279
- }, z.core.$strip>>;
1280
- classification: z.ZodOptional<z.ZodEnum<{
1281
- domain: "domain";
1282
- system: "system";
1283
- }>>;
1284
- semanticRole: z.ZodOptional<z.ZodString>;
1285
- }, z.core.$strip>>;
1286
- transitions: z.ZodArray<z.ZodObject<{
1287
- from: z.ZodString;
1288
- to: z.ZodString;
1289
- event: z.ZodString;
1290
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1291
- guard: z.ZodOptional<z.ZodNullable<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1292
- effects: z.ZodOptional<z.ZodArray<z.ZodType<TypedEffect, unknown, z.core.$ZodTypeInternals<TypedEffect, unknown>>>>;
1293
- ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
1294
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1295
- awaitRender: z.ZodOptional<z.ZodArray<z.ZodObject<{
1296
- trait: z.ZodString;
1297
- slot: z.ZodString;
1298
- skeleton: z.ZodType<SkeletonNode, unknown, z.core.$ZodTypeInternals<SkeletonNode, unknown>>;
1299
- }, z.core.$strip>>>;
1300
- }, z.core.$strip>>;
1301
- guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
1302
- name: z.ZodString;
1303
- expression: z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>;
1304
- description: z.ZodOptional<z.ZodString>;
1305
- }, z.core.$strip>>>;
1306
- }, z.core.$strip>;
1307
- }, z.core.$strict>;
1308
- declare const TraitMachineSchema: z.ZodType<TraitMachine, z.input<typeof TraitMachineObject>>;
1309
- /** A described trait printed as `.lolo` by orb's formatter, with the 1-based lines each transition (by its index in the machine) spans. */
1310
- type TraitSource = {
1311
- text: string;
1312
- transitions: {
1313
- index: number;
1314
- start: number;
1315
- end: number;
1316
- }[];
1317
- };
1318
- declare const TraitSourceSchema: z.ZodType<TraitSource>;
1319
- /** What `behavior/describe` returns for a trait value (`orb behaviors describe --json`). */
1320
- type TraitDescription = {
1321
- value: TraitValue;
1322
- knobs: TraitKnob[];
1323
- events: TraitEvents;
1324
- /** The trait's state machine; absent from an older orb. */
1325
- machine?: TraitMachine;
1326
- /** The trait as orb prints it; absent from an older orb. */
1327
- source?: TraitSource;
1328
- model: string;
1329
- };
1330
- declare const TraitDescriptionObject: z.ZodObject<{
1331
- value: z.ZodObject<{
1332
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1333
- 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>>]>>>;
1334
- linkedEntity: z.ZodOptional<z.ZodString>;
1335
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1336
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1337
- event: z.ZodString;
1338
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1339
- triggers: z.ZodString;
1340
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1341
- description: z.ZodOptional<z.ZodString>;
1342
- synonyms: z.ZodOptional<z.ZodString>;
1343
- tier: z.ZodOptional<z.ZodString>;
1344
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1345
- scope: z.ZodOptional<z.ZodEnum<{
1346
- external: "external";
1347
- internal: "internal";
1348
- }>>;
1349
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1350
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1351
- kind: z.ZodLiteral<"any">;
1352
- }, z.core.$strip>, z.ZodObject<{
1353
- kind: z.ZodLiteral<"trait">;
1354
- trait: z.ZodString;
1355
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1356
- }, z.core.$strip>, z.ZodObject<{
1357
- kind: z.ZodLiteral<"orbital">;
1358
- orbital: z.ZodString;
1359
- trait: z.ZodString;
1360
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1361
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1362
- }, z.core.$strip>]>>;
1363
- }, z.core.$strip>>>;
1364
- emitsScope: z.ZodOptional<z.ZodEnum<{
1365
- external: "external";
1366
- internal: "internal";
1367
- }>>;
1368
- behavior: z.ZodString;
1369
- trait: z.ZodString;
1370
- }, z.core.$strict>;
1371
- knobs: z.ZodArray<z.ZodType<TraitKnob, unknown, z.core.$ZodTypeInternals<TraitKnob, unknown>>>;
1372
- events: z.ZodType<TraitEvents, unknown, z.core.$ZodTypeInternals<TraitEvents, unknown>>;
1373
- machine: z.ZodOptional<z.ZodType<TraitMachine, {
1374
- stateMachine: {
1375
- states: {
1376
- name: string;
1377
- isInitial?: boolean | undefined;
1378
- isTerminal?: boolean | undefined;
1379
- isFinal?: boolean | undefined;
1380
- description?: string | undefined;
1381
- onEntry?: string[] | undefined;
1382
- onExit?: string[] | undefined;
1383
- holds?: unknown;
1384
- }[];
1385
- events: {
1386
- key: string;
1387
- name: string;
1388
- id?: string | undefined;
1389
- description?: string | undefined;
1390
- synonyms?: string | undefined;
1391
- tier?: string | undefined;
1392
- payloadSchema?: unknown[] | undefined;
1393
- payloadEntity?: string | undefined;
1394
- input?: boolean | undefined;
1395
- listened?: boolean | undefined;
1396
- inbound?: {
1397
- name: string;
1398
- answers: string;
1399
- verifies?: {
1400
- header: string;
1401
- credential: string;
1402
- } | undefined;
1403
- } | undefined;
1404
- classification?: "domain" | "system" | undefined;
1405
- semanticRole?: string | undefined;
1406
- }[];
1407
- transitions: {
1408
- from: string;
1409
- to: string;
1410
- event: string;
1411
- eventId?: string | undefined;
1412
- guard?: unknown;
1413
- effects?: unknown[] | undefined;
1414
- ensures?: unknown;
1415
- description?: string | null | undefined;
1416
- awaitRender?: {
1417
- trait: string;
1418
- slot: string;
1419
- skeleton: unknown;
1420
- }[] | undefined;
1421
- }[];
1422
- guards?: {
1423
- name: string;
1424
- expression: unknown;
1425
- description?: string | undefined;
1426
- }[] | undefined;
1427
- };
1428
- linkedEntity?: string | undefined;
1429
- }, z.core.$ZodTypeInternals<TraitMachine, {
1430
- stateMachine: {
1431
- states: {
1432
- name: string;
1433
- isInitial?: boolean | undefined;
1434
- isTerminal?: boolean | undefined;
1435
- isFinal?: boolean | undefined;
1436
- description?: string | undefined;
1437
- onEntry?: string[] | undefined;
1438
- onExit?: string[] | undefined;
1439
- holds?: unknown;
1440
- }[];
1441
- events: {
1442
- key: string;
1443
- name: string;
1444
- id?: string | undefined;
1445
- description?: string | undefined;
1446
- synonyms?: string | undefined;
1447
- tier?: string | undefined;
1448
- payloadSchema?: unknown[] | undefined;
1449
- payloadEntity?: string | undefined;
1450
- input?: boolean | undefined;
1451
- listened?: boolean | undefined;
1452
- inbound?: {
1453
- name: string;
1454
- answers: string;
1455
- verifies?: {
1456
- header: string;
1457
- credential: string;
1458
- } | undefined;
1459
- } | undefined;
1460
- classification?: "domain" | "system" | undefined;
1461
- semanticRole?: string | undefined;
1462
- }[];
1463
- transitions: {
1464
- from: string;
1465
- to: string;
1466
- event: string;
1467
- eventId?: string | undefined;
1468
- guard?: unknown;
1469
- effects?: unknown[] | undefined;
1470
- ensures?: unknown;
1471
- description?: string | null | undefined;
1472
- awaitRender?: {
1473
- trait: string;
1474
- slot: string;
1475
- skeleton: unknown;
1476
- }[] | undefined;
1477
- }[];
1478
- guards?: {
1479
- name: string;
1480
- expression: unknown;
1481
- description?: string | undefined;
1482
- }[] | undefined;
1483
- };
1484
- linkedEntity?: string | undefined;
1485
- }>>>;
1486
- source: z.ZodOptional<z.ZodType<TraitSource, unknown, z.core.$ZodTypeInternals<TraitSource, unknown>>>;
1487
- model: z.ZodString;
1488
- }, z.core.$strict>;
1489
- declare const TraitDescriptionSchema: z.ZodType<TraitDescription, z.input<typeof TraitDescriptionObject>>;
1490
- /** What `behavior/describe` accepts: a trait value, an orbital value, or a whole behavior. */
1491
- declare const DescribeTargetSchema: z.ZodUnion<readonly [z.ZodObject<{
1492
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1493
- 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>>]>>>;
1494
- linkedEntity: z.ZodOptional<z.ZodString>;
1495
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1496
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1497
- event: z.ZodString;
1498
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1499
- triggers: z.ZodString;
1500
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1501
- description: z.ZodOptional<z.ZodString>;
1502
- synonyms: z.ZodOptional<z.ZodString>;
1503
- tier: z.ZodOptional<z.ZodString>;
1504
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1505
- scope: z.ZodOptional<z.ZodEnum<{
1506
- external: "external";
1507
- internal: "internal";
1508
- }>>;
1509
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1510
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1511
- kind: z.ZodLiteral<"any">;
1512
- }, z.core.$strip>, z.ZodObject<{
1513
- kind: z.ZodLiteral<"trait">;
1514
- trait: z.ZodString;
1515
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1516
- }, z.core.$strip>, z.ZodObject<{
1517
- kind: z.ZodLiteral<"orbital">;
1518
- orbital: z.ZodString;
1519
- trait: z.ZodString;
1520
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1521
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1522
- }, z.core.$strip>]>>;
1523
- }, z.core.$strip>>>;
1524
- emitsScope: z.ZodOptional<z.ZodEnum<{
1525
- external: "external";
1526
- internal: "internal";
1527
- }>>;
1528
- behavior: z.ZodString;
1529
- trait: z.ZodString;
1530
- }, z.core.$strict>, z.ZodObject<{
1531
- entity: z.ZodOptional<z.ZodString>;
1532
- persistence: z.ZodOptional<z.ZodEnum<{
1533
- persistent: "persistent";
1534
- runtime: "runtime";
1535
- }>>;
1536
- shared: z.ZodOptional<z.ZodBoolean>;
1537
- identity: z.ZodOptional<z.ZodBoolean>;
1538
- browser: z.ZodOptional<z.ZodBoolean>;
1539
- collection: z.ZodOptional<z.ZodString>;
1540
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1541
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1542
- pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1543
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1544
- event: z.ZodString;
1545
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1546
- triggers: z.ZodString;
1547
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1548
- description: z.ZodOptional<z.ZodString>;
1549
- synonyms: z.ZodOptional<z.ZodString>;
1550
- tier: z.ZodOptional<z.ZodString>;
1551
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1552
- scope: z.ZodOptional<z.ZodEnum<{
1553
- external: "external";
1554
- internal: "internal";
1555
- }>>;
1556
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1557
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1558
- kind: z.ZodLiteral<"any">;
1559
- }, z.core.$strip>, z.ZodObject<{
1560
- kind: z.ZodLiteral<"trait">;
1561
- trait: z.ZodString;
1562
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1563
- }, z.core.$strip>, z.ZodObject<{
1564
- kind: z.ZodLiteral<"orbital">;
1565
- orbital: z.ZodString;
1566
- trait: z.ZodString;
1567
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1568
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1569
- }, z.core.$strip>]>>;
1570
- trait: z.ZodString;
1571
- }, z.core.$strip>>>;
1572
- roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1573
- pageModifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1574
- access: z.ZodOptional<z.ZodEnum<{
1575
- public: "public";
1576
- authenticated: "authenticated";
1577
- }>>;
1578
- indexing: z.ZodOptional<z.ZodEnum<{
1579
- index: "index";
1580
- noindex: "noindex";
1581
- }>>;
1582
- title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
1583
- description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
1584
- translationOf: z.ZodOptional<z.ZodString>;
1585
- label: z.ZodOptional<z.ZodString>;
1586
- icon: z.ZodOptional<z.ZodString>;
1587
- roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
1588
- }, z.core.$strict>>>;
1589
- omit: z.ZodOptional<z.ZodArray<z.ZodString>>;
1590
- only: z.ZodOptional<z.ZodArray<z.ZodString>>;
1591
- entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1592
- mounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1593
- extend: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1594
- mock: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1595
- retype: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1596
- name: z.ZodOptional<z.ZodString>;
1597
- app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1598
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1599
- traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1600
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1601
- 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>>]>>>;
1602
- linkedEntity: z.ZodOptional<z.ZodString>;
1603
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1604
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1605
- event: z.ZodString;
1606
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1607
- triggers: z.ZodString;
1608
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1609
- description: z.ZodOptional<z.ZodString>;
1610
- synonyms: z.ZodOptional<z.ZodString>;
1611
- tier: z.ZodOptional<z.ZodString>;
1612
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1613
- scope: z.ZodOptional<z.ZodEnum<{
1614
- external: "external";
1615
- internal: "internal";
1616
- }>>;
1617
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1618
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1619
- kind: z.ZodLiteral<"any">;
1620
- }, z.core.$strip>, z.ZodObject<{
1621
- kind: z.ZodLiteral<"trait">;
1622
- trait: z.ZodString;
1623
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1624
- }, z.core.$strip>, z.ZodObject<{
1625
- kind: z.ZodLiteral<"orbital">;
1626
- orbital: z.ZodString;
1627
- trait: z.ZodString;
1628
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1629
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1630
- }, z.core.$strip>]>>;
1631
- }, z.core.$strip>>>;
1632
- emitsScope: z.ZodOptional<z.ZodEnum<{
1633
- external: "external";
1634
- internal: "internal";
1635
- }>>;
1636
- }, z.core.$strict>>>;
1637
- uses: z.ZodOptional<z.ZodArray<z.ZodObject<{
1638
- from: z.ZodString;
1639
- as: z.ZodString;
1640
- }, z.core.$strict>>>;
1641
- siblings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1642
- name: z.ZodString;
1643
- ref: z.ZodString;
1644
- linkedEntity: z.ZodOptional<z.ZodString>;
1645
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1646
- }, z.core.$strict>>>;
1647
- behavior: z.ZodString;
1648
- orbital: z.ZodString;
1649
- }, z.core.$strict>, z.ZodObject<{
1650
- behavior: z.ZodString;
1651
- bridge: z.ZodOptional<z.ZodObject<{
1652
- listens: z.ZodArray<z.ZodString>;
1653
- emits: z.ZodArray<z.ZodString>;
1654
- }, z.core.$strict>>;
1655
- resolved: z.ZodOptional<z.ZodString>;
1656
- }, z.core.$strict>]>;
1657
- type DescribeTarget = TraitValue | OrbitalValue | BehaviorRef;
1658
- /** One knob as a payload field (`orb behaviors describe`): its struct and list shapes resolved, plus its declared docs. */
1659
- interface KnobField {
1660
- readonly name: string;
1661
- readonly type: string;
1662
- readonly required?: boolean;
1663
- readonly values?: readonly string[];
1664
- readonly properties?: readonly KnobField[];
1665
- /** The knob's current value: what a caller keeps when it does not change it. */
1666
- readonly default?: TraitConfigValue;
1667
- readonly label?: string;
1668
- readonly description?: string;
1669
- readonly synonyms?: string;
1670
- readonly tier?: string;
1671
- /** The `@config.<knob>` this knob's value forwards: its text is owned (and set) there. */
1672
- readonly forwardedFrom?: string;
1673
- }
1674
- declare const KnobFieldSchema: z.ZodType<KnobField>;
1675
- /** One orbital of a described behavior, from its resolved program. */
1676
- declare const OrbitalDescriptionSchema: z.ZodObject<{
1677
- value: z.ZodObject<{
1678
- entity: z.ZodOptional<z.ZodString>;
1679
- persistence: z.ZodOptional<z.ZodEnum<{
1680
- persistent: "persistent";
1681
- runtime: "runtime";
1682
- }>>;
1683
- shared: z.ZodOptional<z.ZodBoolean>;
1684
- identity: z.ZodOptional<z.ZodBoolean>;
1685
- browser: z.ZodOptional<z.ZodBoolean>;
1686
- collection: z.ZodOptional<z.ZodString>;
1687
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1688
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1689
- pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1690
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1691
- event: z.ZodString;
1692
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1693
- triggers: z.ZodString;
1694
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1695
- description: z.ZodOptional<z.ZodString>;
1696
- synonyms: z.ZodOptional<z.ZodString>;
1697
- tier: z.ZodOptional<z.ZodString>;
1698
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1699
- scope: z.ZodOptional<z.ZodEnum<{
1700
- external: "external";
1701
- internal: "internal";
1702
- }>>;
1703
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1704
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1705
- kind: z.ZodLiteral<"any">;
1706
- }, z.core.$strip>, z.ZodObject<{
1707
- kind: z.ZodLiteral<"trait">;
1708
- trait: z.ZodString;
1709
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1710
- }, z.core.$strip>, z.ZodObject<{
1711
- kind: z.ZodLiteral<"orbital">;
1712
- orbital: z.ZodString;
1713
- trait: z.ZodString;
1714
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1715
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1716
- }, z.core.$strip>]>>;
1717
- trait: z.ZodString;
1718
- }, z.core.$strip>>>;
1719
- roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1720
- pageModifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1721
- access: z.ZodOptional<z.ZodEnum<{
1722
- public: "public";
1723
- authenticated: "authenticated";
1724
- }>>;
1725
- indexing: z.ZodOptional<z.ZodEnum<{
1726
- index: "index";
1727
- noindex: "noindex";
1728
- }>>;
1729
- title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
1730
- description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
1731
- translationOf: z.ZodOptional<z.ZodString>;
1732
- label: z.ZodOptional<z.ZodString>;
1733
- icon: z.ZodOptional<z.ZodString>;
1734
- roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
1735
- }, z.core.$strict>>>;
1736
- omit: z.ZodOptional<z.ZodArray<z.ZodString>>;
1737
- only: z.ZodOptional<z.ZodArray<z.ZodString>>;
1738
- entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1739
- mounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1740
- extend: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1741
- mock: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1742
- retype: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1743
- name: z.ZodOptional<z.ZodString>;
1744
- app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1745
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1746
- traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1747
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1748
- 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>>]>>>;
1749
- linkedEntity: z.ZodOptional<z.ZodString>;
1750
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1751
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1752
- event: z.ZodString;
1753
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1754
- triggers: z.ZodString;
1755
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1756
- description: z.ZodOptional<z.ZodString>;
1757
- synonyms: z.ZodOptional<z.ZodString>;
1758
- tier: z.ZodOptional<z.ZodString>;
1759
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1760
- scope: z.ZodOptional<z.ZodEnum<{
1761
- external: "external";
1762
- internal: "internal";
1763
- }>>;
1764
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1765
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1766
- kind: z.ZodLiteral<"any">;
1767
- }, z.core.$strip>, z.ZodObject<{
1768
- kind: z.ZodLiteral<"trait">;
1769
- trait: z.ZodString;
1770
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1771
- }, z.core.$strip>, z.ZodObject<{
1772
- kind: z.ZodLiteral<"orbital">;
1773
- orbital: z.ZodString;
1774
- trait: z.ZodString;
1775
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1776
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1777
- }, z.core.$strip>]>>;
1778
- }, z.core.$strip>>>;
1779
- emitsScope: z.ZodOptional<z.ZodEnum<{
1780
- external: "external";
1781
- internal: "internal";
1782
- }>>;
1783
- }, z.core.$strict>>>;
1784
- uses: z.ZodOptional<z.ZodArray<z.ZodObject<{
1785
- from: z.ZodString;
1786
- as: z.ZodString;
1787
- }, z.core.$strict>>>;
1788
- siblings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1789
- name: z.ZodString;
1790
- ref: z.ZodString;
1791
- linkedEntity: z.ZodOptional<z.ZodString>;
1792
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1793
- }, z.core.$strict>>>;
1794
- behavior: z.ZodString;
1795
- orbital: z.ZodString;
1796
- }, z.core.$strict>;
1797
- config: z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>;
1798
- knobs: z.ZodArray<z.ZodType<KnobField, unknown, z.core.$ZodTypeInternals<KnobField, unknown>>>;
1799
- entity: z.ZodOptional<z.ZodObject<{
1800
- name: z.ZodString;
1801
- fields: z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>;
1802
- identity: z.ZodOptional<z.ZodBoolean>;
1803
- persistence: z.ZodOptional<z.ZodEnum<{
1804
- persistent: "persistent";
1805
- runtime: "runtime";
1806
- }>>;
1807
- }, z.core.$strict>>;
1808
- borrows: z.ZodArray<z.ZodString>;
1809
- expects: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1810
- strict: z.ZodOptional<z.ZodBoolean>;
1811
- kind: z.ZodLiteral<"identity">;
1812
- name: z.ZodOptional<z.ZodString>;
1813
- shape: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1814
- }, z.core.$strip>, z.ZodObject<{
1815
- strict: z.ZodOptional<z.ZodBoolean>;
1816
- kind: z.ZodLiteral<"entity">;
1817
- name: z.ZodString;
1818
- shape: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1819
- persistence: z.ZodOptional<z.ZodEnum<{
1820
- persistent: "persistent";
1821
- runtime: "runtime";
1822
- }>>;
1823
- shared: z.ZodOptional<z.ZodBoolean>;
1824
- browser: z.ZodOptional<z.ZodBoolean>;
1825
- read_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1826
- create_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1827
- update_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1828
- delete_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1829
- access_waivers: z.ZodOptional<z.ZodObject<{
1830
- read: z.ZodOptional<z.ZodString>;
1831
- create: z.ZodOptional<z.ZodString>;
1832
- update: z.ZodOptional<z.ZodString>;
1833
- delete: z.ZodOptional<z.ZodString>;
1834
- }, z.core.$strip>>;
1835
- invariants: z.ZodOptional<z.ZodArray<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1836
- }, z.core.$strip>, z.ZodObject<{
1837
- strict: z.ZodOptional<z.ZodBoolean>;
1838
- kind: z.ZodLiteral<"event">;
1839
- traitName: z.ZodString;
1840
- event: z.ZodString;
1841
- payload: z.ZodOptional<z.ZodArray<z.ZodType<EventPayloadField, unknown, z.core.$ZodTypeInternals<EventPayloadField, unknown>>>>;
1842
- }, z.core.$strip>, z.ZodObject<{
1843
- strict: z.ZodOptional<z.ZodBoolean>;
1844
- kind: z.ZodLiteral<"page">;
1845
- path: z.ZodString;
1846
- traits: z.ZodOptional<z.ZodArray<z.ZodString>>;
1847
- }, z.core.$strip>, z.ZodObject<{
1848
- strict: z.ZodOptional<z.ZodBoolean>;
1849
- kind: z.ZodLiteral<"state">;
1850
- traitName: z.ZodString;
1851
- state: z.ZodString;
1852
- holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1853
- }, z.core.$strip>, z.ZodObject<{
1854
- strict: z.ZodOptional<z.ZodBoolean>;
1855
- kind: z.ZodLiteral<"transition">;
1856
- traitName: z.ZodString;
1857
- from: z.ZodString;
1858
- event: z.ZodString;
1859
- to: z.ZodString;
1860
- ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
1861
- }, z.core.$strip>, z.ZodObject<{
1862
- strict: z.ZodOptional<z.ZodBoolean>;
1863
- kind: z.ZodLiteral<"config">;
1864
- name: z.ZodString;
1865
- knob: z.ZodType<ConfigFieldDeclaration, object, z.core.$ZodTypeInternals<ConfigFieldDeclaration, object>>;
1866
- }, z.core.$strip>], "kind">>;
1867
- traits: z.ZodArray<z.ZodObject<{
1868
- trait: z.ZodString;
1869
- config: z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>;
1870
- knobs: z.ZodArray<z.ZodType<KnobField, unknown, z.core.$ZodTypeInternals<KnobField, unknown>>>;
1871
- events: z.ZodType<TraitEvents, unknown, z.core.$ZodTypeInternals<TraitEvents, unknown>>;
1872
- rebindable: z.ZodOptional<z.ZodBoolean>;
1873
- ref: z.ZodOptional<z.ZodString>;
1874
- capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
1875
- }, z.core.$strict>>;
1876
- pages: z.ZodArray<z.ZodObject<{
1877
- name: z.ZodString;
1878
- path: z.ZodString;
1879
- traits: z.ZodOptional<z.ZodArray<z.ZodString>>;
1880
- label: z.ZodOptional<z.ZodString>;
1881
- icon: z.ZodOptional<z.ZodString>;
1882
- }, z.core.$strict>>;
1883
- forwards: z.ZodOptional<z.ZodArray<z.ZodObject<{
1884
- trait: z.ZodString;
1885
- event: z.ZodString;
1886
- via: z.ZodArray<z.ZodString>;
1887
- }, z.core.$strict>>>;
1888
- }, z.core.$strict>;
1889
- type OrbitalDescription = z.infer<typeof OrbitalDescriptionSchema>;
1890
- /** What `behavior/describe` returns for an orbital value or a whole behavior (`orb behaviors describe --json`). */
1891
- declare const BehaviorDescriptionSchema: z.ZodObject<{
1892
- behavior: z.ZodString;
1893
- config: z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>;
1894
- knobs: z.ZodArray<z.ZodType<KnobField, unknown, z.core.$ZodTypeInternals<KnobField, unknown>>>;
1895
- orbitals: z.ZodArray<z.ZodObject<{
1896
- value: z.ZodObject<{
1897
- entity: z.ZodOptional<z.ZodString>;
1898
- persistence: z.ZodOptional<z.ZodEnum<{
1899
- persistent: "persistent";
1900
- runtime: "runtime";
1901
- }>>;
1902
- shared: z.ZodOptional<z.ZodBoolean>;
1903
- identity: z.ZodOptional<z.ZodBoolean>;
1904
- browser: z.ZodOptional<z.ZodBoolean>;
1905
- collection: z.ZodOptional<z.ZodString>;
1906
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1907
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1908
- pages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1909
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1910
- event: z.ZodString;
1911
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1912
- triggers: z.ZodString;
1913
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1914
- description: z.ZodOptional<z.ZodString>;
1915
- synonyms: z.ZodOptional<z.ZodString>;
1916
- tier: z.ZodOptional<z.ZodString>;
1917
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1918
- scope: z.ZodOptional<z.ZodEnum<{
1919
- external: "external";
1920
- internal: "internal";
1921
- }>>;
1922
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1923
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1924
- kind: z.ZodLiteral<"any">;
1925
- }, z.core.$strip>, z.ZodObject<{
1926
- kind: z.ZodLiteral<"trait">;
1927
- trait: z.ZodString;
1928
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1929
- }, z.core.$strip>, z.ZodObject<{
1930
- kind: z.ZodLiteral<"orbital">;
1931
- orbital: z.ZodString;
1932
- trait: z.ZodString;
1933
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1934
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1935
- }, z.core.$strip>]>>;
1936
- trait: z.ZodString;
1937
- }, z.core.$strip>>>;
1938
- roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1939
- pageModifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1940
- access: z.ZodOptional<z.ZodEnum<{
1941
- public: "public";
1942
- authenticated: "authenticated";
1943
- }>>;
1944
- indexing: z.ZodOptional<z.ZodEnum<{
1945
- index: "index";
1946
- noindex: "noindex";
1947
- }>>;
1948
- title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
1949
- description: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodLiteral<"i18n/t">, z.ZodString], null>]>>;
1950
- translationOf: z.ZodOptional<z.ZodString>;
1951
- label: z.ZodOptional<z.ZodString>;
1952
- icon: z.ZodOptional<z.ZodString>;
1953
- roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
1954
- }, z.core.$strict>>>;
1955
- omit: z.ZodOptional<z.ZodArray<z.ZodString>>;
1956
- only: z.ZodOptional<z.ZodArray<z.ZodString>>;
1957
- entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1958
- mounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1959
- extend: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1960
- mock: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1961
- retype: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
1962
- name: z.ZodOptional<z.ZodString>;
1963
- app: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1964
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
1965
- traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1966
- fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1967
- 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>>]>>>;
1968
- linkedEntity: z.ZodOptional<z.ZodString>;
1969
- events: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1970
- listens: z.ZodOptional<z.ZodArray<z.ZodObject<{
1971
- event: z.ZodString;
1972
- eventId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1973
- triggers: z.ZodString;
1974
- triggersId: z.ZodOptional<z.ZodString & z.ZodType<EventId, string, z.core.$ZodTypeInternals<EventId, string>>>;
1975
- description: z.ZodOptional<z.ZodString>;
1976
- synonyms: z.ZodOptional<z.ZodString>;
1977
- tier: z.ZodOptional<z.ZodString>;
1978
- guard: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
1979
- scope: z.ZodOptional<z.ZodEnum<{
1980
- external: "external";
1981
- internal: "internal";
1982
- }>>;
1983
- payloadMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
1984
- source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1985
- kind: z.ZodLiteral<"any">;
1986
- }, z.core.$strip>, z.ZodObject<{
1987
- kind: z.ZodLiteral<"trait">;
1988
- trait: z.ZodString;
1989
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1990
- }, z.core.$strip>, z.ZodObject<{
1991
- kind: z.ZodLiteral<"orbital">;
1992
- orbital: z.ZodString;
1993
- trait: z.ZodString;
1994
- orbitalId: z.ZodOptional<z.ZodString & z.ZodType<OrbitalId, string, z.core.$ZodTypeInternals<OrbitalId, string>>>;
1995
- traitId: z.ZodOptional<z.ZodString & z.ZodType<TraitId, string, z.core.$ZodTypeInternals<TraitId, string>>>;
1996
- }, z.core.$strip>]>>;
1997
- }, z.core.$strip>>>;
1998
- emitsScope: z.ZodOptional<z.ZodEnum<{
1999
- external: "external";
2000
- internal: "internal";
2001
- }>>;
2002
- }, z.core.$strict>>>;
2003
- uses: z.ZodOptional<z.ZodArray<z.ZodObject<{
2004
- from: z.ZodString;
2005
- as: z.ZodString;
2006
- }, z.core.$strict>>>;
2007
- siblings: z.ZodOptional<z.ZodArray<z.ZodObject<{
2008
- name: z.ZodString;
2009
- ref: z.ZodString;
2010
- linkedEntity: z.ZodOptional<z.ZodString>;
2011
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<TraitConfigValue, unknown, z.core.$ZodTypeInternals<TraitConfigValue, unknown>>>>;
2012
- }, z.core.$strict>>>;
2013
- behavior: z.ZodString;
2014
- orbital: z.ZodString;
2015
- }, z.core.$strict>;
2016
- config: z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>;
2017
- knobs: z.ZodArray<z.ZodType<KnobField, unknown, z.core.$ZodTypeInternals<KnobField, unknown>>>;
2018
- entity: z.ZodOptional<z.ZodObject<{
2019
- name: z.ZodString;
2020
- fields: z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>;
2021
- identity: z.ZodOptional<z.ZodBoolean>;
2022
- persistence: z.ZodOptional<z.ZodEnum<{
2023
- persistent: "persistent";
2024
- runtime: "runtime";
2025
- }>>;
2026
- }, z.core.$strict>>;
2027
- borrows: z.ZodArray<z.ZodString>;
2028
- expects: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2029
- strict: z.ZodOptional<z.ZodBoolean>;
2030
- kind: z.ZodLiteral<"identity">;
2031
- name: z.ZodOptional<z.ZodString>;
2032
- shape: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
2033
- }, z.core.$strip>, z.ZodObject<{
2034
- strict: z.ZodOptional<z.ZodBoolean>;
2035
- kind: z.ZodLiteral<"entity">;
2036
- name: z.ZodString;
2037
- shape: z.ZodOptional<z.ZodArray<z.ZodType<EntityField, unknown, z.core.$ZodTypeInternals<EntityField, unknown>>>>;
2038
- persistence: z.ZodOptional<z.ZodEnum<{
2039
- persistent: "persistent";
2040
- runtime: "runtime";
2041
- }>>;
2042
- shared: z.ZodOptional<z.ZodBoolean>;
2043
- browser: z.ZodOptional<z.ZodBoolean>;
2044
- read_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2045
- create_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2046
- update_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2047
- delete_policy: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2048
- access_waivers: z.ZodOptional<z.ZodObject<{
2049
- read: z.ZodOptional<z.ZodString>;
2050
- create: z.ZodOptional<z.ZodString>;
2051
- update: z.ZodOptional<z.ZodString>;
2052
- delete: z.ZodOptional<z.ZodString>;
2053
- }, z.core.$strip>>;
2054
- invariants: z.ZodOptional<z.ZodArray<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>>;
2055
- }, z.core.$strip>, z.ZodObject<{
2056
- strict: z.ZodOptional<z.ZodBoolean>;
2057
- kind: z.ZodLiteral<"event">;
2058
- traitName: z.ZodString;
2059
- event: z.ZodString;
2060
- payload: z.ZodOptional<z.ZodArray<z.ZodType<EventPayloadField, unknown, z.core.$ZodTypeInternals<EventPayloadField, unknown>>>>;
2061
- }, z.core.$strip>, z.ZodObject<{
2062
- strict: z.ZodOptional<z.ZodBoolean>;
2063
- kind: z.ZodLiteral<"page">;
2064
- path: z.ZodString;
2065
- traits: z.ZodOptional<z.ZodArray<z.ZodString>>;
2066
- }, z.core.$strip>, z.ZodObject<{
2067
- strict: z.ZodOptional<z.ZodBoolean>;
2068
- kind: z.ZodLiteral<"state">;
2069
- traitName: z.ZodString;
2070
- state: z.ZodString;
2071
- holds: z.ZodOptional<z.ZodType<SExpr, unknown, z.core.$ZodTypeInternals<SExpr, unknown>>>;
2072
- }, z.core.$strip>, z.ZodObject<{
2073
- strict: z.ZodOptional<z.ZodBoolean>;
2074
- kind: z.ZodLiteral<"transition">;
2075
- traitName: z.ZodString;
2076
- from: z.ZodString;
2077
- event: z.ZodString;
2078
- to: z.ZodString;
2079
- ensures: z.ZodOptional<z.ZodType<SExpr[], unknown, z.core.$ZodTypeInternals<SExpr[], unknown>>>;
2080
- }, z.core.$strip>, z.ZodObject<{
2081
- strict: z.ZodOptional<z.ZodBoolean>;
2082
- kind: z.ZodLiteral<"config">;
2083
- name: z.ZodString;
2084
- knob: z.ZodType<ConfigFieldDeclaration, object, z.core.$ZodTypeInternals<ConfigFieldDeclaration, object>>;
2085
- }, z.core.$strip>], "kind">>;
2086
- traits: z.ZodArray<z.ZodObject<{
2087
- trait: z.ZodString;
2088
- config: z.ZodType<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>, z.core.$ZodTypeInternals<Readonly<Record<string, ConfigFieldDeclaration>>, Record<string, object>>>;
2089
- knobs: z.ZodArray<z.ZodType<KnobField, unknown, z.core.$ZodTypeInternals<KnobField, unknown>>>;
2090
- events: z.ZodType<TraitEvents, unknown, z.core.$ZodTypeInternals<TraitEvents, unknown>>;
2091
- rebindable: z.ZodOptional<z.ZodBoolean>;
2092
- ref: z.ZodOptional<z.ZodString>;
2093
- capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
2094
- }, z.core.$strict>>;
2095
- pages: z.ZodArray<z.ZodObject<{
2096
- name: z.ZodString;
2097
- path: z.ZodString;
2098
- traits: z.ZodOptional<z.ZodArray<z.ZodString>>;
2099
- label: z.ZodOptional<z.ZodString>;
2100
- icon: z.ZodOptional<z.ZodString>;
2101
- }, z.core.$strict>>;
2102
- forwards: z.ZodOptional<z.ZodArray<z.ZodObject<{
2103
- trait: z.ZodString;
2104
- event: z.ZodString;
2105
- via: z.ZodArray<z.ZodString>;
2106
- }, z.core.$strict>>>;
2107
- }, z.core.$strict>>;
2108
- uses: z.ZodOptional<z.ZodArray<z.ZodString>>;
2109
- }, z.core.$strict>;
2110
- type BehaviorDescription = z.infer<typeof BehaviorDescriptionSchema>;
2111
- /** What `program/eval` returns: where the validated program was written, and its traits as values. */
2112
- interface EvaluatedProgram {
2113
- /** Workspace-relative specifier of the written program (`./orbitals/<name>` by default). */
2114
- readonly behavior: string;
2115
- readonly traits: readonly TraitValue[];
2116
- /** The written program as a behavior value, ready to embed. */
2117
- readonly value: BehaviorRef;
2118
- }
2119
- /** A validator finding `program/eval` returns as data (the shape `orb validate --json` reports). A type alias, not an interface, so it is an `EventPayload` member. */
2120
- type ProgramValidationIssue = {
2121
- readonly code: string;
2122
- readonly message: string;
2123
- readonly path?: string;
2124
- readonly line?: number;
2125
- readonly column?: number;
2126
- };
2127
- /**
2128
- * A trait value made runnable by its host: the resolved one-orbital wrapper
2129
- * program that imports the value's owning orbital (`only { T }`, overrides as
2130
- * `traits { T { … } }`), the mounted trait's name in it, and the page showing it.
2131
- */
2132
- interface MountedTraitValue {
2133
- readonly schema: OrbitalSchema;
2134
- /** The orbital the wrapper mounts the value as. */
2135
- readonly orbital: string;
2136
- /** The value's trait under the import prefix (`<orbital><Trait>`). */
2137
- readonly trait: string;
2138
- readonly pagePath?: string;
2139
- }
2140
- /** A behavior value made runnable by its host: the resolved program as written and the page it opens on. */
2141
- interface MountedBehaviorValue {
2142
- readonly schema: OrbitalSchema;
2143
- /** The program's first page path (where the frame's scoped router starts). */
2144
- readonly firstPage: string;
2145
- }
2146
- /** Mounting outcome for a behavior value; validator issues come back as data. */
2147
- type BehaviorValueMountResult = {
2148
- readonly ok: true;
2149
- readonly mounted: MountedBehaviorValue;
2150
- } | {
2151
- readonly ok: false;
2152
- readonly error: string;
2153
- readonly errors?: readonly ProgramValidationIssue[];
2154
- };
2155
- /** Mounting outcome — the validator's issues come back as data when the value does not validate where it is bound. */
2156
- type TraitValueMountResult = {
2157
- readonly ok: true;
2158
- readonly mounted: MountedTraitValue;
2159
- } | {
2160
- readonly ok: false;
2161
- readonly error: string;
2162
- readonly errors?: readonly ProgramValidationIssue[];
2163
- };
2164
-
2165
- /**
2166
- * Apply trait config overrides to a schema — pure, returns a new schema.
2167
- *
2168
- * Used by config-driven preview surfaces (the playground property inspector and
2169
- * the verify config-sweep) to render a behavior with different `config` values
2170
- * WITHOUT recompiling: the override is written onto the matching trait, then the
2171
- * schema is re-registered and re-rendered.
2172
- *
2173
- * The resolved schema's traits are inlined `Trait`s whose `config` is the
2174
- * DECLARED schema (`{ field: { type, default, ... } }`), so an override patches
2175
- * each field's `default`. A trait that instead carries call-site value config
2176
- * (a `{ ref, config }` reference) gets the values merged directly.
2177
- *
2178
- * @packageDocumentation
2179
- */
2180
-
2181
- /**
2182
- * Return a new schema with `config` overrides applied to traits whose identity
2183
- * (`name`, falling back to `ref`) matches a key in `overrides`. Fields not
2184
- * declared on the trait are ignored — overrides never invent config.
2185
- */
2186
- declare function applyTraitConfigOverrides(schema: OrbitalSchema, overrides: Readonly<Record<string, TraitConfig>>): OrbitalSchema;
2187
-
2188
- /**
2189
- * Layout-Trait Builders
2190
- *
2191
- * Helpers for constructing the canonical inline LayoutTrait pattern that
2192
- * std layout-shell molecules (`std-filtered-list`, `std-master-detail-layout`,
2193
- * etc.) use to wrap a set of atom trait references in a `(render-ui main)`
2194
- * effect with `@trait.X` slot embeds.
2195
- *
2196
- * The canonical LayoutTrait is stateless: ONE state (`composing`, initial),
2197
- * ONE transition (`INIT` self-loop) carrying two effects — `(fetch Entity
2198
- * {emit: {success, failure}})` and `(render-ui "main" <pattern-tree>)`. Atoms
2199
- * embedded via `@trait.X` slot references react to the bus events the fetch
2200
- * emits; the LayoutTrait owns no further state.
2201
- *
2202
- * Usage from a std layout-shell molecule:
2203
- *
2204
- * ```ts
2205
- * import { makeSlot, makeLayoutTrait } from '@almadar/core/builders';
2206
- *
2207
- * const layout = makeLayoutTrait({
2208
- * name: 'DashboardLayout',
2209
- * linkedEntity: 'Metric',
2210
- * fetchEntity: 'Metric',
2211
- * loadedEvent: 'MetricLoaded',
2212
- * loadFailedEvent: 'MetricLoadFailed',
2213
- * renderUI: {
2214
- * type: 'stack',
2215
- * direction: 'vertical',
2216
- * children: [
2217
- * makeSlot('StatsRow'),
2218
- * makeSlot('ChartsRow'),
2219
- * makeSlot('FeedRow'),
2220
- * ],
2221
- * },
2222
- * });
2223
- * ```
2224
- *
2225
- * @packageDocumentation
2226
- */
2227
-
2228
- /**
2229
- * Build a `@trait.<name>` slot reference string. Used as a child entry in a
2230
- * pattern tree to embed another trait's render-ui at that position. The
2231
- * runtime resolves `@trait.X` to the matching trait's render-ui inline.
2232
- *
2233
- * @example makeSlot('FilteredItemSearch') // "@trait.FilteredItemSearch"
2234
- */
2235
- declare function makeSlot(traitName: string): string;
2236
- /**
2237
- * Build a `(render-ui <slot> <root>)` effect tuple. Pattern-typed sugar over
2238
- * the raw `RenderUIEffect` literal so callers don't have to spell out the
2239
- * three-element tuple form.
2240
- *
2241
- * @param slot - Canonical UI slot name (`'main'`, `'header'`, etc. — see UI_SLOTS).
2242
- * @param root - The pattern config for this slot's content, OR a `@`-binding
2243
- * string ({@link RenderBinding}) pointing at a render tree in `config` /
2244
- * `payload` (e.g. `'@config.bodyContent'`). Pass `null` to clear.
2245
- */
2246
- declare function makeRenderUI(slot: UISlot, root: AnyPatternConfig | RenderBinding | null): RenderUIEffect;
2247
- /**
2248
- * Options for {@link makeLayoutTrait}.
2249
- */
2250
- interface MakeLayoutTraitOpts {
2251
- /** Trait name, e.g. `"DashboardGridLayout"`. */
2252
- name: string;
2253
- /** Entity this layout's emits/listens bind to. */
2254
- linkedEntity: string;
2255
- /** Optional human-readable description (carried through to `Trait.description`). */
2256
- description?: string;
2257
- /**
2258
- * Entity name to fetch on INIT. When set, a `(fetch <Entity> {emit:
2259
- * {success, failure}})` effect is prepended to the INIT transition. Omit
2260
- * for purely-presentational layouts that don't load data themselves.
2261
- */
2262
- fetchEntity?: string;
2263
- /**
2264
- * Event name emitted on successful fetch. Required when `fetchEntity` is
2265
- * set; the LayoutTrait declares this event in its `emits` and uses it as
2266
- * the `success` emit-name in the fetch effect.
2267
- * Convention: `"<Entity>Loaded"`.
2268
- */
2269
- loadedEvent?: string;
2270
- /**
2271
- * Event name emitted on fetch failure. Required when `fetchEntity` is
2272
- * set. Convention: `"<Entity>LoadFailed"`.
2273
- */
2274
- loadFailedEvent?: string;
2275
- /**
2276
- * Payload schema for the loaded event. Defaults to `[{ name: "data", type:
2277
- * "[<Entity>]" }]` when `fetchEntity` is set. Provide explicitly when the
2278
- * payload should carry additional fields.
2279
- */
2280
- loadedPayloadSchema?: Array<{
2281
- name: string;
2282
- type: string;
2283
- required?: boolean;
2284
- }>;
2285
- /**
2286
- * The pattern tree for the layout's main slot. Children may include
2287
- * `@trait.X` slot strings (built via {@link makeSlot}) interleaved with
2288
- * inline pattern configs (`{ type: 'stack', ... }`). The shape conforms to
2289
- * `AnyPatternConfig` from `@almadar/patterns`.
2290
- */
2291
- renderUI: AnyPatternConfig;
2292
- /**
2293
- * Override the slot the render-ui effect targets. Defaults to `'main'`.
2294
- * Specify when the layout shell should render into a sub-slot (rare).
2295
- */
2296
- slot?: UISlot;
2297
- /**
2298
- * Additional effects appended to the INIT transition AFTER the fetch +
2299
- * render-ui pair. Most layouts don't need this; provided for advanced
2300
- * cases (analytics emit, persistence seed, etc.).
2301
- */
2302
- extraEffects?: Effect[];
2303
- }
2304
- /**
2305
- * Build the canonical stateless LayoutTrait used by std layout-shell molecules.
2306
- *
2307
- * Result shape:
2308
- * - `linkedEntity` set per the option
2309
- * - `emits` declares the loaded + loadFailed events when `fetchEntity` is set
2310
- * - One state: `'composing'` (`isInitial: true`)
2311
- * - One transition: `composing → composing` on `INIT`, with effects:
2312
- * - (when `fetchEntity` set) `['fetch', '<Entity>', { emit: { success, failure } }]`
2313
- * - `['render-ui', slot, renderUI]`
2314
- * - …`extraEffects` if provided
2315
- *
2316
- * Atoms whose trait names appear as `@trait.<name>` strings inside `renderUI`
2317
- * get embedded by the runtime when the orbital instantiates. The LayoutTrait
2318
- * itself stays stateless — all reactive behaviour lives in the embedded atoms.
2319
- */
2320
- declare function makeLayoutTrait(opts: MakeLayoutTraitOpts): Trait;
2321
-
2322
- /**
2323
- * Orbital Builders
2324
- *
2325
- * Pure functions for constructing and composing Orbitals.
2326
- * No new types. Everything uses existing core types:
2327
- * Entity, Trait, Page, OrbitalDefinition, OrbitalSchema.
2328
- *
2329
- * Three categories:
2330
- * 1. Builders: construct Entity, Page from common params
2331
- * 2. Utilities: ensureIdField, resolveDefaults
2332
- * 3. Composition: connect, compose, pipe
2333
- *
2334
- * @packageDocumentation
2335
- */
2336
-
2337
- /**
2338
- * Ensure the fields array has an `id` field. Prepends one if missing.
2339
- */
2340
- declare function ensureIdField(fields?: EntityField[]): EntityField[];
2341
- /**
2342
- * Simple pluralization: append 's'.
2343
- */
2344
- declare function plural(name: string): string;
2345
- interface MakeEntityOpts {
2346
- name: string;
2347
- fields: EntityField[];
2348
- persistence?: EntityPersistence;
2349
- collection?: string;
2350
- /** Pre-authored seed data instances */
2351
- instances?: EntityRow[];
2352
- }
2353
- /**
2354
- * Build an Entity from options. Auto-adds id field, auto-derives collection.
2355
- */
2356
- declare function makeEntity(opts: MakeEntityOpts): Entity;
2357
- interface MakePageOpts {
2358
- name: string;
2359
- path: string;
2360
- traitName: string;
2361
- isInitial?: boolean;
2362
- }
2363
- /**
2364
- * Build a Page that binds to a single trait.
2365
- */
2366
- declare function makePage(opts: MakePageOpts): Page;
2367
- /**
2368
- * Build an OrbitalDefinition from its three components.
2369
- */
2370
- declare function makeOrbital(name: string, entity: Entity, traits: Trait[], pages: Page[]): OrbitalDefinition;
2371
- /**
2372
- * Options for {@link makeTraitRef}.
2373
- */
2374
- interface MakeTraitRefOpts {
2375
- /**
2376
- * Optional registry path disambiguator that pairs with {@link ref}
2377
- * (see {@link TraitReference.from}).
2378
- */
2379
- from?: string;
2380
- /** Trait reference string, e.g. "Browse.traits.BrowseItemBrowse". */
2381
- ref: string;
2382
- /** Rename the inlined trait at the call site. */
2383
- name?: string;
2384
- /** Rebind the trait to a different linkedEntity. */
2385
- linkedEntity?: string;
2386
- /** Dual-carry id sibling of {@link linkedEntity} (V4 identity graph). */
2387
- linkedEntityId?: EntityId;
2388
- /** Per-key rename map, e.g. `{ OPEN: "ADD_ITEM" }`. */
2389
- events?: Record<string, string>;
2390
- /**
2391
- * 3-II trait type-parameter arguments (`:: p SomeType`): declared-param
2392
- * name → type-vocabulary name. Mirrors {@link TraitReference.typeArgs}.
2393
- */
2394
- typeArgs?: Record<string, string>;
2395
- /**
2396
- * Entity-field remap, e.g. `{ name: "title", folder: "parentId" }`. Rewrites
2397
- * the inlined trait's canonical `@entity.X` / `@payload.row.X` references to
2398
- * the consumer entity's field names. Mirrors {@link TraitReference.fields}.
2399
- */
2400
- fields?: Record<string, string>;
2401
- /**
2402
- * Per-event SExpression effect replacement. Keys are POST-rename event
2403
- * names. See {@link TraitReference.effects} for the full contract.
2404
- */
2405
- effects?: Record<string, SExpr[]>;
2406
- /** Replace the imported trait's `listens` array entirely. */
2407
- listens?: TraitEventListener[];
2408
- /** Set every emit's scope. */
2409
- emitsScope?: 'internal' | 'external';
2410
- /**
2411
- * Call-site config overrides. Each entry is either a plain wiring value
2412
- * (`TraitConfigValue`) or a fully-annotated re-declaration
2413
- * (`ConfigFieldDeclaration`). Matches {@link TraitReference.config}.
2414
- */
2415
- config?: CallSiteConfig;
2416
- }
2417
- /**
2418
- * Typed-narrowing variant of {@link MakeTraitRefOpts} for callers that know
2419
- * the imported atom's overridable surfaces — its event-key set, listen-key
2420
- * set, and config shape. Generated std factories use this variant so an LLM
2421
- * tool consumer (orbital-agent) sees the closed event-name set and the
2422
- * config field schema instead of the un-narrowed `Record<string, string>` /
2423
- * `TraitConfig` defaults.
2424
- *
2425
- * Type parameters:
2426
- * - `EventKey` — string union of the atom's emit event names. Narrows the
2427
- * `events` rename map's keys to legal originals only.
2428
- * - `ConfigShape` — typed shape of the trait's `config { ... }` block (literal
2429
- * unions intact). Narrows the `config` override to the atom's actual fields.
2430
- * Extends `CallSiteConfig` to allow both plain wiring values and annotated
2431
- * declarations. Existing callers using plain `TraitConfig` shapes are
2432
- * unaffected (TraitConfig ⊆ CallSiteConfig).
2433
- * - `ListenKey` — string union of the atom's listen-key contract. Narrows
2434
- * each listens entry's `event` against the atom's real subscription set.
2435
- *
2436
- * Runtime behavior is unchanged — {@link makeTraitRef} accepts both the
2437
- * narrow and wide forms via the standard structural-typing rules. This is
2438
- * a type-level narrowing only; widening at the call boundary is intentional.
2439
- */
2440
- interface MakeTraitRefOptsTyped<EventKey extends string = string, ConfigShape extends CallSiteConfig = Record<string, never>, ListenKey extends string = string> extends Omit<MakeTraitRefOpts, 'events' | 'effects' | 'listens' | 'config'> {
2441
- /** Per-key rename map, narrowed to the atom's actual event keys. */
2442
- events?: Partial<Record<EventKey, string>>;
2443
- /**
2444
- * Per-event SExpression effect replacement. Keys are POST-rename event
2445
- * names so they're caller-defined (no narrowing here); values stay typed
2446
- * as `SExpr[]`.
2447
- */
2448
- effects?: Partial<Record<string, SExpr[]>>;
2449
- /**
2450
- * Replace the imported trait's `listens` array entirely. Each entry's
2451
- * `event` field is narrowed to {@link ListenKey} where the atom's
2452
- * subscription set is fixed; otherwise this widens to plain string.
2453
- */
2454
- listens?: Array<TraitEventListener & {
2455
- event?: ListenKey;
2456
- }>;
2457
- /** Typed call-site config overrides — narrowed to {@link ConfigShape}. */
2458
- config?: ConfigShape;
2459
- }
2460
- /**
2461
- * Build a {@link TraitReference} from options.
2462
- *
2463
- * Pass-through factory: copies only the fields that are actually provided,
2464
- * so optionals stay absent (no `key: undefined` slots) and the emitted
2465
- * object matches the inliner's expectation that "present = override".
2466
- */
2467
- declare function makeTraitRef(opts: MakeTraitRefOpts): TraitReference;
2468
- /**
2469
- * Options for {@link makePageRef}.
2470
- */
2471
- interface MakePageRefOpts {
2472
- /**
2473
- * Optional registry path disambiguator that pairs with {@link ref}
2474
- * (see {@link PageRefObject.from}).
2475
- */
2476
- from?: string;
2477
- /** Page reference string, e.g. "Browse.pages.BrowseItemPage". */
2478
- ref: string;
2479
- /** URL path override. */
2480
- path?: string;
2481
- /** Rebind the page's primary entity. */
2482
- linkedEntity?: string;
2483
- /** Replace the page's trait list. */
2484
- traits?: TraitRef[];
2485
- }
2486
- /**
2487
- * Typed-narrowing variant of {@link MakePageRefOpts}. Narrows the `traits`
2488
- * override array's entries to the orbital's known trait-name union — so the
2489
- * agent can't pass a trait name that doesn't exist on the page's owning
2490
- * orbital. Generated std page-helpers use this variant to surface the
2491
- * trait set in the tool schema; un-narrowed call sites stay compatible.
2492
- *
2493
- * Type parameter:
2494
- * - `TraitName` — string union of trait names the page may reference.
2495
- */
2496
- interface MakePageRefOptsTyped<TraitName extends string = string> extends Omit<MakePageRefOpts, 'traits'> {
2497
- traits?: Array<{
2498
- ref: TraitName;
2499
- } | TraitRef>;
2500
- }
2501
- /**
2502
- * Build a {@link PageRefObject} from options. Pass-through factory — omits
2503
- * optional keys that are `undefined`.
2504
- */
2505
- declare function makePageRef(opts: MakePageRefOpts): PageRefObject;
2506
- /**
2507
- * Options for {@link makeOrbitalWithUses}.
2508
- */
2509
- interface MakeOrbitalWithUsesOpts {
2510
- /** Orbital name. */
2511
- name: string;
2512
- /**
2513
- * Per-orbital `uses:` header entries (see CLAUDE.md "uses: lives inside
2514
- * the orbital").
2515
- */
2516
- uses: UseDeclaration[];
2517
- /** Entity (inline or reference form). */
2518
- entity: EntityRef;
2519
- /**
2520
- * Derived `expects` declarations (consumer-side requirements). Threaded
2521
- * verbatim — derivation lives in `orb` (`orb behaviors expects`); builders never
2522
- * compute it. Omitted from the result when not provided.
2523
- */
2524
- expects?: ExpectDeclaration[];
2525
- /**
2526
- * Auxiliary entities (name-resolution side channel for un-rebound atom
2527
- * imports — see {@link OrbitalDefinition.auxiliaryEntities}). Threaded
2528
- * verbatim; omitted from the result when not provided.
2529
- */
2530
- auxiliaryEntities?: EntityRef[];
2531
- /** Trait references. */
2532
- traits: TraitRef[];
2533
- /** Optional page references (omitted entirely when not provided). */
2534
- pages?: PageRef[];
2535
- /** The orbital's own declared config knobs, threaded verbatim; omitted when not provided. */
2536
- config?: DeclaredTraitConfig;
2537
- }
2538
- /**
2539
- * Build an {@link OrbitalDefinition} with the `uses:` header set. Follows
2540
- * the convention that `uses:` lives on the orbital (not the schema).
2541
- *
2542
- * When `pages` is omitted, the result has no `pages` property (matches the
2543
- * existing {@link OrbitalDefinition.pages} optionality in descriptors that
2544
- * carry trait-only atoms).
2545
- */
2546
- declare function makeOrbitalWithUses(opts: MakeOrbitalWithUsesOpts): OrbitalDefinition;
2547
- /** The alias an orbital value's import binds its source under (one import per orbital, so a fixed name is unambiguous). */
2548
- declare const ORBITAL_VALUE_IMPORT_ALIAS = "Source";
2549
- /**
2550
- * The import orbital an orbital value stands for (LOLO §8b): the value's
2551
- * behavior imported under {@link ORBITAL_VALUE_IMPORT_ALIAS}, its orbital
2552
- * referenced, and its recorded body as the reference body. Plain config values
2553
- * are wrapped into the IR's declaration form here.
2554
- */
2555
- declare function orbitalImportFromValue(value: OrbitalValue): OrbitalDefinition;
2556
- /**
2557
- * Parse a program held as data: an orbital value at `orbitals[i]` is the import
2558
- * orbital it stands for ({@link orbitalImportFromValue}); everything else must
2559
- * already be IR.
2560
- */
2561
- declare function parseProgram(data: RuntimeValue): OrbitalSchema;
2562
- /**
2563
- * Options for {@link makeAtomOrbital}.
2564
- *
2565
- * Overrides for the single trait reference. Mirrors the {@link MakeTraitRefOpts}
2566
- * subset that is meaningful at the atom-wrapping call site.
2567
- */
2568
- interface MakeAtomOrbitalTraitOverrides {
2569
- name?: string;
2570
- events?: Record<string, string>;
2571
- effects?: Record<string, SExpr[]>;
2572
- listens?: TraitEventListener[];
2573
- emitsScope?: 'internal' | 'external';
2574
- config?: CallSiteConfig;
2575
- }
2576
- /**
2577
- * Options for {@link makeAtomOrbital}.
2578
- */
2579
- interface MakeAtomOrbitalOpts {
2580
- /** Orbital name, e.g. `${entityName}Orbital`. */
2581
- name: string;
2582
- /** Atom registry path, e.g. `std/behaviors/atoms/std-browse`. */
2583
- atomPath: string;
2584
- /** Import alias (PascalCase), e.g. `Browse`. */
2585
- alias: string;
2586
- /** Entity definition to attach to the orbital. */
2587
- entity: Entity;
2588
- /** Trait reference string, e.g. `Browse.traits.BrowseItemBrowse`. */
2589
- traitRef: string;
2590
- /** Optional trait-level overrides applied at the call site. */
2591
- traitOverrides?: MakeAtomOrbitalTraitOverrides;
2592
- /** Optional page reference string, e.g. `Browse.pages.BrowseItemPage`. */
2593
- pageRef?: string;
2594
- /** Optional page-level overrides applied at the call site. */
2595
- pageOverrides?: {
2596
- path?: string;
2597
- };
2598
- }
2599
- /**
2600
- * Build a single-atom {@link OrbitalDefinition}.
2601
- *
2602
- * The common atom shape: one entity + one trait reference + (optionally) one
2603
- * page reference, all under a single `uses:` import. Wraps
2604
- * {@link makeTraitRef}, {@link makePageRef}, and {@link makeOrbitalWithUses}.
2605
- *
2606
- * The trait reference is linkedEntity-bound to `entity.name` by default so
2607
- * that the inliner's entity-substitution pass rewrites every `["ref", X]`
2608
- * and `@X.path` reference inside the atom.
2609
- */
2610
- declare function makeAtomOrbital(opts: MakeAtomOrbitalOpts): OrbitalDefinition;
2611
- /**
2612
- * Wrap one or more OrbitalDefinitions into an OrbitalSchema.
2613
- * Every .orb file should be a full OrbitalSchema — this is the builder for that.
2614
- */
2615
- declare function makeSchema(name: string, ...definitions: OrbitalDefinition[]): OrbitalSchema;
2616
- /**
2617
- * Merge multiple OrbitalDefinitions into one.
2618
- * Collects all traits from all sources into a single orbital with a shared entity.
2619
- * Pure: clones all traits, no mutation.
2620
- */
2621
- declare function mergeOrbitals(name: string, entity: Entity, sources: OrbitalDefinition[], pages: Page[]): OrbitalDefinition;
2622
- /**
2623
- * Wire an intra-orbital event between two traits.
2624
- * Adds emits to the source trait, listens to the target trait.
2625
- * Pure: returns cloned traits, no mutation.
2626
- */
2627
- declare function wire(source: Trait, target: Trait, event: TraitEventContract, triggers: string): [Trait, Trait];
2628
- /**
2629
- * Extract the first trait from an OrbitalDefinition or OrbitalSchema.
2630
- * If given an OrbitalSchema, unwraps to the first orbital inside it.
2631
- */
2632
- declare function extractTrait(input: OrbitalDefinition | OrbitalSchema): Trait;
2633
- /**
2634
- * Wire a cross-orbital event between two orbitals.
2635
- * Adds emits to a's first trait, listens to b's first trait.
2636
- * Pure: returns new orbitals, no mutation.
2637
- */
2638
- declare function connect(a: OrbitalDefinition | OrbitalSchema, b: OrbitalDefinition | OrbitalSchema, event: TraitEventContract, triggers?: string): [OrbitalDefinition, OrbitalDefinition];
2639
- interface ComposeConnection {
2640
- from: string;
2641
- to: string;
2642
- event: TraitEventContract;
2643
- triggers?: string;
2644
- }
2645
- interface ComposePage {
2646
- name: string;
2647
- path: string;
2648
- traits: string[];
2649
- isInitial?: boolean;
2650
- }
2651
- /**
2652
- * Compose multiple orbitals into a single OrbitalSchema (application).
2653
- * Applies connections (cross-orbital event wiring) and page assignments.
2654
- */
2655
- declare function compose(orbitals: (OrbitalDefinition | OrbitalSchema)[], pages: ComposePage[], connections: ComposeConnection[], appName?: string): OrbitalSchema;
2656
- /**
2657
- * Chain orbitals in sequence with automatic event wiring.
2658
- * Sugar over connect + compose: wires events[0] from orbital[0] to orbital[1], etc.
2659
- */
2660
- declare function pipe(orbitals: (OrbitalDefinition | OrbitalSchema)[], events: TraitEventContract[], appName?: string): OrbitalSchema;
2661
-
2662
- export { applyBehaviorOverrides as $, OrbitalValueSiblingSchema as A, OrbitalValueUseSchema as G, TraitDescriptionSchema as H, TraitEventsSchema as J, ORBITAL_VALUE_IMPORT_ALIAS as O, TraitKnobSchema as Q, TraitMachineSchema as S, TraitOverridesSchema as V, TraitSourceSchema as X, TraitValueSchema as _, BehaviorBridgeSchema as a, extractTrait as a$, applyBehaviorRefOverrides as a0, applyEventWiring as a1, applyOrbitalOverrides as a2, applyTraitOverrides as a3, behaviorRef as a4, composeBehaviors as a5, detectLayoutStrategy as a6, formatBehaviorValueLiteral as a7, formatOrbitalValueLiteral as a8, formatTraitValueLiteral as a9, applyTraitConfigOverrides as aM, asEntityObject as aN, atomTraitResolver as aO, collectFieldComparisonLiterals as aP, collectOwnedSurface as aQ, collectOwnerComparedFields as aR, collectOwnerStampedFields as aS, compose as aT, composeAppFromFiles as aU, composeOrbitalSurface as aV, connect as aW, dedupeComposedIdentity as aX, dedupeComposedSurface as aY, ensureIdField as aZ, entityRenameBlockers as a_, isBehaviorRefValue as aa, isOrbitalValue as ab, isTraitValue as ac, orbitalImportFromValue as ad, parseBehaviorValueLiteral as ae, parseOrbitalValueLiteral as af, parseProgram as ag, parseTraitValueLiteral as ah, findDanglingRefs as b0, identityVocabularyDelta as b1, makeAtomOrbital as b2, makeEntity as b3, makeLayoutTrait as b4, makeOrbital as b5, makeOrbitalWithUses as b6, makePage as b7, makePageRef as b8, makeRenderUI as b9, makeSchema as ba, makeSlot as bb, makeTraitRef as bc, mergeLedgers as bd, mergeOrbitals as be, orbitalEntityName as bf, orbitalImportResolver as bg, orbitalRouteSlug as bh, organismOrderResolver as bi, pipe as bj, plural as bk, renameEntity as bl, renameEntityInSchema as bm, renameOrbital as bn, wire as bo, BehaviorDescriptionSchema as c, BehaviorRefOverridesSchema as e, BehaviorRefSchema as f, BehaviorValueSchema as i, CatalogEntrySchema as j, CatalogScopeSchema as l, DescribeTargetSchema as o, KnobFieldSchema as q, OrbitalDescriptionSchema as u, OrbitalOverridesSchema as w, OrbitalValueSchema as y };
2663
- export type { BehaviorBridge as B, CatalogEntry as C, DescribeTarget as D, EvaluatedProgram as E, OrbitalValueUse as F, TraitEvents as I, KnobField as K, LayoutStrategy as L, MakeTraitRefOpts as M, TraitKnob as N, ProgramValidationIssue as P, TraitMachine as R, TraitDescription as T, TraitOverrides as U, TraitSource as W, TraitValue as Y, TraitValueMountResult as Z, MakeEntityOpts as aA, MakeLayoutTraitOpts as aB, MakeOrbitalWithUsesOpts as aC, MakePageOpts as aD, MakePageRefOpts as aE, MakePageRefOptsTyped as aF, MakeTraitRefOptsTyped as aG, NavItemsNarrowResult as aH, OrganismRename as aI, RenameEntityOptions as aJ, SurfaceRename as aK, UnrenamableCollision as aL, ComposeAppFromFilesOptions as ai, ComposeAppFromFilesResult as aj, ComposeConnection as ak, ComposePage as al, ComposeSurfaceOptions as am, ComposedSurface as an, ConfigNavItemsNarrowResult as ao, EntityRenameBlocker as ap, FieldBindingContext as aq, IdentityDedupeResult as ar, IdentityDemotion as as, IdentityExpectsRewrite as at, IdentityRelationRetarget as au, IdentityRoleUnion as av, IdentityVocabularyDelta as aw, LandingNavResult as ax, MakeAtomOrbitalOpts as ay, MakeAtomOrbitalTraitOverrides as az, BehaviorDescription as b, BehaviorRef as d, BehaviorValue as g, BehaviorValueMountResult as h, CatalogScope as k, ComposeBehaviorsInput as m, ComposeBehaviorsResult as n, EventWiringEntry as p, MountedBehaviorValue as r, MountedTraitValue as s, OrbitalDescription as t, OrbitalOverrides as v, OrbitalValue as x, OrbitalValueSibling as z };