@aintela/chat 0.2.46 → 0.2.47

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.
@@ -3,8 +3,8 @@ var Wt = (s, t, i) => t in s ? wt(s, t, { enumerable: !0, configurable: !0, writ
3
3
  var l = (s, t) => wt(s, "name", { value: t, configurable: !0 });
4
4
  var e = (s, t, i) => Wt(s, typeof t != "symbol" ? t + "" : t, i);
5
5
  import { E as m, q as It, A as $t, G as Gt } from "./environmentUtils-CUVZ6Dq1.js";
6
- import { jsonMember as o, jsonObject as d, AnyT as _, jsonArrayMember as St, TypedJSON as Pt } from "typedjson";
7
- const w = class w {
6
+ import { jsonMember as o, jsonObject as d, AnyT as L, jsonArrayMember as St, TypedJSON as Pt } from "typedjson";
7
+ const R = class R {
8
8
  static replaceFirstTwoTabsPerLine(t) {
9
9
  const i = /^\s{15}/gm;
10
10
  return typeof t == "string" ? t.replaceAll(i, (r) => r.substring(15)) : t ?? "";
@@ -12,7 +12,7 @@ const w = class w {
12
12
  static jsonToString(t) {
13
13
  if (t == null) return "";
14
14
  if (typeof t != "object") return String(t);
15
- const i = Array.isArray(t) ? w.isCharArray(t) ? t.join("") : null : w.tryCollapseCharIndexedObject(t);
15
+ const i = Array.isArray(t) ? R.isCharArray(t) ? t.join("") : null : R.tryCollapseCharIndexedObject(t);
16
16
  if (i != null) return i;
17
17
  if (Array.isArray(t))
18
18
  try {
@@ -132,7 +132,7 @@ const w = class w {
132
132
  }
133
133
  static createWaiting(t = !1, i = !0, r, a, p) {
134
134
  r || (r = "Waiting");
135
- const c = w.fromText("...", void 0, "waitingpart");
135
+ const c = R.fromText("...", void 0, "waitingpart");
136
136
  return c.eventType = m.Waiting, c.waitingDetails = {
137
137
  startingPoint: a,
138
138
  addTimer: t,
@@ -142,7 +142,7 @@ const w = class w {
142
142
  }, c;
143
143
  }
144
144
  static createSuspended() {
145
- const t = w.fromText("SUSPEND");
145
+ const t = R.fromText("SUSPEND");
146
146
  return t.eventType = m.Suspended, t;
147
147
  }
148
148
  static getPartTextContent(t) {
@@ -186,10 +186,10 @@ const w = class w {
186
186
  return t.eventType === m.CodeExecutionResult || t.eventType === m.ExecutableCode;
187
187
  }
188
188
  };
189
- l(w, "InteractionPartUtils");
190
- let Nt = w;
191
- var qt = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */ l((s, t, i, r) => {
192
- for (var a = r > 1 ? void 0 : r ? Mt(t, i) : t, p = s.length - 1, c; p >= 0; p--)
189
+ l(R, "InteractionPartUtils");
190
+ let Nt = R;
191
+ var qt = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */ l((s, t, i, r) => {
192
+ for (var a = r > 1 ? void 0 : r ? Bt(t, i) : t, p = s.length - 1, c; p >= 0; p--)
193
193
  (c = s[p]) && (a = (r ? c(t, i, a) : c(a)) || a);
194
194
  return r && a && qt(t, i, a), a;
195
195
  }, "__decorateClass");
@@ -210,36 +210,36 @@ const x = {
210
210
  StreamingFinalFunctionResultContent: "StreamingFinalFunctionResultContent",
211
211
  StreamingClientOutputContent: "StreamingClientOutputContent"
212
212
  };
213
- var J;
214
- let xt = (J = class {
213
+ var W;
214
+ let xt = (W = class {
215
215
  constructor() {
216
216
  e(this, "label");
217
217
  }
218
- }, l(J, "AuthorRole"), J);
218
+ }, l(W, "AuthorRole"), W);
219
219
  n([
220
220
  o(String)
221
221
  ], xt.prototype, "label", 2);
222
222
  xt = n([
223
223
  d({ name: "AuthorRole" })
224
224
  ], xt);
225
- var W;
226
- let mt = (W = class {
225
+ var $;
226
+ let gt = ($ = class {
227
227
  constructor() {
228
228
  e(this, "type");
229
229
  e(this, "fullName");
230
230
  }
231
- }, l(W, "EventTypeInformation"), W);
231
+ }, l($, "EventTypeInformation"), $);
232
232
  n([
233
233
  o(String)
234
- ], mt.prototype, "type", 2);
234
+ ], gt.prototype, "type", 2);
235
235
  n([
236
236
  o(String)
237
- ], mt.prototype, "fullName", 2);
238
- mt = n([
237
+ ], gt.prototype, "fullName", 2);
238
+ gt = n([
239
239
  d({ name: "EventTypeInformation" })
240
- ], mt);
241
- var $;
242
- let R = ($ = class {
240
+ ], gt);
241
+ var G;
242
+ let v = (G = class {
243
243
  constructor() {
244
244
  e(this, "id");
245
245
  e(this, "name");
@@ -256,24 +256,24 @@ let R = ($ = class {
256
256
  id: this.id
257
257
  };
258
258
  }
259
- }, l($, "LlmArtifact"), $);
259
+ }, l(G, "LlmArtifact"), G);
260
260
  n([
261
261
  o(String)
262
- ], R.prototype, "id", 2);
262
+ ], v.prototype, "id", 2);
263
263
  n([
264
264
  o(String)
265
- ], R.prototype, "name", 2);
265
+ ], v.prototype, "name", 2);
266
266
  n([
267
267
  o(String)
268
- ], R.prototype, "mimeType", 2);
268
+ ], v.prototype, "mimeType", 2);
269
269
  n([
270
270
  o(String)
271
- ], R.prototype, "description", 2);
272
- R = n([
271
+ ], v.prototype, "description", 2);
272
+ v = n([
273
273
  d({ name: "LlmArtifact" })
274
- ], R);
275
- var G;
276
- let h = (G = class {
274
+ ], v);
275
+ var q;
276
+ let h = (q = class {
277
277
  constructor() {
278
278
  e(this, "mimeType");
279
279
  // InnerContent is ignored (JsonIgnore in C#)
@@ -282,7 +282,7 @@ let h = (G = class {
282
282
  e(this, "modelId");
283
283
  e(this, "metadata");
284
284
  }
285
- }, l(G, "KernelContent"), G);
285
+ }, l(q, "KernelContent"), q);
286
286
  n([
287
287
  o(String)
288
288
  ], h.prototype, "mimeType", 2);
@@ -290,13 +290,13 @@ n([
290
290
  o(String)
291
291
  ], h.prototype, "modelId", 2);
292
292
  n([
293
- o(_)
293
+ o(L)
294
294
  ], h.prototype, "metadata", 2);
295
295
  h = n([
296
296
  d({ name: "KernelContent" })
297
297
  ], h);
298
- var q;
299
- let C = (q = class {
298
+ var B;
299
+ let C = (B = class {
300
300
  constructor() {
301
301
  e(this, "choiceIndex", 0);
302
302
  // InnerContent is ignored (JsonIgnore in C#)
@@ -305,7 +305,7 @@ let C = (q = class {
305
305
  e(this, "modelId");
306
306
  e(this, "metadata");
307
307
  }
308
- }, l(q, "StreamingKernelContent"), q);
308
+ }, l(B, "StreamingKernelContent"), B);
309
309
  n([
310
310
  o(Number)
311
311
  ], C.prototype, "choiceIndex", 2);
@@ -338,56 +338,56 @@ n([
338
338
  ht = n([
339
339
  d({ name: "TextContent" })
340
340
  ], ht);
341
- var B;
342
- let v = (B = class extends C {
341
+ var K;
342
+ let P = (K = class extends C {
343
343
  constructor() {
344
344
  super();
345
345
  e(this, "eventName");
346
346
  e(this, "eventData");
347
347
  e(this, "sessionId");
348
348
  }
349
- }, l(B, "StreamingToolEventContent"), B);
349
+ }, l(K, "StreamingToolEventContent"), K);
350
350
  n([
351
351
  o(String)
352
- ], v.prototype, "eventName", 2);
352
+ ], P.prototype, "eventName", 2);
353
353
  n([
354
354
  o(String)
355
- ], v.prototype, "eventData", 2);
355
+ ], P.prototype, "eventData", 2);
356
356
  n([
357
357
  o(String)
358
- ], v.prototype, "sessionId", 2);
359
- v = n([
358
+ ], P.prototype, "sessionId", 2);
359
+ P = n([
360
360
  d({ name: "StreamingToolEventContent" })
361
- ], v);
362
- var K;
363
- let P = (K = class extends h {
361
+ ], P);
362
+ var H;
363
+ let k = (H = class extends h {
364
364
  constructor() {
365
365
  super();
366
366
  e(this, "eventName");
367
367
  e(this, "eventData");
368
368
  e(this, "sessionId");
369
369
  }
370
- }, l(K, "ToolEventContent"), K);
370
+ }, l(H, "ToolEventContent"), H);
371
371
  n([
372
372
  o(String)
373
- ], P.prototype, "eventName", 2);
373
+ ], k.prototype, "eventName", 2);
374
374
  n([
375
375
  o(String)
376
- ], P.prototype, "eventData", 2);
376
+ ], k.prototype, "eventData", 2);
377
377
  n([
378
378
  o(String)
379
- ], P.prototype, "sessionId", 2);
380
- P = n([
379
+ ], k.prototype, "sessionId", 2);
380
+ k = n([
381
381
  d({ name: "ToolEventContent" })
382
- ], P);
383
- var H;
384
- let Ct = (H = class extends h {
382
+ ], k);
383
+ var Y;
384
+ let Ct = (Y = class extends h {
385
385
  constructor() {
386
386
  super(...arguments);
387
387
  e(this, "url");
388
388
  e(this, "dataUri");
389
389
  }
390
- }, l(H, "ImageContent"), H);
390
+ }, l(Y, "ImageContent"), Y);
391
391
  n([
392
392
  o(String)
393
393
  ], Ct.prototype, "url", 2);
