@almadar/core 10.102.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 +5 -2
  3. package/dist/builders.js.map +1 -1
  4. package/dist/{bus-BS4TMOJW.d.ts → bus-BGojNDOE.d.ts} +37 -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-D2OpLCyX.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 +33 -8
  13. package/dist/factory-runtime/index.js.map +1 -1
  14. package/dist/fixtures.d.ts +3 -3
  15. package/dist/fixtures.js +19 -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-CyfcxG5N.d.ts → index-CVYZ3GcI.d.ts} +122 -23
  20. package/dist/index.d.ts +74 -17
  21. package/dist/index.js +400 -76
  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-COf9yTjs.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-Be3xF0px.d.ts → trait-BSe6oDBd.d.ts} +59 -10
  38. package/dist/types/index.d.ts +8 -8
  39. package/dist/types/index.js +210 -16
  40. package/dist/types/index.js.map +1 -1
  41. package/dist/{types-CYOzs4As.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(),
@@ -1473,17 +1512,17 @@ var EffectUseSchema = z.object({
1473
1512
  });
1474
1513
  var EffectRowSchema = z.array(EffectUseSchema);
1475
1514
  var DispatchModeSchema = z.enum(["persistedAwaited", "hybridClientOnly", "runtimeOptimistic"]);
1476
- function computeDispatchMode(local, entityIsRuntime) {
1515
+ function computeDispatchMode(local, entityIsRuntime, touchesServer) {
1477
1516
  if (local) {
1478
1517
  return "hybridClientOnly";
1479
1518
  }
1480
1519
  if (entityIsRuntime) {
1481
- return "runtimeOptimistic";
1520
+ return touchesServer ? "runtimeOptimistic" : "hybridClientOnly";
1482
1521
  }
1483
1522
  return "persistedAwaited";
1484
1523
  }
1485
- function computeTraitDispatchMode(trait, entity) {
1486
- return computeDispatchMode(trait.local ?? false, entity !== void 0 && isRuntimeEntity(entity));
1524
+ function computeTraitDispatchMode(trait, entity, touchesServer) {
1525
+ return computeDispatchMode(trait.local ?? false, entity !== void 0 && isRuntimeEntity(entity), touchesServer);
1487
1526
  }
1488
1527
  var SourceBehaviorMetadataSchema = z.object({
1489
1528
  behavior: z.string().min(1),
@@ -1971,8 +2010,18 @@ var ThemeDefinitionSchema = z.object({
1971
2010
  function isThemeReference(theme) {
1972
2011
  return typeof theme === "string";
1973
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
+ }
1974
2023
  var ThemeRefStringSchema = z.string().regex(
1975
- /^([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})$`),
1976
2025
  'Theme reference must be "Alias.theme" or a registry theme key (e.g., "linear-clean-light")'
1977
2026
  );
1978
2027
  var ThemeRefSchema = z.union([
@@ -2249,7 +2298,8 @@ var OrbitalRefObjectSchema = z.object({
2249
2298
  roles: z.record(z.string(), z.array(z.string())).optional(),
2250
2299
  entities: z.record(z.string(), z.string()).optional(),
2251
2300
  mounts: z.record(z.string(), z.array(z.string())).optional(),
2252
- extend: z.array(EntityFieldSchema).optional()
2301
+ extend: z.array(EntityFieldSchema).optional(),
2302
+ listens: z.array(TraitEventListenerSchema.extend({ trait: z.string() })).optional()
2253
2303
  });
2254
2304
  function parseOrbitalRef(ref2) {
2255
2305
  const match = ref2.match(/^([A-Z][a-zA-Z0-9]*)\.orbitals\.([A-Z][a-zA-Z0-9]*)$/);
@@ -2450,15 +2500,40 @@ var BINDING_DOCS = {
2450
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.",
2451
2501
  examples: ["@currentTheme"],
2452
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
2453
2528
  }
2454
2529
  };
2455
2530
  var BINDING_CONTEXT_RULES = {
2456
2531
  guard: {
2457
- allowed: ["entity", "payload", "state", "now", "config", "user"],
2458
- 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.`
2459
2534
  },
2460
2535
  effect: {
2461
- 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"],
2462
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."
2463
2538
  },
2464
2539
  tick: {
@@ -2512,12 +2587,18 @@ var BINDING_ROOTS = [
2512
2587
  "entity",
2513
2588
  "payload",
2514
2589
  "state",
2590
+ "now",
2515
2591
  "config",
2516
- "user",
2517
2592
  "trait",
2518
- "item",
2519
- "now",
2520
- "computed",
2593
+ "user",
2594
+ "callsitePayload",
2595
+ "pages",
2596
+ "currentTheme",
2597
+ "event",
2598
+ "prevEvents",
2599
+ "prevStates",
2600
+ "fromState",
2601
+ "toState",
2521
2602
  "other"
2522
2603
  ];
2523
2604
  var KNOWN_ROOTS = new Set(BINDING_ROOTS.filter((r) => r !== "other"));
@@ -64570,6 +64651,46 @@ function renderUiPatternTypesOf(ir) {
64570
64651
  collectRenderUiPatternTypes(ir, out);
64571
64652
  return out;
64572
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
+ }
64573
64694
 
64574
64695
  // src/patterns/helpers/pattern-recommender.ts
64575
64696
  var DOMAIN_KEYWORDS = {
@@ -64864,6 +64985,24 @@ function propHostsDrawables(schema) {
64864
64985
  // src/types/pattern.ts
64865
64986
  var PatternTypeSchema = z.string();
64866
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
+
64867
65006
  // src/service-types.ts
64868
65007
  function createTypedEventBus(bus) {
64869
65008
  return {
@@ -64982,6 +65121,22 @@ var ServerEffectResultSchema = z.object({
64982
65121
  });
64983
65122
 
64984
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
+ }
64985
65140
  var BusEventSourceSchema = z.object({
64986
65141
  orbital: z.string().optional(),
64987
65142
  orbitalId: OrbitalIdSchema.optional(),
@@ -64994,6 +65149,15 @@ var BusEventSourceSchema = z.object({
64994
65149
  dispatched: z.boolean().optional(),
64995
65150
  originClientId: z.string().optional()
64996
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
+ });
64997
65161
  var EmittedEventSchema = z.object({
64998
65162
  event: z.string(),
64999
65163
  payload: EventPayloadSchema.optional(),
@@ -65038,7 +65202,9 @@ var OrbitalEventRequestSchema = z.object({
65038
65202
  sourceTrait: z.string().optional(),
65039
65203
  traits: z.array(z.object({ trait: z.string(), from: z.string() })).optional(),
65040
65204
  entityByTrait: z.record(EntityRowSchema).optional(),
65041
- behavior: z.string().optional()
65205
+ behavior: z.string().optional(),
65206
+ delivery: DeliveryRecordSchema.optional(),
65207
+ dispatchLog: DispatchLogSchema.optional()
65042
65208
  });
65043
65209
  var OrbitalEventResponseSchema = z.object({
65044
65210
  success: z.boolean(),
@@ -65048,7 +65214,12 @@ var OrbitalEventResponseSchema = z.object({
65048
65214
  data: z.record(z.array(EntityRowSchema)).optional(),
65049
65215
  entityByTrait: z.record(EntityRowSchema).optional(),
65050
65216
  clientEffects: z.array(ClientEffectTupleSchema).optional(),
65051
- 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(),
65052
65223
  effectResults: z.array(ServerEffectResultSchema).optional(),
65053
65224
  guardFailed: z.string().optional(),
65054
65225
  rejections: z.array(
@@ -65082,6 +65253,66 @@ var LiveBroadcastItemSchema = z.object({
65082
65253
  var EventDispatchRequestSchema = OrbitalEventRequestSchema;
65083
65254
  var EventDispatchResponseSchema = OrbitalEventResponseSchema;
65084
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
+
65085
65316
  // src/types/validation.ts
65086
65317
  var KNOWN_VALIDATION_ERROR_CODES = {
65087
65318
  // Binding (`@entity.X`, `@payload.Y`, `@state.Z`, `@now`, ...)
@@ -65093,6 +65324,9 @@ var KNOWN_VALIDATION_ERROR_CODES = {
65093
65324
  ORB_BINDING_NOW_NO_PATH: "ORB_BINDING_NOW_NO_PATH",
65094
65325
  ORB_BINDING_PAYLOAD_FIELD_UNDECLARED: "ORB_BINDING_PAYLOAD_FIELD_UNDECLARED",
65095
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",
65096
65330
  ORB_BINDING_PAYLOAD_TYPE_INCOMPATIBLE: "ORB_BINDING_PAYLOAD_TYPE_INCOMPATIBLE",
65097
65331
  ORB_BINDING_SET_TARGET_MISSING_PATH: "ORB_BINDING_SET_TARGET_MISSING_PATH",
65098
65332
  ORB_BINDING_STATE_NO_PATH: "ORB_BINDING_STATE_NO_PATH",
@@ -65289,33 +65523,40 @@ function widenTier(tier) {
65289
65523
  }
65290
65524
 
65291
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
+ }
65292
65535
  function navigatePatternPath(root, path) {
65293
65536
  if (!path || path === "root") return root;
65294
- const parts = path.split(".");
65537
+ const parts = (path.startsWith("root.") ? path.slice("root.".length) : path).split(".");
65295
65538
  let current = root;
65296
65539
  for (const part of parts) {
65297
- if (current === null || current === void 0 || typeof current !== "object") return null;
65540
+ if (current === null) return null;
65298
65541
  if (Array.isArray(current)) {
65299
65542
  const idx = Number.parseInt(part, 10);
65300
65543
  if (Number.isNaN(idx) || idx < 0 || idx >= current.length) return null;
65301
- 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);
65302
65548
  } else {
65303
- const record = current;
65304
- if (part === "children" && Array.isArray(record.children)) {
65305
- current = record.children;
65306
- } else {
65307
- current = record[part];
65308
- }
65549
+ const value = current[part];
65550
+ current = value && typeof value === "object" && !Array.isArray(value) && !(value instanceof Date) ? value : null;
65309
65551
  }
65310
65552
  }
65311
- return typeof current === "object" && current !== null && !Array.isArray(current) ? current : null;
65553
+ return Array.isArray(current) ? null : current;
65312
65554
  }
65313
- function splitChildPath(path) {
65314
- const lastDot = path.lastIndexOf(".");
65315
- if (lastDot === -1) return null;
65316
- const index = Number.parseInt(path.slice(lastDot + 1), 10);
65317
- if (Number.isNaN(index)) return null;
65318
- 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) };
65319
65560
  }
65320
65561
  function setPropAtPath(root, path, prop, value) {
65321
65562
  const node = navigatePatternPath(root, path);
@@ -65324,30 +65565,30 @@ function setPropAtPath(root, path, prop, value) {
65324
65565
  return true;
65325
65566
  }
65326
65567
  function replaceChildAtPath(root, path, node) {
65327
- const split = splitChildPath(path);
65568
+ const split = splitPatternChildPath(path);
65328
65569
  if (!split) return false;
65329
65570
  const parent = navigatePatternPath(root, split.parentPath);
65330
- if (!parent || !Array.isArray(parent.children)) return false;
65331
- if (split.index < 0 || split.index >= parent.children.length) return false;
65332
- 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;
65333
65574
  return true;
65334
65575
  }
65335
65576
  function insertChildAtPath(root, parentPath, index, node) {
65336
65577
  const parent = navigatePatternPath(root, parentPath);
65337
65578
  if (!parent) return false;
65338
- const children = parent.children ?? [];
65579
+ const children = childrenOf(parent) ?? [];
65339
65580
  const i = index < 0 || index > children.length ? children.length : index;
65340
65581
  children.splice(i, 0, node);
65341
- parent.children = children;
65582
+ if (!childrenOf(parent)) parent.children = children;
65342
65583
  return true;
65343
65584
  }
65344
65585
  function removeChildAtPath(root, path) {
65345
- const split = splitChildPath(path);
65586
+ const split = splitPatternChildPath(path);
65346
65587
  if (!split) return false;
65347
65588
  const parent = navigatePatternPath(root, split.parentPath);
65348
- if (!parent || !Array.isArray(parent.children)) return false;
65349
- if (split.index < 0 || split.index >= parent.children.length) return false;
65350
- 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);
65351
65592
  return true;
65352
65593
  }
65353
65594
  function replaceNodeInPlace(target, source) {
@@ -65376,45 +65617,42 @@ function findByFingerprint(node, path, fp) {
65376
65617
  if (fingerprintNode(node) === fp) return path;
65377
65618
  if (Array.isArray(node.children)) {
65378
65619
  for (let i = 0; i < node.children.length; i++) {
65379
- 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);
65380
65623
  if (r) return r;
65381
65624
  }
65382
65625
  }
65383
65626
  return null;
65384
65627
  }
65385
- function readRenderUi(eff) {
65386
- if (eff[0] !== "render-ui") return null;
65387
- const slot = eff[1];
65388
- const config = eff[2];
65389
- if (typeof slot !== "string") return null;
65390
- if (config === null || typeof config !== "object" || Array.isArray(config)) return null;
65391
- return { slot, node: config };
65392
- }
65393
65628
  function asInlineTrait(ref2) {
65394
65629
  if (typeof ref2 === "object" && ref2 !== null && "stateMachine" in ref2) {
65395
65630
  return ref2;
65396
65631
  }
65397
65632
  return null;
65398
65633
  }
65399
- function findRenderUiRoot(orbital, address) {
65634
+ function renderRootOf(trait, address) {
65400
65635
  const wantTransition = address.transition !== "";
65401
65636
  const wantState = address.state !== void 0 && address.state !== "";
65402
65637
  let fallback = null;
65403
- for (const ref2 of orbital.traits) {
65404
- const trait = asInlineTrait(ref2);
65405
- if (!trait || trait.name !== address.trait) continue;
65406
- for (const t of trait.stateMachine?.transitions ?? []) {
65407
- if (wantState && t.from !== address.state) continue;
65408
- for (const eff of t.effects ?? []) {
65409
- const ru = readRenderUi(eff);
65410
- if (!ru || ru.slot !== address.slot) continue;
65411
- if (wantTransition && t.event === address.transition) return ru.node;
65412
- fallback ?? (fallback = ru.node);
65413
- }
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);
65414
65645
  }
65415
65646
  }
65416
65647
  return fallback;
65417
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
+ }
65418
65656
  function resolvePath(root, patch) {
65419
65657
  if (patch.op === "insert") {
65420
65658
  return navigatePatternPath(root, patch.address.path) ? patch.address.path : null;
@@ -65468,6 +65706,37 @@ function applyRenderOverlay(orbital, patches) {
65468
65706
  return { applied, stale };
65469
65707
  }
65470
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
+
65471
65740
  // src/resolver.ts
65472
65741
  var schemaCache = /* @__PURE__ */ new WeakMap();
65473
65742
  function clearSchemaCache() {
@@ -66276,13 +66545,21 @@ function setsEqual(a, b) {
66276
66545
  }
66277
66546
  return true;
66278
66547
  }
66279
- function inlineTraitMap(refs) {
66548
+ function namedTraitMap(refs) {
66280
66549
  const map = /* @__PURE__ */ new Map();
66281
66550
  for (const r of refs) {
66282
- 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);
66283
66553
  }
66284
66554
  return map;
66285
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
+ }
66286
66563
  function inlinePageMap(refs) {
66287
66564
  const map = /* @__PURE__ */ new Map();
66288
66565
  for (const r of refs) {
@@ -66335,17 +66612,33 @@ function diffSemanticOrbital(name, before, after) {
66335
66612
  } else if (bEntity !== aEntity) {
66336
66613
  changes.push({ kind: "entity-fields-changed", orbitalName: name });
66337
66614
  }
66338
- const bTraits = inlineTraitMap(before.traits ?? []);
66339
- const aTraits = inlineTraitMap(after.traits ?? []);
66615
+ const bTraits = namedTraitMap(before.traits ?? []);
66616
+ const aTraits = namedTraitMap(after.traits ?? []);
66340
66617
  for (const [tName] of aTraits) {
66341
66618
  if (!bTraits.has(tName)) changes.push({ kind: "trait-added", orbitalName: name, traitName: tName });
66342
66619
  }
66343
66620
  for (const [tName] of bTraits) {
66344
66621
  if (!aTraits.has(tName)) changes.push({ kind: "trait-removed", orbitalName: name, traitName: tName });
66345
66622
  }
66346
- for (const [tName, aTrait] of aTraits) {
66347
- const bTrait = bTraits.get(tName);
66348
- 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;
66349
66642
  const bSM = bTrait.stateMachine;
66350
66643
  const aSM = aTrait.stateMachine;
66351
66644
  if (!bSM && !aSM) continue;
@@ -66370,6 +66663,9 @@ function diffSemanticOrbital(name, before, after) {
66370
66663
  changes.push({ kind: "event-wiring-changed", orbitalName: name, traitName: tName });
66371
66664
  }
66372
66665
  }
66666
+ if (!jsonEqual(before.theme, after.theme)) {
66667
+ changes.push({ kind: "theme-changed", orbitalName: name });
66668
+ }
66373
66669
  const bPages = inlinePageMap(before.pages ?? []);
66374
66670
  const aPages = inlinePageMap(after.pages ?? []);
66375
66671
  const bPaths = new Set(bPages.keys());
@@ -66417,6 +66713,13 @@ function diffSchemaSemantics(before, after) {
66417
66713
  const bOrb = bOrbitals.get(name);
66418
66714
  if (bOrb) changes.push(...diffSemanticOrbital(name, bOrb, aOrb));
66419
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
+ }
66420
66723
  return changes;
66421
66724
  }
66422
66725
  function diffOrbitalSchemas(before, after, options) {
@@ -69576,7 +69879,8 @@ var en_default = {
69576
69879
  local: "local",
69577
69880
  identity: "identity",
69578
69881
  instance: "instance",
69579
- collection: "collection"
69882
+ collection: "collection",
69883
+ background: "background"
69580
69884
  },
69581
69885
  categories: {
69582
69886
  interaction: "interaction",
@@ -69620,7 +69924,12 @@ var en_default = {
69620
69924
  now: "now",
69621
69925
  config: "config",
69622
69926
  user: "user",
69623
- trait: "trait"
69927
+ trait: "trait",
69928
+ event: "event",
69929
+ prevEvents: "prevEvents",
69930
+ prevStates: "prevStates",
69931
+ fromState: "fromState",
69932
+ toState: "toState"
69624
69933
  },
69625
69934
  effects: {
69626
69935
  set: "set",
@@ -69704,6 +70013,7 @@ var en_default = {
69704
70013
  alias: "alias",
69705
70014
  animations: "animations",
69706
70015
  appliesTo: "appliesTo",
70016
+ runsInBackground: "runsInBackground",
69707
70017
  as: "as",
69708
70018
  aspect: "aspect",
69709
70019
  assetRef: "assetRef",
@@ -70013,7 +70323,8 @@ var ar_default = {
70013
70323
  local: "\u0645\u062D\u0644\u064A",
70014
70324
  identity: "\u0647\u0648\u064A\u0629",
70015
70325
  instance: "\u0646\u0633\u062E\u0629",
70016
- collection: "\u0645\u062C\u0645\u0648\u0639\u0629"
70326
+ collection: "\u0645\u062C\u0645\u0648\u0639\u0629",
70327
+ background: "\u062E\u0644\u0641\u064A"
70017
70328
  },
70018
70329
  categories: {
70019
70330
  interaction: "\u062A\u0641\u0627\u0639\u0644",
@@ -70057,7 +70368,12 @@ var ar_default = {
70057
70368
  now: "\u0627\u0644\u0622\u0646",
70058
70369
  config: "\u062A\u0643\u0648\u064A\u0646",
70059
70370
  user: "\u0645\u0633\u062A\u062E\u062F\u0645",
70060
- 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"
70061
70377
  },
70062
70378
  effects: {
70063
70379
  set: "\u062A\u0639\u064A\u064A\u0646",
@@ -70141,6 +70457,7 @@ var ar_default = {
70141
70457
  alias: "\u0627\u0633\u0645_\u0645\u0633\u062A\u0639\u0627\u0631",
70142
70458
  animations: "\u0631\u0633\u0648\u0645_\u0645\u062A\u062D\u0631\u0643\u0629",
70143
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",
70144
70461
  as: "\u0643\u0640",
70145
70462
  aspect: "\u0646\u0633\u0628\u0629",
70146
70463
  assetRef: "\u0645\u0631\u062C\u0639_\u0627\u0644\u0623\u0635\u0644",
@@ -70450,7 +70767,8 @@ var sl_default = {
70450
70767
  local: "lokalno",
70451
70768
  identity: "identiteta",
70452
70769
  instance: "primerek",
70453
- collection: "zbirka"
70770
+ collection: "zbirka",
70771
+ background: "ozadno"
70454
70772
  },
70455
70773
  categories: {
70456
70774
  interaction: "interakcija",
@@ -70494,7 +70812,12 @@ var sl_default = {
70494
70812
  now: "zdaj",
70495
70813
  config: "konfiguracija",
70496
70814
  user: "uporabnik",
70497
- trait: "znacilnost"
70815
+ trait: "znacilnost",
70816
+ event: "dogodek",
70817
+ prevEvents: "prejsnjiDogodki",
70818
+ prevStates: "prejsnjaStanja",
70819
+ fromState: "izStanja",
70820
+ toState: "vStanje"
70498
70821
  },
70499
70822
  effects: {
70500
70823
  set: "nastavi",
@@ -70578,6 +70901,7 @@ var sl_default = {
70578
70901
  alias: "vzdevek",
70579
70902
  animations: "animacije",
70580
70903
  appliesTo: "veljaZa",
70904
+ runsInBackground: "teceVOzadju",
70581
70905
  as: "kot",
70582
70906
  aspect: "razmerje",
70583
70907
  assetRef: "sredstvoSklic",
@@ -80457,6 +80781,6 @@ var THEME_PRESETS = {
80457
80781
  wireframe: ThemeDefinitionSchema.parse(wireframe_default)
80458
80782
  };
80459
80783
 
80460
- 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, 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_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, 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, 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 };
80461
80785
  //# sourceMappingURL=index.js.map
80462
80786
  //# sourceMappingURL=index.js.map