@almadar/core 10.101.0 → 10.103.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 (45) hide show
  1. package/dist/builders.d.ts +5 -5
  2. package/dist/builders.js +6 -2
  3. package/dist/builders.js.map +1 -1
  4. package/dist/{bus-B8evi8AZ.d.ts → bus-BGojNDOE.d.ts} +52 -7
  5. package/dist/{domain-Ds_7wZIL.d.ts → domain-OgMkN3WN.d.ts} +13 -1
  6. package/dist/{effect-Hm_QDaSI.d.ts → effect-Xn3LIyL7.d.ts} +1 -1
  7. package/dist/{entityAccess-DdcKps16.d.ts → entityAccess-z5HA0P7P.d.ts} +3 -3
  8. package/dist/{expression-DRwzVnMu.d.ts → expression-CfeHdS-f.d.ts} +10 -1
  9. package/dist/factory/index.d.ts +5 -5
  10. package/dist/factory/index.js.map +1 -1
  11. package/dist/factory-runtime/index.d.ts +5 -5
  12. package/dist/factory-runtime/index.js +42 -8
  13. package/dist/factory-runtime/index.js.map +1 -1
  14. package/dist/fixtures.d.ts +3 -3
  15. package/dist/fixtures.js +27 -2
  16. package/dist/fixtures.js.map +1 -1
  17. package/dist/i18n/index.js +27 -6
  18. package/dist/i18n/index.js.map +1 -1
  19. package/dist/{index-1b2JJVYl.d.ts → index-CVYZ3GcI.d.ts} +122 -23
  20. package/dist/index.d.ts +74 -17
  21. package/dist/index.js +417 -72
  22. package/dist/index.js.map +1 -1
  23. package/dist/lolo-document/index.d.ts +166 -0
  24. package/dist/lolo-document/index.js +615 -0
  25. package/dist/lolo-document/index.js.map +1 -0
  26. package/dist/mock/index.d.ts +6 -6
  27. package/dist/mock/index.js +12 -1
  28. package/dist/mock/index.js.map +1 -1
  29. package/dist/patterns/index.d.ts +22 -4
  30. package/dist/patterns/index.js +41 -1
  31. package/dist/patterns/index.js.map +1 -1
  32. package/dist/{schema-TqLV2wlK.d.ts → schema-sHVqe8Kb.d.ts} +1307 -4
  33. package/dist/state-machine/index.d.ts +1 -1
  34. package/dist/themes/index.d.ts +1 -1
  35. package/dist/themes/index.js +2 -1
  36. package/dist/themes/index.js.map +1 -1
  37. package/dist/{trait-YlNXc4H3.d.ts → trait-BSe6oDBd.d.ts} +79 -3
  38. package/dist/types/index.d.ts +8 -8
  39. package/dist/types/index.js +227 -12
  40. package/dist/types/index.js.map +1 -1
  41. package/dist/{types-Ug92oza4.d.ts → types-DK29MMOQ.d.ts} +2 -2
  42. package/fixtures/events-wire/client-effects-provenance/request.json +5 -0
  43. package/fixtures/events-wire/client-effects-provenance/response.json +57 -0
  44. package/package.json +6 -1
  45. package/src/types/bindings.ts +28 -3
package/dist/index.js CHANGED
@@ -862,6 +862,44 @@ var EventPayloadValueSchema = z.lazy(
862
862
  ])
863
863
  );
864
864
  var EventPayloadSchema = z.lazy(() => z.record(EventPayloadValueSchema));
865
+ function isStaticallyFalse(expr, resolve) {
866
+ const known = (e) => {
867
+ if (typeof e === "string" && e.startsWith("@") && resolve !== void 0) {
868
+ const value2 = resolve(e);
869
+ return value2 === void 0 ? e : value2;
870
+ }
871
+ return e;
872
+ };
873
+ const isLiteral = (e) => e === null || typeof e === "boolean" || typeof e === "number" || typeof e === "string" && !e.startsWith("@");
874
+ const value = known(expr);
875
+ if (value === false || value === null) return true;
876
+ if (typeof value === "number") return value === 0;
877
+ if (typeof value === "string") return value === "";
878
+ if (Array.isArray(value)) {
879
+ const op = value[0];
880
+ if (typeof op !== "string") return value.length === 0;
881
+ const args = value.slice(1);
882
+ switch (op) {
883
+ case "and":
884
+ return args.some((a) => isStaticallyFalse(a, resolve));
885
+ case "or":
886
+ return args.length > 0 && args.every((a) => isStaticallyFalse(a, resolve));
887
+ case "not":
888
+ return args.length === 1 && known(args[0]) === true;
889
+ case "==":
890
+ case "!=": {
891
+ if (args.length !== 2) return false;
892
+ const [l, r] = [known(args[0]), known(args[1])];
893
+ if (!isLiteral(l) || !isLiteral(r)) return false;
894
+ return l === r === (op === "!=");
895
+ }
896
+ default:
897
+ return false;
898
+ }
899
+ }
900
+ if (typeof value === "object") return Object.keys(value).length === 0;
901
+ return false;
902
+ }
865
903
 
866
904
  // src/types/entity.ts