@@ -397,8 +397,8 @@ n([
397
397
  Ct = n([
398
398
  d({ name: "ImageContent" })
399
399
  ], Ct);
400
- var Y;
401
- let A = (Y = class extends h {
400
+ var Q;
401
+ let U = (Q = class extends h {
402
402
  constructor() {
403
403
  super(...arguments);
404
404
  e(this, "id");
@@ -408,45 +408,53 @@ let A = (Y = class extends h {
408
408
  // Exception is not serializable - omit jsonMember decorator
409
409
  e(this, "exception");
410
410
  }
411
- }, l(Y, "FunctionCallContent"), Y);
411
+ }, l(Q, "FunctionCallContent"), Q);
412
412
  n([
413
413
  o(String)
414
- ], A.prototype, "id", 2);
414
+ ], U.prototype, "id", 2);
415
415
  n([
416
416
  o(String)
417
- ], A.prototype, "pluginName", 2);
417
+ ], U.prototype, "pluginName", 2);
418
418
  n([
419
419
  o(String)
420
- ], A.prototype, "functionName", 2);
420
+ ], U.prototype, "functionName", 2);
421
421
  n([
422
- o(_)
423
- ], A.prototype, "arguments", 2);
424
- A = n([
422
+ o(L)
423
+ ], U.prototype, "arguments", 2);
424
+ U = n([
425
425
  d({ name: "FunctionCallContent" })
426
- ], A);
427
- var Q;
428
- let k = (Q = class {
426
+ ], U);
427
+ var V;
428
+ let I = (V = class {
429
429
  constructor() {
430
430
  e(this, "isUi");
431
431
  e(this, "askUserComponent");
432
432
  e(this, "argsDescription");
433
+ e(this, "cancelUi");
434
+ e(this, "parked");
433
435
  }
434
- }, l(Q, "ToolCallPresentation"), Q);
436
+ }, l(V, "ToolCallPresentation"), V);
435
437
  n([
436
438
  o(Boolean)
437
- ], k.prototype, "isUi", 2);
439
+ ], I.prototype, "isUi", 2);
438
440
  n([
439
441
  o(String)
440
- ], k.prototype, "askUserComponent", 2);
442
+ ], I.prototype, "askUserComponent", 2);
441
443
  n([
442
444
  o(String)
443
- ], k.prototype, "argsDescription", 2);
444
- k = n([
445
+ ], I.prototype, "argsDescription", 2);
446
+ n([
447
+ o(Boolean)
448
+ ], I.prototype, "cancelUi", 2);
449
+ n([
450
+ o(Boolean)
451
+ ], I.prototype, "parked", 2);
452
+ I = n([
445
453
  d({ name: "ToolCallPresentation" })
446
- ], k);
447
- const Bt = "aia:presentation";
448
- var V;
449
- let b = (V = class extends C {
454
+ ], I);
455
+ const Mt = "aia:presentation";
456
+ var X;
457
+ let b = (X = class extends C {
450
458
  constructor() {
451
459
  super(...arguments);
452
460
  e(this, "id");
@@ -454,7 +462,7 @@ let b = (V = class extends C {
454
462
  e(this, "arguments");
455
463
  e(this, "presentation");
456
464
  }
457
- }, l(V, "StreamingFinalFunctionCallContent"), V);
465
+ }, l(X, "StreamingFinalFunctionCallContent"), X);
458
466
  n([
459
467
  o(String, { name: "callId" })
460
468
  ], b.prototype, "id", 2);
