@aintela/chat 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +3 -3
  2. package/dist/Memory-BUnmYGNv.js +37 -0
  3. package/dist/Memory-BUnmYGNv.js.map +1 -0
  4. package/dist/components.js +4665 -4451
  5. package/dist/components.js.map +1 -1
  6. package/dist/detachedRunModel-1ii9qGTW.js +50 -0
  7. package/dist/detachedRunModel-1ii9qGTW.js.map +1 -0
  8. package/dist/hooks.js +1 -1
  9. package/dist/{httpArtifactService-EEhF_mp9.js → httpArtifactService-DYQDPVVH.js} +61 -61
  10. package/dist/httpArtifactService-DYQDPVVH.js.map +1 -0
  11. package/dist/{httpSessionService-wBby4ggl.js → httpSessionService-BY7JeW8d.js} +2 -2
  12. package/dist/{httpSessionService-wBby4ggl.js.map → httpSessionService-BY7JeW8d.js.map} +1 -1
  13. package/dist/index.js +254 -250
  14. package/dist/models.js +35 -34
  15. package/dist/{serializer-CC-nM3ig.js → serializer-BNsp8xs2.js} +161 -161
  16. package/dist/serializer-BNsp8xs2.js.map +1 -0
  17. package/dist/services.js +2 -2
  18. package/dist/src/components/AiChat/ChatPane/parts/uiToolRegistry.d.ts +1 -1
  19. package/dist/src/components/AiChat/index.d.ts +1 -1
  20. package/dist/src/components/AiChat/stateConfiguration.d.ts +5 -5
  21. package/dist/src/components/index.d.ts +1 -1
  22. package/dist/src/components/v2/{SubAgentBoxV2.d.ts → DetachedRunBoxV2.d.ts} +6 -6
  23. package/dist/src/components/v2/DetachedRunTaskBox.d.ts +43 -0
  24. package/dist/src/components/v2/DetachedRunTaskBox.test.d.ts +1 -0
  25. package/dist/src/components/v2/index.d.ts +4 -2
  26. package/dist/src/components/v2/toolCategories.d.ts +1 -1
  27. package/dist/src/models/ServerEvent.d.ts +3 -3
  28. package/dist/src/models/detachedRunModel.d.ts +48 -0
  29. package/dist/src/models/detachedRunModel.test.d.ts +1 -0
  30. package/dist/src/models/index.d.ts +2 -2
  31. package/dist/src/models/semanticKernelModel/models.d.ts +5 -5
  32. package/dist/src/services/WebSocketConnection/streamStats.d.ts +2 -2
  33. package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +5 -5
  34. package/dist/src/services/wire/decodeFrame.d.ts +1 -1
  35. package/dist/tests/fixtures.d.ts +8 -8
  36. package/dist/{useChatSessions-C6sYF4U6.js → useChatSessions-Q41Jmr6P.js} +2 -2
  37. package/dist/{useChatSessions-C6sYF4U6.js.map → useChatSessions-Q41Jmr6P.js.map} +1 -1
  38. package/package.json +1 -1
  39. package/dist/ClientMessage-DUby3KyC.js +0 -34
  40. package/dist/ClientMessage-DUby3KyC.js.map +0 -1
  41. package/dist/Memory-CjrYSkzB.js +0 -47
  42. package/dist/Memory-CjrYSkzB.js.map +0 -1
  43. package/dist/httpArtifactService-EEhF_mp9.js.map +0 -1
  44. package/dist/serializer-CC-nM3ig.js.map +0 -1
  45. package/dist/src/models/subAgentModel.d.ts +0 -48
@@ -2,13 +2,13 @@ var qt = Object.defineProperty;
2
2
  var Qt = (s, t, o) => t in s ? qt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[t] = o;
3
3
  var p = (s, t) => qt(s, "name", { value: t, configurable: !0 });
4
4
  var e = (s, t, o) => Qt(s, typeof t != "symbol" ? t + "" : t, o);
5
- import Rt from "@mui/icons-material/Psychology";
5
+ import Nt from "@mui/icons-material/Psychology";
6
6
  import L from "@mui/icons-material/FlashOn";
7
7
  import vt from "@mui/icons-material/RocketLaunch";
8
8
  import Zt from "@mui/icons-material/GeneratingTokensOutlined";
9
- import Nt from "@mui/icons-material/SortByAlphaOutlined";
9
+ import bt from "@mui/icons-material/SortByAlphaOutlined";
10
10
  import Ht from "@mui/icons-material/AllInclusive";
11
- import { d as bt, A as Yt } from "./environmentUtils-VZNTCzEE.js";
11
+ import { d as It, A as Yt } from "./environmentUtils-VZNTCzEE.js";
12
12
  import { jsonMember as i, jsonObject as g, AnyT as q, jsonArrayMember as xt, TypedJSON as zt } from "typedjson";
