@almadar/core 10.97.0 → 10.99.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 (101) hide show
  1. package/README.md +25 -0
  2. package/dist/builders.d.ts +5 -4
  3. package/dist/builders.js +60 -34
  4. package/dist/builders.js.map +1 -1
  5. package/dist/bus-BGDM3Xot.d.ts +565 -0
  6. package/dist/domain-Ds_7wZIL.d.ts +16213 -0
  7. package/dist/{effect-Bw8T4qh5.d.ts → effect-CW_IT0Jn.d.ts} +59 -4
  8. package/dist/{entityAccess-DfoXs9mc.d.ts → entityAccess-BLpOMojb.d.ts} +3 -3
  9. package/dist/{expression-WfTp2arD.d.ts → expression-DRwzVnMu.d.ts} +5 -1
  10. package/dist/factory/index.d.ts +5 -5
  11. package/dist/factory/index.js +22 -0
  12. package/dist/factory/index.js.map +1 -1
  13. package/dist/factory-runtime/index.d.ts +5 -4
  14. package/dist/factory-runtime/index.js +176 -34
  15. package/dist/factory-runtime/index.js.map +1 -1
  16. package/dist/fixtures.d.ts +45 -0
  17. package/dist/fixtures.js +693 -0
  18. package/dist/fixtures.js.map +1 -0
  19. package/dist/{index-H0bOi9oP.d.ts → index-CHHuux4I.d.ts} +8 -375
  20. package/dist/index.d.ts +19 -15
  21. package/dist/index.js +9069 -44
  22. package/dist/index.js.map +1 -1
  23. package/dist/mock/index.d.ts +6 -5
  24. package/dist/mock/index.js +14 -0
  25. package/dist/mock/index.js.map +1 -1
  26. package/dist/patterns/component-mapping.json +1 -1
  27. package/dist/patterns/event-contracts.json +1 -1
  28. package/dist/patterns/index.d.ts +12 -8
  29. package/dist/patterns/index.js +15 -4
  30. package/dist/patterns/index.js.map +1 -1
  31. package/dist/patterns/patterns-registry.json +1 -1
  32. package/dist/patterns/registry.json +1 -1
  33. package/dist/{schema-DPpES4qj.d.ts → schema-BVjtoRYf.d.ts} +2134 -23608
  34. package/dist/state-machine/index.d.ts +1 -1
  35. package/dist/themes/index.d.ts +19 -0
  36. package/dist/themes/index.js +9251 -0
  37. package/dist/themes/index.js.map +1 -0
  38. package/dist/{trait-DXXRrRMP.d.ts → trait-C9lr222u.d.ts} +26 -26
  39. package/dist/types/index.d.ts +8 -6
  40. package/dist/types/index.js +207 -41
  41. package/dist/types/index.js.map +1 -1
  42. package/dist/{types-BMaTUGyk.d.ts → types-BoyvM79n.d.ts} +2 -2
  43. package/fixtures/events-wire/cascade-emitted-events/request.json +9 -0
  44. package/fixtures/events-wire/cascade-emitted-events/response.json +30 -0
  45. package/fixtures/events-wire/client-effects-by-trait/request.json +4 -0
  46. package/fixtures/events-wire/client-effects-by-trait/response.json +52 -0
  47. package/fixtures/events-wire/effect-results/request.json +9 -0
  48. package/fixtures/events-wire/effect-results/response.json +42 -0
  49. package/fixtures/events-wire/effect-results-every-kind/request.json +9 -0
  50. package/fixtures/events-wire/effect-results-every-kind/response.json +70 -0
  51. package/fixtures/events-wire/guard-rejected/request.json +6 -0
  52. package/fixtures/events-wire/guard-rejected/response.json +11 -0
  53. package/fixtures/events-wire/live-push/live-push.json +12 -0
  54. package/fixtures/events-wire/live-push/request.json +9 -0
  55. package/fixtures/events-wire/live-push/response.json +33 -0
  56. package/fixtures/events-wire/navigate-1/request.json +5 -0
  57. package/fixtures/events-wire/navigate-1/response.json +16 -0
  58. package/fixtures/events-wire/navigate-2/request.json +8 -0
  59. package/fixtures/events-wire/navigate-2/response.json +19 -0
  60. package/fixtures/events-wire/navigate-3/request.json +8 -0
  61. package/fixtures/events-wire/navigate-3/response.json +22 -0
  62. package/fixtures/events-wire/navigate-back/request.json +5 -0
  63. package/fixtures/events-wire/navigate-back/response.json +15 -0
  64. package/fixtures/events-wire/render-ui-3/request.json +5 -0
  65. package/fixtures/events-wire/render-ui-3/response.json +20 -0
  66. package/fixtures/events-wire/render-ui-4/request.json +5 -0
  67. package/fixtures/events-wire/render-ui-4/response.json +41 -0
  68. package/fixtures/events-wire/render-ui-5/request.json +9 -0
  69. package/fixtures/events-wire/render-ui-5/response.json +52 -0
  70. package/fixtures/events-wire/render-ui-clear/request.json +5 -0
  71. package/fixtures/events-wire/render-ui-clear/response.json +27 -0
  72. package/fixtures/events-wire/sse-stream/request.json +9 -0
  73. package/fixtures/events-wire/sse-stream/response.json +79 -0
  74. package/fixtures/events-wire/sse-stream/stream.json +131 -0
  75. package/fixtures/events-wire/stateless-traits/request.json +27 -0
  76. package/fixtures/events-wire/stateless-traits/response.json +15 -0
  77. package/fixtures/theme-tokens/every-key.json +43 -0
  78. package/package.json +18 -3
  79. package/themes/almadar-website.json +207 -0
  80. package/themes/almadar.json +203 -0
  81. package/themes/atelier.json +459 -0
  82. package/themes/bloomberg-dense.json +459 -0
  83. package/themes/clay.json +445 -0
  84. package/themes/comic.json +457 -0
  85. package/themes/corporate.json +445 -0
  86. package/themes/game-adventure.json +229 -0
  87. package/themes/game-rpg.json +230 -0
  88. package/themes/game-sci-fi.json +229 -0
  89. package/themes/game-ui-pack.json +230 -0
  90. package/themes/gazette.json +445 -0
  91. package/themes/glass.json +445 -0
  92. package/themes/kiosk.json +441 -0
  93. package/themes/linear-clean.json +459 -0
  94. package/themes/minimalist.json +445 -0
  95. package/themes/neon.json +445 -0
  96. package/themes/notion-editorial.json +459 -0
  97. package/themes/prism.json +203 -0
  98. package/themes/retro.json +445 -0
  99. package/themes/terminal.json +457 -0
  100. package/themes/trait-wars.json +493 -0
  101. package/themes/wireframe.json +445 -0
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { S as SExpr, a as EventPayload, E as Expression } from './expression-WfTp2arD.js';
2
+ import { S as SExpr, b as EventPayload, E as Expression } from './expression-DRwzVnMu.js';
3
3
  import { J as JsonValue, R as RuntimeValue } from './json-D8gmyK3l.js';