@@ -465,13 +473,13 @@ n([
465
473
  o(String)
466
474
  ], b.prototype, "arguments", 2);
467
475
  n([
468
- o(k)
476
+ o(I)
469
477
  ], b.prototype, "presentation", 2);
470
478
  b = n([
471
479
  d({ name: "StreamingFinalFunctionCallContent" })
472
480
  ], b);
473
- var X;
474
- let U = (X = class extends h {
481
+ var Z;
482
+ let O = (Z = class extends h {
475
483
  constructor() {
476
484
  super(...arguments);
477
485
  e(this, "id");
@@ -479,24 +487,24 @@ let U = (X = class extends h {
479
487
  e(this, "functionName");
480
488
  e(this, "result");
481
489
  }
482
- }, l(X, "FunctionResultContent"), X);
490
+ }, l(Z, "FunctionResultContent"), Z);
483
491
  n([
484
492
  o(String, { name: "callId" })
485
- ], U.prototype, "id", 2);
493
+ ], O.prototype, "id", 2);
486
494
  n([
487
495
  o(String)
488
- ], U.prototype, "pluginName", 2);
496
+ ], O.prototype, "pluginName", 2);
489
497
  n([
490
498
  o(String)
491
- ], U.prototype, "functionName", 2);
499
+ ], O.prototype, "functionName", 2);
492
500
  n([
493
- o(_)
494
- ], U.prototype, "result", 2);
495
- U = n([
501
+ o(L)
502
+ ], O.prototype, "result", 2);
503
+ O = n([
496
504
  d({ name: "FunctionResultContent" })
497
- ], U);
498
- var Z;
499
- let I = (Z = class extends C {
505
+ ], O);
506
+ var j;
507
+ let N = (j = class extends C {
500
508
  constructor() {
501
509
  super(...arguments);
502
510
  e(this, "id");
@@ -506,70 +514,74 @@ let I = (Z = class extends C {
506
514
  e(this, "presentation");
507
515
  e(this, "clientOutput");
508
516
  }
509
- }, l(Z, "StreamingFinalFunctionResultContent"), Z);
517
+ }, l(j, "StreamingFinalFunctionResultContent"), j);
510
518
  n([
511
519
  o(String, { name: "callId" })
512
- ], I.prototype, "id", 2);
520
+ ], N.prototype, "id", 2);
513
521
  n([
514
522
  o(String)
515
- ], I.prototype, "pluginName", 2);
523
+ ], N.prototype, "pluginName", 2);
516
524
  n([
517
525
  o(String)
518
- ], I.prototype, "functionName", 2);
526
+ ], N.prototype, "functionName", 2);
519
527
  n([
520
- o(_)
521
- ], I.prototype, "result", 2);
528
+ o(L)
529
+ ], N.prototype, "result", 2);
522
530
  n([
523
- o(k)
524
- ], I.prototype, "presentation", 2);
531
+ o(I)
532
+ ], N.prototype, "presentation", 2);
525
533
  n([
526
- o(_)
527
- ], I.prototype, "clientOutput", 2);
528
- I = n([
534
+ o(L)
535
+ ], N.prototype, "clientOutput", 2);
536
+ N = n([
529
537
  d({ name: "StreamingFinalFunctionResultContent" })
530
- ], I);
531
- var j;
532
- let gt = (j = class extends h {
538
+ ], N);
539
+ var tt;
540
+ let dt = (tt = class extends h {
533
541
  constructor() {
534
542
  super(...arguments);
535
543
  e(this, "id");
536
544
  e(this, "data");
537
545
  }
538
- }, l(j, "FunctionClientOutputContent"), j);
546
+ }, l(tt, "FunctionClientOutputContent"), tt);
539
547
  n([
540
548
  o(String, { name: "callId" })
541
- ], gt.prototype, "id", 2);
549
+ ], dt.prototype, "id", 2);
542
550
  n([
543
- o(_)
544
- ], gt.prototype, "data", 2);
545
- gt = n([
551
+ o(L)
552
+ ], dt.prototype, "data", 2);
553
+ dt = n([
546
554
  d({ name: "FunctionClientOutputContent" })
547
- ], gt);
548
- var tt;
549
- let dt = (tt = class extends C {
555
+ ], dt);
556
+ var et;
557
+ let z = (et = class extends C {
550
558
  constructor() {
551
559
  super(...arguments);
552
560
  e(this, "id");
553
561
  e(this, "clientOutput");
562
+ e(this, "presentation");
554
563
  }
555
- }, l(tt, "StreamingClientOutputContent"), tt);
564
+ }, l(et, "StreamingClientOutputContent"), et);
556
565
  n([
557
566
  o(String, { name: "callId" })
558
- ], dt.prototype, "id", 2);
567
+ ], z.prototype, "id", 2);
559
568
  n([
560
- o(_)
561
- ], dt.prototype, "clientOutput", 2);
562
- dt = n([
569
+ o(L)
570
+ ], z.prototype, "clientOutput", 2);
571
+ n([
572
+ o(I)
573
+ ], z.prototype, "presentation", 2);
574
+ z = n([
563
575
  d({ name: "StreamingClientOutputContent" })
564
- ], dt);
565
- var et;
566
- let yt = (et = class extends h {
576
+ ], z);
577
+ var nt;
578
+ let yt = (nt = class extends h {
567
579
  constructor() {
568
580
  super(...arguments);
569
581
  e(this, "name");
570
582
  e(this, "args");
571
583
  }
572
- }, l(et, "UserUiContent"), et);
584
+ }, l(nt, "UserUiContent"), nt);
573
585
  n([
574
586
  o(String)
575
587
  ], yt.prototype, "name", 2);
