@illalabs/interfaces 0.2.0 → 0.3.0-canary-beta-08a68673

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 (137) hide show
  1. package/dist/errors/endpoints/chat/ChatBaseError.d.ts +16 -5
  2. package/dist/errors/endpoints/chat/ChatBaseError.d.ts.map +1 -1
  3. package/dist/external.d.ts +1 -0
  4. package/dist/external.d.ts.map +1 -1
  5. package/dist/external.js +1 -0
  6. package/dist/external.js.map +1 -1
  7. package/dist/interfaces/chat/response.d.ts +5 -3
  8. package/dist/interfaces/chat/response.d.ts.map +1 -1
  9. package/dist/schemas/chatContext.d.ts +100 -581
  10. package/dist/schemas/chatContext.d.ts.map +1 -1
  11. package/dist/schemas/chatContext.js +2 -2
  12. package/dist/schemas/chatContext.js.map +1 -1
  13. package/dist/schemas/chatRequestBody.d.ts +524 -828
  14. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  15. package/dist/schemas/chatRequestBody.js +11 -4
  16. package/dist/schemas/chatRequestBody.js.map +1 -1
  17. package/dist/schemas/executionCheckerQueryParams.d.ts +5 -5
  18. package/dist/schemas/illaTools.d.ts +266 -0
  19. package/dist/schemas/illaTools.d.ts.map +1 -0
  20. package/dist/schemas/illaTools.js +58 -0
  21. package/dist/schemas/illaTools.js.map +1 -0
  22. package/dist/schemas/index.d.ts +3 -0
  23. package/dist/schemas/index.d.ts.map +1 -1
  24. package/dist/schemas/index.js +3 -0
  25. package/dist/schemas/index.js.map +1 -1
  26. package/dist/schemas/messages.d.ts +566 -928
  27. package/dist/schemas/messages.d.ts.map +1 -1
  28. package/dist/schemas/messages.js +74 -113
  29. package/dist/schemas/messages.js.map +1 -1
  30. package/dist/schemas/modelContext.d.ts +23 -0
  31. package/dist/schemas/modelContext.d.ts.map +1 -0
  32. package/dist/schemas/modelContext.js +13 -0
  33. package/dist/schemas/modelContext.js.map +1 -0
  34. package/dist/schemas/telemetryEvents.d.ts +2417 -0
  35. package/dist/schemas/telemetryEvents.d.ts.map +1 -0
  36. package/dist/schemas/telemetryEvents.js +236 -0
  37. package/dist/schemas/telemetryEvents.js.map +1 -0
  38. package/dist/schemas/toolAutorouter.d.ts +9 -9
  39. package/dist/schemas/toolAutorouter.d.ts.map +1 -1
  40. package/dist/schemas/userContext.d.ts +3 -0
  41. package/dist/schemas/userContext.d.ts.map +1 -1
  42. package/dist/schemas/userContext.js +4 -0
  43. package/dist/schemas/userContext.js.map +1 -1
  44. package/dist/tools/IllaToolError.d.ts +117 -0
  45. package/dist/tools/IllaToolError.d.ts.map +1 -0
  46. package/dist/tools/IllaToolError.js +147 -0
  47. package/dist/tools/IllaToolError.js.map +1 -0
  48. package/dist/tools/IllaToolOutcome.d.ts +131 -0
  49. package/dist/tools/IllaToolOutcome.d.ts.map +1 -0
  50. package/dist/tools/IllaToolOutcome.js +191 -0
  51. package/dist/tools/IllaToolOutcome.js.map +1 -0
  52. package/dist/tools/index.d.ts +3 -0
  53. package/dist/tools/index.d.ts.map +1 -0
  54. package/dist/tools/index.js +3 -0
  55. package/dist/tools/index.js.map +1 -0
  56. package/dist/types/actions/inputs.d.ts +8 -3
  57. package/dist/types/actions/inputs.d.ts.map +1 -1
  58. package/dist/types/actions/outputs.d.ts +19 -1
  59. package/dist/types/actions/outputs.d.ts.map +1 -1
  60. package/dist/types/actions/tools/{swapBridgeAction.d.ts → bridgeAction.d.ts} +4 -4
  61. package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -0
  62. package/dist/types/actions/tools/bridgeAction.js +2 -0
  63. package/dist/types/actions/tools/bridgeAction.js.map +1 -0
  64. package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -2
  65. package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
  66. package/dist/types/actions/tools/defiFetchListingsAction.js +1 -1
  67. package/dist/types/actions/tools/defiFetchListingsAction.js.map +1 -1
  68. package/dist/types/actions/tools/defiPositionsAction.d.ts +1 -2
  69. package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
  70. package/dist/types/actions/tools/defiPositionsAction.js +1 -1
  71. package/dist/types/actions/tools/defiPositionsAction.js.map +1 -1
  72. package/dist/types/actions/tools/defiSupplyAction.d.ts +1 -2
  73. package/dist/types/actions/tools/defiSupplyAction.d.ts.map +1 -1
  74. package/dist/types/actions/tools/defiSupplyAction.js +1 -1
  75. package/dist/types/actions/tools/defiSupplyAction.js.map +1 -1
  76. package/dist/types/actions/tools/defiWithdrawAction.d.ts +1 -2
  77. package/dist/types/actions/tools/defiWithdrawAction.d.ts.map +1 -1
  78. package/dist/types/actions/tools/defiWithdrawAction.js +1 -1
  79. package/dist/types/actions/tools/defiWithdrawAction.js.map +1 -1
  80. package/dist/types/actions/tools/exchangeRateAction.d.ts +1 -2
  81. package/dist/types/actions/tools/exchangeRateAction.d.ts.map +1 -1
  82. package/dist/types/actions/tools/exchangeRateAction.js +1 -1
  83. package/dist/types/actions/tools/exchangeRateAction.js.map +1 -1
  84. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +4 -3
  85. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  86. package/dist/types/actions/tools/getWalletBalanceAction.js +1 -1
  87. package/dist/types/actions/tools/getWalletBalanceAction.js.map +1 -1
  88. package/dist/types/actions/tools/index.d.ts +18 -3
  89. package/dist/types/actions/tools/index.d.ts.map +1 -1
  90. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts +83 -0
  91. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts.map +1 -0
  92. package/dist/types/actions/tools/polymarketPostOrderAction.js +2 -0
  93. package/dist/types/actions/tools/polymarketPostOrderAction.js.map +1 -0
  94. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts +19 -0
  95. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts.map +1 -0
  96. package/dist/types/actions/tools/predictionMarketsBetAction.js +2 -0
  97. package/dist/types/actions/tools/predictionMarketsBetAction.js.map +1 -0
  98. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  99. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  100. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  101. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  102. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts +25 -0
  103. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts.map +1 -0
  104. package/dist/types/actions/tools/predictionMarketsPositionsAction.js +2 -0
  105. package/dist/types/actions/tools/predictionMarketsPositionsAction.js.map +1 -0
  106. package/dist/types/actions/tools/swapAction.d.ts +16 -0
  107. package/dist/types/actions/tools/swapAction.d.ts.map +1 -0
  108. package/dist/types/actions/tools/swapAction.js +2 -0
  109. package/dist/types/actions/tools/swapAction.js.map +1 -0
  110. package/dist/types/actions/tools/tokenTransferAction.d.ts +1 -2
  111. package/dist/types/actions/tools/tokenTransferAction.d.ts.map +1 -1
  112. package/dist/types/actions/tools/tokenTransferAction.js +1 -1
  113. package/dist/types/actions/tools/tokenTransferAction.js.map +1 -1
  114. package/dist/types/index.d.ts +2 -0
  115. package/dist/types/index.d.ts.map +1 -1
  116. package/dist/types/index.js +2 -0
  117. package/dist/types/index.js.map +1 -1
  118. package/dist/types/messages.d.ts +3 -6
  119. package/dist/types/messages.d.ts.map +1 -1
  120. package/dist/types/messages.js +1 -1
  121. package/dist/types/messages.js.map +1 -1
  122. package/dist/types/streaming.d.ts +81 -0
  123. package/dist/types/streaming.d.ts.map +1 -0
  124. package/dist/types/streaming.js +2 -0
  125. package/dist/types/streaming.js.map +1 -0
  126. package/dist/types/telemetry.d.ts +139 -0
  127. package/dist/types/telemetry.d.ts.map +1 -0
  128. package/dist/types/telemetry.js +7 -0
  129. package/dist/types/telemetry.js.map +1 -0
  130. package/dist/utils/constants.d.ts +8 -6
  131. package/dist/utils/constants.d.ts.map +1 -1
  132. package/dist/utils/constants.js +23 -5
  133. package/dist/utils/constants.js.map +1 -1
  134. package/package.json +4 -4
  135. package/dist/types/actions/tools/swapBridgeAction.d.ts.map +0 -1
  136. package/dist/types/actions/tools/swapBridgeAction.js +0 -2
  137. package/dist/types/actions/tools/swapBridgeAction.js.map +0 -1
