@blue-labs/document-processor 4.0.0-rc.3 → 4.0.0-rc.4

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.
package/dist/index.js CHANGED
@@ -1,39 +1,39 @@
1
- import { repository as Ze } from "@blue-repository/types";
2
- import { evaluate as Lt } from "@blue-quickjs/quickjs-runtime";
3
- import { validateDv as xt, DV_LIMIT_DEFAULTS as Ft } from "@blue-quickjs/dv";
4
- import { HOST_V1_MANIFEST as $t, HOST_V1_HASH as Ut } from "@blue-quickjs/abi-manifest";
5
- import { BlueNode as p, withTypeBlueId as m, blueNodeField as I, Properties as Ne, MergingProcessors as L, Blue as zt } from "@blue-labs/language";
1
+ import { repository as Ye } from "@blue-repository/types";
2
+ import { evaluate as _t } from "@blue-quickjs/quickjs-runtime";
3
+ import { validateDv as Lt, DV_LIMIT_DEFAULTS as xt } from "@blue-quickjs/dv";
4
+ import { HOST_V1_MANIFEST as Ft, HOST_V1_HASH as $t } from "@blue-quickjs/abi-manifest";
5
+ import { BlueNode as p, withTypeBlueId as m, blueNodeField as I, Properties as Ne, MergingProcessors as L, Blue as Ut } from "@blue-labs/language";
6
6
  import Ae from "picomatch";
7
7
  import { z as l, ZodError as ve } from "zod";
8
8
  import { isNullable as ge } from "@blue-labs/shared-utils";