@@ -579,14 +591,14 @@ n([
579
591
  yt = n([
580
592
  d({ name: "UserUiContent" })
581
593
  ], yt);
582
- var nt;
583
- let ft = (nt = class extends h {
594
+ var it;
595
+ let ft = (it = class extends h {
584
596
  constructor() {
585
597
  super(...arguments);
586
598
  e(this, "role");
587
599
  e(this, "items");
588
600
  }
589
- }, l(nt, "ChatMessageContent"), nt);
601
+ }, l(it, "ChatMessageContent"), it);
590
602
  n([
591
603
  o(xt)
592
604
  ], ft.prototype, "role", 2);
@@ -596,8 +608,8 @@ n([
596
608
  ft = n([
597
609
  d({ name: "ChatMessageContent" })
598
610
  ], ft);
599
- var it;
600
- let O = (it = class extends C {
611
+ var ot;
612
+ let w = (ot = class extends C {
601
613
  constructor() {
602
614
  super(...arguments);
603
615
  e(this, "callId");
@@ -605,24 +617,24 @@ let O = (it = class extends C {
605
617
  e(this, "arguments");
606
618
  e(this, "functionCallIndex", 0);
607
619
  }
608
- }, l(it, "StreamingFunctionCallUpdateContent"), it);
620
+ }, l(ot, "StreamingFunctionCallUpdateContent"), ot);
609
621
  n([
610
622
  o(String)
611
- ], O.prototype, "callId", 2);
623
+ ], w.prototype, "callId", 2);
612
624
  n([
613
625
  o(String)
614
- ], O.prototype, "name", 2);
626
+ ], w.prototype, "name", 2);
615
627
  n([
616
628
  o(String)
617
- ], O.prototype, "arguments", 2);
629
+ ], w.prototype, "arguments", 2);
618
630
  n([
619
631
  o(Number)
620
- ], O.prototype, "functionCallIndex", 2);
621
- O = n([
632
+ ], w.prototype, "functionCallIndex", 2);
633
+ w = n([
622
634
  d({ name: "StreamingFunctionCallUpdateContent" })
623
- ], O);
624
- var ot;
625
- let Dt = (ot = class extends C {
635
+ ], w);
636
+ var rt;
637
+ let Dt = (rt = class extends C {
626
638
  constructor() {
627
639
  super(...arguments);
628
640
  e(this, "text");
@@ -630,15 +642,15 @@ let Dt = (ot = class extends C {
630
642
  // Not decorated with @jsonMember
631
643
  e(this, "encoding");
632
644
  }
633
- }, l(ot, "StreamingTextContent"), ot);
645
+ }, l(rt, "StreamingTextContent"), rt);
634
646
  n([
635
647
  o(String)
636
648
  ], Dt.prototype, "text", 2);