4
4
 
5
5
  /**
@@ -2791,6 +2791,8 @@ declare function isFieldValue(value: RuntimeValue): value is FieldValue;
2791
2791
  type EntityRow = {
2792
2792
  id?: string;
2793
2793
  } & Record<string, FieldValue | undefined>;
2794
+ /** Zod twin of `EntityRow` — the one runtime validator for an `@entity` wire row. */
2795
+ declare const EntityRowSchema: z.ZodType<EntityRow>;
2794
2796
  /**
2795
2797
  * A field-TYPED `EntityRow` — the SINGLE entity type, refined with a concrete
2796
2798
  * field SHAPE `S`. Non-optional members of `S` are REQUIRED, each with its real
@@ -2832,7 +2834,7 @@ type EntityData = Record<string, EntityRow[]>;
2832
2834
  *
2833
2835
  * DO NOT EDIT MANUALLY — regenerated by almadar-pattern-sync `patterns` command.
2834
2836
  *
2835
- * Generated: 2026-09-16T03:44:41.528Z
2837
+ * Generated: 2026-09-19T10:17:32.850Z
2836
2838
  * Pattern count: 281
2837
2839
  */
2838
2840
 
@@ -6836,6 +6838,16 @@ type PersistRowInput = {
6836
6838
  id?: string | SExpr;
6837
6839
  } & Record<string, FieldValue | SExpr | undefined>;
6838
6840
  type PersistData = EntityRow | PersistRowInput | string | SExpr[];
6841
+ /**
6842
+ * One EVALUATED operation of the runtime path's `["persist", "batch", [...ops]]`
6843
+ * form, as `EffectExecutor` hands it to `handlers.persist('batch', '', { operations })`
6844
+ * and both server persist handlers execute it. The row is optional on
6845
+ * create/update (an absent row persists `{}`), exactly as the handlers always
6846
+ * tolerated. The compiled path has no batch persist — ledger §169.
6847
+ */
6848
+ type PersistBatchOperation = ['create', string, EntityRow?] | ['update', string, string, EntityRow?] | ['delete', string, string];
6849
+ /** The ONE structural check for a batch operation — every consumer narrows through it. */
6850
+ declare function isPersistBatchOperation(value: RuntimeValue): value is PersistBatchOperation;
6839
6851
  /**
6840
6852
  * Persist effect - creates, updates, deletes, or clears entities.
6841
6853
  *
@@ -6914,6 +6926,25 @@ type FetchOptions = {
6914
6926
  * @example ['fetch', 'User'] or ['fetch', 'User', { id: '@payload.userId' }]
6915
6927
  */
6916
6928
  type FetchEffect = ['fetch', string] | ['fetch', string, FetchOptions];
