@blue-labs/sdk-dsl 3.10.0 → 4.0.0-rc.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.
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
- import { Blue as Xe, BlueNode as N, applyBlueNodePatch as et } from "@blue-labs/language";
2
- import { repository as me } from "@blue-repository/types";
1
+ import { createDefaultMergingProcessor as We } from "@blue-labs/document-processor";
2
+ import { reindexRepositoryForSemanticStorage as tt, Blue as nt, BlueNode as N, applyBlueNodePatch as st } from "@blue-labs/language";
3
+ import { repository as rt } from "@blue-repository/types";
3
4
  const K = {
4
5
  Text: "Text",
5
6
  Integer: "Integer",
@@ -11,7 +12,7 @@ const K = {
11
12
  function z(n) {
12
13
  return typeof n == "object" && n !== null && !Array.isArray(n);
13
14
  }
14
- function tt(n) {
15
+ function it(n) {
15
16
  const e = n.trim();
16
17
  if (e.length === 0)
17
18
  throw new Error("Pointer cannot be empty");
@@ -27,28 +28,28 @@ function ee(n) {
27
28
  function W(n) {
28
29
  return n.replace(/~/gu, "~0").replace(/\//gu, "~1");
29
30
  }
30
- function nt(n) {
31
+ function ot(n) {
31
32
  return n.replace(/~1/gu, "/").replace(/~0/gu, "~");
32
33
  }
33
34
  function ke(n) {
34
- const e = tt(n);
35
- return e === "/" ? [] : e.split("/").slice(1).map(nt);
35
+ const e = it(n);
36
+ return e === "/" ? [] : e.split("/").slice(1).map(ot);
36
37
  }
37
- function st(n, e) {
38
+ function at(n, e) {
38
39
  const t = n[e];
39
40
  if (z(t))
40
41
  return t;
41
42
  const s = {};
42
43
  return n[e] = s, s;
43
44
  }
44
- function rt(n, e) {
45
+ function ct(n, e) {
45
46
  const t = n[e];
46
47
  if (Array.isArray(t))
47
48
  return t;
48
49
  const s = [];
49
50
  return n[e] = s, s;
50
51
  }
51
- function it(n, e, t, s) {
52
+ function ut(n, e, t, s) {
52
53
  if (!t && e >= n.length)
53
54
  throw new Error(`Array index out of bounds while traversing: ${e}`);
54
55
  for (; n.length <= e; )
@@ -74,7 +75,7 @@ function Z(n, e, t, s = {}) {
74
75
  const g = i[p], k = i[p + 1], l = /^\d+$/.test(k);
75
76
  if (c) {
76
77
  const d = ee(g);
77
- o = it(
78
+ o = ut(
78
79
  c,
79
80
  d,
80
81
  r,
@@ -86,12 +87,12 @@ function Z(n, e, t, s = {}) {
86
87
  if (l) {
87
88
  if (!r && !Array.isArray(a))
88
89
  throw new Error(`Missing array segment '${g}'`);
89
- c = rt(o, g);
90
+ c = ct(o, g);
90
91
  continue;
91
92
  }
92
93
  if (!r && !z(a))
93
94
  throw new Error(`Missing object segment '${g}'`);
94
- o = st(o, g);
95
+ o = at(o, g);
95
96
  }
96
97
  const h = i[i.length - 1];
97
98
  if (c) {
@@ -128,7 +129,7 @@ function H(n, e) {
128
129
  }
129
130
  z(s) && delete s[r];
130
131
  }
131
- function ot(n, e) {
132
+ function lt(n, e) {
132
133
  const t = ke(e);
133
134
  if (t.length === 0)
134
135
  return n;
@@ -145,14 +146,14 @@ function ot(n, e) {
145
146
  }
146
147
  return s;
147
148
  }
148
- const at = /* @__PURE__ */ new Set([
149
+ const ht = /* @__PURE__ */ new Set([
149
150
  "name",
150
151
  "description",
151
152
  "type",
152
153
  "contracts",
153
154
  "policies"
154
155
  ]);
155
- function Ne(n, e, t, s = [], r = []) {
156
+ function Le(n, e, t, s = [], r = []) {
156
157
  return {
157
158
  key: n,
158
159
  title: e,
@@ -167,7 +168,7 @@ function V(n, e) {
167
168
  throw new Error(`${e} is required`);
168
169
  return t;
169
170
  }
170
- function ct(n, e) {
171
+ function pt(n, e) {
171
172
  if (!n || typeof n != "object" || Array.isArray(n))
172
173
  return null;
173
174
  const t = n;
@@ -178,7 +179,7 @@ function ct(n, e) {
178
179
  ) : [], o = Array.isArray(t.relatedContracts) ? t.relatedContracts.filter(
179
180
  (c) => typeof c == "string"
180
181
  ) : [];
181
- return Ne(
182
+ return Le(
182
183
  e,
183
184
  s,
184
185
  r,
@@ -186,7 +187,7 @@ function ct(n, e) {
186
187
  o
187
188
  );
188
189
  }
189
- class ut {
190
+ class dt {
190
191
  document;
191
192
  sections = /* @__PURE__ */ new Map();
192
193
  currentSection = null;
@@ -209,7 +210,7 @@ class ut {
209
210
  return H(this.document, e), this.untrackField(e), this;
210
211
  }
211
212
  getValue(e) {
212
- return ot(this.document, e);
213
+ return lt(this.document, e);
213
214
  }
214
215
  ensureContractsRoot() {
215
216
  const e = this.document.contracts;
@@ -245,12 +246,12 @@ class ut {
245
246
  throw new Error(
246
247
  `Already in section '${this.currentSection.key}'. Call endSection() first.`
247
248
  );
248
- const r = V(e, "section key"), i = this.sections.get(r), o = this.ensureContractsRoot()[r], c = i ?? ct(o, r);
249
+ const r = V(e, "section key"), i = this.sections.get(r), o = this.ensureContractsRoot()[r], c = i ?? pt(o, r);
249
250
  if (!i && o !== void 0 && !c)
250
251
  throw new Error(
251
252
  `Section key '${r}' conflicts with an existing non-section contract.`
252
253
  );
253
- return this.currentSection = c ?? Ne(
254
+ return this.currentSection = c ?? Le(
254
255
  r,
255
256
  V(t ?? r, "section title"),
256
257
  s?.trim() || void 0
@@ -315,7 +316,7 @@ class ut {
315
316
  if (!t.startsWith("/"))
316
317
  return;
317
318
  const s = t.split("/")[1];
318
- if (s && at.has(s))
319
+ if (s && ht.has(s))
319
320
  throw new Error(`Path points at reserved root key: /${s}`);
320
321
  }
321
322
  syncPersistedSection(e) {
@@ -328,21 +329,39 @@ class ut {
328
329
  };
329
330
  }
330
331
  }
331
- const te = new Xe({
332
- repositories: [me]
332
+ const re = tt(
333
+ rt,
334
+ {
335
+ mergingProcessor: We()
336
+ }
337
+ );
338
+ Oe("core");
339
+ Oe("conversation");
340
+ Oe("myos");
341
+ function Oe(n) {
342
+ const e = re.packages[n];
343
+ if (!e)
344
+ throw new Error(
345
+ `Missing reindexed Blue repository package ${n}.`
346
+ );
347
+ return e.aliases;
348
+ }
349
+ const te = new nt({
350
+ repositories: [re],
351
+ mergingProcessor: We()
333
352
  });
334
- function re(n) {
353
+ function ie(n) {
335
354
  return te.jsonValueToNode(n);
336
355
  }
337
- function ae(n) {
338
- if (Le(n))
356
+ function ce(n) {
357
+ if (Fe(n))
339
358
  return structuredClone(n);
340
- const e = te.restoreInlineTypes(We(n));
359
+ const e = te.restoreInlineTypes(Ue(n));
341
360
  return te.nodeToJson(e, "simple");
342
361
  }
343
- function ns(n) {
362
+ function as(n) {
344
363
  const e = te.restoreInlineTypes(
345
- Le(n) ? re(n) : We(n)
364
+ Fe(n) ? ie(n) : Ue(n)
346
365
  );
347
366
  return te.nodeToYaml(e, "simple");
348
367
  }
@@ -350,13 +369,13 @@ function A(n) {
350
369
  const e = n.trim();
351
370
  return e.startsWith("${") && e.endsWith("}") ? e : `\${${e}}`;
352
371
  }
353
- function We(n) {
354
- return lt(n) ? n.buildDocument() : n;
372
+ function Ue(n) {
373
+ return mt(n) ? n.buildDocument() : n;
355
374
  }
356
- function lt(n) {
375
+ function mt(n) {
357
376
  return typeof n == "object" && n !== null && typeof n.buildDocument == "function";
358
377
  }
359
- function Le(n) {
378
+ function Fe(n) {
360
379
  return typeof n == "object" && n !== null && !Array.isArray(n) && !(n instanceof N) && typeof n.buildDocument != "function";
361
380
  }
362
381
  function m(n) {
@@ -384,37 +403,37 @@ function m(n) {
384
403
  return e;
385
404
  }
386
405
  }
387
- function ue(n) {
406
+ function le(n) {
388
407
  return typeof n == "object" && n !== null;
389
408
  }
390
- function ht() {
391
- if (!ue(me))
409
+ function ft() {
410
+ if (!le(re))
392
411
  return [];
393
- const n = me.packages;
394
- return ue(n) ? Object.values(n).filter(ue) : [];
412
+ const n = re.packages;
413
+ return le(n) ? Object.values(n).filter(le) : [];
395
414
  }
396
- function pt() {
415
+ function gt() {
397
416
  const n = new Set(Object.values(K));
398
- for (const e of ht())
417
+ for (const e of ft())
399
418
  if (e.aliases)
400
419
  for (const t of Object.keys(e.aliases))
401
420
  n.add(t);
402
421
  return n;
403
422
  }
404
- const dt = pt(), Y = {
423
+ const yt = gt(), Y = {
405
424
  NamedEvent: "Common/Named Event"
406
425
  };
407
- function mt(n) {
408
- return dt.has(n.trim());
426
+ function Ct(n) {
427
+ return yt.has(n.trim());
409
428
  }
410
- function Ue(n, e) {
429
+ function _e(n, e) {
411
430
  const t = n.trim();
412
- if (!mt(t))
431
+ if (!Ct(t))
413
432
  throw new Error(
414
433
  `${e} requires repository type alias '${t}', but this alias is not available in the currently installed @blue-repository/types package.`
415
434
  );
416
435
  }
417
- function Fe(n) {
436
+ function Ke(n) {
418
437
  return m(n);
419
438
  }
420
439
  function v(n, e) {
@@ -423,10 +442,10 @@ function v(n, e) {
423
442
  throw new Error(`${e} is required`);
424
443
  return t;
425
444
  }
426
- function le(n) {
445
+ function he(n) {
427
446
  return n.replace(/[^A-Za-z0-9]+/gu, "_").replace(/^_+|_+$/gu, "").toUpperCase();
428
447
  }
429
- class ft {
448
+ class vt {
430
449
  constructor(e, t) {
431
450
  this.parent = e, this.taskName = t;
432
451
  }
@@ -437,7 +456,7 @@ class ft {
437
456
  return t.length > 0 && this.instructions.push(t), this;
438
457
  }
439
458
  expects(e) {
440
- return this.expectedResponses.push(Fe(e)), this;
459
+ return this.expectedResponses.push(Ke(e)), this;
441
460
  }
442
461
  done() {
443
462
  if (this.instructions.length === 0)
@@ -451,7 +470,7 @@ class ft {
451
470
  }), this.parent;
452
471
  }
453
472
  }
454
- class gt {
473
+ class St {
455
474
  constructor(e, t) {
456
475
  this.parent = e;
457
476
  const s = v(t, "ai name");
@@ -459,9 +478,9 @@ class gt {
459
478
  name: s,
460
479
  statusPath: `/ai/${s}/status`,
461
480
  contextPath: `/ai/${s}/context`,
462
- requesterId: le(s),
463
- requestId: `REQ_${le(s)}`,
464
- subscriptionId: `SUB_${le(s)}`,
481
+ requesterId: he(s),
482
+ requestId: `REQ_${he(s)}`,
483
+ subscriptionId: `SUB_${he(s)}`,
465
484
  permissionTiming: "onInit",
466
485
  tasks: {}
467
486
  };
@@ -495,7 +514,7 @@ class gt {
495
514
  return this.definition.permissionTiming = "onInit", this.definition.permissionTriggerEventType = void 0, this.definition.permissionTriggerDocPath = void 0, this;
496
515
  }
497
516
  requestPermissionOnEvent(e) {
498
- return this.definition.permissionTiming = "onEvent", this.definition.permissionTriggerEventType = Fe(e), this.definition.permissionTriggerDocPath = void 0, this;
517
+ return this.definition.permissionTiming = "onEvent", this.definition.permissionTriggerEventType = Ke(e), this.definition.permissionTriggerDocPath = void 0, this;
499
518
  }
500
519
  requestPermissionOnDocChange(e) {
501
520
  return this.definition.permissionTiming = "onDocChange", this.definition.permissionTriggerDocPath = v(
@@ -507,7 +526,7 @@ class gt {
507
526
  return this.definition.permissionTiming = "manual", this.definition.permissionTriggerDocPath = void 0, this.definition.permissionTriggerEventType = void 0, this;
508
527
  }
509
528
  task(e) {
510
- return new ft(this, v(e, "task name"));
529
+ return new vt(this, v(e, "task name"));
511
530
  }
512
531
  registerTask(e) {
513
532
  if (this.definition.tasks[e.name])
@@ -524,11 +543,11 @@ function D(n, e) {
524
543
  throw new Error(`${e} is required`);
525
544
  return t;
526
545
  }
527
- function yt(n) {
546
+ function kt(n) {
528
547
  const e = n.replace(/[^A-Za-z0-9]+/gu, "_").replace(/^_+|_+$/gu, "").toUpperCase();
529
548
  return e.length > 0 ? e : "ACCESS";
530
549
  }
531
- class Ct {
550
+ class Ot {
532
551
  constructor(e, t) {
533
552
  this.parent = e, this.name = t;
534
553
  }
@@ -605,7 +624,7 @@ class Ct {
605
624
  return this.permissionTimingValue = "manual", this.permissionTriggerDocPathValue = void 0, this.permissionTriggerEventTypeValue = void 0, this;
606
625
  }
607
626
  done() {
608
- const e = yt(this.name), t = {
627
+ const e = kt(this.name), t = {
609
628
  name: this.name,
610
629
  token: e,
611
630
  targetSessionId: D(
@@ -714,11 +733,11 @@ function R(n, e) {
714
733
  throw new Error(`${e} is required`);
715
734
  return t;
716
735
  }
717
- function vt(n) {
736
+ function bt(n) {
718
737
  const e = n.replace(/[^A-Za-z0-9]+/gu, "_").replace(/^_+|_+$/gu, "").toUpperCase();
719
738
  return e.length > 0 ? e : "LINKED_ACCESS";
720
739
  }
721
- class St {
740
+ class It {
722
741
  constructor(e, t) {
723
742
  this.parent = e, this.name = t;
724
743
  }
@@ -755,7 +774,7 @@ class St {
755
774
  read: !0,
756
775
  operations: []
757
776
  };
758
- return this.linksValue.set(t, s), new kt(this, s);
777
+ return this.linksValue.set(t, s), new Pt(this, s);
759
778
  }
760
779
  requestPermissionOnInit() {
761
780
  return this.permissionTimingValue = "onInit", this.permissionTriggerEventTypeValue = void 0, this.permissionTriggerDocPathValue = void 0, this;
@@ -775,7 +794,7 @@ class St {
775
794
  ), this;
776
795
  }
777
796
  done() {
778
- const e = vt(this.name);
797
+ const e = bt(this.name);
779
798
  if (this.linksValue.size === 0)
780
799
  throw new Error("At least one linked access link must be configured");
781
800
  const t = {};
@@ -866,7 +885,7 @@ class St {
866
885
  );
867
886
  }
868
887
  }
869
- class kt {
888
+ class Pt {
870
889
  constructor(e, t) {
871
890
  this.parent = e, this.draft = t;
872
891
  }
@@ -890,11 +909,11 @@ function U(n, e) {
890
909
  throw new Error(`${e} is required`);
891
910
  return t;
892
911
  }
893
- function Ot(n) {
912
+ function qt(n) {
894
913
  const e = n.replace(/[^A-Za-z0-9]+/gu, "_").replace(/^_+|_+$/gu, "").toUpperCase();
895
914
  return e.length > 0 ? e : "AGENCY";
896
915
  }
897
- function bt(n, e) {
916
+ function At(n, e) {
898
917
  return n.map((t) => ({
899
918
  type: "MyOS/Worker Agency Permission",
900
919
  workerType: t,
@@ -904,7 +923,7 @@ function bt(n, e) {
904
923
  }
905
924
  }));
906
925
  }
907
- class It {
926
+ class Rt {
908
927
  constructor(e, t) {
909
928
  this.parent = e, this.name = t;
910
929
  }
@@ -953,7 +972,7 @@ class It {
953
972
  return this.permissionTimingValue = "manual", this.permissionTriggerDocPathValue = void 0, this.permissionTriggerEventTypeValue = void 0, this;
954
973
  }
955
974
  done() {
956
- const e = Ot(this.name);
975
+ const e = qt(this.name);
957
976
  if (this.allowedTypesValue.length === 0)
958
977
  throw new Error("agency(...).allowedTypes(...) is required");
959
978
  const t = {
@@ -975,7 +994,7 @@ class It {
975
994
  applyAutoWiring(e, t) {
976
995
  e.statusPath && t.field(e.statusPath, "pending");
977
996
  const s = `agency${e.token}`, r = (i) => {
978
- const o = bt(
997
+ const o = At(
979
998
  e.allowedTypes,
980
999
  e.allowedOperations
981
1000
  );
@@ -1025,7 +1044,7 @@ class It {
1025
1044
  );
1026
1045
  }
1027
1046
  }
1028
- class Pt {
1047
+ class Tt {
1029
1048
  bindings = {};
1030
1049
  bind(e, t) {
1031
1050
  const s = e.trim();
@@ -1041,16 +1060,16 @@ class Pt {
1041
1060
  return structuredClone(this.bindings);
1042
1061
  }
1043
1062
  }
1044
- function _e(n, e) {
1063
+ function Ge(n, e) {
1045
1064
  const t = n.trim();
1046
1065
  if (t.length === 0)
1047
1066
  throw new Error(`${e} is required`);
1048
1067
  return t;
1049
1068
  }
1050
- class qt {
1069
+ class wt {
1051
1070
  values = {};
1052
1071
  set(e, t) {
1053
- return this.values[_e(e, "capability name")] = t, this;
1072
+ return this.values[Ge(e, "capability name")] = t, this;
1054
1073
  }
1055
1074
  participantsOrchestration(e) {
1056
1075
  return this.set("participantsOrchestration", e);
@@ -1065,12 +1084,12 @@ class qt {
1065
1084
  return structuredClone(this.values);
1066
1085
  }
1067
1086
  }
1068
- class At {
1087
+ class Et {
1069
1088
  defaultMessageValue;
1070
1089
  perChannelMessages = {};
1071
1090
  capabilitiesValue = {};
1072
1091
  bootstrapAssignee(e) {
1073
- throw _e(e, "bootstrapAssignee channelKey"), new Error(
1092
+ throw Ge(e, "bootstrapAssignee channelKey"), new Error(
1074
1093
  "agency start worker session options do not support bootstrapAssignee; use the agency onBehalfOf channel plus initialMessages/capabilities"
1075
1094
  );
1076
1095
  }
@@ -1086,7 +1105,7 @@ class At {
1086
1105
  capabilities(e) {
1087
1106
  if (typeof e != "function")
1088
1107
  throw new Error("capabilities customizer is required");
1089
- const t = new qt();
1108
+ const t = new wt();
1090
1109
  return e(t), Object.assign(this.capabilitiesValue, t.build()), this;
1091
1110
  }
1092
1111
  build() {
@@ -1097,7 +1116,7 @@ class At {
1097
1116
  }), Object.keys(this.capabilitiesValue).length > 0 && (e.capabilities = structuredClone(this.capabilitiesValue)), e;
1098
1117
  }
1099
1118
  }
1100
- class Rt {
1119
+ class Vt {
1101
1120
  constructor(e, t) {
1102
1121
  this.parent = e, this.path = t;
1103
1122
  }
@@ -1154,10 +1173,10 @@ class Rt {
1154
1173
  });
1155
1174
  }
1156
1175
  }
1157
- function Tt(n) {
1176
+ function Dt(n) {
1158
1177
  return { type: n };
1159
1178
  }
1160
- class wt {
1179
+ class Mt {
1161
1180
  constructor(e, t) {
1162
1181
  this.parent = e, this.key = t;
1163
1182
  }
@@ -1176,7 +1195,7 @@ class wt {
1176
1195
  return this.descriptionText(e);
1177
1196
  }
1178
1197
  requestType(e) {
1179
- return this.requestSchemaValue = Tt(m(e)), this.clearRequest = !1, this;
1198
+ return this.requestSchemaValue = Dt(m(e)), this.clearRequest = !1, this;
1180
1199
  }
1181
1200
  requestSchema(e) {
1182
1201
  return this.requestSchemaValue = structuredClone(e), this.clearRequest = !1, this;
@@ -1209,11 +1228,11 @@ class wt {
1209
1228
  });
1210
1229
  }
1211
1230
  }
1212
- function Et(n) {
1231
+ function $t(n) {
1213
1232
  return structuredClone(n);
1214
1233
  }
1215
- function Oe(n) {
1216
- return Et(n);
1234
+ function be(n) {
1235
+ return $t(n);
1217
1236
  }
1218
1237
  class x {
1219
1238
  readValue;
@@ -1241,13 +1260,13 @@ class x {
1241
1260
  return this.readValue !== void 0 && (e.read = this.readValue), this.shareValue !== void 0 && (e.share = this.shareValue), this.allOpsValue !== void 0 && (e.allOps = this.allOpsValue), this.singleOpsSet && (e.singleOps = [...this.singleOpsValue]), e;
1242
1261
  }
1243
1262
  }
1244
- function Vt(n) {
1245
- return n instanceof x ? n.build() : n == null ? {} : typeof n == "object" ? Oe(n) : n;
1263
+ function xt(n) {
1264
+ return n instanceof x ? n.build() : n == null ? {} : typeof n == "object" ? be(n) : n;
1246
1265
  }
1247
- function Dt(n) {
1266
+ function Bt(n) {
1248
1267
  const e = {};
1249
1268
  for (const [t, s] of Object.entries(n))
1250
- e[t] = typeof s == "object" && s !== null ? Oe(s) : s;
1269
+ e[t] = typeof s == "object" && s !== null ? be(s) : s;
1251
1270
  return e;
1252
1271
  }
1253
1272
  function B(n) {
@@ -1256,7 +1275,7 @@ function B(n) {
1256
1275
  function M(n) {
1257
1276
  return n.onBehalfOf ?? n.permissionFrom ?? "ownerChannel";
1258
1277
  }
1259
- class Mt {
1278
+ class jt {
1260
1279
  constructor(e, t) {
1261
1280
  this.parent = e, this.config = t;
1262
1281
  }
@@ -1269,7 +1288,7 @@ class Mt {
1269
1288
  e,
1270
1289
  "MyOS/Single Document Permission Grant Requested",
1271
1290
  (r) => {
1272
- r.put("onBehalfOf", B(this.config)), r.put("requestId", this.config.requestId), r.put("targetSessionId", t), r.put("permissions", Vt(s));
1291
+ r.put("onBehalfOf", B(this.config)), r.put("requestId", this.config.requestId), r.put("targetSessionId", t), r.put("permissions", xt(s));
1273
1292
  }
1274
1293
  );
1275
1294
  }
@@ -1359,7 +1378,7 @@ class Mt {
1359
1378
  );
1360
1379
  }
1361
1380
  }
1362
- class $t {
1381
+ class Nt {
1363
1382
  constructor(e, t) {
1364
1383
  this.parent = e, this.config = t;
1365
1384
  }
@@ -1376,7 +1395,7 @@ class $t {
1376
1395
  e,
1377
1396
  "MyOS/Linked Documents Permission Grant Requested",
1378
1397
  (r) => {
1379
- r.put("onBehalfOf", M(this.config)), r.put("requestId", this.config.requestId), r.put("targetSessionId", t), r.put("links", Dt(s));
1398
+ r.put("onBehalfOf", M(this.config)), r.put("requestId", this.config.requestId), r.put("targetSessionId", t), r.put("links", Bt(s));
1380
1399
  }
1381
1400
  );
1382
1401
  }
@@ -1471,7 +1490,7 @@ class $t {
1471
1490
  function Q(n) {
1472
1491
  return n.onBehalfOf ?? n.permissionFrom ?? "ownerChannel";
1473
1492
  }
1474
- function xt(n, e) {
1493
+ function Wt(n, e) {
1475
1494
  return n.map((t) => ({
1476
1495
  type: "MyOS/Worker Agency Permission",
1477
1496
  workerType: t,
@@ -1481,15 +1500,15 @@ function xt(n, e) {
1481
1500
  }
1482
1501
  }));
1483
1502
  }
1484
- function Bt(n) {
1503
+ function Lt(n) {
1485
1504
  return Array.isArray(n.allowedWorkerAgencyPermissions) ? n.allowedWorkerAgencyPermissions : typeof n.workerType == "string" || n.type === "MyOS/Worker Agency Permission" ? [n] : n;
1486
1505
  }
1487
- class jt {
1506
+ class Ut {
1488
1507
  constructor(e, t) {
1489
1508
  this.parent = e, this.config = t;
1490
1509
  }
1491
1510
  defaultPermissions() {
1492
- return xt(
1511
+ return Wt(
1493
1512
  this.config.allowedTypes,
1494
1513
  this.config.allowedOperations
1495
1514
  );
@@ -1506,7 +1525,7 @@ class jt {
1506
1525
  );
1507
1526
  }
1508
1527
  );
1509
- const s = e === void 0 ? this.defaultPermissions() : Bt(e), r = t;
1528
+ const s = e === void 0 ? this.defaultPermissions() : Lt(e), r = t;
1510
1529
  return this.parent.myOs().grantWorkerAgencyPermission(
1511
1530
  Q(this.config),
1512
1531
  this.config.requestId,
@@ -1561,9 +1580,9 @@ class jt {
1561
1580
  );
1562
1581
  }
1563
1582
  startSessionWith(e, t, s, r) {
1564
- const i = new Pt();
1583
+ const i = new Tt();
1565
1584
  s?.(i);
1566
- const o = new At();
1585
+ const o = new Et();
1567
1586
  return r?.(o), this.parent.myOs().startWorkerSession(
1568
1587
  e,
1569
1588
  t,
@@ -1601,8 +1620,8 @@ function S(n, e) {
1601
1620
  function fe(n, e = !1) {
1602
1621
  return n == null ? e ? x.create().build() : null : n instanceof x ? n.build() : typeof n == "object" ? structuredClone(n) : n;
1603
1622
  }
1604
- function Ie(n, e = !1) {
1605
- return n == null ? e ? x.create().build() : null : n instanceof x ? n.build() : typeof n == "object" ? Oe(n) : n;
1623
+ function Pe(n, e = !1) {
1624
+ return n == null ? e ? x.create().build() : null : n instanceof x ? n.build() : typeof n == "object" ? be(n) : n;
1606
1625
  }
1607
1626
  function j(n, e, t) {
1608
1627
  n.put("onBehalfOf", S(e, "onBehalfOf is required")), ge(n, t);
@@ -1610,13 +1629,13 @@ function j(n, e, t) {
1610
1629
  function ge(n, e) {
1611
1630
  e !== void 0 && n.put("targetSessionId", fe(e));
1612
1631
  }
1613
- function Pe(n, e) {
1632
+ function qe(n, e) {
1614
1633
  const t = {
1615
1634
  id: S(n, "subscriptionId is required")
1616
1635
  };
1617
1636
  return e && e.length > 0 && (t.events = e), t;
1618
1637
  }
1619
- function Nt(n) {
1638
+ function Ft(n) {
1620
1639
  if (typeof n == "string" || typeof n == "function")
1621
1640
  return { type: m(n) };
1622
1641
  if (typeof n == "object" && n !== null && !Array.isArray(n)) {
@@ -1630,7 +1649,7 @@ function Nt(n) {
1630
1649
  }
1631
1650
  return { type: m(n) };
1632
1651
  }
1633
- class Wt {
1652
+ class _t {
1634
1653
  constructor(e, t = "myOsAdminChannel") {
1635
1654
  this.parent = e, this.adminChannelKey = t;
1636
1655
  }
@@ -1642,7 +1661,7 @@ class Wt {
1642
1661
  j(i, e, s), i.put(
1643
1662
  "requestId",
1644
1663
  S(t, "requestId is required")
1645
- ), i.put("permissions", Ie(r, !0));
1664
+ ), i.put("permissions", Pe(r, !0));
1646
1665
  }
1647
1666
  );
1648
1667
  }
@@ -1658,7 +1677,7 @@ class Wt {
1658
1677
  const o = {};
1659
1678
  for (const [c, h] of Object.entries(r)) {
1660
1679
  const p = c.trim();
1661
- p.length !== 0 && (o[p] = Ie(h, !0));
1680
+ p.length !== 0 && (o[p] = Pe(h, !0));
1662
1681
  }
1663
1682
  i.put("links", o);
1664
1683
  }
@@ -1746,7 +1765,7 @@ class Wt {
1746
1765
  (r) => {
1747
1766
  ge(r, e), r.put(
1748
1767
  "subscription",
1749
- Pe(
1768
+ qe(
1750
1769
  t,
1751
1770
  s.map((i) => ({ type: m(i) }))
1752
1771
  )
@@ -1761,10 +1780,10 @@ class Wt {
1761
1780
  (r) => {
1762
1781
  ge(r, e), r.put(
1763
1782
  "subscription",
1764
- Pe(
1783
+ qe(
1765
1784
  t,
1766
1785
  s.map(
1767
- (i) => Nt(i)
1786
+ (i) => Ft(i)
1768
1787
  )
1769
1788
  )
1770
1789
  );
@@ -1837,7 +1856,7 @@ class Wt {
1837
1856
  );
1838
1857
  }
1839
1858
  }
1840
- class Lt {
1859
+ class Kt {
1841
1860
  entries = [];
1842
1861
  replaceValue(e, t) {
1843
1862
  return this.entries.push({ op: "replace", path: e, val: t }), this;
@@ -1859,7 +1878,7 @@ class Lt {
1859
1878
  return structuredClone(this.entries);
1860
1879
  }
1861
1880
  }
1862
- class qe {
1881
+ class Ae {
1863
1882
  payload = {};
1864
1883
  put(e, t) {
1865
1884
  return this.payload[e] = t, this;
@@ -1871,29 +1890,29 @@ class qe {
1871
1890
  return structuredClone(this.payload);
1872
1891
  }
1873
1892
  }
1874
- function Ut(n) {
1893
+ function Gt(n) {
1875
1894
  const e = n.trim();
1876
1895
  if (e.length === 0)
1877
1896
  throw new Error("step name is required");
1878
1897
  return e;
1879
1898
  }
1880
1899
  function F(n, e, t) {
1881
- return { name: Ut(n), type: e, ...t };
1900
+ return { name: Gt(n), type: e, ...t };
1882
1901
  }
1883
- function Ft(n, e) {
1902
+ function Jt(n, e) {
1884
1903
  return {
1885
1904
  type: m(n),
1886
1905
  ...e
1887
1906
  };
1888
1907
  }
1889
- function _t(n) {
1908
+ function zt(n) {
1890
1909
  if (!n.processorName())
1891
1910
  throw new Error("payment payload requires processor");
1892
1911
  }
1893
1912
  function ye(n) {
1894
1913
  return structuredClone(n);
1895
1914
  }
1896
- function Ae(n, e) {
1915
+ function Re(n, e) {
1897
1916
  if (typeof n != "string")
1898
1917
  throw new Error(e);
1899
1918
  const t = n.trim();
@@ -1901,7 +1920,7 @@ function Ae(n, e) {
1901
1920
  throw new Error(e);
1902
1921
  return t;
1903
1922
  }
1904
- class Kt {
1923
+ class Qt {
1905
1924
  constructor(e) {
1906
1925
  this.parent = e;
1907
1926
  }
@@ -1909,7 +1928,7 @@ class Kt {
1909
1928
  return this.parent;
1910
1929
  }
1911
1930
  }
1912
- class $ extends Kt {
1931
+ class $ extends Qt {
1913
1932
  constructor(e, t) {
1914
1933
  super(e), this.putValue = t;
1915
1934
  }
@@ -1917,7 +1936,7 @@ class $ extends Kt {
1917
1936
  return this.putValue(e, t), this;
1918
1937
  }
1919
1938
  }
1920
- class Gt {
1939
+ class Yt {
1921
1940
  payload = {};
1922
1941
  processorValue;
1923
1942
  processor(e) {
@@ -2005,7 +2024,7 @@ class Gt {
2005
2024
  return this.processorValue;
2006
2025
  }
2007
2026
  }
2008
- class Jt {
2027
+ class Zt {
2009
2028
  constructor(e) {
2010
2029
  this.parent = e;
2011
2030
  }
@@ -2048,7 +2067,7 @@ class Jt {
2048
2067
  });
2049
2068
  }
2050
2069
  }
2051
- class Re {
2070
+ class Te {
2052
2071
  constructor(e, t, s) {
2053
2072
  this.parent = e, this.integration = t, this.stepName = s;
2054
2073
  }
@@ -2100,7 +2119,7 @@ class Re {
2100
2119
  );
2101
2120
  }
2102
2121
  }
2103
- class zt {
2122
+ class Ht {
2104
2123
  constructor(e, t) {
2105
2124
  this.parent = e, this.integration = t;
2106
2125
  }
@@ -2128,7 +2147,7 @@ class zt {
2128
2147
  );
2129
2148
  }
2130
2149
  }
2131
- class Qt {
2150
+ class Xt {
2132
2151
  steps = [];
2133
2152
  aiIntegrations;
2134
2153
  accessConfigs;
@@ -2143,7 +2162,7 @@ class Qt {
2143
2162
  return this.steps.push(F(e, "Conversation/JavaScript Code", { code: t })), this;
2144
2163
  }
2145
2164
  updateDocument(e, t) {
2146
- const s = new Lt();
2165
+ const s = new Kt();
2147
2166
  return t(s), this.steps.push(
2148
2167
  F(e, "Conversation/Update Document", {
2149
2168
  changeset: s.build()
@@ -2164,15 +2183,15 @@ class Qt {
2164
2183
  return this.triggerEvent(e, t);
2165
2184
  }
2166
2185
  emitType(e, t, s) {
2167
- const r = new qe();
2186
+ const r = new Ae();
2168
2187
  return s?.(r), this.steps.push(
2169
2188
  F(e, "Conversation/Trigger Event", {
2170
- event: Ft(t, r.build())
2189
+ event: Jt(t, r.build())
2171
2190
  })
2172
2191
  ), this;
2173
2192
  }
2174
2193
  namedEvent(e, t, s) {
2175
- const r = new qe();
2194
+ const r = new Ae();
2176
2195
  s?.(r);
2177
2196
  const i = r.build();
2178
2197
  return this.steps.push(
@@ -2209,7 +2228,7 @@ class Qt {
2209
2228
  );
2210
2229
  }
2211
2230
  requestBackwardPayment(e, t) {
2212
- return Ue(
2231
+ return _e(
2213
2232
  "PayNote/Backward Payment Requested",
2214
2233
  "steps.requestBackwardPayment(...)"
2215
2234
  ), typeof e == "function" ? this.emitPaymentRequest(
@@ -2229,7 +2248,7 @@ class Qt {
2229
2248
  (o) => {
2230
2249
  o.put("document", ye(t)), o.put("channelBindings", structuredClone(s)), o.put(
2231
2250
  "onBehalfOf",
2232
- Ae(r, "onBehalfOf is required")
2251
+ Re(r, "onBehalfOf is required")
2233
2252
  ), i?.(o);
2234
2253
  }
2235
2254
  );
@@ -2241,27 +2260,27 @@ class Qt {
2241
2260
  (o) => {
2242
2261
  o.putExpression("document", t), o.put("channelBindings", structuredClone(s)), o.put(
2243
2262
  "onBehalfOf",
2244
- Ae(r, "onBehalfOf is required")
2263
+ Re(r, "onBehalfOf is required")
2245
2264
  ), i?.(o);
2246
2265
  }
2247
2266
  );
2248
2267
  }
2249
2268
  capture() {
2250
- return new Jt(this);
2269
+ return new Zt(this);
2251
2270
  }
2252
2271
  myOs(e = "myOsAdminChannel") {
2253
- return new Wt(this, e);
2272
+ return new _t(this, e);
2254
2273
  }
2255
2274
  askAI(e, t, s) {
2256
2275
  if (typeof t == "function") {
2257
- const i = new Re(
2276
+ const i = new Te(
2258
2277
  this,
2259
2278
  this.requireAiIntegration(e),
2260
2279
  "AskAI"
2261
2280
  );
2262
2281
  return t(i), i.done(), this;
2263
2282
  }
2264
- const r = new Re(
2283
+ const r = new Te(
2265
2284
  this,
2266
2285
  this.requireAiIntegration(e),
2267
2286
  t
@@ -2269,19 +2288,19 @@ class Qt {
2269
2288
  return s(r), r.done(), this;
2270
2289
  }
2271
2290
  ai(e) {
2272
- return new zt(this, this.requireAiIntegration(e));
2291
+ return new Ht(this, this.requireAiIntegration(e));
2273
2292
  }
2274
2293
  access(e) {
2275
- return new Mt(this, this.requireAccessConfig(e));
2294
+ return new jt(this, this.requireAccessConfig(e));
2276
2295
  }
2277
2296
  accessLinked(e) {
2278
- return new $t(
2297
+ return new Nt(
2279
2298
  this,
2280
2299
  this.requireLinkedAccessConfig(e)
2281
2300
  );
2282
2301
  }
2283
2302
  viaAgency(e) {
2284
- return new jt(this, this.requireAgencyConfig(e));
2303
+ return new Ut(this, this.requireAgencyConfig(e));
2285
2304
  }
2286
2305
  raw(e) {
2287
2306
  return this.steps.push(structuredClone(e)), this;
@@ -2290,8 +2309,8 @@ class Qt {
2290
2309
  return structuredClone(this.steps);
2291
2310
  }
2292
2311
  emitPaymentRequest(e, t, s) {
2293
- const r = new Gt();
2294
- return s(r), _t(r), this.emitType(e, t, (i) => {
2312
+ const r = new Yt();
2313
+ return s(r), zt(r), this.emitType(e, t, (i) => {
2295
2314
  for (const [o, c] of Object.entries(r.build()))
2296
2315
  i.put(o, c);
2297
2316
  });
@@ -2333,20 +2352,20 @@ function f(n, e) {
2333
2352
  throw new Error(`${e} is required`);
2334
2353
  return t;
2335
2354
  }
2336
- function Yt(n) {
2355
+ function en(n) {
2337
2356
  n.jsRaw("EmitEvents", "return { events: event.message.request };");
2338
2357
  }
2339
- function Ke(n) {
2358
+ function Je(n) {
2340
2359
  return n.replace(/[^A-Za-z0-9]+/gu, "_").replace(/^_+|_+$/gu, "").toUpperCase();
2341
2360
  }
2342
- function Zt(n) {
2361
+ function tn(n) {
2343
2362
  return n.endsWith("Channel") ? n.replace(/Channel$/u, "Update") : `${n}Update`;
2344
2363
  }
2345
- function Ht(n) {
2364
+ function nn(n) {
2346
2365
  return P(n);
2347
2366
  }
2348
- function Xt(n) {
2349
- if (!Ht(n))
2367
+ function sn(n) {
2368
+ if (!nn(n))
2350
2369
  return {
2351
2370
  eventType: m(n),
2352
2371
  matcher: {}
@@ -2357,13 +2376,13 @@ function Xt(n) {
2357
2376
  matcher: e
2358
2377
  };
2359
2378
  }
2360
- function en(n) {
2379
+ function rn(n) {
2361
2380
  return `${n}OnCallResponseEnvelope`;
2362
2381
  }
2363
- function tn(n) {
2364
- return `Emit${Ke(n)}OnCallResponseItems`;
2382
+ function on(n) {
2383
+ return `Emit${Je(n)}OnCallResponseItems`;
2365
2384
  }
2366
- function nn(n, e) {
2385
+ function an(n, e) {
2367
2386
  const t = structuredClone(n);
2368
2387
  t.requestId = e;
2369
2388
  const s = P(
@@ -2371,7 +2390,7 @@ function nn(n, e) {
2371
2390
  ) ? structuredClone(t.inResponseTo) : {};
2372
2391
  return s.requestId = e, t.inResponseTo = s, t;
2373
2392
  }
2374
- function sn() {
2393
+ function cn() {
2375
2394
  return `const responses = Array.isArray(event.events) ? event.events : [];
2376
2395
  return {
2377
2396
  events: responses.filter(
@@ -2387,7 +2406,7 @@ class u {
2387
2406
  agencyConfigs = /* @__PURE__ */ new Map();
2388
2407
  callResponseEnvelopeWorkflows = /* @__PURE__ */ new Map();
2389
2408
  constructor(e) {
2390
- this.state = new ut(e);
2409
+ this.state = new dt(e);
2391
2410
  }
2392
2411
  static doc() {
2393
2412
  return new u();
@@ -2402,7 +2421,7 @@ class u {
2402
2421
  return A(e);
2403
2422
  }
2404
2423
  static documentToJson(e) {
2405
- return e instanceof N ? ae(e) : C(e);
2424
+ return e instanceof N ? ce(e) : C(e);
2406
2425
  }
2407
2426
  name(e) {
2408
2427
  return this.state.setName(e), this;
@@ -2414,7 +2433,7 @@ class u {
2414
2433
  return this.state.setType(m(e)), this;
2415
2434
  }
2416
2435
  field(e, t) {
2417
- return arguments.length === 1 ? new Rt(this, e) : (this.state.setValue(e, t), this);
2436
+ return arguments.length === 1 ? new Vt(this, e) : (this.state.setValue(e, t), this);
2418
2437
  }
2419
2438
  replace(e, t) {
2420
2439
  return this.state.setValue(e, t), this;
@@ -2458,7 +2477,7 @@ class u {
2458
2477
  }
2459
2478
  operation(e, t, s, r, i) {
2460
2479
  if (t === void 0)
2461
- return new wt(
2480
+ return new Mt(
2462
2481
  this,
2463
2482
  f(e, "operation key")
2464
2483
  );
@@ -2631,22 +2650,22 @@ class u {
2631
2650
  );
2632
2651
  }
2633
2652
  ai(e) {
2634
- return this.myOsAdmin(), new gt(this, e);
2653
+ return this.myOsAdmin(), new St(this, e);
2635
2654
  }
2636
2655
  access(e) {
2637
- return this.myOsAdmin(), new Ct(
2656
+ return this.myOsAdmin(), new Ot(
2638
2657
  this,
2639
2658
  f(e, "access name")
2640
2659
  );
2641
2660
  }
2642
2661
  accessLinked(e) {
2643
- return this.myOsAdmin(), new St(
2662
+ return this.myOsAdmin(), new It(
2644
2663
  this,
2645
2664
  f(e, "linked access name")
2646
2665
  );
2647
2666
  }
2648
2667
  agency(e) {
2649
- return this.myOsAdmin(), new It(
2668
+ return this.myOsAdmin(), new Rt(
2650
2669
  this,
2651
2670
  f(e, "agency name")
2652
2671
  );
@@ -2827,13 +2846,13 @@ class u {
2827
2846
  },
2828
2847
  s
2829
2848
  );
2830
- const o = f(t, "workflow key"), c = Xt(
2849
+ const o = f(t, "workflow key"), c = sn(
2831
2850
  s
2832
2851
  );
2833
2852
  return this.ensureCallResponseEnvelopeWorkflow(e, o), this.onTriggeredWithMatcher(
2834
2853
  o,
2835
2854
  c.eventType,
2836
- nn(c.matcher, i.requestId),
2855
+ an(c.matcher, i.requestId),
2837
2856
  r
2838
2857
  );
2839
2858
  }
@@ -2960,7 +2979,7 @@ class u {
2960
2979
  tasks: structuredClone(e.tasks)
2961
2980
  };
2962
2981
  this.aiIntegrations.set(t, i), this.state.setValue(i.statusPath, "idle"), this.state.setValue(i.contextPath, {});
2963
- const o = Ke(t), c = (h) => {
2982
+ const o = Je(t), c = (h) => {
2964
2983
  h.myOs().requestSingleDocPermission(
2965
2984
  i.permissionFrom,
2966
2985
  i.requestId,
@@ -3026,7 +3045,7 @@ class u {
3026
3045
  return this.agencyConfigs.set(e.name, structuredClone(e)), this;
3027
3046
  }
3028
3047
  canEmit(e, ...t) {
3029
- const s = f(e, "channel key"), r = Zt(s), i = { type: "List" };
3048
+ const s = f(e, "channel key"), r = tn(s), i = { type: "List" };
3030
3049
  return t.length > 0 && (i.events = t.map((o) => ({
3031
3050
  type: m(o)
3032
3051
  }))), this.applyOperationDefinition({
@@ -3035,7 +3054,7 @@ class u {
3035
3054
  description: "Operation for emitting events through channel",
3036
3055
  request: i,
3037
3056
  clearRequest: !1,
3038
- steps: this.buildSteps(Yt)
3057
+ steps: this.buildSteps(en)
3039
3058
  }), this;
3040
3059
  }
3041
3060
  contractsPolicy(e = !0, t = "contractsPolicy") {
@@ -3156,7 +3175,7 @@ class u {
3156
3175
  return this.state.build();
3157
3176
  }
3158
3177
  buildDocument() {
3159
- return re(this.buildJson());
3178
+ return ie(this.buildJson());
3160
3179
  }
3161
3180
  applyFieldMetadata(e) {
3162
3181
  const t = this.state.getValue(e.path), s = P(t) ? C(t) : {};
@@ -3189,7 +3208,7 @@ class u {
3189
3208
  return e(t), t.build();
3190
3209
  }
3191
3210
  createStepsBuilder() {
3192
- return new Qt({
3211
+ return new Xt({
3193
3212
  aiIntegrations: Object.fromEntries(this.aiIntegrations.entries()),
3194
3213
  accessConfigs: Object.fromEntries(this.accessConfigs.entries()),
3195
3214
  linkedAccessConfigs: Object.fromEntries(
@@ -3261,13 +3280,13 @@ class u {
3261
3280
  const s = f(e, "access name"), r = this.callResponseEnvelopeWorkflows.get(s);
3262
3281
  if (r)
3263
3282
  return r;
3264
- const i = en(t);
3283
+ const i = rn(t);
3265
3284
  return this.onEvent(
3266
3285
  i,
3267
3286
  "MyOS/Call Operation Responded",
3268
3287
  (o) => o.jsRaw(
3269
- tn(t),
3270
- sn()
3288
+ on(t),
3289
+ cn()
3271
3290
  )
3272
3291
  ), this.callResponseEnvelopeWorkflows.set(
3273
3292
  s,
@@ -3322,35 +3341,35 @@ class y extends u {
3322
3341
  return new y(this.documentToJson(e));
3323
3342
  }
3324
3343
  }
3325
- function rn(n) {
3344
+ function un(n) {
3326
3345
  const e = n.trim();
3327
3346
  if (e.length === 0)
3328
3347
  throw new Error("channelKey is required");
3329
3348
  return e;
3330
3349
  }
3331
- function Ge(n, e) {
3332
- const t = W(rn(n));
3350
+ function ze(n, e) {
3351
+ const t = W(un(n));
3333
3352
  return {
3334
3353
  [e]: "${document('/contracts/" + t + "/" + e + "')}"
3335
3354
  };
3336
3355
  }
3337
- function Te(n) {
3338
- return Ge(n, "accountId");
3356
+ function we(n) {
3357
+ return ze(n, "accountId");
3339
3358
  }
3340
- function ss(n) {
3341
- return Ge(n, "email");
3359
+ function cs(n) {
3360
+ return ze(n, "email");
3342
3361
  }
3343
- const on = /* @__PURE__ */ new Set([
3362
+ const ln = /* @__PURE__ */ new Set([
3344
3363
  "name",
3345
3364
  "description",
3346
3365
  "type",
3347
3366
  "contracts",
3348
3367
  "policies"
3349
3368
  ]);
3350
- function an(n) {
3369
+ function hn(n) {
3351
3370
  return Array.isArray(n.fields) && Array.isArray(n.contracts) && Array.isArray(n.sections) && Array.isArray(n.policies) && Array.isArray(n.unclassifiedContracts);
3352
3371
  }
3353
- function we(n) {
3372
+ function Ee(n) {
3354
3373
  return structuredClone(n);
3355
3374
  }
3356
3375
  function _(n) {
@@ -3359,10 +3378,10 @@ function _(n) {
3359
3378
  function X(n) {
3360
3379
  return Object.keys(n).sort((e, t) => e.localeCompare(t));
3361
3380
  }
3362
- function cn(n) {
3381
+ function pn(n) {
3363
3382
  return Array.isArray(n) ? "array" : !n || typeof n != "object" ? "primitive" : typeof n.type == "string" ? "typed-node-like object" : "object";
3364
3383
  }
3365
- function un(n) {
3384
+ function dn(n) {
3366
3385
  if (n === null)
3367
3386
  return "null";
3368
3387
  if (typeof n == "string")
@@ -3374,14 +3393,14 @@ function un(n) {
3374
3393
  const e = n;
3375
3394
  return typeof e.type == "string" ? `<${e.type}>` : `{${Object.keys(e).length} keys}`;
3376
3395
  }
3377
- function Je(n, e, t) {
3378
- const s = cn(n);
3396
+ function Qe(n, e, t) {
3397
+ const s = pn(n);
3379
3398
  if (s === "primitive" || s === "array" || s === "typed-node-like object") {
3380
3399
  t.push({
3381
3400
  path: e,
3382
3401
  value: structuredClone(n),
3383
3402
  kind: s,
3384
- valuePreview: un(n)
3403
+ valuePreview: dn(n)
3385
3404
  });
3386
3405
  return;
3387
3406
  }
@@ -3396,7 +3415,7 @@ function Je(n, e, t) {
3396
3415
  return;
3397
3416
  }
3398
3417
  for (const o of i)
3399
- Je(
3418
+ Qe(
3400
3419
  r[o],
3401
3420
  `${e}/${W(o)}`,
3402
3421
  t
@@ -3412,7 +3431,7 @@ function Ce(n) {
3412
3431
  (t) => `${JSON.stringify(t)}:${Ce(e[t])}`
3413
3432
  ).join(",")}}`;
3414
3433
  }
3415
- function ln(n) {
3434
+ function mn(n) {
3416
3435
  const e = Ce(n);
3417
3436
  let t = 2166136261, s = 2166136261;
3418
3437
  for (let o = 0; o < e.length; o += 1) {
@@ -3422,21 +3441,21 @@ function ln(n) {
3422
3441
  const r = (t >>> 0).toString(16).padStart(8, "0"), i = (s >>> 0).toString(16).padStart(8, "0");
3423
3442
  return `${r}${i}${r}${i}${r}${i}${r}${i}`;
3424
3443
  }
3425
- function hn(n) {
3444
+ function fn(n) {
3426
3445
  return n ? n === "Conversation/Document Section" ? "section" : n.includes("Policy") ? "policy" : n.includes("Channel") ? "channel" : n.includes("Sequential Workflow Operation") ? "operationImpl" : n.includes("Operation") || n.includes("Change Operation") ? "operation" : n.includes("Workflow") ? "workflow" : "other" : "other";
3427
3446
  }
3428
- function pn(n) {
3447
+ function gn(n) {
3429
3448
  const e = {};
3430
3449
  for (const t of n)
3431
3450
  for (const s of t.relatedContracts)
3432
3451
  e[s] || (e[s] = /* @__PURE__ */ new Set()), e[s]?.add(t.key);
3433
3452
  return e;
3434
3453
  }
3435
- function Ee(n) {
3454
+ function Ve(n) {
3436
3455
  const e = [], t = n.requireSectionChanges;
3437
3456
  return typeof t == "boolean" && e.push(`requireSectionChanges=${String(t)}`), e.length === 0 ? `keys=${Object.keys(n).length}` : e.join(", ");
3438
3457
  }
3439
- function dn(n) {
3458
+ function yn(n) {
3440
3459
  return `Document: ${n ?? "(unnamed)"}`;
3441
3460
  }
3442
3461
  class J {
@@ -3450,17 +3469,17 @@ class J {
3450
3469
  unclassifiedContracts;
3451
3470
  unknownContracts;
3452
3471
  constructor(e) {
3453
- const t = we(e);
3472
+ const t = Ee(e);
3454
3473
  this.name = t.name, this.description = t.description, this.type = t.type, this.fields = t.fields, this.contracts = t.contracts, this.sections = t.sections, this.policies = t.policies, this.unclassifiedContracts = t.unclassifiedContracts, this.unknownContracts = t.unclassifiedContracts;
3455
3474
  }
3456
3475
  static from(e) {
3457
3476
  if (e instanceof J)
3458
3477
  return e;
3459
- if (!(e instanceof N) && an(e))
3478
+ if (!(e instanceof N) && hn(e))
3460
3479
  return new J(e);
3461
- const t = e instanceof N ? ae(e) : structuredClone(e), s = [];
3480
+ const t = e instanceof N ? ce(e) : structuredClone(e), s = [];
3462
3481
  for (const a of X(t))
3463
- on.has(a) || Je(
3482
+ ln.has(a) || Qe(
3464
3483
  t[a],
3465
3484
  `/${W(a)}`,
3466
3485
  s
@@ -3471,7 +3490,7 @@ class J {
3471
3490
  i.push({
3472
3491
  key: a,
3473
3492
  type: O,
3474
- kind: hn(O),
3493
+ kind: fn(O),
3475
3494
  raw: structuredClone(d)
3476
3495
  });
3477
3496
  }
@@ -3488,13 +3507,13 @@ class J {
3488
3507
  title: d,
3489
3508
  summary: O,
3490
3509
  relatedFields: [...new Set(w)].sort(
3491
- (b, ce) => b.localeCompare(ce)
3510
+ (b, ue) => b.localeCompare(ue)
3492
3511
  ),
3493
3512
  relatedContracts: [...new Set(E)].sort(
3494
- (b, ce) => b.localeCompare(ce)
3513
+ (b, ue) => b.localeCompare(ue)
3495
3514
  )
3496
3515
  };
3497
- }).sort((a, d) => a.key.localeCompare(d.key)), c = pn(o), h = i.map(
3516
+ }).sort((a, d) => a.key.localeCompare(d.key)), c = gn(o), h = i.map(
3498
3517
  (a) => {
3499
3518
  const d = _(a.raw.request), O = _(a.raw.event);
3500
3519
  return {
@@ -3502,7 +3521,7 @@ class J {
3502
3521
  type: a.type,
3503
3522
  kind: a.kind,
3504
3523
  raw: structuredClone(a.raw),
3505
- fingerprint: ln(a.raw),
3524
+ fingerprint: mn(a.raw),
3506
3525
  sectionKeys: [
3507
3526
  ...c[a.key] ?? /* @__PURE__ */ new Set()
3508
3527
  ].sort((w, E) => w.localeCompare(E)),
@@ -3516,7 +3535,7 @@ class J {
3516
3535
  ...h.filter((a) => a.kind === "policy").map((a) => ({
3517
3536
  key: a.key,
3518
3537
  type: a.type,
3519
- summary: Ee(a.raw)
3538
+ summary: Ve(a.raw)
3520
3539
  }))
3521
3540
  ], g = _(t.policies);
3522
3541
  if (g)
@@ -3525,7 +3544,7 @@ class J {
3525
3544
  p.push({
3526
3545
  key: a,
3527
3546
  type: typeof d.type == "string" ? d.type : void 0,
3528
- summary: Ee(d)
3547
+ summary: Ve(d)
3529
3548
  });
3530
3549
  }
3531
3550
  const k = new Set(o.map((a) => a.key)), l = h.filter(
@@ -3551,7 +3570,7 @@ class J {
3551
3570
  return this.sections.find((t) => t.key === e);
3552
3571
  }
3553
3572
  toSummaryJson() {
3554
- return we({
3573
+ return Ee({
3555
3574
  name: this.name,
3556
3575
  description: this.description,
3557
3576
  type: this.type,
@@ -3563,7 +3582,7 @@ class J {
3563
3582
  });
3564
3583
  }
3565
3584
  toPromptText() {
3566
- const e = [dn(this.name)];
3585
+ const e = [yn(this.name)];
3567
3586
  if (e.push(`Type: ${this.type ?? "n/a"}`), this.description && e.push(`Description: ${this.description}`), e.push(""), e.push(`Fields (${this.fields.length})`), this.fields.length === 0)
3568
3587
  e.push("- none");
3569
3588
  else
@@ -3591,13 +3610,13 @@ class J {
3591
3610
  `);
3592
3611
  }
3593
3612
  }
3594
- function ie(n) {
3613
+ function oe(n) {
3595
3614
  return typeof n == "object" && n !== null && !Array.isArray(n);
3596
3615
  }
3597
- function he(n, e) {
3616
+ function pe(n, e) {
3598
3617
  return n === "" ? `/${W(e)}` : `${n}/${W(e)}`;
3599
3618
  }
3600
- function Ve(n) {
3619
+ function De(n) {
3601
3620
  return Object.keys(n).sort((e, t) => e.localeCompare(t));
3602
3621
  }
3603
3622
  function ve(n, e) {
@@ -3611,7 +3630,7 @@ function ve(n, e) {
3611
3630
  return !1;
3612
3631
  return !0;
3613
3632
  }
3614
- if (ie(n) && ie(e)) {
3633
+ if (oe(n) && oe(e)) {
3615
3634
  const t = Object.keys(n), s = Object.keys(e);
3616
3635
  if (t.length !== s.length)
3617
3636
  return !1;
@@ -3622,7 +3641,7 @@ function ve(n, e) {
3622
3641
  }
3623
3642
  return !1;
3624
3643
  }
3625
- function ze(n, e, t, s) {
3644
+ function Ye(n, e, t, s) {
3626
3645
  if (!ve(n, e)) {
3627
3646
  if (Array.isArray(n) || Array.isArray(e)) {
3628
3647
  s.push({
@@ -3632,14 +3651,14 @@ function ze(n, e, t, s) {
3632
3651
  });
3633
3652
  return;
3634
3653
  }
3635
- if (ie(n) && ie(e)) {
3636
- const r = new Set(Ve(n)), i = new Set(Ve(e));
3654
+ if (oe(n) && oe(e)) {
3655
+ const r = new Set(De(n)), i = new Set(De(e));
3637
3656
  for (const o of [...r].sort(
3638
3657
  (c, h) => c.localeCompare(h)
3639
3658
  ))
3640
3659
  i.has(o) || s.push({
3641
3660
  op: "remove",
3642
- path: he(t, o)
3661
+ path: pe(t, o)
3643
3662
  });
3644
3663
  for (const o of [...i].sort(
3645
3664
  (c, h) => c.localeCompare(h)
@@ -3647,15 +3666,15 @@ function ze(n, e, t, s) {
3647
3666
  if (!r.has(o)) {
3648
3667
  s.push({
3649
3668
  op: "add",
3650
- path: he(t, o),
3669
+ path: pe(t, o),
3651
3670
  val: structuredClone(e[o])
3652
3671
  });
3653
3672
  continue;
3654
3673
  }
3655
- ze(
3674
+ Ye(
3656
3675
  n[o],
3657
3676
  e[o],
3658
- he(t, o),
3677
+ pe(t, o),
3659
3678
  s
3660
3679
  );
3661
3680
  }
@@ -3668,34 +3687,34 @@ function ze(n, e, t, s) {
3668
3687
  });
3669
3688
  }
3670
3689
  }
3671
- function Qe(n, e) {
3690
+ function Ze(n, e) {
3672
3691
  const t = [];
3673
- return ze(n, e, "", t), t;
3692
+ return Ye(n, e, "", t), t;
3674
3693
  }
3675
- function pe(n) {
3676
- return n instanceof N ? ae(n) : structuredClone(n);
3694
+ function de(n) {
3695
+ return n instanceof N ? ce(n) : structuredClone(n);
3677
3696
  }
3678
- function mn(n) {
3697
+ function Cn(n) {
3679
3698
  for (const e of n)
3680
3699
  if (!e.path.startsWith("/"))
3681
3700
  throw new Error(
3682
3701
  `Invalid patch path '${e.path}'. Root replacement is unsupported.`
3683
3702
  );
3684
3703
  }
3685
- function De(n) {
3704
+ function Me(n) {
3686
3705
  return `/contracts/${W(n)}`;
3687
3706
  }
3688
- class Ye {
3707
+ class He {
3689
3708
  originalJson;
3690
3709
  nextJson;
3691
3710
  constructor(e) {
3692
3711
  this.originalJson = structuredClone(e), this.nextJson = structuredClone(e);
3693
3712
  }
3694
3713
  static from(e) {
3695
- return new Ye(pe(e));
3714
+ return new He(de(e));
3696
3715
  }
3697
3716
  diff(e) {
3698
- return this.nextJson = pe(e), this;
3717
+ return this.nextJson = de(e), this;
3699
3718
  }
3700
3719
  mutate(e) {
3701
3720
  const t = u.from(this.nextJson);
@@ -3710,23 +3729,23 @@ class Ye {
3710
3729
  contract(e, t) {
3711
3730
  return Z(
3712
3731
  this.nextJson,
3713
- De(e),
3732
+ Me(e),
3714
3733
  structuredClone(t)
3715
3734
  ), this;
3716
3735
  }
3717
3736
  removeContract(e) {
3718
- return H(this.nextJson, De(e)), this;
3737
+ return H(this.nextJson, Me(e)), this;
3719
3738
  }
3720
3739
  build() {
3721
- const e = Qe(this.originalJson, this.nextJson);
3722
- return mn(e), e;
3740
+ const e = Ze(this.originalJson, this.nextJson);
3741
+ return Cn(e), e;
3723
3742
  }
3724
3743
  apply(e) {
3725
3744
  if (e === void 0)
3726
3745
  return this.nextDocumentNode();
3727
3746
  if (e instanceof N)
3728
3747
  return this.applyTo(e);
3729
- const t = pe(e);
3748
+ const t = de(e);
3730
3749
  for (const s of this.build()) {
3731
3750
  if (s.op === "remove") {
3732
3751
  H(t, s.path);
@@ -3734,13 +3753,13 @@ class Ye {
3734
3753
  }
3735
3754
  Z(t, s.path, structuredClone(s.val));
3736
3755
  }
3737
- return re(t);
3756
+ return ie(t);
3738
3757
  }
3739
3758
  applyTo(e, t = !1) {
3740
3759
  const s = this.build();
3741
3760
  let r = t ? e : e.clone();
3742
3761
  for (const i of s)
3743
- r = et(
3762
+ r = st(
3744
3763
  r,
3745
3764
  i,
3746
3765
  !0
@@ -3754,11 +3773,11 @@ class Ye {
3754
3773
  return this.nextDocumentJson();
3755
3774
  }
3756
3775
  nextDocumentNode() {
3757
- return re(this.nextDocumentJson());
3776
+ return ie(this.nextDocumentJson());
3758
3777
  }
3759
3778
  }
3760
3779
  function L(n) {
3761
- return n instanceof N ? ae(n) : structuredClone(n);
3780
+ return n instanceof N ? ce(n) : structuredClone(n);
3762
3781
  }
3763
3782
  function G(n) {
3764
3783
  return !n || typeof n != "object" || Array.isArray(n) ? null : n;
@@ -3766,37 +3785,37 @@ function G(n) {
3766
3785
  function Se(n) {
3767
3786
  return Object.keys(n).sort((e, t) => e.localeCompare(t));
3768
3787
  }
3769
- function oe(n) {
3788
+ function ae(n) {
3770
3789
  if (Array.isArray(n))
3771
- return `[${n.map((t) => oe(t)).join(",")}]`;
3790
+ return `[${n.map((t) => ae(t)).join(",")}]`;
3772
3791
  if (!n || typeof n != "object")
3773
3792
  return JSON.stringify(n);
3774
3793
  const e = n;
3775
3794
  return `{${Se(e).map(
3776
- (t) => `${JSON.stringify(t)}:${oe(e[t])}`
3795
+ (t) => `${JSON.stringify(t)}:${ae(e[t])}`
3777
3796
  ).join(",")}}`;
3778
3797
  }
3779
- function Me(n) {
3798
+ function $e(n) {
3780
3799
  return `/contracts/${W(n)}`;
3781
3800
  }
3782
- function $e(n, e) {
3801
+ function xe(n, e) {
3783
3802
  const t = structuredClone(n);
3784
3803
  return delete t[e], t;
3785
3804
  }
3786
- function fn(n) {
3805
+ function vn(n) {
3787
3806
  const e = n.key.toLowerCase(), t = (n.type ?? "").toLowerCase();
3788
3807
  return n.kind === "channel" ? "participants" : e.includes("ai") || t.includes("/ai") || e.includes("llm") ? "ai" : t.startsWith("paynote/") ? "paynote" : e.includes("payment") || e.includes("reserve") || e.includes("release") || e.includes("capture") || e.includes("voucher") ? "payments" : n.kind === "operation" || n.kind === "operationImpl" || n.kind === "workflow" || n.kind === "policy" ? "logic" : "misc";
3789
3808
  }
3790
- function gn(n, e) {
3791
- return e ? fn(e) : n.toLowerCase().includes("channel") ? "participants" : "misc";
3809
+ function Sn(n, e) {
3810
+ return e ? vn(e) : n.toLowerCase().includes("channel") ? "participants" : "misc";
3792
3811
  }
3793
- function xe(n) {
3812
+ function Be(n) {
3794
3813
  const e = {};
3795
3814
  for (const t of n)
3796
3815
  e[t.key] = t;
3797
3816
  return e;
3798
3817
  }
3799
- function yn(n, e, t) {
3818
+ function kn(n, e, t) {
3800
3819
  const s = e?.sectionKeys ?? [];
3801
3820
  if (s.length > 0)
3802
3821
  return [...s].sort(
@@ -3807,23 +3826,23 @@ function yn(n, e, t) {
3807
3826
  (i, o) => i.localeCompare(o)
3808
3827
  )[0] : t;
3809
3828
  }
3810
- function Cn(n, e) {
3811
- const t = L(n), s = L(e), r = $e(t, "contracts"), i = $e(s, "contracts");
3812
- return Qe(r, i);
3829
+ function On(n, e) {
3830
+ const t = L(n), s = L(e), r = xe(t, "contracts"), i = xe(s, "contracts");
3831
+ return Ze(r, i);
3813
3832
  }
3814
- function vn(n, e) {
3833
+ function bn(n, e) {
3815
3834
  const t = L(n), s = L(e), r = G(t.contracts) ?? {}, i = G(s.contracts) ?? {}, o = [
3816
3835
  .../* @__PURE__ */ new Set([
3817
3836
  ...Se(r),
3818
3837
  ...Se(i)
3819
3838
  ])
3820
- ].sort((l, a) => l.localeCompare(a)), c = J.from(t), h = J.from(s), p = xe(c.contracts), g = xe(h.contracts), k = [];
3839
+ ].sort((l, a) => l.localeCompare(a)), c = J.from(t), h = J.from(s), p = Be(c.contracts), g = Be(h.contracts), k = [];
3821
3840
  for (const l of o) {
3822
3841
  const a = G(
3823
3842
  r[l]
3824
3843
  ), d = G(
3825
3844
  i[l]
3826
- ), O = p[l], w = g[l], E = gn(l, w ?? O), b = yn(O, w, E);
3845
+ ), O = p[l], w = g[l], E = Sn(l, w ?? O), b = kn(O, w, E);
3827
3846
  if (!a && d) {
3828
3847
  k.push({
3829
3848
  op: "add",
@@ -3850,7 +3869,7 @@ function vn(n, e) {
3850
3869
  });
3851
3870
  continue;
3852
3871
  }
3853
- !a || !d || oe(a) !== oe(d) && k.push({
3872
+ !a || !d || ae(a) !== ae(d) && k.push({
3854
3873
  op: "replace",
3855
3874
  key: l,
3856
3875
  contractKey: l,
@@ -3872,7 +3891,7 @@ function vn(n, e) {
3872
3891
  return d[l.op] - d[a.op];
3873
3892
  });
3874
3893
  }
3875
- function Sn(n) {
3894
+ function In(n) {
3876
3895
  const e = {};
3877
3896
  for (const t of n)
3878
3897
  e[t.sectionKey] || (e[t.sectionKey] = []), e[t.sectionKey]?.push(t);
@@ -3893,7 +3912,7 @@ function Sn(n) {
3893
3912
  };
3894
3913
  });
3895
3914
  }
3896
- function kn(n) {
3915
+ function Pn(n) {
3897
3916
  const e = /* @__PURE__ */ new Map();
3898
3917
  for (const t of n) {
3899
3918
  const s = t.sectionKey !== t.bucket, r = s ? `section:${t.sectionKey}` : `bucket:${t.bucket}`, i = e.get(r);
@@ -3915,11 +3934,11 @@ function kn(n) {
3915
3934
  )
3916
3935
  })).sort((t, s) => t.key.localeCompare(s.key));
3917
3936
  }
3918
- function On(n, e) {
3937
+ function qn(n, e) {
3919
3938
  const t = [];
3920
3939
  return n.length > 0 && t.push("Root-field changes are emitted as generic patch operations."), e.length > 0 && t.push("Contract changes are emitted as whole-contract atomic units."), t;
3921
3940
  }
3922
- function bn(n, e, t, s) {
3941
+ function An(n, e, t, s) {
3923
3942
  const r = L(n), i = L(e), o = !!G(r.contracts), c = !!G(i.contracts), h = [...t], p = s.filter(
3924
3943
  (l) => l.op === "add" || l.op === "replace"
3925
3944
  );
@@ -3932,7 +3951,7 @@ function bn(n, e, t, s) {
3932
3951
  for (const l of g)
3933
3952
  h.push({
3934
3953
  op: "remove",
3935
- path: Me(l.contractKey)
3954
+ path: $e(l.contractKey)
3936
3955
  });
3937
3956
  o && !c && p.length === 0 && h.push({
3938
3957
  op: "remove",
@@ -3940,7 +3959,7 @@ function bn(n, e, t, s) {
3940
3959
  });
3941
3960
  const k = s.filter((l) => l.op !== "remove").sort((l, a) => l.contractKey.localeCompare(a.contractKey));
3942
3961
  for (const l of k) {
3943
- const a = Me(l.contractKey);
3962
+ const a = $e(l.contractKey);
3944
3963
  h.push({
3945
3964
  op: l.op,
3946
3965
  path: a,
@@ -3963,20 +3982,20 @@ function ne(n) {
3963
3982
  val: structuredClone(n.val)
3964
3983
  };
3965
3984
  }
3966
- function Be(n) {
3985
+ function je(n) {
3967
3986
  return {
3968
3987
  sectionKey: n.sectionKey,
3969
3988
  contractKeys: [...n.contractKeys],
3970
3989
  changes: n.changes.map(q)
3971
3990
  };
3972
3991
  }
3973
- function je(n) {
3992
+ function Ne(n) {
3974
3993
  return {
3975
3994
  ...n,
3976
3995
  changes: n.changes.map(q)
3977
3996
  };
3978
3997
  }
3979
- class In {
3998
+ class Rn {
3980
3999
  rootChanges;
3981
4000
  contractChanges;
3982
4001
  sectionChanges;
@@ -3987,18 +4006,18 @@ class In {
3987
4006
  groups;
3988
4007
  notes;
3989
4008
  constructor(e) {
3990
- this.rootChanges = e.rootChanges.map(ne), this.contractChanges = e.contractChanges.map(q), this.sectionChanges = e.sectionChanges.map(Be), this.patchOperations = e.patchOperations.map(ne), this.contractAdds = e.contractAdds.map(q), this.contractReplacements = e.contractReplacements.map(q), this.contractRemovals = e.contractRemovals.map(q), this.groups = e.groups.map(je), this.notes = [...e.notes];
4009
+ this.rootChanges = e.rootChanges.map(ne), this.contractChanges = e.contractChanges.map(q), this.sectionChanges = e.sectionChanges.map(je), this.patchOperations = e.patchOperations.map(ne), this.contractAdds = e.contractAdds.map(q), this.contractReplacements = e.contractReplacements.map(q), this.contractRemovals = e.contractRemovals.map(q), this.groups = e.groups.map(Ne), this.notes = [...e.notes];
3991
4010
  }
3992
4011
  toSummaryJson() {
3993
4012
  return {
3994
4013
  rootChanges: this.rootChanges.map(ne),
3995
4014
  contractChanges: this.contractChanges.map(q),
3996
- sectionChanges: this.sectionChanges.map(Be),
4015
+ sectionChanges: this.sectionChanges.map(je),
3997
4016
  patchOperations: this.patchOperations.map(ne),
3998
4017
  contractAdds: this.contractAdds.map(q),
3999
4018
  contractReplacements: this.contractReplacements.map(q),
4000
4019
  contractRemovals: this.contractRemovals.map(q),
4001
- groups: this.groups.map(je),
4020
+ groups: this.groups.map(Ne),
4002
4021
  notes: [...this.notes]
4003
4022
  };
4004
4023
  }
@@ -4028,7 +4047,7 @@ class In {
4028
4047
  `);
4029
4048
  }
4030
4049
  }
4031
- function rs(n, e) {
4050
+ function us(n, e) {
4032
4051
  const t = L(n);
4033
4052
  for (const s of e.patchOperations) {
4034
4053
  if (s.op === "remove") {
@@ -4039,24 +4058,24 @@ function rs(n, e) {
4039
4058
  }
4040
4059
  return t;
4041
4060
  }
4042
- class is {
4061
+ class ls {
4043
4062
  static compile(e, t) {
4044
- const s = Cn(e, t), r = vn(
4063
+ const s = On(e, t), r = bn(
4045
4064
  e,
4046
4065
  t
4047
- ), i = Sn(r), o = r.filter(
4066
+ ), i = In(r), o = r.filter(
4048
4067
  (l) => l.op === "add"
4049
4068
  ), c = r.filter(
4050
4069
  (l) => l.op === "replace"
4051
4070
  ), h = r.filter(
4052
4071
  (l) => l.op === "remove"
4053
- ), p = kn(r), g = On(s, r), k = bn(
4072
+ ), p = Pn(r), g = qn(s, r), k = An(
4054
4073
  e,
4055
4074
  t,
4056
4075
  s,
4057
4076
  r
4058
4077
  );
4059
- return new In({
4078
+ return new Rn({
4060
4079
  rootChanges: s,
4061
4080
  contractChanges: r,
4062
4081
  sectionChanges: i,
@@ -4072,20 +4091,20 @@ class is {
4072
4091
  function se(n) {
4073
4092
  return m(n).replace(/[^A-Za-z0-9]+/gu, " ").trim().replace(/\s+/gu, "");
4074
4093
  }
4075
- function Pn(n) {
4094
+ function Tn(n) {
4076
4095
  const e = Number(n);
4077
4096
  if (Number.isNaN(e))
4078
4097
  throw new Error(`invalid major amount: ${n}`);
4079
4098
  return Math.round(e * 100);
4080
4099
  }
4081
4100
  function T(n, e) {
4082
- const t = (s) => (Ue(
4101
+ const t = (s) => (_e(
4083
4102
  s,
4084
4103
  `payNotes.${n}().${e} helper`
4085
4104
  ), s);
4086
4105
  return t(n === "capture" ? e === "lock" ? "PayNote/Card Transaction Capture Lock Requested" : e === "unlock" ? "PayNote/Card Transaction Capture Unlock Requested" : "PayNote/Capture Funds Requested" : n === "reserve" ? e === "lock" ? "PayNote/Reserve Lock Requested" : e === "unlock" ? "PayNote/Reserve Unlock Requested" : "PayNote/Reserve Funds Requested" : e === "lock" ? "PayNote/Reservation Release Lock Requested" : e === "unlock" ? "PayNote/Reservation Release Unlock Requested" : "PayNote/Reservation Release Requested");
4087
4106
  }
4088
- class de {
4107
+ class me {
4089
4108
  constructor(e, t) {
4090
4109
  this.parent = e, this.mode = t;
4091
4110
  }
@@ -4181,7 +4200,7 @@ class de {
4181
4200
  return this.parent;
4182
4201
  }
4183
4202
  }
4184
- class be extends u {
4203
+ class Ie extends u {
4185
4204
  constructor(e) {
4186
4205
  super(), this.name(e).type("PayNote/PayNote"), this.channel("payerChannel", {
4187
4206
  type: "MyOS/MyOS Timeline Channel"
@@ -4192,7 +4211,7 @@ class be extends u {
4192
4211
  });
4193
4212
  }
4194
4213
  static create(e) {
4195
- return new be(e);
4214
+ return new Ie(e);
4196
4215
  }
4197
4216
  currency(e) {
4198
4217
  return this.field("/currency", e), this;
@@ -4201,16 +4220,16 @@ class be extends u {
4201
4220
  return this.field("/amount/total", e), this;
4202
4221
  }
4203
4222
  amountMajor(e) {
4204
- return this.field("/amount/total", Pn(e)), this;
4223
+ return this.field("/amount/total", Tn(e)), this;
4205
4224
  }
4206
4225
  capture() {
4207
- return new de(this, "capture");
4226
+ return new me(this, "capture");
4208
4227
  }
4209
4228
  reserve() {
4210
- return new de(this, "reserve");
4229
+ return new me(this, "reserve");
4211
4230
  }
4212
4231
  release() {
4213
- return new de(this, "release");
4232
+ return new me(this, "release");
4214
4233
  }
4215
4234
  operationTrigger(e, t, s, r, i, o) {
4216
4235
  const c = this.operation(e).channel(t);
@@ -4221,10 +4240,10 @@ class be extends u {
4221
4240
  }
4222
4241
  class I {
4223
4242
  static payNote(e) {
4224
- return be.create(e);
4243
+ return Ie.create(e);
4225
4244
  }
4226
4245
  }
4227
- function qn() {
4246
+ function wn() {
4228
4247
  return y.doc().name("Simple Permission Agent").description("Requests read access to provider session on init.").channel("ownerChannel").myOsAdmin("myOsAdminChannel").field("/providerSessionId", "session-abc-123").onInit(
4229
4248
  "requestProviderAccess",
4230
4249
  (n) => n.myOs().requestSingleDocPermission(
@@ -4243,7 +4262,7 @@ function qn() {
4243
4262
  ).replaceValue("MarkReady", "/status", "ready")
4244
4263
  ).buildDocument();
4245
4264
  }
4246
- function An() {
4265
+ function En() {
4247
4266
  return y.doc().name("Collaboration Setup Agent").description("Adds Bob as participant and marks setup progress.").channel("aliceChannel").myOsAdmin("myOsAdminChannel").onInit(
4248
4267
  "addBob",
4249
4268
  (n) => n.myOs().addParticipant("bobChannel", "bob@gmail.com")
@@ -4257,7 +4276,7 @@ function An() {
4257
4276
  (n) => n.replaceValue("Activate", "/status", "active")
4258
4277
  ).buildDocument();
4259
4278
  }
4260
- function Rn() {
4279
+ function Vn() {
4261
4280
  return y.doc().name("Remote Operation Caller").description("Calls operation on linked session when /trigger changes.").channel("ownerChannel").myOsAdmin("myOsAdminChannel").field("/linkedSessionId", "session-xyz-789").onDocChange(
4262
4281
  "onTriggerChanged",
4263
4282
  "/trigger",
@@ -4272,7 +4291,7 @@ function Rn() {
4272
4291
  (n) => n.replaceValue("MarkQueued", "/remoteCallStatus", "queued")
4273
4292
  ).buildDocument();
4274
4293
  }
4275
- function Tn() {
4294
+ function Dn() {
4276
4295
  return y.doc().name("CV Classifier Agent").description("Classifies linked CVs via llm-provider.").channel("recruitmentChannel").myOsAdmin("myOsAdminChannel").field("/llmProviderSessionId", "session-llm-001").field("/recruitmentSessionId", "session-recruitment-001").field("/cvSubscriptionId", "SUB_CV_UPDATES").onInit(
4277
4296
  "requestAccess",
4278
4297
  (n) => n.myOs().requestSingleDocPermission(
@@ -4296,7 +4315,7 @@ function Tn() {
4296
4315
  )
4297
4316
  ).buildDocument();
4298
4317
  }
4299
- function wn() {
4318
+ function Mn() {
4300
4319
  return u.doc().name("Procurement Orchestrator").description(
4301
4320
  "Accesses catalog data and starts worker sessions through agency."
4302
4321
  ).section("participants", "Participants", "User-facing channels").channel("userChannel").endSection().section("state", "State", "Session references and tracking").field("/catalogSessionId", "session-catalog-001").field("/plannerSessionId", "session-planner-001").field("/currentTask", "").field("/negotiations/count", 0).endSection().section("capabilities", "Capabilities", "Access + AI + agency").access("catalog").targetSessionId(u.expr("document('/catalogSessionId')")).onBehalfOf("userChannel").read(!0).operations("search", "getDetails").requestPermissionOnInit().subscribeAfterGranted().statusPath("/catalog/status").done().ai("planner").sessionId(u.expr("document('/plannerSessionId')")).permissionFrom("userChannel").task("findBestDeal").instruction("Find the best deal across catalog results.").expects("Conversation/Event").done().done().agency("procurement").onBehalfOf("userChannel").allowedTypes("MyOS/MyOS Admin Base").allowedOperations("proposeOffer", "accept", "reject").requestPermissionOnInit().statusPath("/agency/status").done().endSection().section("workflow", "Workflow", "Find, analyze, negotiate").operation("findAndBuy").channel("userChannel").requestType(String).description("Find and buy a product").steps(
@@ -4340,14 +4359,14 @@ function wn() {
4340
4359
  )
4341
4360
  ).endSection().buildDocument();
4342
4361
  }
4343
- function En() {
4362
+ function $n() {
4344
4363
  return u.doc().name("Linked Access Monitor").channel("ownerChannel").field("/projectSessionId", "session-project-99").accessLinked("projectData").targetSessionId(u.expr("document('/projectSessionId')")).onBehalfOf("ownerChannel").link("invoices").read(!0).operations("list", "get").done().link("shipments").read(!0).operations("track").done().statusPath("/projectData/status").done().onLinkedAccessGranted(
4345
4364
  "projectData",
4346
4365
  "onLinkedGranted",
4347
4366
  (n) => n.replaceValue("MarkReady", "/projectData/ready", !0)
4348
4367
  ).buildDocument();
4349
4368
  }
4350
- function Vn() {
4369
+ function xn() {
4351
4370
  return y.doc().name("Weather Monitor Agent").description("Requests access and subscribes to a provider session.").channel("ownerChannel").myOsAdmin("myOsAdminChannel").field("/weatherSessionId", "session-weather-prod").field("/status", "initializing").onInit(
4352
4371
  "requestWeatherAccess",
4353
4372
  (n) => n.myOs().requestSingleDocPermission(
@@ -4371,7 +4390,7 @@ function Vn() {
4371
4390
  (n) => n.replaceValue("MarkReady", "/status", "monitoring")
4372
4391
  ).buildDocument();
4373
4392
  }
4374
- function Dn() {
4393
+ function Bn() {
4375
4394
  return y.doc().name("Data Analyzer Agent").description("Calls a provider operation after permission is granted.").channel("ownerChannel").myOsAdmin("myOsAdminChannel").field("/llmSessionId", "session-llm-prod").field("/analysisStatus", "idle").onInit(
4376
4395
  "requestLlmAccess",
4377
4396
  (n) => n.myOs().requestSingleDocPermission(
@@ -4409,7 +4428,7 @@ function Dn() {
4409
4428
  (n) => n.replaceValue("MarkFailed", "/analysisStatus", "failed")
4410
4429
  ).buildDocument();
4411
4430
  }
4412
- function Mn() {
4431
+ function jn() {
4413
4432
  return y.doc().name("Team Setup Agent").description("Adds participants and marks setup progress.").channel("managerChannel").myOsAdmin("myOsAdminChannel").field("/status", "setting-up").onInit(
4414
4433
  "addTeamMembers",
4415
4434
  (n) => n.myOs().addParticipant("aliceChannel", "alice@company.com").myOs().addParticipant("bobChannel", "bob@company.com")
@@ -4427,7 +4446,7 @@ function Mn() {
4427
4446
  (n) => n.replaceValue("MarkReady", "/status", "ready")
4428
4447
  ).buildDocument();
4429
4448
  }
4430
- function $n() {
4449
+ function Nn() {
4431
4450
  return y.doc().name("Invoice Monitor Agent").description("Requests linked-docs permission and tracks invoice totals.").channel("accountingChannel").myOsAdmin("myOsAdminChannel").field("/projectSessionId", "session-project-42").field("/invoiceSubscriptionId", "SUB_INVOICES").field("/totalInvoiced", 0).onInit(
4432
4451
  "requestInvoiceAccess",
4433
4452
  (n) => n.myOs().requestLinkedDocsPermission(
@@ -4456,7 +4475,7 @@ function $n() {
4456
4475
  )
4457
4476
  ).buildDocument();
4458
4477
  }
4459
- function xn() {
4478
+ function Wn() {
4460
4479
  return y.doc().name("Recruitment Classifier").description(
4461
4480
  "Requests access, subscribes, and invokes provider classification."
4462
4481
  ).channel("recruitmentChannel").myOsAdmin("myOsAdminChannel").field("/recruitmentSessionId", "session-recruitment-001").field("/llmProviderSessionId", "session-llm-001").field("/cvSubscriptionId", "SUB_RECRUITMENT_CVS").onInit(
@@ -4514,7 +4533,7 @@ function xn() {
4514
4533
  )
4515
4534
  ).buildDocument();
4516
4535
  }
4517
- function Bn() {
4536
+ function Ln() {
4518
4537
  return u.doc().name("Access + Agency Orchestrator").description("Uses access(), ai(), and agency() together in one flow.").channel("userChannel").field("/catalogSessionId", "session-catalog-007").field("/plannerSessionId", "session-planner-007").field("/lastDeal", {}).access("catalog").targetSessionId(u.expr("document('/catalogSessionId')")).onBehalfOf("userChannel").read(!0).operations("search", "getDetails").subscribeAfterGranted().statusPath("/catalog/status").done().ai("planner").sessionId(u.expr("document('/plannerSessionId')")).permissionFrom("userChannel").task("findDeal").instruction("Find the best deal from provided catalog results.").expects("Conversation/Event").done().done().agency("procurement").onBehalfOf("userChannel").allowedTypes("MyOS/MyOS Admin Base").allowedOperations("proposeOffer", "accept").statusPath("/agency/status").done().operation("findAndStart").channel("userChannel").requestType(String).description("Search catalog and start worker session for negotiation.").steps(
4519
4538
  (n) => n.myOs().callOperation(
4520
4539
  "userChannel",
@@ -4554,7 +4573,7 @@ function Bn() {
4554
4573
  (n) => n.replaceValue("MarkStarted", "/negotiation/status", "started")
4555
4574
  ).buildDocument();
4556
4575
  }
4557
- function jn() {
4576
+ function Un() {
4558
4577
  return u.doc().name("Linked Access Permissions").description("Shows accessLinked() with multiple link permission blocks.").channel("ownerChannel").field("/projectSessionId", "session-project-88").accessLinked("projectData").targetSessionId(u.expr("document('/projectSessionId')")).onBehalfOf("ownerChannel").statusPath("/projectData/status").link("invoices").read(!0).operations("list", "get").done().link("shipments").read(!0).operations("track").done().done().onLinkedAccessGranted(
4559
4578
  "projectData",
4560
4579
  "onProjectDataGranted",
@@ -4565,7 +4584,7 @@ function jn() {
4565
4584
  (n) => n.replaceValue("MarkRevoked", "/projectData/revoked", !0)
4566
4585
  ).buildDocument();
4567
4586
  }
4568
- function Ze() {
4587
+ function Xe() {
4569
4588
  return I.payNote("Balanced Bowl Voucher - 100 USD").description(
4570
4589
  "Reserve voucher budget and capture spending reported by merchant monitoring."
4571
4590
  ).currency("USD").amountMinor(1e4).channel("merchantChannel", {
@@ -4584,13 +4603,13 @@ function Ze() {
4584
4603
  })
4585
4604
  );
4586
4605
  }
4587
- function He() {
4588
- return Ze().buildJson();
4606
+ function et() {
4607
+ return Xe().buildJson();
4589
4608
  }
4590
- function Nn() {
4591
- return Ze().buildDocument();
4609
+ function Fn() {
4610
+ return Xe().buildDocument();
4592
4611
  }
4593
- function Wn() {
4612
+ function _n() {
4594
4613
  return I.payNote("Armchair Protection + Voucher").description(
4595
4614
  "Capture unlocks after buyer satisfaction, then a voucher payment is requested."
4596
4615
  ).currency("USD").amountMinor(1e4).capture().lockOnInit().unlockOnOperation(
@@ -4604,11 +4623,11 @@ function Wn() {
4604
4623
  (n) => n.triggerPayment(
4605
4624
  "VoucherCredit",
4606
4625
  "Conversation/Event",
4607
- (e) => e.processor("guarantorChannel").from("payeeChannel").to("payerChannel").currency("USD").amountMinor(1e4).reason("voucher-activation").attachPayNote(He())
4626
+ (e) => e.processor("guarantorChannel").from("payeeChannel").to("payerChannel").currency("USD").amountMinor(1e4).reason("voucher-activation").attachPayNote(et())
4608
4627
  )
4609
4628
  ).buildDocument();
4610
4629
  }
4611
- function Ln() {
4630
+ function Kn() {
4612
4631
  return I.payNote("Shipment Escrow - Simple").description("Capture is locked until guarantor confirms delivery.").currency("USD").amountMinor(12e4).channel("shipmentCompanyChannel", {
4613
4632
  type: "Conversation/Timeline Channel",
4614
4633
  timelineId: "shipment-timeline"
@@ -4619,7 +4638,7 @@ function Ln() {
4619
4638
  (n) => n.emitType("DeliveryConfirmed", "Conversation/Event")
4620
4639
  ).done().buildDocument();
4621
4640
  }
4622
- function Un() {
4641
+ function Gn() {
4623
4642
  return I.payNote("Capture Triggered From Channel Event").description(
4624
4643
  "Shipment channel emits shipment confirmation, then the document captures funds."
4625
4644
  ).currency("USD").amountMinor(9e4).channel("shipmentCompanyChannel", {
@@ -4636,14 +4655,14 @@ function Un() {
4636
4655
  (n) => n.capture().requestNow()
4637
4656
  ).buildDocument();
4638
4657
  }
4639
- function Fn() {
4658
+ function Jn() {
4640
4659
  return I.payNote("Capture Triggered From Document Update").description("When delivery confirmation path appears, unlock and capture.").currency("EUR").amountMinor(49900).capture().lockOnInit().unlockOnDocPathChange("/delivery/confirmedAt").done().onDocChange(
4641
4660
  "captureAfterDeliveryPathUpdate",
4642
4661
  "/delivery/confirmedAt",
4643
4662
  (n) => n.capture().requestNow()
4644
4663
  ).buildDocument();
4645
4664
  }
4646
- function _n() {
4665
+ function zn() {
4647
4666
  return I.payNote("Reserve On Approval Then Capture On Confirmation").description(
4648
4667
  "Reserve unlocks when /approved changes; capture unlocks on delivery confirmation."
4649
4668
  ).currency("USD").amountMinor(25e4).reserve().requestOnInit().done().onEvent(
@@ -4660,7 +4679,7 @@ function _n() {
4660
4679
  "Request full capture after confirmation."
4661
4680
  ).done().buildDocument();
4662
4681
  }
4663
- function Kn() {
4682
+ function Qn() {
4664
4683
  return I.payNote("Reserve Immediately Release On Dispute").description(
4665
4684
  "Reserve on init; payer can open dispute for full reservation release."
4666
4685
  ).currency("EUR").amountMinor(75e3).reserve().requestOnInit().done().capture().requestOnOperation(
@@ -4673,7 +4692,7 @@ function Kn() {
4673
4692
  "Payer opens dispute for full release."
4674
4693
  ).done().buildDocument();
4675
4694
  }
4676
- function Gn() {
4695
+ function Yn() {
4677
4696
  return I.payNote("Milestone Reserve Partial Capture").description("Reserve full amount; guarantor approves milestone captures.").currency("USD").amountMinor(2e6).reserve().requestOnInit().done().capture().requestPartialOnOperation(
4678
4697
  "approveMilestone1",
4679
4698
  "guarantorChannel",
@@ -4701,7 +4720,7 @@ function Gn() {
4701
4720
  "Release unfinished work."
4702
4721
  ).done().buildDocument();
4703
4722
  }
4704
- function Jn() {
4723
+ function Zn() {
4705
4724
  return I.payNote("Reserve After KYC Capture On Settlement").description(
4706
4725
  "Reserve unlocks after KYC; capture unlocks on settlement confirmation."
4707
4726
  ).currency("CHF").amountMinor(5e6).reserve().requestOnInit().done().capture().lockOnInit().unlockOnDocPathChange("/settlement/confirmed").requestOnDocPathChange("/settlement/confirmed").done().release().requestOnOperation(
@@ -4710,7 +4729,7 @@ function Jn() {
4710
4729
  "Reject and release if KYC fails."
4711
4730
  ).done().buildDocument();
4712
4731
  }
4713
- function zn() {
4732
+ function Hn() {
4714
4733
  return I.payNote("Release Locked Until Window Opens").description(
4715
4734
  "Capture runs on init; release unlocks only after guarantor opens a window."
4716
4735
  ).currency("USD").amountMinor(19900).reserve().requestOnInit().done().capture().requestOnInit().done().release().requestOnOperation(
@@ -4723,7 +4742,7 @@ function zn() {
4723
4742
  "Payer requests full release."
4724
4743
  ).done().buildDocument();
4725
4744
  }
4726
- function Qn() {
4745
+ function Xn() {
4727
4746
  return I.payNote("Armchair With Voucher Bootstrap").currency("USD").amountMinor(8e4).capture().lockOnInit().unlockOnOperation(
4728
4747
  "confirmSatisfaction",
4729
4748
  "payerChannel",
@@ -4733,7 +4752,7 @@ function Qn() {
4733
4752
  "PayNote/Funds Captured",
4734
4753
  (n) => n.myOs().bootstrapDocument(
4735
4754
  "BootstrapVoucherDoc",
4736
- He(),
4755
+ et(),
4737
4756
  {
4738
4757
  payerChannel: {
4739
4758
  type: "Conversation/Timeline Channel",
@@ -4764,12 +4783,12 @@ function Qn() {
4764
4783
  (n) => n.replaceValue("MarkFailed", "/voucher/status", "failed")
4765
4784
  ).buildDocument();
4766
4785
  }
4767
- function Yn() {
4786
+ function es() {
4768
4787
  return y.doc().name("Orchestrated Document").channel("orchestratorChannel").channel("aliceChannel").channel("bobChannel").onInit(
4769
4788
  "bootstrapChild",
4770
4789
  (n) => n.bootstrapDocument(
4771
4790
  "BootstrapChildDoc",
4772
- Hn(),
4791
+ ns(),
4773
4792
  {
4774
4793
  participantA: {
4775
4794
  type: "Conversation/Timeline Channel",
@@ -4797,15 +4816,15 @@ function Yn() {
4797
4816
  )
4798
4817
  ).buildDocument();
4799
4818
  }
4800
- function Zn() {
4819
+ function ts() {
4801
4820
  return y.doc().name("With Messages").channel("sellerChannel", { type: "MyOS/MyOS Timeline Channel" }).channel("buyerChannel", { type: "MyOS/MyOS Timeline Channel" }).myOsAdmin("myOsAdminChannel").onInit(
4802
4821
  "bootstrapDeal",
4803
4822
  (n) => n.myOs().bootstrapDocument(
4804
4823
  "BootstrapDeal",
4805
- Xn(),
4824
+ ss(),
4806
4825
  {
4807
- sellerChannel: Te("sellerChannel"),
4808
- buyerChannel: Te("buyerChannel")
4826
+ sellerChannel: we("sellerChannel"),
4827
+ buyerChannel: we("buyerChannel")
4809
4828
  },
4810
4829
  "sellerChannel",
4811
4830
  (e) => {
@@ -4819,121 +4838,121 @@ function Zn() {
4819
4838
  )
4820
4839
  ).buildDocument();
4821
4840
  }
4822
- function Hn() {
4841
+ function ns() {
4823
4842
  return y.doc().name("Child Collaboration").channel("participantA").channel("participantB").buildJson();
4824
4843
  }
4825
- function Xn() {
4844
+ function ss() {
4826
4845
  return y.doc().name("Deal").channel("sellerChannel").channel("buyerChannel").field("/status", "draft").buildJson();
4827
4846
  }
4828
- function os() {
4847
+ function hs() {
4829
4848
  return {
4830
- simpleAgentWithPermissions: qn(),
4831
- agentAddsParticipantAndWaits: An(),
4832
- agentCallsRemoteOperation: Rn(),
4833
- cvClassifierAgent: Tn(),
4834
- orchestratorWithAccessAndAgency: wn(),
4835
- linkedAccessMonitor: En(),
4836
- simplePermissionAndSubscribe: Vn(),
4837
- callRemoteOperation: Dn(),
4838
- addParticipantsDynamically: Mn(),
4839
- linkedDocsWithUpdates: $n(),
4840
- cvClassifierFull: xn(),
4841
- accessAndAgencyOrchestrator: Bn(),
4842
- linkedAccessPermissions: jn(),
4843
- bootstrapVoucherOnCapture: Qn(),
4844
- bootstrapViaOrchestrator: Yn(),
4845
- bootstrapWithMessages: Zn(),
4846
- shipmentEscrowSimple: Ln(),
4847
- captureTriggeredFromChannelEvent: Un(),
4848
- captureTriggeredFromDocUpdate: Fn(),
4849
- reserveOnApprovalThenCaptureOnConfirmation: _n(),
4850
- reserveImmediatelyReleaseOnDispute: Kn(),
4851
- milestoneReservePartialCapture: Gn(),
4852
- reserveLockedUntilKycThenCaptureOnSettlement: Jn(),
4853
- releaseLockedUntilWindowOpens: zn(),
4854
- armchairProtectionWithVoucherPayNoteTemplate: Wn(),
4855
- balancedBowlVoucherPayNoteTemplate: Nn()
4849
+ simpleAgentWithPermissions: wn(),
4850
+ agentAddsParticipantAndWaits: En(),
4851
+ agentCallsRemoteOperation: Vn(),
4852
+ cvClassifierAgent: Dn(),
4853
+ orchestratorWithAccessAndAgency: Mn(),
4854
+ linkedAccessMonitor: $n(),
4855
+ simplePermissionAndSubscribe: xn(),
4856
+ callRemoteOperation: Bn(),
4857
+ addParticipantsDynamically: jn(),
4858
+ linkedDocsWithUpdates: Nn(),
4859
+ cvClassifierFull: Wn(),
4860
+ accessAndAgencyOrchestrator: Ln(),
4861
+ linkedAccessPermissions: Un(),
4862
+ bootstrapVoucherOnCapture: Xn(),
4863
+ bootstrapViaOrchestrator: es(),
4864
+ bootstrapWithMessages: ts(),
4865
+ shipmentEscrowSimple: Kn(),
4866
+ captureTriggeredFromChannelEvent: Gn(),
4867
+ captureTriggeredFromDocUpdate: Jn(),
4868
+ reserveOnApprovalThenCaptureOnConfirmation: zn(),
4869
+ reserveImmediatelyReleaseOnDispute: Qn(),
4870
+ milestoneReservePartialCapture: Yn(),
4871
+ reserveLockedUntilKycThenCaptureOnSettlement: Zn(),
4872
+ releaseLockedUntilWindowOpens: Hn(),
4873
+ armchairProtectionWithVoucherPayNoteTemplate: _n(),
4874
+ balancedBowlVoucherPayNoteTemplate: Fn()
4856
4875
  };
4857
4876
  }
4858
4877
  export {
4859
- zt as AISteps,
4860
- Ct as AccessBuilder,
4861
- Mt as AccessSteps,
4862
- Pt as AgencyBindingsBuilder,
4863
- It as AgencyBuilder,
4864
- qt as AgencyCapabilitiesBuilder,
4865
- At as AgencyOptionsBuilder,
4866
- jt as AgencySteps,
4867
- gt as AiIntegrationBuilder,
4868
- ft as AiTaskBuilder,
4878
+ Ht as AISteps,
4879
+ Ot as AccessBuilder,
4880
+ jt as AccessSteps,
4881
+ Tt as AgencyBindingsBuilder,
4882
+ Rt as AgencyBuilder,
4883
+ wt as AgencyCapabilitiesBuilder,
4884
+ Et as AgencyOptionsBuilder,
4885
+ Ut as AgencySteps,
4886
+ St as AiIntegrationBuilder,
4887
+ vt as AiTaskBuilder,
4869
4888
  K as BasicBlueTypes,
4870
- is as BlueChangeCompiler,
4871
- In as BlueChangePlan,
4872
- Jt as CaptureStepBuilder,
4873
- Lt as ChangesetBuilder,
4889
+ ls as BlueChangeCompiler,
4890
+ Rn as BlueChangePlan,
4891
+ Zt as CaptureStepBuilder,
4892
+ Kt as ChangesetBuilder,
4874
4893
  u as DocBuilder,
4875
- ut as DocJsonState,
4876
- Ye as DocPatch,
4894
+ dt as DocJsonState,
4895
+ He as DocPatch,
4877
4896
  J as DocStructure,
4878
- qe as EventPayloadBuilder,
4879
- Rt as FieldBuilder,
4880
- St as LinkedAccessBuilder,
4881
- $t as LinkedAccessSteps,
4897
+ Ae as EventPayloadBuilder,
4898
+ Vt as FieldBuilder,
4899
+ It as LinkedAccessBuilder,
4900
+ Nt as LinkedAccessSteps,
4882
4901
  x as MyOsPermissions,
4883
- Wt as MyOsSteps,
4884
- wt as OperationBuilder,
4885
- de as PayNoteActionBuilder,
4886
- be as PayNoteBuilder,
4902
+ _t as MyOsSteps,
4903
+ Mt as OperationBuilder,
4904
+ me as PayNoteActionBuilder,
4905
+ Ie as PayNoteBuilder,
4887
4906
  I as PayNotes,
4888
- Gt as PaymentRequestPayloadBuilder,
4907
+ Yt as PaymentRequestPayloadBuilder,
4889
4908
  Y as RuntimeEventTypes,
4890
4909
  y as SimpleDocBuilder,
4891
- Qt as StepsBuilder,
4892
- Bn as accessAndAgencyOrchestrator,
4893
- Mn as addParticipantsDynamically,
4894
- An as agentAddsParticipantAndWaits,
4895
- Rn as agentCallsRemoteOperation,
4896
- os as allJavaSandboxSampleDocs,
4897
- rs as applyBlueChangePlan,
4898
- Wn as armchairProtectionWithVoucherPayNoteTemplate,
4899
- Ue as assertRepositoryTypeAliasAvailable,
4900
- Nn as balancedBowlVoucherPayNoteTemplate,
4901
- Yn as bootstrapViaOrchestrator,
4902
- Qn as bootstrapVoucherOnCapture,
4903
- Zn as bootstrapWithMessages,
4904
- Dn as callRemoteOperationSample,
4905
- Un as captureTriggeredFromChannelEvent,
4906
- Fn as captureTriggeredFromDocUpdate,
4907
- vn as compileContractChanges,
4908
- Cn as compileRootChanges,
4909
- Tn as cvClassifierAgent,
4910
- xn as cvClassifierFull,
4911
- Qe as diffJsonDocuments,
4910
+ Xt as StepsBuilder,
4911
+ Ln as accessAndAgencyOrchestrator,
4912
+ jn as addParticipantsDynamically,
4913
+ En as agentAddsParticipantAndWaits,
4914
+ Vn as agentCallsRemoteOperation,
4915
+ hs as allJavaSandboxSampleDocs,
4916
+ us as applyBlueChangePlan,
4917
+ _n as armchairProtectionWithVoucherPayNoteTemplate,
4918
+ _e as assertRepositoryTypeAliasAvailable,
4919
+ Fn as balancedBowlVoucherPayNoteTemplate,
4920
+ es as bootstrapViaOrchestrator,
4921
+ Xn as bootstrapVoucherOnCapture,
4922
+ ts as bootstrapWithMessages,
4923
+ Bn as callRemoteOperationSample,
4924
+ Gn as captureTriggeredFromChannelEvent,
4925
+ Jn as captureTriggeredFromDocUpdate,
4926
+ bn as compileContractChanges,
4927
+ On as compileRootChanges,
4928
+ Dn as cvClassifierAgent,
4929
+ Wn as cvClassifierFull,
4930
+ Ze as diffJsonDocuments,
4912
4931
  A as ensureExpression,
4913
4932
  W as escapePointerSegment,
4914
- Te as fromChannel,
4915
- ss as fromEmail,
4916
- re as fromJsonDocument,
4917
- ot as getPointer,
4918
- mt as isRepositoryTypeAliasAvailable,
4919
- En as linkedAccessMonitor,
4920
- jn as linkedAccessPermissions,
4921
- $n as linkedDocsWithUpdates,
4922
- Gn as milestoneReservePartialCapture,
4923
- Oe as normalizeMyOsPermissionObject,
4924
- Fe as normalizeTypeLike,
4925
- wn as orchestratorWithAccessAndAgency,
4926
- zn as releaseLockedUntilWindowOpens,
4933
+ we as fromChannel,
4934
+ cs as fromEmail,
4935
+ ie as fromJsonDocument,
4936
+ lt as getPointer,
4937
+ Ct as isRepositoryTypeAliasAvailable,
4938
+ $n as linkedAccessMonitor,
4939
+ Un as linkedAccessPermissions,
4940
+ Nn as linkedDocsWithUpdates,
4941
+ Yn as milestoneReservePartialCapture,
4942
+ be as normalizeMyOsPermissionObject,
4943
+ Ke as normalizeTypeLike,
4944
+ Mn as orchestratorWithAccessAndAgency,
4945
+ Hn as releaseLockedUntilWindowOpens,
4927
4946
  H as removePointer,
4928
- Kn as reserveImmediatelyReleaseOnDispute,
4929
- Jn as reserveLockedUntilKycThenCaptureOnSettlement,
4930
- _n as reserveOnApprovalThenCaptureOnConfirmation,
4947
+ Qn as reserveImmediatelyReleaseOnDispute,
4948
+ Zn as reserveLockedUntilKycThenCaptureOnSettlement,
4949
+ zn as reserveOnApprovalThenCaptureOnConfirmation,
4931
4950
  te as sdkBlue,
4932
4951
  Z as setPointer,
4933
- Ln as shipmentEscrowSimple,
4934
- qn as simpleAgentWithPermissions,
4935
- Vn as simplePermissionAndSubscribe,
4936
- ae as toOfficialJson,
4937
- ns as toOfficialYaml,
4952
+ Kn as shipmentEscrowSimple,
4953
+ wn as simpleAgentWithPermissions,
4954
+ xn as simplePermissionAndSubscribe,
4955
+ ce as toOfficialJson,
4956
+ as as toOfficialYaml,
4938
4957
  m as toTypeAlias
4939
4958
  };