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