6929
+ /** Options for `fetch-stream` — mirror of the compiler's `OirEffect::FetchStream`
6930
+ * (`orbital-core/src/ir/effects.rs`) and the runtime's `fetchStream` handler. */
6931
+ type FetchStreamOptions = {
6932
+ id?: string | SExpr;
6933
+ filter?: SExpr;
6934
+ /** `on_message` fires per chunk; `success` on completion. */
6935
+ emit?: {
6936
+ on_message?: string;
6937
+ success?: string;
6938
+ failure?: string;
6939
+ };
6940
+ };
6941
+ /**
6942
+ * Fetch-stream effect - streams entity rows (server-side), one `on_message`
6943
+ * emit per chunk. The compiled path (`OirEffect::FetchStream`) and the
6944
+ * runtime (`EffectExecutor` `'fetch-stream'`) both execute it.
6945
+ * @example ['fetch-stream', 'Message', { filter: ['=', '@entity.roomId', '@payload.roomId'], emit: { on_message: 'CHUNK' } }]
6946
+ */
6947
+ type FetchStreamEffect = ['fetch-stream', string] | ['fetch-stream', string, FetchStreamOptions];
6917
6948
  /**
6918
6949
  * Result returned by a fetch / ref / deref handler.
6919
6950
  *
@@ -7176,7 +7207,7 @@ type AsyncSequenceEffect = ['async/sequence', ...Effect[]];
7176
7207
  * Union of all typed effects.
7177
7208
  * Provides compile-time validation for common effect types.
7178
7209
  */
7179
- type TypedEffect = RenderUIEffect | NavigateEffect | NavigateBackEffect | EmitEffect | SetEffect | PersistEffect | CallServiceEffect | SpawnEffect | DespawnEffect | DoEffect | FetchEffect | IfEffect | WhenEffect | LetEffect | LogEffect | WaitEffect | RefEffect | DerefEffect | SwapEffect | WatchEffect | AtomicEffect | AsyncDelayEffect | AsyncDebounceEffect | AsyncThrottleEffect | AsyncIntervalEffect | AsyncRaceEffect | AsyncAllEffect | AsyncSequenceEffect | ForwardEffect | TrainEffect | EvaluateEffect | CheckpointSaveEffect | CheckpointLoadEffect | AgentEffect | OsEffect | BrowserEffect | LlmEffect | BehaviorEffect | ValidateEffect | SessionEffect | ComposeEffect | TraceEffect | MemoryEffect | ApplicationEffect;
7210
+ type TypedEffect = RenderUIEffect | NavigateEffect | NavigateBackEffect | EmitEffect | SetEffect | PersistEffect | CallServiceEffect | SpawnEffect | DespawnEffect | DoEffect | FetchEffect | FetchStreamEffect | IfEffect | WhenEffect | LetEffect | LogEffect | WaitEffect | RefEffect | DerefEffect | SwapEffect | WatchEffect | AtomicEffect | AsyncDelayEffect | AsyncDebounceEffect | AsyncThrottleEffect | AsyncIntervalEffect | AsyncRaceEffect | AsyncAllEffect | AsyncSequenceEffect | ForwardEffect | TrainEffect | EvaluateEffect | CheckpointSaveEffect | CheckpointLoadEffect | AgentEffect | OsEffect | BrowserEffect | LlmEffect | BehaviorEffect | ValidateEffect | SessionEffect | ComposeEffect | TraceEffect | MemoryEffect | ApplicationEffect;
7180
7211
  /**
7181
7212
  * Effect type - typed S-expression format.
7182
7213
  *
@@ -7203,6 +7234,19 @@ type TypedEffect = RenderUIEffect | NavigateEffect | NavigateBackEffect | EmitEf
7203
7234
  * ["persist", "create", "Task", { "title": "@payload.title" }]
7204
7235
  */
7205
7236
  type Effect = TypedEffect;
7237
+ /**
7238
+ * The effects a server reports an outcome for on
7239
+ * `OrbitalEventResponse.effectResults` (`ServerEffectResult.effect`). Every
7240
+ * member is checked against the effect heads above at compile time, so a
7241
+ * name that is not an effect cannot be listed and a new server-reported
7242
+ * effect is added HERE only — the wire type, its zod twin and the
7243
+ * `events-wire` fixture case all derive from this array.
7244
+ */
7245
+ declare const SERVER_REPORTED_EFFECTS: readonly ["set", "persist", "call-service", "fetch", "fetch-stream", "ref", "deref", "swap!", "atomic", "emit"];
7246
+ type ServerReportedEffect = (typeof SERVER_REPORTED_EFFECTS)[number];
7247
+ /** A namespaced effect head (`trace/emit`, `memory/store`, `llm/…`) — what a
7248
+ * `substrate` result's `name` carries. Derived from the union, never listed. */
7249
+ type NamespacedEffectName = Extract<Effect[0], `${string}/${string}`>;
7206
7250
  /**
7207
7251
  * Schema for Effect - validates S-expression format. Arguments validate as
7208
7252
  * s-expr-shaped DATA (`SExprDataSchema`) — literal data arrays (empty or
@@ -7385,6 +7429,17 @@ declare function atomic(...effects: SExpr[]): AtomicEffect;
7385
7429
  type ResolvedPatternProps = {
7386
7430
  [prop: string]: string | number | boolean | null | undefined | ResolvedPatternProps | RenderChildrenMap | Array<ResolvedPatternProps | RenderChildrenMap>;
7387
7431
  };
7432
+ /**
7433
+ * Zod twin of `PatternConfig`/`AnyPatternConfig` — validates the WIRE SHAPE
7434
+ * (a plain object, or `null` for an unset render-ui target) only. Per-pattern
7435
+ * prop shape (the hundreds of generated `PatternPropsMap` variants) is
7436
+ * enforced by the patterns registry at `orb validate` / lolo parse time, not
7437
+ * re-validated here — a second, drifting copy of that registry is exactly
7438
+ * the duplicate this schema must not become.
7439
+ */
7440
+ declare const PatternConfigSchema: z.ZodType<AnyPatternConfig | null>;
7441
+ /** Zod twin of `ResolvedPatternProps` — validates the wire shape (a plain object) only, see {@link PatternConfigSchema}. */
7442
+ declare const ResolvedPatternPropsSchema: z.ZodType<ResolvedPatternProps>;
7388
7443
  /** A node in a render-ui effect tree. */