9
- function Vt(o) {
9
+ function zt(o) {
10
10
  return { ok: !0, value: o };
11
11
  }
12
- function Ht(o) {
12
+ function Vt(o) {
13
13
  return { ok: !1, error: o };
14
14
  }
15
- function Ri(o) {
15
+ function Pi(o) {
16
16
  return o.ok;
17
17
  }
18
- function Mi(o) {
18
+ function Ri(o) {
19
19
  return !o.ok;
20
20
  }
21
+ function Mi(o, e) {
22
+ return o.ok ? zt(e(o.value)) : o;
23
+ }
21
24
  function Oi(o, e) {
22
- return o.ok ? Vt(e(o.value)) : o;
25
+ return o.ok ? o : Vt(e(o.error));
23
26
  }
24
27
  function Ni(o, e) {
25
- return o.ok ? o : Ht(e(o.error));
26
- }
27
- function Ai(o, e) {
28
28
  return o.ok ? e(o.value) : o;
29
29
  }
30
- function Bi(o, e) {
30
+ function Ai(o, e) {
31
31
  return o.ok ? o.value : e;
32
32
  }
33
33
  function Di(o, e) {
34
34
  return o.ok ? o.value : e(o.error);
35
35
  }
36
- function _i(o, e) {
36
+ function Bi(o, e) {
37
37
  return o.ok ? e.ok(o.value) : e.err(o.error);
38
38
  }
39
39
  const C = {
@@ -56,14 +56,14 @@ const C = {
56
56
  return { kind: "UnsupportedOp", operation: o, reason: e };
57
57
  }
58
58
  };
59
- function Kt(o) {
59
+ function Ht(o) {
60
60
  return Object.freeze([...o]);
61
61
  }
62
- const Wt = {
62
+ const Kt = {
63
63
  of(o, e, t) {
64
64
  return {
65
65
  document: o,
66
- triggeredEvents: Kt(e),
66
+ triggeredEvents: Ht(e),
67
67
  totalGas: t,
68
68
  capabilityFailure: !1,
69
69
  failureReason: null
@@ -78,75 +78,75 @@ const Wt = {
78
78
  failureReason: e ?? null
79
79
  };
80
80
  }
81
- }, Xe = Wt, S = we("core"), b = we("conversation"), q = we("myos");
81
+ }, Ze = Kt, S = we("core"), b = we("conversation"), q = we("myos");
82
82
  function we(o) {
83
- const e = Ze.packages[o];
83
+ const e = Ye.packages[o];
84
84
  if (!e)
85
85
  throw new Error(`Missing Blue repository package ${o}.`);
86
86
  return e.aliases;
87
87
  }
88
- const qt = [
88
+ const Wt = [
89
89
  "embedded",
90
90
  "initialized",
91
91
  "terminated",
92
92
  "checkpoint"
93
- ], Gt = [
93
+ ], qt = [
94
94
  S["Core/Document Update Channel"],
95
95
  S["Core/Triggered Event Channel"],
96
96
  S["Core/Lifecycle Event Channel"],
97
97
  S["Core/Embedded Node Channel"]
98
- ], et = "embedded", tt = "initialized", nt = "terminated", D = "checkpoint", be = new Set(
99
- qt
100
- ), Ie = new Set(Gt);
101
- function jt(o) {
98
+ ], Xe = "embedded", et = "initialized", tt = "terminated", B = "checkpoint", be = new Set(
99
+ Wt
100
+ ), Ie = new Set(qt);
101
+ function Gt(o) {
102
102
  return o != null && be.has(o);
103
103
  }
104
- function rt(o) {
104
+ function nt(o) {
105
105
  return o != null && Ie.has(
106
106
  o
107
107
  );
108
108
  }
109
- const Li = {
110
- KEY_EMBEDDED: et,
111
- KEY_INITIALIZED: tt,
112
- KEY_TERMINATED: nt,
113
- KEY_CHECKPOINT: D,
109
+ const _i = {
110
+ KEY_EMBEDDED: Xe,
111
+ KEY_INITIALIZED: et,
112
+ KEY_TERMINATED: tt,
113
+ KEY_CHECKPOINT: B,
114
114
  RESERVED_CONTRACT_KEYS: be,
115
115
  PROCESSOR_MANAGED_CHANNEL_BLUE_IDS: Ie,
116
- isReservedContractKey: jt,
117
- isProcessorManagedChannelBlueId: rt
118
- }, G = "/contracts", Ee = `${G}/${tt}`, ot = `${G}/${nt}`, Jt = `${G}/${et}`, it = `${G}/${D}`, st = "/lastEvents", at = "/lastSignatures";
116
+ isReservedContractKey: Gt,
117
+ isProcessorManagedChannelBlueId: nt
118
+ }, G = "/contracts", Ee = `${G}/${et}`, rt = `${G}/${tt}`, jt = `${G}/${Xe}`, ot = `${G}/${B}`, it = "/lastEvents", st = "/lastSignatures";
119
119
  function ae(o) {
120
120
  return `${G}/${o}`;
121
121
  }
122
+ function at(o, e) {
123
+ return `${ae(o)}${it}/${e}`;
124
+ }
122
125
  function ct(o, e) {
123
126
  return `${ae(o)}${st}/${e}`;
124
127
  }
125
- function lt(o, e) {
126
- return `${ae(o)}${at}/${e}`;
127
- }
128
- const xi = {
128
+ const Li = {
129
129
  RELATIVE_CONTRACTS: G,
130
130
  RELATIVE_INITIALIZED: Ee,
131
- RELATIVE_TERMINATED: ot,
132
- RELATIVE_EMBEDDED: Jt,
133
- RELATIVE_CHECKPOINT: it,
134
- LAST_EVENTS_SUFFIX: st,
135
- LAST_SIGNATURES_SUFFIX: at,
131
+ RELATIVE_TERMINATED: rt,
132
+ RELATIVE_EMBEDDED: jt,
133
+ RELATIVE_CHECKPOINT: ot,
134
+ LAST_EVENTS_SUFFIX: it,
135
+ LAST_SIGNATURES_SUFFIX: st,
136
136
  relativeContractsEntry: ae,
137
- relativeCheckpointLastEvent: ct,
138
- relativeCheckpointLastSignature: lt
137
+ relativeCheckpointLastEvent: at,
138
+ relativeCheckpointLastSignature: ct
139
139
  };
140
- function ut(o) {
140
+ function lt(o) {
141
141
  return o == null || o.length === 0;
142
142
  }
143
143
  function w(o) {
144
- return ut(o) ? "/" : o.startsWith("/") ? o : `/${o}`;
144
+ return lt(o) ? "/" : o.startsWith("/") ? o : `/${o}`;
145
145
  }
146
146
  function R(o) {
147
- return ut(o) ? "/" : o.startsWith("/") ? o : `/${o}`;
147
+ return lt(o) ? "/" : o.startsWith("/") ? o : `/${o}`;
148
148
  }
149
- function Be(o) {
149
+ function De(o) {
150
150
  if (o == null)
151
151
  return "";
152
152
  let e = o.trim();
@@ -158,15 +158,15 @@ function Be(o) {
158
158
  e = e.substring(0, e.length - 1);
159
159
  return e;
160
160
  }
161
- function Fi(o, e) {
162
- const t = Be(o), n = Be(e);
161
+ function xi(o, e) {
162
+ const t = De(o), n = De(e);
163
163
  return t.length === 0 && n.length === 0 ? "/" : t.length === 0 ? `/${n}` : n.length === 0 ? `/${t}` : `/${t}/${n}`;
164
164
  }
165
165
  function k(o, e) {
166
166
  const t = w(o), n = R(e);
167
167
  return t === "/" ? n : n === "/" || n.length === 1 ? t : `${t}${n}`;
168
168
  }
169
- function Qt(o, e) {
169
+ function Jt(o, e) {
170
170
  const t = w(o), n = R(e);
171
171
  if (t === "/" || !n.startsWith(t))
172
172
  return n;
@@ -175,12 +175,12 @@ function Qt(o, e) {
175
175
  const r = n.substring(t.length);
176
176
  return r.length === 0 ? "/" : r.startsWith("/") ? r : `/${r}`;
177
177
  }
178
- function Yt(o) {
178
+ function Qt(o) {
179
179
  return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
180
180
  }
181
- var he, De;
182
- function Zt() {
183
- return De || (De = 1, he = function o(e) {
181
+ var he, Be;
182
+ function Yt() {
183
+ return Be || (Be = 1, he = function o(e) {
184
184
  if (typeof e == "number" && isNaN(e))
185
185
  throw new Error("NaN is not allowed");
186
186
  if (typeof e == "number" && !isFinite(e))
@@ -193,26 +193,26 @@ function Zt() {
193
193
  }, "")}}`;
194
194
  }), he;
195
195
  }
196
- var Xt = Zt();
197
- const en = /* @__PURE__ */ Yt(Xt);
198
- function tn(o, e) {
196
+ var Zt = Yt();
197
+ const Xt = /* @__PURE__ */ Qt(Zt);
198
+ function en(o, e) {
199
199
  return o.nodeToJson(e, "official");
200
200
  }
201
- function nn(o, e) {
202
- const t = tn(o, e);
203
- return en(t);
201
+ function tn(o, e) {
202
+ const t = en(o, e);
203
+ return Xt(t);
204
204
  }
205
- function ht(o, e) {
206
- return e ? nn(o, e) : null;
205
+ function ut(o, e) {
206
+ return e ? tn(o, e) : null;
207
207
  }
208
208
  function _e(o, e) {
209
- const t = ht(o, e);
209
+ const t = ut(o, e);
210
210
  return t == null ? 0 : new TextEncoder().encode(t).length;
211
211
  }
212
- const rn = 1700, ye = BigInt(
213
- rn
214
- ), on = BigInt(Number.MAX_SAFE_INTEGER), sn = 4e4, an = 4e4;
215
- function cn(o) {
212
+ const nn = 1700, ye = BigInt(
213
+ nn
214
+ ), rn = BigInt(Number.MAX_SAFE_INTEGER), on = 4e4, sn = 4e4;
215
+ function an(o) {
216
216
  let e;
217
217
  if (typeof o == "bigint")
218
218
  e = o;
@@ -224,17 +224,17 @@ function cn(o) {
224
224
  if (e <= 0n)
225
225
  return 0;
226
226
  const t = (e + ye - 1n) / ye;
227
- return t > on ? Number.MAX_SAFE_INTEGER : Number(t);
227
+ return t > rn ? Number.MAX_SAFE_INTEGER : Number(t);
228
228
  }
229
- function dt(o) {
229
+ function ht(o) {
230
230
  const e = BigInt(Math.max(0, Math.trunc(o)));
231
231
  return e <= 0n ? 0n : e * ye;
232
232
  }
233
- const pt = dt(
233
+ const dt = ht(
234
+ on
235
+ ), cn = ht(
234
236
  sn
235
- ), ln = dt(
236
- an
237
- ), B = 1, un = /* @__PURE__ */ new Set([
237
+ ), D = 1, ln = /* @__PURE__ */ new Set([
238
238
  "event",
239
239
  "eventCanonical",
240
240
  "steps",
@@ -247,9 +247,9 @@ class ke {
247
247
  // Serialize evaluations to avoid races when updating host handler bindings.
248
248
  evaluationQueue = Promise.resolve();
249
249
  handlerState = {
250
- documentGet: () => ({ ok: null, units: B }),
251
- documentGetCanonical: () => ({ ok: null, units: B }),
252
- emit: () => ({ ok: null, units: B })
250
+ documentGet: () => ({ ok: null, units: D }),
251
+ documentGetCanonical: () => ({ ok: null, units: D }),
252
+ emit: () => ({ ok: null, units: D })
253
253
  };
254
254
  handlers = {
255
255
  document: {
@@ -273,33 +273,33 @@ class ke {
273
273
  wasmGasLimit: n,
274
274
  onWasmGasUsed: r
275
275
  }) {
276
- const i = this.prepareBindings(t), s = n ?? pt, a = {
276
+ const i = this.prepareBindings(t), s = n ?? dt, a = {
277
277
  code: this.wrapCode(e),
278
278
  abiId: "Host.v1",
279
279
  abiVersion: 1,
280
- abiManifestHash: Ut
280
+ abiManifestHash: $t
281
281
  };
282
282
  try {
283
- const c = await Lt({
283
+ const c = await _t({
284
284
  program: a,
285
285
  input: i,
286
286
  gasLimit: s,
287
- manifest: $t,
287
+ manifest: Ft,
288
288
  handlers: this.handlers
289
289
  });
290
290
  if (n !== void 0 && r && r({
291
291
  used: c.gasUsed,
292
292
  remaining: c.gasRemaining
293
293
  }), !c.ok)
294
- throw pn(c);
294
+ throw dn(c);
295
295
  return ne(c.value);
296
296
  } catch (c) {
297
- throw fn(c);
297
+ throw pn(c);
298
298
  }
299
299
  }
300
300
  prepareBindings(e) {
301
301
  const t = e ?? {};
302
- hn(t);
302
+ un(t);
303
303
  const n = j(t.event, null, "event"), r = j(
304
304
  t.eventCanonical ?? n,
305
305
  n,
@@ -323,7 +323,7 @@ class ke {
323
323
  h ?? u
324
324
  );
325
325
  const d = this.extractEmitBinding(t);
326
- return this.handlerState.emit = dn(d), c;
326
+ return this.handlerState.emit = hn(d), c;
327
327
  }
328
328
  extractDocumentBinding(e) {
329
329
  if (!Object.prototype.hasOwnProperty.call(e, "document"))
@@ -353,15 +353,15 @@ ${e}
353
353
  })()`;
354
354
  }
355
355
  }
356
- function hn(o) {
356
+ function un(o) {
357
357
  for (const e of Object.keys(o))
358
- if (!un.has(e))
358
+ if (!ln.has(e))
359
359
  throw new TypeError(`Unsupported QuickJS binding: "${e}"`);
360
360
  }
361
361
  function j(o, e, t) {
362
362
  const n = o === void 0 ? e : o;
363
363
  try {
364
- xt(n, { limits: Ft });
364
+ Lt(n, { limits: xt });
365
365
  } catch (r) {
366
366
  const i = r instanceof Error ? r.message : String(r);
367
367
  throw new TypeError(
@@ -376,29 +376,29 @@ function Le(o) {
376
376
  const t = o(e);
377
377
  return {
378
378
  ok: t === void 0 ? null : t,
379
- units: B
379
+ units: D
380
380
  };
381
381
  } catch {
382
382
  return {
383
383
  err: { code: "INVALID_PATH", tag: "host/invalid_path" },
384
- units: B
384
+ units: D
385
385
  };
386
386
  }
387
- } : () => ({ ok: null, units: B });
387
+ } : () => ({ ok: null, units: D });
388
388
  }
389
- function dn(o) {
389
+ function hn(o) {
390
390
  return o ? (e) => {
391
391
  try {
392
392
  if (o(ne(e)) instanceof Promise)
393
393
  throw new Error("Async emit handlers are not supported");
394
- return { ok: null, units: B };
394
+ return { ok: null, units: D };
395
395
  } catch {
396
396
  return {
397
397
  err: { code: "LIMIT_EXCEEDED", tag: "host/limit" },
398
- units: B
398
+ units: D
399
399
  };
400
400
  }
401
- } : () => ({ ok: null, units: B });
401
+ } : () => ({ ok: null, units: D });
402
402
  }
403
403
  function ne(o) {
404
404
  if (o == null)
@@ -416,7 +416,7 @@ function ne(o) {
416
416
  }
417
417
  return o;
418
418
  }
419
- function pn(o) {
419
+ function dn(o) {
420
420
  if (o.ok)
421
421
  return new Error("Unexpected evaluation result");
422
422
  if (o.type === "invalid-output") {
@@ -433,34 +433,34 @@ function pn(o) {
433
433
  const t = e.message || o.message, n = new Error(t);
434
434
  return e.kind === "js-exception" ? (n.name = e.name || "Error", n) : e.kind === "host-error" ? (n.name = "HostError", n) : e.kind === "manifest-error" ? (n.name = "ManifestError", n) : (e.kind === "unknown" && e.name && (n.name = e.name), n);
435
435
  }
436
- function fn(o) {
436
+ function pn(o) {
437
437
  return o instanceof Error ? o : new Error(String(o ?? "Unknown error"));
438
438
  }
439
439
  const xe = 120;
440
- function mn(o) {
440
+ function fn(o) {
441
441
  return o.length <= xe ? o : `${o.slice(0, xe - 3)}...`;
442
442
  }
443
- class ft extends Error {
443
+ class pt extends Error {
444
444
  constructor(e, t) {
445
- super(`Failed to evaluate code block: ${mn(e)}`, { cause: t }), this.code = e, this.cause = t, this.name = "CodeBlockEvaluationError";
445
+ super(`Failed to evaluate code block: ${fn(e)}`, { cause: t }), this.code = e, this.cause = t, this.name = "CodeBlockEvaluationError";
446
446
  }
447
447
  }
448
- const mt = /^\$\{([\s\S]*)\}$/, gn = /\$\{([\s\S]+?)\}/, En = /\$\{([\s\S]+?)\}/g;
448
+ const ft = /^\$\{([\s\S]*)\}$/, mn = /\$\{([\s\S]+?)\}/, gn = /\$\{([\s\S]+?)\}/g;
449
449
  function re(o) {
450
- if (typeof o != "string" || !mt.test(o))
450
+ if (typeof o != "string" || !ft.test(o))
451
451
  return !1;
452
452
  const e = o.indexOf("${"), t = o.lastIndexOf("${");
453
453
  return e === t;
454
454
  }
455
- function yn(o) {
456
- return typeof o != "string" ? !1 : mt.test(o) ? !0 : gn.test(o);
455
+ function En(o) {
456
+ return typeof o != "string" ? !1 : ft.test(o) ? !0 : mn.test(o);
457
457
  }
458
- function Cn(o) {
458
+ function yn(o) {
459
459
  if (!re(o))
460
460
  throw new Error(`Invalid expression: ${o}`);
461
461
  return o.slice(2, -1);
462
462
  }
463
- async function gt(o, e, t, n, r) {
463
+ async function mt(o, e, t, n, r) {
464
464
  const i = `return (${e});`;
465
465
  try {
466
466
  return await o.evaluate({
@@ -470,15 +470,15 @@ async function gt(o, e, t, n, r) {
470
470
  onWasmGasUsed: r
471
471
  });
472
472
  } catch (s) {
473
- throw new ft(e, s);
473
+ throw new pt(e, s);
474
474
  }
475
475
  }
476
- async function Sn(o, e, t, n, r) {
476
+ async function Cn(o, e, t, n, r) {
477
477
  let i = "", s = 0;
478
- for (const a of e.matchAll(En)) {
478
+ for (const a of e.matchAll(gn)) {
479
479
  const c = a[0], u = a[1], h = a.index ?? 0;
480
480
  i += e.slice(s, h);
481
- const d = await gt(
481
+ const d = await mt(
482
482
  o,
483
483
  u,
484
484
  t,
@@ -489,7 +489,7 @@ async function Sn(o, e, t, n, r) {
489
489
  }
490
490
  return i += e.slice(s), i;
491
491
  }
492
- function Et({
492
+ function gt({
493
493
  include: o,
494
494
  exclude: e = [],
495
495
  options: t
@@ -510,7 +510,7 @@ async function oe(o) {
510
510
  shouldDescend: i = () => !0,
511
511
  context: s,
512
512
  pointer: a = "/"
513
- } = o, c = ln, u = ({
513
+ } = o, c = cn, u = ({
514
514
  used: g
515
515
  }) => {
516
516
  s.gasMeter().chargeWasmGas(g);
@@ -521,7 +521,7 @@ async function oe(o) {
521
521
  if (d !== void 0) {
522
522
  if (typeof d == "string" && r(a)) {
523
523
  if (re(d)) {
524
- const g = Cn(d), y = await gt(
524
+ const g = yn(d), y = await mt(
525
525
  e,
526
526
  g,
527
527
  n,
@@ -529,8 +529,8 @@ async function oe(o) {
529
529
  u
530
530
  );
531
531
  return s.blue.jsonValueToNode(y ?? null);
532
- } else if (yn(d)) {
533
- const g = await Sn(
532
+ } else if (En(d)) {
533
+ const g = await Cn(
534
534
  e,
535
535
  d,
536
536
  n,
@@ -597,20 +597,20 @@ const P = {
597
597
  ).extend({
598
598
  path: l.string().optional(),
599
599
  definition: I().optional()
600
- }), yt = m(P["Core/Handler"])(ce.extend({
600
+ }), Et = m(P["Core/Handler"])(ce.extend({
601
601
  channel: l.string().optional(),
602
602
  description: l.string().optional(),
603
603
  event: I().optional(),
604
604
  name: l.string().optional()
605
- })), Ct = yt.merge(Te), z = m(P["Core/Marker"])(ce.extend({
605
+ })), yt = Et.merge(Te), z = m(P["Core/Marker"])(ce.extend({
606
606
  description: l.string().optional(),
607
607
  name: l.string().optional()
608
- })), M = z.merge(Te), vn = l.object({
608
+ })), M = z.merge(Te), Sn = l.object({
609
609
  op: l.enum(["ADD", "REPLACE", "REMOVE"]),
610
610
  path: l.string(),
611
611
  val: I().optional()
612
- }), $i = m("JsonPatch")(
613
- vn
612
+ }), Fi = m("JsonPatch")(
613
+ Sn
614
614
  ).superRefine((o, e) => {
615
615
  o.op === "REMOVE" && o.val !== void 0 && e.addIssue({
616
616
  code: l.ZodIssueCode.custom,
@@ -621,27 +621,27 @@ const P = {
621
621
  message: `${o.op} operations must include a value`,
622
622
  path: ["val"]
623
623
  });
624
- }), wn = m(P["Core/Document Update Channel"])($.extend({
624
+ }), vn = m(P["Core/Document Update Channel"])($.extend({
625
625
  description: l.string().optional(),
626
626
  name: l.string().optional(),
627
627
  path: l.string().optional()
628
- })), bn = wn.merge(
628
+ })), wn = vn.merge(
629
629
  U
630
- ), In = m(P["Core/Embedded Node Channel"])($.extend({
630
+ ), bn = m(P["Core/Embedded Node Channel"])($.extend({
631
631
  childPath: l.string().optional(),
632
632
  description: l.string().optional(),
633
633
  name: l.string().optional()
634
- })), kn = In.merge(
634
+ })), In = bn.merge(
635
635
  U
636
- ), Tn = m(P["Core/Lifecycle Event Channel"])($.extend({
636
+ ), kn = m(P["Core/Lifecycle Event Channel"])($.extend({
637
637
  description: l.string().optional(),
638
638
  name: l.string().optional()
639
- })), Pn = Tn.merge(
639
+ })), Tn = kn.merge(
640
640
  U
641
- ), Rn = m(P["Core/Triggered Event Channel"])($.extend({
641
+ ), Pn = m(P["Core/Triggered Event Channel"])($.extend({
642
642
  description: l.string().optional(),
643
643
  name: l.string().optional()
644
- })), Mn = Rn.merge(U), T = {
644
+ })), Rn = Pn.merge(U), T = {
645
645
  "Conversation/Actor": "CN5efWVizJbRsMCw8YWRfT2q9vM9XfeGDN9wFvYcvMnQ",
646
646
  "Conversation/Actor Policy": "EeWqP1Tw9WXo5nq8kx93FuTw9HRqpv34mbWFjH72nR7o",
647
647
  "Conversation/Composite Timeline Channel": "HsNatiPt2YvmkWQoqtfrFCbdp75ZUBLBUkWeq84WTfnr",
@@ -656,11 +656,11 @@ const P = {
656
656
  "Conversation/Timeline Entry": "29tcU8MkrV3KL5HqH6DHJDPPfJMheoqwiKJsaHnrp9hT",
657
657
  "Conversation/Trigger Event": "2bSWEoMSZwzf32Hnr4BDVsuq8NRjrWEpnhZvMZAJGhh2",
658
658
  "Conversation/Update Document": "FtHZJzH4hqAoGxFBjsmy1svfT4BwEBB4aHpFSZycZLLa"
659
- }, St = m(T["Conversation/Timeline Channel"])($.extend({
659
+ }, Ct = m(T["Conversation/Timeline Channel"])($.extend({
660
660
  description: l.string().optional(),
661
661
  name: l.string().optional(),
662
662
  timelineId: l.string().optional()
663
- })), On = St.merge(
663
+ })), Mn = Ct.merge(
664
664
  U
665
665
  ), A = {
666
666
  "MyOS/Document Anchor": "HS9yo34TGEAM2LGcNbLh7XPN4goPRhqdGZQkiyh473Wb",
@@ -673,16 +673,16 @@ const P = {
673
673
  "MyOS/MyOS Timeline Channel": "HCF8mXnX3dFjQ8osjxb4Wzm2Nm1DoXnTYuA5sPnV7NTs",
674
674
  "MyOS/MyOS Timeline Entry": "F3mQaGQ1B48yMedKZojFTxeKxtee4xU66QBbiyEMvGeZ",
675
675
  "MyOS/MyOS Worker Agency": "4Lix4AKXvBDvrwxw2htSdYFKxL4wugEQzqoSEYet5Dh1"
676
- }, Nn = m(A["MyOS/MyOS Timeline Channel"])(St.extend({
676
+ }, On = m(A["MyOS/MyOS Timeline Channel"])(Ct.extend({
677
677
  accountId: l.string().optional(),
678
678
  description: l.string().optional(),
679
679
  email: l.string().optional(),
680
680
  name: l.string().optional()
681
- })), An = Nn.merge(U), Bn = m(T["Conversation/Composite Timeline Channel"])($.extend({
681
+ })), Nn = On.merge(U), An = m(T["Conversation/Composite Timeline Channel"])($.extend({
682
682
  channels: l.array(l.string()).optional(),
683
683
  description: l.string().optional(),
684
684
  name: l.string().optional()
685
- })), vt = Bn.merge(U), Dn = m(T["Conversation/Actor Policy"])(z.extend({
685
+ })), St = An.merge(U), Dn = m(T["Conversation/Actor Policy"])(z.extend({
686
686
  description: l.string().optional(),
687
687
  name: l.string().optional(),
688
688
  operations: l.record(l.string(), l.object({
@@ -690,25 +690,25 @@ const P = {
690
690
  requiresActor: l.string().optional(),
691
691
  requiresSource: l.string().optional()
692
692
  })).optional()
693
- })), wt = ["principal", "agent", "any"], bt = [
693
+ })), vt = ["principal", "agent", "any"], wt = [
694
694
  "browserSession",
695
695
  "apiCall",
696
696
  "documentRequest"
697
- ], _n = l.enum(wt), Fe = l.enum(bt), Ln = l.object({
697
+ ], Bn = l.enum(vt), Fe = l.enum(wt), _n = l.object({
698
698
  excludeSource: Fe.optional(),
699
- requiresActor: _n.optional(),
699
+ requiresActor: Bn.optional(),
700
700
  requiresSource: Fe.optional()
701
- }), It = Dn.merge(
701
+ }), bt = Dn.merge(
702
702
  M
703
703
  ).extend({
704
- operations: l.record(l.string(), Ln).optional()
705
- }), xn = new Set(wt), $e = new Set(bt);
706
- class kt extends Error {
704
+ operations: l.record(l.string(), _n).optional()
705
+ }), Ln = new Set(vt), $e = new Set(wt);
706
+ class It extends Error {
707
707
  constructor(e) {
708
708
  super(e), this.name = "ActorPolicyLiteralValidationError";
709
709
  }
710
710
  }
711
- function Fn(o) {
711
+ function xn(o) {
712
712
  const e = o.getProperties()?.operations;
713
713
  if (!(e instanceof p))
714
714
  return;
@@ -722,7 +722,7 @@ function Fn(o) {
722
722
  n,
723
723
  "requiresActor",
724
724
  i.requiresActor,
725
- xn
725
+ Ln
726
726
  ), de(
727
727
  n,
728
728
  "requiresSource",
@@ -741,77 +741,77 @@ function de(o, e, t, n) {
741
741
  return;
742
742
  const r = t.getValue();
743
743
  if (r != null && (typeof r != "string" || !n.has(r)))
744
- throw new kt(
744
+ throw new It(
745
745
  `Actor Policy operation '${o}' declares unsupported ${e} '${String(
746
746
  r
747
747
  )}'`
748
748
  );
749
749
  }
750
- const $n = m(P["Core/Channel Event Checkpoint"])(z.extend({
750
+ const Fn = m(P["Core/Channel Event Checkpoint"])(z.extend({
751
751
  description: l.string().optional(),
752
752
  lastEvents: l.record(l.string(), I()).optional(),
753
753
  name: l.string().optional()
754
- })), Un = $n.merge(M).extend({
754
+ })), $n = Fn.merge(M).extend({
755
755
  lastSignatures: l.record(l.string()).optional()
756
- }), zn = m(P["Core/Processing Initialized Marker"])(z.extend({
756
+ }), Un = m(P["Core/Processing Initialized Marker"])(z.extend({
757
757
  description: l.string().optional(),
758
758
  documentId: l.string().optional(),
759
759
  name: l.string().optional()
760
- })), Vn = zn.merge(M), Hn = m(P["Core/Process Embedded"])(z.extend({
760
+ })), zn = Un.merge(M), Vn = m(P["Core/Process Embedded"])(z.extend({
761
761
  description: l.string().optional(),
762
762
  name: l.string().optional(),
763
763
  paths: l.array(l.string()).optional()
764
- })), Kn = Hn.merge(
764
+ })), Hn = Vn.merge(
765
765
  M
766
- ), Wn = m(P["Core/Processing Terminated Marker"])(z.extend({
766
+ ), Kn = m(P["Core/Processing Terminated Marker"])(z.extend({
767
767
  cause: l.string().optional(),
768
768
  description: l.string().optional(),
769
769
  name: l.string().optional(),
770
770
  reason: l.string().optional()
771
- })), qn = Wn.merge(M), Z = m(T["Conversation/Operation"])(z.extend({
771
+ })), Wn = Kn.merge(M), Z = m(T["Conversation/Operation"])(z.extend({
772
772
  channel: l.string().optional(),
773
773
  description: l.string().optional(),
774
774
  name: l.string().optional(),
775
775
  request: I().optional()
776
- })), Gn = Z.merge(
776
+ })), qn = Z.merge(
777
777
  M
778
- ), jn = m(A["MyOS/Document Anchor"])(l.object({
778
+ ), Gn = m(A["MyOS/Document Anchor"])(l.object({
779
779
  description: l.string().optional(),
780
780
  name: l.string().optional(),
781
781
  template: I().optional()
782
- })), Jn = m(A["MyOS/Document Anchors"])(l.object({}).catchall(jn)), Qn = Jn.merge(M), Yn = m(A["MyOS/Link"])(l.object({
782
+ })), jn = m(A["MyOS/Document Anchors"])(l.object({}).catchall(Gn)), Jn = jn.merge(M), Qn = m(A["MyOS/Link"])(l.object({
783
783
  anchor: l.string().optional(),
784
784
  description: l.string().optional(),
785
785
  name: l.string().optional()
786
- })), Zn = m(A["MyOS/Document Links"])(l.object({}).catchall(Yn)), Xn = Zn.merge(
786
+ })), Yn = m(A["MyOS/Document Links"])(l.object({}).catchall(Qn)), Zn = Yn.merge(
787
787
  M
788
- ), er = m(A["MyOS/MyOS Participants Orchestration"])(l.object({
788
+ ), Xn = m(A["MyOS/MyOS Participants Orchestration"])(l.object({
789
789
  name: l.string().optional()
790
- })), tr = er.merge(M), nr = m(A["MyOS/MyOS Session Interaction"])(l.object({
790
+ })), er = Xn.merge(M), tr = m(A["MyOS/MyOS Session Interaction"])(l.object({
791
791
  name: l.string().optional()
792
- })), rr = nr.merge(M), or = m(A["MyOS/MyOS Worker Agency"])(l.object({
792
+ })), nr = tr.merge(M), rr = m(A["MyOS/MyOS Worker Agency"])(l.object({
793
793
  name: l.string().optional()
794
- })), ir = or.merge(
794
+ })), or = rr.merge(
795
795
  M
796
796
  ), le = m(T["Conversation/Sequential Workflow Step"])(l.object({
797
797
  description: l.string().optional(),
798
798
  name: l.string().optional()
799
- })), Tt = m(T["Conversation/Sequential Workflow"])(yt.extend({
799
+ })), kt = m(T["Conversation/Sequential Workflow"])(Et.extend({
800
800
  description: l.string().optional(),
801
801
  name: l.string().optional(),
802
802
  steps: l.array(le).optional()
803
- })), Ui = I(), sr = Tt.merge(Ct).extend({
803
+ })), $i = I(), ir = kt.merge(yt).extend({
804
804
  steps: l.array(I()).optional()
805
- }), ar = m(T["Conversation/Sequential Workflow Operation"])(Tt.extend({
805
+ }), sr = m(T["Conversation/Sequential Workflow Operation"])(kt.extend({
806
806
  description: l.string().optional(),
807
807
  name: l.string().optional(),
808
808
  operation: l.string().optional()
809
- })), cr = ar.merge(
810
- Ct
809
+ })), ar = sr.merge(
810
+ yt
811
811
  ).extend({
812
812
  steps: l.array(I()).optional()
813
813
  });
814
- function lr(o) {
814
+ function cr(o) {
815
815
  if (!Array.isArray(o.blueIds) || o.blueIds.length === 0)
816
816
  throw new Error("Contract processors must declare at least one BlueId");
817
817
  for (const e of o.blueIds)
@@ -819,11 +819,11 @@ function lr(o) {
819
819
  throw new Error("Contract processor BlueIds must be non-empty strings");
820
820
  }
821
821
  function X(o, e) {
822
- lr(o);
822
+ cr(o);
823
823
  for (const t of o.blueIds)
824
824
  e.set(t, o);
825
825
  }
826
- class ur {
826
+ class lr {
827
827
  processorsByBlueId = /* @__PURE__ */ new Map();
828
828
  handlerProcessors = /* @__PURE__ */ new Map();
829
829
  channelProcessors = /* @__PURE__ */ new Map();
@@ -923,26 +923,26 @@ class ur {
923
923
  return { blueId: s.blueId, value: s.value };
924
924
  }
925
925
  }
926
- class hr {
926
+ class ur {
927
927
  kind = "marker";
928
928
  blueIds = [
929
929
  b["Conversation/Actor Policy"]
930
930
  ];
931
- schema = It;
931
+ schema = bt;
932
932
  }
933
- const dr = "compositeSourceChannelKey";
934
- function pr(o, e) {
933
+ const hr = "compositeSourceChannelKey";
934
+ function dr(o, e) {
935
935
  return `${o}::${e}`;
936
936
  }
937
- function fr(o) {
937
+ function pr(o) {
938
938
  return o != null && Object.prototype.hasOwnProperty.call(o, "lastEvents") && Object.prototype.hasOwnProperty.call(o, "lastSignatures");
939
939
  }
940
- class mr {
940
+ class fr {
941
941
  kind = "channel";
942
942
  blueIds = [
943
943
  b["Conversation/Composite Timeline Channel"]
944
944
  ];
945
- schema = vt;
945
+ schema = St;
946
946
  /**
947
947
  * Fallback match hook that delegates to {@link evaluate} for consistent behavior.
948
948
  */
@@ -986,10 +986,10 @@ class mr {
986
986
  continue;
987
987
  const _ = d.channelize, Me = (_ ? _.call(d, g, f) : void 0) ?? v.clone();
988
988
  this.enrichEvent(Me, u);
989
- const Oe = pr(
989
+ const Oe = dr(
990
990
  t.bindingKey,
991
991
  u
992
- ), _t = await this.shouldProcessChild({
992
+ ), Bt = await this.shouldProcessChild({
993
993
  childProcessor: d,
994
994
  childContract: g,
995
995
  context: {
@@ -1003,7 +1003,7 @@ class mr {
1003
1003
  eventNode: Me,
1004
1004
  eventId: a,
1005
1005
  checkpointKey: Oe,
1006
- shouldProcess: _t
1006
+ shouldProcess: Bt
1007
1007
  });
1008
1008
  }
1009
1009
  return {
@@ -1025,7 +1025,7 @@ class mr {
1025
1025
  const n = e.getProperties() ?? {}, r = n.meta instanceof p ? n.meta.clone() : new p(), i = r.getProperties() ?? {};
1026
1026
  r.setProperties({
1027
1027
  ...i,
1028
- [dr]: new p().setValue(t)
1028
+ [hr]: new p().setValue(t)
1029
1029
  }), e.setProperties({ ...n, meta: r });
1030
1030
  }
1031
1031
  /**
@@ -1047,39 +1047,39 @@ class mr {
1047
1047
  * Resolve the checkpoint marker for the current scope, if present.
1048
1048
  */
1049
1049
  resolveCheckpoint(e) {
1050
- const t = e.get(D);
1051
- return fr(t) ? t : null;
1050
+ const t = e.get(B);
1051
+ return pr(t) ? t : null;
1052
1052
  }
1053
1053
  }
1054
- const gr = m(T["Conversation/Actor"])(l.object({
1054
+ const mr = m(T["Conversation/Actor"])(l.object({
1055
1055
  description: l.string().optional(),
1056
1056
  name: l.string().optional()
1057
- })), Pt = m(T["Conversation/Timeline"])(l.object({
1057
+ })), Tt = m(T["Conversation/Timeline"])(l.object({
1058
1058
  description: l.string().optional(),
1059
1059
  name: l.string().optional(),
1060
1060
  timelineId: l.string().optional()
1061
1061
  })), N = m(T["Conversation/Timeline Entry"])(l.object({
1062
- actor: gr.optional(),
1062
+ actor: mr.optional(),
1063
1063
  description: l.string().optional(),
1064
1064
  message: I().optional(),
1065
1065
  name: l.string().optional(),
1066
1066
  prevEntry: I().optional(),
1067
1067
  source: I().optional(),
1068
- timeline: Pt.optional(),
1068
+ timeline: Tt.optional(),
1069
1069
  timestamp: l.number().optional()
1070
- })), Er = m(A["MyOS/MyOS Timeline"])(Pt.extend({
1070
+ })), gr = m(A["MyOS/MyOS Timeline"])(Tt.extend({
1071
1071
  accountId: l.string().optional(),
1072
1072
  description: l.string().optional(),
1073
1073
  name: l.string().optional()
1074
1074
  })), Ue = m(A["MyOS/MyOS Timeline Entry"])(N.extend({
1075
1075
  description: l.string().optional(),
1076
1076
  name: l.string().optional(),
1077
- timeline: Er.optional()
1077
+ timeline: gr.optional()
1078
1078
  }));
1079
1079
  function ze(o, e) {
1080
1080
  return e && o.isTypeOf(e, N, { checkSchemaExtensions: !0 }) ? o.nodeToSchemaOutput(e, N) : null;
1081
1081
  }
1082
- function Rt(o, e, t) {
1082
+ function Pt(o, e, t) {
1083
1083
  const n = ze(o, e), r = ze(o, t);
1084
1084
  if (!n || !r)
1085
1085
  return !0;
@@ -1089,10 +1089,10 @@ function Rt(o, e, t) {
1089
1089
  function Ve(o, e) {
1090
1090
  return o.isTypeOf(e, Ue) ? o.nodeToSchemaOutput(e, Ue) : o.isTypeOf(e, N) ? o.nodeToSchemaOutput(e, N) : null;
1091
1091
  }
1092
- class yr {
1092
+ class Er {
1093
1093
  kind = "channel";
1094
1094
  blueIds = [q["MyOS/MyOS Timeline Channel"]];
1095
- schema = An;
1095
+ schema = Nn;
1096
1096
  matches(e, t) {
1097
1097
  const { event: n, blue: r } = t;
1098
1098
  if (!n)
@@ -1109,13 +1109,13 @@ class yr {
1109
1109
  }
1110
1110
  isNewerEvent(e, t, n) {
1111
1111
  const { event: r, blue: i } = t;
1112
- return r ? Rt(i, r, n) : !0;
1112
+ return r ? Pt(i, r, n) : !0;
1113
1113
  }
1114
1114
  }
1115
- class Cr {
1115
+ class yr {
1116
1116
  kind = "channel";
1117
1117
  blueIds = [b["Conversation/Timeline Channel"]];
1118
- schema = On;
1118
+ schema = Mn;
1119
1119
  matches(e, t) {
1120
1120
  const { event: n, blue: r } = t;
1121
1121
  if (!n || !r.isTypeOf(n, N))
@@ -1129,7 +1129,7 @@ class Cr {
1129
1129
  }
1130
1130
  isNewerEvent(e, t, n) {
1131
1131
  const { event: r, blue: i } = t;
1132
- return r ? Rt(i, r, n) : !0;
1132
+ return r ? Pt(i, r, n) : !0;
1133
1133
  }
1134
1134
  }
1135
1135
  const He = m(T["Conversation/Trigger Event"])(le.extend({
@@ -1138,7 +1138,7 @@ const He = m(T["Conversation/Trigger Event"])(le.extend({
1138
1138
  name: l.string().optional()
1139
1139
  }));
1140
1140
  function Pe(o) {
1141
- const { context: e, eventNode: t, stepResults: n, contractNode: r } = o, i = vr(e), s = r != null ? e.blue.nodeToJson(r, "simple") : null, a = r != null ? e.blue.nodeToJson(r, "official") : s;
1141
+ const { context: e, eventNode: t, stepResults: n, contractNode: r } = o, i = Sr(e), s = r != null ? e.blue.nodeToJson(r, "simple") : null, a = r != null ? e.blue.nodeToJson(r, "official") : s;
1142
1142
  return {
1143
1143
  event: e.blue.nodeToJson(t, "simple"),
1144
1144
  eventCanonical: e.blue.nodeToJson(t, "official"),
@@ -1148,13 +1148,13 @@ function Pe(o) {
1148
1148
  currentContractCanonical: a
1149
1149
  };
1150
1150
  }
1151
- const Sr = /* @__PURE__ */ new Set(["blueId", "name", "description", "value"]);
1152
- function vr(o) {
1151
+ const Cr = /* @__PURE__ */ new Set(["blueId", "name", "description", "value"]);
1152
+ function Sr(o) {
1153
1153
  const e = (i) => {
1154
1154
  if (i === "/")
1155
1155
  return !1;
1156
1156
  const s = i.lastIndexOf("/"), a = i.substring(s + 1);
1157
- return Sr.has(a);
1157
+ return Cr.has(a);
1158
1158
  }, t = (i) => {
1159
1159
  const s = i == null ? "/" : typeof i == "string" ? i : (() => {
1160
1160
  throw new TypeError("document() expects a string pointer");
@@ -1167,7 +1167,7 @@ function vr(o) {
1167
1167
  }, r = ((i) => n(i, "simple"));
1168
1168
  return r.canonical = (i) => n(i, "official"), r;
1169
1169
  }
1170
- class wr {
1170
+ class vr {
1171
1171
  supportedBlueIds = [
1172
1172
  b["Conversation/Trigger Event"]
1173
1173
  ];
@@ -1181,10 +1181,10 @@ class wr {
1181
1181
  evaluator: this.evaluator,
1182
1182
  node: t,
1183
1183
  bindings: Pe(e),
1184
- shouldResolve: Et({
1184
+ shouldResolve: gt({
1185
1185
  include: ["/event", "/event/**"]
1186
1186
  }),
1187
- shouldDescend: br(),
1187
+ shouldDescend: wr(),
1188
1188
  context: n
1189
1189
  }), s = n.blue.nodeToSchemaOutput(
1190
1190
  r,
@@ -1197,10 +1197,10 @@ class wr {
1197
1197
  n.emitEvent(s.clone());
1198
1198
  }
1199
1199
  }
1200
- function br() {
1201
- return (o, e) => o === "/event" || !o.startsWith("/event/") ? !0 : !Ir(e);
1200
+ function wr() {
1201
+ return (o, e) => o === "/event" || !o.startsWith("/event/") ? !0 : !br(e);
1202
1202
  }
1203
- function Ir(o) {
1203
+ function br(o) {
1204
1204
  const e = o.getProperties?.();
1205
1205
  return e ? !!e.contracts : !1;
1206
1206
  }
@@ -1209,14 +1209,14 @@ const Ke = m(T["Conversation/JavaScript Code"])(le.extend({
1209
1209
  description: l.string().optional(),
1210
1210
  name: l.string().optional()
1211
1211
  }));
1212
- class kr {
1212
+ class Ir {
1213
1213
  supportedBlueIds = [
1214
1214
  b["Conversation/JavaScript Code"]
1215
1215
  ];
1216
1216
  evaluator = new ke();
1217
1217
  wasmGasLimit;
1218
1218
  constructor(e = {}) {
1219
- this.wasmGasLimit = e.wasmGasLimit ?? pt;
1219
+ this.wasmGasLimit = e.wasmGasLimit ?? dt;
1220
1220
  }
1221
1221
  async execute(e) {
1222
1222
  const { context: t, stepNode: n } = e, { blue: r } = t;
@@ -1240,7 +1240,7 @@ class kr {
1240
1240
  });
1241
1241
  return this.handleEvents(c, t), c;
1242
1242
  } catch (c) {
1243
- throw new ft(s, c);
1243
+ throw new pt(s, c);
1244
1244
  }
1245
1245
  }
1246
1246
  handleEvents(e, t) {
@@ -1254,18 +1254,18 @@ class kr {
1254
1254
  }
1255
1255
  }
1256
1256
  }
1257
- const Tr = m(P["Core/Json Patch Entry"])(l.object({
1257
+ const kr = m(P["Core/Json Patch Entry"])(l.object({
1258
1258
  description: l.string().optional(),
1259
1259
  name: l.string().optional(),
1260
1260
  op: l.string().optional(),
1261
1261
  path: l.string().optional(),
1262
1262
  val: I().optional()
1263
1263
  })), We = m(T["Conversation/Update Document"])(le.extend({
1264
- changeset: l.array(Tr).optional(),
1264
+ changeset: l.array(kr).optional(),
1265
1265
  description: l.string().optional(),
1266
1266
  name: l.string().optional()
1267
1267
  }));
1268
- class Pr {
1268
+ class Tr {
1269
1269
  supportedBlueIds = [
1270
1270
  b["Conversation/Update Document"]
1271
1271
  ];
@@ -1278,7 +1278,7 @@ class Pr {
1278
1278
  evaluator: this.evaluator,
1279
1279
  node: n,
1280
1280
  bindings: Pe(e),
1281
- shouldResolve: Et({
1281
+ shouldResolve: gt({
1282
1282
  include: ["/changeset", "/changeset/**"]
1283
1283
  }),
1284
1284
  context: t
@@ -1313,11 +1313,11 @@ class Pr {
1313
1313
  }
1314
1314
  }
1315
1315
  const Re = [
1316
- new wr(),
1317
- new kr(),
1318
- new Pr()
1316
+ new vr(),
1317
+ new Ir(),
1318
+ new Tr()
1319
1319
  ];
1320
- class Mt {
1320
+ class Rt {
1321
1321
  executorIndex;
1322
1322
  constructor(e = Re) {
1323
1323
  const t = /* @__PURE__ */ new Map();
@@ -1365,15 +1365,15 @@ class Mt {
1365
1365
  return n && typeof n == "string" && n.length > 0 ? n : `Step${t + 1}`;
1366
1366
  }
1367
1367
  }
1368
- class Rr {
1368
+ class Pr {
1369
1369
  kind = "handler";
1370
1370
  blueIds = [
1371
1371
  b["Conversation/Sequential Workflow"]
1372
1372
  ];
1373
- schema = sr;
1373
+ schema = ir;
1374
1374
  runner;
1375
1375
  constructor(e = Re) {
1376
- this.runner = new Mt(e);
1376
+ this.runner = new Rt(e);
1377
1377
  }
1378
1378
  async matches(e, t) {
1379
1379
  const n = t.event();
@@ -1389,15 +1389,15 @@ class Rr {
1389
1389
  });
1390
1390
  }
1391
1391
  }
1392
- class Mr {
1392
+ class Rr {
1393
1393
  kind = "marker";
1394
1394
  blueIds = [S["Core/Marker"]];
1395
1395
  schema = M;
1396
1396
  }
1397
- class Or {
1397
+ class Mr {
1398
1398
  kind = "marker";
1399
1399
  blueIds = [b["Conversation/Operation"]];
1400
- schema = Gn;
1400
+ schema = qn;
1401
1401
  }
1402
1402
  const Ce = m(T["Conversation/Operation Request"])(l.object({
1403
1403
  allowNewerVersion: l.boolean().optional(),
@@ -1407,7 +1407,7 @@ const Ce = m(T["Conversation/Operation Request"])(l.object({
1407
1407
  operation: l.string().optional(),
1408
1408
  request: I().optional()
1409
1409
  }));
1410
- function Ot(o) {
1410
+ function Mt(o) {
1411
1411
  const e = o.channel;
1412
1412
  if (typeof e == "string") {
1413
1413
  const t = e.trim();
@@ -1416,14 +1416,14 @@ function Ot(o) {
1416
1416
  }
1417
1417
  return null;
1418
1418
  }
1419
- function Nr(o, e) {
1419
+ function Or(o, e) {
1420
1420
  const t = o.getProperties()?.document;
1421
1421
  if (!(t instanceof p))
1422
1422
  return null;
1423
1423
  const n = t.getReferenceBlueId();
1424
1424
  return n || e.blue.calculateBlueIdSync(t);
1425
1425
  }
1426
- function Ar(o, e) {
1426
+ function Nr(o, e) {
1427
1427
  if (e.isTypeOf(o, Ce, {
1428
1428
  checkSchemaExtensions: !0
1429
1429
  }))
@@ -1439,7 +1439,7 @@ function Ar(o, e) {
1439
1439
  }
1440
1440
  return null;
1441
1441
  }
1442
- function Br(o, e, t, n) {
1442
+ function Ar(o, e, t, n) {
1443
1443
  const { blue: r } = n, i = o.operation;
1444
1444
  return !(!i || t.operation !== i || o.event && !r.isTypeOfNode(e, o.event));
1445
1445
  }
@@ -1455,39 +1455,20 @@ function Dr(o, e) {
1455
1455
  const i = e.blue.nodeToSchemaOutput(
1456
1456
  r,
1457
1457
  Z
1458
- ), s = Ot(i);
1458
+ ), s = Mt(i);
1459
1459
  return { operationNode: r, operation: i, channelKey: s };
1460
1460
  }
1461
- function _r(o, e) {
1461
+ function Br(o, e) {
1462
1462
  return !(o && e && o !== e);
1463
1463
  }
1464
- function Lr(o, e, t) {
1464
+ function _r(o, e, t) {
1465
1465
  const n = o.getProperties()?.request, r = e.getProperties()?.request;
1466
- if (!(n instanceof p) || !(r instanceof p))
1467
- return !1;
1468
- try {
1469
- if (!t.isTypeOfNode(n, r) && !qe(
1470
- n,
1471
- r,
1472
- t
1473
- ))
1474
- return !1;
1475
- } catch {
1476
- if (!qe(n, r, t))
1477
- return !1;
1478
- }
1479
- return !0;
1480
- }
1481
- function qe(o, e, t) {
1482
- if (!e.isResolved())
1483
- return !1;
1484
- const n = e.getType()?.getBlueId();
1485
- return typeof n == "string" && n.length > 0 && t.isTypeOfBlueId(o, n);
1466
+ return !(!(n instanceof p) || !(r instanceof p) || !t.isTypeOfNode(n, r));
1486
1467
  }
1487
- function xr(o, e, t) {
1468
+ function Lr(o, e, t) {
1488
1469
  if (!o || o.allowNewerVersion !== !1)
1489
1470
  return !0;
1490
- const n = Nr(e, t);
1471
+ const n = Or(e, t);
1491
1472
  if (!n)
1492
1473
  return !0;
1493
1474
  const r = t.resolvePointer("/"), i = t.documentAt(r);
@@ -1496,35 +1477,35 @@ function xr(o, e, t) {
1496
1477
  const c = (i.getContracts()?.initialized ?? null)?.get("/documentId") ?? null, u = typeof c == "string" && c.length > 0 ? c : t.blue.calculateBlueIdSync(i);
1497
1478
  return n === u;
1498
1479
  }
1499
- const Fr = b["Conversation/Actor Policy"], $r = b["Conversation/Principal Actor"], Ur = b["Conversation/Agent Actor"], zr = b["Conversation/Browser Session"], Vr = b["Conversation/API Call"], Hr = b["Conversation/Document Request"];
1500
- function Kr(o, e, t) {
1501
- const r = Wr(t)?.operations?.[o];
1480
+ const xr = b["Conversation/Actor Policy"], Fr = b["Conversation/Principal Actor"], $r = b["Conversation/Agent Actor"], Ur = b["Conversation/Browser Session"], zr = b["Conversation/API Call"], Vr = b["Conversation/Document Request"];
1481
+ function Hr(o, e, t) {
1482
+ const r = Kr(t)?.operations?.[o];
1502
1483
  if (!r)
1503
1484
  return !0;
1504
- const i = qr(e, t), s = Gr(e, t);
1505
- return jr(r, i, s);
1485
+ const i = Wr(e, t), s = qr(e, t);
1486
+ return Gr(r, i, s);
1506
1487
  }
1507
- function Wr(o) {
1488
+ function Kr(o) {
1508
1489
  const e = o.resolvePointer("/contracts"), n = o.documentAt(e)?.getProperties();
1509
1490
  if (!n)
1510
1491
  return null;
1511
1492
  for (const r of Object.values(n))
1512
- if (r instanceof p && o.blue.isTypeOfBlueId(r, Fr))
1493
+ if (r instanceof p && o.blue.isTypeOfBlueId(r, xr))
1513
1494
  return o.blue.nodeToSchemaOutput(
1514
1495
  r,
1515
- It
1496
+ bt
1516
1497
  );
1517
1498
  return null;
1518
1499
  }
1519
- function qr(o, e) {
1520
- const t = Nt(o, "actor", e);
1521
- return t ? e.blue.isTypeOfBlueId(t, Ur) ? "agent" : e.blue.isTypeOfBlueId(t, $r) ? "principal" : null : null;
1500
+ function Wr(o, e) {
1501
+ const t = Ot(o, "actor", e);
1502
+ return t ? e.blue.isTypeOfBlueId(t, $r) ? "agent" : e.blue.isTypeOfBlueId(t, Fr) ? "principal" : null : null;
1522
1503
  }
1523
- function Gr(o, e) {
1524
- const t = Nt(o, "source", e);
1525
- return t ? e.blue.isTypeOfBlueId(t, zr) ? "browserSession" : e.blue.isTypeOfBlueId(t, Vr) ? "apiCall" : e.blue.isTypeOfBlueId(t, Hr) ? "documentRequest" : null : null;
1504
+ function qr(o, e) {
1505
+ const t = Ot(o, "source", e);
1506
+ return t ? e.blue.isTypeOfBlueId(t, Ur) ? "browserSession" : e.blue.isTypeOfBlueId(t, zr) ? "apiCall" : e.blue.isTypeOfBlueId(t, Vr) ? "documentRequest" : null : null;
1526
1507
  }
1527
- function Nt(o, e, t) {
1508
+ function Ot(o, e, t) {
1528
1509
  if (!t.blue.isTypeOf(o, N, {
1529
1510
  checkSchemaExtensions: !0
1530
1511
  }))
@@ -1532,18 +1513,18 @@ function Nt(o, e, t) {
1532
1513
  const n = o.getProperties()?.[e];
1533
1514
  return n instanceof p ? n : null;
1534
1515
  }
1535
- function jr(o, e, t) {
1516
+ function Gr(o, e, t) {
1536
1517
  return !(o.requiresActor && (!e || o.requiresActor !== "any" && o.requiresActor !== e) || o.requiresSource && (!t || o.requiresSource !== t) || o.excludeSource && (!t || o.excludeSource === t));
1537
1518
  }
1538
- class Jr {
1519
+ class jr {
1539
1520
  kind = "handler";
1540
1521
  blueIds = [
1541
1522
  b["Conversation/Sequential Workflow Operation"]
1542
1523
  ];
1543
- schema = cr;
1524
+ schema = ar;
1544
1525
  runner;
1545
1526
  constructor(e = Re) {
1546
- this.runner = new Mt(e);
1527
+ this.runner = new Rt(e);
1547
1528
  }
1548
1529
  deriveChannel(e, t) {
1549
1530
  const n = e.operation;
@@ -1555,13 +1536,13 @@ class Jr {
1555
1536
  }))
1556
1537
  return null;
1557
1538
  const i = t.blue.nodeToSchemaOutput(r.node, Z);
1558
- return i ? Ot(i) : null;
1539
+ return i ? Mt(i) : null;
1559
1540
  }
1560
1541
  async matches(e, t) {
1561
1542
  const n = t.event();
1562
1543
  if (!n)
1563
1544
  return !1;
1564
- const r = Ar(
1545
+ const r = Nr(
1565
1546
  n,
1566
1547
  t.blue
1567
1548
  );
@@ -1571,20 +1552,20 @@ class Jr {
1571
1552
  r,
1572
1553
  Ce
1573
1554
  );
1574
- if (!i || !Br(e, n, i, t))
1555
+ if (!i || !Ar(e, n, i, t))
1575
1556
  return !1;
1576
1557
  const s = Dr(e, t);
1577
1558
  if (!s)
1578
1559
  return !1;
1579
1560
  const a = typeof e.channel == "string" ? e.channel.trim() : "", c = a.length > 0 ? a : null;
1580
- if (!_r(s.channelKey, c) || !Lr(
1561
+ if (!Br(s.channelKey, c) || !_r(
1581
1562
  r,
1582
1563
  s.operationNode,
1583
1564
  t.blue
1584
- ) || i?.allowNewerVersion === !1 && !xr(i, r, t))
1565
+ ) || i?.allowNewerVersion === !1 && !Lr(i, r, t))
1585
1566
  return !1;
1586
1567
  const u = e.operation;
1587
- return !(!u || !Kr(u, n, t));
1568
+ return !(!u || !Hr(u, n, t));
1588
1569
  }
1589
1570
  async execute(e, t, n) {
1590
1571
  const r = t.event();
@@ -1602,11 +1583,11 @@ class ue {
1602
1583
  }
1603
1584
  static create() {
1604
1585
  return new ue(
1605
- new ur()
1586
+ new lr()
1606
1587
  );
1607
1588
  }
1608
1589
  registerDefaults() {
1609
- return this.registry.register(new mr()), this.registry.register(new yr()), this.registry.register(new Cr()), this.registry.register(new Rr()), this.registry.register(new hr()), this.registry.register(new Or()), this.registry.register(new Mr()), this.registry.register(new Jr()), this;
1590
+ return this.registry.register(new fr()), this.registry.register(new Er()), this.registry.register(new yr()), this.registry.register(new Pr()), this.registry.register(new ur()), this.registry.register(new Mr()), this.registry.register(new Rr()), this.registry.register(new jr()), this;
1610
1591
  }
1611
1592
  register(e) {
1612
1593
  return this.registry.register(e), this;
@@ -1616,10 +1597,10 @@ class ue {
1616
1597
  }
1617
1598
  }
1618
1599
  const Se = S["Core/Channel Event Checkpoint"];
1619
- function At(o) {
1600
+ function Nt(o) {
1620
1601
  return typeof o.order == "number" ? o.order : 0;
1621
1602
  }
1622
- class Qr {
1603
+ class Jr {
1623
1604
  constructor(e, t, n, r) {
1624
1605
  this.bindingKey = e, this.bindingContract = t, this.bindingBlueId = n, this.bindingNode = r;
1625
1606
  }
@@ -1636,10 +1617,10 @@ class Qr {
1636
1617
  return this.bindingNode.clone();
1637
1618
  }
1638
1619
  order() {
1639
- return At(this.bindingContract);
1620
+ return Nt(this.bindingContract);
1640
1621
  }
1641
1622
  }
1642
- class Yr {
1623
+ class Qr {
1643
1624
  constructor(e, t, n, r) {
1644
1625
  this.bindingKey = e, this.bindingContract = t, this.bindingBlueId = n, this.bindingNode = r;
1645
1626
  }
@@ -1656,7 +1637,7 @@ class Yr {
1656
1637
  return this.bindingNode.clone();
1657
1638
  }
1658
1639
  order() {
1659
- return At(this.bindingContract);
1640
+ return Nt(this.bindingContract);
1660
1641
  }
1661
1642
  }
1662
1643
  class W {
@@ -1674,7 +1655,7 @@ class W {
1674
1655
  );
1675
1656
  }
1676
1657
  static builder() {
1677
- return new Zr();
1658
+ return new Yr();
1678
1659
  }
1679
1660
  static empty() {
1680
1661
  return W.builder().build();
@@ -1707,8 +1688,8 @@ class W {
1707
1688
  throw new Error(
1708
1689
  "Duplicate Channel Event Checkpoint markers detected in same contracts map"
1709
1690
  );
1710
- this.markerStore.set(D, {
1711
- key: D,
1691
+ this.markerStore.set(B, {
1692
+ key: B,
1712
1693
  contract: e,
1713
1694
  blueId: Se
1714
1695
  }), this.checkpointDeclared = !0;
@@ -1716,7 +1697,7 @@ class W {
1716
1697
  handlersFor(e) {
1717
1698
  const t = this.handlersByChannel.get(e);
1718
1699
  return !t || t.length === 0 ? [] : [...t].map(
1719
- (n) => new Yr(
1700
+ (n) => new Qr(
1720
1701
  n.key,
1721
1702
  n.contract,
1722
1703
  n.blueId,
@@ -1738,7 +1719,7 @@ class W {
1738
1719
  }
1739
1720
  channelsOfType(...e) {
1740
1721
  const t = e.length > 0 ? new Set(e) : null, n = Array.from(this.channels.values()).filter((r) => !t || t.has(r.blueId)).map(
1741
- (r) => new Qr(
1722
+ (r) => new Jr(
1742
1723
  r.key,
1743
1724
  r.contract,
1744
1725
  r.blueId,
@@ -1751,7 +1732,7 @@ class W {
1751
1732
  }), n;
1752
1733
  }
1753
1734
  }
1754
- class Zr {
1735
+ class Yr {
1755
1736
  channels = /* @__PURE__ */ new Map();
1756
1737
  handlersByChannel = /* @__PURE__ */ new Map();
1757
1738
  markerStore = /* @__PURE__ */ new Map();
@@ -1776,12 +1757,12 @@ class Zr {
1776
1757
  return this.embeddedDeclared = !0, this.embeddedPaths = e.paths ? [...e.paths] : [], this;
1777
1758
  }
1778
1759
  addMarker(e, t, n) {
1779
- if (e === D && n !== Se)
1760
+ if (e === B && n !== Se)
1780
1761
  throw new Error(
1781
1762
  "Reserved key 'checkpoint' must contain a Channel Event Checkpoint"
1782
1763
  );
1783
1764
  if (n === Se) {
1784
- if (e !== D)
1765
+ if (e !== B)
1785
1766
  throw new Error(
1786
1767
  `Channel Event Checkpoint must use reserved key 'checkpoint' at key '${e}'`
1787
1768
  );
@@ -1819,7 +1800,7 @@ function te(o, e, t) {
1819
1800
  return r;
1820
1801
  return null;
1821
1802
  }
1822
- class Xr {
1803
+ class Zr {
1823
1804
  constructor(e, t, n) {
1824
1805
  this.blue = e, this.registry = t, this.builtinChannelSchemas = n;
1825
1806
  }
@@ -1930,11 +1911,11 @@ class F extends Error {
1930
1911
  super(e ?? "MustUnderstand failure"), this.name = "MustUnderstandFailure";
1931
1912
  }
1932
1913
  }
1933
- const eo = b["Conversation/Composite Timeline Channel"];
1934
- function to(o) {
1914
+ const Xr = b["Conversation/Composite Timeline Channel"];
1915
+ function eo(o) {
1935
1916
  const { compositeKey: e, contract: t, scopeContracts: n, blueId: r, blue: i } = o, s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), c = [], u = /* @__PURE__ */ new Map([
1936
1917
  [e, t]
1937
- ]), h = (f) => i.isTypeOfBlueId(f.node, eo), d = (f) => {
1918
+ ]), h = (f) => i.isTypeOfBlueId(f.node, Xr), d = (f) => {
1938
1919
  if (u.has(f))
1939
1920
  return u.get(f) ?? null;
1940
1921
  const g = n.get(f);
@@ -1943,11 +1924,11 @@ function to(o) {
1943
1924
  try {
1944
1925
  const y = i.nodeToSchemaOutput(
1945
1926
  g.node,
1946
- vt
1927
+ St
1947
1928
  );
1948
1929
  return u.set(f, y), y;
1949
1930
  } catch (y) {
1950
- if (no(y))
1931
+ if (to(y))
1951
1932
  throw new E(
1952
1933
  "Failed to parse channel contract",
1953
1934
  C.invalidContract(
@@ -1988,63 +1969,63 @@ function to(o) {
1988
1969
  };
1989
1970
  v(e);
1990
1971
  }
1991
- function no(o) {
1972
+ function to(o) {
1992
1973
  return o instanceof ve;
1993
1974
  }
1994
- const ro = S["Core/Document Update Channel"], oo = S["Core/Embedded Node Channel"], io = S["Core/Lifecycle Event Channel"], so = S["Core/Triggered Event Channel"], Ge = S["Core/Process Embedded"], ao = S["Core/Processing Initialized Marker"], co = S["Core/Processing Terminated Marker"], lo = S["Core/Channel Event Checkpoint"], uo = q["MyOS/Document Anchors"], ho = q["MyOS/Document Links"], po = q["MyOS/MyOS Participants Orchestration"], fo = q["MyOS/MyOS Session Interaction"], mo = q["MyOS/MyOS Worker Agency"], go = b["Conversation/Composite Timeline Channel"], pe = /* @__PURE__ */ new Map([
1975
+ const no = S["Core/Document Update Channel"], ro = S["Core/Embedded Node Channel"], oo = S["Core/Lifecycle Event Channel"], io = S["Core/Triggered Event Channel"], qe = S["Core/Process Embedded"], so = S["Core/Processing Initialized Marker"], ao = S["Core/Processing Terminated Marker"], co = S["Core/Channel Event Checkpoint"], lo = q["MyOS/Document Anchors"], uo = q["MyOS/Document Links"], ho = q["MyOS/MyOS Participants Orchestration"], po = q["MyOS/MyOS Session Interaction"], fo = q["MyOS/MyOS Worker Agency"], mo = b["Conversation/Composite Timeline Channel"], pe = /* @__PURE__ */ new Map([
1976
+ [
1977
+ no,
1978
+ wn
1979
+ ],
1995
1980
  [
1996
1981
  ro,
1997
- bn
1982
+ In
1998
1983
  ],
1999
1984
  [
2000
1985
  oo,
2001
- kn
1986
+ Tn
2002
1987
  ],
2003
1988
  [
2004
1989
  io,
2005
- Pn
2006
- ],
1990
+ Rn
1991
+ ]
1992
+ ]), go = /* @__PURE__ */ new Map([
2007
1993
  [
2008
1994
  so,
2009
- Mn
2010
- ]
2011
- ]), Eo = /* @__PURE__ */ new Map([
1995
+ zn
1996
+ ],
2012
1997
  [
2013
1998
  ao,
2014
- Vn
1999
+ Wn
2015
2000
  ],
2016
2001
  [
2017
2002
  co,
2018
- qn
2003
+ $n
2019
2004
  ],
2020
2005
  [
2021
2006
  lo,
2022
- Un
2007
+ Jn
2023
2008
  ],
2024
2009
  [
2025
2010
  uo,
2026
- Qn
2011
+ Zn
2027
2012
  ],
2028
2013
  [
2029
2014
  ho,
2030
- Xn
2015
+ er
2031
2016
  ],
2032
2017
  [
2033
2018
  po,
2034
- tr
2019
+ nr
2035
2020
  ],
2036
2021
  [
2037
2022
  fo,
2038
- rr
2039
- ],
2040
- [
2041
- mo,
2042
- ir
2023
+ or
2043
2024
  ]
2044
2025
  ]);
2045
- class yo {
2026
+ class Eo {
2046
2027
  constructor(e, t) {
2047
- this.registry = e, this.blue = t, this.handlerRegistration = new Xr(
2028
+ this.registry = e, this.blue = t, this.handlerRegistration = new Zr(
2048
2029
  this.blue,
2049
2030
  this.registry,
2050
2031
  pe
@@ -2077,14 +2058,14 @@ class yo {
2077
2058
  const i = n.getType()?.getBlueId();
2078
2059
  if (!i)
2079
2060
  return;
2080
- if (this.blue.isTypeOfBlueId(n, Ge)) {
2061
+ if (this.blue.isTypeOfBlueId(n, qe)) {
2081
2062
  this.handleProcessEmbedded(e, t, n);
2082
2063
  return;
2083
2064
  }
2084
2065
  const s = te(
2085
2066
  this.blue,
2086
2067
  n,
2087
- Eo
2068
+ go
2088
2069
  );
2089
2070
  if (s) {
2090
2071
  this.handleMarker(
@@ -2155,7 +2136,7 @@ class yo {
2155
2136
  );
2156
2137
  return;
2157
2138
  }
2158
- throw rt(i) ? new E(
2139
+ throw nt(i) ? new E(
2159
2140
  "Built-in processor-managed channel is missing schema registration",
2160
2141
  C.invalidContract(
2161
2142
  i,
@@ -2168,14 +2149,14 @@ class yo {
2168
2149
  try {
2169
2150
  const r = this.blue.nodeToSchemaOutput(
2170
2151
  n,
2171
- Kn
2152
+ Hn
2172
2153
  );
2173
2154
  e.setEmbedded(r);
2174
2155
  } catch (r) {
2175
2156
  throw fe(r) ? new E(
2176
2157
  "Failed to parse ProcessEmbedded marker",
2177
2158
  C.invalidContract(
2178
- Ge,
2159
+ qe,
2179
2160
  "Failed to parse ProcessEmbedded marker",
2180
2161
  t,
2181
2162
  r
@@ -2194,7 +2175,7 @@ class yo {
2194
2175
  n,
2195
2176
  r
2196
2177
  );
2197
- this.blue.isTypeOfBlueId(n, go) && this.validateCompositeChannel(
2178
+ this.blue.isTypeOfBlueId(n, mo) && this.validateCompositeChannel(
2198
2179
  t,
2199
2180
  a,
2200
2181
  s,
@@ -2244,7 +2225,7 @@ class yo {
2244
2225
  )
2245
2226
  );
2246
2227
  }
2247
- to({
2228
+ eo({
2248
2229
  compositeKey: e,
2249
2230
  contract: t,
2250
2231
  scopeContracts: n,
@@ -2259,7 +2240,7 @@ class yo {
2259
2240
  handleMarker(e, t, n, r, i, s) {
2260
2241
  try {
2261
2242
  const a = b["Conversation/Actor Policy"];
2262
- this.blue.isTypeOfBlueId(n, a) && (this.assertSingleActorPolicyMarker(t, s, i), Fn(n));
2243
+ this.blue.isTypeOfBlueId(n, a) && (this.assertSingleActorPolicyMarker(t, s, i), xn(n));
2263
2244
  const c = this.blue.nodeToSchemaOutput(
2264
2245
  n,
2265
2246
  r
@@ -2268,7 +2249,7 @@ class yo {
2268
2249
  } catch (a) {
2269
2250
  if (a instanceof E || a instanceof F)
2270
2251
  throw a;
2271
- if (a instanceof kt)
2252
+ if (a instanceof It)
2272
2253
  throw new E(
2273
2254
  a.message,
2274
2255
  C.invalidContract(i, a.message, t, a)
@@ -2320,24 +2301,24 @@ class yo {
2320
2301
  function fe(o) {
2321
2302
  return o instanceof ve;
2322
2303
  }
2323
- const Co = S["Core/Channel Event Checkpoint"];
2324
- function So(o) {
2304
+ const yo = S["Core/Channel Event Checkpoint"];
2305
+ function Co(o) {
2325
2306
  return o.jsonValueToNode({
2326
- type: { blueId: Co },
2307
+ type: { blueId: yo },
2327
2308
  lastEvents: {},
2328
2309
  lastSignatures: {}
2329
2310
  });
2330
2311
  }
2331
- function vo() {
2312
+ function So() {
2332
2313
  return {
2333
2314
  lastEvents: {},
2334
2315
  lastSignatures: {}
2335
2316
  };
2336
2317
  }
2337
- function je(o) {
2318
+ function Ge(o) {
2338
2319
  return o != null && Object.prototype.hasOwnProperty.call(o, "lastEvents") && Object.prototype.hasOwnProperty.call(o, "lastSignatures");
2339
2320
  }
2340
- class wo {
2321
+ class vo {
2341
2322
  constructor(e, t, n, r, i) {
2342
2323
  this.markerKey = e, this.checkpoint = t, this.channelKey = n, this.lastEventNode = r, this.lastEventSignature = i;
2343
2324
  }
@@ -2347,28 +2328,28 @@ class wo {
2347
2328
  return e != null && e === this.lastEventSignature;
2348
2329
  }
2349
2330
  }
2350
- class bo {
2331
+ class wo {
2351
2332
  constructor(e, t) {
2352
2333
  this.runtime = e, this.signatureFn = t;
2353
2334
  }
2354
2335
  ensureCheckpointMarker(e, t) {
2355
- const n = t.marker(D), r = k(e, it);
2336
+ const n = t.marker(B), r = k(e, ot);
2356
2337
  if (!n) {
2357
- const i = So(this.runtime.blue());
2358
- this.runtime.directWrite(r, i), t.registerCheckpointMarker(vo());
2338
+ const i = Co(this.runtime.blue());
2339
+ this.runtime.directWrite(r, i), t.registerCheckpointMarker(So());
2359
2340
  return;
2360
2341
  }
2361
- if (!je(n))
2342
+ if (!Ge(n))
2362
2343
  throw new Error(
2363
2344
  `Reserved key 'checkpoint' must contain a Channel Event Checkpoint at ${r}`
2364
2345
  );
2365
2346
  }
2366
2347
  findCheckpoint(e, t) {
2367
2348
  for (const [n, r] of e.markerEntries()) {
2368
- if (!je(r))
2349
+ if (!Ge(r))
2369
2350
  continue;
2370
2351
  const s = (r.lastEvents?.[t] ?? null)?.clone() ?? null, c = r.lastSignatures?.[t] ?? null ?? this.signatureFn(s);
2371
- return new wo(
2352
+ return new vo(
2372
2353
  n,
2373
2354
  r,
2374
2355
  t,
@@ -2386,17 +2367,17 @@ class bo {
2386
2367
  return;
2387
2368
  const s = k(
2388
2369
  e,
2389
- ct(n.markerKey, n.channelKey)
2370
+ at(n.markerKey, n.channelKey)
2390
2371
  ), a = i?.clone() ?? null;
2391
2372
  this.runtime.gasMeter().chargeCheckpointUpdate(), this.runtime.directWrite(s, a), n.checkpoint.lastEvents || (n.checkpoint.lastEvents = {}), a ? n.checkpoint.lastEvents[n.channelKey] = a.clone() ?? null : delete n.checkpoint.lastEvents[n.channelKey], n.lastEventNode = a?.clone() ?? null;
2392
2373
  const c = k(
2393
2374
  e,
2394
- lt(n.markerKey, n.channelKey)
2375
+ ct(n.markerKey, n.channelKey)
2395
2376
  ), u = r == null ? null : new p().setValue(r);
2396
2377
  this.runtime.directWrite(c, u), n.checkpoint.lastSignatures || (n.checkpoint.lastSignatures = {}), r == null ? delete n.checkpoint.lastSignatures[n.channelKey] : n.checkpoint.lastSignatures[n.channelKey] = r, n.lastEventSignature = r ?? null;
2397
2378
  }
2398
2379
  }
2399
- class Io {
2380
+ class bo {
2400
2381
  constructor(e, t, n) {
2401
2382
  this.runtime = e, this.checkpointManager = t, this.deps = n;
2402
2383
  }
@@ -2523,7 +2504,7 @@ class Io {
2523
2504
  );
2524
2505
  }
2525
2506
  }
2526
- function ko(o, e) {
2507
+ function Io(o, e) {
2527
2508
  return e.isResolved() ? o.createResolvedNode(e) : o.resolve(e);
2528
2509
  }
2529
2510
  class K extends E {
@@ -2536,8 +2517,8 @@ class V extends Error {
2536
2517
  super(e), this.name = "BoundaryViolationException";
2537
2518
  }
2538
2519
  }
2539
- const To = S["Core/Document Update Channel"], Po = S["Core/Embedded Node Channel"], Ro = S["Core/Triggered Event Channel"], Mo = S["Core/Lifecycle Event Channel"], Je = S["Core/Processing Initialized Marker"], Oo = S["Core/Document Processing Initiated"];
2540
- class No {
2520
+ const ko = S["Core/Document Update Channel"], To = S["Core/Embedded Node Channel"], Po = S["Core/Triggered Event Channel"], Ro = S["Core/Lifecycle Event Channel"], je = S["Core/Processing Initialized Marker"], Mo = S["Core/Document Processing Initiated"];
2521
+ class Oo {
2541
2522
  runtime;
2542
2523
  contractLoader;
2543
2524
  channelRunner;
@@ -2596,7 +2577,7 @@ class No {
2596
2577
  }
2597
2578
  }
2598
2579
  async processExternalEvent(e, t) {
2599
- const n = ko(this.runtime.blue(), t);
2580
+ const n = Io(this.runtime.blue(), t);
2600
2581
  await this.processPreparedExternalEvent(e, n);
2601
2582
  }
2602
2583
  async processPreparedExternalEvent(e, t) {
@@ -2663,7 +2644,7 @@ class No {
2663
2644
  continue;
2664
2645
  const c = this.createDocumentUpdateEvent(i, s), u = this.channelsMatching(
2665
2646
  a,
2666
- To
2647
+ ko
2667
2648
  );
2668
2649
  for (const h of u) {
2669
2650
  const d = h.contract();
@@ -2701,7 +2682,7 @@ class No {
2701
2682
  return;
2702
2683
  const i = this.channelsMatching(
2703
2684
  t,
2704
- Mo
2685
+ Ro
2705
2686
  );
2706
2687
  for (const s of i)
2707
2688
  if (await this.channelRunner.runHandlers(
@@ -2763,7 +2744,7 @@ class No {
2763
2744
  }
2764
2745
  }
2765
2746
  async addInitializationMarker(e, t) {
2766
- const n = new p().setType(new p().setBlueId(Je)).addProperty("documentId", new p().setValue(t)), r = e.resolvePointer(Ee);
2747
+ const n = new p().setType(new p().setBlueId(je)).addProperty("documentId", new p().setValue(t)), r = e.resolvePointer(Ee);
2767
2748
  await e.applyPatch({
2768
2749
  op: "ADD",
2769
2750
  path: r,
@@ -2778,7 +2759,7 @@ class No {
2778
2759
  return;
2779
2760
  const n = this.channelsMatching(
2780
2761
  t,
2781
- Po
2762
+ To
2782
2763
  );
2783
2764
  if (n.length !== 0)
2784
2765
  for (const r of t.embeddedPaths()) {
@@ -2804,7 +2785,7 @@ class No {
2804
2785
  return;
2805
2786
  const n = this.runtime.scope(e), r = this.channelsMatching(
2806
2787
  t,
2807
- Ro
2788
+ Po
2808
2789
  );
2809
2790
  if (r.length === 0) {
2810
2791
  n.clearTriggered();
@@ -2899,14 +2880,14 @@ class No {
2899
2880
  const i = `Reserved key 'initialized' must contain a Processing Initialized Marker at ${t}`;
2900
2881
  throw new K(i);
2901
2882
  }
2902
- if (n.getType()?.getBlueId() !== Je) {
2883
+ if (n.getType()?.getBlueId() !== je) {
2903
2884
  const i = `Reserved key 'initialized' must contain a Processing Initialized Marker at ${t}`;
2904
2885
  throw new K(i);
2905
2886
  }
2906
2887
  return !0;
2907
2888
  }
2908
2889
  createLifecycleEvent(e) {
2909
- return new p().setType(new p().setBlueId(Oo)).setProperties({
2890
+ return new p().setType(new p().setBlueId(Mo)).setProperties({
2910
2891
  type: new p().setValue("Core/Document Processing Initiated"),
2911
2892
  documentId: new p().setValue(e)
2912
2893
  });
@@ -2919,19 +2900,19 @@ class ie extends Error {
2919
2900
  ), this.fatal = e, this.name = "RunTerminationError";
2920
2901
  }
2921
2902
  }
2922
- const Ao = S["Core/Processing Terminated Marker"], Bo = S["Core/Document Processing Terminated"];
2903
+ const No = S["Core/Processing Terminated Marker"], Ao = S["Core/Document Processing Terminated"];
2923
2904
  class Do {
2924
2905
  constructor(e) {
2925
2906
  this.runtime = e;
2926
2907
  }
2927
2908
  async terminateScope(e, t, n, r, i) {
2928
2909
  e.recordPendingTermination(t, r, i ?? null);
2929
- const s = e.normalizeScope(t), a = k(s, ot);
2910
+ const s = e.normalizeScope(t), a = k(s, rt);
2930
2911
  this.runtime.directWrite(
2931
2912
  a,
2932
- _o(this.runtime.blue(), r, i)
2913
+ Bo(this.runtime.blue(), r, i)
2933
2914
  ), this.runtime.gasMeter().chargeTerminationMarker();
2934
- const c = n ?? e.bundleForScope(s) ?? null, u = Lo(r, i);
2915
+ const c = n ?? e.bundleForScope(s) ?? null, u = _o(r, i);
2935
2916
  if (await e.deliverLifecycle(
2936
2917
  s,
2937
2918
  c,
@@ -2943,32 +2924,32 @@ class Do {
2943
2924
  throw this.runtime.markRunTerminated(), new ie(!1);
2944
2925
  }
2945
2926
  }
2946
- function _o(o, e, t) {
2947
- return xo(o, {
2948
- type: { blueId: Ao },
2927
+ function Bo(o, e, t) {
2928
+ return Lo(o, {
2929
+ type: { blueId: No },
2949
2930
  cause: e === "GRACEFUL" ? "graceful" : "fatal",
2950
2931
  ...t ? { reason: t } : {}
2951
2932
  });
2952
2933
  }
2953
- function Lo(o, e) {
2934
+ function _o(o, e) {
2954
2935
  const t = new p().setType(
2955
- new p().setBlueId(Bo)
2936
+ new p().setBlueId(Ao)
2956
2937
  );
2957
2938
  return t.addProperty(
2958
2939
  "cause",
2959
2940
  new p().setValue(o === "GRACEFUL" ? "graceful" : "fatal")
2960
2941
  ), e && t.addProperty("reason", new p().setValue(e)), t;
2961
2942
  }
2962
- function xo(o, e) {
2943
+ function Lo(o, e) {
2963
2944
  return o.jsonValueToNode(e);
2964
2945
  }
2965
2946
  const Y = "-";
2966
- class Fo {
2947
+ class xo {
2967
2948
  constructor(e) {
2968
2949
  this.document = e;
2969
2950
  }
2970
2951
  applyPatch(e, t) {
2971
- const n = w(e), r = R(t.path), i = Ye(r), s = Qe(this.document, i, "before", r);
2952
+ const n = w(e), r = R(t.path), i = Qe(r), s = Je(this.document, i, "before", r);
2972
2953
  switch (t.op) {
2973
2954
  case "ADD":
2974
2955
  this.applyAdd(i, r, t.val ?? null);
@@ -2980,21 +2961,21 @@ class Fo {
2980
2961
  this.applyRemove(i, r);
2981
2962
  break;
2982
2963
  }
2983
- const a = t.op === "REMOVE" ? null : Qe(this.document, i, "after", r);
2964
+ const a = t.op === "REMOVE" ? null : Je(this.document, i, "after", r);
2984
2965
  return {
2985
2966
  path: r,
2986
2967
  before: s,
2987
2968
  after: a,
2988
2969
  op: t.op.toLowerCase(),
2989
2970
  originScope: n,
2990
- cascadeScopes: $o(n)
2971
+ cascadeScopes: Fo(n)
2991
2972
  };
2992
2973
  }
2993
2974
  directWrite(e, t) {
2994
2975
  const n = R(e);
2995
2976
  if (n === "/")
2996
2977
  throw new Error("Direct write cannot target root document");
2997
- const r = Ye(n), { parent: i, leaf: s } = this.resolveParent(r);
2978
+ const r = Qe(n), { parent: i, leaf: s } = this.resolveParent(r);
2998
2979
  if (s === Y)
2999
2980
  throw new Error(
3000
2981
  `Direct write does not support append token '-' for path ${n}`
@@ -3188,7 +3169,7 @@ class Fo {
3188
3169
  }
3189
3170
  }
3190
3171
  }
3191
- function $o(o) {
3172
+ function Fo(o) {
3192
3173
  const e = [];
3193
3174
  let t = o;
3194
3175
  for (; e.push(t), t !== "/"; ) {
@@ -3197,26 +3178,26 @@ function $o(o) {
3197
3178
  }
3198
3179
  return e;
3199
3180
  }
3200
- function Qe(o, e, t, n) {
3181
+ function Je(o, e, t, n) {
3201
3182
  try {
3202
3183
  if (e.length === 0)
3203
3184
  return o.clone();
3204
- const r = Uo(o, e, t, n);
3185
+ const r = $o(o, e, t, n);
3205
3186
  return r ? r.clone() : null;
3206
3187
  } catch {
3207
3188
  return null;
3208
3189
  }
3209
3190
  }
3210
- function Uo(o, e, t, n) {
3191
+ function $o(o, e, t, n) {
3211
3192
  let r = o;
3212
3193
  for (let i = 0; i < e.length; i += 1) {
3213
3194
  const s = e[i] ?? "", a = i === e.length - 1;
3214
- if (r = zo(r, s, a, t, n), !r)
3195
+ if (r = Uo(r, s, a, t, n), !r)
3215
3196
  return null;
3216
3197
  }
3217
3198
  return r;
3218
3199
  }
3219
- function zo(o, e, t, n, r) {
3200
+ function Uo(o, e, t, n, r) {
3220
3201
  if (!o)
3221
3202
  return null;
3222
3203
  const i = o.getItems();
@@ -3235,7 +3216,7 @@ function zo(o, e, t, n, r) {
3235
3216
  const a = s[e];
3236
3217
  return a instanceof p ? a : null;
3237
3218
  }
3238
- function Ye(o) {
3219
+ function Qe(o) {
3239
3220
  if (o === "/" || o === "")
3240
3221
  return [];
3241
3222
  const e = o.startsWith("/") ? o.slice(1) : o;
@@ -3277,7 +3258,7 @@ function H(o) {
3277
3258
  function Q(o) {
3278
3259
  return o == null ? new p().setValue(null) : o.clone();
3279
3260
  }
3280
- class Vo {
3261
+ class zo {
3281
3262
  constructor(e) {
3282
3263
  this.path = e;
3283
3264
  }
@@ -3339,7 +3320,7 @@ class Vo {
3339
3320
  return this.cutOff;
3340
3321
  }
3341
3322
  }
3342
- class Ho {
3323
+ class Vo {
3343
3324
  scopesMap = /* @__PURE__ */ new Map();
3344
3325
  rootEmissionList = [];
3345
3326
  scopes() {
@@ -3347,7 +3328,7 @@ class Ho {
3347
3328
  }
3348
3329
  scope(e) {
3349
3330
  let t = this.scopesMap.get(e);
3350
- return t || (t = new Vo(e), this.scopesMap.set(e, t)), t;
3331
+ return t || (t = new zo(e), this.scopesMap.set(e, t)), t;
3351
3332
  }
3352
3333
  existingScope(e) {
3353
3334
  return this.scopesMap.get(e);
@@ -3365,33 +3346,33 @@ class Ho {
3365
3346
  this.scopesMap.delete(e);
3366
3347
  }
3367
3348
  }
3368
- function Bt(o) {
3349
+ function At(o) {
3369
3350
  return Math.floor((o + 99) / 100);
3370
3351
  }
3371
- function Ko(o) {
3352
+ function Ho(o) {
3372
3353
  const e = R(o);
3373
3354
  return e === "/" ? 0 : e.split("/").length - 1;
3374
3355
  }
3375
- function Wo(o) {
3356
+ function Ko(o) {
3376
3357
  return 40 + 5 * Math.max(0, o);
3377
3358
  }
3378
- function qo(o, e) {
3379
- return 8 + Ko(o) + Bt(e);
3359
+ function Wo(o, e) {
3360
+ return 8 + Ho(o) + At(e);
3380
3361
  }
3381
- const Go = 1e3, jo = 5, Jo = 50, Qo = 2, Yo = 10, Zo = 10, Xo = 10, ei = 20, ti = 20, ni = 30, ri = 30, oi = 100;
3382
- function ii(o) {
3362
+ const qo = 1e3, Go = 5, jo = 50, Jo = 2, Qo = 10, Yo = 10, Zo = 10, Xo = 20, ei = 20, ti = 30, ni = 30, ri = 100;
3363
+ function oi(o) {
3383
3364
  return 50 + 10 * o;
3384
3365
  }
3385
- function si(o) {
3366
+ function ii(o) {
3386
3367
  return 20 + o;
3387
3368
  }
3388
- function ai(o) {
3369
+ function si(o) {
3389
3370
  return 10 * o;
3390
3371
  }
3391
- function ci(o) {
3372
+ function ai(o) {
3392
3373
  return 20 + o;
3393
3374
  }
3394
- class li {
3375
+ class ci {
3395
3376
  constructor(e) {
3396
3377
  this.blue = e;
3397
3378
  }
@@ -3403,69 +3384,69 @@ class li {
3403
3384
  this.total += e;
3404
3385
  }
3405
3386
  chargeScopeEntry(e) {
3406
- this.add(ii(this.scopeDepth(e)));
3387
+ this.add(oi(this.scopeDepth(e)));
3407
3388
  }
3408
3389
  chargeInitialization() {
3409
- this.add(Go);
3390
+ this.add(qo);
3410
3391
  }
3411
3392
  chargeChannelMatchAttempt() {
3412
- this.add(jo);
3393
+ this.add(Go);
3413
3394
  }
3414
3395
  chargeHandlerOverhead() {
3415
- this.add(Jo);
3396
+ this.add(jo);
3416
3397
  }
3417
3398
  chargeBoundaryCheck() {
3418
- this.add(Qo);
3399
+ this.add(Jo);
3419
3400
  }
3420
3401
  chargePatchAddOrReplace(e) {
3421
- this.add(si(this.payloadSizeCharge(e)));
3402
+ this.add(ii(this.payloadSizeCharge(e)));
3422
3403
  }
3423
3404
  chargePatchRemove() {
3424
- this.add(Yo);
3405
+ this.add(Qo);
3425
3406
  }
3426
3407
  chargeCascadeRouting(e) {
3427
- e > 0 && this.add(ai(e));
3408
+ e > 0 && this.add(si(e));
3428
3409
  }
3429
3410
  chargeEmitEvent(e) {
3430
- this.add(ci(this.payloadSizeCharge(e)));
3411
+ this.add(ai(this.payloadSizeCharge(e)));
3431
3412
  }
3432
3413
  chargeBridge() {
3433
- this.add(Zo);
3414
+ this.add(Yo);
3434
3415
  }
3435
3416
  chargeDrainEvent() {
3436
- this.add(Xo);
3417
+ this.add(Zo);
3437
3418
  }
3438
3419
  chargeCheckpointUpdate() {
3439
- this.add(ei);
3420
+ this.add(Xo);
3440
3421
  }
3441
3422
  chargeTerminationMarker() {
3442
- this.add(ti);
3423
+ this.add(ei);
3443
3424
  }
3444
3425
  chargeLifecycleDelivery() {
3445
- this.add(ni);
3426
+ this.add(ti);
3446
3427
  }
3447
3428
  chargeFatalTerminationOverhead() {
3448
- this.add(oi);
3429
+ this.add(ri);
3449
3430
  }
3450
3431
  chargeTriggerEventBase() {
3451
- this.add(ri);
3432
+ this.add(ni);
3452
3433
  }
3453
3434
  chargeUpdateDocumentBase(e) {
3454
- this.add(Wo(e));
3435
+ this.add(Ko(e));
3455
3436
  }
3456
3437
  chargeDocumentSnapshot(e, t) {
3457
3438
  const n = t ? _e(this.blue, t) : 0;
3458
- this.add(qo(e, n));
3439
+ this.add(Wo(e, n));
3459
3440
  }
3460
3441
  chargeWasmGas(e) {
3461
- const t = cn(e);
3442
+ const t = an(e);
3462
3443
  t > 0 && this.add(t);
3463
3444
  }
3464
3445
  payloadSizeCharge(e) {
3465
3446
  if (!e)
3466
3447
  return 0;
3467
3448
  const t = _e(this.blue, e);
3468
- return Bt(t);
3449
+ return At(t);
3469
3450
  }
3470
3451
  scopeDepth(e) {
3471
3452
  const t = w(e);
@@ -3477,12 +3458,12 @@ class li {
3477
3458
  return n;
3478
3459
  }
3479
3460
  }
3480
- class ui {
3461
+ class li {
3481
3462
  constructor(e, t) {
3482
- this.documentRef = e, this.blueRef = t, this.patchEngine = new Fo(this.documentRef), this.meter = new li(this.blueRef);
3463
+ this.documentRef = e, this.blueRef = t, this.patchEngine = new xo(this.documentRef), this.meter = new ci(this.blueRef);
3483
3464
  }
3484
3465
  patchEngine;
3485
- emissionRegistry = new Ho();
3466
+ emissionRegistry = new Vo();
3486
3467
  meter;
3487
3468
  runTerminated = !1;
3488
3469
  document() {
@@ -3531,15 +3512,15 @@ class ui {
3531
3512
  return this.patchEngine.applyPatch(e, t);
3532
3513
  }
3533
3514
  }
3534
- const hi = S["Core/Processing Initialized Marker"], di = S["Core/Document Update"];
3535
- class pi {
3515
+ const ui = S["Core/Processing Initialized Marker"], hi = S["Core/Document Update"];
3516
+ class di {
3536
3517
  constructor(e, t, n, r) {
3537
- this.contractLoader = e, this.registry = t, this.runtimeRef = new ui(r, n);
3538
- const i = (s) => ht(this.runtimeRef.blue(), s);
3539
- this.checkpointManager = new bo(
3518
+ this.contractLoader = e, this.registry = t, this.runtimeRef = new li(r, n);
3519
+ const i = (s) => ut(this.runtimeRef.blue(), s);
3520
+ this.checkpointManager = new wo(
3540
3521
  this.runtimeRef,
3541
3522
  i
3542
- ), this.terminationService = new Do(this.runtimeRef), this.channelRunner = new Io(
3523
+ ), this.terminationService = new Do(this.runtimeRef), this.channelRunner = new bo(
3543
3524
  this.runtimeRef,
3544
3525
  this.checkpointManager,
3545
3526
  {
@@ -3569,7 +3550,7 @@ class pi {
3569
3550
  canonicalSignature: i,
3570
3551
  channelProcessorFor: (s) => this.lookupChannelProcessor(s)
3571
3552
  }
3572
- ), this.scopeExecutor = new No({
3553
+ ), this.scopeExecutor = new Oo({
3573
3554
  runtime: this.runtimeRef,
3574
3555
  contractLoader: this.contractLoader,
3575
3556
  channelRunner: this.channelRunner,
@@ -3620,7 +3601,7 @@ class pi {
3620
3601
  );
3621
3602
  }
3622
3603
  createContext(e, t, n, r = !1, i = !1) {
3623
- return new fi(
3604
+ return new pi(
3624
3605
  this,
3625
3606
  t,
3626
3607
  e,
@@ -3631,7 +3612,7 @@ class pi {
3631
3612
  }
3632
3613
  result() {
3633
3614
  const e = this.runtimeRef.document().clone(), t = this.runtimeRef.rootEmissions().map((n) => n.clone());
3634
- return Xe.of(
3615
+ return Ze.of(
3635
3616
  e,
3636
3617
  t,
3637
3618
  this.runtimeRef.totalGas()
@@ -3761,8 +3742,8 @@ class pi {
3761
3742
  return this.registry.lookupChannelForNode(this.runtimeRef.blue(), e) ?? null;
3762
3743
  }
3763
3744
  createDocumentUpdateEvent(e, t) {
3764
- const n = Qt(t, e.path), r = e.before != null ? e.before.clone() : new p().setValue(null), i = e.after != null ? e.after.clone() : new p().setValue(null), s = new p().setType(
3765
- new p().setBlueId(di)
3745
+ const n = Jt(t, e.path), r = e.before != null ? e.before.clone() : new p().setValue(null), i = e.after != null ? e.after.clone() : new p().setValue(null), s = new p().setType(
3746
+ new p().setBlueId(hi)
3766
3747
  );
3767
3748
  return s.setProperties({
3768
3749
  op: new p().setValue(e.op),
@@ -3802,7 +3783,7 @@ class se {
3802
3783
  return this.initializationMarker(e) != null;
3803
3784
  }
3804
3785
  createExecution(e) {
3805
- return new pi(
3786
+ return new di(
3806
3787
  this.contractLoader,
3807
3788
  this.registry,
3808
3789
  this.blue,
@@ -3817,7 +3798,7 @@ class se {
3817
3798
  return t.result();
3818
3799
  if (r instanceof F) {
3819
3800
  const i = e.clone();
3820
- return Xe.capabilityFailure(
3801
+ return Ze.capabilityFailure(
3821
3802
  i,
3822
3803
  r.message ?? null
3823
3804
  );
@@ -3837,7 +3818,7 @@ class se {
3837
3818
  "Initialization Marker must be a BlueNode"
3838
3819
  )
3839
3820
  );
3840
- if (n.getType()?.getBlueId() !== hi)
3821
+ if (n.getType()?.getBlueId() !== ui)
3841
3822
  throw new E(
3842
3823
  "Initialization Marker must declare type 'Processing Initialized Marker'",
3843
3824
  C.illegalState(
@@ -3918,7 +3899,7 @@ class se {
3918
3899
  }
3919
3900
  }
3920
3901
  }
3921
- class fi {
3902
+ class pi {
3922
3903
  constructor(e, t, n, r, i, s) {
3923
3904
  this.execution = e, this.bundle = t, this.scopePathValue = n, this.eventNode = r, this.allowTerminatedWork = i, this.allowReservedMutation = s;
3924
3905
  }
@@ -4033,7 +4014,7 @@ class Dt {
4033
4014
  return e;
4034
4015
  }
4035
4016
  }
4036
- function mi() {
4017
+ function fi() {
4037
4018
  return new L.SequentialMergingProcessor([
4038
4019
  new L.ValuePropagator(),
4039
4020
  new Dt(),
@@ -4044,17 +4025,17 @@ function mi() {
4044
4025
  new L.BasicTypesVerifier()
4045
4026
  ]);
4046
4027
  }
4047
- const gi = new zt({
4048
- repositories: [Ze],
4049
- mergingProcessor: mi()
4028
+ const mi = new Ut({
4029
+ repositories: [Ye],
4030
+ mergingProcessor: fi()
4050
4031
  });
4051
- class Ei {
4032
+ class gi {
4052
4033
  blue;
4053
4034
  registryRef;
4054
4035
  contractLoaderRef;
4055
4036
  engine;
4056
4037
  constructor(e) {
4057
- this.registryRef = e?.registry ?? ue.create().registerDefaults().build(), this.blue = e?.blue ?? gi, this.contractLoaderRef = new yo(this.registryRef, this.blue), this.engine = new se(
4038
+ this.registryRef = e?.registry ?? ue.create().registerDefaults().build(), this.blue = e?.blue ?? mi, this.contractLoaderRef = new Eo(this.registryRef, this.blue), this.engine = new se(
4058
4039
  this.contractLoaderRef,
4059
4040
  this.registryRef,
4060
4041
  this.blue
@@ -4087,10 +4068,10 @@ class Ei {
4087
4068
  return this.contractLoaderRef;
4088
4069
  }
4089
4070
  static builder() {
4090
- return new yi();
4071
+ return new Ei();
4091
4072
  }
4092
4073
  }
4093
- class yi {
4074
+ class Ei {
4094
4075
  contractRegistry;
4095
4076
  blueInstance;
4096
4077
  constructor() {
@@ -4106,117 +4087,117 @@ class yi {
4106
4087
  return this.blueInstance = e, this;
4107
4088
  }
4108
4089
  build() {
4109
- return new Ei({
4090
+ return new gi({
4110
4091
  registry: this.contractRegistry,
4111
4092
  blue: this.blueInstance
4112
4093
  });
4113
4094
  }
4114
4095
  }
4115
- const zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4096
+ const Ui = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4116
4097
  __proto__: null,
4117
4098
  ExpressionPreserver: Dt
4118
4099
  }, Symbol.toStringTag, { value: "Module" }));
4119
4100
  export {
4120
- kt as ActorPolicyLiteralValidationError,
4121
- Qr as ChannelBinding,
4122
- Io as ChannelRunner,
4123
- bo as CheckpointManager,
4124
- wo as CheckpointRecord,
4125
- ft as CodeBlockEvaluationError,
4101
+ It as ActorPolicyLiteralValidationError,
4102
+ Jr as ChannelBinding,
4103
+ bo as ChannelRunner,
4104
+ wo as CheckpointManager,
4105
+ vo as CheckpointRecord,
4106
+ pt as CodeBlockEvaluationError,
4126
4107
  W as ContractBundle,
4127
- Zr as ContractBundleBuilder,
4128
- yo as ContractLoader,
4129
- ur as ContractProcessorRegistry,
4108
+ Yr as ContractBundleBuilder,
4109
+ Eo as ContractLoader,
4110
+ lr as ContractProcessorRegistry,
4130
4111
  ue as ContractProcessorRegistryBuilder,
4131
- Xe as DocumentProcessingResult,
4132
- ui as DocumentProcessingRuntime,
4133
- Ei as DocumentProcessor,
4134
- yi as DocumentProcessorBuilder,
4135
- Ho as EmissionRegistry,
4136
- li as GasMeter,
4137
- Yr as HandlerBinding,
4138
- D as KEY_CHECKPOINT,
4139
- et as KEY_EMBEDDED,
4140
- tt as KEY_INITIALIZED,
4141
- nt as KEY_TERMINATED,
4142
- zi as MergingProcessors,
4112
+ Ze as DocumentProcessingResult,
4113
+ li as DocumentProcessingRuntime,
4114
+ gi as DocumentProcessor,
4115
+ Ei as DocumentProcessorBuilder,
4116
+ Vo as EmissionRegistry,
4117
+ ci as GasMeter,
4118
+ Qr as HandlerBinding,
4119
+ B as KEY_CHECKPOINT,
4120
+ Xe as KEY_EMBEDDED,
4121
+ et as KEY_INITIALIZED,
4122
+ tt as KEY_TERMINATED,
4123
+ Ui as MergingProcessors,
4143
4124
  Ie as PROCESSOR_MANAGED_CHANNEL_BLUE_IDS,
4144
- Fo as PatchEngine,
4145
- Li as ProcessorContractConstants,
4125
+ xo as PatchEngine,
4126
+ _i as ProcessorContractConstants,
4146
4127
  se as ProcessorEngine,
4147
4128
  C as ProcessorErrors,
4148
- pi as ProcessorExecution,
4149
- fi as ProcessorExecutionContext,
4129
+ di as ProcessorExecution,
4130
+ pi as ProcessorExecutionContext,
4150
4131
  E as ProcessorFatalError,
4151
- xi as ProcessorPointerConstants,
4132
+ Li as ProcessorPointerConstants,
4152
4133
  ke as QuickJSEvaluator,
4153
- it as RELATIVE_CHECKPOINT,
4134
+ ot as RELATIVE_CHECKPOINT,
4154
4135
  G as RELATIVE_CONTRACTS,
4155
- Jt as RELATIVE_EMBEDDED,
4136
+ jt as RELATIVE_EMBEDDED,
4156
4137
  Ee as RELATIVE_INITIALIZED,
4157
- ot as RELATIVE_TERMINATED,
4138
+ rt as RELATIVE_TERMINATED,
4158
4139
  be as RESERVED_CONTRACT_KEYS,
4159
4140
  ie as RunTerminationError,
4160
- No as ScopeExecutor,
4161
- Vo as ScopeRuntimeContext,
4141
+ Oo as ScopeExecutor,
4142
+ zo as ScopeRuntimeContext,
4162
4143
  Do as TerminationService,
4163
- It as actorPolicyMarkerSchema,
4164
- Ln as actorPolicyRuleSchema,
4165
- Ai as andThen,
4166
- ht as canonicalSignature,
4144
+ bt as actorPolicyMarkerSchema,
4145
+ _n as actorPolicyRuleSchema,
4146
+ Ni as andThen,
4147
+ ut as canonicalSignature,
4167
4148
  _e as canonicalSize,
4168
4149
  U as channelContractBaseSchema,
4169
- Un as channelEventCheckpointSchema,
4170
- vt as compositeTimelineChannelSchema,
4171
- yn as containsExpression,
4150
+ $n as channelEventCheckpointSchema,
4151
+ St as compositeTimelineChannelSchema,
4152
+ En as containsExpression,
4172
4153
  Te as contractBaseSchema,
4173
- mi as createDefaultMergingProcessor,
4174
- Et as createPicomatchShouldResolve,
4175
- Qn as documentAnchorsMarkerSchema,
4176
- Xn as documentLinksMarkerSchema,
4177
- bn as documentUpdateChannelSchema,
4178
- kn as embeddedNodeChannelSchema,
4179
- Ht as err,
4180
- gt as evaluateQuickJSExpression,
4181
- Cn as extractExpressionContent,
4182
- Ct as handlerContractBaseSchema,
4183
- Vn as initializationMarkerSchema,
4184
- Mi as isErr,
4154
+ fi as createDefaultMergingProcessor,
4155
+ gt as createPicomatchShouldResolve,
4156
+ Jn as documentAnchorsMarkerSchema,
4157
+ Zn as documentLinksMarkerSchema,
4158
+ wn as documentUpdateChannelSchema,
4159
+ In as embeddedNodeChannelSchema,
4160
+ Vt as err,
4161
+ mt as evaluateQuickJSExpression,
4162
+ yn as extractExpressionContent,
4163
+ yt as handlerContractBaseSchema,
4164
+ zn as initializationMarkerSchema,
4165
+ Ri as isErr,
4185
4166
  re as isExpression,
4186
- Ri as isOk,
4187
- rt as isProcessorManagedChannelBlueId,
4188
- jt as isReservedContractKey,
4189
- Fi as joinRelativePointers,
4190
- $i as jsonPatchSchema,
4191
- Pn as lifecycleChannelSchema,
4192
- Oi as map,
4193
- Ni as mapErr,
4167
+ Pi as isOk,
4168
+ nt as isProcessorManagedChannelBlueId,
4169
+ Gt as isReservedContractKey,
4170
+ xi as joinRelativePointers,
4171
+ Fi as jsonPatchSchema,
4172
+ Tn as lifecycleChannelSchema,
4173
+ Mi as map,
4174
+ Oi as mapErr,
4194
4175
  M as markerContractBaseSchema,
4195
- _i as match,
4196
- tr as myosParticipantsOrchestrationMarkerSchema,
4197
- rr as myosSessionInteractionMarkerSchema,
4198
- An as myosTimelineChannelSchema,
4199
- ir as myosWorkerAgencyMarkerSchema,
4176
+ Bi as match,
4177
+ er as myosParticipantsOrchestrationMarkerSchema,
4178
+ nr as myosSessionInteractionMarkerSchema,
4179
+ Nn as myosTimelineChannelSchema,
4180
+ or as myosWorkerAgencyMarkerSchema,
4200
4181
  R as normalizePointer,
4201
4182
  w as normalizeScope,
4202
- Vt as ok,
4203
- Gn as operationMarkerSchema,
4204
- Kn as processEmbeddedMarkerSchema,
4205
- qn as processingTerminatedMarkerSchema,
4206
- ct as relativeCheckpointLastEvent,
4207
- lt as relativeCheckpointLastSignature,
4183
+ zt as ok,
4184
+ qn as operationMarkerSchema,
4185
+ Hn as processEmbeddedMarkerSchema,
4186
+ Wn as processingTerminatedMarkerSchema,
4187
+ at as relativeCheckpointLastEvent,
4188
+ ct as relativeCheckpointLastSignature,
4208
4189
  ae as relativeContractsEntry,
4209
- Qt as relativizePointer,
4190
+ Jt as relativizePointer,
4210
4191
  oe as resolveNodeExpressions,
4211
4192
  k as resolvePointer,
4212
- Sn as resolveTemplateString,
4213
- cr as sequentialWorkflowOperationSchema,
4214
- sr as sequentialWorkflowSchema,
4215
- Ui as sequentialWorkflowStepSchema,
4216
- Be as stripSlashes,
4217
- On as timelineChannelSchema,
4218
- Mn as triggeredEventChannelSchema,
4219
- Bi as unwrapOr,
4193
+ Cn as resolveTemplateString,
4194
+ ar as sequentialWorkflowOperationSchema,
4195
+ ir as sequentialWorkflowSchema,
4196
+ $i as sequentialWorkflowStepSchema,
4197
+ De as stripSlashes,
4198
+ Mn as timelineChannelSchema,
4199
+ Rn as triggeredEventChannelSchema,
4200
+ Ai as unwrapOr,
4220
4201
  Di as unwrapOrElse,
4221
- Fn as validateActorPolicyNode
4202
+ xn as validateActorPolicyNode
4222
4203
  };