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