7389
7444
  interface RenderUINode {
7390
7445
  type: string;
@@ -7398,4 +7453,4 @@ interface RenderUINode {
7398
7453
  renderItem?: RenderUINode;
7399
7454
  }
7400
7455
 
7401
- export { CameraSchema as $, type AnyPatternConfig as A, type AssetCatalogEntryInput as B, AssetCatalogEntrySchema as C, AssetCatalogSchema as D, type EntityField as E, type FieldValue as F, type AssetDimension as G, AssetDimensionSchema as H, type IdentityLedger as I, AssetSchema as J, type AssetUrl as K, type AtomicEffect as L, type AudioManifest as M, AudioManifestSchema as N, type OrbitalEntity as O, type PageId as P, type BehaviorEffect as Q, type RelationConfig as R, type ServiceRef as S, type TraitId as T, type UISlot as U, CAMERA_MODES as V, type CallServiceConfig as W, type CallServiceEffect as X, type Camera as Y, type CameraMode as Z, CameraModeSchema as _, type EntityPersistence as a, type ManifestSourceCatalog as a$, type CheckpointLoadEffect as a0, type CheckpointSaveEffect as a1, type ComposeEffect as a2, type ControlValue as a3, DEFAULT_UNIT_ANIMATION_ROWS as a4, type DerefEffect as a5, type DespawnEffect as a6, type DoEffect as a7, ENTITY_ROLES as a8, type EffectInput as a9, FileValueSchema as aA, type ForwardConfig as aB, type ForwardEffect as aC, type IdForKind as aD, type IdKind as aE, IdentityLedgerSchema as aF, type LedgerEntry as aG, LedgerEntrySchema as aH, type LedgerKind as aI, LedgerKindSchema as aJ, type LlmEffect as aK, type LogEffect as aL, MANIFEST_ASSET_LICENSES as aM, MANIFEST_CANVAS_AFFINITIES as aN, MANIFEST_ENTRY_KINDS as aO, MANIFEST_SOURCE_CATALOGS as aP, type ManifestAssetLicense as aQ, ManifestAssetLicenseSchema as aR, type ManifestCanvasAffinity as aS, ManifestCanvasAffinitySchema as aT, type ManifestEntry as aU, type ManifestEntryInput as aV, type ManifestEntryKind as aW, ManifestEntryKindSchema as aX, ManifestEntrySchema as aY, type ManifestFrameSpec as aZ, ManifestFrameSpecSchema as a_, EffectSchema as aa, type EmitConfig as ab, type EmitEffect as ac, type EntityData as ad, type EntityFieldInput as ae, EntityFieldSchema as af, EntityIdSchema as ag, EntityPersistenceSchema as ah, type EntityRole as ai, EntityRoleSchema as aj, EntitySchema as ak, type EntityWith as al, type EnumEntityField as am, type EvaluateConfig as an, type EvaluateEffect as ao, EventIdSchema as ap, FIELD_TYPES as aq, type FetchEffect as ar, type FetchOptions as as, type FetchResult as at, type Field as au, FieldSchema as av, type FieldType as aw, FieldTypeSchema as ax, FieldValueSchema as ay, type FileValue as az, type EventId as b, type SocketEvents as b$, ManifestSourceCatalogSchema as b0, type McpServiceDef as b1, McpServiceDefSchema as b2, type MemoryEffect as b3, type NavigateBackEffect as b4, type NavigateEffect as b5, type NavigateOptions as b6, type NnConfig as b7, type NnLayer as b8, type ObjectEntityField as b9, SEMANTIC_STRING_TYPES as bA, SERVICE_TYPES as bB, SHEET_PROJECTIONS as bC, SPRITE_DIRECTIONS as bD, SPRITE_SHEET_LAYOUT as bE, type ScalarEntityField as bF, type ScenePos as bG, ScenePosSchema as bH, type SemanticAssetRef as bI, type SemanticAssetRefInput as bJ, SemanticAssetRefSchema as bK, type SemanticStringType as bL, ServiceDefinitionSchema as bM, type ServiceId as bN, ServiceIdSchema as bO, type ServiceParams as bP, type ServiceParamsValue as bQ, type ServiceRefObject as bR, ServiceRefObjectSchema as bS, ServiceRefSchema as bT, ServiceRefStringSchema as bU, type ServiceType as bV, ServiceTypeSchema as bW, type SessionEffect as bX, type SetEffect as bY, type SheetProjection as bZ, SheetProjectionSchema as b_, type OrbitalEntityInput as ba, OrbitalEntitySchema as bb, OrbitalIdSchema as bc, type OsEffect as bd, PATTERN_TYPES as be, PageIdSchema as bf, type PaletteEntryId as bg, PaletteEntryIdSchema as bh, type PatternConfig as bi, type PatternProps as bj, type PatternPropsMap as bk, type PatternType as bl, type PersistData as bm, type PersistEffect as bn, type PersistEmitConfig as bo, type RefEffect as bp, RelationConfigSchema as bq, type RelationEntityField as br, type RenderChildrenMap as bs, type RenderItemLambda as bt, type RenderUINode as bu, type ResolvedPatternProps as bv, type RestAuthConfig as bw, RestAuthConfigSchema as bx, type RestServiceDef as by, RestServiceDefSchema as bz, type Effect as c, isFieldValue as c$, SocketEventsSchema as c0, type SocketServiceDef as c1, SocketServiceDefSchema as c2, type SoundEntry as c3, SoundEntrySchema as c4, type SpawnEffect as c5, type SpriteDirection as c6, SpriteDirectionSchema as c7, type SpriteSheetAtlas as c8, type SpriteSheetAtlasInput as c9, asEventId as cA, asOrbitalId as cB, asPageId as cC, asPaletteEntryId as cD, asServiceId as cE, asThemeId as cF, asTraitId as cG, atomic as cH, callService as cI, createAssetKey as cJ, defaultUnitAtlas as cK, deref as cL, deriveCollection as cM, deriveId as cN, despawn as cO, doEffects as cP, emit as cQ, findService as cR, getDefaultAnimationsForRole as cS, getServiceNames as cT, hasService as cU, idKindOf as cV, idPrefix as cW, isEffect as cX, isEmailValue as cY, isEntityId as cZ, isEventId as c_, SpriteSheetAtlasSchema as ca, type SpriteSheetLayout as cb, type SubTexture as cc, SubTextureSchema as cd, type SwapEffect as ce, type TemplatePatternConfig as cf, type TextureAtlas as cg, TextureAtlasSchema as ch, type ThemeId as ci, ThemeIdSchema as cj, type Tilesheet as ck, TilesheetSchema as cl, type TraceEffect as cm, type TrainConfig as cn, type TrainEffect as co, TraitIdSchema as cp, type TypedEffect as cq, UISlotSchema as cr, UI_SLOTS as cs, VISUAL_STYLES as ct, type ValidateEffect as cu, type VisualStyle as cv, VisualStyleSchema as cw, type WatchEffect as cx, type WatchOptions as cy, asEntityId as cz, type OrbitalId as d, isFileValue as d0, isMcpService as d1, isOrbitalId as d2, isPageId as d3, isPaletteEntryId as d4, isPhoneValue as d5, isRestService as d6, isRuntimeEntity as d7, isSExprEffect as d8, isSemanticStringType as d9, set as dA, spawn as dB, swap as dC, validateAssetAnimations as dD, watch as dE, isSemanticStringValue as da, isServiceId as db, isServiceReference as dc, isServiceReferenceObject as dd, isSocketService as de, isThemeId as df, isTraitId as dg, isUrlValue as dh, isUuidValue as di, isValidPatternType as dj, ledgerCurName as dk, ledgerRename as dl, ledgerResolveName as dm, manifestToAssetCatalog as dn, matchAssetQuery as dp, mintId as dq, navigate as dr, navigateBack as ds, parseAssetKey as dt, parseAssetQuery as du, parseServiceRef as dv, persist as dw, persistenceModeAllowsOverrides as dx, ref as dy, renderUI as dz, type EntityId as e, type Entity as f, type EntityRow as g, type ServiceDefinition as h, type RenderBinding as i, type RenderUIEffect as j, ANIMATION_NAMES as k, ASSET_ASPECTS as l, ASSET_DIMENSIONS as m, type AgentEffect as n, type AnimationDef as o, type AnimationDefInput as p, AnimationDefSchema as q, type AnimationName as r, AnimationNameSchema as s, type ApplicationEffect as t, type ArrayEntityField as u, type Asset as v, type AssetAspect as w, AssetAspectSchema as x, type AssetCatalog as y, type AssetCatalogEntry as z };
7456
+ export { type CallServiceEffect as $, type AnyPatternConfig as A, AssetAspectSchema as B, type AssetCatalog as C, type AssetCatalogEntry as D, type EntityField as E, type FieldValue as F, type AssetCatalogEntryInput as G, AssetCatalogEntrySchema as H, type IdentityLedger as I, AssetCatalogSchema as J, type AssetDimension as K, AssetDimensionSchema as L, AssetSchema as M, type NamespacedEffectName as N, type OrbitalEntity as O, type PageId as P, type AssetUrl as Q, type RelationConfig as R, type ServerReportedEffect as S, type TraitId as T, type UISlot as U, type AtomicEffect as V, type AudioManifest as W, AudioManifestSchema as X, type BehaviorEffect as Y, CAMERA_MODES as Z, type CallServiceConfig as _, type EntityPersistence as a, type ManifestEntry as a$, type Camera as a0, type CameraMode as a1, CameraModeSchema as a2, CameraSchema as a3, type CheckpointLoadEffect as a4, type CheckpointSaveEffect as a5, type ComposeEffect as a6, type ControlValue as a7, DEFAULT_UNIT_ANIMATION_ROWS as a8, type DerefEffect as a9, type FetchStreamOptions as aA, type Field as aB, FieldSchema as aC, type FieldType as aD, FieldTypeSchema as aE, FieldValueSchema as aF, type FileValue as aG, FileValueSchema as aH, type ForwardConfig as aI, type ForwardEffect as aJ, type IdForKind as aK, type IdKind as aL, IdentityLedgerSchema as aM, type LedgerEntry as aN, LedgerEntrySchema as aO, type LedgerKind as aP, LedgerKindSchema as aQ, type LlmEffect as aR, type LogEffect as aS, MANIFEST_ASSET_LICENSES as aT, MANIFEST_CANVAS_AFFINITIES as aU, MANIFEST_ENTRY_KINDS as aV, MANIFEST_SOURCE_CATALOGS as aW, type ManifestAssetLicense as aX, ManifestAssetLicenseSchema as aY, type ManifestCanvasAffinity as aZ, ManifestCanvasAffinitySchema as a_, type DespawnEffect as aa, type DoEffect as ab, ENTITY_ROLES as ac, type EffectInput as ad, EffectSchema as ae, type EmitConfig as af, type EmitEffect as ag, type EntityData as ah, type EntityFieldInput as ai, EntityFieldSchema as aj, EntityIdSchema as ak, EntityPersistenceSchema as al, type EntityRole as am, EntityRoleSchema as an, EntityRowSchema as ao, EntitySchema as ap, type EntityWith as aq, type EnumEntityField as ar, type EvaluateConfig as as, type EvaluateEffect as at, EventIdSchema as au, FIELD_TYPES as av, type FetchEffect as aw, type FetchOptions as ax, type FetchResult as ay, type FetchStreamEffect as az, type EventId as b, ServiceRefObjectSchema as b$, type ManifestEntryInput as b0, type ManifestEntryKind as b1, ManifestEntryKindSchema as b2, ManifestEntrySchema as b3, type ManifestFrameSpec as b4, ManifestFrameSpecSchema as b5, type ManifestSourceCatalog as b6, ManifestSourceCatalogSchema as b7, type McpServiceDef as b8, McpServiceDefSchema as b9, type RenderChildrenMap as bA, type RenderItemLambda as bB, type RenderUINode as bC, ResolvedPatternPropsSchema as bD, type RestAuthConfig as bE, RestAuthConfigSchema as bF, type RestServiceDef as bG, RestServiceDefSchema as bH, SEMANTIC_STRING_TYPES as bI, SERVER_REPORTED_EFFECTS as bJ, SERVICE_TYPES as bK, SHEET_PROJECTIONS as bL, SPRITE_DIRECTIONS as bM, SPRITE_SHEET_LAYOUT as bN, type ScalarEntityField as bO, type ScenePos as bP, ScenePosSchema as bQ, type SemanticAssetRef as bR, type SemanticAssetRefInput as bS, SemanticAssetRefSchema as bT, type SemanticStringType as bU, ServiceDefinitionSchema as bV, type ServiceId as bW, ServiceIdSchema as bX, type ServiceParams as bY, type ServiceParamsValue as bZ, type ServiceRefObject as b_, type MemoryEffect as ba, type NavigateBackEffect as bb, type NavigateEffect as bc, type NavigateOptions as bd, type NnConfig as be, type NnLayer as bf, type ObjectEntityField as bg, type OrbitalEntityInput as bh, OrbitalEntitySchema as bi, OrbitalIdSchema as bj, type OsEffect as bk, PATTERN_TYPES as bl, PageIdSchema as bm, type PaletteEntryId as bn, PaletteEntryIdSchema as bo, PatternConfigSchema as bp, type PatternProps as bq, type PatternPropsMap as br, type PatternType as bs, type PersistBatchOperation as bt, type PersistData as bu, type PersistEffect as bv, type PersistEmitConfig as bw, type RefEffect as bx, RelationConfigSchema as by, type RelationEntityField as bz, type Effect as c, getDefaultAnimationsForRole as c$, ServiceRefSchema as c0, ServiceRefStringSchema as c1, type ServiceType as c2, ServiceTypeSchema as c3, type SessionEffect as c4, type SetEffect as c5, type SheetProjection as c6, SheetProjectionSchema as c7, type SocketEvents as c8, SocketEventsSchema as c9, UISlotSchema as cA, UI_SLOTS as cB, VISUAL_STYLES as cC, type ValidateEffect as cD, type VisualStyle as cE, VisualStyleSchema as cF, type WatchEffect as cG, type WatchOptions as cH, asEntityId as cI, asEventId as cJ, asOrbitalId as cK, asPageId as cL, asPaletteEntryId as cM, asServiceId as cN, asThemeId as cO, asTraitId as cP, atomic as cQ, callService as cR, createAssetKey as cS, defaultUnitAtlas as cT, deref as cU, deriveCollection as cV, deriveId as cW, despawn as cX, doEffects as cY, emit as cZ, findService as c_, type SocketServiceDef as ca, SocketServiceDefSchema as cb, type SoundEntry as cc, SoundEntrySchema as cd, type SpawnEffect as ce, type SpriteDirection as cf, SpriteDirectionSchema as cg, type SpriteSheetAtlas as ch, type SpriteSheetAtlasInput as ci, SpriteSheetAtlasSchema as cj, type SpriteSheetLayout as ck, type SubTexture as cl, SubTextureSchema as cm, type SwapEffect as cn, type TemplatePatternConfig as co, type TextureAtlas as cp, TextureAtlasSchema as cq, type ThemeId as cr, ThemeIdSchema as cs, type Tilesheet as ct, TilesheetSchema as cu, type TraceEffect as cv, type TrainConfig as cw, type TrainEffect as cx, TraitIdSchema as cy, type TypedEffect as cz, type OrbitalId as d, getServiceNames as d0, hasService as d1, idKindOf as d2, idPrefix as d3, isEffect as d4, isEmailValue as d5, isEntityId as d6, isEventId as d7, isFieldValue as d8, isFileValue as d9, mintId as dA, navigate as dB, navigateBack as dC, parseAssetKey as dD, parseAssetQuery as dE, parseServiceRef as dF, persist as dG, persistenceModeAllowsOverrides as dH, ref as dI, renderUI as dJ, set as dK, spawn as dL, swap as dM, validateAssetAnimations as dN, watch as dO, isMcpService as da, isOrbitalId as db, isPageId as dc, isPaletteEntryId as dd, isPersistBatchOperation as de, isPhoneValue as df, isRestService as dg, isRuntimeEntity as dh, isSExprEffect as di, isSemanticStringType as dj, isSemanticStringValue as dk, isServiceId as dl, isServiceReference as dm, isServiceReferenceObject as dn, isSocketService as dp, isThemeId as dq, isTraitId as dr, isUrlValue as ds, isUuidValue as dt, isValidPatternType as du, ledgerCurName as dv, ledgerRename as dw, ledgerResolveName as dx, manifestToAssetCatalog as dy, matchAssetQuery as dz, type EntityId as e, type Entity as f, type EntityRow as g, type PatternConfig as h, type ResolvedPatternProps as i, type ServiceRef as j, type ServiceDefinition as k, type RenderBinding as l, type RenderUIEffect as m, ANIMATION_NAMES as n, ASSET_ASPECTS as o, ASSET_DIMENSIONS as p, type AgentEffect as q, type AnimationDef as r, type AnimationDefInput as s, AnimationDefSchema as t, type AnimationName as u, AnimationNameSchema as v, type ApplicationEffect as w, type ArrayEntityField as x, type Asset as y, type AssetAspect as z };
@@ -1,6 +1,6 @@
1
- import { O as OrbitalEntity } from './effect-Bw8T4qh5.js';
2
- import { O as OrbitalSchema, a as OrbitalDefinition } from './schema-DPpES4qj.js';
3
- import { S as SExpr } from './expression-WfTp2arD.js';
1
+ import { O as OrbitalEntity } from './effect-CW_IT0Jn.js';
2
+ import { O as OrbitalSchema, a as OrbitalDefinition } from './schema-BVjtoRYf.js';
3
+ import { S as SExpr } from './expression-DRwzVnMu.js';
4
4
 
5
5
  /**
6
6
  * Entity access policies — the declared `@read`/`@create`/`@update`/`@delete`
@@ -241,6 +241,10 @@ interface EventPayload {
241
241
  * `unknown` values at typed substrate boundaries (e.g. `TraceContext.emit`).
242
242
  */
243
243
  declare function isEventPayloadValue(value: RuntimeValue): value is EventPayloadValue;
244
+ /** Zod twin of `EventPayloadValue` — the one runtime validator for a bus-emit payload slot. */
245
+ declare const EventPayloadValueSchema: z.ZodType<EventPayloadValue>;
246
+ /** Zod twin of `EventPayload` — the wire shape of a bus event's `payload`. */
247
+ declare const EventPayloadSchema: z.ZodType<EventPayload>;
244
248
  /**
245
249
  * Allowed leaf value for `LogMeta`. Mirrors `EventPayloadValue` shape so
246
250
  * the same row/list data flows through logs without manual flattening,
@@ -252,4 +256,4 @@ interface LogMeta {
252
256
  [key: string]: LogMetaValue;
253
257
  }
254
258
 
255
- export { CORE_BINDINGS as C, type Expression as E, type LogMeta as L, type ParsedBinding as P, type SExpr as S, type EventPayload as a, type EventPayloadValue as b, type CoreBinding as c, type EvalContext as d, type ExpressionInput as e, ExpressionSchema as f, type LogMetaValue as g, type SExprAtom as h, SExprAtomSchema as i, SExprDataSchema as j, type SExprInput as k, type SExprObject as l, SExprSchema as m, collectBindings as n, getArgs as o, getOperator as p, isBinding as q, isEventPayloadValue as r, isSExpr as s, isSExprAtom as t, isSExprCall as u, isValidBinding as v, parseBinding as w, sexpr as x, walkSExpr as y };
259
+ export { walkSExpr as A, CORE_BINDINGS as C, type Expression as E, type LogMeta as L, type ParsedBinding as P, type SExpr as S, type EventPayloadValue as a, type EventPayload as b, type CoreBinding as c, type EvalContext as d, EventPayloadSchema as e, EventPayloadValueSchema as f, type ExpressionInput as g, ExpressionSchema as h, type LogMetaValue as i, type SExprAtom as j, SExprAtomSchema as k, SExprDataSchema as l, type SExprInput as m, type SExprObject as n, SExprSchema as o, collectBindings as p, getArgs as q, getOperator as r, isBinding as s, isEventPayloadValue as t, isSExpr as u, isSExprAtom as v, isSExprCall as w, isValidBinding as x, parseBinding as y, sexpr as z };
@@ -1,10 +1,10 @@
1
- import { k as FactorySignatureCatalog, h as FactoryParamValue, c as FactoryConfigTier, b as FactoryConfigParam, F as FactoryCallSite, j as FactorySignature, R as RuleOverlay, p as RuleOverlayEntry, o as PresentationOverlay, T as TraitOverlay, J as JsonSchema } from '../types-BMaTUGyk.js';
2
- export { a as FactoryCallSiteParams, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryExposure, g as FactoryPageSignature, i as FactoryProvenance, l as FactorySignatureEntityField, m as FactoryTraitSignature, n as JsonSchemaType, O as OwnershipOverlayEntry, P as PresentationNavItem, S as SchemaFieldType, q as TraitOverlayEntry, r as TraitOverlayListener } from '../types-BMaTUGyk.js';
3
- import { a as EntityPersistence, E as EntityField } from '../effect-Bw8T4qh5.js';
4
- import { a as TraitReference } from '../trait-DXXRrRMP.js';
1
+ import { k as FactorySignatureCatalog, h as FactoryParamValue, c as FactoryConfigTier, b as FactoryConfigParam, F as FactoryCallSite, j as FactorySignature, R as RuleOverlay, p as RuleOverlayEntry, o as PresentationOverlay, T as TraitOverlay, J as JsonSchema } from '../types-BoyvM79n.js';
2
+ export { a as FactoryCallSiteParams, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryExposure, g as FactoryPageSignature, i as FactoryProvenance, l as FactorySignatureEntityField, m as FactoryTraitSignature, n as JsonSchemaType, O as OwnershipOverlayEntry, P as PresentationNavItem, S as SchemaFieldType, q as TraitOverlayEntry, r as TraitOverlayListener } from '../types-BoyvM79n.js';
3
+ import { a as EntityPersistence, E as EntityField } from '../effect-CW_IT0Jn.js';
4
+ import { a as TraitReference } from '../trait-C9lr222u.js';
5
5
  export { J as JsonValue } from '../json-D8gmyK3l.js';
6
6
  import 'zod';
7
- import '../expression-WfTp2arD.js';
7
+ import '../expression-DRwzVnMu.js';
8
8
 
9
9
  /**
10
10
  * Rehydrate `overridableConfigKeys` from a catalog's `knobDefs` table,
@@ -56035,6 +56035,19 @@ var SExprSchema = z.lazy(
56035
56035
  )
56036
56036
  ])
56037
56037
  );
56038
+ var EventPayloadValueSchema = z.lazy(
56039
+ () => z.union([
56040
+ z.string(),
56041
+ z.number(),
56042
+ z.boolean(),
56043
+ z.date(),
56044
+ z.null(),
56045
+ z.undefined(),
56046
+ EventPayloadSchema,
56047
+ z.array(EventPayloadValueSchema)
56048
+ ])
56049
+ );
56050
+ var EventPayloadSchema = z.lazy(() => z.record(EventPayloadValueSchema));
56038
56051
 
56039
56052
  // src/types/entity.ts
56040
56053
  var EntityPersistenceSchema = z.enum([
@@ -56085,6 +56098,7 @@ function persistenceModeAllowsOverrides(persistence) {
56085
56098
  var FieldValueSchema = z.lazy(
56086
56099
  () => z.union([z.string(), z.number(), z.boolean(), z.date(), z.null(), z.array(FieldValueSchema), z.record(FieldValueSchema.optional())])
56087
56100
  );
56101
+ z.object({ id: z.string().optional() }).catchall(FieldValueSchema.optional());
56088
56102
  var UI_SLOTS = [
56089
56103
  // App slots
56090
56104
  "main",
@@ -56118,6 +56132,14 @@ z.array(SExprDataSchema).min(1).refine(
56118
56132
  (arr) => typeof arr[0] === "string",
56119
56133
  { message: "Effect must be an S-expression with a string operator as first element" }
56120
56134
  );
56135
+ z.custom(
56136
+ (value) => value === null || typeof value === "object" && value !== null && !Array.isArray(value),
56137
+ { message: "Expected a pattern config object or null" }
56138
+ );
56139
+ z.custom(
56140
+ (value) => typeof value === "object" && value !== null && !Array.isArray(value),
56141
+ { message: "Expected a resolved pattern props object" }
56142
+ );
56121
56143
 
56122
56144
  // src/factory/params-schema.ts
56123
56145
  function signatureToParamsSchema(signature, options) {