867
905
  var EntityPersistenceSchema = z.enum([
@@ -1288,6 +1326,7 @@ var TraitTickSchema = z.object({
1288
1326
  priority: z.number().optional(),
1289
1327
  interval: TickIntervalSchema,
1290
1328
  appliesTo: z.array(z.string()).optional(),
1329
+ runsInBackground: z.boolean().optional(),
1291
1330
  pages: z.array(z.string()).optional(),
1292
1331
  pageIds: z.array(PageIdSchema).optional(),
1293
1332
  guard: ExpressionSchema.optional(),
@@ -1472,6 +1511,19 @@ var EffectUseSchema = z.object({
1472
1511
  site: EffectSiteSchema.optional()
1473
1512
  });
1474
1513
  var EffectRowSchema = z.array(EffectUseSchema);
1514
+ var DispatchModeSchema = z.enum(["persistedAwaited", "hybridClientOnly", "runtimeOptimistic"]);
1515
+ function computeDispatchMode(local, entityIsRuntime, touchesServer) {
1516
+ if (local) {
1517
+ return "hybridClientOnly";
1518
+ }
1519
+ if (entityIsRuntime) {
1520
+ return touchesServer ? "runtimeOptimistic" : "hybridClientOnly";
1521
+ }
1522
+ return "persistedAwaited";
1523
+ }
1524
+ function computeTraitDispatchMode(trait, entity, touchesServer) {
1525
+ return computeDispatchMode(trait.local ?? false, entity !== void 0 && isRuntimeEntity(entity), touchesServer);
1526
+ }
1475
1527
  var SourceBehaviorMetadataSchema = z.object({
1476
1528
  behavior: z.string().min(1),
1477
1529
  alias: z.string().min(1),
@@ -1958,8 +2010,18 @@ var ThemeDefinitionSchema = z.object({
1958
2010
  function isThemeReference(theme) {
1959
2011
  return typeof theme === "string";
1960
2012
  }
2013
+ var THEME_REGISTRY_KEY_PATTERN = "[a-z][a-z0-9]*(-[a-z0-9]+)*";
2014
+ var THEME_REGISTRY_KEY = new RegExp(`^${THEME_REGISTRY_KEY_PATTERN}$`);
2015
+ function isThemeRegistryKey(theme) {
2016
+ return typeof theme === "string" && THEME_REGISTRY_KEY.test(theme);
2017
+ }
2018
+ function themeDataKey(theme) {
2019
+ if (theme === void 0) return "";
2020
+ if (typeof theme === "string") return theme;
2021
+ return theme.name;
2022
+ }
1961
2023
  var ThemeRefStringSchema = z.string().regex(
1962
- /^([A-Z][a-zA-Z0-9]*\.theme|[a-z][a-z0-9]*(-[a-z0-9]+)*)$/,
2024
+ new RegExp(`^([A-Z][a-zA-Z0-9]*\\.theme|${THEME_REGISTRY_KEY_PATTERN})$`),
1963
2025
  'Theme reference must be "Alias.theme" or a registry theme key (e.g., "linear-clean-light")'
1964
2026
  );
1965
2027
  var ThemeRefSchema = z.union([
@@ -2236,7 +2298,8 @@ var OrbitalRefObjectSchema = z.object({
2236
2298
  roles: z.record(z.string(), z.array(z.string())).optional(),
2237
2299
  entities: z.record(z.string(), z.string()).optional(),
2238
2300
  mounts: z.record(z.string(), z.array(z.string())).optional(),
2239
- extend: z.array(EntityFieldSchema).optional()
2301
+ extend: z.array(EntityFieldSchema).optional(),
2302
+ listens: z.array(TraitEventListenerSchema.extend({ trait: z.string() })).optional()
2240
2303
  });
2241
2304
  function parseOrbitalRef(ref2) {
2242
2305
  const match = ref2.match(/^([A-Z][a-zA-Z0-9]*)\.orbitals\.([A-Z][a-zA-Z0-9]*)$/);
@@ -2437,15 +2500,40 @@ var BINDING_DOCS = {
2437
2500
  description: "Render-resolved schema sigil \u2014 the host orbital's active data-theme key, derived from Orbital.theme. Substituted from the OrbitalSchema before codegen; never survives as a live binding.",
2438
2501
  examples: ["@currentTheme"],
2439
2502
  requiresPath: false
2503
+ },
2504
+ event: {
2505
+ description: "The delivery being processed: { event, payload, source } \u2014 for a listens delivery the source emit, with its BusEventSource envelope (Runtime Spec Clause 5.5)",
2506
+ examples: ["@event.event", "@event.payload.n", "@event.source.trait", "@event.source.tick"],
2507
+ requiresPath: false
2508
+ },
2509
+ prevEvents: {
2510
+ description: "The deliveries this trait already received in this dispatch, in order, each shaped like @event",
2511
+ examples: ["@prevEvents"],
2512
+ requiresPath: false
2513
+ },
2514
+ prevStates: {
2515
+ description: "The states this trait left in this dispatch, in order",
2516
+ examples: ["@prevStates"],
2517
+ requiresPath: false
2518
+ },
2519
+ fromState: {
2520
+ description: "The transition's source state",
2521
+ examples: ["@fromState"],
2522
+ requiresPath: false
2523
+ },
2524
+ toState: {
2525
+ description: "The transition's target state (null in a listens `when`, where no transition is chosen yet)",
2526
+ examples: ["@toState"],
2527
+ requiresPath: false
2440
2528
  }
2441
2529
  };
2442
2530
  var BINDING_CONTEXT_RULES = {
2443
2531
  guard: {
2444
- allowed: ["entity", "payload", "state", "now", "config", "user"],
2445
- description: `Guards can access entity fields, event payload, current state, time, the call-site trait config (@config.X), and the authenticated user context (@user.id, @user.role) for ownership / role gates. Config access lets atoms write mode-aware guards \u2014 e.g. std-modal's OPEN can require @payload.row only when @config.mode equals "edit", letting create-mode legitimately fire OPEN with no row. Like effects, @config.X is substituted at molecule/organism inline time with the literal call-site value; at atom-scope validate, @config is allowed-but-unresolved.`
2532
+ allowed: ["entity", "payload", "state", "now", "config", "user", "event", "prevEvents", "prevStates", "fromState", "toState"],
2533
+ description: `Guards can read the delivery being processed and this dispatch's log (@event, @prevEvents, @prevStates) and the transition's ends (@fromState, @toState; Runtime Spec Clause 5.5). Guards can access entity fields, event payload, current state, time, the call-site trait config (@config.X), and the authenticated user context (@user.id, @user.role) for ownership / role gates. Config access lets atoms write mode-aware guards \u2014 e.g. std-modal's OPEN can require @payload.row only when @config.mode equals "edit", letting create-mode legitimately fire OPEN with no row. Like effects, @config.X is substituted at molecule/organism inline time with the literal call-site value; at atom-scope validate, @config is allowed-but-unresolved.`
2446
2534
  },
2447
2535
  effect: {
2448
- allowed: ["entity", "payload", "state", "now", "trait", "config", "user", "callsitePayload", "pages", "currentTheme"],
2536
+ allowed: ["entity", "payload", "state", "now", "trait", "config", "user", "callsitePayload", "pages", "currentTheme", "event", "prevEvents", "prevStates", "fromState", "toState"],
2449
2537
  description: "Effects can access and modify entity fields, use payload data, embed another trait's live frame via @trait.X inside render-ui children, read trait config values (@config.X) for atoms parameterized by their call-site, and read the authenticated user context (@user.id, @user.role). At molecule/organism inline time, @config.X is substituted with the literal value from the call-site config block; at atom-scope validate, @config is allowed-but-unresolved. @callsitePayload.X is the call-site-captured event payload emitted by the compiler's inline-trait hoisting (a hoisted render block that captured @payload); it is resolved at the composing effect by the runtime BindingResolver."
2450
2538
  },
2451
2539
  tick: {
@@ -2499,12 +2587,18 @@ var BINDING_ROOTS = [
2499
2587
  "entity",
2500
2588
  "payload",
2501
2589
  "state",
2590
+ "now",
2502
2591
  "config",
2503
- "user",
2504
2592
  "trait",
2505
- "item",
2506
- "now",
2507
- "computed",
2593
+ "user",
2594
+ "callsitePayload",
2595
+ "pages",
2596
+ "currentTheme",
2597
+ "event",
2598
+ "prevEvents",
2599
+ "prevStates",
2600
+ "fromState",
2601
+ "toState",
2508
2602
  "other"
2509
2603
  ];
2510
2604
  var KNOWN_ROOTS = new Set(BINDING_ROOTS.filter((r) => r !== "other"));
@@ -64557,6 +64651,46 @@ function renderUiPatternTypesOf(ir) {
64557
64651
  collectRenderUiPatternTypes(ir, out);
64558
64652
  return out;
64559
64653
  }
64654
+ function isPatternNode(value) {
64655
+ return value !== null && value !== void 0 && typeof value === "object" && !Array.isArray(value);
64656
+ }
64657
+ function collectRenderUiEntries(effect, out) {
64658
+ if (!Array.isArray(effect)) return;
64659
+ const head = effect[0];
64660
+ if (head === "render-ui") {
64661
+ const slot = effect[1];
64662
+ const pattern = effect[2];
64663
+ if (typeof slot === "string" && isPatternNode(pattern)) out.push({ slot, pattern });
64664
+ return;
64665
+ }
64666
+ for (const child of controlBody(effect)) collectRenderUiEntries(child, out);
64667
+ }
64668
+ function controlBody(effect) {
64669
+ switch (effect[0]) {
64670
+ case "do":
64671
+ case "atomic":
64672
+ case "async/all":
64673
+ case "async/sequence":
64674
+ case "async/race":
64675
+ return effect.slice(1);
64676
+ case "if":
64677
+ case "when":
64678
+ case "async/delay":
64679
+ case "async/debounce":
64680
+ case "async/throttle":
64681
+ case "async/interval":
64682
+ return effect.slice(2);
64683
+ case "let":
64684
+ return effect.slice(2);
64685
+ default:
64686
+ return [];
64687
+ }
64688
+ }
64689
+ function renderUiEntriesOf(effects) {
64690
+ const out = [];
64691
+ for (const effect of effects) collectRenderUiEntries(effect, out);
64692
+ return out;
64693
+ }
64560
64694
 
64561
64695
  // src/patterns/helpers/pattern-recommender.ts
64562
64696
  var DOMAIN_KEYWORDS = {
@@ -64851,6 +64985,24 @@ function propHostsDrawables(schema) {
64851
64985
  // src/types/pattern.ts
64852
64986
  var PatternTypeSchema = z.string();
64853
64987
 
64988
+ // src/types/changeset.ts
64989
+ var SEMANTIC_CHANGE_KINDS = [
64990
+ "orbital-added",
64991
+ "orbital-removed",
64992
+ "entity-fields-changed",
64993
+ "trait-added",
64994
+ "trait-removed",
64995
+ "trait-config-changed",
64996
+ "state-machine-changed",
64997
+ "guard-changed",
64998
+ "effect-changed",
64999
+ "render-ui-changed",
65000
+ "event-wiring-changed",
65001
+ "page-changed",
65002
+ "theme-changed",
65003
+ "behavior-composed"
65004
+ ];
65005
+
64854
65006
  // src/service-types.ts
64855
65007
  function createTypedEventBus(bus) {
64856
65008
  return {
@@ -64969,6 +65121,22 @@ var ServerEffectResultSchema = z.object({
64969
65121
  });
64970
65122
 
64971
65123
  // src/types/bus.ts
65124
+ function deliveryRecordValue(record) {
65125
+ const s = record.source;
65126
+ const source = {
65127
+ ...s.orbital !== void 0 ? { orbital: s.orbital } : {},
65128
+ ...s.orbitalId !== void 0 ? { orbitalId: s.orbitalId } : {},
65129
+ ...s.trait !== void 0 ? { trait: s.trait } : {},
65130
+ ...s.traitId !== void 0 ? { traitId: s.traitId } : {},
65131
+ ...s.eventId !== void 0 ? { eventId: s.eventId } : {},
65132
+ ...s.transition !== void 0 ? { transition: s.transition } : {},
65133
+ ...s.tick !== void 0 ? { tick: s.tick } : {},
65134
+ ...s.fromBridge !== void 0 ? { fromBridge: s.fromBridge } : {},
65135
+ ...s.dispatched !== void 0 ? { dispatched: s.dispatched } : {},
65136
+ ...s.originClientId !== void 0 ? { originClientId: s.originClientId } : {}
65137
+ };
65138
+ return { event: record.event, payload: record.payload ?? null, source };
65139
+ }
64972
65140
  var BusEventSourceSchema = z.object({
64973
65141
  orbital: z.string().optional(),
64974
65142
  orbitalId: OrbitalIdSchema.optional(),
@@ -64981,6 +65149,15 @@ var BusEventSourceSchema = z.object({
64981
65149
  dispatched: z.boolean().optional(),
64982
65150
  originClientId: z.string().optional()
64983
65151
  });
65152
+ var DeliveryRecordSchema = z.object({
65153
+ event: z.string(),
65154
+ payload: EventPayloadSchema.optional(),
65155
+ source: BusEventSourceSchema
65156
+ });
65157
+ var DispatchLogSchema = z.object({
65158
+ prevEvents: z.array(DeliveryRecordSchema),
65159
+ prevStates: z.array(z.string())
65160
+ });
64984
65161
  var EmittedEventSchema = z.object({
64985
65162
  event: z.string(),
64986
65163
  payload: EventPayloadSchema.optional(),
@@ -65025,7 +65202,9 @@ var OrbitalEventRequestSchema = z.object({
65025
65202
  sourceTrait: z.string().optional(),
65026
65203
  traits: z.array(z.object({ trait: z.string(), from: z.string() })).optional(),
65027
65204
  entityByTrait: z.record(EntityRowSchema).optional(),
65028
- behavior: z.string().optional()
65205
+ behavior: z.string().optional(),
65206
+ delivery: DeliveryRecordSchema.optional(),
65207
+ dispatchLog: DispatchLogSchema.optional()
65029
65208
  });
65030
65209
  var OrbitalEventResponseSchema = z.object({
65031
65210
  success: z.boolean(),
@@ -65035,7 +65214,12 @@ var OrbitalEventResponseSchema = z.object({
65035
65214
  data: z.record(z.array(EntityRowSchema)).optional(),
65036
65215
  entityByTrait: z.record(EntityRowSchema).optional(),
65037
65216
  clientEffects: z.array(ClientEffectTupleSchema).optional(),
65038
- clientEffectsByTrait: z.array(z.object({ traitName: z.string(), effect: ClientEffectTupleSchema })).optional(),
65217
+ clientEffectsByTrait: z.array(z.object({
65218
+ traitName: z.string(),
65219
+ effect: ClientEffectTupleSchema,
65220
+ event: z.string().optional(),
65221
+ fromState: z.string().optional()
65222
+ })).optional(),
65039
65223
  effectResults: z.array(ServerEffectResultSchema).optional(),
65040
65224
  guardFailed: z.string().optional(),
65041
65225
  rejections: z.array(
@@ -65052,6 +65236,14 @@ var OrbitalEventResponseSchema = z.object({
65052
65236
  cascadeTruncated: z.array(z.string()).optional(),
65053
65237
  error: z.string().optional()
65054
65238
  });
65239
+ var ServerTopologySchema = z.enum(["stateless", "stateful"]);
65240
+ var OrbitalRegisterResponseSchema = z.object({
65241
+ success: z.boolean(),
65242
+ topology: ServerTopologySchema.optional(),
65243
+ message: z.string().optional(),
65244
+ orbitals: z.array(z.string()).optional(),
65245
+ error: z.string().optional()
65246
+ });
65055
65247
  var LiveBroadcastItemSchema = z.object({
65056
65248
  event: z.string(),
65057
65249
  payload: EventPayloadSchema.optional(),
@@ -65061,6 +65253,66 @@ var LiveBroadcastItemSchema = z.object({
65061
65253
  var EventDispatchRequestSchema = OrbitalEventRequestSchema;
65062
65254
  var EventDispatchResponseSchema = OrbitalEventResponseSchema;
65063
65255
 
65256
+ // src/types/visit-key.ts
65257
+ function isPayloadList(value) {
65258
+ return Array.isArray(value);
65259
+ }
65260
+ function canonicalJson(value) {
65261
+ if (value === void 0 || value === null) return "null";
65262
+ if (value instanceof Date) return JSON.stringify(value.toISOString());
65263
+ if (isPayloadList(value)) {
65264
+ return `[${value.map((item) => item === void 0 ? "null" : canonicalJson(item)).join(",")}]`;
65265
+ }
65266
+ if (typeof value === "object") {
65267
+ const record = value;
65268
+ const fields = Object.keys(record).filter((k) => record[k] !== void 0).sort().map((k) => `${JSON.stringify(k)}:${canonicalJson(record[k])}`);
65269
+ return `{${fields.join(",")}}`;
65270
+ }
65271
+ return JSON.stringify(value);
65272
+ }
65273
+ function dispatchVisitKey(trait, event, from, payload) {
65274
+ return `${trait}\0${event}\0${from}\0${canonicalJson(payload)}`;
65275
+ }
65276
+
65277
+ // src/types/dispatch-memory.ts
65278
+ function dispatchScopeOf(delivery, log, event, payload) {
65279
+ const record = delivery ?? { event, ...payload !== void 0 ? { payload } : {}, source: {} };
65280
+ return {
65281
+ event: deliveryRecordValue(record),
65282
+ prevEvents: (log?.prevEvents ?? []).map(deliveryRecordValue),
65283
+ prevStates: [...log?.prevStates ?? []]
65284
+ };
65285
+ }
65286
+ var DispatchMemory = class {
65287
+ constructor() {
65288
+ this.deliveries = /* @__PURE__ */ new Map();
65289
+ this.left = /* @__PURE__ */ new Map();
65290
+ }
65291
+ /** This trait's log so far, as it travels on a request. */
65292
+ log(trait) {
65293
+ return { prevEvents: [...this.deliveries.get(trait) ?? []], prevStates: [...this.left.get(trait) ?? []] };
65294
+ }
65295
+ view(trait, delivery) {
65296
+ return dispatchScopeOf(delivery, this.log(trait), delivery.event, delivery.payload);
65297
+ }
65298
+ /** Continue a dispatch that began elsewhere: the target trait's log so far. */
65299
+ seed(trait, log) {
65300
+ this.deliveries.set(trait, [...log.prevEvents]);
65301
+ this.left.set(trait, [...log.prevStates]);
65302
+ }
65303
+ recordDelivery(trait, delivery) {
65304
+ const log = this.deliveries.get(trait) ?? [];
65305
+ log.push(delivery);
65306
+ this.deliveries.set(trait, log);
65307
+ }
65308
+ recordTransition(trait, from, to) {
65309
+ if (from === to) return;
65310
+ const log = this.left.get(trait) ?? [];
65311
+ log.push(from);
65312
+ this.left.set(trait, log);
65313
+ }
65314
+ };
65315
+
65064
65316
  // src/types/validation.ts
65065
65317
  var KNOWN_VALIDATION_ERROR_CODES = {
65066
65318
  // Binding (`@entity.X`, `@payload.Y`, `@state.Z`, `@now`, ...)
@@ -65072,6 +65324,9 @@ var KNOWN_VALIDATION_ERROR_CODES = {
65072
65324
  ORB_BINDING_NOW_NO_PATH: "ORB_BINDING_NOW_NO_PATH",
65073
65325
  ORB_BINDING_PAYLOAD_FIELD_UNDECLARED: "ORB_BINDING_PAYLOAD_FIELD_UNDECLARED",
65074
65326
  ORB_BINDING_PAYLOAD_IN_TICK: "ORB_BINDING_PAYLOAD_IN_TICK",
65327
+ ORB_BINDING_DISPATCH_ROOT_IN_TICK: "ORB_BINDING_DISPATCH_ROOT_IN_TICK",
65328
+ ORB_BINDING_ROOT_NO_PATH: "ORB_BINDING_ROOT_NO_PATH",
65329
+ ORB_BINDING_EVENT_INVALID_PATH: "ORB_BINDING_EVENT_INVALID_PATH",
65075
65330
  ORB_BINDING_PAYLOAD_TYPE_INCOMPATIBLE: "ORB_BINDING_PAYLOAD_TYPE_INCOMPATIBLE",
65076
65331
  ORB_BINDING_SET_TARGET_MISSING_PATH: "ORB_BINDING_SET_TARGET_MISSING_PATH",
65077
65332
  ORB_BINDING_STATE_NO_PATH: "ORB_BINDING_STATE_NO_PATH",
@@ -65268,33 +65523,40 @@ function widenTier(tier) {
65268
65523
  }
65269
65524
 
65270
65525
  // src/render-ui-edit.ts
65526
+ function childrenOf(node) {
65527
+ if (Array.isArray(node.children)) return node.children;
65528
+ const props = node.props;
65529
+ if (props && typeof props === "object" && !Array.isArray(props) && !(props instanceof Date)) {
65530
+ const nested = props.children;
65531
+ if (Array.isArray(nested)) return nested;
65532
+ }
65533
+ return null;
65534
+ }
65271
65535
  function navigatePatternPath(root, path) {
65272
65536
  if (!path || path === "root") return root;
65273
- const parts = path.split(".");
65537
+ const parts = (path.startsWith("root.") ? path.slice("root.".length) : path).split(".");
65274
65538
  let current = root;
65275
65539
  for (const part of parts) {
65276
- if (current === null || current === void 0 || typeof current !== "object") return null;
65540
+ if (current === null) return null;
65277
65541
  if (Array.isArray(current)) {
65278
65542
  const idx = Number.parseInt(part, 10);
65279
65543
  if (Number.isNaN(idx) || idx < 0 || idx >= current.length) return null;
65280
- current = current[idx];
65544
+ const item = current[idx];
65545
+ current = item && typeof item === "object" && !Array.isArray(item) ? item : null;
65546
+ } else if (part === "children") {
65547
+ current = childrenOf(current);
65281
65548
  } else {
65282
- const record = current;
65283
- if (part === "children" && Array.isArray(record.children)) {
65284
- current = record.children;
65285
- } else {
65286
- current = record[part];
65287
- }
65549
+ const value = current[part];
65550
+ current = value && typeof value === "object" && !Array.isArray(value) && !(value instanceof Date) ? value : null;
65288
65551
  }
65289
65552
  }
65290
- return typeof current === "object" && current !== null && !Array.isArray(current) ? current : null;
65553
+ return Array.isArray(current) ? null : current;
65291
65554
  }
65292
- function splitChildPath(path) {
65293
- const lastDot = path.lastIndexOf(".");
65294
- if (lastDot === -1) return null;
65295
- const index = Number.parseInt(path.slice(lastDot + 1), 10);
65296
- if (Number.isNaN(index)) return null;
65297
- return { parentPath: path.slice(0, lastDot), index };
65555
+ function splitPatternChildPath(path) {
65556
+ const match = /^(.*)\.children\.(\d+)$/.exec(path) ?? /^children\.(\d+)$/.exec(path);
65557
+ if (!match) return null;
65558
+ if (match.length === 2) return { parentPath: "root", index: Number.parseInt(match[1], 10) };
65559
+ return { parentPath: match[1], index: Number.parseInt(match[2], 10) };
65298
65560
  }
65299
65561
  function setPropAtPath(root, path, prop, value) {
65300
65562
  const node = navigatePatternPath(root, path);
@@ -65303,30 +65565,30 @@ function setPropAtPath(root, path, prop, value) {
65303
65565
  return true;
65304
65566
  }
65305
65567
  function replaceChildAtPath(root, path, node) {
65306
- const split = splitChildPath(path);
65568
+ const split = splitPatternChildPath(path);
65307
65569
  if (!split) return false;
65308
65570
  const parent = navigatePatternPath(root, split.parentPath);
65309
- if (!parent || !Array.isArray(parent.children)) return false;
65310
- if (split.index < 0 || split.index >= parent.children.length) return false;
65311
- parent.children[split.index] = node;
65571
+ const children = parent ? childrenOf(parent) : null;
65572
+ if (!children || split.index >= children.length) return false;
65573
+ children[split.index] = node;
65312
65574
  return true;
65313
65575
  }
65314
65576
  function insertChildAtPath(root, parentPath, index, node) {
65315
65577
  const parent = navigatePatternPath(root, parentPath);
65316
65578
  if (!parent) return false;
65317
- const children = parent.children ?? [];
65579
+ const children = childrenOf(parent) ?? [];
65318
65580
  const i = index < 0 || index > children.length ? children.length : index;
65319
65581
  children.splice(i, 0, node);
65320
- parent.children = children;
65582
+ if (!childrenOf(parent)) parent.children = children;
65321
65583
  return true;
65322
65584
  }
65323
65585
  function removeChildAtPath(root, path) {
65324
- const split = splitChildPath(path);
65586
+ const split = splitPatternChildPath(path);
65325
65587
  if (!split) return false;
65326
65588
  const parent = navigatePatternPath(root, split.parentPath);
65327
- if (!parent || !Array.isArray(parent.children)) return false;
65328
- if (split.index < 0 || split.index >= parent.children.length) return false;
65329
- parent.children.splice(split.index, 1);
65589
+ const children = parent ? childrenOf(parent) : null;
65590
+ if (!children || split.index >= children.length) return false;
65591
+ children.splice(split.index, 1);
65330
65592
  return true;
65331
65593
  }
65332
65594
  function replaceNodeInPlace(target, source) {
@@ -65355,45 +65617,42 @@ function findByFingerprint(node, path, fp) {
65355
65617
  if (fingerprintNode(node) === fp) return path;
65356
65618
  if (Array.isArray(node.children)) {
65357
65619
  for (let i = 0; i < node.children.length; i++) {
65358
- const r = findByFingerprint(node.children[i], `${path}.children.${i}`, fp);
65620
+ const child = node.children[i];
65621
+ if (typeof child === "string") continue;
65622
+ const r = findByFingerprint(child, `${path}.children.${i}`, fp);
65359
65623
  if (r) return r;
65360
65624
  }
65361
65625
  }
65362
65626
  return null;
65363
65627
  }
65364
- function readRenderUi(eff) {
65365
- if (eff[0] !== "render-ui") return null;
65366
- const slot = eff[1];
65367
- const config = eff[2];
65368
- if (typeof slot !== "string") return null;
65369
- if (config === null || typeof config !== "object" || Array.isArray(config)) return null;
65370
- return { slot, node: config };
65371
- }
65372
65628
  function asInlineTrait(ref2) {
65373
65629
  if (typeof ref2 === "object" && ref2 !== null && "stateMachine" in ref2) {
65374
65630
  return ref2;
65375
65631
  }
65376
65632
  return null;
65377
65633
  }
65378
- function findRenderUiRoot(orbital, address) {
65634
+ function renderRootOf(trait, address) {
65379
65635
  const wantTransition = address.transition !== "";
65380
65636
  const wantState = address.state !== void 0 && address.state !== "";
65381
65637
  let fallback = null;
65382
- for (const ref2 of orbital.traits) {
65383
- const trait = asInlineTrait(ref2);
65384
- if (!trait || trait.name !== address.trait) continue;
65385
- for (const t of trait.stateMachine?.transitions ?? []) {
65386
- if (wantState && t.from !== address.state) continue;
65387
- for (const eff of t.effects ?? []) {
65388
- const ru = readRenderUi(eff);
65389
- if (!ru || ru.slot !== address.slot) continue;
65390
- if (wantTransition && t.event === address.transition) return ru.node;
65391
- fallback ?? (fallback = ru.node);
65392
- }
65638
+ for (const t of trait.stateMachine?.transitions ?? []) {
65639
+ if (wantState && t.from !== address.state) continue;
65640
+ for (const entry of renderUiEntriesOf(t.effects ?? [])) {
65641
+ if (entry.slot !== address.slot) continue;
65642
+ const node = entry.pattern;
65643
+ if (wantTransition && t.event === address.transition) return node;
65644
+ if (!wantTransition) fallback ?? (fallback = node);
65393
65645
  }
65394
65646
  }
65395
65647
  return fallback;
65396
65648
  }
65649
+ function findRenderUiRoot(orbital, address) {
65650
+ for (const ref2 of orbital.traits) {
65651
+ const trait = asInlineTrait(ref2);
65652
+ if (trait && trait.name === address.trait) return renderRootOf(trait, address);
65653
+ }
65654
+ return null;
65655
+ }
65397
65656
  function resolvePath(root, patch) {
65398
65657
  if (patch.op === "insert") {
65399
65658
  return navigatePatternPath(root, patch.address.path) ? patch.address.path : null;
@@ -65447,6 +65706,37 @@ function applyRenderOverlay(orbital, patches) {
65447
65706
  return { applied, stale };
65448
65707
  }
65449
65708
 
65709
+ // src/agent-trace-view.ts
65710
+ var TRACE_ACTIVITY_TYPES = [
65711
+ "message",
65712
+ "tool_call",
65713
+ "tool_result",
65714
+ "file_operation",
65715
+ "schema_diff",
65716
+ "error",
65717
+ "coordinator_decision",
65718
+ "plan_committed",
65719
+ "pending_question",
65720
+ "clarification_question",
65721
+ "analysis",
65722
+ "orbital_started",
65723
+ "orbital_done",
65724
+ "schema_change",
65725
+ "done",
65726
+ "cancelled",
65727
+ "llm_response"
65728
+ ];
65729
+ function selectTraceActivities(activities, audience) {
65730
+ return activities.filter((activity) => {
65731
+ if (!audience.types.includes(activity.type)) return false;
65732
+ if (activity.type === "message" && audience.messageRoles) return audience.messageRoles.includes(activity.role);
65733
+ if (activity.type === "schema_change" && audience.schemaChangeKinds) {
65734
+ return audience.schemaChangeKinds.includes(activity.changeKind);
65735
+ }
65736
+ return true;
65737
+ });
65738
+ }
65739
+
65450
65740
  // src/resolver.ts
65451
65741
  var schemaCache = /* @__PURE__ */ new WeakMap();
65452
65742
  function clearSchemaCache() {
@@ -66255,13 +66545,21 @@ function setsEqual(a, b) {
66255
66545
  }
66256
66546
  return true;
66257
66547
  }
66258
- function inlineTraitMap(refs) {
66548
+ function namedTraitMap(refs) {
66259
66549
  const map = /* @__PURE__ */ new Map();
66260
66550
  for (const r of refs) {
66261
- if (isInlineTrait(r)) map.set(r.name, r);
66551
+ const key = typeof r === "string" ? r : isInlineTrait(r) ? r.name : r.name ?? r.ref;
66552
+ map.set(key, r);
66262
66553
  }
66263
66554
  return map;
66264
66555
  }
66556
+ function composedSource(r) {
66557
+ if (typeof r === "string") return r;
66558
+ return isInlineTrait(r) ? null : r.ref;
66559
+ }
66560
+ function traitConfigOf(r) {
66561
+ return typeof r === "string" ? void 0 : r.config;
66562
+ }
66265
66563
  function inlinePageMap(refs) {
66266
66564
  const map = /* @__PURE__ */ new Map();
66267
66565
  for (const r of refs) {
@@ -66314,17 +66612,33 @@ function diffSemanticOrbital(name, before, after) {
66314
66612
  } else if (bEntity !== aEntity) {
66315
66613
  changes.push({ kind: "entity-fields-changed", orbitalName: name });
66316
66614
  }
66317
- const bTraits = inlineTraitMap(before.traits ?? []);
66318
- const aTraits = inlineTraitMap(after.traits ?? []);
66615
+ const bTraits = namedTraitMap(before.traits ?? []);
66616
+ const aTraits = namedTraitMap(after.traits ?? []);
66319
66617
  for (const [tName] of aTraits) {
66320
66618
  if (!bTraits.has(tName)) changes.push({ kind: "trait-added", orbitalName: name, traitName: tName });
66321
66619
  }
66322
66620
  for (const [tName] of bTraits) {
66323
66621
  if (!aTraits.has(tName)) changes.push({ kind: "trait-removed", orbitalName: name, traitName: tName });
66324
66622
  }
66325
- for (const [tName, aTrait] of aTraits) {
66326
- const bTrait = bTraits.get(tName);
66327
- if (!bTrait) continue;
66623
+ for (const [tName, aRef] of aTraits) {
66624
+ const bRef = bTraits.get(tName);
66625
+ if (bRef === void 0) continue;
66626
+ if (composedSource(bRef) !== composedSource(aRef)) {
66627
+ changes.push({ kind: "trait-removed", orbitalName: name, traitName: tName });
66628
+ changes.push({ kind: "trait-added", orbitalName: name, traitName: tName });
66629
+ continue;
66630
+ }
66631
+ if (!jsonEqual(traitConfigOf(bRef), traitConfigOf(aRef))) {
66632
+ changes.push({ kind: "trait-config-changed", orbitalName: name, traitName: tName });
66633
+ }
66634
+ if (!isInlineTrait(bRef) || !isInlineTrait(aRef)) {
66635
+ if (typeof bRef !== "string" && typeof aRef !== "string" && (!jsonEqual(bRef.linkedEntity, aRef.linkedEntity) || !jsonEqual(bRef.events, aRef.events))) {
66636
+ changes.push({ kind: "event-wiring-changed", orbitalName: name, traitName: tName });
66637
+ }
66638
+ continue;
66639
+ }
66640
+ const bTrait = bRef;
66641
+ const aTrait = aRef;
66328
66642
  const bSM = bTrait.stateMachine;
66329
66643
  const aSM = aTrait.stateMachine;
66330
66644
  if (!bSM && !aSM) continue;
@@ -66349,6 +66663,9 @@ function diffSemanticOrbital(name, before, after) {
66349
66663
  changes.push({ kind: "event-wiring-changed", orbitalName: name, traitName: tName });
66350
66664
  }
66351
66665
  }
66666
+ if (!jsonEqual(before.theme, after.theme)) {
66667
+ changes.push({ kind: "theme-changed", orbitalName: name });
66668
+ }
66352
66669
  const bPages = inlinePageMap(before.pages ?? []);
66353
66670
  const aPages = inlinePageMap(after.pages ?? []);
66354
66671
  const bPaths = new Set(bPages.keys());
@@ -66396,6 +66713,13 @@ function diffSchemaSemantics(before, after) {
66396
66713
  const bOrb = bOrbitals.get(name);
66397
66714
  if (bOrb) changes.push(...diffSemanticOrbital(name, bOrb, aOrb));
66398
66715
  }
66716
+ if (!jsonEqual(before.theme, after.theme) || !jsonEqual(before.designTokens, after.designTokens)) {
66717
+ for (const [name] of aOrbitals) {
66718
+ if (!changes.some((c) => c.kind === "theme-changed" && c.orbitalName === name)) {
66719
+ changes.push({ kind: "theme-changed", orbitalName: name });
66720
+ }
66721
+ }
66722
+ }
66399
66723
  return changes;
66400
66724
  }
66401
66725
  function diffOrbitalSchemas(before, after, options) {
@@ -69555,7 +69879,8 @@ var en_default = {
69555
69879
  local: "local",
69556
69880
  identity: "identity",
69557
69881
  instance: "instance",
69558
- collection: "collection"
69882
+ collection: "collection",
69883
+ background: "background"
69559
69884
  },
69560
69885
  categories: {
69561
69886
  interaction: "interaction",
@@ -69599,7 +69924,12 @@ var en_default = {
69599
69924
  now: "now",
69600
69925
  config: "config",
69601
69926
  user: "user",
69602
- trait: "trait"
69927
+ trait: "trait",
69928
+ event: "event",
69929
+ prevEvents: "prevEvents",
69930
+ prevStates: "prevStates",
69931
+ fromState: "fromState",
69932
+ toState: "toState"
69603
69933
  },
69604
69934
  effects: {
69605
69935
  set: "set",
@@ -69683,6 +70013,7 @@ var en_default = {
69683
70013
  alias: "alias",
69684
70014
  animations: "animations",
69685
70015
  appliesTo: "appliesTo",
70016
+ runsInBackground: "runsInBackground",
69686
70017
  as: "as",
69687
70018
  aspect: "aspect",
69688
70019
  assetRef: "assetRef",
@@ -69992,7 +70323,8 @@ var ar_default = {
69992
70323
  local: "\u0645\u062D\u0644\u064A",
69993
70324
  identity: "\u0647\u0648\u064A\u0629",
69994
70325
  instance: "\u0646\u0633\u062E\u0629",
69995
- collection: "\u0645\u062C\u0645\u0648\u0639\u0629"
70326
+ collection: "\u0645\u062C\u0645\u0648\u0639\u0629",
70327
+ background: "\u062E\u0644\u0641\u064A"
69996
70328
  },
69997
70329
  categories: {
69998
70330
  interaction: "\u062A\u0641\u0627\u0639\u0644",
@@ -70036,7 +70368,12 @@ var ar_default = {
70036
70368
  now: "\u0627\u0644\u0622\u0646",
70037
70369
  config: "\u062A\u0643\u0648\u064A\u0646",
70038
70370
  user: "\u0645\u0633\u062A\u062E\u062F\u0645",
70039
- trait: "\u0633\u0645\u0629"
70371
+ trait: "\u0633\u0645\u0629",
70372
+ event: "\u062D\u062F\u062B",
70373
+ prevEvents: "\u0627\u0644\u0623\u062D\u062F\u0627\u062B_\u0627\u0644\u0633\u0627\u0628\u0642\u0629",
70374
+ prevStates: "\u0627\u0644\u062D\u0627\u0644\u0627\u062A_\u0627\u0644\u0633\u0627\u0628\u0642\u0629",
70375
+ fromState: "\u0645\u0646_\u062D\u0627\u0644\u0629",
70376
+ toState: "\u0625\u0644\u0649_\u062D\u0627\u0644\u0629"
70040
70377
  },
70041
70378
  effects: {
70042
70379
  set: "\u062A\u0639\u064A\u064A\u0646",
@@ -70120,6 +70457,7 @@ var ar_default = {
70120
70457
  alias: "\u0627\u0633\u0645_\u0645\u0633\u062A\u0639\u0627\u0631",
70121
70458
  animations: "\u0631\u0633\u0648\u0645_\u0645\u062A\u062D\u0631\u0643\u0629",
70122
70459
  appliesTo: "\u064A\u0646\u0637\u0628\u0642_\u0639\u0644\u0649",
70460
+ runsInBackground: "\u064A\u0639\u0645\u0644_\u0641\u064A_\u0627\u0644\u062E\u0644\u0641\u064A\u0629",
70123
70461
  as: "\u0643\u0640",
70124
70462
  aspect: "\u0646\u0633\u0628\u0629",
70125
70463
  assetRef: "\u0645\u0631\u062C\u0639_\u0627\u0644\u0623\u0635\u0644",
@@ -70429,7 +70767,8 @@ var sl_default = {
70429
70767
  local: "lokalno",
70430
70768
  identity: "identiteta",
70431
70769
  instance: "primerek",
70432
- collection: "zbirka"
70770
+ collection: "zbirka",
70771
+ background: "ozadno"
70433
70772
  },
70434
70773
  categories: {
70435
70774
  interaction: "interakcija",
@@ -70473,7 +70812,12 @@ var sl_default = {
70473
70812
  now: "zdaj",
70474
70813
  config: "konfiguracija",
70475
70814
  user: "uporabnik",
70476
- trait: "znacilnost"
70815
+ trait: "znacilnost",
70816
+ event: "dogodek",
70817
+ prevEvents: "prejsnjiDogodki",
70818
+ prevStates: "prejsnjaStanja",
70819
+ fromState: "izStanja",
70820
+ toState: "vStanje"
70477
70821
  },
70478
70822
  effects: {
70479
70823
  set: "nastavi",
@@ -70557,6 +70901,7 @@ var sl_default = {
70557
70901
  alias: "vzdevek",
70558
70902
  animations: "animacije",
70559
70903
  appliesTo: "veljaZa",
70904
+ runsInBackground: "teceVOzadju",
70560
70905
  as: "kot",
70561
70906
  aspect: "razmerje",
70562
70907
  assetRef: "sredstvoSklic",
@@ -80436,6 +80781,6 @@ var THEME_PRESETS = {
80436
80781
  wireframe: ThemeDefinitionSchema.parse(wireframe_default)
80437
80782
  };
80438
80783
 
80439
- export { AGENT_DOMAIN_CATEGORIES, ALLOWED_CUSTOM_COMPONENTS, ANIMATION_NAMES, ANONYMOUS_USER, ASSET_ASPECTS, ASSET_DIMENSIONS, AgentDomainCategorySchema, AnimationDefSchema, AnimationNameSchema, AssetAspectSchema, AssetCatalogEntrySchema, AssetCatalogSchema, AssetDimensionSchema, AssetSchema, AudioManifestSchema, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingSchema, BusEventSourceSchema, CAMERA_MODES, COLOR_TOKEN_KEYS, COMPONENT_MAPPING, CONFIG_REF_EVENT_PATTERN, CORE_BINDINGS, CameraModeSchema, CameraSchema, ClientEffectTupleSchema, ClientNavigateBackTupleSchema, ClientNavigateTupleSchema, ClientRenderUITupleSchema, ColorSliceSchema, ColorTokensSchema, ComputedEventContractSchema, ComputedEventListenerSchema, ConfigFieldDeclarationSchema, ConfigProvenanceRecordSchema, CustomPatternDefinitionSchema, CustomPatternMapSchema, DEFAULT_INTERACTION_MODELS, DEFAULT_UNIT_ANIMATION_ROWS, DEFAULT_VIEWER, DEV_TOKEN_PREFIX, DeclaredTraitConfigSchema, DensitySliceSchema, DensityTokensSchema, DesignPreferencesSchema, DesignTokensSchema, DomainCategorySchema, DomainContextSchema, DomainVocabularySchema, ENTITY_ROLES, EVENT_CONTRACTS, EffectSchema, ElevationSliceSchema, ElevationTokensSchema, EmittedEventSchema, EntityCallSchema, EntityFieldContractSchema, EntityFieldSchema, EntityIdSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntityRowSchema, EntitySchema, EntitySemanticRoleSchema, EventDispatchRequestSchema, EventDispatchResponseSchema, EventIdSchema, EventListenerSchema, EventPayloadFieldSchema, EventPayloadSchema, EventPayloadValueSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpectDeclarationSchema, ExpressionSchema, FIELD_TYPES, FieldSchema, FieldTypeSchema, FieldValueSchema, FileValueSchema, GameSubCategorySchema, GeometrySliceSchema, GeometryTokensSchema, GuardSchema, I18N_SECTIONS, ILLUSTRATION_TOKEN_KEYS, INTEGRATORS_REGISTRY, IconFamilySchema, IconographySliceSchema, IconographyTokensSchema, IdentityLedgerSchema, IllustrationSliceSchema, IllustrationStyleSchema, IllustrationTokensSchema, InteractionModelSchema, KNOWN_VALIDATION_ERROR_CODES, LANGUAGE_CODES, LOLO_FIRST_TOKEN_KEYWORDS, LedgerEntrySchema, LedgerKindSchema, ListenSourceSchema, LiveBroadcastItemSchema, MANIFEST_ASSET_LICENSES, MANIFEST_CANVAS_AFFINITIES, MANIFEST_ENTRY_KINDS, MANIFEST_SOURCE_CATALOGS, ManifestAssetLicenseSchema, ManifestCanvasAffinitySchema, ManifestEntryKindSchema, ManifestEntrySchema, ManifestFrameSpecSchema, ManifestSourceCatalogSchema, McpServiceDefSchema, MotionDurationKeySchema, MotionDurationPaletteSchema, MotionEasingKeySchema, MotionEasingPaletteSchema, MotionIntentMapSchema, MotionIntentSchema, MotionSliceSchema, MotionTokensSchema, NodeClassificationSchema, ORB_NOTATION_KEYS, OrbitalDefinitionSchema, OrbitalEntitySchema, OrbitalEventRequestSchema, OrbitalEventResponseSchema, OrbitalIdSchema, OrbitalPageSchema, OrbitalPageStrictSchema, OrbitalRefObjectSchema, OrbitalRefStringSchema, OrbitalSchemaSchema, OrbitalTraitRefSchema, OrbitalUnitSchema, OrbitalSchema as OrbitalZodSchema, PATTERN_REGISTRY, PATTERN_TYPES, PROP_KINDS, PageIdSchema, PageRefObjectSchema, PageRefSchema, PageRefStringSchema, PageSchema, PageTraitRefSchema, PaletteEntryIdSchema, PatternConfigSchema, PatternTypeSchema, PayloadFieldSchema, PayloadTypeWhenSchema, REFERENCE_CONFIG_TYPES, RENDER_BINDING_MARKER, RawUserClaimsSchema, RelatedLinkSchema, RelationConfigSchema, RequiredFieldSchema, ResolvedPatternPropsSchema, RestAuthConfigSchema, RestServiceDefSchema, SECRET_CONFIG_TYPES, SELF_OVERLAY_PATTERN_TYPES, SEMANTIC_STRING_TYPES, SERVER_REPORTED_EFFECTS, SERVICE_TYPES, SExprAtomSchema, SExprDataSchema, SExprSchema, SHEET_PROJECTIONS, SPRITE_DIRECTIONS, SPRITE_SHEET_LAYOUT, ScenePosSchema, SchemaMetadataSchema, SemanticAssetRefSchema, ServerBatchSummarySchema, ServerEffectResultSchema, ServiceDefinitionSchema, ServiceIdSchema, ServiceRefObjectSchema, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SheetProjectionSchema, SkinSpecSchema, SocketEventsSchema, SocketServiceDefSchema, SoundEntrySchema, SpacingScaleSchema, SpriteDirectionSchema, SpriteSheetAtlasSchema, StateMachineSchema, StateSchema, StateSemanticRoleSchema, SubTextureSchema, SuggestedGuardSchema, THEME_PRESETS, TYPE_POSITION_ONLY, TextureAtlasSchema, ThemeDefinitionSchema, ThemeIdSchema, ThemeRefSchema, ThemeRefStringSchema, ThemeTokensSchema, ThemeVariantSchema, TickIntervalSchema, TilesheetSchema, TraitCategorySchema, TraitConfigSchema, TraitConfigValueSchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitFieldRefSchema, TraitIdSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TraitUIBindingSchema, TransitionSchema, TypeIntentMapSchema, TypeIntentSchema, TypeScaleEntrySchema, TypeScaleSchema, TypeScaleTokensSchema, TypeSizeKeySchema, TypeSliceSchema, TypeSlotSchema, TypeWeightSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, aliasMap, answerToMutations, answersToMutations, applyEventWiring, applyFactoryCallPlanMutation, applyListenPayloadMapping, applyRenderOverlay, asEntityId, asEventId, asOrbitalId, asPageId, asPaletteEntryId, asServiceId, asThemeId, asTraitId, assertNoUnsatisfiableEnum, atomic, buildEdgeCoveringWalk, buildGuardPayloads, buildRecommendationContext, buildReplayPaths, buildResolvedTraitConfigs, buildStateGraph, callService, categorizeRemovals, checkI18nCoverage, classifyWorkflow, clearSchemaCache, collectBindings, collectCallsiteCaptureChildren, collectEmbeddedTraitReferrers, collectReachableStates, collectRenderUiPatternTypes, collectTraitConfigRefAdjacency, collectTraitEmbedAdjacency, component_mapping_default as componentMapping, composeBehaviors, configRefEventKnob, constTruth, containsEntityBinding, containsPayloadBinding, contractFieldName, coreTables, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, decodeDevIdentityToken, defaultUnitAtlas, deref, deriveCollection, deriveExpectations, deriveId, deriveInputType, describeTensorMismatch, despawn, detectLayoutStrategy, detectPageContentReduction, diffFactoryCalls, diffOrbitalSchemas, diffSchemaSemantics, diffSchemas, doEffects, emit, encodeDevIdentityToken, entityAccessPolicies, entityAccessTable, event_contracts_default as eventContracts, eventKeyPropsOf, eventListPropsOf, expectedEntityName, extractPayloadFieldRef, findCompatiblePatterns, findPersonaInRoster, findService, fingerprintNode, formatRecommendationsForPrompt, gatherTensorLastDim, generatePatternDescription, generateQuestions, getAllPatternTypes, getArgs, getBindingExamples, getComponentForPattern, getDefaultAnimationsForRole, getEmittedEvents, getEntity, getEntityCardinality, getInteractionModelForDomain, getNestedValue, getOperator, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPage, getPages, getPatternActionsRef, getPatternDefinition, getPatternFieldsContract, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, getRemovals, getSchemaCacheStats, getServiceNames, getTrait, getTraitConfig, getTraitName, getVocabulary, hasService, hasSignificantPageReduction, idKindOf, idPrefix, inferTsType, insertChildAtPath, integrators_registry_default as integratorsRegistry, isBinding, isCallSiteConfigDeclaration, isCircuitEvent, isContentBodyPattern, isContentBodyPatternType, isDestructiveChange, isDrawHostPattern, isDrawablePattern, isEffect, isEmailValue, isEntityAwarePattern, isEntityCall, isEntityId, isEntityReference, isEntityReferenceAny, isEventId, isEventPayloadValue, isFieldValue, isFileValue, isImportedTraitRef, isInlineTrait, isJsonArray, isJsonObject, isJsonPrimitive, isKnownValidationErrorCode, isMainSlotRenderUi, isMcpService, isOrbitalDefinition, isOrbitalId, isPageId, isPageReference, isPageReferenceObject, isPageReferenceString, isPaletteEntryId, isPersistBatchOperation, isPhoneValue, isPlanSnapshot, isReferenceConfigType, isRenderBindingMarker, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isSecretConfigType, isSemanticStringType, isSemanticStringValue, isServiceId, isServiceReference, isServiceReferenceObject, isSessionHistoryEntry, isSocketService, isTensorValue, isThemeId, isThemeReference, isTraitFieldRef, isTraitId, isUrlValue, isUuidValue, isValidBinding, isValidPatternType, isValueInputPattern, languageOfLoloFirstToken, languageOfOrbTopLevelKeys, ledgerCurName, ledgerRename, ledgerResolveName, lexLolo, localizeLoloSource, localizeMap, localizeOrbValue, manifestToAssetCatalog, mapTensorLastDim, maskSecretConfigValues, matchAssetQuery, mergeEntityFrame, mintId, navigate, navigateBack, navigatePatternPath, normalizeCallSiteConfigToValues, normalizeTraitRef, normalizeUserContext, omitFrameFields, orbitalInlineEntities, overrideDeclaredKnobs, parseAssetKey, parseAssetQuery, parseBinding, parseEntityRef, parseI18nTables, parseImportedTraitRef, parseOperatorTables, parseOrbitalRef, parseOrbitalSchema, parsePageRef, parseServiceRef, patterns_registry_default as patternsRegistry, persist, persistenceModeAllowsOverrides, personaFromIdentityRow, recommendPatterns, ref, registry, rehydrateKnobDefs, removeChildAtPath, renderUI, renderUiPatternTypesOf, replaceChildAtPath, reportIdenticalToEnglish, requiresConfirmation, resolveConfigRefEventName, resolveDefaultViewer, resolveEntityView, resolvePersonaSpec, safeParseOrbitalSchema, schemaToIR, set, setPropAtPath, sexpr, signatureToParamsSchema, spawn, summarizeOrbital, summarizeSchema, swap, tensorLastDimSize, tensorShape, toBindingRoot, traitDeclaresConfigForward, traitReferencesCallsitePayload, translateOverlaysToParams, validateAssetAnimations, validateBindingInContext, validateContract, walkSExpr, walkStatePairs, watch, widenTier };
80784
+ export { AGENT_DOMAIN_CATEGORIES, ALLOWED_CUSTOM_COMPONENTS, ANIMATION_NAMES, ANONYMOUS_USER, ASSET_ASPECTS, ASSET_DIMENSIONS, AgentDomainCategorySchema, AnimationDefSchema, AnimationNameSchema, AssetAspectSchema, AssetCatalogEntrySchema, AssetCatalogSchema, AssetDimensionSchema, AssetSchema, AudioManifestSchema, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingSchema, BusEventSourceSchema, CAMERA_MODES, COLOR_TOKEN_KEYS, COMPONENT_MAPPING, CONFIG_REF_EVENT_PATTERN, CORE_BINDINGS, CameraModeSchema, CameraSchema, ClientEffectTupleSchema, ClientNavigateBackTupleSchema, ClientNavigateTupleSchema, ClientRenderUITupleSchema, ColorSliceSchema, ColorTokensSchema, ComputedEventContractSchema, ComputedEventListenerSchema, ConfigFieldDeclarationSchema, ConfigProvenanceRecordSchema, CustomPatternDefinitionSchema, CustomPatternMapSchema, DEFAULT_INTERACTION_MODELS, DEFAULT_UNIT_ANIMATION_ROWS, DEFAULT_VIEWER, DEV_TOKEN_PREFIX, DeclaredTraitConfigSchema, DeliveryRecordSchema, DensitySliceSchema, DensityTokensSchema, DesignPreferencesSchema, DesignTokensSchema, DispatchLogSchema, DispatchMemory, DispatchModeSchema, DomainCategorySchema, DomainContextSchema, DomainVocabularySchema, ENTITY_ROLES, EVENT_CONTRACTS, EffectSchema, ElevationSliceSchema, ElevationTokensSchema, EmittedEventSchema, EntityCallSchema, EntityFieldContractSchema, EntityFieldSchema, EntityIdSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntityRowSchema, EntitySchema, EntitySemanticRoleSchema, EventDispatchRequestSchema, EventDispatchResponseSchema, EventIdSchema, EventListenerSchema, EventPayloadFieldSchema, EventPayloadSchema, EventPayloadValueSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpectDeclarationSchema, ExpressionSchema, FIELD_TYPES, FieldSchema, FieldTypeSchema, FieldValueSchema, FileValueSchema, GameSubCategorySchema, GeometrySliceSchema, GeometryTokensSchema, GuardSchema, I18N_SECTIONS, ILLUSTRATION_TOKEN_KEYS, INTEGRATORS_REGISTRY, IconFamilySchema, IconographySliceSchema, IconographyTokensSchema, IdentityLedgerSchema, IllustrationSliceSchema, IllustrationStyleSchema, IllustrationTokensSchema, InteractionModelSchema, KNOWN_VALIDATION_ERROR_CODES, LANGUAGE_CODES, LOLO_FIRST_TOKEN_KEYWORDS, LedgerEntrySchema, LedgerKindSchema, ListenSourceSchema, LiveBroadcastItemSchema, MANIFEST_ASSET_LICENSES, MANIFEST_CANVAS_AFFINITIES, MANIFEST_ENTRY_KINDS, MANIFEST_SOURCE_CATALOGS, ManifestAssetLicenseSchema, ManifestCanvasAffinitySchema, ManifestEntryKindSchema, ManifestEntrySchema, ManifestFrameSpecSchema, ManifestSourceCatalogSchema, McpServiceDefSchema, MotionDurationKeySchema, MotionDurationPaletteSchema, MotionEasingKeySchema, MotionEasingPaletteSchema, MotionIntentMapSchema, MotionIntentSchema, MotionSliceSchema, MotionTokensSchema, NodeClassificationSchema, ORB_NOTATION_KEYS, OrbitalDefinitionSchema, OrbitalEntitySchema, OrbitalEventRequestSchema, OrbitalEventResponseSchema, OrbitalIdSchema, OrbitalPageSchema, OrbitalPageStrictSchema, OrbitalRefObjectSchema, OrbitalRefStringSchema, OrbitalRegisterResponseSchema, OrbitalSchemaSchema, OrbitalTraitRefSchema, OrbitalUnitSchema, OrbitalSchema as OrbitalZodSchema, PATTERN_REGISTRY, PATTERN_TYPES, PROP_KINDS, PageIdSchema, PageRefObjectSchema, PageRefSchema, PageRefStringSchema, PageSchema, PageTraitRefSchema, PaletteEntryIdSchema, PatternConfigSchema, PatternTypeSchema, PayloadFieldSchema, PayloadTypeWhenSchema, REFERENCE_CONFIG_TYPES, RENDER_BINDING_MARKER, RawUserClaimsSchema, RelatedLinkSchema, RelationConfigSchema, RequiredFieldSchema, ResolvedPatternPropsSchema, RestAuthConfigSchema, RestServiceDefSchema, SECRET_CONFIG_TYPES, SELF_OVERLAY_PATTERN_TYPES, SEMANTIC_CHANGE_KINDS, SEMANTIC_STRING_TYPES, SERVER_REPORTED_EFFECTS, SERVICE_TYPES, SExprAtomSchema, SExprDataSchema, SExprSchema, SHEET_PROJECTIONS, SPRITE_DIRECTIONS, SPRITE_SHEET_LAYOUT, ScenePosSchema, SchemaMetadataSchema, SemanticAssetRefSchema, ServerBatchSummarySchema, ServerEffectResultSchema, ServerTopologySchema, ServiceDefinitionSchema, ServiceIdSchema, ServiceRefObjectSchema, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SheetProjectionSchema, SkinSpecSchema, SocketEventsSchema, SocketServiceDefSchema, SoundEntrySchema, SpacingScaleSchema, SpriteDirectionSchema, SpriteSheetAtlasSchema, StateMachineSchema, StateSchema, StateSemanticRoleSchema, SubTextureSchema, SuggestedGuardSchema, THEME_PRESETS, TRACE_ACTIVITY_TYPES, TYPE_POSITION_ONLY, TextureAtlasSchema, ThemeDefinitionSchema, ThemeIdSchema, ThemeRefSchema, ThemeRefStringSchema, ThemeTokensSchema, ThemeVariantSchema, TickIntervalSchema, TilesheetSchema, TraitCategorySchema, TraitConfigSchema, TraitConfigValueSchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitFieldRefSchema, TraitIdSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TraitUIBindingSchema, TransitionSchema, TypeIntentMapSchema, TypeIntentSchema, TypeScaleEntrySchema, TypeScaleSchema, TypeScaleTokensSchema, TypeSizeKeySchema, TypeSliceSchema, TypeSlotSchema, TypeWeightSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, aliasMap, answerToMutations, answersToMutations, applyEventWiring, applyFactoryCallPlanMutation, applyListenPayloadMapping, applyRenderOverlay, asEntityId, asEventId, asOrbitalId, asPageId, asPaletteEntryId, asServiceId, asThemeId, asTraitId, assertNoUnsatisfiableEnum, atomic, buildEdgeCoveringWalk, buildGuardPayloads, buildRecommendationContext, buildReplayPaths, buildResolvedTraitConfigs, buildStateGraph, callService, categorizeRemovals, checkI18nCoverage, classifyWorkflow, clearSchemaCache, collectBindings, collectCallsiteCaptureChildren, collectEmbeddedTraitReferrers, collectReachableStates, collectRenderUiPatternTypes, collectTraitConfigRefAdjacency, collectTraitEmbedAdjacency, component_mapping_default as componentMapping, composeBehaviors, computeDispatchMode, computeTraitDispatchMode, configRefEventKnob, constTruth, containsEntityBinding, containsPayloadBinding, contractFieldName, coreTables, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, decodeDevIdentityToken, defaultUnitAtlas, deliveryRecordValue, deref, deriveCollection, deriveExpectations, deriveId, deriveInputType, describeTensorMismatch, despawn, detectLayoutStrategy, detectPageContentReduction, diffFactoryCalls, diffOrbitalSchemas, diffSchemaSemantics, diffSchemas, dispatchScopeOf, dispatchVisitKey, doEffects, emit, encodeDevIdentityToken, entityAccessPolicies, entityAccessTable, event_contracts_default as eventContracts, eventKeyPropsOf, eventListPropsOf, expectedEntityName, extractPayloadFieldRef, findCompatiblePatterns, findPersonaInRoster, findService, fingerprintNode, formatRecommendationsForPrompt, gatherTensorLastDim, generatePatternDescription, generateQuestions, getAllPatternTypes, getArgs, getBindingExamples, getComponentForPattern, getDefaultAnimationsForRole, getEmittedEvents, getEntity, getEntityCardinality, getInteractionModelForDomain, getNestedValue, getOperator, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPage, getPages, getPatternActionsRef, getPatternDefinition, getPatternFieldsContract, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, getRemovals, getSchemaCacheStats, getServiceNames, getTrait, getTraitConfig, getTraitName, getVocabulary, hasService, hasSignificantPageReduction, idKindOf, idPrefix, inferTsType, insertChildAtPath, integrators_registry_default as integratorsRegistry, isBinding, isCallSiteConfigDeclaration, isCircuitEvent, isContentBodyPattern, isContentBodyPatternType, isDestructiveChange, isDrawHostPattern, isDrawablePattern, isEffect, isEmailValue, isEntityAwarePattern, isEntityCall, isEntityId, isEntityReference, isEntityReferenceAny, isEventId, isEventPayloadValue, isFieldValue, isFileValue, isImportedTraitRef, isInlineTrait, isJsonArray, isJsonObject, isJsonPrimitive, isKnownValidationErrorCode, isMainSlotRenderUi, isMcpService, isOrbitalDefinition, isOrbitalId, isPageId, isPageReference, isPageReferenceObject, isPageReferenceString, isPaletteEntryId, isPersistBatchOperation, isPhoneValue, isPlanSnapshot, isReferenceConfigType, isRenderBindingMarker, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isSecretConfigType, isSemanticStringType, isSemanticStringValue, isServiceId, isServiceReference, isServiceReferenceObject, isSessionHistoryEntry, isSocketService, isStaticallyFalse, isTensorValue, isThemeId, isThemeReference, isThemeRegistryKey, isTraitFieldRef, isTraitId, isUrlValue, isUuidValue, isValidBinding, isValidPatternType, isValueInputPattern, languageOfLoloFirstToken, languageOfOrbTopLevelKeys, ledgerCurName, ledgerRename, ledgerResolveName, lexLolo, localizeLoloSource, localizeMap, localizeOrbValue, manifestToAssetCatalog, mapTensorLastDim, maskSecretConfigValues, matchAssetQuery, mergeEntityFrame, mintId, navigate, navigateBack, navigatePatternPath, normalizeCallSiteConfigToValues, normalizeTraitRef, normalizeUserContext, omitFrameFields, orbitalInlineEntities, overrideDeclaredKnobs, parseAssetKey, parseAssetQuery, parseBinding, parseEntityRef, parseI18nTables, parseImportedTraitRef, parseOperatorTables, parseOrbitalRef, parseOrbitalSchema, parsePageRef, parseServiceRef, patterns_registry_default as patternsRegistry, persist, persistenceModeAllowsOverrides, personaFromIdentityRow, recommendPatterns, ref, registry, rehydrateKnobDefs, removeChildAtPath, renderRootOf, renderUI, renderUiEntriesOf, renderUiPatternTypesOf, replaceChildAtPath, reportIdenticalToEnglish, requiresConfirmation, resolveConfigRefEventName, resolveDefaultViewer, resolveEntityView, resolvePersonaSpec, safeParseOrbitalSchema, schemaToIR, selectTraceActivities, set, setPropAtPath, sexpr, signatureToParamsSchema, spawn, splitPatternChildPath, summarizeOrbital, summarizeSchema, swap, tensorLastDimSize, tensorShape, themeDataKey, toBindingRoot, traitDeclaresConfigForward, traitReferencesCallsitePayload, translateOverlaysToParams, validateAssetAnimations, validateBindingInContext, validateContract, walkSExpr, walkStatePairs, watch, widenTier };
80440
80785
  //# sourceMappingURL=index.js.map
80441
80786
  //# sourceMappingURL=index.js.map