637
649
  Dt = n([
638
650
  d({ name: "StreamingTextContent" })
639
651
  ], Dt);
640
- var rt;
641
- let Et = (rt = class extends C {
652
+ var at;
653
+ let Et = (at = class extends C {
642
654
  constructor() {
643
655
  super(...arguments);
644
656
  e(this, "text");
@@ -646,35 +658,35 @@ let Et = (rt = class extends C {
646
658
  // Not decorated with @jsonMember
647
659
  e(this, "encoding");
648
660
  }
649
- }, l(rt, "StreamingReasoningContent"), rt);
661
+ }, l(at, "StreamingReasoningContent"), at);
650
662
  n([
651
663
  o(String)
652
664
  ], Et.prototype, "text", 2);
653
665
  Et = n([
654
666
  d({ name: "StreamingReasoningContent" })
655
667
  ], Et);
656
- var at;
657
- let z = (at = class {
668
+ var st;
669
+ let _ = (st = class {
658
670
  constructor() {
659
671
  e(this, "instructionCategory", "");
660
672
  e(this, "description", "");
661
673
  e(this, "interactionId", "");
662
674
  }
663
- }, l(at, "InstructionSummary"), at);
675
+ }, l(st, "InstructionSummary"), st);
664
676
  n([
665
677
  o(String)
666
- ], z.prototype, "instructionCategory", 2);
678
+ ], _.prototype, "instructionCategory", 2);
667
679
  n([
668
680
  o(String)
669
- ], z.prototype, "description", 2);
681
+ ], _.prototype, "description", 2);
670
682
  n([
671
683
  o(String)
672
- ], z.prototype, "interactionId", 2);
673
- z = n([
684
+ ], _.prototype, "interactionId", 2);
685
+ _ = n([
674
686
  d({ name: "InstructionSummary" })
675
- ], z);
676
- var st;
677
- let E = (st = class {
687
+ ], _);
688
+ var pt;
689
+ let E = (pt = class {
678
690
  constructor() {
679
691
  e(this, "size", 0);
680
692
  e(this, "originalSize", 0);
@@ -685,7 +697,7 @@ let E = (st = class {
685
697
  e(this, "id");
686
698
  e(this, "instructionSummaries", []);
687
699
  }
688
- }, l(st, "SessionInformation"), st);
700
+ }, l(pt, "SessionInformation"), pt);
689
701
  n([
690
702
  o(Number)
691
703
  ], E.prototype, "size", 2);
