@aintela/chat 0.10.0 → 0.11.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.
@@ -1,29 +1,29 @@
1
- var Vt = Object.defineProperty;
2
- var oe = (s, t, i) => t in s ? Vt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
3
- var p = (s, t) => Vt(s, "name", { value: t, configurable: !0 });
4
- var e = (s, t, i) => oe(s, typeof t != "symbol" ? t + "" : t, i);
5
- import Wt from "@mui/icons-material/Psychology";
6
- import B from "@mui/icons-material/FlashOn";
7
- import Mt from "@mui/icons-material/RocketLaunch";
8
- import ie from "@mui/icons-material/GeneratingTokensOutlined";
9
- import Ht from "@mui/icons-material/SortByAlphaOutlined";
10
- import $t from "@mui/icons-material/AllInclusive";
11
- import { d as qt, A as ae } from "./environmentUtils-VZNTCzEE.js";
12
- import { jsonMember as o, jsonObject as g, AnyT as H, jsonArrayMember as Et, TypedJSON as Yt } from "typedjson";
13
- const re = ["user", "whatsapp", "platform", "api"];
14
- function _e(s) {
1
+ var $t = Object.defineProperty;
2
+ var ae = (s, t, i) => t in s ? $t(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
3
+ var p = (s, t) => $t(s, "name", { value: t, configurable: !0 });
4
+ var e = (s, t, i) => ae(s, typeof t != "symbol" ? t + "" : t, i);
5
+ import Lt from "@mui/icons-material/Psychology";
6
+ import K from "@mui/icons-material/FlashOn";
7
+ import qt from "@mui/icons-material/RocketLaunch";
8
+ import re from "@mui/icons-material/GeneratingTokensOutlined";
9
+ import zt from "@mui/icons-material/SortByAlphaOutlined";
10
+ import Zt from "@mui/icons-material/AllInclusive";
11
+ import { d as Ht, A as se } from "./environmentUtils-VZNTCzEE.js";
12
+ import { jsonMember as o, jsonObject as g, AnyT as H, jsonArrayMember as L, TypedJSON as jt } from "typedjson";
13
+ const ce = ["user", "whatsapp", "platform", "api"];
14
+ function Ie(s) {
15
15
  const t = s == null ? void 0 : s.trim().toLowerCase();
16
- return re.find((i) => i === t);
16
+ return ce.find((i) => i === t);
17
17
  }
18
- p(_e, "toInteractionOrigin");
19
- const De = {
18
+ p(Ie, "toInteractionOrigin");
19
+ const we = {
20
20
  ChatEvent: "ChatEvent",
21
21
  ChatResponse: "ChatResponse",
22
22
  ChatRequest: "ChatRequest"
23
- }, Ie = {
23
+ }, Fe = {
24
24
  Interactive: "interactive",
25
25
  Autonomous: "autonomous"
26
- }, we = {
26
+ }, Ee = {
27
27
  SendMessage: "SendMessage",
28
28
  Other: "Other",
29
29
  Suspend: "Suspend",
@@ -31,8 +31,13 @@ const De = {
31
31
  Ping: "Ping",
32
32
  AnswerHumanTool: "AnswerHumanTool",
33
33
  /** Ask the server for the announcement turn of this conversation's settled detached runs (AIA Issue 1548 §5). */
34
- AnnounceDetachedRun: "AnnounceDetachedRun"
35
- }, l = {
34
+ AnnounceDetachedRun: "AnnounceDetachedRun",
35
+ /**
36
+ * A user message sent while a turn is open (AIA Issue 1651). The server queues it on the running turn and injects it
37
+ * after the next tool round, or when the model would end the turn; an `InteractionStarted` naming it is its delivery.
38
+ */
39
+ QueueMessage: "QueueMessage"
40
+ }, c = {
36
41
  FunctionCall: "function_call",
37
42
  PartialFunctionCall: "partial_function_call",
38
43
  FunctionResponse: "function_response",
@@ -59,97 +64,97 @@ const De = {
59
64
  NotDefined: "not_defined",
60
65
  Waiting: "waiting",
61
66
  Suspended: "suspended"
62
- }, se = /* @__PURE__ */ p((s) => {
67
+ }, le = /* @__PURE__ */ p((s) => {
63
68
  switch (s.toLocaleLowerCase()) {
64
69
  case "functioncall":
65
- return l.FunctionCall;
70
+ return c.FunctionCall;
66
71
  case "functionresponse":
67
- return l.FunctionResponse;
72
+ return c.FunctionResponse;
68
73
  // Streaming "final" call/result carry their own $type on the wire — map them like their collapsed
69
74
  // KernelContent forms so the top-level event classifies as call/response, not NotDefined.
70
75
  case "streamingfinalfunctioncallcontent":
71
- return l.FunctionCall;
76
+ return c.FunctionCall;
72
77
  case "streamingfinalfunctionresultcontent":
73
- return l.FunctionResponse;
78
+ return c.FunctionResponse;
74
79
  case "text":
75
- return l.Text;
80
+ return c.Text;
76
81
  case "streamingtextcontent":
77
- return l.Text;
82
+ return c.Text;
78
83
  case "partialfunctioncall":
79
- return l.PartialFunctionCall;
84
+ return c.PartialFunctionCall;
80
85
  case "streamingfunctioncallupdatecontent":
81
- return l.PartialFunctionCall;
86
+ return c.PartialFunctionCall;
82
87
  case "streamingreasoningcontent":
83
- return l.Thought;
88
+ return c.Thought;
84
89
  case "streamingthoughthighlightcontent":
85
90
  case "partialthoughthighlight":
86
- return l.ThoughtHighlight;
91
+ return c.ThoughtHighlight;
87
92
  case "functionclientoutputcontent":
88
- return l.FunctionClientOutput;
93
+ return c.FunctionClientOutput;
89
94
  case "streamingclientoutputcontent":
90
- return l.FunctionClientOutput;
95
+ return c.FunctionClientOutput;
91
96
  case "partialText":
92
- return l.Text;
97
+ return c.Text;
93
98
  case "unknown":
94
- return l.Other;
99
+ return c.Other;
95
100
  default:
96
- return l.NotDefined;
101
+ return c.NotDefined;
97
102
  }
98
- }, "GetEventTypeFromDotNetName"), Fe = {
99
- [l.FunctionCall]: "Executing function call",
100
- [l.FunctionResponse]: "Getting response",
101
- [l.Video]: "Video",
102
- [l.Thought]: "Thought",
103
- [l.InlineData]: "InlineData",
104
- [l.FileData]: "FileData",
105
- [l.CodeExecutionResult]: "Coding...",
106
- [l.ExecutableCode]: "Coding...",
107
- [l.Other]: "Other",
108
- [l.Text]: "Text",
109
- [l.NotDefined]: "NotDefined"
110
- }, Ee = {
103
+ }, "GetEventTypeFromDotNetName"), ke = {
104
+ [c.FunctionCall]: "Executing function call",
105
+ [c.FunctionResponse]: "Getting response",
106
+ [c.Video]: "Video",
107
+ [c.Thought]: "Thought",
108
+ [c.InlineData]: "InlineData",
109
+ [c.FileData]: "FileData",
110
+ [c.CodeExecutionResult]: "Coding...",
111
+ [c.ExecutableCode]: "Coding...",
112
+ [c.Other]: "Other",
113
+ [c.Text]: "Text",
114
+ [c.NotDefined]: "NotDefined"
115
+ }, Re = {
111
116
  Regular: "Regular",
112
117
  Artifact: "Artifact"
113
- }, ke = {
118
+ }, Ae = {
114
119
  User: "User",
115
120
  Agent: "Agent",
116
121
  System: "System"
117
- }, Re = {
122
+ }, ve = {
118
123
  Dashboard: "Dashboard",
119
124
  Chart: "Chart",
120
125
  Code: "Code"
121
- }, Gt = {
126
+ }, Wt = {
122
127
  BI_Envision_Agent: "BI_Envision_Agent",
123
128
  BI_Master_Customer_Agent: "BI_Master_Customer_Agent",
124
129
  BI_Dedicated_Customer_Agent: "BI_Dedicated_Customer_Agent",
125
130
  Unknown: "Unknown"
126
- }, Ae = {
131
+ }, Oe = {
127
132
  Interactive: "Interactive",
128
133
  Newsletter: "Newsletter"
129
- }, ve = {
130
- [Gt.BI_Envision_Agent]: {
134
+ }, Ne = {
135
+ [Wt.BI_Envision_Agent]: {
131
136
  name: "Envision",
132
137
  description: `Analisa dados de vendas globais
133
138
  com insights consolidados de todos os clientes
134
139
  e métricas agregadas do mercado`
135
140
  },
136
- [Gt.BI_Master_Customer_Agent]: {
141
+ [Wt.BI_Master_Customer_Agent]: {
137
142
  name: "Clientes Master",
138
143
  description: `Visão consolidada de todos os clientes
139
144
  com análises comparativas e benchmarks
140
145
  entre diferentes organizações`
141
146
  },
142
- [Gt.BI_Dedicated_Customer_Agent]: {
147
+ [Wt.BI_Dedicated_Customer_Agent]: {
143
148
  name: "Cliente Único",
144
149
  description: `Foco em um cliente específico
145
150
  com análises detalhadas e personalizadas
146
151
  para sua organização`
147
152
  },
148
- [Gt.Unknown]: {
153
+ [Wt.Unknown]: {
149
154
  name: "Não definido",
150
155
  description: "Não definido"
151
156
  }
152
- }, Oe = {
157
+ }, be = {
153
158
  FAST: "FAST",
154
159
  BALANCED: "BALANCED",
155
160
  PRO: "PRO",
@@ -178,11 +183,11 @@ para sua organização`
178
183
  ShowGuideDemo: "ShowGuideDemo",
179
184
  uiToolShowcase: "uiToolShowcase",
180
185
  AUTO: "AUTO"
181
- }, Ne = {
186
+ }, Ue = {
182
187
  [T.Claude_Opus_4_6]: {
183
188
  name: "Claude Opus 4.6",
184
189
  description: "Modelo mais avançado da anthropic, no entanto, não tão rápido como o Sonnet",
185
- icon: $t,
190
+ icon: Zt,
186
191
  contextWindow: "1M tokens",
187
192
  speed: "Moderate",
188
193
  quality: "Highest"
@@ -190,7 +195,7 @@ para sua organização`
190
195
  [T.Claude_Sonnet_4_6]: {
191
196
  name: "Claude Sonnet 4.6",
192
197
  description: "Ótima relação velocidade/qualidade",
193
- icon: $t,
198
+ icon: Zt,
194
199
  contextWindow: "1M tokens",
195
200
  speed: "Fast",
196
201
  quality: "High"
@@ -200,7 +205,7 @@ para sua organização`
200
205
  description: `Modelo mais avançado
201
206
  Melhor qualidade para tarefas complexas
202
207
  Contexto: 2M tokens`,
203
- icon: Wt,
208
+ icon: Lt,
204
209
  contextWindow: "2M tokens",
205
210
  speed: "Moderate",
206
211
  quality: "Highest"
@@ -210,7 +215,7 @@ Contexto: 2M tokens`,
210
215
  description: `Equilibrio ideal entre velocidade e qualidade
211
216
  Ótimo para a maioria das tarefas
212
217
  Contexto: 1M tokens`,
213
- icon: B,
218
+ icon: K,
214
219
  contextWindow: "1M tokens",
215
220
  speed: "Fast",
216
221
  quality: "High"
@@ -220,7 +225,7 @@ Contexto: 1M tokens`,
220
225
  description: `NOVO: Equilibrio ideal entre velocidade e qualidade
221
226
  Ótimo para a maioria das tarefas
222
227
  Contexto: 1M tokens`,
223
- icon: B,
228
+ icon: K,
224
229
  contextWindow: "1M tokens",
225
230
  speed: "Fast",
226
231
  quality: "High"
@@ -228,7 +233,7 @@ Contexto: 1M tokens`,
228
233
  [T.Gpt_5_1]: {
229
234
  name: "Chat GPT 5.1",
230
235
  description: "Chat GPT 5.1",
231
- icon: Mt,
236
+ icon: qt,
232
237
  contextWindow: "200k tokens",
233
238
  speed: "Good",
234
239
  quality: "High"
@@ -236,7 +241,7 @@ Contexto: 1M tokens`,
236
241
  [T.Gpt_5_2]: {
237
242
  name: "Chat GPT 5.2",
238
243
  description: "Chat GPT 5.2",
239
- icon: Mt,
244
+ icon: qt,
240
245
  contextWindow: "200k tokens",
241
246
  speed: "Good",
242
247
  quality: "Highest"
@@ -244,7 +249,7 @@ Contexto: 1M tokens`,
244
249
  [T.Gpt_5_5]: {
245
250
  name: "Chat GPT 5.5",
246
251
  description: "A melhor inteligência em escala para fluxos de trabalho de agentes, codificação e profissionais.",
247
- icon: Mt,
252
+ icon: qt,
248
253
  contextWindow: "200k tokens",
249
254
  speed: "Good",
250
255
  quality: "Highest"
@@ -252,7 +257,7 @@ Contexto: 1M tokens`,
252
257
  [T.Gpt_5_4_mini]: {
253
258
  name: "Chat GPT 5.4 Mini",
254
259
  description: "Modelo compacto mais robusto da OpenAi até momento para codificação, uso de computadores e subagentes.",
255
- icon: Mt,
260
+ icon: qt,
256
261
  contextWindow: "200k tokens",
257
262
  speed: "Fast",
258
263
  quality: "Highest"
@@ -260,7 +265,7 @@ Contexto: 1M tokens`,
260
265
  [T["Glm-5_2"]]: {
261
266
  name: "Z.ai Glm-5",
262
267
  description: "Modelo open weights bem competente da Z.Ai. Apesar de gerar respostas mais longas o modelo é muito capaz.",
263
- icon: Ht,
268
+ icon: zt,
264
269
  contextWindow: "200k tokens",
265
270
  speed: "Good",
266
271
  quality: "Highest"
@@ -268,7 +273,7 @@ Contexto: 1M tokens`,
268
273
  [T["Glm_4.7"]]: {
269
274
  name: "Z.ai Glm-4.7",
270
275
  description: "",
271
- icon: Ht,
276
+ icon: zt,
272
277
  contextWindow: "200k tokens",
273
278
  speed: "Fast",
274
279
  quality: "High"
@@ -276,7 +281,7 @@ Contexto: 1M tokens`,
276
281
  [T["Glm_4.7_flash"]]: {
277
282
  name: "Z.ai Glm-4.7",
278
283
  description: "",
279
- icon: Ht,
284
+ icon: zt,
280
285
  contextWindow: "200k tokens",
281
286
  speed: "Good",
282
287
  quality: "High"
@@ -285,7 +290,7 @@ Contexto: 1M tokens`,
285
290
  name: "DeepSeek Reasoner",
286
291
  description: `Modelo da DeepSeek com modo de raciocínio profundo (thinking mode).
287
292
  Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`,
288
- icon: Wt,
293
+ icon: Lt,
289
294
  contextWindow: "128k tokens",
290
295
  speed: "Moderate",
291
296
  quality: "Highest"
@@ -294,7 +299,7 @@ Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`
294
299
  name: "DeepSeek Chat",
295
300
  description: `Modelo de chat rápido da DeepSeek, sem modo de raciocínio.
296
301
  Ótimo equilíbrio entre velocidade e qualidade para uso geral.`,
297
- icon: B,
302
+ icon: K,
298
303
  contextWindow: "128k tokens",
299
304
  speed: "Fast",
300
305
  quality: "High"
@@ -303,7 +308,7 @@ Ideal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.`
303
308
  name: "Kimi K2.6 Pro",
304
309
  description: `Modelo híbrido da Moonshot com modo de raciocínio (thinking) ativado por padrão.
305
310
  Melhor capacidade da família K2 para tarefas complexas.`,
306
- icon: Wt,
311
+ icon: Lt,
307
312
  contextWindow: "256k tokens",
308
313
  speed: "Moderate",
309
314
  quality: "Highest"
@@ -312,7 +317,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
312
317
  name: "Kimi K2 Turbo",
313
318
  description: `Variante rápida (não-thinking) da Moonshot.
314
319
  Ótima relação velocidade/qualidade para uso geral.`,
315
- icon: B,
320
+ icon: K,
316
321
  contextWindow: "256k tokens",
317
322
  speed: "Fast",
318
323
  quality: "High"
@@ -320,7 +325,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
320
325
  [T["Qwen3_6-plus"]]: {
321
326
  name: "Qwen 3.6 Plus - Alibaba",
322
327
  description: "Multimodal nativo, context window - 1 milhão de tokens, codificação agentiva",
323
- icon: B,
328
+ icon: K,
324
329
  contextWindow: "1 milhão",
325
330
  speed: "Moderate",
326
331
  quality: "Highest"
@@ -328,7 +333,7 @@ Melhor capacidade da família K2 para tarefas complexas.`,
328
333
  [T["Qwen3_7-max"]]: {
329
334
  name: "Qwen 3.7 Max - Alibaba",
330
335
  description: "Multimodal nativo, context window - 1 milhão de tokens, codificação agentiva",
331
- icon: B,
336
+ icon: K,
332
337
  contextWindow: "1 milhão",
333
338
  speed: "Moderate",
334
339
  quality: "Highest"
@@ -336,19 +341,19 @@ Melhor capacidade da família K2 para tarefas complexas.`,
336
341
  [T.uiToolShowcase]: {
337
342
  name: "UiToolShowcase - Testing",
338
343
  description: "Cria um stream de testes.",
339
- icon: ie,
344
+ icon: re,
340
345
  contextWindow: "256k tokens",
341
346
  speed: "Fast",
342
347
  quality: "High"
343
348
  }
344
349
  };
345
- function be(s) {
350
+ function Pe(s) {
346
351
  if (!s) return "Unknown";
347
352
  const t = s.toLowerCase();
348
353
  return t.startsWith("gemini") || t.startsWith("live") ? "Google" : t.startsWith("claude") ? "Anthropic" : t.startsWith("gpt") ? "OpenAI" : t.startsWith("glm") ? "ZhiPu" : t.startsWith("kimi") ? "Moonshot" : t.startsWith("deepseek") ? "DeepSeek" : "Unknown";
349
354
  }
350
- p(be, "getModelVendor");
351
- const Ue = /* @__PURE__ */ p((s, t) => {
355
+ p(Pe, "getModelVendor");
356
+ const Me = /* @__PURE__ */ p((s, t) => {
352
357
  switch (s) {
353
358
  case "Connected":
354
359
  return t.palette.primary.light;
@@ -380,13 +385,13 @@ const Ue = /* @__PURE__ */ p((s, t) => {
380
385
  return String(t);
381
386
  }
382
387
  const a = Object.keys(t), r = [];
383
- return a.forEach((c) => {
384
- let u = t[c];
385
- typeof u == "object" && (u = JSON.stringify(t[c], null, 2));
388
+ return a.forEach((l) => {
389
+ let u = t[l];
390
+ typeof u == "object" && (u = JSON.stringify(t[l], null, 2));
386
391
  const f = (u == null ? void 0 : u.toString().indexOf(`
387
392
  `)) > -1 ? `
388
393
  ` : "";
389
- r.push(`${c}:${f}${u}`);
394
+ r.push(`${l}:${f}${u}`);
390
395
  }), r.join(`
391
396
  `);
392
397
  }
@@ -409,12 +414,12 @@ const Ue = /* @__PURE__ */ p((s, t) => {
409
414
  }
410
415
  const i = Object.keys(t), a = [];
411
416
  return i.forEach((r) => {
412
- let c = t == null ? void 0 : t[r];
413
- typeof c == "object" && (c = JSON.stringify(c, null, 2));
414
- const u = (c == null ? void 0 : c.toString().indexOf(`
417
+ let l = t == null ? void 0 : t[r];
418
+ typeof l == "object" && (l = JSON.stringify(l, null, 2));
419
+ const u = (l == null ? void 0 : l.toString().indexOf(`
415
420
  `)) > -1 ? `
416
421
  ` : "";
417
- a.push(`${r}:${u}${c}`);
422
+ a.push(`${r}:${u}${l}`);
418
423
  }), a.join(`
419
424
  `);
420
425
  }
@@ -426,8 +431,8 @@ const Ue = /* @__PURE__ */ p((s, t) => {
426
431
  * before reading the field. Returns undefined when absent or unparseable.
427
432
  */
428
433
  static uiSlotId(t) {
429
- var c;
430
- let i = (c = t == null ? void 0 : t.functionDetails) == null ? void 0 : c.response;
434
+ var l;
435
+ let i = (l = t == null ? void 0 : t.functionDetails) == null ? void 0 : l.response;
431
436
  for (let u = 0; u < 2 && typeof i == "string"; u++)
432
437
  try {
433
438
  i = JSON.parse(i);
@@ -441,7 +446,7 @@ const Ue = /* @__PURE__ */ p((s, t) => {
441
446
  static fromError(t) {
442
447
  return {
443
448
  errorDetails: { errorMessage: t },
444
- eventType: l.ServerError,
449
+ eventType: c.ServerError,
445
450
  id: "",
446
451
  author: "main",
447
452
  created: /* @__PURE__ */ new Date(),
@@ -453,8 +458,8 @@ const Ue = /* @__PURE__ */ p((s, t) => {
453
458
  static fromText(t, i, a) {
454
459
  return {
455
460
  text: t,
456
- eventType: l.Text,
457
- id: a ?? qt(),
461
+ eventType: c.Text,
462
+ id: a ?? Ht(),
458
463
  created: /* @__PURE__ */ new Date(),
459
464
  author: i ?? "main",
460
465
  partial: !1,
@@ -470,8 +475,8 @@ const Ue = /* @__PURE__ */ p((s, t) => {
470
475
  */
471
476
  static fromUserUi(t, i, a) {
472
477
  return {
473
- id: a ?? qt(),
474
- eventType: l.UserAnswer,
478
+ id: a ?? Ht(),
479
+ eventType: c.UserAnswer,
475
480
  author: "user",
476
481
  created: /* @__PURE__ */ new Date(),
477
482
  partial: !1,
@@ -486,20 +491,20 @@ const Ue = /* @__PURE__ */ p((s, t) => {
486
491
  }
487
492
  };
488
493
  }
489
- static createWaiting(t = !1, i = !0, a, r, c) {
494
+ static createWaiting(t = !1, i = !0, a, r, l) {
490
495
  a || (a = "Waiting");
491
496
  const u = U.fromText("...", void 0, "waitingpart");
492
- return u.eventType = l.Waiting, u.waitingDetails = {
497
+ return u.eventType = c.Waiting, u.waitingDetails = {
493
498
  startingPoint: r,
494
499
  addTimer: t,
495
500
  isTimerRunning: i,
496
501
  status: a,
497
- stopPoint: c
502
+ stopPoint: l
498
503
  }, u;
499
504
  }
500
505
  static createSuspended() {
501
506
  const t = U.fromText("SUSPEND");
502
- return t.eventType = l.Suspended, t;
507
+ return t.eventType = c.Suspended, t;
503
508
  }
504
509
  static getPartTextContent(t) {
505
510
  return t.text ?? "";
@@ -507,14 +512,14 @@ const Ue = /* @__PURE__ */ p((s, t) => {
507
512
  static FlatParts(t) {
508
513
  if (t.length === 0)
509
514
  return;
510
- const i = t.filter((c) => c.eventType == l.Text), a = i.length > 0 ? i[0] : t[0], r = [...new Set(t.map((c) => c.eventType))];
511
- r.length == 1 ? a.eventType = r[0] : i.length > 0 && (a.eventType = l.Text), a.mustPush = !(a.eventType == l.Text || a.eventType == l.Thought || a.eventType == l.NotDefined || a.eventType == l.PartialFunctionCall), a.textAppendable = a.eventType == l.Text || a.eventType == l.Thought || a.eventType == l.PartialFunctionCall;
512
- for (const c of t) {
513
- if (!a.codeExecutionResultDetails && c.codeExecutionResultDetails && (a.codeExecutionResultDetails = c.codeExecutionResultDetails), !a.errorDetails && c.errorDetails && (a.errorDetails = c.errorDetails), !a.executableCodeDetails && c.executableCodeDetails && (a.executableCodeDetails = c.executableCodeDetails), !a.functionDetails && c.functionDetails && (a.functionDetails = c.functionDetails), a.functionDetails && c.functionDetails && c !== a) {
514
- const u = a.functionDetails, f = c.functionDetails;
515
+ const i = t.filter((l) => l.eventType == c.Text), a = i.length > 0 ? i[0] : t[0], r = [...new Set(t.map((l) => l.eventType))];
516
+ r.length == 1 ? a.eventType = r[0] : i.length > 0 && (a.eventType = c.Text), a.mustPush = !(a.eventType == c.Text || a.eventType == c.Thought || a.eventType == c.NotDefined || a.eventType == c.PartialFunctionCall), a.textAppendable = a.eventType == c.Text || a.eventType == c.Thought || a.eventType == c.PartialFunctionCall;
517
+ for (const l of t) {
518
+ if (!a.codeExecutionResultDetails && l.codeExecutionResultDetails && (a.codeExecutionResultDetails = l.codeExecutionResultDetails), !a.errorDetails && l.errorDetails && (a.errorDetails = l.errorDetails), !a.executableCodeDetails && l.executableCodeDetails && (a.executableCodeDetails = l.executableCodeDetails), !a.functionDetails && l.functionDetails && (a.functionDetails = l.functionDetails), a.functionDetails && l.functionDetails && l !== a) {
519
+ const u = a.functionDetails, f = l.functionDetails;
515
520
  !u.askUserComponent && f.askUserComponent && (u.askUserComponent = f.askUserComponent), !u.isUi && f.isUi && (u.isUi = !0), !u.clientOutput && f.clientOutput && (u.clientOutput = f.clientOutput), u.isAskUser = u.isAskUser || f.isAskUser || !!u.askUserComponent;
516
521
  }
517
- !a.rawDetails && c.rawDetails && (a.rawDetails = c.rawDetails), !a.thoughtDetails && c.thoughtDetails && (a.thoughtDetails = c.thoughtDetails), !a.errorDetails && c.errorDetails && (a.errorDetails = c.errorDetails);
522
+ !a.rawDetails && l.rawDetails && (a.rawDetails = l.rawDetails), !a.thoughtDetails && l.thoughtDetails && (a.thoughtDetails = l.thoughtDetails), !a.errorDetails && l.errorDetails && (a.errorDetails = l.errorDetails);
518
523
  }
519
524
  return a;
520
525
  }
@@ -539,17 +544,17 @@ const Ue = /* @__PURE__ */ p((s, t) => {
539
544
  return i.map((a) => t[a]).join("");
540
545
  }
541
546
  static isCodeExecution(t) {
542
- return t.eventType === l.CodeExecutionResult || t.eventType === l.ExecutableCode;
547
+ return t.eventType === c.CodeExecutionResult || t.eventType === c.ExecutableCode;
543
548
  }
544
549
  };
545
550
  p(U, "InteractionPartUtils");
546
- let Lt = U;
547
- var le = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */ p((s, t, i, a) => {
548
- for (var r = a > 1 ? void 0 : a ? ce(t, i) : t, c = s.length - 1, u; c >= 0; c--)
549
- (u = s[c]) && (r = (a ? u(t, i, r) : u(r)) || r);
550
- return a && r && le(t, i, r), r;
551
+ let Bt = U;
552
+ var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, n = /* @__PURE__ */ p((s, t, i, a) => {
553
+ for (var r = a > 1 ? void 0 : a ? ue(t, i) : t, l = s.length - 1, u; l >= 0; l--)
554
+ (u = s[l]) && (r = (a ? u(t, i, r) : u(r)) || r);
555
+ return a && r && pe(t, i, r), r;
551
556
  }, "__decorateClass");
552
- const S = {
557
+ const C = {
553
558
  // KernelContent derived types
554
559
  TextContent: "TextContent",
555
560
  ToolEventContent: "ToolEventContent",
@@ -561,6 +566,7 @@ const S = {
561
566
  FunctionClientOutputContent: "FunctionClientOutputContent",
562
567
  UserUiContent: "UserUiContent",
563
568
  InteractionOriginContent: "InteractionOriginContent",
569
+ QueuedMessageContent: "QueuedMessageContent",
564
570
  // StreamingKernelContent derived types
565
571
  StreamingTextContent: "StreamingTextContent",
566
572
  StreamingFunctionCallUpdateContent: "StreamingFunctionCallUpdateContent",
@@ -568,20 +574,20 @@ const S = {
568
574
  StreamingFinalFunctionResultContent: "StreamingFinalFunctionResultContent",
569
575
  StreamingClientOutputContent: "StreamingClientOutputContent"
570
576
  };
571
- var K;
572
- let Rt = (K = class {
577
+ var Q;
578
+ let At = (Q = class {
573
579
  constructor() {
574
580
  e(this, "label");
575
581
  }
576
- }, p(K, "AuthorRole"), K);
582
+ }, p(Q, "AuthorRole"), Q);
577
583
  n([
578
584
  o(String)
579
- ], Rt.prototype, "label", 2);
580
- Rt = n([
585
+ ], At.prototype, "label", 2);
586
+ At = n([
581
587
  g({ name: "AuthorRole" })
582
- ], Rt);
588
+ ], At);
583
589
  var J;
584
- let Dt = (J = class {
590
+ let wt = (J = class {
585
591
  constructor() {
586
592
  e(this, "type");
587
593
  e(this, "fullName");
@@ -589,13 +595,13 @@ let Dt = (J = class {
589
595
  }, p(J, "EventTypeInformation"), J);
590
596
  n([
591
597
  o(String)
592
- ], Dt.prototype, "type", 2);
598
+ ], wt.prototype, "type", 2);
593
599
  n([
594
600
  o(String)
595
- ], Dt.prototype, "fullName", 2);
596
- Dt = n([
601
+ ], wt.prototype, "fullName", 2);
602
+ wt = n([
597
603
  g({ name: "EventTypeInformation" })
598
- ], Dt);
604
+ ], wt);
599
605
  var V;
600
606
  let P = (V = class {
601
607
  constructor() {
@@ -653,8 +659,8 @@ n([
653
659
  x = n([
654
660
  g({ name: "KernelContent" })
655
661
  ], x);
656
- var Q;
657
- let _ = (Q = class {
662
+ var Z;
663
+ let _ = (Z = class {
658
664
  constructor() {
659
665
  e(this, "choiceIndex", 0);
660
666
  // InnerContent is ignored (JsonIgnore in C#)
@@ -663,7 +669,7 @@ let _ = (Q = class {
663
669
  e(this, "modelId");
664
670
  e(this, "metadata");
665
671
  }
666
- }, p(Q, "StreamingKernelContent"), Q);
672
+ }, p(Z, "StreamingKernelContent"), Z);
667
673
  n([
668
674
  o(Number)
669
675
  ], _.prototype, "choiceIndex", 2);
@@ -676,8 +682,8 @@ n([
676
682
  _ = n([
677
683
  g({ name: "StreamingKernelContent" })
678
684
  ], _);
679
- var Z;
680
- let At = (Z = class extends x {
685
+ var Y;
686
+ let vt = (Y = class extends x {
681
687
  constructor() {
682
688
  super();
683
689
  e(this, "text");
@@ -689,22 +695,22 @@ let At = (Z = class extends x {
689
695
  toString() {
690
696
  return this.text ?? "";
691
697
  }
692
- }, p(Z, "TextContent"), Z);
698
+ }, p(Y, "TextContent"), Y);
693
699
  n([
694
700
  o(String)
695
- ], At.prototype, "text", 2);
696
- At = n([
701
+ ], vt.prototype, "text", 2);
702
+ vt = n([
697
703
  g({ name: "TextContent" })
698
- ], At);
699
- var Y;
700
- let M = (Y = class extends _ {
704
+ ], vt);
705
+ var X;
706
+ let M = (X = class extends _ {
701
707
  constructor() {
702
708
  super();
703
709
  e(this, "eventName");
704
710
  e(this, "eventData");
705
711
  e(this, "sessionId");
706
712
  }
707
- }, p(Y, "StreamingToolEventContent"), Y);
713
+ }, p(X, "StreamingToolEventContent"), X);
708
714
  n([
709
715
  o(String)
710
716
  ], M.prototype, "eventName", 2);
@@ -717,15 +723,15 @@ n([
717
723
  M = n([
718
724
  g({ name: "StreamingToolEventContent" })
719
725
  ], M);
720
- var X;
721
- let G = (X = class extends x {
726
+ var j;
727
+ let G = (j = class extends x {
722
728
  constructor() {
723
729
  super();
724
730
  e(this, "eventName");
725
731
  e(this, "eventData");
726
732
  e(this, "sessionId");
727
733
  }
728
- }, p(X, "ToolEventContent"), X);
734
+ }, p(j, "ToolEventContent"), j);
729
735
  n([
730
736
  o(String)
731
737
  ], G.prototype, "eventName", 2);
@@ -738,25 +744,25 @@ n([
738
744
  G = n([
739
745
  g({ name: "ToolEventContent" })
740
746
  ], G);
741
- var j;
742
- let vt = (j = class extends x {
747
+ var tt;
748
+ let Ot = (tt = class extends x {
743
749
  constructor() {
744
750
  super(...arguments);
745
751
  e(this, "url");
746
752
  e(this, "dataUri");
747
753
  }
748
- }, p(j, "ImageContent"), j);
754
+ }, p(tt, "ImageContent"), tt);
749
755
  n([
750
756
  o(String)
751
- ], vt.prototype, "url", 2);
757
+ ], Ot.prototype, "url", 2);
752
758
  n([
753
759
  o(String)
754
- ], vt.prototype, "dataUri", 2);
755
- vt = n([
760
+ ], Ot.prototype, "dataUri", 2);
761
+ Ot = n([
756
762
  g({ name: "ImageContent" })
757
- ], vt);
758
- var tt;
759
- let A = (tt = class extends x {
763
+ ], Ot);
764
+ var et;
765
+ let v = (et = class extends x {
760
766
  constructor() {
761
767
  super(...arguments);
762
768
  e(this, "id");
@@ -766,24 +772,24 @@ let A = (tt = class extends x {
766
772
  // Exception is not serializable - omit jsonMember decorator
767
773
  e(this, "exception");
768
774
  }
769
- }, p(tt, "FunctionCallContent"), tt);
775
+ }, p(et, "FunctionCallContent"), et);
770
776
  n([
771
777
  o(String)
772
- ], A.prototype, "id", 2);
778
+ ], v.prototype, "id", 2);
773
779
  n([
774
780
  o(String)
775
- ], A.prototype, "pluginName", 2);
781
+ ], v.prototype, "pluginName", 2);
776
782
  n([
777
783
  o(String)
778
- ], A.prototype, "functionName", 2);
784
+ ], v.prototype, "functionName", 2);
779
785
  n([
780
786
  o(H)
781
- ], A.prototype, "arguments", 2);
782
- A = n([
787
+ ], v.prototype, "arguments", 2);
788
+ v = n([
783
789
  g({ name: "FunctionCallContent" })
784
- ], A);
785
- var et;
786
- let k = (et = class {
790
+ ], v);
791
+ var nt;
792
+ let k = (nt = class {
787
793
  constructor() {
788
794
  e(this, "isUi");
789
795
  e(this, "askUserComponent");
@@ -791,7 +797,7 @@ let k = (et = class {
791
797
  e(this, "cancelUi");
792
798
  e(this, "parked");
793
799
  }
794
- }, p(et, "ToolCallPresentation"), et);
800
+ }, p(nt, "ToolCallPresentation"), nt);
795
801
  n([
796
802
  o(Boolean)
797
803
  ], k.prototype, "isUi", 2);
@@ -810,9 +816,9 @@ n([
810
816
  k = n([
811
817
  g({ name: "ToolCallPresentation" })
812
818
  ], k);
813
- const pe = "aia:presentation";
814
- var nt;
815
- let v = (nt = class extends _ {
819
+ const de = "aia:presentation";
820
+ var ot;
821
+ let O = (ot = class extends _ {
816
822
  constructor() {
817
823
  super(...arguments);
818
824
  e(this, "id");
@@ -820,24 +826,24 @@ let v = (nt = class extends _ {
820
826
  e(this, "arguments");
821
827
  e(this, "presentation");
822
828
  }
823
- }, p(nt, "StreamingFinalFunctionCallContent"), nt);
829
+ }, p(ot, "StreamingFinalFunctionCallContent"), ot);
824
830
  n([
825
831
  o(String, { name: "callId" })
826
- ], v.prototype, "id", 2);
832
+ ], O.prototype, "id", 2);
827
833
  n([
828
834
  o(String, { name: "name" })
829
- ], v.prototype, "functionName", 2);
835
+ ], O.prototype, "functionName", 2);
830
836
  n([
831
837
  o(String)
832
- ], v.prototype, "arguments", 2);
838
+ ], O.prototype, "arguments", 2);
833
839
  n([
834
840
  o(k)
835
- ], v.prototype, "presentation", 2);
836
- v = n([
841
+ ], O.prototype, "presentation", 2);
842
+ O = n([
837
843
  g({ name: "StreamingFinalFunctionCallContent" })
838
- ], v);
839
- var ot;
840
- let O = (ot = class extends x {
844
+ ], O);
845
+ var it;
846
+ let N = (it = class extends x {
841
847
  constructor() {
842
848
  super(...arguments);
843
849
  e(this, "id");
@@ -845,24 +851,24 @@ let O = (ot = class extends x {
845
851
  e(this, "functionName");
846
852
  e(this, "result");
847
853
  }
848
- }, p(ot, "FunctionResultContent"), ot);
854
+ }, p(it, "FunctionResultContent"), it);
849
855
  n([
850
856
  o(String, { name: "callId" })
851
- ], O.prototype, "id", 2);
857
+ ], N.prototype, "id", 2);
852
858
  n([
853
859
  o(String)
854
- ], O.prototype, "pluginName", 2);
860
+ ], N.prototype, "pluginName", 2);
855
861
  n([
856
862
  o(String)
857
- ], O.prototype, "functionName", 2);
863
+ ], N.prototype, "functionName", 2);
858
864
  n([
859
865
  o(H)
860
- ], O.prototype, "result", 2);
861
- O = n([
866
+ ], N.prototype, "result", 2);
867
+ N = n([
862
868
  g({ name: "FunctionResultContent" })
863
- ], O);
864
- var it;
865
- let R = (it = class extends _ {
869
+ ], N);
870
+ var at;
871
+ let R = (at = class extends _ {
866
872
  constructor() {
867
873
  super(...arguments);
868
874
  e(this, "id");
@@ -872,7 +878,7 @@ let R = (it = class extends _ {
872
878
  e(this, "presentation");
873
879
  e(this, "clientOutput");
874
880
  }
875
- }, p(it, "StreamingFinalFunctionResultContent"), it);
881
+ }, p(at, "StreamingFinalFunctionResultContent"), at);
876
882
  n([
877
883
  o(String, { name: "callId" })
878
884
  ], R.prototype, "id", 2);
@@ -894,32 +900,32 @@ n([
894
900
  R = n([
895
901
  g({ name: "StreamingFinalFunctionResultContent" })
896
902
  ], R);
897
- var at;
898
- let It = (at = class extends x {
903
+ var rt;
904
+ let Ft = (rt = class extends x {
899
905
  constructor() {
900
906
  super(...arguments);
901
907
  e(this, "id");
902
908
  e(this, "data");
903
909
  }
904
- }, p(at, "FunctionClientOutputContent"), at);
910
+ }, p(rt, "FunctionClientOutputContent"), rt);
905
911
  n([
906
912
  o(String, { name: "callId" })
907
- ], It.prototype, "id", 2);
913
+ ], Ft.prototype, "id", 2);
908
914
  n([
909
915
  o(H)
910
- ], It.prototype, "data", 2);
911
- It = n([
916
+ ], Ft.prototype, "data", 2);
917
+ Ft = n([
912
918
  g({ name: "FunctionClientOutputContent" })
913
- ], It);
914
- var rt;
915
- let q = (rt = class extends _ {
919
+ ], Ft);
920
+ var st;
921
+ let q = (st = class extends _ {
916
922
  constructor() {
917
923
  super(...arguments);
918
924
  e(this, "id");
919
925
  e(this, "clientOutput");
920
926
  e(this, "presentation");
921
927
  }
922
- }, p(rt, "StreamingClientOutputContent"), rt);
928
+ }, p(st, "StreamingClientOutputContent"), st);
923
929
  n([
924
930
  o(String, { name: "callId" })
925
931
  ], q.prototype, "id", 2);
@@ -932,25 +938,25 @@ n([
932
938
  q = n([
933
939
  g({ name: "StreamingClientOutputContent" })
934
940
  ], q);
935
- var st;
936
- let wt = (st = class extends x {
941
+ var ct;
942
+ let Et = (ct = class extends x {
937
943
  constructor() {
938
944
  super(...arguments);
939
945
  e(this, "name");
940
946
  e(this, "args");
941
947
  }
942
- }, p(st, "UserUiContent"), st);
948
+ }, p(ct, "UserUiContent"), ct);
943
949
  n([
944
950
  o(String)
945
- ], wt.prototype, "name", 2);
951
+ ], Et.prototype, "name", 2);
946
952
  n([
947
953
  o(String)
948
- ], wt.prototype, "args", 2);
949
- wt = n([
954
+ ], Et.prototype, "args", 2);
955
+ Et = n([
950
956
  g({ name: "UserUiContent" })
951
- ], wt);
957
+ ], Et);
952
958
  var lt;
953
- let Ot = (lt = class extends x {
959
+ let Nt = (lt = class extends x {
954
960
  constructor() {
955
961
  super(...arguments);
956
962
  e(this, "origin");
@@ -958,12 +964,25 @@ let Ot = (lt = class extends x {
958
964
  }, p(lt, "InteractionOriginContent"), lt);
959
965
  n([
960
966
  o(String)
961
- ], Ot.prototype, "origin", 2);
962
- Ot = n([
967
+ ], Nt.prototype, "origin", 2);
968
+ Nt = n([
963
969
  g({ name: "InteractionOriginContent" })
964
- ], Ot);
965
- var ct;
966
- let F = (ct = class extends x {
970
+ ], Nt);
971
+ var pt;
972
+ let bt = (pt = class extends x {
973
+ constructor() {
974
+ super(...arguments);
975
+ e(this, "continuesInteractionId");
976
+ }
977
+ }, p(pt, "QueuedMessageContent"), pt);
978
+ n([
979
+ o(String)
980
+ ], bt.prototype, "continuesInteractionId", 2);
981
+ bt = n([
982
+ g({ name: "QueuedMessageContent" })
983
+ ], bt);
984
+ var ut;
985
+ let F = (ut = class extends x {
967
986
  constructor() {
968
987
  super(...arguments);
969
988
  e(this, "plan");
@@ -976,7 +995,7 @@ let F = (ct = class extends x {
976
995
  e(this, "message");
977
996
  e(this, "actionUrl");
978
997
  }
979
- }, p(ct, "BillingLimitContent"), ct);
998
+ }, p(ut, "BillingLimitContent"), ut);
980
999
  n([
981
1000
  o(String)
982
1001
  ], F.prototype, "plan", 2);
@@ -1007,25 +1026,25 @@ n([
1007
1026
  F = n([
1008
1027
  g({ name: "BillingLimitContent" })
1009
1028
  ], F);
1010
- var pt;
1011
- let Ft = (pt = class extends x {
1029
+ var dt;
1030
+ let kt = (dt = class extends x {
1012
1031
  constructor() {
1013
1032
  super(...arguments);
1014
1033
  e(this, "role");
1015
1034
  e(this, "items");
1016
1035
  }
1017
- }, p(pt, "ChatMessageContent"), pt);
1036
+ }, p(dt, "ChatMessageContent"), dt);
1018
1037
  n([
1019
- o(Rt)
1020
- ], Ft.prototype, "role", 2);
1038
+ o(At)
1039
+ ], kt.prototype, "role", 2);
1021
1040
  n([
1022
- Et(() => x)
1023
- ], Ft.prototype, "items", 2);
1024
- Ft = n([
1041
+ L(() => x)
1042
+ ], kt.prototype, "items", 2);
1043
+ kt = n([
1025
1044
  g({ name: "ChatMessageContent" })
1026
- ], Ft);
1027
- var ut;
1028
- let N = (ut = class extends _ {
1045
+ ], kt);
1046
+ var mt;
1047
+ let b = (mt = class extends _ {
1029
1048
  constructor() {
1030
1049
  super(...arguments);
1031
1050
  e(this, "callId");
@@ -1033,24 +1052,24 @@ let N = (ut = class extends _ {
1033
1052
  e(this, "arguments");
1034
1053
  e(this, "functionCallIndex", 0);
1035
1054
  }
1036
- }, p(ut, "StreamingFunctionCallUpdateContent"), ut);
1055
+ }, p(mt, "StreamingFunctionCallUpdateContent"), mt);
1037
1056
  n([
1038
1057
  o(String)
1039
- ], N.prototype, "callId", 2);
1058
+ ], b.prototype, "callId", 2);
1040
1059
  n([
1041
1060
  o(String)
1042
- ], N.prototype, "name", 2);
1061
+ ], b.prototype, "name", 2);
1043
1062
  n([
1044
1063
  o(String)
1045
- ], N.prototype, "arguments", 2);
1064
+ ], b.prototype, "arguments", 2);
1046
1065
  n([
1047
1066
  o(Number)
1048
- ], N.prototype, "functionCallIndex", 2);
1049
- N = n([
1067
+ ], b.prototype, "functionCallIndex", 2);
1068
+ b = n([
1050
1069
  g({ name: "StreamingFunctionCallUpdateContent" })
1051
- ], N);
1052
- var dt;
1053
- let Nt = (dt = class extends _ {
1070
+ ], b);
1071
+ var gt;
1072
+ let Ut = (gt = class extends _ {
1054
1073
  constructor() {
1055
1074
  super(...arguments);
1056
1075
  e(this, "text");
@@ -1058,15 +1077,15 @@ let Nt = (dt = class extends _ {
1058
1077
  // Not decorated with @jsonMember
1059
1078
  e(this, "encoding");
1060
1079
  }
1061
- }, p(dt, "StreamingTextContent"), dt);
1080
+ }, p(gt, "StreamingTextContent"), gt);
1062
1081
  n([
1063
1082
  o(String)
1064
- ], Nt.prototype, "text", 2);
1065
- Nt = n([
1083
+ ], Ut.prototype, "text", 2);
1084
+ Ut = n([
1066
1085
  g({ name: "StreamingTextContent" })
1067
- ], Nt);
1068
- var mt;
1069
- let bt = (mt = class extends _ {
1086
+ ], Ut);
1087
+ var ft;
1088
+ let Pt = (ft = class extends _ {
1070
1089
  constructor() {
1071
1090
  super(...arguments);
1072
1091
  e(this, "text");
@@ -1074,34 +1093,34 @@ let bt = (mt = class extends _ {
1074
1093
  // Not decorated with @jsonMember
1075
1094
  e(this, "encoding");
1076
1095
  }
1077
- }, p(mt, "StreamingReasoningContent"), mt);
1096
+ }, p(ft, "StreamingReasoningContent"), ft);
1078
1097
  n([
1079
1098
  o(String)
1080
- ], bt.prototype, "text", 2);
1081
- bt = n([
1099
+ ], Pt.prototype, "text", 2);
1100
+ Pt = n([
1082
1101
  g({ name: "StreamingReasoningContent" })
1083
- ], bt);
1084
- var gt;
1085
- let Ut = (gt = class extends _ {
1102
+ ], Pt);
1103
+ var yt;
1104
+ let Mt = (yt = class extends _ {
1086
1105
  constructor() {
1087
1106
  super(...arguments);
1088
1107
  e(this, "headline");
1089
1108
  }
1090
- }, p(gt, "StreamingThoughtHighlightContent"), gt);
1109
+ }, p(yt, "StreamingThoughtHighlightContent"), yt);
1091
1110
  n([
1092
1111
  o(String)
1093
- ], Ut.prototype, "headline", 2);
1094
- Ut = n([
1112
+ ], Mt.prototype, "headline", 2);
1113
+ Mt = n([
1095
1114
  g({ name: "StreamingThoughtHighlightContent" })
1096
- ], Ut);
1097
- var ft;
1098
- let W = (ft = class {
1115
+ ], Mt);
1116
+ var ht;
1117
+ let W = (ht = class {
1099
1118
  constructor() {
1100
1119
  e(this, "instructionCategory", "");
1101
1120
  e(this, "description", "");
1102
1121
  e(this, "interactionId", "");
1103
1122
  }
1104
- }, p(ft, "InstructionSummary"), ft);
1123
+ }, p(ht, "InstructionSummary"), ht);
1105
1124
  n([
1106
1125
  o(String)
1107
1126
  ], W.prototype, "instructionCategory", 2);
@@ -1114,24 +1133,24 @@ n([
1114
1133
  W = n([
1115
1134
  g({ name: "InstructionSummary" })
1116
1135
  ], W);
1117
- var yt;
1118
- let Pt = (yt = class {
1136
+ var Ct;
1137
+ let Gt = (Ct = class {
1119
1138
  constructor() {
1120
1139
  e(this, "personaId");
1121
1140
  e(this, "role");
1122
1141
  }
1123
- }, p(yt, "AgentIdentityWire"), yt);
1142
+ }, p(Ct, "AgentIdentityWire"), Ct);
1124
1143
  n([
1125
1144
  o(String)
1126
- ], Pt.prototype, "personaId", 2);
1145
+ ], Gt.prototype, "personaId", 2);
1127
1146
  n([
1128
1147
  o(String)
1129
- ], Pt.prototype, "role", 2);
1130
- Pt = n([
1148
+ ], Gt.prototype, "role", 2);
1149
+ Gt = n([
1131
1150
  g({ name: "AgentIdentityWire" })
1132
- ], Pt);
1133
- var ht;
1134
- let D = (ht = class {
1151
+ ], Gt);
1152
+ var St;
1153
+ let D = (St = class {
1135
1154
  constructor() {
1136
1155
  e(this, "size", 0);
1137
1156
  e(this, "originalSize", 0);
@@ -1146,7 +1165,7 @@ let D = (ht = class {
1146
1165
  e(this, "compressionRatio");
1147
1166
  e(this, "newOverallCount");
1148
1167
  }
1149
- }, p(ht, "SessionInformation"), ht);
1168
+ }, p(St, "SessionInformation"), St);
1150
1169
  n([
1151
1170
  o(Number)
1152
1171
  ], D.prototype, "size", 2);
@@ -1169,7 +1188,7 @@ n([
1169
1188
  o(String)
1170
1189
  ], D.prototype, "id", 2);
1171
1190
  n([
1172
- Et(W)
1191
+ L(W)
1173
1192
  ], D.prototype, "instructionSummaries", 2);
1174
1193
  n([
1175
1194
  o(Number)
@@ -1186,8 +1205,8 @@ n([
1186
1205
  D = n([
1187
1206
  g({ name: "SessionInformation" })
1188
1207
  ], D);
1189
- var St;
1190
- let C = (St = class {
1208
+ var Tt;
1209
+ let S = (Tt = class {
1191
1210
  constructor() {
1192
1211
  e(this, "timestamp");
1193
1212
  e(this, "mimeType");
@@ -1209,60 +1228,60 @@ let C = (St = class {
1209
1228
  e(this, "detachedRunName");
1210
1229
  e(this, "text");
1211
1230
  }
1212
- }, p(St, "LlmEvent"), St);
1231
+ }, p(Tt, "LlmEvent"), Tt);
1213
1232
  n([
1214
1233
  o(Number)
1215
- ], C.prototype, "timestamp", 2);
1234
+ ], S.prototype, "timestamp", 2);
1216
1235
  n([
1217
1236
  o(String)
1218
- ], C.prototype, "mimeType", 2);
1237
+ ], S.prototype, "mimeType", 2);
1219
1238
  n([
1220
1239
  o(Boolean)
1221
- ], C.prototype, "partial", 2);
1240
+ ], S.prototype, "partial", 2);
1222
1241
  n([
1223
1242
  o(Boolean)
1224
- ], C.prototype, "turnComplete", 2);
1243
+ ], S.prototype, "turnComplete", 2);
1225
1244
  n([
1226
1245
  o(Boolean)
1227
- ], C.prototype, "visible", 2);
1246
+ ], S.prototype, "visible", 2);
1228
1247
  n([
1229
1248
  o(String)
1230
- ], C.prototype, "serverError", 2);
1249
+ ], S.prototype, "serverError", 2);
1231
1250
  n([
1232
1251
  o(String)
1233
- ], C.prototype, "interactionId", 2);
1252
+ ], S.prototype, "interactionId", 2);
1234
1253
  n([
1235
1254
  o(D)
1236
- ], C.prototype, "sessionInformation", 2);
1255
+ ], S.prototype, "sessionInformation", 2);
1237
1256
  n([
1238
- o(Pt)
1239
- ], C.prototype, "agent", 2);
1257
+ o(Gt)
1258
+ ], S.prototype, "agent", 2);
1240
1259
  n([
1241
- o(Dt)
1242
- ], C.prototype, "eventType", 2);
1260
+ o(wt)
1261
+ ], S.prototype, "eventType", 2);
1243
1262
  n([
1244
- Et(P)
1245
- ], C.prototype, "artifactsGenerated", 2);
1263
+ L(P)
1264
+ ], S.prototype, "artifactsGenerated", 2);
1246
1265
  n([
1247
1266
  o(String)
1248
- ], C.prototype, "author", 2);
1267
+ ], S.prototype, "author", 2);
1249
1268
  n([
1250
- o(Rt)
1251
- ], C.prototype, "role", 2);
1269
+ o(At)
1270
+ ], S.prototype, "role", 2);
1252
1271
  n([
1253
1272
  o(String)
1254
- ], C.prototype, "command", 2);
1273
+ ], S.prototype, "command", 2);
1255
1274
  n([
1256
- o(Ft)
1257
- ], C.prototype, "content", 2);
1275
+ o(kt)
1276
+ ], S.prototype, "content", 2);
1258
1277
  n([
1259
- Et(() => _)
1260
- ], C.prototype, "streamingParts", 2);
1261
- C = n([
1278
+ L(() => _)
1279
+ ], S.prototype, "streamingParts", 2);
1280
+ S = n([
1262
1281
  g({ name: "LlmEvent" })
1263
- ], C);
1264
- var Ct;
1265
- let I = (Ct = class {
1282
+ ], S);
1283
+ var xt;
1284
+ let I = (xt = class {
1266
1285
  constructor() {
1267
1286
  e(this, "timeStamp");
1268
1287
  e(this, "partialText");
@@ -1275,7 +1294,7 @@ let I = (Ct = class {
1275
1294
  e(this, "partialEventType");
1276
1295
  e(this, "detachedRunId");
1277
1296
  }
1278
- }, p(Ct, "PartialLlmEvent"), Ct);
1297
+ }, p(xt, "PartialLlmEvent"), xt);
1279
1298
  n([
1280
1299
  o(Number, { name: "ts" })
1281
1300
  ], I.prototype, "timeStamp", 2);
@@ -1289,7 +1308,7 @@ n([
1289
1308
  o(String, { name: "fn" })
1290
1309
  ], I.prototype, "functionName", 2);
1291
1310
  n([
1292
- Et(() => _)
1311
+ L(() => _)
1293
1312
  ], I.prototype, "streamingParts", 2);
1294
1313
  n([
1295
1314
  o(String, { name: "fid" })
@@ -1301,7 +1320,7 @@ n([
1301
1320
  o(String, { name: "itid" })
1302
1321
  ], I.prototype, "iteractionId", 2);
1303
1322
  n([
1304
- o(Dt)
1323
+ o(wt)
1305
1324
  ], I.prototype, "partialEventType", 2);
1306
1325
  n([
1307
1326
  o(String, { name: "said" })
@@ -1309,36 +1328,40 @@ n([
1309
1328
  I = n([
1310
1329
  g({ name: "PartialLlmEvent" })
1311
1330
  ], I);
1312
- var Tt;
1313
- let b = (Tt = class {
1331
+ var _t;
1332
+ let A = (_t = class {
1314
1333
  constructor() {
1315
1334
  e(this, "interactionId");
1316
1335
  e(this, "content");
1317
1336
  e(this, "origin");
1318
1337
  e(this, "agentId");
1319
1338
  e(this, "detachedRunId");
1339
+ e(this, "queuedInteractionIds");
1320
1340
  }
1321
- }, p(Tt, "InteractionStart"), Tt);
1341
+ }, p(_t, "InteractionStart"), _t);
1322
1342
  n([
1323
1343
  o(String)
1324
- ], b.prototype, "interactionId", 2);
1344
+ ], A.prototype, "interactionId", 2);
1325
1345
  n([
1326
1346
  o(String)
1327
- ], b.prototype, "content", 2);
1347
+ ], A.prototype, "content", 2);
1328
1348
  n([
1329
1349
  o(String)
1330
- ], b.prototype, "origin", 2);
1350
+ ], A.prototype, "origin", 2);
1331
1351
  n([
1332
1352
  o(String)
1333
- ], b.prototype, "agentId", 2);
1353
+ ], A.prototype, "agentId", 2);
1334
1354
  n([
1335
1355
  o(String)
1336
- ], b.prototype, "detachedRunId", 2);
1337
- b = n([
1356
+ ], A.prototype, "detachedRunId", 2);
1357
+ n([
1358
+ L(String)
1359
+ ], A.prototype, "queuedInteractionIds", 2);
1360
+ A = n([
1338
1361
  g({ name: "InteractionStart" })
1339
- ], b);
1340
- var xt;
1341
- let E = (xt = class {
1362
+ ], A);
1363
+ var Dt;
1364
+ let E = (Dt = class {
1342
1365
  constructor() {
1343
1366
  e(this, "type");
1344
1367
  e(this, "event");
@@ -1350,12 +1373,12 @@ let E = (xt = class {
1350
1373
  e(this, "detachedRunName");
1351
1374
  e(this, "seq");
1352
1375
  }
1353
- }, p(xt, "StreamingResponse"), xt);
1376
+ }, p(Dt, "StreamingResponse"), Dt);
1354
1377
  n([
1355
1378
  o(String)
1356
1379
  ], E.prototype, "type", 2);
1357
1380
  n([
1358
- o(C)
1381
+ o(S)
1359
1382
  ], E.prototype, "event", 2);
1360
1383
  n([
1361
1384
  o(String)
@@ -1367,7 +1390,7 @@ n([
1367
1390
  o(I, { name: "pe" })
1368
1391
  ], E.prototype, "partialEvent", 2);
1369
1392
  n([
1370
- o(b)
1393
+ o(A)
1371
1394
  ], E.prototype, "interaction", 2);
1372
1395
  n([
1373
1396
  o(String)
@@ -1381,23 +1404,23 @@ n([
1381
1404
  E = n([
1382
1405
  g({ name: "StreamingResponse" })
1383
1406
  ], E);
1384
- var _t;
1385
- let zt = (_t = class {
1407
+ var It;
1408
+ let Kt = (It = class {
1386
1409
  constructor() {
1387
1410
  e(this, "events");
1388
1411
  }
1389
- }, p(_t, "Payload"), _t);
1412
+ }, p(It, "Payload"), It);
1390
1413
  n([
1391
- Et(C)
1392
- ], zt.prototype, "events", 2);
1393
- zt = n([
1414
+ L(S)
1415
+ ], Kt.prototype, "events", 2);
1416
+ Kt = n([
1394
1417
  g({ name: "Payload" })
1395
- ], zt);
1396
- function Qt(s) {
1418
+ ], Kt);
1419
+ function Yt(s) {
1397
1420
  var r;
1398
- const t = (s == null ? void 0 : s.presentation) ?? ((r = s == null ? void 0 : s.metadata) == null ? void 0 : r[pe]);
1421
+ const t = (s == null ? void 0 : s.presentation) ?? ((r = s == null ? void 0 : s.metadata) == null ? void 0 : r[de]);
1399
1422
  if (!t || typeof t != "object") return { isUi: !1 };
1400
- const i = t, a = /* @__PURE__ */ p((c, u) => i[c] ?? i[u], "pick");
1423
+ const i = t, a = /* @__PURE__ */ p((l, u) => i[l] ?? i[u], "pick");
1401
1424
  return {
1402
1425
  isUi: a("isUi", "IsUi") === !0,
1403
1426
  askUserComponent: a("askUserComponent", "AskUserComponent") || void 0,
@@ -1408,7 +1431,7 @@ function Qt(s) {
1408
1431
  parked: a("parked", "Parked") === !0 || void 0
1409
1432
  };
1410
1433
  }
1411
- p(Qt, "readPresentation");
1434
+ p(Yt, "readPresentation");
1412
1435
  const w = class w {
1413
1436
  constructor(t) {
1414
1437
  e(this, "uniqueId");
@@ -1450,7 +1473,7 @@ const w = class w {
1450
1473
  const a = new w(i);
1451
1474
  a.turn_complete = !0, a.partial = !1, a.parts = [];
1452
1475
  const r = {
1453
- eventType: l.ServerError,
1476
+ eventType: c.ServerError,
1454
1477
  errorDetails: {
1455
1478
  errorMessage: t
1456
1479
  },
@@ -1464,7 +1487,7 @@ const w = class w {
1464
1487
  return a.parts.push(r), a;
1465
1488
  }
1466
1489
  static parseFlatPropertiesTypedEvent(t) {
1467
- var a, r, c, u, f;
1490
+ var a, r, l, u, f;
1468
1491
  const i = new w(t.interactionId);
1469
1492
  if (i.serverError = t.serverError, !t.interactionId && !w.carriesServerError(t))
1470
1493
  throw new Error("Interaction ID is required");
@@ -1472,7 +1495,7 @@ const w = class w {
1472
1495
  interactionId: t.interactionId,
1473
1496
  turnComplete: t.turnComplete
1474
1497
  }), t == null ? void 0 : t.author) {
1475
- case ae:
1498
+ case se:
1476
1499
  i.author = "tool";
1477
1500
  break;
1478
1501
  case "system":
@@ -1481,10 +1504,10 @@ const w = class w {
1481
1504
  default:
1482
1505
  i.author = "main";
1483
1506
  }
1484
- return i.mimeType = t.mimeType, i.created = new Date(t.timestamp), i.eventType = l.NotDefined, i.partial = ((c = (r = t.partial) == null ? void 0 : r.toString()) == null ? void 0 : c.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.detachedRunId = t.detachedRunId, i.detachedRunName = t.detachedRunName, (u = t.agent) != null && u.personaId && ((f = t.agent) != null && f.role) && (i.agent = { personaId: t.agent.personaId, role: t.agent.role }), i;
1507
+ return i.mimeType = t.mimeType, i.created = new Date(t.timestamp), i.eventType = c.NotDefined, i.partial = ((l = (r = t.partial) == null ? void 0 : r.toString()) == null ? void 0 : l.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.detachedRunId = t.detachedRunId, i.detachedRunName = t.detachedRunName, (u = t.agent) != null && u.personaId && ((f = t.agent) != null && f.role) && (i.agent = { personaId: t.agent.personaId, role: t.agent.role }), i;
1485
1508
  }
1486
1509
  static getPartType(t) {
1487
- return t instanceof At ? "TextContent" : t instanceof A ? "FunctionCallContent" : t instanceof O ? "FunctionResultContent" : t instanceof N ? "StreamingFunctionCallUpdateContent" : t instanceof v ? "StreamingFinalFunctionCallContent" : t instanceof R ? "StreamingFinalFunctionResultContent" : t instanceof It ? "FunctionClientOutputContent" : t instanceof q ? "StreamingClientOutputContent" : t instanceof wt ? "UserUiContent" : t instanceof Ot ? "InteractionOriginContent" : t instanceof Nt ? "StreamingTextContent" : t instanceof bt ? "StreamingReasoningContent" : t instanceof Ut ? "StreamingThoughtHighlightContent" : t instanceof G ? "ToolEventContent" : t instanceof M ? "StreamingToolEventContent" : "Unknown";
1510
+ return t instanceof vt ? "TextContent" : t instanceof v ? "FunctionCallContent" : t instanceof N ? "FunctionResultContent" : t instanceof b ? "StreamingFunctionCallUpdateContent" : t instanceof O ? "StreamingFinalFunctionCallContent" : t instanceof R ? "StreamingFinalFunctionResultContent" : t instanceof Ft ? "FunctionClientOutputContent" : t instanceof q ? "StreamingClientOutputContent" : t instanceof Et ? "UserUiContent" : t instanceof Nt ? "InteractionOriginContent" : t instanceof bt ? "QueuedMessageContent" : t instanceof Ut ? "StreamingTextContent" : t instanceof Pt ? "StreamingReasoningContent" : t instanceof Mt ? "StreamingThoughtHighlightContent" : t instanceof G ? "ToolEventContent" : t instanceof M ? "StreamingToolEventContent" : "Unknown";
1488
1511
  }
1489
1512
  /** True when the event holds the SDK's "Server Error" sentinel call (`Event.GetErrorEvent`). */
1490
1513
  static carriesServerError(t) {
@@ -1492,15 +1515,15 @@ const w = class w {
1492
1515
  return (((a = t.content) == null ? void 0 : a.items) ?? []).some((r) => (r == null ? void 0 : r.id) === w.SERVER_ERROR_CALL_ID);
1493
1516
  }
1494
1517
  static parseFromTypedEvent(t) {
1495
- var c, u, f, L, Bt, Kt, Jt;
1518
+ var l, u, f, z, Qt, Jt, Vt;
1496
1519
  const i = w.parseFlatPropertiesTypedEvent(t);
1497
1520
  if (i.serverError)
1498
- return i.parts.push(Lt.fromError(i.serverError)), i;
1521
+ return i.parts.push(Bt.fromError(i.serverError)), i;
1499
1522
  if (!t.content && !t.streamingParts)
1500
1523
  return i;
1501
1524
  i.parts = [];
1502
- const a = [...((c = t.content) == null ? void 0 : c.items) ?? [], ...t.streamingParts ?? []];
1503
- i.eventType = se(((u = t.eventType) == null ? void 0 : u.type) ?? "");
1525
+ const a = [...((l = t.content) == null ? void 0 : l.items) ?? [], ...t.streamingParts ?? []];
1526
+ i.eventType = le(((u = t.eventType) == null ? void 0 : u.type) ?? "");
1504
1527
  for (const y of a) {
1505
1528
  let d = {
1506
1529
  id: "",
@@ -1513,33 +1536,33 @@ const w = class w {
1513
1536
  textAppendable: !1
1514
1537
  };
1515
1538
  const h = w.getPartType(y);
1516
- if (h == S.FunctionCallContent || h == S.FunctionResultContent || h == S.StreamingFinalFunctionCallContent || h == S.StreamingFinalFunctionResultContent) {
1539
+ if (h == C.FunctionCallContent || h == C.FunctionResultContent || h == C.StreamingFinalFunctionCallContent || h == C.StreamingFinalFunctionResultContent) {
1517
1540
  var r = y;
1518
1541
  if (r.id == w.SERVER_ERROR_CALL_ID) {
1519
- const m = r.arguments ?? {}, z = typeof m.error == "string" && m.error.trim().length > 0 ? m.error : JSON.stringify(r.arguments);
1520
- d.eventType = l.ServerError, d.errorDetails = {
1521
- errorMessage: z,
1542
+ const m = r.arguments ?? {}, B = typeof m.error == "string" && m.error.trim().length > 0 ? m.error : JSON.stringify(r.arguments);
1543
+ d.eventType = c.ServerError, d.errorDetails = {
1544
+ errorMessage: B,
1522
1545
  stackTrace: typeof m.stackTrace == "string" ? m.stackTrace : void 0
1523
1546
  }, d.functionDetails = void 0;
1524
1547
  } else {
1525
- d.eventType = h == S.FunctionCallContent || h == S.StreamingFinalFunctionCallContent ? l.FunctionCall : l.FunctionResponse;
1548
+ d.eventType = h == C.FunctionCallContent || h == C.StreamingFinalFunctionCallContent ? c.FunctionCall : c.FunctionResponse;
1526
1549
  let m;
1527
1550
  try {
1528
1551
  if (r != null && r.result)
1529
1552
  if (typeof r.result == "object")
1530
1553
  m = r.result;
1531
1554
  else if (typeof r.result == "string") {
1532
- const kt = JSON.parse(r.result);
1533
- m = typeof kt == "object" && kt !== null ? kt : r.result;
1555
+ const Rt = JSON.parse(r.result);
1556
+ m = typeof Rt == "object" && Rt !== null ? Rt : r.result;
1534
1557
  } else
1535
1558
  m = r.result;
1536
- } catch (kt) {
1537
- console.warn("Parse function error", kt), m = r == null ? void 0 : r.result;
1559
+ } catch (Rt) {
1560
+ console.warn("Parse function error", Rt), m = r == null ? void 0 : r.result;
1538
1561
  }
1539
1562
  d.thoughtDetails = {
1540
1563
  text: ""
1541
1564
  };
1542
- const z = Qt(r);
1565
+ const B = Yt(r);
1543
1566
  d.functionDetails = {
1544
1567
  id: (r == null ? void 0 : r.id) ?? "",
1545
1568
  args: r == null ? void 0 : r.arguments,
@@ -1548,41 +1571,41 @@ const w = class w {
1548
1571
  // `start`. Keying on the persisted type alone left every LIVE call `Executing` with no
1549
1572
  // start, and a renderer gating its elapsed timer on `status === 'Executing' && start`
1550
1573
  // showed "running" with no stopwatch (AIA issue 1022). Same for `end` on the result.
1551
- start: h == S.FunctionCallContent || h == S.StreamingFinalFunctionCallContent ? i.created : void 0,
1552
- end: h == S.FunctionResultContent || h == S.StreamingFinalFunctionResultContent ? i.created : void 0,
1574
+ start: h == C.FunctionCallContent || h == C.StreamingFinalFunctionCallContent ? i.created : void 0,
1575
+ end: h == C.FunctionResultContent || h == C.StreamingFinalFunctionResultContent ? i.created : void 0,
1553
1576
  text: JSON.stringify(r == null ? void 0 : r.arguments) ?? "",
1554
1577
  name: (r == null ? void 0 : r.functionName) ?? "",
1555
- status: d.eventType == l.FunctionCall ? "Executing" : "Done",
1578
+ status: d.eventType == c.FunctionCall ? "Executing" : "Done",
1556
1579
  response: m,
1557
- isUi: z.isUi,
1558
- argsDescription: z.argsDescription,
1580
+ isUi: B.isUi,
1581
+ argsDescription: B.argsDescription,
1559
1582
  // Client-only payload riding the RESULT event: live top-level `clientOutput`, or
1560
1583
  // metadata.clientOutput on the collapsed/persisted result. Calls leave it undefined.
1561
1584
  // The persisted-replay form also folds in via FunctionClientOutputContent.
1562
1585
  clientOutput: (r == null ? void 0 : r.clientOutput) ?? ((f = r == null ? void 0 : r.metadata) == null ? void 0 : f.clientOutput),
1563
- askUserComponent: z.askUserComponent,
1586
+ askUserComponent: B.askUserComponent,
1564
1587
  // Runtime "don't render" override on a RESULT (CallContext.CancelUiRender).
1565
- cancelUi: z.cancelUi
1588
+ cancelUi: B.cancelUi
1566
1589
  }, d.functionDetails.isAskUser = !!d.functionDetails.askUserComponent, t.text = r == null ? void 0 : r.arguments;
1567
1590
  }
1568
- } else if (h == S.StreamingTextContent)
1569
- d.eventType = l.Text, d.text = (L = y == null ? void 0 : y.text) == null ? void 0 : L.replaceAll("\\n", `
1591
+ } else if (h == C.StreamingTextContent)
1592
+ d.eventType = c.Text, d.text = (z = y == null ? void 0 : y.text) == null ? void 0 : z.replaceAll("\\n", `
1570
1593
  `), t.text = d.text;
1571
- else if (h == S.TextContent)
1572
- d.eventType = l.Text, d.text = (Bt = y == null ? void 0 : y.text) == null ? void 0 : Bt.replaceAll("\\n", `
1594
+ else if (h == C.TextContent)
1595
+ d.eventType = c.Text, d.text = (Qt = y == null ? void 0 : y.text) == null ? void 0 : Qt.replaceAll("\\n", `
1573
1596
  `), t.text = d.text;
1574
- else if (h == S.StreamingReasoningContent)
1575
- d.eventType = l.Thought, d.thoughtDetails = {
1576
- text: ((Kt = y == null ? void 0 : y.text) == null ? void 0 : Kt.replaceAll("\\n", `
1597
+ else if (h == C.StreamingReasoningContent)
1598
+ d.eventType = c.Thought, d.thoughtDetails = {
1599
+ text: ((Jt = y == null ? void 0 : y.text) == null ? void 0 : Jt.replaceAll("\\n", `
1577
1600
  `)) ?? ""
1578
- }, d.text = (Jt = y == null ? void 0 : y.text) == null ? void 0 : Jt.replaceAll("\\n", `
1601
+ }, d.text = (Vt = y == null ? void 0 : y.text) == null ? void 0 : Vt.replaceAll("\\n", `
1579
1602
  `), t.text = d.text;
1580
- else if (h == S.StreamingThoughtHighlightContent) {
1603
+ else if (h == C.StreamingThoughtHighlightContent) {
1581
1604
  const m = (y == null ? void 0 : y.headline) ?? "";
1582
- d.eventType = l.ThoughtHighlight, d.thoughtDetails = { text: "", headlines: m ? [m] : [] };
1583
- } else if (h == S.StreamingFunctionCallUpdateContent) {
1605
+ d.eventType = c.ThoughtHighlight, d.thoughtDetails = { text: "", headlines: m ? [m] : [] };
1606
+ } else if (h == C.StreamingFunctionCallUpdateContent) {
1584
1607
  const m = y;
1585
- d.eventType = l.PartialFunctionCall, d.text = m.arguments, d.thoughtDetails = {
1608
+ d.eventType = c.PartialFunctionCall, d.text = m.arguments, d.thoughtDetails = {
1586
1609
  text: ""
1587
1610
  }, d.functionDetails = {
1588
1611
  id: m.callId ?? "",
@@ -1590,25 +1613,25 @@ const w = class w {
1590
1613
  status: "Composing",
1591
1614
  name: (m == null ? void 0 : m.name) ?? "Unknown"
1592
1615
  }, t.text = d.text;
1593
- } else if (h == S.ToolEventContent || h == S.StreamingToolEventContent) {
1594
- d.eventType = l.ToolEvent;
1616
+ } else if (h == C.ToolEventContent || h == C.StreamingToolEventContent) {
1617
+ d.eventType = c.ToolEvent;
1595
1618
  const m = y;
1596
1619
  d.toolDetails = {
1597
1620
  eventName: m.eventName ?? "",
1598
1621
  eventData: m.eventData ?? "",
1599
1622
  sessionId: m.sessionId ?? void 0
1600
1623
  };
1601
- } else if (h == S.FunctionClientOutputContent) {
1624
+ } else if (h == C.FunctionClientOutputContent) {
1602
1625
  const m = y;
1603
- d.eventType = l.FunctionClientOutput, d.functionDetails = {
1626
+ d.eventType = c.FunctionClientOutput, d.functionDetails = {
1604
1627
  id: m.id ?? "",
1605
1628
  name: "",
1606
1629
  status: "Done",
1607
1630
  clientOutput: m.data
1608
1631
  };
1609
- } else if (h == S.StreamingClientOutputContent) {
1632
+ } else if (h == C.StreamingClientOutputContent) {
1610
1633
  const m = y;
1611
- d.eventType = l.FunctionClientOutput, d.functionDetails = {
1634
+ d.eventType = c.FunctionClientOutput, d.functionDetails = {
1612
1635
  id: m.id ?? "",
1613
1636
  name: "",
1614
1637
  // The parked call stays Executing; interactionService folds only clientOutput onto it and
@@ -1616,11 +1639,11 @@ const w = class w {
1616
1639
  status: "Executing",
1617
1640
  clientOutput: m.clientOutput,
1618
1641
  // The park signal itself (the reason this event fires even with no prefill).
1619
- parked: Qt(m).parked
1642
+ parked: Yt(m).parked
1620
1643
  };
1621
- } else if (h == S.UserUiContent) {
1644
+ } else if (h == C.UserUiContent) {
1622
1645
  const m = y;
1623
- d.eventType = l.UserAnswer, d.author = "user", d.functionDetails = {
1646
+ d.eventType = c.UserAnswer, d.author = "user", d.functionDetails = {
1624
1647
  id: "",
1625
1648
  name: m.name ?? "",
1626
1649
  args: m.args,
@@ -1628,9 +1651,11 @@ const w = class w {
1628
1651
  isUi: !0
1629
1652
  };
1630
1653
  } else {
1631
- if (h == S.InteractionOriginContent)
1654
+ if (h == C.InteractionOriginContent)
1632
1655
  continue;
1633
- d.eventType = l.NotDefined, console.warn(`Got a unmapped event_type:${i.eventType}, data:`, h, y);
1656
+ if (h == C.QueuedMessageContent)
1657
+ continue;
1658
+ d.eventType = c.NotDefined, console.warn(`Got a unmapped event_type:${i.eventType}, data:`, h, y);
1634
1659
  continue;
1635
1660
  }
1636
1661
  i.parts.push(d);
@@ -1641,10 +1666,10 @@ const w = class w {
1641
1666
  return {
1642
1667
  author: "main",
1643
1668
  visible: !0,
1644
- eventType: l.Thought,
1669
+ eventType: c.Thought,
1645
1670
  uniqueId: (/* @__PURE__ */ new Date()).getTime().toString(),
1646
1671
  interactionId: t,
1647
- allEventTypes: [l.Thought],
1672
+ allEventTypes: [c.Thought],
1648
1673
  artifactsDelta: [""],
1649
1674
  model_session_id: "",
1650
1675
  created: /* @__PURE__ */ new Date(),
@@ -1664,9 +1689,9 @@ const w = class w {
1664
1689
  // a part the UI cannot show. Only the demo's fake gateway builds
1665
1690
  // thoughts this way, which is why it went unnoticed.
1666
1691
  text: i,
1667
- id: qt(),
1692
+ id: Ht(),
1668
1693
  created: /* @__PURE__ */ new Date(),
1669
- eventType: l.Thought,
1694
+ eventType: c.Thought,
1670
1695
  author: "main",
1671
1696
  textAppendable: !0,
1672
1697
  partial: !0,
@@ -1691,10 +1716,10 @@ const w = class w {
1691
1716
  return {
1692
1717
  author: "main",
1693
1718
  visible: !0,
1694
- eventType: l.Text,
1719
+ eventType: c.Text,
1695
1720
  uniqueId: (/* @__PURE__ */ new Date()).getTime().toString(),
1696
1721
  interactionId: i,
1697
- allEventTypes: [l.Text],
1722
+ allEventTypes: [c.Text],
1698
1723
  artifactsDelta: [""],
1699
1724
  model_session_id: "",
1700
1725
  created: /* @__PURE__ */ new Date(),
@@ -1711,7 +1736,7 @@ const w = class w {
1711
1736
  thoughtDetails: a ? {
1712
1737
  text: a
1713
1738
  } : void 0,
1714
- id: qt(),
1739
+ id: Ht(),
1715
1740
  created: /* @__PURE__ */ new Date(),
1716
1741
  // Part eventType MUST match the outer event's eventType.
1717
1742
  // Was previously `Thought` here, which made the merger
@@ -1719,7 +1744,7 @@ const w = class w {
1719
1744
  // in the trace strip instead of the message body) —
1720
1745
  // the chat would show the message during streaming and
1721
1746
  // then "disappear" once the part was reclassified.
1722
- eventType: l.Text,
1747
+ eventType: c.Text,
1723
1748
  author: "main",
1724
1749
  textAppendable: !0,
1725
1750
  partial: !0,
@@ -1732,90 +1757,91 @@ const w = class w {
1732
1757
  };
1733
1758
  p(w, "ServerEvent"), /** The call id the SDK puts on its error sentinel (`Event.ServerErrorIdentification`). */
1734
1759
  e(w, "SERVER_ERROR_CALL_ID", "Server Error");
1735
- let Zt = w;
1736
- const Xt = [
1760
+ let Xt = w;
1761
+ const te = [
1737
1762
  // KernelContent derived types
1738
- At,
1739
1763
  vt,
1740
- A,
1741
- G,
1742
- O,
1743
- It,
1744
- wt,
1745
1764
  Ot,
1746
- F,
1765
+ v,
1766
+ G,
1767
+ N,
1747
1768
  Ft,
1748
- // StreamingKernelContent derived types
1769
+ Et,
1749
1770
  Nt,
1750
- N,
1751
1771
  bt,
1772
+ F,
1773
+ kt,
1774
+ // StreamingKernelContent derived types
1752
1775
  Ut,
1776
+ b,
1777
+ Pt,
1778
+ Mt,
1753
1779
  M,
1754
- v,
1780
+ O,
1755
1781
  R,
1756
1782
  q,
1757
1783
  W
1758
1784
  ];
1759
- function ue(s) {
1785
+ function me(s) {
1760
1786
  return s.name;
1761
1787
  }
1762
- p(ue, "getConstructorName");
1763
- function jt(s, t, i, a) {
1764
- t.constructor !== i && (s.$type = (a == null ? void 0 : a.name) ?? ue(t.constructor));
1788
+ p(me, "getConstructorName");
1789
+ function ee(s, t, i, a) {
1790
+ t.constructor !== i && (s.$type = (a == null ? void 0 : a.name) ?? me(t.constructor));
1765
1791
  }
1766
- p(jt, "dotNetTypeEmitter");
1767
- function te(s, t) {
1792
+ p(ee, "dotNetTypeEmitter");
1793
+ function ne(s, t) {
1768
1794
  if (s.$type != null)
1769
1795
  return t.get(s.$type);
1770
1796
  }
1771
- p(te, "dotnetTypeResolver");
1772
- function ee() {
1773
- const s = new Yt(C);
1797
+ p(ne, "dotnetTypeResolver");
1798
+ function oe() {
1799
+ const s = new jt(S);
1774
1800
  return s.config({
1775
- knownTypes: Xt,
1776
- typeHintEmitter: jt,
1777
- typeResolver: te
1801
+ knownTypes: te,
1802
+ typeHintEmitter: ee,
1803
+ typeResolver: ne
1778
1804
  }), s;
1779
1805
  }
1780
- p(ee, "createEventSerializer");
1781
- function de() {
1782
- const s = new Yt(E);
1806
+ p(oe, "createEventSerializer");
1807
+ function ge() {
1808
+ const s = new jt(E);
1783
1809
  return s.config({
1784
- knownTypes: Xt,
1785
- typeHintEmitter: jt,
1786
- typeResolver: te
1810
+ knownTypes: te,
1811
+ typeHintEmitter: ee,
1812
+ typeResolver: ne
1787
1813
  }), s;
1788
1814
  }
1789
- p(de, "createStreamingResponseSerializer");
1790
- function ne(s) {
1815
+ p(ge, "createStreamingResponseSerializer");
1816
+ function ie(s) {
1791
1817
  try {
1792
1818
  return JSON.parse(s), s;
1793
1819
  } catch {
1794
1820
  let i = "", a = !1;
1795
1821
  for (let r = 0; r < s.length; r++) {
1796
- const c = s[r], u = c.charCodeAt(0);
1797
- if (c === "\\" && a && r + 1 < s.length) {
1822
+ const l = s[r], u = l.charCodeAt(0);
1823
+ if (l === "\\" && a && r + 1 < s.length) {
1798
1824
  const f = s[r + 1];
1799
1825
  if (f === '"' || f === "\\" || f === "/" || f === "b" || f === "f" || f === "n" || f === "r" || f === "t") {
1800
- i += c + f, r++;
1826
+ i += l + f, r++;
1801
1827
  continue;
1802
1828
  } else if (f === "u" && r + 5 < s.length) {
1803
1829
  i += s.substring(r, r + 6), r += 5;
1804
1830
  continue;
1805
1831
  } else {
1806
- i += c;
1832
+ i += l;
1807
1833
  continue;
1808
1834
  }
1809
1835
  }
1810
- if (c === '"') {
1836
+ if (l === '"') {
1811
1837
  let f = 0;
1812
- for (let L = r - 1; L >= 0 && s[L] === "\\"; L--)
1838
+ for (let z = r - 1; z >= 0 && s[z] === "\\"; z--)
1813
1839
  f++;
1814
- f % 2 === 0 && (a = !a), i += c;
1840
+ f % 2 === 0 && (a = !a), i += l;
1815
1841
  continue;
1816
1842
  }
1817
1843
  if (a && u < 32)
1818
- switch (c) {
1844
+ switch (l) {
1819
1845
  case `
1820
1846
  `:
1821
1847
  i += "\\n";
@@ -1838,65 +1864,66 @@ function ne(s) {
1838
1864
  break;
1839
1865
  }
1840
1866
  else
1841
- i += c;
1867
+ i += l;
1842
1868
  }
1843
1869
  return i;
1844
1870
  }
1845
1871
  }
1846
- p(ne, "sanitizeJsonString");
1847
- function Pe(s) {
1848
- const t = ne(s);
1849
- return de().parse(t);
1872
+ p(ie, "sanitizeJsonString");
1873
+ function Ge(s) {
1874
+ const t = ie(s);
1875
+ return ge().parse(t);
1850
1876
  }
1851
- p(Pe, "deserializePayload");
1852
- function Me(s) {
1853
- const t = ne(s);
1854
- return ee().parse(t);
1877
+ p(Ge, "deserializePayload");
1878
+ function qe(s) {
1879
+ const t = ie(s);
1880
+ return oe().parse(t);
1855
1881
  }
1856
- p(Me, "deserializeEvent");
1857
- function Ge(s) {
1858
- return ee().stringify(s);
1882
+ p(qe, "deserializeEvent");
1883
+ function We(s) {
1884
+ return oe().stringify(s);
1859
1885
  }
1860
- p(Ge, "serializeEvent");
1886
+ p(We, "serializeEvent");
1861
1887
  export {
1862
- ve as A,
1888
+ Ne as A,
1863
1889
  F as B,
1864
- we as C,
1865
- l as E,
1866
- A as F,
1867
- se as G,
1868
- Ot as I,
1869
- C as L,
1870
- Ne as M,
1871
- S as P,
1872
- Ee as R,
1873
- Zt as S,
1874
- At as T,
1875
- Ae as a,
1876
- Gt as b,
1877
- Re as c,
1878
- ke as d,
1879
- De as e,
1880
- Ft as f,
1881
- Fe as g,
1882
- O as h,
1883
- Lt as i,
1884
- b as j,
1890
+ Ee as C,
1891
+ c as E,
1892
+ v as F,
1893
+ le as G,
1894
+ Nt as I,
1895
+ S as L,
1896
+ Ue as M,
1897
+ C as P,
1898
+ bt as Q,
1899
+ Re as R,
1900
+ Xt as S,
1901
+ vt as T,
1902
+ Oe as a,
1903
+ Wt as b,
1904
+ ve as c,
1905
+ Ae as d,
1906
+ we as e,
1907
+ kt as f,
1908
+ ke as g,
1909
+ N as h,
1910
+ Bt as i,
1911
+ A as j,
1885
1912
  T as k,
1886
- Ie as l,
1887
- Oe as m,
1888
- N as n,
1889
- bt as o,
1913
+ Fe as l,
1914
+ be as m,
1915
+ b as n,
1916
+ Pt as o,
1890
1917
  E as p,
1891
- Nt as q,
1892
- ee as r,
1893
- de as s,
1894
- Me as t,
1895
- Pe as u,
1896
- Ue as v,
1897
- be as w,
1898
- ne as x,
1899
- Ge as y,
1900
- _e as z
1918
+ Ut as q,
1919
+ oe as r,
1920
+ ge as s,
1921
+ qe as t,
1922
+ Ge as u,
1923
+ Me as v,
1924
+ Pe as w,
1925
+ ie as x,
1926
+ We as y,
1927
+ Ie as z
1901
1928
  };
1902
- //# sourceMappingURL=serializer-DvR3nOcf.js.map
1929
+ //# sourceMappingURL=serializer-DvfyE4_t.js.map