13
13
  const me = {
14
14
  ChatEvent: "ChatEvent",
@@ -87,7 +87,7 @@ const me = {
87
87
  default:
88
88
  return l.NotDefined;
89
89
  }
90
- }, "GetEventTypeFromDotNetName"), ye = {
90
+ }, "GetEventTypeFromDotNetName"), he = {
91
91
  [l.FunctionCall]: "Executing function call",
92
92
  [l.FunctionResponse]: "Getting response",
93
93
  [l.Video]: "Video",
@@ -99,7 +99,7 @@ const me = {
99
99
  [l.Other]: "Other",
100
100
  [l.Text]: "Text",
101
101
  [l.NotDefined]: "NotDefined"
102
- }, he = {
102
+ }, ye = {
103
103
  Regular: "Regular",
104
104
  Artifact: "Artifact"
105
105
  }, Ce = {
@@ -110,7 +110,7 @@ const me = {
110
110
  Dashboard: "Dashboard",
111
111
  Chart: "Chart",
112
112
  Code: "Code"
113
- }, It = {
113
+ }, Rt = {
114
114
  BI_Envision_Agent: "BI_Envision_Agent",
115
115
  BI_Master_Customer_Agent: "BI_Master_Customer_Agent",
116
116
  BI_Dedicated_Customer_Agent: "BI_Dedicated_Customer_Agent",
@@ -119,25 +119,25 @@ const me = {
119
119
  Interactive: "Interactive",
120
120
  Newsletter: "Newsletter"
121
121
  }, xe = {
122
- [It.BI_Envision_Agent]: {
122
+ [Rt.BI_Envision_Agent]: {
123
123
  name: "Envision",
124
124
  description: `Analisa dados de vendas globais
125
125
  com insights consolidados de todos os clientes
126
126
  e métricas agregadas do mercado`
127
127
  },
128
- [It.BI_Master_Customer_Agent]: {
128
+ [Rt.BI_Master_Customer_Agent]: {
129
129
  name: "Clientes Master",
130
130
  description: `Visão consolidada de todos os clientes
131
131
  com análises comparativas e benchmarks
132
132
  entre diferentes organizações`
133
133
  },
134
- [It.BI_Dedicated_Customer_Agent]: {
134
+ [Rt.BI_Dedicated_Customer_Agent]: {
135
135
  name: "Cliente Único",
136
136
  description: `Foco em um cliente específico
137
137
  com análises detalhadas e personalizadas
138
138
  para sua organização`
139
139
  },
140
- [It.Unknown]: {
140
+ [Rt.Unknown]: {
141
141
  name: "Não definido",
142
142
  description: "Não definido"
143
143
  }
@@ -192,7 +192,7 @@ para sua organização`
192
192
  description: `Modelo mais avançado
193
193
  Melhor qualidade para tarefas complexas
194
194
  Contexto: 2M tokens`,
195
- icon: Rt,
195
+ icon: Nt,
196
196
  contextWindow: "2M tokens",
197
197
  speed: "Moderate",
198
198
  quality: "Highest"
@@ -252,7 +252,7 @@ Contexto: 1M tokens`,
252
252
  [T["Glm-5_2"]]: {
253
253
  name: "Z.ai Glm-5",
254
254
  description: "Modelo open weights bem competente da Z.Ai. Apesar de gerar respostas mais longas o modelo é muito capaz.",
255
- icon: Nt,
255
+ icon: bt,
256
256
  contextWindow: "200k tokens",
257
257
  speed: "Good",
258
258
  quality: "Highest"
@@ -260,7 +260,7 @@ Contexto: 1M tokens`,
260
260
  [T["Glm_4.7"]]: {
261
261
  name: "Z.ai Glm-4.7",
262
262
  description: "",
263
- icon: Nt,
263
+ icon: bt,
264
264
  contextWindow: "200k tokens",
265
265
  speed: "Fast",
266
266
  quality: "High"
@@ -268,7 +268,7 @@ Contexto: 1M tokens`,
268
268
  [T["Glm_4.7_flash"]]: {
269
269
  name: "Z.ai Glm-4.7",
270
270
  description: "",
271
- icon: Nt,
271
+ icon: bt,
272
272
  contextWindow: "200k tokens",
273
273
  speed: "Good",
274
274
  quality: "High"
@@ -277,7 +277,7 @@ Contexto: 1M tokens`,
277
277
  name: "DeepSeek Reasoner",
278
278
  description: `Modelo da DeepSeek com modo de raciocínio profundo (thinking mode).
279
279
  Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`,
280
- icon: Rt,
280
+ icon: Nt,
281
281
  contextWindow: "128k tokens",
282
282
  speed: "Moderate",
283
283
  quality: "Highest"
@@ -295,7 +295,7 @@ Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`
295
295
  name: "Kimi K2.6 Pro",
296
296
  description: `Modelo híbrido da Moonshot com modo de raciocínio (thinking) ativado por padrão.
297
297
  Melhor capacidade da família K2 para tarefas complexas.`,
298
- icon: Rt,
298
+ icon: Nt,
299
299
  contextWindow: "256k tokens",
300
300
  speed: "Moderate",
301
301
  quality: "Highest"
@@ -355,7 +355,7 @@ const we = /* @__PURE__ */ p((s, t) => {
355
355
  default:
356
356
  return t.palette.text.secondary;
357
357
  }
358
- }, "getConnectionStateColor"), N = class N {
358
+ }, "getConnectionStateColor"), b = class b {
359
359
  static replaceFirstTwoTabsPerLine(t) {
360
360
  const o = /^\s{15}/gm;
361
361
  return typeof t == "string" ? t.replaceAll(o, (a) => a.substring(15)) : t ?? "";
@@ -363,7 +363,7 @@ const we = /* @__PURE__ */ p((s, t) => {
363
363
  static jsonToString(t) {
364
364
  if (t == null) return "";
365
365
  if (typeof t != "object") return String(t);
366
- const o = Array.isArray(t) ? N.isCharArray(t) ? t.join("") : null : N.tryCollapseCharIndexedObject(t);
366
+ const o = Array.isArray(t) ? b.isCharArray(t) ? t.join("") : null : b.tryCollapseCharIndexedObject(t);
367
367
  if (o != null) return o;
368
368
  if (Array.isArray(t))
369
369
  try {
@@ -446,7 +446,7 @@ const we = /* @__PURE__ */ p((s, t) => {
446
446
  return {
447
447
  text: t,
448
448
  eventType: l.Text,
449
- id: a ?? bt(),
449
+ id: a ?? It(),
450
450
  created: /* @__PURE__ */ new Date(),
451
451
  author: o ?? "main",
452
452
  partial: !1,
@@ -462,7 +462,7 @@ const we = /* @__PURE__ */ p((s, t) => {
462
462
  */
463
463
  static fromUserUi(t, o, a) {
464
464
  return {
465
- id: a ?? bt(),
465
+ id: a ?? It(),
466
466
  eventType: l.UserAnswer,
467
467
  author: "user",
468
468
  created: /* @__PURE__ */ new Date(),
@@ -480,7 +480,7 @@ const we = /* @__PURE__ */ p((s, t) => {
480
480
  }
481
481
  static createWaiting(t = !1, o = !0, a, r, c) {
482
482
  a || (a = "Waiting");
483
- const d = N.fromText("...", void 0, "waitingpart");
483
+ const d = b.fromText("...", void 0, "waitingpart");
484
484
  return d.eventType = l.Waiting, d.waitingDetails = {
485
485
  startingPoint: r,
486
486
  addTimer: t,
@@ -490,7 +490,7 @@ const we = /* @__PURE__ */ p((s, t) => {
490
490
  }, d;
491
491
  }
492
492
  static createSuspended() {
493
- const t = N.fromText("SUSPEND");
493
+ const t = b.fromText("SUSPEND");
494
494
  return t.eventType = l.Suspended, t;
495
495
  }
496
496
  static getPartTextContent(t) {
@@ -534,8 +534,8 @@ const we = /* @__PURE__ */ p((s, t) => {
534
534
  return t.eventType === l.CodeExecutionResult || t.eventType === l.ExecutableCode;
535
535
  }
536
536
  };
537
- p(N, "InteractionPartUtils");
538
- let Ot = N;
537
+ p(b, "InteractionPartUtils");
538
+ let Ot = b;
539
539
  var jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */ p((s, t, o, a) => {
540
540
  for (var r = a > 1 ? void 0 : a ? te(t, o) : t, c = s.length - 1, d; c >= 0; c--)
541
541
  (d = s[c]) && (r = (a ? d(t, o, r) : d(r)) || r);
@@ -572,7 +572,7 @@ Dt = n([
572
572
  g({ name: "AuthorRole" })
573
573
  ], Dt);
574
574
  var B;
575
- let ht = (B = class {
575
+ let yt = (B = class {
576
576
  constructor() {
577
577
  e(this, "type");
578
578
  e(this, "fullName");
@@ -580,13 +580,13 @@ let ht = (B = class {
580
580
  }, p(B, "EventTypeInformation"), B);
581
581
  n([
582
582
  i(String)
583
- ], ht.prototype, "type", 2);
583
+ ], yt.prototype, "type", 2);
584
584
  n([
585
585
  i(String)
586
- ], ht.prototype, "fullName", 2);
587
- ht = n([
586
+ ], yt.prototype, "fullName", 2);
587
+ yt = n([
588
588
  g({ name: "EventTypeInformation" })
589
- ], ht);
589
+ ], yt);
590
590
  var K;
591
591
  let O = (K = class {
592
592
  constructor() {
@@ -774,7 +774,7 @@ v = n([
774
774
  g({ name: "FunctionCallContent" })
775
775
  ], v);
776
776
  var j;
777
- let k = (j = class {
777
+ let E = (j = class {
778
778
  constructor() {
779
779
  e(this, "isUi");
780
780
  e(this, "askUserComponent");
@@ -785,25 +785,25 @@ let k = (j = class {
785
785
  }, p(j, "ToolCallPresentation"), j);
786
786
  n([
787
787
  i(Boolean)
788
- ], k.prototype, "isUi", 2);
788
+ ], E.prototype, "isUi", 2);
789
789
  n([
790
790
  i(String)
791
- ], k.prototype, "askUserComponent", 2);
791
+ ], E.prototype, "askUserComponent", 2);
792
792
  n([
793
793
  i(String)
794
- ], k.prototype, "argsDescription", 2);
794
+ ], E.prototype, "argsDescription", 2);
795
795
  n([
796
796
  i(Boolean)
797
- ], k.prototype, "cancelUi", 2);
797
+ ], E.prototype, "cancelUi", 2);
798
798
  n([
799
799
  i(Boolean)
800
- ], k.prototype, "parked", 2);
801
- k = n([
800
+ ], E.prototype, "parked", 2);
801
+ E = n([
802
802
  g({ name: "ToolCallPresentation" })
803
- ], k);
803
+ ], E);
804
804
  const ee = "aia:presentation";
805
805
  var tt;
806
- let I = (tt = class extends x {
806
+ let R = (tt = class extends x {
807
807
  constructor() {
808
808
  super(...arguments);
809
809
  e(this, "id");
@@ -814,21 +814,21 @@ let I = (tt = class extends x {
814
814
  }, p(tt, "StreamingFinalFunctionCallContent"), tt);
815
815
  n([
816
816
  i(String, { name: "callId" })
817
- ], I.prototype, "id", 2);
817
+ ], R.prototype, "id", 2);
818
818
  n([
819
819
  i(String, { name: "name" })
820
- ], I.prototype, "functionName", 2);
820
+ ], R.prototype, "functionName", 2);
821
821
  n([
822
822
  i(String)
823
- ], I.prototype, "arguments", 2);
823
+ ], R.prototype, "arguments", 2);
824
824
  n([
825
- i(k)
826
- ], I.prototype, "presentation", 2);
827
- I = n([
825
+ i(E)
826
+ ], R.prototype, "presentation", 2);
827
+ R = n([
828
828
  g({ name: "StreamingFinalFunctionCallContent" })
829
- ], I);
829
+ ], R);
830
830
  var et;
831
- let b = (et = class extends D {
831
+ let I = (et = class extends D {
832
832
  constructor() {
833
833
  super(...arguments);
834
834
  e(this, "id");
@@ -839,21 +839,21 @@ let b = (et = class extends D {
839
839
  }, p(et, "FunctionResultContent"), et);
840
840
  n([
841
841
  i(String, { name: "callId" })
842
- ], b.prototype, "id", 2);
842
+ ], I.prototype, "id", 2);
843
843
  n([
844
844
  i(String)
845
- ], b.prototype, "pluginName", 2);
845
+ ], I.prototype, "pluginName", 2);
846
846
  n([
847
847
  i(String)
848
- ], b.prototype, "functionName", 2);
848
+ ], I.prototype, "functionName", 2);
849
849
  n([
850
850
  i(q)
851
- ], b.prototype, "result", 2);
852
- b = n([
851
+ ], I.prototype, "result", 2);
852
+ I = n([
853
853
  g({ name: "FunctionResultContent" })
854
- ], b);
854
+ ], I);
855
855
  var nt;
856
- let E = (nt = class extends x {
856
+ let A = (nt = class extends x {
857
857
  constructor() {
858
858
  super(...arguments);
859
859
  e(this, "id");
@@ -866,25 +866,25 @@ let E = (nt = class extends x {
866
866
  }, p(nt, "StreamingFinalFunctionResultContent"), nt);
867
867
  n([
868
868
  i(String, { name: "callId" })
869
- ], E.prototype, "id", 2);
869
+ ], A.prototype, "id", 2);
870
870
  n([
871
871
  i(String)
872
- ], E.prototype, "pluginName", 2);
872
+ ], A.prototype, "pluginName", 2);
873
873
  n([
874
874
  i(String)
875
- ], E.prototype, "functionName", 2);
875
+ ], A.prototype, "functionName", 2);
876
876
  n([
877
877
  i(q)
878
- ], E.prototype, "result", 2);
878
+ ], A.prototype, "result", 2);
879
879
  n([
880
- i(k)
881
- ], E.prototype, "presentation", 2);
880
+ i(E)
881
+ ], A.prototype, "presentation", 2);
882
882
  n([
883
883
  i(q)
884
- ], E.prototype, "clientOutput", 2);
885
- E = n([
884
+ ], A.prototype, "clientOutput", 2);
885
+ A = n([
886
886
  g({ name: "StreamingFinalFunctionResultContent" })
887
- ], E);
887
+ ], A);
888
888
  var ot;
889
889
  let Ct = (ot = class extends D {
890
890
  constructor() {
@@ -918,7 +918,7 @@ n([
918
918
  i(q)
919
919
  ], G.prototype, "clientOutput", 2);
920
920
  n([
921
- i(k)
921
+ i(E)
922
922
  ], G.prototype, "presentation", 2);
923
923
  G = n([
924
924
  g({ name: "StreamingClientOutputContent" })
@@ -958,7 +958,7 @@ Tt = n([
958
958
  g({ name: "ChatMessageContent" })
959
959
  ], Tt);
960
960
  var st;
961
- let R = (st = class extends x {
961
+ let N = (st = class extends x {
962
962
  constructor() {
963
963
  super(...arguments);
964
964
  e(this, "callId");
@@ -969,21 +969,21 @@ let R = (st = class extends x {
969
969
  }, p(st, "StreamingFunctionCallUpdateContent"), st);
970
970
  n([
971
971
  i(String)
972
- ], R.prototype, "callId", 2);
972
+ ], N.prototype, "callId", 2);
973
973
  n([
974
974
  i(String)
975
- ], R.prototype, "name", 2);
975
+ ], N.prototype, "name", 2);
976
976
  n([
977
977
  i(String)
978
- ], R.prototype, "arguments", 2);
978
+ ], N.prototype, "arguments", 2);
979
979
  n([
980
980
  i(Number)
981
- ], R.prototype, "functionCallIndex", 2);
982
- R = n([
981
+ ], N.prototype, "functionCallIndex", 2);
982
+ N = n([
983
983
  g({ name: "StreamingFunctionCallUpdateContent" })
984
- ], R);
984
+ ], N);
985
985
  var lt;
986
- let At = (lt = class extends x {
986
+ let kt = (lt = class extends x {
987
987
  constructor() {
988
988
  super(...arguments);
989
989
  e(this, "text");
@@ -994,12 +994,12 @@ let At = (lt = class extends x {
994
994
  }, p(lt, "StreamingTextContent"), lt);
995
995
  n([
996
996
  i(String)
997
- ], At.prototype, "text", 2);
998
- At = n([
997
+ ], kt.prototype, "text", 2);
998
+ kt = n([
999
999
  g({ name: "StreamingTextContent" })
1000
- ], At);
1000
+ ], kt);
1001
1001
  var ct;
1002
- let kt = (ct = class extends x {
1002
+ let Et = (ct = class extends x {
1003
1003
  constructor() {
1004
1004
  super(...arguments);
1005
1005
  e(this, "text");
@@ -1010,12 +1010,12 @@ let kt = (ct = class extends x {
1010
1010
  }, p(ct, "StreamingReasoningContent"), ct);
1011
1011
  n([
1012
1012
  i(String)
1013
- ], kt.prototype, "text", 2);
1014
- kt = n([
1013
+ ], Et.prototype, "text", 2);
1014
+ Et = n([
1015
1015
  g({ name: "StreamingReasoningContent" })
1016
- ], kt);
1016
+ ], Et);
1017
1017
  var pt;
1018
- let Et = (pt = class extends x {
1018
+ let At = (pt = class extends x {
1019
1019
  constructor() {
1020
1020
  super(...arguments);
1021
1021
  e(this, "headline");
@@ -1023,10 +1023,10 @@ let Et = (pt = class extends x {
1023
1023
  }, p(pt, "StreamingThoughtHighlightContent"), pt);
1024
1024
  n([
1025
1025
  i(String)
1026
- ], Et.prototype, "headline", 2);
1027
- Et = n([
1026
+ ], At.prototype, "headline", 2);
1027
+ At = n([
1028
1028
  g({ name: "StreamingThoughtHighlightContent" })
1029
- ], Et);
1029
+ ], At);
1030
1030
  var ut;
1031
1031
  let M = (ut = class {
1032
1032
  constructor() {
@@ -1121,8 +1121,8 @@ let S = (mt = class {
1121
1121
  e(this, "command");
1122
1122
  e(this, "content");
1123
1123
  e(this, "streamingParts");
1124
- e(this, "subAgentId");
1125
- e(this, "subAgentName");
1124
+ e(this, "detachedRunId");
1125
+ e(this, "detachedRunName");
1126
1126
  e(this, "text");
1127
1127
  }
1128
1128
  }, p(mt, "LlmEvent"), mt);
@@ -1151,7 +1151,7 @@ n([
1151
1151
  i(_)
1152
1152
  ], S.prototype, "sessionInformation", 2);
1153
1153
  n([
1154
- i(ht)
1154
+ i(yt)
1155
1155
  ], S.prototype, "eventType", 2);
1156
1156
  n([
1157
1157
  xt(O)
@@ -1186,7 +1186,7 @@ let F = (gt = class {
1186
1186
  e(this, "type");
1187
1187
  e(this, "iteractionId");
1188
1188
  e(this, "partialEventType");
1189
- e(this, "subAgentId");
1189
+ e(this, "detachedRunId");
1190
1190
  }
1191
1191
  }, p(gt, "PartialLlmEvent"), gt);
1192
1192
  n([
@@ -1214,60 +1214,60 @@ n([
1214
1214
  i(String, { name: "itid" })
1215
1215
  ], F.prototype, "iteractionId", 2);
1216
1216
  n([
1217
- i(ht)
1217
+ i(yt)
1218
1218
  ], F.prototype, "partialEventType", 2);
1219
1219
  n([
1220
1220
  i(String, { name: "said" })
1221
- ], F.prototype, "subAgentId", 2);
1221
+ ], F.prototype, "detachedRunId", 2);
1222
1222
  F = n([
1223
1223
  g({ name: "PartialLlmEvent" })
1224
1224
  ], F);
1225
1225
  var ft;
1226
- let A = (ft = class {
1226
+ let k = (ft = class {
1227
1227
  constructor() {
1228
1228
  e(this, "type");
1229
1229
  e(this, "event");
1230
1230
  e(this, "sessionId");
1231
1231
  e(this, "accessToken");
1232
1232
  e(this, "partialEvent");
1233
- e(this, "subAgentId");
1234
- e(this, "subAgentName");
1233
+ e(this, "detachedRunId");
1234
+ e(this, "detachedRunName");
1235
1235
  e(this, "seq");
1236
1236
  }
1237
1237
  }, p(ft, "StreamingResponse"), ft);
1238
1238
  n([
1239
1239
  i(String)
1240
- ], A.prototype, "type", 2);
1240
+ ], k.prototype, "type", 2);
1241
1241
  n([
1242
1242
  i(S)
1243
- ], A.prototype, "event", 2);
1243
+ ], k.prototype, "event", 2);
1244
1244
  n([
1245
1245
  i(String)
1246
- ], A.prototype, "sessionId", 2);
1246
+ ], k.prototype, "sessionId", 2);
1247
1247
  n([
1248
1248
  i(String)
1249
- ], A.prototype, "accessToken", 2);
1249
+ ], k.prototype, "accessToken", 2);
1250
1250
  n([
1251
1251
  i(F, { name: "pe" })
1252
- ], A.prototype, "partialEvent", 2);
1252
+ ], k.prototype, "partialEvent", 2);
1253
1253
  n([
1254
1254
  i(String)
1255
- ], A.prototype, "subAgentId", 2);
1255
+ ], k.prototype, "detachedRunId", 2);
1256
1256
  n([
1257
1257
  i(String)
1258
- ], A.prototype, "subAgentName", 2);
1258
+ ], k.prototype, "detachedRunName", 2);
1259
1259
  n([
1260
1260
  i(Number)
1261
- ], A.prototype, "seq", 2);
1262
- A = n([
1261
+ ], k.prototype, "seq", 2);
1262
+ k = n([
1263
1263
  g({ name: "StreamingResponse" })
1264
- ], A);
1265
- var yt;
1266
- let Ut = (yt = class {
1264
+ ], k);
1265
+ var ht;
1266
+ let Ut = (ht = class {
1267
1267
  constructor() {
1268
1268
  e(this, "events");
1269
1269
  }
1270
- }, p(yt, "Payload"), yt);
1270
+ }, p(ht, "Payload"), ht);
1271
1271
  n([
1272
1272
  xt(S)
1273
1273
  ], Ut.prototype, "events", 2);
@@ -1320,8 +1320,8 @@ const w = class w {
1320
1320
  e(this, "endMessageData");
1321
1321
  e(this, "command");
1322
1322
  e(this, "session_information");
1323
- e(this, "subAgentId");
1324
- e(this, "subAgentName");
1323
+ e(this, "detachedRunId");
1324
+ e(this, "detachedRunName");
1325
1325
  e(this, "visible", !0);
1326
1326
  this.interactionId = t, this.author = "main";
1327
1327
  }
@@ -1360,10 +1360,10 @@ const w = class w {
1360
1360
  default:
1361
1361
  o.author = "main";
1362
1362
  }
1363
- return o.mimeType = t.mimeType, o.created = new Date(t.timestamp), o.eventType = l.NotDefined, o.partial = ((c = (r = t.partial) == null ? void 0 : r.toString()) == null ? void 0 : c.toLowerCase()) === "true", o.turn_complete = t.turnComplete, o.visible = t.visible, o.isFinalResponse = t.turnComplete ?? !1, o.artifactsDelta = [], t.artifactsGenerated && t.artifactsGenerated.length > 0 && (o.created = new Date(t.timestamp), o.llmArtifacts = t.artifactsGenerated), o.subAgentId = t.subAgentId, o.subAgentName = t.subAgentName, o;
1363
+ return o.mimeType = t.mimeType, o.created = new Date(t.timestamp), o.eventType = l.NotDefined, o.partial = ((c = (r = t.partial) == null ? void 0 : r.toString()) == null ? void 0 : c.toLowerCase()) === "true", o.turn_complete = t.turnComplete, o.visible = t.visible, o.isFinalResponse = t.turnComplete ?? !1, o.artifactsDelta = [], t.artifactsGenerated && t.artifactsGenerated.length > 0 && (o.created = new Date(t.timestamp), o.llmArtifacts = t.artifactsGenerated), o.detachedRunId = t.detachedRunId, o.detachedRunName = t.detachedRunName, o;
1364
1364
  }
1365
1365
  static getPartType(t) {
1366
- return t instanceof Ft ? "TextContent" : t instanceof v ? "FunctionCallContent" : t instanceof b ? "FunctionResultContent" : t instanceof R ? "StreamingFunctionCallUpdateContent" : t instanceof I ? "StreamingFinalFunctionCallContent" : t instanceof E ? "StreamingFinalFunctionResultContent" : t instanceof Ct ? "FunctionClientOutputContent" : t instanceof G ? "StreamingClientOutputContent" : t instanceof St ? "UserUiContent" : t instanceof At ? "StreamingTextContent" : t instanceof kt ? "StreamingReasoningContent" : t instanceof Et ? "StreamingThoughtHighlightContent" : t instanceof P ? "ToolEventContent" : t instanceof U ? "StreamingToolEventContent" : "Unknown";
1366
+ return t instanceof Ft ? "TextContent" : t instanceof v ? "FunctionCallContent" : t instanceof I ? "FunctionResultContent" : t instanceof N ? "StreamingFunctionCallUpdateContent" : t instanceof R ? "StreamingFinalFunctionCallContent" : t instanceof A ? "StreamingFinalFunctionResultContent" : t instanceof Ct ? "FunctionClientOutputContent" : t instanceof G ? "StreamingClientOutputContent" : t instanceof St ? "UserUiContent" : t instanceof kt ? "StreamingTextContent" : t instanceof Et ? "StreamingReasoningContent" : t instanceof At ? "StreamingThoughtHighlightContent" : t instanceof P ? "ToolEventContent" : t instanceof U ? "StreamingToolEventContent" : "Unknown";
1367
1367
  }
1368
1368
  /** True when the event holds the SDK's "Server Error" sentinel call (`Event.GetErrorEvent`). */
1369
1369
  static carriesServerError(t) {
@@ -1380,7 +1380,7 @@ const w = class w {
1380
1380
  o.parts = [];
1381
1381
  const a = [...((c = t.content) == null ? void 0 : c.items) ?? [], ...t.streamingParts ?? []];
1382
1382
  o.eventType = Xt(((d = t.eventType) == null ? void 0 : d.type) ?? "");
1383
- for (const y of a) {
1383
+ for (const h of a) {
1384
1384
  let u = {
1385
1385
  id: "",
1386
1386
  author: o.author,
@@ -1391,9 +1391,9 @@ const w = class w {
1391
1391
  mustPush: !1,
1392
1392
  textAppendable: !1
1393
1393
  };
1394
- const h = w.getPartType(y);
1395
- if (h == C.FunctionCallContent || h == C.FunctionResultContent || h == C.StreamingFinalFunctionCallContent || h == C.StreamingFinalFunctionResultContent) {
1396
- var r = y;
1394
+ const y = w.getPartType(h);
1395
+ if (y == C.FunctionCallContent || y == C.FunctionResultContent || y == C.StreamingFinalFunctionCallContent || y == C.StreamingFinalFunctionResultContent) {
1396
+ var r = h;
1397
1397
  if (r.id == w.SERVER_ERROR_CALL_ID) {
1398
1398
  const m = r.arguments ?? {}, W = typeof m.error == "string" && m.error.trim().length > 0 ? m.error : JSON.stringify(r.arguments);
1399
1399
  u.eventType = l.ServerError, u.errorDetails = {
@@ -1401,7 +1401,7 @@ const w = class w {
1401
1401
  stackTrace: typeof m.stackTrace == "string" ? m.stackTrace : void 0
1402
1402
  }, u.functionDetails = void 0;
1403
1403
  } else {
1404
- u.eventType = h == C.FunctionCallContent || h == C.StreamingFinalFunctionCallContent ? l.FunctionCall : l.FunctionResponse;
1404
+ u.eventType = y == C.FunctionCallContent || y == C.StreamingFinalFunctionCallContent ? l.FunctionCall : l.FunctionResponse;
1405
1405
  let m;
1406
1406
  try {
1407
1407
  if (r != null && r.result)
@@ -1427,8 +1427,8 @@ const w = class w {
1427
1427
  // `start`. Keying on the persisted type alone left every LIVE call `Executing` with no
1428
1428
  // start, and a renderer gating its elapsed timer on `status === 'Executing' && start`
1429
1429
  // showed "running" with no stopwatch (AIA issue 1022). Same for `end` on the result.
1430
- start: h == C.FunctionCallContent || h == C.StreamingFinalFunctionCallContent ? o.created : void 0,
1431
- end: h == C.FunctionResultContent || h == C.StreamingFinalFunctionResultContent ? o.created : void 0,
1430
+ start: y == C.FunctionCallContent || y == C.StreamingFinalFunctionCallContent ? o.created : void 0,
1431
+ end: y == C.FunctionResultContent || y == C.StreamingFinalFunctionResultContent ? o.created : void 0,
1432
1432
  text: JSON.stringify(r == null ? void 0 : r.arguments) ?? "",
1433
1433
  name: (r == null ? void 0 : r.functionName) ?? "",
1434
1434
  status: u.eventType == l.FunctionCall ? "Executing" : "Done",
@@ -1444,23 +1444,23 @@ const w = class w {
1444
1444
  cancelUi: W.cancelUi
1445
1445
  }, u.functionDetails.isAskUser = !!u.functionDetails.askUserComponent, t.text = r == null ? void 0 : r.arguments;
1446
1446
  }
1447
- } else if (h == C.StreamingTextContent)
1448
- u.eventType = l.Text, u.text = (H = y == null ? void 0 : y.text) == null ? void 0 : H.replaceAll("\\n", `
1447
+ } else if (y == C.StreamingTextContent)
1448
+ u.eventType = l.Text, u.text = (H = h == null ? void 0 : h.text) == null ? void 0 : H.replaceAll("\\n", `
1449
1449
  `), t.text = u.text;
1450
- else if (h == C.TextContent)
1451
- u.eventType = l.Text, u.text = (Pt = y == null ? void 0 : y.text) == null ? void 0 : Pt.replaceAll("\\n", `
1450
+ else if (y == C.TextContent)
1451
+ u.eventType = l.Text, u.text = (Pt = h == null ? void 0 : h.text) == null ? void 0 : Pt.replaceAll("\\n", `
1452
1452
  `), t.text = u.text;
1453
- else if (h == C.StreamingReasoningContent)
1453
+ else if (y == C.StreamingReasoningContent)
1454
1454
  u.eventType = l.Thought, u.thoughtDetails = {
1455
- text: ((Gt = y == null ? void 0 : y.text) == null ? void 0 : Gt.replaceAll("\\n", `
1455
+ text: ((Gt = h == null ? void 0 : h.text) == null ? void 0 : Gt.replaceAll("\\n", `
1456
1456
  `)) ?? ""
1457
- }, u.text = (Mt = y == null ? void 0 : y.text) == null ? void 0 : Mt.replaceAll("\\n", `
1457
+ }, u.text = (Mt = h == null ? void 0 : h.text) == null ? void 0 : Mt.replaceAll("\\n", `
1458
1458
  `), t.text = u.text;
1459
- else if (h == C.StreamingThoughtHighlightContent) {
1460
- const m = (y == null ? void 0 : y.headline) ?? "";
1459
+ else if (y == C.StreamingThoughtHighlightContent) {
1460
+ const m = (h == null ? void 0 : h.headline) ?? "";
1461
1461
  u.eventType = l.ThoughtHighlight, u.thoughtDetails = { text: "", headlines: m ? [m] : [] };
1462
- } else if (h == C.StreamingFunctionCallUpdateContent) {
1463
- const m = y;
1462
+ } else if (y == C.StreamingFunctionCallUpdateContent) {
1463
+ const m = h;
1464
1464
  u.eventType = l.PartialFunctionCall, u.text = m.arguments, u.thoughtDetails = {
1465
1465
  text: ""
1466
1466
  }, u.functionDetails = {
@@ -1469,24 +1469,24 @@ const w = class w {
1469
1469
  status: "Composing",
1470
1470
  name: (m == null ? void 0 : m.name) ?? "Unknown"
1471
1471
  }, t.text = u.text;
1472
- } else if (h == C.ToolEventContent || h == C.StreamingToolEventContent) {
1472
+ } else if (y == C.ToolEventContent || y == C.StreamingToolEventContent) {
1473
1473
  u.eventType = l.ToolEvent;
1474
- const m = y;
1474
+ const m = h;
1475
1475
  u.toolDetails = {
1476
1476
  eventName: m.eventName ?? "",
1477
1477
  eventData: m.eventData ?? "",
1478
1478
  sessionId: m.sessionId ?? void 0
1479
1479
  };
1480
- } else if (h == C.FunctionClientOutputContent) {
1481
- const m = y;
1480
+ } else if (y == C.FunctionClientOutputContent) {
1481
+ const m = h;
1482
1482
  u.eventType = l.FunctionClientOutput, u.functionDetails = {
1483
1483
  id: m.id ?? "",
1484
1484
  name: "",
1485
1485
  status: "Done",
1486
1486
  clientOutput: m.data
1487
1487
  };
1488
- } else if (h == C.StreamingClientOutputContent) {
1489
- const m = y;
1488
+ } else if (y == C.StreamingClientOutputContent) {
1489
+ const m = h;
1490
1490
  u.eventType = l.FunctionClientOutput, u.functionDetails = {
1491
1491
  id: m.id ?? "",
1492
1492
  name: "",
@@ -1497,8 +1497,8 @@ const w = class w {
1497
1497
  // The park signal itself (the reason this event fires even with no prefill).
1498
1498
  parked: Wt(m).parked
1499
1499
  };
1500
- } else if (h == C.UserUiContent) {
1501
- const m = y;
1500
+ } else if (y == C.UserUiContent) {
1501
+ const m = h;
1502
1502
  u.eventType = l.UserAnswer, u.author = "user", u.functionDetails = {
1503
1503
  id: "",
1504
1504
  name: m.name ?? "",
@@ -1507,7 +1507,7 @@ const w = class w {
1507
1507
  isUi: !0
1508
1508
  };
1509
1509
  } else {
1510
- u.eventType = l.NotDefined, console.warn(`Got a unmapped event_type:${o.eventType}, data:`, h, y);
1510
+ u.eventType = l.NotDefined, console.warn(`Got a unmapped event_type:${o.eventType}, data:`, y, h);
1511
1511
  continue;
1512
1512
  }
1513
1513
  o.parts.push(u);
@@ -1541,7 +1541,7 @@ const w = class w {
1541
1541
  // a part the UI cannot show. Only the demo's fake gateway builds
1542
1542
  // thoughts this way, which is why it went unnoticed.
1543
1543
  text: o,
1544
- id: bt(),
1544
+ id: It(),
1545
1545
  created: /* @__PURE__ */ new Date(),
1546
1546
  eventType: l.Thought,
1547
1547
  author: "main",
@@ -1588,7 +1588,7 @@ const w = class w {
1588
1588
  thoughtDetails: a ? {
1589
1589
  text: a
1590
1590
  } : void 0,
1591
- id: bt(),
1591
+ id: It(),
1592
1592
  created: /* @__PURE__ */ new Date(),
1593
1593
  // Part eventType MUST match the outer event's eventType.
1594
1594
  // Was previously `Thought` here, which made the merger
@@ -1616,18 +1616,18 @@ const Bt = [
1616
1616
  wt,
1617
1617
  v,
1618
1618
  P,
1619
- b,
1619
+ I,
1620
1620
  Ct,
1621
1621
  St,
1622
1622
  Tt,
1623
1623
  // StreamingKernelContent derived types
1624
- At,
1625
- R,
1626
1624
  kt,
1625
+ N,
1627
1626
  Et,
1627
+ At,
1628
1628
  U,
1629
- I,
1630
- E,
1629
+ R,
1630
+ A,
1631
1631
  G,
1632
1632
  M
1633
1633
  ];
@@ -1654,7 +1654,7 @@ function Vt() {
1654
1654
  }
1655
1655
  p(Vt, "createEventSerializer");
1656
1656
  function oe() {
1657
- const s = new zt(A);
1657
+ const s = new zt(k);
1658
1658
  return s.config({
1659
1659
  knownTypes: Bt,
1660
1660
  typeHintEmitter: Kt,
@@ -1719,20 +1719,20 @@ function $t(s) {
1719
1719
  }
1720
1720
  }
1721
1721
  p($t, "sanitizeJsonString");
1722
- function Ae(s) {
1722
+ function ke(s) {
1723
1723
  const t = $t(s);
1724
1724
  return oe().parse(t);
1725
1725
  }
1726
- p(Ae, "deserializePayload");
1727
- function ke(s) {
1726
+ p(ke, "deserializePayload");
1727
+ function Ee(s) {
1728
1728
  const t = $t(s);
1729
1729
  return Vt().parse(t);
1730
1730
  }
1731
- p(ke, "deserializeEvent");
1732
- function Ee(s) {
1731
+ p(Ee, "deserializeEvent");
1732
+ function Ae(s) {
1733
1733
  return Vt().stringify(s);
1734
1734
  }
1735
- p(Ee, "serializeEvent");
1735
+ p(Ae, "serializeEvent");
1736
1736
  export {
1737
1737
  xe as A,
1738
1738
  fe as C,
@@ -1743,31 +1743,31 @@ export {
1743
1743
  S as L,
1744
1744
  De as M,
1745
1745
  C as P,
1746
- he as R,
1746
+ ye as R,
1747
1747
  Lt as S,
1748
1748
  Ft as T,
1749
1749
  Te as a,
1750
- It as b,
1750
+ Rt as b,
1751
1751
  Se as c,
1752
1752
  Ce as d,
1753
1753
  me as e,
1754
1754
  Tt as f,
1755
- ye as g,
1756
- b as h,
1755
+ he as g,
1756
+ I as h,
1757
1757
  T as i,
1758
1758
  ge as j,
1759
1759
  _e as k,
1760
- R as l,
1761
- kt as m,
1762
- A as n,
1763
- At as o,
1760
+ N as l,
1761
+ Et as m,
1762
+ k as n,
1763
+ kt as o,
1764
1764
  Vt as p,
1765
1765
  oe as q,
1766
- ke as r,
1767
- Ae as s,
1766
+ Ee as r,
1767
+ ke as s,
1768
1768
  we as t,
1769
1769
  Fe as u,
1770
1770
  $t as v,
1771
- Ee as w
1771
+ Ae as w
1772
1772
  };
1773
- //# sourceMappingURL=serializer-CC-nM3ig.js.map
1773
+ //# sourceMappingURL=serializer-BNsp8xs2.js.map