@@ -0,0 +1,2417 @@
1
+ import type { ModelMessage } from "@ai-sdk/provider-utils";
2
+ import { z } from "zod";
3
+ /**
4
+ * Telemetry event type enum values.
5
+ * Used to infer TelemetryEventType in types/telemetry.ts
6
+ */
7
+ export declare const telemetryEventTypes: readonly ["iteration_start", "iteration_end", "tool_call_batch", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "finish", "error", "connected", "stream_end"];
8
+ /**
9
+ * Base telemetry event schema with common fields
10
+ */
11
+ export declare const baseTelemetryEventSchema: z.ZodObject<{
12
+ requestId: z.ZodString;
13
+ type: z.ZodEnum<["iteration_start", "iteration_end", "tool_call_batch", "tool_result", "scratchpad_reset", "llm_start", "llm_end", "text_delta", "finish", "error", "connected", "stream_end"]>;
14
+ timestamp: z.ZodOptional<z.ZodNumber>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "finish" | "connected" | "stream_end";
17
+ requestId: string;
18
+ timestamp?: number | undefined;
19
+ }, {
20
+ type: "error" | "iteration_start" | "iteration_end" | "tool_call_batch" | "tool_result" | "scratchpad_reset" | "llm_start" | "llm_end" | "text_delta" | "finish" | "connected" | "stream_end";
21
+ requestId: string;
22
+ timestamp?: number | undefined;
23
+ }>;
24
+ /**
25
+ * Connected event schema - emitted when connected to telemetry stream
26
+ */
27
+ export declare const connectedEventSchema: z.ZodObject<{
28
+ requestId: z.ZodString;
29
+ timestamp: z.ZodOptional<z.ZodNumber>;
30
+ } & {
31
+ type: z.ZodLiteral<"connected">;
32
+ }, "strip", z.ZodTypeAny, {
33
+ type: "connected";
34
+ requestId: string;
35
+ timestamp?: number | undefined;
36
+ }, {
37
+ type: "connected";
38
+ requestId: string;
39
+ timestamp?: number | undefined;
40
+ }>;
41
+ /**
42
+ * Stream end telemetry event schema - emitted when stream ends
43
+ */
44
+ export declare const streamEndTelemetryEventSchema: z.ZodObject<{
45
+ requestId: z.ZodString;
46
+ timestamp: z.ZodOptional<z.ZodNumber>;
47
+ } & {
48
+ type: z.ZodLiteral<"stream_end">;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type: "stream_end";
51
+ requestId: string;
52
+ timestamp?: number | undefined;
53
+ }, {
54
+ type: "stream_end";
55
+ requestId: string;
56
+ timestamp?: number | undefined;
57
+ }>;
58
+ /**
59
+ * Iteration start event schema - emitted when an iteration starts
60
+ */
61
+ export declare const iterationStartEventSchema: z.ZodObject<{
62
+ requestId: z.ZodString;
63
+ timestamp: z.ZodOptional<z.ZodNumber>;
64
+ } & {
65
+ type: z.ZodLiteral<"iteration_start">;
66
+ data: z.ZodObject<{
67
+ iteration: z.ZodNumber;
68
+ }, "strip", z.ZodTypeAny, {
69
+ iteration: number;
70
+ }, {
71
+ iteration: number;
72
+ }>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ type: "iteration_start";
75
+ data: {
76
+ iteration: number;
77
+ };
78
+ requestId: string;
79
+ timestamp?: number | undefined;
80
+ }, {
81
+ type: "iteration_start";
82
+ data: {
83
+ iteration: number;
84
+ };
85
+ requestId: string;
86
+ timestamp?: number | undefined;
87
+ }>;
88
+ /**
89
+ * Iteration end event schema - emitted when an iteration ends
90
+ */
91
+ export declare const iterationEndEventSchema: z.ZodObject<{
92
+ requestId: z.ZodString;
93
+ timestamp: z.ZodOptional<z.ZodNumber>;
94
+ } & {
95
+ type: z.ZodLiteral<"iteration_end">;
96
+ data: z.ZodObject<{
97
+ iteration: z.ZodNumber;
98
+ hasToolCalls: z.ZodBoolean;
99
+ shouldContinue: z.ZodBoolean;
100
+ }, "strip", z.ZodTypeAny, {
101
+ iteration: number;
102
+ hasToolCalls: boolean;
103
+ shouldContinue: boolean;
104
+ }, {
105
+ iteration: number;
106
+ hasToolCalls: boolean;
107
+ shouldContinue: boolean;
108
+ }>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ type: "iteration_end";
111
+ data: {
112
+ iteration: number;
113
+ hasToolCalls: boolean;
114
+ shouldContinue: boolean;
115
+ };
116
+ requestId: string;
117
+ timestamp?: number | undefined;
118
+ }, {
119
+ type: "iteration_end";
120
+ data: {
121
+ iteration: number;
122
+ hasToolCalls: boolean;
123
+ shouldContinue: boolean;
124
+ };
125
+ requestId: string;
126
+ timestamp?: number | undefined;
127
+ }>;
128
+ /**
129
+ * Tool call batch event schema - emitted when tool calls are batched for execution
130
+ */
131
+ export declare const toolCallBatchEventSchema: z.ZodObject<{
132
+ requestId: z.ZodString;
133
+ timestamp: z.ZodOptional<z.ZodNumber>;
134
+ } & {
135
+ type: z.ZodLiteral<"tool_call_batch">;
136
+ data: z.ZodObject<{
137
+ iteration: z.ZodNumber;
138
+ tools: z.ZodArray<z.ZodObject<{
139
+ toolCallId: z.ZodString;
140
+ toolName: z.ZodString;
141
+ }, "strip", z.ZodTypeAny, {
142
+ toolCallId: string;
143
+ toolName: string;
144
+ }, {
145
+ toolCallId: string;
146
+ toolName: string;
147
+ }>, "many">;
148
+ }, "strip", z.ZodTypeAny, {
149
+ iteration: number;
150
+ tools: {
151
+ toolCallId: string;
152
+ toolName: string;
153
+ }[];
154
+ }, {
155
+ iteration: number;
156
+ tools: {
157
+ toolCallId: string;
158
+ toolName: string;
159
+ }[];
160
+ }>;
161
+ }, "strip", z.ZodTypeAny, {
162
+ type: "tool_call_batch";
163
+ data: {
164
+ iteration: number;
165
+ tools: {
166
+ toolCallId: string;
167
+ toolName: string;
168
+ }[];
169
+ };
170
+ requestId: string;
171
+ timestamp?: number | undefined;
172
+ }, {
173
+ type: "tool_call_batch";
174
+ data: {
175
+ iteration: number;
176
+ tools: {
177
+ toolCallId: string;
178
+ toolName: string;
179
+ }[];
180
+ };
181
+ requestId: string;
182
+ timestamp?: number | undefined;
183
+ }>;
184
+ /**
185
+ * Tool result event schema - emitted when a tool execution completes
186
+ */
187
+ export declare const toolResultEventSchema: z.ZodObject<{
188
+ requestId: z.ZodString;
189
+ timestamp: z.ZodOptional<z.ZodNumber>;
190
+ } & {
191
+ type: z.ZodLiteral<"tool_result">;
192
+ data: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
193
+ toolCallId: z.ZodString;
194
+ toolName: z.ZodString;
195
+ status: z.ZodLiteral<"pending">;
196
+ }, "strip", z.ZodTypeAny, {
197
+ status: "pending";
198
+ toolCallId: string;
199
+ toolName: string;
200
+ }, {
201
+ status: "pending";
202
+ toolCallId: string;
203
+ toolName: string;
204
+ }>, z.ZodObject<{
205
+ toolCallId: z.ZodString;
206
+ toolName: z.ZodString;
207
+ status: z.ZodLiteral<"success">;
208
+ }, "strip", z.ZodTypeAny, {
209
+ status: "success";
210
+ toolCallId: string;
211
+ toolName: string;
212
+ }, {
213
+ status: "success";
214
+ toolCallId: string;
215
+ toolName: string;
216
+ }>, z.ZodObject<{
217
+ toolCallId: z.ZodString;
218
+ toolName: z.ZodString;
219
+ status: z.ZodLiteral<"failure">;
220
+ error: z.ZodString;
221
+ }, "strip", z.ZodTypeAny, {
222
+ status: "failure";
223
+ error: string;
224
+ toolCallId: string;
225
+ toolName: string;
226
+ }, {
227
+ status: "failure";
228
+ error: string;
229
+ toolCallId: string;
230
+ toolName: string;
231
+ }>]>;
232
+ }, "strip", z.ZodTypeAny, {
233
+ type: "tool_result";
234
+ data: {
235
+ status: "pending";
236
+ toolCallId: string;
237
+ toolName: string;
238
+ } | {
239
+ status: "success";
240
+ toolCallId: string;
241
+ toolName: string;
242
+ } | {
243
+ status: "failure";
244
+ error: string;
245
+ toolCallId: string;
246
+ toolName: string;
247
+ };
248
+ requestId: string;
249
+ timestamp?: number | undefined;
250
+ }, {
251
+ type: "tool_result";
252
+ data: {
253
+ status: "pending";
254
+ toolCallId: string;
255
+ toolName: string;
256
+ } | {
257
+ status: "success";
258
+ toolCallId: string;
259
+ toolName: string;
260
+ } | {
261
+ status: "failure";
262
+ error: string;
263
+ toolCallId: string;
264
+ toolName: string;
265
+ };
266
+ requestId: string;
267
+ timestamp?: number | undefined;
268
+ }>;
269
+ /**
270
+ * Scratchpad reset event schema - emitted when the scratchpad is reset
271
+ */
272
+ export declare const scratchpadResetEventSchema: z.ZodObject<{
273
+ requestId: z.ZodString;
274
+ timestamp: z.ZodOptional<z.ZodNumber>;
275
+ } & {
276
+ type: z.ZodLiteral<"scratchpad_reset">;
277
+ data: z.ZodObject<{
278
+ reason: z.ZodString;
279
+ }, "strip", z.ZodTypeAny, {
280
+ reason: string;
281
+ }, {
282
+ reason: string;
283
+ }>;
284
+ }, "strip", z.ZodTypeAny, {
285
+ type: "scratchpad_reset";
286
+ data: {
287
+ reason: string;
288
+ };
289
+ requestId: string;
290
+ timestamp?: number | undefined;
291
+ }, {
292
+ type: "scratchpad_reset";
293
+ data: {
294
+ reason: string;
295
+ };
296
+ requestId: string;
297
+ timestamp?: number | undefined;
298
+ }>;
299
+ /**
300
+ * LLM start event schema - emitted when LLM generation starts
301
+ */
302
+ export declare const llmStartEventSchema: z.ZodObject<{
303
+ requestId: z.ZodString;
304
+ timestamp: z.ZodOptional<z.ZodNumber>;
305
+ } & {
306
+ type: z.ZodLiteral<"llm_start">;
307
+ data: z.ZodObject<{
308
+ iteration: z.ZodNumber;
309
+ }, "strip", z.ZodTypeAny, {
310
+ iteration: number;
311
+ }, {
312
+ iteration: number;
313
+ }>;
314
+ }, "strip", z.ZodTypeAny, {
315
+ type: "llm_start";
316
+ data: {
317
+ iteration: number;
318
+ };
319
+ requestId: string;
320
+ timestamp?: number | undefined;
321
+ }, {
322
+ type: "llm_start";
323
+ data: {
324
+ iteration: number;
325
+ };
326
+ requestId: string;
327
+ timestamp?: number | undefined;
328
+ }>;
329
+ /**
330
+ * LLM end event schema - emitted when LLM generation ends
331
+ */
332
+ export declare const llmEndEventSchema: z.ZodObject<{
333
+ requestId: z.ZodString;
334
+ timestamp: z.ZodOptional<z.ZodNumber>;
335
+ } & {
336
+ type: z.ZodLiteral<"llm_end">;
337
+ data: z.ZodObject<{
338
+ iteration: z.ZodNumber;
339
+ hasText: z.ZodBoolean;
340
+ toolCallCount: z.ZodNumber;
341
+ }, "strip", z.ZodTypeAny, {
342
+ iteration: number;
343
+ hasText: boolean;
344
+ toolCallCount: number;
345
+ }, {
346
+ iteration: number;
347
+ hasText: boolean;
348
+ toolCallCount: number;
349
+ }>;
350
+ }, "strip", z.ZodTypeAny, {
351
+ type: "llm_end";
352
+ data: {
353
+ iteration: number;
354
+ hasText: boolean;
355
+ toolCallCount: number;
356
+ };
357
+ requestId: string;
358
+ timestamp?: number | undefined;
359
+ }, {
360
+ type: "llm_end";
361
+ data: {
362
+ iteration: number;
363
+ hasText: boolean;
364
+ toolCallCount: number;
365
+ };
366
+ requestId: string;
367
+ timestamp?: number | undefined;
368
+ }>;
369
+ /**
370
+ * Text delta event schema - emitted when a text chunk is received from LLM
371
+ */
372
+ export declare const textDeltaEventSchema: z.ZodObject<{
373
+ requestId: z.ZodString;
374
+ timestamp: z.ZodOptional<z.ZodNumber>;
375
+ } & {
376
+ type: z.ZodLiteral<"text_delta">;
377
+ data: z.ZodObject<{
378
+ delta: z.ZodString;
379
+ }, "strip", z.ZodTypeAny, {
380
+ delta: string;
381
+ }, {
382
+ delta: string;
383
+ }>;
384
+ }, "strip", z.ZodTypeAny, {
385
+ type: "text_delta";
386
+ data: {
387
+ delta: string;
388
+ };
389
+ requestId: string;
390
+ timestamp?: number | undefined;
391
+ }, {
392
+ type: "text_delta";
393
+ data: {
394
+ delta: string;
395
+ };
396
+ requestId: string;
397
+ timestamp?: number | undefined;
398
+ }>;
399
+ /**
400
+ * Finish event schema - emitted when orchestration finishes
401
+ */
402
+ export declare const finishEventSchema: z.ZodObject<{
403
+ requestId: z.ZodString;
404
+ timestamp: z.ZodOptional<z.ZodNumber>;
405
+ } & {
406
+ type: z.ZodLiteral<"finish">;
407
+ data: z.ZodObject<{
408
+ totalIterations: z.ZodNumber;
409
+ hasPendingTools: z.ZodBoolean;
410
+ hasToolErrors: z.ZodBoolean;
411
+ }, "strip", z.ZodTypeAny, {
412
+ totalIterations: number;
413
+ hasPendingTools: boolean;
414
+ hasToolErrors: boolean;
415
+ }, {
416
+ totalIterations: number;
417
+ hasPendingTools: boolean;
418
+ hasToolErrors: boolean;
419
+ }>;
420
+ }, "strip", z.ZodTypeAny, {
421
+ type: "finish";
422
+ data: {
423
+ totalIterations: number;
424
+ hasPendingTools: boolean;
425
+ hasToolErrors: boolean;
426
+ };
427
+ requestId: string;
428
+ timestamp?: number | undefined;
429
+ }, {
430
+ type: "finish";
431
+ data: {
432
+ totalIterations: number;
433
+ hasPendingTools: boolean;
434
+ hasToolErrors: boolean;
435
+ };
436
+ requestId: string;
437
+ timestamp?: number | undefined;
438
+ }>;
439
+ /**
440
+ * Error telemetry event schema - emitted when an error occurs.
441
+ * The data field is always present per the ErrorEvent type definition.
442
+ */
443
+ export declare const errorTelemetryEventSchema: z.ZodObject<{
444
+ requestId: z.ZodString;
445
+ timestamp: z.ZodOptional<z.ZodNumber>;
446
+ } & {
447
+ type: z.ZodLiteral<"error">;
448
+ data: z.ZodObject<{
449
+ message: z.ZodString;
450
+ code: z.ZodOptional<z.ZodString>;
451
+ }, "strip", z.ZodTypeAny, {
452
+ message: string;
453
+ code?: string | undefined;
454
+ }, {
455
+ message: string;
456
+ code?: string | undefined;
457
+ }>;
458
+ }, "strip", z.ZodTypeAny, {
459
+ type: "error";
460
+ data: {
461
+ message: string;
462
+ code?: string | undefined;
463
+ };
464
+ requestId: string;
465
+ timestamp?: number | undefined;
466
+ }, {
467
+ type: "error";
468
+ data: {
469
+ message: string;
470
+ code?: string | undefined;
471
+ };
472
+ requestId: string;
473
+ timestamp?: number | undefined;
474
+ }>;
475
+ /**
476
+ * Schema for validating telemetry events.
477
+ * Discriminated union using the "type" field.
478
+ */
479
+ export declare const telemetryEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
480
+ requestId: z.ZodString;
481
+ timestamp: z.ZodOptional<z.ZodNumber>;
482
+ } & {
483
+ type: z.ZodLiteral<"connected">;
484
+ }, "strip", z.ZodTypeAny, {
485
+ type: "connected";
486
+ requestId: string;
487
+ timestamp?: number | undefined;
488
+ }, {
489
+ type: "connected";
490
+ requestId: string;
491
+ timestamp?: number | undefined;
492
+ }>, z.ZodObject<{
493
+ requestId: z.ZodString;
494
+ timestamp: z.ZodOptional<z.ZodNumber>;
495
+ } & {
496
+ type: z.ZodLiteral<"stream_end">;
497
+ }, "strip", z.ZodTypeAny, {
498
+ type: "stream_end";
499
+ requestId: string;
500
+ timestamp?: number | undefined;
501
+ }, {
502
+ type: "stream_end";
503
+ requestId: string;
504
+ timestamp?: number | undefined;
505
+ }>, z.ZodObject<{
506
+ requestId: z.ZodString;
507
+ timestamp: z.ZodOptional<z.ZodNumber>;
508
+ } & {
509
+ type: z.ZodLiteral<"iteration_start">;
510
+ data: z.ZodObject<{
511
+ iteration: z.ZodNumber;
512
+ }, "strip", z.ZodTypeAny, {
513
+ iteration: number;
514
+ }, {
515
+ iteration: number;
516
+ }>;
517
+ }, "strip", z.ZodTypeAny, {
518
+ type: "iteration_start";
519
+ data: {
520
+ iteration: number;
521
+ };
522
+ requestId: string;
523
+ timestamp?: number | undefined;
524
+ }, {
525
+ type: "iteration_start";
526
+ data: {
527
+ iteration: number;
528
+ };
529
+ requestId: string;
530
+ timestamp?: number | undefined;
531
+ }>, z.ZodObject<{
532
+ requestId: z.ZodString;
533
+ timestamp: z.ZodOptional<z.ZodNumber>;
534
+ } & {
535
+ type: z.ZodLiteral<"iteration_end">;
536
+ data: z.ZodObject<{
537
+ iteration: z.ZodNumber;
538
+ hasToolCalls: z.ZodBoolean;
539
+ shouldContinue: z.ZodBoolean;
540
+ }, "strip", z.ZodTypeAny, {
541
+ iteration: number;
542
+ hasToolCalls: boolean;
543
+ shouldContinue: boolean;
544
+ }, {
545
+ iteration: number;
546
+ hasToolCalls: boolean;
547
+ shouldContinue: boolean;
548
+ }>;
549
+ }, "strip", z.ZodTypeAny, {
550
+ type: "iteration_end";
551
+ data: {
552
+ iteration: number;
553
+ hasToolCalls: boolean;
554
+ shouldContinue: boolean;
555
+ };
556
+ requestId: string;
557
+ timestamp?: number | undefined;
558
+ }, {
559
+ type: "iteration_end";
560
+ data: {
561
+ iteration: number;
562
+ hasToolCalls: boolean;
563
+ shouldContinue: boolean;
564
+ };
565
+ requestId: string;
566
+ timestamp?: number | undefined;
567
+ }>, z.ZodObject<{
568
+ requestId: z.ZodString;
569
+ timestamp: z.ZodOptional<z.ZodNumber>;
570
+ } & {
571
+ type: z.ZodLiteral<"tool_call_batch">;
572
+ data: z.ZodObject<{
573
+ iteration: z.ZodNumber;
574
+ tools: z.ZodArray<z.ZodObject<{
575
+ toolCallId: z.ZodString;
576
+ toolName: z.ZodString;
577
+ }, "strip", z.ZodTypeAny, {
578
+ toolCallId: string;
579
+ toolName: string;
580
+ }, {
581
+ toolCallId: string;
582
+ toolName: string;
583
+ }>, "many">;
584
+ }, "strip", z.ZodTypeAny, {
585
+ iteration: number;
586
+ tools: {
587
+ toolCallId: string;
588
+ toolName: string;
589
+ }[];
590
+ }, {
591
+ iteration: number;
592
+ tools: {
593
+ toolCallId: string;
594
+ toolName: string;
595
+ }[];
596
+ }>;
597
+ }, "strip", z.ZodTypeAny, {
598
+ type: "tool_call_batch";
599
+ data: {
600
+ iteration: number;
601
+ tools: {
602
+ toolCallId: string;
603
+ toolName: string;
604
+ }[];
605
+ };
606
+ requestId: string;
607
+ timestamp?: number | undefined;
608
+ }, {
609
+ type: "tool_call_batch";
610
+ data: {
611
+ iteration: number;
612
+ tools: {
613
+ toolCallId: string;
614
+ toolName: string;
615
+ }[];
616
+ };
617
+ requestId: string;
618
+ timestamp?: number | undefined;
619
+ }>, z.ZodObject<{
620
+ requestId: z.ZodString;
621
+ timestamp: z.ZodOptional<z.ZodNumber>;
622
+ } & {
623
+ type: z.ZodLiteral<"tool_result">;
624
+ data: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
625
+ toolCallId: z.ZodString;
626
+ toolName: z.ZodString;
627
+ status: z.ZodLiteral<"pending">;
628
+ }, "strip", z.ZodTypeAny, {
629
+ status: "pending";
630
+ toolCallId: string;
631
+ toolName: string;
632
+ }, {
633
+ status: "pending";
634
+ toolCallId: string;
635
+ toolName: string;
636
+ }>, z.ZodObject<{
637
+ toolCallId: z.ZodString;
638
+ toolName: z.ZodString;
639
+ status: z.ZodLiteral<"success">;
640
+ }, "strip", z.ZodTypeAny, {
641
+ status: "success";
642
+ toolCallId: string;
643
+ toolName: string;
644
+ }, {
645
+ status: "success";
646
+ toolCallId: string;
647
+ toolName: string;
648
+ }>, z.ZodObject<{
649
+ toolCallId: z.ZodString;
650
+ toolName: z.ZodString;
651
+ status: z.ZodLiteral<"failure">;
652
+ error: z.ZodString;
653
+ }, "strip", z.ZodTypeAny, {
654
+ status: "failure";
655
+ error: string;
656
+ toolCallId: string;
657
+ toolName: string;
658
+ }, {
659
+ status: "failure";
660
+ error: string;
661
+ toolCallId: string;
662
+ toolName: string;
663
+ }>]>;
664
+ }, "strip", z.ZodTypeAny, {
665
+ type: "tool_result";
666
+ data: {
667
+ status: "pending";
668
+ toolCallId: string;
669
+ toolName: string;
670
+ } | {
671
+ status: "success";
672
+ toolCallId: string;
673
+ toolName: string;
674
+ } | {
675
+ status: "failure";
676
+ error: string;
677
+ toolCallId: string;
678
+ toolName: string;
679
+ };
680
+ requestId: string;
681
+ timestamp?: number | undefined;
682
+ }, {
683
+ type: "tool_result";
684
+ data: {
685
+ status: "pending";
686
+ toolCallId: string;
687
+ toolName: string;
688
+ } | {
689
+ status: "success";
690
+ toolCallId: string;
691
+ toolName: string;
692
+ } | {
693
+ status: "failure";
694
+ error: string;
695
+ toolCallId: string;
696
+ toolName: string;
697
+ };
698
+ requestId: string;
699
+ timestamp?: number | undefined;
700
+ }>, z.ZodObject<{
701
+ requestId: z.ZodString;
702
+ timestamp: z.ZodOptional<z.ZodNumber>;
703
+ } & {
704
+ type: z.ZodLiteral<"scratchpad_reset">;
705
+ data: z.ZodObject<{
706
+ reason: z.ZodString;
707
+ }, "strip", z.ZodTypeAny, {
708
+ reason: string;
709
+ }, {
710
+ reason: string;
711
+ }>;
712
+ }, "strip", z.ZodTypeAny, {
713
+ type: "scratchpad_reset";
714
+ data: {
715
+ reason: string;
716
+ };
717
+ requestId: string;
718
+ timestamp?: number | undefined;
719
+ }, {
720
+ type: "scratchpad_reset";
721
+ data: {
722
+ reason: string;
723
+ };
724
+ requestId: string;
725
+ timestamp?: number | undefined;
726
+ }>, z.ZodObject<{
727
+ requestId: z.ZodString;
728
+ timestamp: z.ZodOptional<z.ZodNumber>;
729
+ } & {
730
+ type: z.ZodLiteral<"llm_start">;
731
+ data: z.ZodObject<{
732
+ iteration: z.ZodNumber;
733
+ }, "strip", z.ZodTypeAny, {
734
+ iteration: number;
735
+ }, {
736
+ iteration: number;
737
+ }>;
738
+ }, "strip", z.ZodTypeAny, {
739
+ type: "llm_start";
740
+ data: {
741
+ iteration: number;
742
+ };
743
+ requestId: string;
744
+ timestamp?: number | undefined;
745
+ }, {
746
+ type: "llm_start";
747
+ data: {
748
+ iteration: number;
749
+ };
750
+ requestId: string;
751
+ timestamp?: number | undefined;
752
+ }>, z.ZodObject<{
753
+ requestId: z.ZodString;
754
+ timestamp: z.ZodOptional<z.ZodNumber>;
755
+ } & {
756
+ type: z.ZodLiteral<"llm_end">;
757
+ data: z.ZodObject<{
758
+ iteration: z.ZodNumber;
759
+ hasText: z.ZodBoolean;
760
+ toolCallCount: z.ZodNumber;
761
+ }, "strip", z.ZodTypeAny, {
762
+ iteration: number;
763
+ hasText: boolean;
764
+ toolCallCount: number;
765
+ }, {
766
+ iteration: number;
767
+ hasText: boolean;
768
+ toolCallCount: number;
769
+ }>;
770
+ }, "strip", z.ZodTypeAny, {
771
+ type: "llm_end";
772
+ data: {
773
+ iteration: number;
774
+ hasText: boolean;
775
+ toolCallCount: number;
776
+ };
777
+ requestId: string;
778
+ timestamp?: number | undefined;
779
+ }, {
780
+ type: "llm_end";
781
+ data: {
782
+ iteration: number;
783
+ hasText: boolean;
784
+ toolCallCount: number;
785
+ };
786
+ requestId: string;
787
+ timestamp?: number | undefined;
788
+ }>, z.ZodObject<{
789
+ requestId: z.ZodString;
790
+ timestamp: z.ZodOptional<z.ZodNumber>;
791
+ } & {
792
+ type: z.ZodLiteral<"text_delta">;
793
+ data: z.ZodObject<{
794
+ delta: z.ZodString;
795
+ }, "strip", z.ZodTypeAny, {
796
+ delta: string;
797
+ }, {
798
+ delta: string;
799
+ }>;
800
+ }, "strip", z.ZodTypeAny, {
801
+ type: "text_delta";
802
+ data: {
803
+ delta: string;
804
+ };
805
+ requestId: string;
806
+ timestamp?: number | undefined;
807
+ }, {
808
+ type: "text_delta";
809
+ data: {
810
+ delta: string;
811
+ };
812
+ requestId: string;
813
+ timestamp?: number | undefined;
814
+ }>, z.ZodObject<{
815
+ requestId: z.ZodString;
816
+ timestamp: z.ZodOptional<z.ZodNumber>;
817
+ } & {
818
+ type: z.ZodLiteral<"finish">;
819
+ data: z.ZodObject<{
820
+ totalIterations: z.ZodNumber;
821
+ hasPendingTools: z.ZodBoolean;
822
+ hasToolErrors: z.ZodBoolean;
823
+ }, "strip", z.ZodTypeAny, {
824
+ totalIterations: number;
825
+ hasPendingTools: boolean;
826
+ hasToolErrors: boolean;
827
+ }, {
828
+ totalIterations: number;
829
+ hasPendingTools: boolean;
830
+ hasToolErrors: boolean;
831
+ }>;
832
+ }, "strip", z.ZodTypeAny, {
833
+ type: "finish";
834
+ data: {
835
+ totalIterations: number;
836
+ hasPendingTools: boolean;
837
+ hasToolErrors: boolean;
838
+ };
839
+ requestId: string;
840
+ timestamp?: number | undefined;
841
+ }, {
842
+ type: "finish";
843
+ data: {
844
+ totalIterations: number;
845
+ hasPendingTools: boolean;
846
+ hasToolErrors: boolean;
847
+ };
848
+ requestId: string;
849
+ timestamp?: number | undefined;
850
+ }>, z.ZodObject<{
851
+ requestId: z.ZodString;
852
+ timestamp: z.ZodOptional<z.ZodNumber>;
853
+ } & {
854
+ type: z.ZodLiteral<"error">;
855
+ data: z.ZodObject<{
856
+ message: z.ZodString;
857
+ code: z.ZodOptional<z.ZodString>;
858
+ }, "strip", z.ZodTypeAny, {
859
+ message: string;
860
+ code?: string | undefined;
861
+ }, {
862
+ message: string;
863
+ code?: string | undefined;
864
+ }>;
865
+ }, "strip", z.ZodTypeAny, {
866
+ type: "error";
867
+ data: {
868
+ message: string;
869
+ code?: string | undefined;
870
+ };
871
+ requestId: string;
872
+ timestamp?: number | undefined;
873
+ }, {
874
+ type: "error";
875
+ data: {
876
+ message: string;
877
+ code?: string | undefined;
878
+ };
879
+ requestId: string;
880
+ timestamp?: number | undefined;
881
+ }>]>;
882
+ /**
883
+ * Schema for validating result events from the streaming endpoint.
884
+ * Uses type: "result" as discriminator for consistency with other event schemas.
885
+ * Also includes status: 200 for backward compatibility with CoreApiChatSuccessResponse.
886
+ */
887
+ export declare const resultEventDataSchema: z.ZodObject<{
888
+ type: z.ZodLiteral<"result">;
889
+ status: z.ZodLiteral<200>;
890
+ messages: z.ZodArray<z.ZodType<ModelMessage, z.ZodTypeDef, ModelMessage>, "many">;
891
+ text: z.ZodString;
892
+ pendingTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
893
+ type: z.ZodLiteral<"tool-call">;
894
+ toolCallId: z.ZodString;
895
+ toolName: z.ZodString;
896
+ input: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
897
+ type: z.ZodLiteral<"BatchTransactions">;
898
+ value: z.ZodArray<z.ZodObject<{
899
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
900
+ metadata: z.ZodOptional<z.ZodObject<{
901
+ explorerUrl: z.ZodOptional<z.ZodString>;
902
+ usdValue: z.ZodOptional<z.ZodString>;
903
+ }, "strip", z.ZodTypeAny, {
904
+ explorerUrl?: string | undefined;
905
+ usdValue?: string | undefined;
906
+ }, {
907
+ explorerUrl?: string | undefined;
908
+ usdValue?: string | undefined;
909
+ }>>;
910
+ }, "strip", z.ZodTypeAny, {
911
+ transaction: import("viem").PrepareTransactionRequestReturnType;
912
+ metadata?: {
913
+ explorerUrl?: string | undefined;
914
+ usdValue?: string | undefined;
915
+ } | undefined;
916
+ }, {
917
+ transaction: import("viem").PrepareTransactionRequestReturnType;
918
+ metadata?: {
919
+ explorerUrl?: string | undefined;
920
+ usdValue?: string | undefined;
921
+ } | undefined;
922
+ }>, "many">;
923
+ }, "strip", z.ZodTypeAny, {
924
+ value: {
925
+ transaction: import("viem").PrepareTransactionRequestReturnType;
926
+ metadata?: {
927
+ explorerUrl?: string | undefined;
928
+ usdValue?: string | undefined;
929
+ } | undefined;
930
+ }[];
931
+ type: "BatchTransactions";
932
+ }, {
933
+ value: {
934
+ transaction: import("viem").PrepareTransactionRequestReturnType;
935
+ metadata?: {
936
+ explorerUrl?: string | undefined;
937
+ usdValue?: string | undefined;
938
+ } | undefined;
939
+ }[];
940
+ type: "BatchTransactions";
941
+ }>, z.ZodObject<{
942
+ type: z.ZodLiteral<"SingleTransaction">;
943
+ value: z.ZodObject<{
944
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
945
+ metadata: z.ZodOptional<z.ZodObject<{
946
+ explorerUrl: z.ZodOptional<z.ZodString>;
947
+ usdValue: z.ZodOptional<z.ZodString>;
948
+ }, "strip", z.ZodTypeAny, {
949
+ explorerUrl?: string | undefined;
950
+ usdValue?: string | undefined;
951
+ }, {
952
+ explorerUrl?: string | undefined;
953
+ usdValue?: string | undefined;
954
+ }>>;
955
+ }, "strip", z.ZodTypeAny, {
956
+ transaction: import("viem").PrepareTransactionRequestReturnType;
957
+ metadata?: {
958
+ explorerUrl?: string | undefined;
959
+ usdValue?: string | undefined;
960
+ } | undefined;
961
+ }, {
962
+ transaction: import("viem").PrepareTransactionRequestReturnType;
963
+ metadata?: {
964
+ explorerUrl?: string | undefined;
965
+ usdValue?: string | undefined;
966
+ } | undefined;
967
+ }>;
968
+ }, "strip", z.ZodTypeAny, {
969
+ value: {
970
+ transaction: import("viem").PrepareTransactionRequestReturnType;
971
+ metadata?: {
972
+ explorerUrl?: string | undefined;
973
+ usdValue?: string | undefined;
974
+ } | undefined;
975
+ };
976
+ type: "SingleTransaction";
977
+ }, {
978
+ value: {
979
+ transaction: import("viem").PrepareTransactionRequestReturnType;
980
+ metadata?: {
981
+ explorerUrl?: string | undefined;
982
+ usdValue?: string | undefined;
983
+ } | undefined;
984
+ };
985
+ type: "SingleTransaction";
986
+ }>, z.ZodObject<{
987
+ type: z.ZodLiteral<"SignatureRequests">;
988
+ value: z.ZodObject<{
989
+ signatureRequests: z.ZodArray<z.ZodDiscriminatedUnion<"signMethod", [z.ZodObject<{
990
+ id: z.ZodString;
991
+ signerAddress: z.ZodString;
992
+ description: z.ZodOptional<z.ZodString>;
993
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
994
+ } & {
995
+ signMethod: z.ZodLiteral<"typedData">;
996
+ typedData: z.ZodObject<{
997
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
998
+ name: z.ZodString;
999
+ type: z.ZodString;
1000
+ }, "strip", z.ZodTypeAny, {
1001
+ type: string;
1002
+ name: string;
1003
+ }, {
1004
+ type: string;
1005
+ name: string;
1006
+ }>, "many">>;
1007
+ domain: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1008
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1009
+ primaryType: z.ZodString;
1010
+ }, "strip", z.ZodTypeAny, {
1011
+ message: Record<string, unknown>;
1012
+ types: Record<string, {
1013
+ type: string;
1014
+ name: string;
1015
+ }[]>;
1016
+ domain: Record<string, unknown>;
1017
+ primaryType: string;
1018
+ }, {
1019
+ message: Record<string, unknown>;
1020
+ types: Record<string, {
1021
+ type: string;
1022
+ name: string;
1023
+ }[]>;
1024
+ domain: Record<string, unknown>;
1025
+ primaryType: string;
1026
+ }>;
1027
+ }, "strip", z.ZodTypeAny, {
1028
+ id: string;
1029
+ signerAddress: string;
1030
+ signMethod: "typedData";
1031
+ typedData: {
1032
+ message: Record<string, unknown>;
1033
+ types: Record<string, {
1034
+ type: string;
1035
+ name: string;
1036
+ }[]>;
1037
+ domain: Record<string, unknown>;
1038
+ primaryType: string;
1039
+ };
1040
+ description?: string | undefined;
1041
+ metadata?: Record<string, unknown> | undefined;
1042
+ }, {
1043
+ id: string;
1044
+ signerAddress: string;
1045
+ signMethod: "typedData";
1046
+ typedData: {
1047
+ message: Record<string, unknown>;
1048
+ types: Record<string, {
1049
+ type: string;
1050
+ name: string;
1051
+ }[]>;
1052
+ domain: Record<string, unknown>;
1053
+ primaryType: string;
1054
+ };
1055
+ description?: string | undefined;
1056
+ metadata?: Record<string, unknown> | undefined;
1057
+ }>, z.ZodObject<{
1058
+ id: z.ZodString;
1059
+ signerAddress: z.ZodString;
1060
+ description: z.ZodOptional<z.ZodString>;
1061
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1062
+ } & {
1063
+ signMethod: z.ZodLiteral<"message">;
1064
+ rawHash: z.ZodString;
1065
+ }, "strip", z.ZodTypeAny, {
1066
+ id: string;
1067
+ signerAddress: string;
1068
+ signMethod: "message";
1069
+ rawHash: string;
1070
+ description?: string | undefined;
1071
+ metadata?: Record<string, unknown> | undefined;
1072
+ }, {
1073
+ id: string;
1074
+ signerAddress: string;
1075
+ signMethod: "message";
1076
+ rawHash: string;
1077
+ description?: string | undefined;
1078
+ metadata?: Record<string, unknown> | undefined;
1079
+ }>]>, "many">;
1080
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1081
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1082
+ metadata: z.ZodOptional<z.ZodObject<{
1083
+ explorerUrl: z.ZodOptional<z.ZodString>;
1084
+ usdValue: z.ZodOptional<z.ZodString>;
1085
+ }, "strip", z.ZodTypeAny, {
1086
+ explorerUrl?: string | undefined;
1087
+ usdValue?: string | undefined;
1088
+ }, {
1089
+ explorerUrl?: string | undefined;
1090
+ usdValue?: string | undefined;
1091
+ }>>;
1092
+ }, "strip", z.ZodTypeAny, {
1093
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1094
+ metadata?: {
1095
+ explorerUrl?: string | undefined;
1096
+ usdValue?: string | undefined;
1097
+ } | undefined;
1098
+ }, {
1099
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1100
+ metadata?: {
1101
+ explorerUrl?: string | undefined;
1102
+ usdValue?: string | undefined;
1103
+ } | undefined;
1104
+ }>, "many">>;
1105
+ }, "strip", z.ZodTypeAny, {
1106
+ signatureRequests: ({
1107
+ id: string;
1108
+ signerAddress: string;
1109
+ signMethod: "typedData";
1110
+ typedData: {
1111
+ message: Record<string, unknown>;
1112
+ types: Record<string, {
1113
+ type: string;
1114
+ name: string;
1115
+ }[]>;
1116
+ domain: Record<string, unknown>;
1117
+ primaryType: string;
1118
+ };
1119
+ description?: string | undefined;
1120
+ metadata?: Record<string, unknown> | undefined;
1121
+ } | {
1122
+ id: string;
1123
+ signerAddress: string;
1124
+ signMethod: "message";
1125
+ rawHash: string;
1126
+ description?: string | undefined;
1127
+ metadata?: Record<string, unknown> | undefined;
1128
+ })[];
1129
+ transactions?: {
1130
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1131
+ metadata?: {
1132
+ explorerUrl?: string | undefined;
1133
+ usdValue?: string | undefined;
1134
+ } | undefined;
1135
+ }[] | undefined;
1136
+ }, {
1137
+ signatureRequests: ({
1138
+ id: string;
1139
+ signerAddress: string;
1140
+ signMethod: "typedData";
1141
+ typedData: {
1142
+ message: Record<string, unknown>;
1143
+ types: Record<string, {
1144
+ type: string;
1145
+ name: string;
1146
+ }[]>;
1147
+ domain: Record<string, unknown>;
1148
+ primaryType: string;
1149
+ };
1150
+ description?: string | undefined;
1151
+ metadata?: Record<string, unknown> | undefined;
1152
+ } | {
1153
+ id: string;
1154
+ signerAddress: string;
1155
+ signMethod: "message";
1156
+ rawHash: string;
1157
+ description?: string | undefined;
1158
+ metadata?: Record<string, unknown> | undefined;
1159
+ })[];
1160
+ transactions?: {
1161
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1162
+ metadata?: {
1163
+ explorerUrl?: string | undefined;
1164
+ usdValue?: string | undefined;
1165
+ } | undefined;
1166
+ }[] | undefined;
1167
+ }>;
1168
+ }, "strip", z.ZodTypeAny, {
1169
+ value: {
1170
+ signatureRequests: ({
1171
+ id: string;
1172
+ signerAddress: string;
1173
+ signMethod: "typedData";
1174
+ typedData: {
1175
+ message: Record<string, unknown>;
1176
+ types: Record<string, {
1177
+ type: string;
1178
+ name: string;
1179
+ }[]>;
1180
+ domain: Record<string, unknown>;
1181
+ primaryType: string;
1182
+ };
1183
+ description?: string | undefined;
1184
+ metadata?: Record<string, unknown> | undefined;
1185
+ } | {
1186
+ id: string;
1187
+ signerAddress: string;
1188
+ signMethod: "message";
1189
+ rawHash: string;
1190
+ description?: string | undefined;
1191
+ metadata?: Record<string, unknown> | undefined;
1192
+ })[];
1193
+ transactions?: {
1194
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1195
+ metadata?: {
1196
+ explorerUrl?: string | undefined;
1197
+ usdValue?: string | undefined;
1198
+ } | undefined;
1199
+ }[] | undefined;
1200
+ };
1201
+ type: "SignatureRequests";
1202
+ }, {
1203
+ value: {
1204
+ signatureRequests: ({
1205
+ id: string;
1206
+ signerAddress: string;
1207
+ signMethod: "typedData";
1208
+ typedData: {
1209
+ message: Record<string, unknown>;
1210
+ types: Record<string, {
1211
+ type: string;
1212
+ name: string;
1213
+ }[]>;
1214
+ domain: Record<string, unknown>;
1215
+ primaryType: string;
1216
+ };
1217
+ description?: string | undefined;
1218
+ metadata?: Record<string, unknown> | undefined;
1219
+ } | {
1220
+ id: string;
1221
+ signerAddress: string;
1222
+ signMethod: "message";
1223
+ rawHash: string;
1224
+ description?: string | undefined;
1225
+ metadata?: Record<string, unknown> | undefined;
1226
+ })[];
1227
+ transactions?: {
1228
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1229
+ metadata?: {
1230
+ explorerUrl?: string | undefined;
1231
+ usdValue?: string | undefined;
1232
+ } | undefined;
1233
+ }[] | undefined;
1234
+ };
1235
+ type: "SignatureRequests";
1236
+ }>]>;
1237
+ }, "strict", z.ZodTypeAny, {
1238
+ type: "tool-call";
1239
+ input: {
1240
+ value: {
1241
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1242
+ metadata?: {
1243
+ explorerUrl?: string | undefined;
1244
+ usdValue?: string | undefined;
1245
+ } | undefined;
1246
+ }[];
1247
+ type: "BatchTransactions";
1248
+ } | {
1249
+ value: {
1250
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1251
+ metadata?: {
1252
+ explorerUrl?: string | undefined;
1253
+ usdValue?: string | undefined;
1254
+ } | undefined;
1255
+ };
1256
+ type: "SingleTransaction";
1257
+ } | {
1258
+ value: {
1259
+ signatureRequests: ({
1260
+ id: string;
1261
+ signerAddress: string;
1262
+ signMethod: "typedData";
1263
+ typedData: {
1264
+ message: Record<string, unknown>;
1265
+ types: Record<string, {
1266
+ type: string;
1267
+ name: string;
1268
+ }[]>;
1269
+ domain: Record<string, unknown>;
1270
+ primaryType: string;
1271
+ };
1272
+ description?: string | undefined;
1273
+ metadata?: Record<string, unknown> | undefined;
1274
+ } | {
1275
+ id: string;
1276
+ signerAddress: string;
1277
+ signMethod: "message";
1278
+ rawHash: string;
1279
+ description?: string | undefined;
1280
+ metadata?: Record<string, unknown> | undefined;
1281
+ })[];
1282
+ transactions?: {
1283
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1284
+ metadata?: {
1285
+ explorerUrl?: string | undefined;
1286
+ usdValue?: string | undefined;
1287
+ } | undefined;
1288
+ }[] | undefined;
1289
+ };
1290
+ type: "SignatureRequests";
1291
+ };
1292
+ toolCallId: string;
1293
+ toolName: string;
1294
+ }, {
1295
+ type: "tool-call";
1296
+ input: {
1297
+ value: {
1298
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1299
+ metadata?: {
1300
+ explorerUrl?: string | undefined;
1301
+ usdValue?: string | undefined;
1302
+ } | undefined;
1303
+ }[];
1304
+ type: "BatchTransactions";
1305
+ } | {
1306
+ value: {
1307
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1308
+ metadata?: {
1309
+ explorerUrl?: string | undefined;
1310
+ usdValue?: string | undefined;
1311
+ } | undefined;
1312
+ };
1313
+ type: "SingleTransaction";
1314
+ } | {
1315
+ value: {
1316
+ signatureRequests: ({
1317
+ id: string;
1318
+ signerAddress: string;
1319
+ signMethod: "typedData";
1320
+ typedData: {
1321
+ message: Record<string, unknown>;
1322
+ types: Record<string, {
1323
+ type: string;
1324
+ name: string;
1325
+ }[]>;
1326
+ domain: Record<string, unknown>;
1327
+ primaryType: string;
1328
+ };
1329
+ description?: string | undefined;
1330
+ metadata?: Record<string, unknown> | undefined;
1331
+ } | {
1332
+ id: string;
1333
+ signerAddress: string;
1334
+ signMethod: "message";
1335
+ rawHash: string;
1336
+ description?: string | undefined;
1337
+ metadata?: Record<string, unknown> | undefined;
1338
+ })[];
1339
+ transactions?: {
1340
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1341
+ metadata?: {
1342
+ explorerUrl?: string | undefined;
1343
+ usdValue?: string | undefined;
1344
+ } | undefined;
1345
+ }[] | undefined;
1346
+ };
1347
+ type: "SignatureRequests";
1348
+ };
1349
+ toolCallId: string;
1350
+ toolName: string;
1351
+ }>, "many">>;
1352
+ incompleteTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1353
+ toolCallId: z.ZodString;
1354
+ toolName: z.ZodString;
1355
+ toolInput: z.ZodOptional<z.ZodUnknown>;
1356
+ }, "strip", z.ZodTypeAny, {
1357
+ toolCallId: string;
1358
+ toolName: string;
1359
+ toolInput?: unknown;
1360
+ }, {
1361
+ toolCallId: string;
1362
+ toolName: string;
1363
+ toolInput?: unknown;
1364
+ }>, "many">>;
1365
+ toolErrors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1366
+ id: z.ZodString;
1367
+ name: z.ZodString;
1368
+ data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1369
+ type: z.ZodLiteral<"input">;
1370
+ errors: z.ZodArray<z.ZodObject<{
1371
+ path: z.ZodString;
1372
+ message: z.ZodString;
1373
+ }, "strict", z.ZodTypeAny, {
1374
+ path: string;
1375
+ message: string;
1376
+ }, {
1377
+ path: string;
1378
+ message: string;
1379
+ }>, "many">;
1380
+ }, "strict", z.ZodTypeAny, {
1381
+ type: "input";
1382
+ errors: {
1383
+ path: string;
1384
+ message: string;
1385
+ }[];
1386
+ }, {
1387
+ type: "input";
1388
+ errors: {
1389
+ path: string;
1390
+ message: string;
1391
+ }[];
1392
+ }>, z.ZodObject<{
1393
+ type: z.ZodLiteral<"execution">;
1394
+ message: z.ZodString;
1395
+ details: z.ZodOptional<z.ZodUnknown>;
1396
+ }, "strict", z.ZodTypeAny, {
1397
+ message: string;
1398
+ type: "execution";
1399
+ details?: unknown;
1400
+ }, {
1401
+ message: string;
1402
+ type: "execution";
1403
+ details?: unknown;
1404
+ }>]>;
1405
+ }, "strict", z.ZodTypeAny, {
1406
+ id: string;
1407
+ name: string;
1408
+ data: {
1409
+ type: "input";
1410
+ errors: {
1411
+ path: string;
1412
+ message: string;
1413
+ }[];
1414
+ } | {
1415
+ message: string;
1416
+ type: "execution";
1417
+ details?: unknown;
1418
+ };
1419
+ }, {
1420
+ id: string;
1421
+ name: string;
1422
+ data: {
1423
+ type: "input";
1424
+ errors: {
1425
+ path: string;
1426
+ message: string;
1427
+ }[];
1428
+ } | {
1429
+ message: string;
1430
+ type: "execution";
1431
+ details?: unknown;
1432
+ };
1433
+ }>, "many">>;
1434
+ requestId: z.ZodString;
1435
+ }, "strip", z.ZodTypeAny, {
1436
+ type: "result";
1437
+ status: 200;
1438
+ text: string;
1439
+ messages: ModelMessage[];
1440
+ requestId: string;
1441
+ pendingTools?: {
1442
+ type: "tool-call";
1443
+ input: {
1444
+ value: {
1445
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1446
+ metadata?: {
1447
+ explorerUrl?: string | undefined;
1448
+ usdValue?: string | undefined;
1449
+ } | undefined;
1450
+ }[];
1451
+ type: "BatchTransactions";
1452
+ } | {
1453
+ value: {
1454
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1455
+ metadata?: {
1456
+ explorerUrl?: string | undefined;
1457
+ usdValue?: string | undefined;
1458
+ } | undefined;
1459
+ };
1460
+ type: "SingleTransaction";
1461
+ } | {
1462
+ value: {
1463
+ signatureRequests: ({
1464
+ id: string;
1465
+ signerAddress: string;
1466
+ signMethod: "typedData";
1467
+ typedData: {
1468
+ message: Record<string, unknown>;
1469
+ types: Record<string, {
1470
+ type: string;
1471
+ name: string;
1472
+ }[]>;
1473
+ domain: Record<string, unknown>;
1474
+ primaryType: string;
1475
+ };
1476
+ description?: string | undefined;
1477
+ metadata?: Record<string, unknown> | undefined;
1478
+ } | {
1479
+ id: string;
1480
+ signerAddress: string;
1481
+ signMethod: "message";
1482
+ rawHash: string;
1483
+ description?: string | undefined;
1484
+ metadata?: Record<string, unknown> | undefined;
1485
+ })[];
1486
+ transactions?: {
1487
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1488
+ metadata?: {
1489
+ explorerUrl?: string | undefined;
1490
+ usdValue?: string | undefined;
1491
+ } | undefined;
1492
+ }[] | undefined;
1493
+ };
1494
+ type: "SignatureRequests";
1495
+ };
1496
+ toolCallId: string;
1497
+ toolName: string;
1498
+ }[] | undefined;
1499
+ incompleteTools?: {
1500
+ toolCallId: string;
1501
+ toolName: string;
1502
+ toolInput?: unknown;
1503
+ }[] | undefined;
1504
+ toolErrors?: {
1505
+ id: string;
1506
+ name: string;
1507
+ data: {
1508
+ type: "input";
1509
+ errors: {
1510
+ path: string;
1511
+ message: string;
1512
+ }[];
1513
+ } | {
1514
+ message: string;
1515
+ type: "execution";
1516
+ details?: unknown;
1517
+ };
1518
+ }[] | undefined;
1519
+ }, {
1520
+ type: "result";
1521
+ status: 200;
1522
+ text: string;
1523
+ messages: ModelMessage[];
1524
+ requestId: string;
1525
+ pendingTools?: {
1526
+ type: "tool-call";
1527
+ input: {
1528
+ value: {
1529
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1530
+ metadata?: {
1531
+ explorerUrl?: string | undefined;
1532
+ usdValue?: string | undefined;
1533
+ } | undefined;
1534
+ }[];
1535
+ type: "BatchTransactions";
1536
+ } | {
1537
+ value: {
1538
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1539
+ metadata?: {
1540
+ explorerUrl?: string | undefined;
1541
+ usdValue?: string | undefined;
1542
+ } | undefined;
1543
+ };
1544
+ type: "SingleTransaction";
1545
+ } | {
1546
+ value: {
1547
+ signatureRequests: ({
1548
+ id: string;
1549
+ signerAddress: string;
1550
+ signMethod: "typedData";
1551
+ typedData: {
1552
+ message: Record<string, unknown>;
1553
+ types: Record<string, {
1554
+ type: string;
1555
+ name: string;
1556
+ }[]>;
1557
+ domain: Record<string, unknown>;
1558
+ primaryType: string;
1559
+ };
1560
+ description?: string | undefined;
1561
+ metadata?: Record<string, unknown> | undefined;
1562
+ } | {
1563
+ id: string;
1564
+ signerAddress: string;
1565
+ signMethod: "message";
1566
+ rawHash: string;
1567
+ description?: string | undefined;
1568
+ metadata?: Record<string, unknown> | undefined;
1569
+ })[];
1570
+ transactions?: {
1571
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1572
+ metadata?: {
1573
+ explorerUrl?: string | undefined;
1574
+ usdValue?: string | undefined;
1575
+ } | undefined;
1576
+ }[] | undefined;
1577
+ };
1578
+ type: "SignatureRequests";
1579
+ };
1580
+ toolCallId: string;
1581
+ toolName: string;
1582
+ }[] | undefined;
1583
+ incompleteTools?: {
1584
+ toolCallId: string;
1585
+ toolName: string;
1586
+ toolInput?: unknown;
1587
+ }[] | undefined;
1588
+ toolErrors?: {
1589
+ id: string;
1590
+ name: string;
1591
+ data: {
1592
+ type: "input";
1593
+ errors: {
1594
+ path: string;
1595
+ message: string;
1596
+ }[];
1597
+ } | {
1598
+ message: string;
1599
+ type: "execution";
1600
+ details?: unknown;
1601
+ };
1602
+ }[] | undefined;
1603
+ }>;
1604
+ /**
1605
+ * Schema for validating error events from the streaming endpoint
1606
+ */
1607
+ export declare const errorEventDataSchema: z.ZodObject<{
1608
+ type: z.ZodLiteral<"error">;
1609
+ requestId: z.ZodString;
1610
+ timestamp: z.ZodOptional<z.ZodNumber>;
1611
+ data: z.ZodObject<{
1612
+ message: z.ZodString;
1613
+ code: z.ZodOptional<z.ZodString>;
1614
+ }, "strip", z.ZodTypeAny, {
1615
+ message: string;
1616
+ code?: string | undefined;
1617
+ }, {
1618
+ message: string;
1619
+ code?: string | undefined;
1620
+ }>;
1621
+ }, "strip", z.ZodTypeAny, {
1622
+ type: "error";
1623
+ data: {
1624
+ message: string;
1625
+ code?: string | undefined;
1626
+ };
1627
+ requestId: string;
1628
+ timestamp?: number | undefined;
1629
+ }, {
1630
+ type: "error";
1631
+ data: {
1632
+ message: string;
1633
+ code?: string | undefined;
1634
+ };
1635
+ requestId: string;
1636
+ timestamp?: number | undefined;
1637
+ }>;
1638
+ /**
1639
+ * Schema for validating stream_end events from the streaming endpoint
1640
+ */
1641
+ export declare const streamEndEventDataSchema: z.ZodObject<{
1642
+ type: z.ZodLiteral<"stream_end">;
1643
+ requestId: z.ZodString;
1644
+ timestamp: z.ZodOptional<z.ZodNumber>;
1645
+ }, "strip", z.ZodTypeAny, {
1646
+ type: "stream_end";
1647
+ requestId: string;
1648
+ timestamp?: number | undefined;
1649
+ }, {
1650
+ type: "stream_end";
1651
+ requestId: string;
1652
+ timestamp?: number | undefined;
1653
+ }>;
1654
+ /**
1655
+ * Unified discriminated union for all stream event data types.
1656
+ * Uses "type" as the discriminator field for runtime validation.
1657
+ */
1658
+ export declare const streamEventDataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1659
+ type: z.ZodLiteral<"result">;
1660
+ status: z.ZodLiteral<200>;
1661
+ messages: z.ZodArray<z.ZodType<ModelMessage, z.ZodTypeDef, ModelMessage>, "many">;
1662
+ text: z.ZodString;
1663
+ pendingTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
1664
+ type: z.ZodLiteral<"tool-call">;
1665
+ toolCallId: z.ZodString;
1666
+ toolName: z.ZodString;
1667
+ input: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1668
+ type: z.ZodLiteral<"BatchTransactions">;
1669
+ value: z.ZodArray<z.ZodObject<{
1670
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1671
+ metadata: z.ZodOptional<z.ZodObject<{
1672
+ explorerUrl: z.ZodOptional<z.ZodString>;
1673
+ usdValue: z.ZodOptional<z.ZodString>;
1674
+ }, "strip", z.ZodTypeAny, {
1675
+ explorerUrl?: string | undefined;
1676
+ usdValue?: string | undefined;
1677
+ }, {
1678
+ explorerUrl?: string | undefined;
1679
+ usdValue?: string | undefined;
1680
+ }>>;
1681
+ }, "strip", z.ZodTypeAny, {
1682
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1683
+ metadata?: {
1684
+ explorerUrl?: string | undefined;
1685
+ usdValue?: string | undefined;
1686
+ } | undefined;
1687
+ }, {
1688
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1689
+ metadata?: {
1690
+ explorerUrl?: string | undefined;
1691
+ usdValue?: string | undefined;
1692
+ } | undefined;
1693
+ }>, "many">;
1694
+ }, "strip", z.ZodTypeAny, {
1695
+ value: {
1696
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1697
+ metadata?: {
1698
+ explorerUrl?: string | undefined;
1699
+ usdValue?: string | undefined;
1700
+ } | undefined;
1701
+ }[];
1702
+ type: "BatchTransactions";
1703
+ }, {
1704
+ value: {
1705
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1706
+ metadata?: {
1707
+ explorerUrl?: string | undefined;
1708
+ usdValue?: string | undefined;
1709
+ } | undefined;
1710
+ }[];
1711
+ type: "BatchTransactions";
1712
+ }>, z.ZodObject<{
1713
+ type: z.ZodLiteral<"SingleTransaction">;
1714
+ value: z.ZodObject<{
1715
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1716
+ metadata: z.ZodOptional<z.ZodObject<{
1717
+ explorerUrl: z.ZodOptional<z.ZodString>;
1718
+ usdValue: z.ZodOptional<z.ZodString>;
1719
+ }, "strip", z.ZodTypeAny, {
1720
+ explorerUrl?: string | undefined;
1721
+ usdValue?: string | undefined;
1722
+ }, {
1723
+ explorerUrl?: string | undefined;
1724
+ usdValue?: string | undefined;
1725
+ }>>;
1726
+ }, "strip", z.ZodTypeAny, {
1727
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1728
+ metadata?: {
1729
+ explorerUrl?: string | undefined;
1730
+ usdValue?: string | undefined;
1731
+ } | undefined;
1732
+ }, {
1733
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1734
+ metadata?: {
1735
+ explorerUrl?: string | undefined;
1736
+ usdValue?: string | undefined;
1737
+ } | undefined;
1738
+ }>;
1739
+ }, "strip", z.ZodTypeAny, {
1740
+ value: {
1741
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1742
+ metadata?: {
1743
+ explorerUrl?: string | undefined;
1744
+ usdValue?: string | undefined;
1745
+ } | undefined;
1746
+ };
1747
+ type: "SingleTransaction";
1748
+ }, {
1749
+ value: {
1750
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1751
+ metadata?: {
1752
+ explorerUrl?: string | undefined;
1753
+ usdValue?: string | undefined;
1754
+ } | undefined;
1755
+ };
1756
+ type: "SingleTransaction";
1757
+ }>, z.ZodObject<{
1758
+ type: z.ZodLiteral<"SignatureRequests">;
1759
+ value: z.ZodObject<{
1760
+ signatureRequests: z.ZodArray<z.ZodDiscriminatedUnion<"signMethod", [z.ZodObject<{
1761
+ id: z.ZodString;
1762
+ signerAddress: z.ZodString;
1763
+ description: z.ZodOptional<z.ZodString>;
1764
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1765
+ } & {
1766
+ signMethod: z.ZodLiteral<"typedData">;
1767
+ typedData: z.ZodObject<{
1768
+ types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1769
+ name: z.ZodString;
1770
+ type: z.ZodString;
1771
+ }, "strip", z.ZodTypeAny, {
1772
+ type: string;
1773
+ name: string;
1774
+ }, {
1775
+ type: string;
1776
+ name: string;
1777
+ }>, "many">>;
1778
+ domain: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1779
+ message: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1780
+ primaryType: z.ZodString;
1781
+ }, "strip", z.ZodTypeAny, {
1782
+ message: Record<string, unknown>;
1783
+ types: Record<string, {
1784
+ type: string;
1785
+ name: string;
1786
+ }[]>;
1787
+ domain: Record<string, unknown>;
1788
+ primaryType: string;
1789
+ }, {
1790
+ message: Record<string, unknown>;
1791
+ types: Record<string, {
1792
+ type: string;
1793
+ name: string;
1794
+ }[]>;
1795
+ domain: Record<string, unknown>;
1796
+ primaryType: string;
1797
+ }>;
1798
+ }, "strip", z.ZodTypeAny, {
1799
+ id: string;
1800
+ signerAddress: string;
1801
+ signMethod: "typedData";
1802
+ typedData: {
1803
+ message: Record<string, unknown>;
1804
+ types: Record<string, {
1805
+ type: string;
1806
+ name: string;
1807
+ }[]>;
1808
+ domain: Record<string, unknown>;
1809
+ primaryType: string;
1810
+ };
1811
+ description?: string | undefined;
1812
+ metadata?: Record<string, unknown> | undefined;
1813
+ }, {
1814
+ id: string;
1815
+ signerAddress: string;
1816
+ signMethod: "typedData";
1817
+ typedData: {
1818
+ message: Record<string, unknown>;
1819
+ types: Record<string, {
1820
+ type: string;
1821
+ name: string;
1822
+ }[]>;
1823
+ domain: Record<string, unknown>;
1824
+ primaryType: string;
1825
+ };
1826
+ description?: string | undefined;
1827
+ metadata?: Record<string, unknown> | undefined;
1828
+ }>, z.ZodObject<{
1829
+ id: z.ZodString;
1830
+ signerAddress: z.ZodString;
1831
+ description: z.ZodOptional<z.ZodString>;
1832
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1833
+ } & {
1834
+ signMethod: z.ZodLiteral<"message">;
1835
+ rawHash: z.ZodString;
1836
+ }, "strip", z.ZodTypeAny, {
1837
+ id: string;
1838
+ signerAddress: string;
1839
+ signMethod: "message";
1840
+ rawHash: string;
1841
+ description?: string | undefined;
1842
+ metadata?: Record<string, unknown> | undefined;
1843
+ }, {
1844
+ id: string;
1845
+ signerAddress: string;
1846
+ signMethod: "message";
1847
+ rawHash: string;
1848
+ description?: string | undefined;
1849
+ metadata?: Record<string, unknown> | undefined;
1850
+ }>]>, "many">;
1851
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1852
+ transaction: z.ZodType<import("viem").PrepareTransactionRequestReturnType>;
1853
+ metadata: z.ZodOptional<z.ZodObject<{
1854
+ explorerUrl: z.ZodOptional<z.ZodString>;
1855
+ usdValue: z.ZodOptional<z.ZodString>;
1856
+ }, "strip", z.ZodTypeAny, {
1857
+ explorerUrl?: string | undefined;
1858
+ usdValue?: string | undefined;
1859
+ }, {
1860
+ explorerUrl?: string | undefined;
1861
+ usdValue?: string | undefined;
1862
+ }>>;
1863
+ }, "strip", z.ZodTypeAny, {
1864
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1865
+ metadata?: {
1866
+ explorerUrl?: string | undefined;
1867
+ usdValue?: string | undefined;
1868
+ } | undefined;
1869
+ }, {
1870
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1871
+ metadata?: {
1872
+ explorerUrl?: string | undefined;
1873
+ usdValue?: string | undefined;
1874
+ } | undefined;
1875
+ }>, "many">>;
1876
+ }, "strip", z.ZodTypeAny, {
1877
+ signatureRequests: ({
1878
+ id: string;
1879
+ signerAddress: string;
1880
+ signMethod: "typedData";
1881
+ typedData: {
1882
+ message: Record<string, unknown>;
1883
+ types: Record<string, {
1884
+ type: string;
1885
+ name: string;
1886
+ }[]>;
1887
+ domain: Record<string, unknown>;
1888
+ primaryType: string;
1889
+ };
1890
+ description?: string | undefined;
1891
+ metadata?: Record<string, unknown> | undefined;
1892
+ } | {
1893
+ id: string;
1894
+ signerAddress: string;
1895
+ signMethod: "message";
1896
+ rawHash: string;
1897
+ description?: string | undefined;
1898
+ metadata?: Record<string, unknown> | undefined;
1899
+ })[];
1900
+ transactions?: {
1901
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1902
+ metadata?: {
1903
+ explorerUrl?: string | undefined;
1904
+ usdValue?: string | undefined;
1905
+ } | undefined;
1906
+ }[] | undefined;
1907
+ }, {
1908
+ signatureRequests: ({
1909
+ id: string;
1910
+ signerAddress: string;
1911
+ signMethod: "typedData";
1912
+ typedData: {
1913
+ message: Record<string, unknown>;
1914
+ types: Record<string, {
1915
+ type: string;
1916
+ name: string;
1917
+ }[]>;
1918
+ domain: Record<string, unknown>;
1919
+ primaryType: string;
1920
+ };
1921
+ description?: string | undefined;
1922
+ metadata?: Record<string, unknown> | undefined;
1923
+ } | {
1924
+ id: string;
1925
+ signerAddress: string;
1926
+ signMethod: "message";
1927
+ rawHash: string;
1928
+ description?: string | undefined;
1929
+ metadata?: Record<string, unknown> | undefined;
1930
+ })[];
1931
+ transactions?: {
1932
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1933
+ metadata?: {
1934
+ explorerUrl?: string | undefined;
1935
+ usdValue?: string | undefined;
1936
+ } | undefined;
1937
+ }[] | undefined;
1938
+ }>;
1939
+ }, "strip", z.ZodTypeAny, {
1940
+ value: {
1941
+ signatureRequests: ({
1942
+ id: string;
1943
+ signerAddress: string;
1944
+ signMethod: "typedData";
1945
+ typedData: {
1946
+ message: Record<string, unknown>;
1947
+ types: Record<string, {
1948
+ type: string;
1949
+ name: string;
1950
+ }[]>;
1951
+ domain: Record<string, unknown>;
1952
+ primaryType: string;
1953
+ };
1954
+ description?: string | undefined;
1955
+ metadata?: Record<string, unknown> | undefined;
1956
+ } | {
1957
+ id: string;
1958
+ signerAddress: string;
1959
+ signMethod: "message";
1960
+ rawHash: string;
1961
+ description?: string | undefined;
1962
+ metadata?: Record<string, unknown> | undefined;
1963
+ })[];
1964
+ transactions?: {
1965
+ transaction: import("viem").PrepareTransactionRequestReturnType;
1966
+ metadata?: {
1967
+ explorerUrl?: string | undefined;
1968
+ usdValue?: string | undefined;
1969
+ } | undefined;
1970
+ }[] | undefined;
1971
+ };
1972
+ type: "SignatureRequests";
1973
+ }, {
1974
+ value: {
1975
+ signatureRequests: ({
1976
+ id: string;
1977
+ signerAddress: string;
1978
+ signMethod: "typedData";
1979
+ typedData: {
1980
+ message: Record<string, unknown>;
1981
+ types: Record<string, {
1982
+ type: string;
1983
+ name: string;
1984
+ }[]>;
1985
+ domain: Record<string, unknown>;
1986
+ primaryType: string;
1987
+ };
1988
+ description?: string | undefined;
1989
+ metadata?: Record<string, unknown> | undefined;
1990
+ } | {
1991
+ id: string;
1992
+ signerAddress: string;
1993
+ signMethod: "message";
1994
+ rawHash: string;
1995
+ description?: string | undefined;
1996
+ metadata?: Record<string, unknown> | undefined;
1997
+ })[];
1998
+ transactions?: {
1999
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2000
+ metadata?: {
2001
+ explorerUrl?: string | undefined;
2002
+ usdValue?: string | undefined;
2003
+ } | undefined;
2004
+ }[] | undefined;
2005
+ };
2006
+ type: "SignatureRequests";
2007
+ }>]>;
2008
+ }, "strict", z.ZodTypeAny, {
2009
+ type: "tool-call";
2010
+ input: {
2011
+ value: {
2012
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2013
+ metadata?: {
2014
+ explorerUrl?: string | undefined;
2015
+ usdValue?: string | undefined;
2016
+ } | undefined;
2017
+ }[];
2018
+ type: "BatchTransactions";
2019
+ } | {
2020
+ value: {
2021
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2022
+ metadata?: {
2023
+ explorerUrl?: string | undefined;
2024
+ usdValue?: string | undefined;
2025
+ } | undefined;
2026
+ };
2027
+ type: "SingleTransaction";
2028
+ } | {
2029
+ value: {
2030
+ signatureRequests: ({
2031
+ id: string;
2032
+ signerAddress: string;
2033
+ signMethod: "typedData";
2034
+ typedData: {
2035
+ message: Record<string, unknown>;
2036
+ types: Record<string, {
2037
+ type: string;
2038
+ name: string;
2039
+ }[]>;
2040
+ domain: Record<string, unknown>;
2041
+ primaryType: string;
2042
+ };
2043
+ description?: string | undefined;
2044
+ metadata?: Record<string, unknown> | undefined;
2045
+ } | {
2046
+ id: string;
2047
+ signerAddress: string;
2048
+ signMethod: "message";
2049
+ rawHash: string;
2050
+ description?: string | undefined;
2051
+ metadata?: Record<string, unknown> | undefined;
2052
+ })[];
2053
+ transactions?: {
2054
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2055
+ metadata?: {
2056
+ explorerUrl?: string | undefined;
2057
+ usdValue?: string | undefined;
2058
+ } | undefined;
2059
+ }[] | undefined;
2060
+ };
2061
+ type: "SignatureRequests";
2062
+ };
2063
+ toolCallId: string;
2064
+ toolName: string;
2065
+ }, {
2066
+ type: "tool-call";
2067
+ input: {
2068
+ value: {
2069
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2070
+ metadata?: {
2071
+ explorerUrl?: string | undefined;
2072
+ usdValue?: string | undefined;
2073
+ } | undefined;
2074
+ }[];
2075
+ type: "BatchTransactions";
2076
+ } | {
2077
+ value: {
2078
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2079
+ metadata?: {
2080
+ explorerUrl?: string | undefined;
2081
+ usdValue?: string | undefined;
2082
+ } | undefined;
2083
+ };
2084
+ type: "SingleTransaction";
2085
+ } | {
2086
+ value: {
2087
+ signatureRequests: ({
2088
+ id: string;
2089
+ signerAddress: string;
2090
+ signMethod: "typedData";
2091
+ typedData: {
2092
+ message: Record<string, unknown>;
2093
+ types: Record<string, {
2094
+ type: string;
2095
+ name: string;
2096
+ }[]>;
2097
+ domain: Record<string, unknown>;
2098
+ primaryType: string;
2099
+ };
2100
+ description?: string | undefined;
2101
+ metadata?: Record<string, unknown> | undefined;
2102
+ } | {
2103
+ id: string;
2104
+ signerAddress: string;
2105
+ signMethod: "message";
2106
+ rawHash: string;
2107
+ description?: string | undefined;
2108
+ metadata?: Record<string, unknown> | undefined;
2109
+ })[];
2110
+ transactions?: {
2111
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2112
+ metadata?: {
2113
+ explorerUrl?: string | undefined;
2114
+ usdValue?: string | undefined;
2115
+ } | undefined;
2116
+ }[] | undefined;
2117
+ };
2118
+ type: "SignatureRequests";
2119
+ };
2120
+ toolCallId: string;
2121
+ toolName: string;
2122
+ }>, "many">>;
2123
+ incompleteTools: z.ZodOptional<z.ZodArray<z.ZodObject<{
2124
+ toolCallId: z.ZodString;
2125
+ toolName: z.ZodString;
2126
+ toolInput: z.ZodOptional<z.ZodUnknown>;
2127
+ }, "strip", z.ZodTypeAny, {
2128
+ toolCallId: string;
2129
+ toolName: string;
2130
+ toolInput?: unknown;
2131
+ }, {
2132
+ toolCallId: string;
2133
+ toolName: string;
2134
+ toolInput?: unknown;
2135
+ }>, "many">>;
2136
+ toolErrors: z.ZodOptional<z.ZodArray<z.ZodObject<{
2137
+ id: z.ZodString;
2138
+ name: z.ZodString;
2139
+ data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2140
+ type: z.ZodLiteral<"input">;
2141
+ errors: z.ZodArray<z.ZodObject<{
2142
+ path: z.ZodString;
2143
+ message: z.ZodString;
2144
+ }, "strict", z.ZodTypeAny, {
2145
+ path: string;
2146
+ message: string;
2147
+ }, {
2148
+ path: string;
2149
+ message: string;
2150
+ }>, "many">;
2151
+ }, "strict", z.ZodTypeAny, {
2152
+ type: "input";
2153
+ errors: {
2154
+ path: string;
2155
+ message: string;
2156
+ }[];
2157
+ }, {
2158
+ type: "input";
2159
+ errors: {
2160
+ path: string;
2161
+ message: string;
2162
+ }[];
2163
+ }>, z.ZodObject<{
2164
+ type: z.ZodLiteral<"execution">;
2165
+ message: z.ZodString;
2166
+ details: z.ZodOptional<z.ZodUnknown>;
2167
+ }, "strict", z.ZodTypeAny, {
2168
+ message: string;
2169
+ type: "execution";
2170
+ details?: unknown;
2171
+ }, {
2172
+ message: string;
2173
+ type: "execution";
2174
+ details?: unknown;
2175
+ }>]>;
2176
+ }, "strict", z.ZodTypeAny, {
2177
+ id: string;
2178
+ name: string;
2179
+ data: {
2180
+ type: "input";
2181
+ errors: {
2182
+ path: string;
2183
+ message: string;
2184
+ }[];
2185
+ } | {
2186
+ message: string;
2187
+ type: "execution";
2188
+ details?: unknown;
2189
+ };
2190
+ }, {
2191
+ id: string;
2192
+ name: string;
2193
+ data: {
2194
+ type: "input";
2195
+ errors: {
2196
+ path: string;
2197
+ message: string;
2198
+ }[];
2199
+ } | {
2200
+ message: string;
2201
+ type: "execution";
2202
+ details?: unknown;
2203
+ };
2204
+ }>, "many">>;
2205
+ requestId: z.ZodString;
2206
+ }, "strip", z.ZodTypeAny, {
2207
+ type: "result";
2208
+ status: 200;
2209
+ text: string;
2210
+ messages: ModelMessage[];
2211
+ requestId: string;
2212
+ pendingTools?: {
2213
+ type: "tool-call";
2214
+ input: {
2215
+ value: {
2216
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2217
+ metadata?: {
2218
+ explorerUrl?: string | undefined;
2219
+ usdValue?: string | undefined;
2220
+ } | undefined;
2221
+ }[];
2222
+ type: "BatchTransactions";
2223
+ } | {
2224
+ value: {
2225
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2226
+ metadata?: {
2227
+ explorerUrl?: string | undefined;
2228
+ usdValue?: string | undefined;
2229
+ } | undefined;
2230
+ };
2231
+ type: "SingleTransaction";
2232
+ } | {
2233
+ value: {
2234
+ signatureRequests: ({
2235
+ id: string;
2236
+ signerAddress: string;
2237
+ signMethod: "typedData";
2238
+ typedData: {
2239
+ message: Record<string, unknown>;
2240
+ types: Record<string, {
2241
+ type: string;
2242
+ name: string;
2243
+ }[]>;
2244
+ domain: Record<string, unknown>;
2245
+ primaryType: string;
2246
+ };
2247
+ description?: string | undefined;
2248
+ metadata?: Record<string, unknown> | undefined;
2249
+ } | {
2250
+ id: string;
2251
+ signerAddress: string;
2252
+ signMethod: "message";
2253
+ rawHash: string;
2254
+ description?: string | undefined;
2255
+ metadata?: Record<string, unknown> | undefined;
2256
+ })[];
2257
+ transactions?: {
2258
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2259
+ metadata?: {
2260
+ explorerUrl?: string | undefined;
2261
+ usdValue?: string | undefined;
2262
+ } | undefined;
2263
+ }[] | undefined;
2264
+ };
2265
+ type: "SignatureRequests";
2266
+ };
2267
+ toolCallId: string;
2268
+ toolName: string;
2269
+ }[] | undefined;
2270
+ incompleteTools?: {
2271
+ toolCallId: string;
2272
+ toolName: string;
2273
+ toolInput?: unknown;
2274
+ }[] | undefined;
2275
+ toolErrors?: {
2276
+ id: string;
2277
+ name: string;
2278
+ data: {
2279
+ type: "input";
2280
+ errors: {
2281
+ path: string;
2282
+ message: string;
2283
+ }[];
2284
+ } | {
2285
+ message: string;
2286
+ type: "execution";
2287
+ details?: unknown;
2288
+ };
2289
+ }[] | undefined;
2290
+ }, {
2291
+ type: "result";
2292
+ status: 200;
2293
+ text: string;
2294
+ messages: ModelMessage[];
2295
+ requestId: string;
2296
+ pendingTools?: {
2297
+ type: "tool-call";
2298
+ input: {
2299
+ value: {
2300
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2301
+ metadata?: {
2302
+ explorerUrl?: string | undefined;
2303
+ usdValue?: string | undefined;
2304
+ } | undefined;
2305
+ }[];
2306
+ type: "BatchTransactions";
2307
+ } | {
2308
+ value: {
2309
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2310
+ metadata?: {
2311
+ explorerUrl?: string | undefined;
2312
+ usdValue?: string | undefined;
2313
+ } | undefined;
2314
+ };
2315
+ type: "SingleTransaction";
2316
+ } | {
2317
+ value: {
2318
+ signatureRequests: ({
2319
+ id: string;
2320
+ signerAddress: string;
2321
+ signMethod: "typedData";
2322
+ typedData: {
2323
+ message: Record<string, unknown>;
2324
+ types: Record<string, {
2325
+ type: string;
2326
+ name: string;
2327
+ }[]>;
2328
+ domain: Record<string, unknown>;
2329
+ primaryType: string;
2330
+ };
2331
+ description?: string | undefined;
2332
+ metadata?: Record<string, unknown> | undefined;
2333
+ } | {
2334
+ id: string;
2335
+ signerAddress: string;
2336
+ signMethod: "message";
2337
+ rawHash: string;
2338
+ description?: string | undefined;
2339
+ metadata?: Record<string, unknown> | undefined;
2340
+ })[];
2341
+ transactions?: {
2342
+ transaction: import("viem").PrepareTransactionRequestReturnType;
2343
+ metadata?: {
2344
+ explorerUrl?: string | undefined;
2345
+ usdValue?: string | undefined;
2346
+ } | undefined;
2347
+ }[] | undefined;
2348
+ };
2349
+ type: "SignatureRequests";
2350
+ };
2351
+ toolCallId: string;
2352
+ toolName: string;
2353
+ }[] | undefined;
2354
+ incompleteTools?: {
2355
+ toolCallId: string;
2356
+ toolName: string;
2357
+ toolInput?: unknown;
2358
+ }[] | undefined;
2359
+ toolErrors?: {
2360
+ id: string;
2361
+ name: string;
2362
+ data: {
2363
+ type: "input";
2364
+ errors: {
2365
+ path: string;
2366
+ message: string;
2367
+ }[];
2368
+ } | {
2369
+ message: string;
2370
+ type: "execution";
2371
+ details?: unknown;
2372
+ };
2373
+ }[] | undefined;
2374
+ }>, z.ZodObject<{
2375
+ type: z.ZodLiteral<"error">;
2376
+ requestId: z.ZodString;
2377
+ timestamp: z.ZodOptional<z.ZodNumber>;
2378
+ data: z.ZodObject<{
2379
+ message: z.ZodString;
2380
+ code: z.ZodOptional<z.ZodString>;
2381
+ }, "strip", z.ZodTypeAny, {
2382
+ message: string;
2383
+ code?: string | undefined;
2384
+ }, {
2385
+ message: string;
2386
+ code?: string | undefined;
2387
+ }>;
2388
+ }, "strip", z.ZodTypeAny, {
2389
+ type: "error";
2390
+ data: {
2391
+ message: string;
2392
+ code?: string | undefined;
2393
+ };
2394
+ requestId: string;
2395
+ timestamp?: number | undefined;
2396
+ }, {
2397
+ type: "error";
2398
+ data: {
2399
+ message: string;
2400
+ code?: string | undefined;
2401
+ };
2402
+ requestId: string;
2403
+ timestamp?: number | undefined;
2404
+ }>, z.ZodObject<{
2405
+ type: z.ZodLiteral<"stream_end">;
2406
+ requestId: z.ZodString;
2407
+ timestamp: z.ZodOptional<z.ZodNumber>;
2408
+ }, "strip", z.ZodTypeAny, {
2409
+ type: "stream_end";
2410
+ requestId: string;
2411
+ timestamp?: number | undefined;
2412
+ }, {
2413
+ type: "stream_end";
2414
+ requestId: string;
2415
+ timestamp?: number | undefined;
2416
+ }>]>;
2417
+ //# sourceMappingURL=telemetryEvents.d.ts.map