@@ -708,13 +720,13 @@ n([
708
720
  o(String)
709
721
  ], E.prototype, "id", 2);
710
722
  n([
711
- St(z)
723
+ St(_)
712
724
  ], E.prototype, "instructionSummaries", 2);
713
725
  E = n([
714
726
  d({ name: "SessionInformation" })
715
727
  ], E);
716
- var pt;
717
- let S = (pt = class {
728
+ var lt;
729
+ let S = (lt = class {
718
730
  constructor() {
719
731
  e(this, "timestamp");
720
732
  e(this, "mimeType");
@@ -735,7 +747,7 @@ let S = (pt = class {
735
747
  e(this, "subAgentName");
736
748
  e(this, "text");
737
749
  }
738
- }, l(pt, "LlmEvent"), pt);
750
+ }, l(lt, "LlmEvent"), lt);
739
751
  n([
740
752
  o(Number)
741
753
  ], S.prototype, "timestamp", 2);
@@ -761,10 +773,10 @@ n([
761
773
  o(E)
762
774
  ], S.prototype, "sessionInformation", 2);
763
775
  n([
764
- o(mt)
776
+ o(gt)
765
777
  ], S.prototype, "eventType", 2);
766
778
  n([
767
- St(R)
779
+ St(v)
768
780
  ], S.prototype, "artifactsGenerated", 2);
769
781
  n([
770
782
  o(String)
@@ -784,8 +796,8 @@ n([
784
796
  S = n([
785
797
  d({ name: "LlmEvent" })
786
798
  ], S);
787
- var lt;
788
- let D = (lt = class {
799
+ var ut;
800
+ let D = (ut = class {
789
801
  constructor() {
790
802
  e(this, "timeStamp");
791
803
  e(this, "partialText");
@@ -798,7 +810,7 @@ let D = (lt = class {
798
810
  e(this, "partialEventType");
799
811
  e(this, "subAgentId");
800
812
  }
801
- }, l(lt, "PartialLlmEvent"), lt);
813
+ }, l(ut, "PartialLlmEvent"), ut);
802
814
  n([
803
815
  o(Number, { name: "ts" })
804
816
  ], D.prototype, "timeStamp", 2);
@@ -824,7 +836,7 @@ n([
824
836
  o(String, { name: "itid" })
825
837
  ], D.prototype, "iteractionId", 2);
826
838
  n([
827
- o(mt)
839
+ o(gt)
828
840
  ], D.prototype, "partialEventType", 2);
829
841
  n([
830
842
  o(String, { name: "said" })
@@ -832,8 +844,8 @@ n([
832
844
  D = n([
833
845
  d({ name: "PartialLlmEvent" })
834
846
  ], D);
835
- var ut;
836
- let F = (ut = class {
847
+ var ct;
848
+ let F = (ct = class {
837
849
  constructor() {
838
850
  e(this, "type");
839
851
  e(this, "event");
@@ -844,7 +856,7 @@ let F = (ut = class {
844
856
  e(this, "subAgentName");
845
857
  e(this, "seq");
846
858
  }
847
- }, l(ut, "StreamingResponse"), ut);
859
+ }, l(ct, "StreamingResponse"), ct);
848
860
  n([
849
861
  o(String)
850
862
  ], F.prototype, "type", 2);
@@ -872,12 +884,12 @@ n([
872
884
  F = n([
873
885
  d({ name: "StreamingResponse" })
874
886
  ], F);
875
- var ct;
876
- let At = (ct = class {
887
+ var mt;
888
+ let At = (mt = class {
877
889
  constructor() {
878
890
  e(this, "events");
879
891
  }
880
- }, l(ct, "Payload"), ct);
892
+ }, l(mt, "Payload"), mt);
881
893
  n([
882
894
  St(S)
883
895
  ], At.prototype, "events", 2);
@@ -886,7 +898,7 @@ At = n([
886
898
  ], At);
887
899
  function Rt(s) {
888
900
  var a;
889
- const t = (s == null ? void 0 : s.presentation) ?? ((a = s == null ? void 0 : s.metadata) == null ? void 0 : a[Bt]);
901
+ const t = (s == null ? void 0 : s.presentation) ?? ((a = s == null ? void 0 : s.metadata) == null ? void 0 : a[Mt]);
890
902
  if (!t || typeof t != "object") return { isUi: !1 };
891
903
  const i = t, r = /* @__PURE__ */ l((p, c) => i[p] ?? i[c], "pick");
892
904
  return {
@@ -900,7 +912,7 @@ function Rt(s) {
900
912
  };
901
913
  }
902
914
  l(Rt, "readPresentation");
903
- const N = class N {
915
+ const A = class A {
904
916
  constructor(t) {
905
917
  e(this, "uniqueId");
906
918
  e(this, "mimeType");
@@ -936,7 +948,7 @@ const N = class N {
936
948
  this.interactionId = t, this.author = "main";
937
949
  }
938
950
  static createErrorEvent(t, i) {
939
- const r = new N(i);
951
+ const r = new A(i);
940
952
  r.turn_complete = !0, r.partial = !1, r.parts = [];
941
953
  const a = {
942
954
  eventType: m.ServerError,
@@ -955,7 +967,7 @@ const N = class N {
955
967
  }
956
968
  static parseFlatPropertiesTypedEvent(t) {
957
969
  var r, a, p;
958
- const i = new N(t.interactionId);
970
+ const i = new A(t.interactionId);
959
971
  if (i.serverError = t.serverError, !t.interactionId)
960
972
  throw new Error("Interaction ID is required");
961
973
  switch (i.model_session_id = "", i.server_session_id = null, i.asyncFinalResponse = t.turnComplete, i.command = (r = t.command) == null ? void 0 : r.toString(), t.sessionInformation && (i.session_information = t.sessionInformation), (!t.author || t.author == "") && console.warn('[ServerEvent] event with no author; defaulting to "main"', {
@@ -974,11 +986,11 @@ const N = class N {
974
986
  return i.mimeType = t.mimeType, i.created = new Date(t.timestamp), i.eventType = m.NotDefined, i.partial = ((p = (a = t.partial) == null ? void 0 : a.toString()) == null ? void 0 : p.toLowerCase()) === "true", i.turn_complete = t.turnComplete, i.visible = t.visible, i.isFinalResponse = t.turnComplete ?? !1, i.artifactsDelta = [], t.artifactsGenerated && t.artifactsGenerated.length > 0 && (i.created = new Date(t.timestamp), i.llmArtifacts = t.artifactsGenerated), i.subAgentId = t.subAgentId, i.subAgentName = t.subAgentName, i;
975
987
  }
976
988
  static getPartType(t) {
977
- return t instanceof ht ? "TextContent" : t instanceof A ? "FunctionCallContent" : t instanceof U ? "FunctionResultContent" : t instanceof O ? "StreamingFunctionCallUpdateContent" : t instanceof b ? "StreamingFinalFunctionCallContent" : t instanceof I ? "StreamingFinalFunctionResultContent" : t instanceof gt ? "FunctionClientOutputContent" : t instanceof dt ? "StreamingClientOutputContent" : t instanceof yt ? "UserUiContent" : t instanceof Dt ? "StreamingTextContent" : t instanceof Et ? "StreamingReasoningContent" : t instanceof P ? "ToolEventContent" : t instanceof v ? "StreamingToolEventContent" : "Unknown";
989
+ return t instanceof ht ? "TextContent" : t instanceof U ? "FunctionCallContent" : t instanceof O ? "FunctionResultContent" : t instanceof w ? "StreamingFunctionCallUpdateContent" : t instanceof b ? "StreamingFinalFunctionCallContent" : t instanceof N ? "StreamingFinalFunctionResultContent" : t instanceof dt ? "FunctionClientOutputContent" : t instanceof z ? "StreamingClientOutputContent" : t instanceof yt ? "UserUiContent" : t instanceof Dt ? "StreamingTextContent" : t instanceof Et ? "StreamingReasoningContent" : t instanceof k ? "ToolEventContent" : t instanceof P ? "StreamingToolEventContent" : "Unknown";
978
990
  }
979
991
  static parseFromTypedEvent(t) {
980
- var p, c, g, L, bt, Ut, Ot;
981
- const i = N.parseFlatPropertiesTypedEvent(t);
992
+ var p, c, g, J, Ut, bt, Ot;
993
+ const i = A.parseFlatPropertiesTypedEvent(t);
982
994
  if (i.serverError)
983
995
  return i.parts.push(Nt.fromError(i.serverError)), i;
984
996
  if (!t.content && !t.streamingParts)
@@ -998,7 +1010,7 @@ const N = class N {
998
1010
  mustPush: !1,
999
1011
  textAppendable: !1
1000
1012
  };
1001
- const T = N.getPartType(f);
1013
+ const T = A.getPartType(f);
1002
1014
  if (T == x.FunctionCallContent || T == x.FunctionResultContent || T == x.StreamingFinalFunctionCallContent || T == x.StreamingFinalFunctionResultContent) {
1003
1015
  var a = f;
1004
1016
  if (a.id == "Server Error")
@@ -1045,14 +1057,14 @@ const N = class N {
1045
1057
  }, u.functionDetails.isAskUser = !!u.functionDetails.askUserComponent, t.text = a == null ? void 0 : a.arguments;
1046
1058
  }
1047
1059
  } else if (T == x.StreamingTextContent)
1048
- u.eventType = m.Text, u.text = (L = f == null ? void 0 : f.text) == null ? void 0 : L.replaceAll("\\n", `
1060
+ u.eventType = m.Text, u.text = (J = f == null ? void 0 : f.text) == null ? void 0 : J.replaceAll("\\n", `
1049
1061
  `), u.textLastChunk = f.text, t.text = u.text;
1050
1062
  else if (T == x.TextContent)
1051
- u.eventType = m.Text, u.text = (bt = f == null ? void 0 : f.text) == null ? void 0 : bt.replaceAll("\\n", `
1063
+ u.eventType = m.Text, u.text = (Ut = f == null ? void 0 : f.text) == null ? void 0 : Ut.replaceAll("\\n", `
1052
1064
  `), u.textLastChunk = f.text, t.text = u.text;
1053
1065
  else if (T == x.StreamingReasoningContent)
1054
1066
  u.eventType = m.Thought, u.thoughtDetails = {
1055
- text: ((Ut = f == null ? void 0 : f.text) == null ? void 0 : Ut.replaceAll("\\n", `
1067
+ text: ((bt = f == null ? void 0 : f.text) == null ? void 0 : bt.replaceAll("\\n", `
1056
1068
  `)) ?? ""
1057
1069
  }, u.text = (Ot = f == null ? void 0 : f.text) == null ? void 0 : Ot.replaceAll("\\n", `
1058
1070
  `), u.textLastChunk = f.text, t.text = u.text;
@@ -1144,7 +1156,7 @@ const N = class N {
1144
1156
  };
1145
1157
  }
1146
1158
  static createFromFunctionName(t, i, r) {
1147
- const a = N.createFromText("", i);
1159
+ const a = A.createFromText("", i);
1148
1160
  return a.parts[0].text = void 0, a.parts[0].thoughtDetails = void 0, a.parts[0].textAppendable = !1, a.parts[0].mustPush = !0, a.parts[0].functionDetails = {
1149
1161
  name: t,
1150
1162
  id: "callId",
@@ -1199,27 +1211,27 @@ const N = class N {
1199
1211
  };
1200
1212
  }
1201
1213
  };
1202
- l(N, "ServerEvent");
1203
- let vt = N;
1214
+ l(A, "ServerEvent");
1215
+ let vt = A;
1204
1216
  const kt = [
1205
1217
  // KernelContent derived types
1206
1218
  ht,
1207
1219
  Ct,
1208
- A,
1209
- P,
1210
1220
  U,
1211
- gt,
1221
+ k,
1222
+ O,
1223
+ dt,
1212
1224
  yt,
1213
1225
  ft,
1214
1226
  // StreamingKernelContent derived types
1215
1227
  Dt,
1216
- O,
1228
+ w,
1217
1229
  Et,
1218
- v,
1230
+ P,
1219
1231
  b,
1220
- I,
1221
- dt,
1222
- z
1232
+ N,
1233
+ z,
1234
+ _
1223
1235
  ];
1224
1236
  function Kt(s) {
1225
1237
  return s.name;
@@ -1274,7 +1286,7 @@ function Jt(s) {
1274
1286
  }
1275
1287
  if (p === '"') {
1276
1288
  let g = 0;
1277
- for (let L = a - 1; L >= 0 && s[L] === "\\"; L--)
1289
+ for (let J = a - 1; J >= 0 && s[J] === "\\"; J--)
1278
1290
  g++;
1279
1291
  g % 2 === 0 && (r = !r), i += p;
1280
1292
  continue;
@@ -1325,14 +1337,14 @@ function jt(s) {
1325
1337
  l(jt, "serializeEvent");
1326
1338
  export {
1327
1339
  ft as C,
1328
- A as F,
1340
+ U as F,
1329
1341
  Nt as I,
1330
1342
  S as L,
1331
1343
  x as P,
1332
1344
  vt as S,
1333
1345
  ht as T,
1334
- U as a,
1335
- O as b,
1346
+ O as a,
1347
+ w as b,
1336
1348
  Et as c,
1337
1349
  F as d,
1338
1350
  Dt as e,
@@ -1343,4 +1355,4 @@ export {
1343
1355
  jt as j,
1344
1356
  Jt as s
1345
1357
  };
1346
- //# sourceMappingURL=serializer-D9rZx6dc.js.map
1358
+ //# sourceMappingURL=serializer-DNt8QqNO.js.map