@tdesign-react/chat 1.0.2-alpha.9 → 1.0.2

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 (130) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/es/_util/reactify.d.ts +2 -1
  3. package/es/_util/reactify.js +231 -81
  4. package/es/_util/reactify.js.map +1 -1
  5. package/es/_util/useDynamicStyle.js +1 -1
  6. package/es/attachments/index.js +6 -4
  7. package/es/attachments/index.js.map +1 -1
  8. package/es/chat-actionbar/index.js +6 -4
  9. package/es/chat-actionbar/index.js.map +1 -1
  10. package/es/chat-engine/components/activity/index.d.ts +0 -1
  11. package/es/chat-engine/components/activity/index.js +2 -1
  12. package/es/chat-engine/components/activity/index.js.map +1 -1
  13. package/es/chat-engine/components/activity/registry.d.ts +1 -1
  14. package/es/chat-engine/components/activity/registry.js +1 -1
  15. package/es/chat-engine/components/activity/registry.js.map +1 -1
  16. package/es/chat-engine/components/activity/render.d.ts +6 -2
  17. package/es/chat-engine/components/activity/render.js +12 -2
  18. package/es/chat-engine/components/activity/render.js.map +1 -1
  19. package/es/chat-engine/components/activity/types.d.ts +0 -3
  20. package/es/chat-engine/components/activity/types.js +1 -1
  21. package/es/chat-engine/components/index.js +8 -7
  22. package/es/chat-engine/components/index.js.map +1 -1
  23. package/es/chat-engine/components/provider/agent-state.js +1 -1
  24. package/es/chat-engine/components/toolcall/index.js +2 -2
  25. package/es/chat-engine/components/toolcall/registry.js +1 -1
  26. package/es/chat-engine/components/toolcall/render.d.ts +1 -1
  27. package/es/chat-engine/components/toolcall/render.js +3 -4
  28. package/es/chat-engine/components/toolcall/render.js.map +1 -1
  29. package/es/chat-engine/components/toolcall/types.js +1 -1
  30. package/es/chat-engine/hooks/index.js +1 -1
  31. package/es/chat-engine/hooks/useAgentActivity.d.ts +1 -2
  32. package/es/chat-engine/hooks/useAgentActivity.js +1 -1
  33. package/es/chat-engine/hooks/useAgentActivity.js.map +1 -1
  34. package/es/chat-engine/hooks/useAgentState.js +1 -1
  35. package/es/chat-engine/hooks/useAgentState.js.map +1 -1
  36. package/es/chat-engine/hooks/useAgentToolcall.js +1 -1
  37. package/es/chat-engine/hooks/useChat.d.ts +1 -1
  38. package/es/chat-engine/hooks/useChat.js +3 -3
  39. package/es/chat-engine/hooks/useChat.js.map +1 -1
  40. package/es/chat-engine/index.d.ts +2 -4
  41. package/es/chat-engine/index.js +9 -33
  42. package/es/chat-engine/index.js.map +1 -1
  43. package/es/chat-filecard/index.js +6 -4
  44. package/es/chat-filecard/index.js.map +1 -1
  45. package/es/chat-loading/index.js +6 -4
  46. package/es/chat-loading/index.js.map +1 -1
  47. package/es/chat-markdown/index.js +6 -4
  48. package/es/chat-markdown/index.js.map +1 -1
  49. package/es/chat-message/index.js +6 -4
  50. package/es/chat-message/index.js.map +1 -1
  51. package/es/chat-sender/index.js +6 -4
  52. package/es/chat-sender/index.js.map +1 -1
  53. package/es/chat-thinking/index.js +6 -4
  54. package/es/chat-thinking/index.js.map +1 -1
  55. package/es/chatbot/_example-js/agui-toolcall.d.ts +11 -0
  56. package/es/chatbot/index.js +6 -4
  57. package/es/chatbot/index.js.map +1 -1
  58. package/es/index.js +11 -32
  59. package/es/index.js.map +1 -1
  60. package/es/style/index.js +1 -1
  61. package/package.json +15 -15
  62. package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +0 -109
  63. package/es/chat-engine/core/adapters/agui/event-mapper.js +0 -375
  64. package/es/chat-engine/core/adapters/agui/event-mapper.js.map +0 -1
  65. package/es/chat-engine/core/adapters/agui/events.d.ts +0 -1550
  66. package/es/chat-engine/core/adapters/agui/events.js +0 -199
  67. package/es/chat-engine/core/adapters/agui/events.js.map +0 -1
  68. package/es/chat-engine/core/adapters/agui/index.d.ts +0 -75
  69. package/es/chat-engine/core/adapters/agui/index.js +0 -175
  70. package/es/chat-engine/core/adapters/agui/index.js.map +0 -1
  71. package/es/chat-engine/core/adapters/agui/state-manager.d.ts +0 -99
  72. package/es/chat-engine/core/adapters/agui/state-manager.js +0 -168
  73. package/es/chat-engine/core/adapters/agui/state-manager.js.map +0 -1
  74. package/es/chat-engine/core/adapters/agui/types.d.ts +0 -817
  75. package/es/chat-engine/core/adapters/agui/types.js +0 -95
  76. package/es/chat-engine/core/adapters/agui/types.js.map +0 -1
  77. package/es/chat-engine/core/adapters/agui/utils.d.ts +0 -197
  78. package/es/chat-engine/core/adapters/agui/utils.js +0 -311
  79. package/es/chat-engine/core/adapters/agui/utils.js.map +0 -1
  80. package/es/chat-engine/core/index.d.ts +0 -132
  81. package/es/chat-engine/core/index.js +0 -597
  82. package/es/chat-engine/core/index.js.map +0 -1
  83. package/es/chat-engine/core/processor/index.d.ts +0 -20
  84. package/es/chat-engine/core/processor/index.js +0 -146
  85. package/es/chat-engine/core/processor/index.js.map +0 -1
  86. package/es/chat-engine/core/server/batch-client.d.ts +0 -20
  87. package/es/chat-engine/core/server/batch-client.js +0 -114
  88. package/es/chat-engine/core/server/batch-client.js.map +0 -1
  89. package/es/chat-engine/core/server/connection-manager.d.ts +0 -39
  90. package/es/chat-engine/core/server/connection-manager.js +0 -84
  91. package/es/chat-engine/core/server/connection-manager.js.map +0 -1
  92. package/es/chat-engine/core/server/errors.d.ts +0 -22
  93. package/es/chat-engine/core/server/errors.js +0 -80
  94. package/es/chat-engine/core/server/errors.js.map +0 -1
  95. package/es/chat-engine/core/server/index.d.ts +0 -11
  96. package/es/chat-engine/core/server/index.js +0 -26
  97. package/es/chat-engine/core/server/index.js.map +0 -1
  98. package/es/chat-engine/core/server/llm-service.d.ts +0 -44
  99. package/es/chat-engine/core/server/llm-service.js +0 -198
  100. package/es/chat-engine/core/server/llm-service.js.map +0 -1
  101. package/es/chat-engine/core/server/sse-client.d.ts +0 -77
  102. package/es/chat-engine/core/server/sse-client.js +0 -362
  103. package/es/chat-engine/core/server/sse-client.js.map +0 -1
  104. package/es/chat-engine/core/server/sse-parser.d.ts +0 -49
  105. package/es/chat-engine/core/server/sse-parser.js +0 -116
  106. package/es/chat-engine/core/server/sse-parser.js.map +0 -1
  107. package/es/chat-engine/core/server/types.d.ts +0 -54
  108. package/es/chat-engine/core/server/types.js +0 -28
  109. package/es/chat-engine/core/server/types.js.map +0 -1
  110. package/es/chat-engine/core/store/message.d.ts +0 -27
  111. package/es/chat-engine/core/store/message.js +0 -263
  112. package/es/chat-engine/core/store/message.js.map +0 -1
  113. package/es/chat-engine/core/store/model.d.ts +0 -8
  114. package/es/chat-engine/core/store/model.js +0 -65
  115. package/es/chat-engine/core/store/model.js.map +0 -1
  116. package/es/chat-engine/core/store/reactiveState.d.ts +0 -52
  117. package/es/chat-engine/core/store/reactiveState.js +0 -1359
  118. package/es/chat-engine/core/store/reactiveState.js.map +0 -1
  119. package/es/chat-engine/core/type.d.ts +0 -255
  120. package/es/chat-engine/core/type.js +0 -7
  121. package/es/chat-engine/core/type.js.map +0 -1
  122. package/es/chat-engine/core/utils/eventEmitter.d.ts +0 -10
  123. package/es/chat-engine/core/utils/eventEmitter.js +0 -67
  124. package/es/chat-engine/core/utils/eventEmitter.js.map +0 -1
  125. package/es/chat-engine/core/utils/index.d.ts +0 -33
  126. package/es/chat-engine/core/utils/index.js +0 -999
  127. package/es/chat-engine/core/utils/index.js.map +0 -1
  128. package/es/chat-engine/core/utils/logger.d.ts +0 -30
  129. package/es/chat-engine/core/utils/logger.js +0 -87
  130. package/es/chat-engine/core/utils/logger.js.map +0 -1
@@ -1,817 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const FunctionCallSchema: z.ZodObject<{
3
- name: z.ZodString;
4
- arguments: z.ZodString;
5
- }, "strip", z.ZodTypeAny, {
6
- name?: string;
7
- arguments?: string;
8
- }, {
9
- name?: string;
10
- arguments?: string;
11
- }>;
12
- export declare const ToolCallSchema: z.ZodObject<{
13
- id: z.ZodString;
14
- type: z.ZodLiteral<"function">;
15
- function: z.ZodObject<{
16
- name: z.ZodString;
17
- arguments: z.ZodString;
18
- }, "strip", z.ZodTypeAny, {
19
- name?: string;
20
- arguments?: string;
21
- }, {
22
- name?: string;
23
- arguments?: string;
24
- }>;
25
- }, "strip", z.ZodTypeAny, {
26
- function?: {
27
- name?: string;
28
- arguments?: string;
29
- };
30
- type?: "function";
31
- id?: string;
32
- }, {
33
- function?: {
34
- name?: string;
35
- arguments?: string;
36
- };
37
- type?: "function";
38
- id?: string;
39
- }>;
40
- export declare const BaseMessageSchema: z.ZodObject<{
41
- id: z.ZodString;
42
- role: z.ZodString;
43
- content: z.ZodOptional<z.ZodString>;
44
- name: z.ZodOptional<z.ZodString>;
45
- timestamp: z.ZodOptional<z.ZodNumber>;
46
- }, "strip", z.ZodTypeAny, {
47
- content?: string;
48
- name?: string;
49
- id?: string;
50
- role?: string;
51
- timestamp?: number;
52
- }, {
53
- content?: string;
54
- name?: string;
55
- id?: string;
56
- role?: string;
57
- timestamp?: number;
58
- }>;
59
- export declare const DeveloperMessageSchema: z.ZodObject<{
60
- id: z.ZodString;
61
- name: z.ZodOptional<z.ZodString>;
62
- timestamp: z.ZodOptional<z.ZodNumber>;
63
- } & {
64
- role: z.ZodLiteral<"developer">;
65
- content: z.ZodString;
66
- }, "strip", z.ZodTypeAny, {
67
- content?: string;
68
- name?: string;
69
- id?: string;
70
- role?: "developer";
71
- timestamp?: number;
72
- }, {
73
- content?: string;
74
- name?: string;
75
- id?: string;
76
- role?: "developer";
77
- timestamp?: number;
78
- }>;
79
- export declare const SystemMessageSchema: z.ZodObject<{
80
- id: z.ZodString;
81
- name: z.ZodOptional<z.ZodString>;
82
- timestamp: z.ZodOptional<z.ZodNumber>;
83
- } & {
84
- role: z.ZodLiteral<"system">;
85
- content: z.ZodString;
86
- }, "strip", z.ZodTypeAny, {
87
- content?: string;
88
- name?: string;
89
- id?: string;
90
- role?: "system";
91
- timestamp?: number;
92
- }, {
93
- content?: string;
94
- name?: string;
95
- id?: string;
96
- role?: "system";
97
- timestamp?: number;
98
- }>;
99
- export declare const AssistantMessageSchema: z.ZodObject<{
100
- id: z.ZodString;
101
- name: z.ZodOptional<z.ZodString>;
102
- timestamp: z.ZodOptional<z.ZodNumber>;
103
- } & {
104
- role: z.ZodLiteral<"assistant">;
105
- content: z.ZodOptional<z.ZodString>;
106
- reasoningContent: z.ZodOptional<z.ZodString>;
107
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
108
- id: z.ZodString;
109
- type: z.ZodLiteral<"function">;
110
- function: z.ZodObject<{
111
- name: z.ZodString;
112
- arguments: z.ZodString;
113
- }, "strip", z.ZodTypeAny, {
114
- name?: string;
115
- arguments?: string;
116
- }, {
117
- name?: string;
118
- arguments?: string;
119
- }>;
120
- }, "strip", z.ZodTypeAny, {
121
- function?: {
122
- name?: string;
123
- arguments?: string;
124
- };
125
- type?: "function";
126
- id?: string;
127
- }, {
128
- function?: {
129
- name?: string;
130
- arguments?: string;
131
- };
132
- type?: "function";
133
- id?: string;
134
- }>, "many">>;
135
- }, "strip", z.ZodTypeAny, {
136
- content?: string;
137
- name?: string;
138
- id?: string;
139
- role?: "assistant";
140
- timestamp?: number;
141
- reasoningContent?: string;
142
- toolCalls?: {
143
- function?: {
144
- name?: string;
145
- arguments?: string;
146
- };
147
- type?: "function";
148
- id?: string;
149
- }[];
150
- }, {
151
- content?: string;
152
- name?: string;
153
- id?: string;
154
- role?: "assistant";
155
- timestamp?: number;
156
- reasoningContent?: string;
157
- toolCalls?: {
158
- function?: {
159
- name?: string;
160
- arguments?: string;
161
- };
162
- type?: "function";
163
- id?: string;
164
- }[];
165
- }>;
166
- export declare const UserMessageSchema: z.ZodObject<{
167
- id: z.ZodString;
168
- name: z.ZodOptional<z.ZodString>;
169
- timestamp: z.ZodOptional<z.ZodNumber>;
170
- } & {
171
- role: z.ZodLiteral<"user">;
172
- content: z.ZodString;
173
- }, "strip", z.ZodTypeAny, {
174
- content?: string;
175
- name?: string;
176
- id?: string;
177
- role?: "user";
178
- timestamp?: number;
179
- }, {
180
- content?: string;
181
- name?: string;
182
- id?: string;
183
- role?: "user";
184
- timestamp?: number;
185
- }>;
186
- export declare const ToolMessageSchema: z.ZodObject<{
187
- id: z.ZodString;
188
- content: z.ZodString;
189
- role: z.ZodLiteral<"tool">;
190
- toolCallId: z.ZodString;
191
- }, "strip", z.ZodTypeAny, {
192
- content?: string;
193
- id?: string;
194
- role?: "tool";
195
- toolCallId?: string;
196
- }, {
197
- content?: string;
198
- id?: string;
199
- role?: "tool";
200
- toolCallId?: string;
201
- }>;
202
- export declare const ActivityMessageSchema: z.ZodObject<{
203
- id: z.ZodString;
204
- role: z.ZodLiteral<"activity">;
205
- activityType: z.ZodString;
206
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
207
- }, "strip", z.ZodTypeAny, {
208
- content?: Record<string, any>;
209
- activityType?: string;
210
- id?: string;
211
- role?: "activity";
212
- }, {
213
- content?: Record<string, any>;
214
- activityType?: string;
215
- id?: string;
216
- role?: "activity";
217
- }>;
218
- export declare const MessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
219
- id: z.ZodString;
220
- name: z.ZodOptional<z.ZodString>;
221
- timestamp: z.ZodOptional<z.ZodNumber>;
222
- } & {
223
- role: z.ZodLiteral<"developer">;
224
- content: z.ZodString;
225
- }, "strip", z.ZodTypeAny, {
226
- content?: string;
227
- name?: string;
228
- id?: string;
229
- role?: "developer";
230
- timestamp?: number;
231
- }, {
232
- content?: string;
233
- name?: string;
234
- id?: string;
235
- role?: "developer";
236
- timestamp?: number;
237
- }>, z.ZodObject<{
238
- id: z.ZodString;
239
- name: z.ZodOptional<z.ZodString>;
240
- timestamp: z.ZodOptional<z.ZodNumber>;
241
- } & {
242
- role: z.ZodLiteral<"system">;
243
- content: z.ZodString;
244
- }, "strip", z.ZodTypeAny, {
245
- content?: string;
246
- name?: string;
247
- id?: string;
248
- role?: "system";
249
- timestamp?: number;
250
- }, {
251
- content?: string;
252
- name?: string;
253
- id?: string;
254
- role?: "system";
255
- timestamp?: number;
256
- }>, z.ZodObject<{
257
- id: z.ZodString;
258
- name: z.ZodOptional<z.ZodString>;
259
- timestamp: z.ZodOptional<z.ZodNumber>;
260
- } & {
261
- role: z.ZodLiteral<"assistant">;
262
- content: z.ZodOptional<z.ZodString>;
263
- reasoningContent: z.ZodOptional<z.ZodString>;
264
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
265
- id: z.ZodString;
266
- type: z.ZodLiteral<"function">;
267
- function: z.ZodObject<{
268
- name: z.ZodString;
269
- arguments: z.ZodString;
270
- }, "strip", z.ZodTypeAny, {
271
- name?: string;
272
- arguments?: string;
273
- }, {
274
- name?: string;
275
- arguments?: string;
276
- }>;
277
- }, "strip", z.ZodTypeAny, {
278
- function?: {
279
- name?: string;
280
- arguments?: string;
281
- };
282
- type?: "function";
283
- id?: string;
284
- }, {
285
- function?: {
286
- name?: string;
287
- arguments?: string;
288
- };
289
- type?: "function";
290
- id?: string;
291
- }>, "many">>;
292
- }, "strip", z.ZodTypeAny, {
293
- content?: string;
294
- name?: string;
295
- id?: string;
296
- role?: "assistant";
297
- timestamp?: number;
298
- reasoningContent?: string;
299
- toolCalls?: {
300
- function?: {
301
- name?: string;
302
- arguments?: string;
303
- };
304
- type?: "function";
305
- id?: string;
306
- }[];
307
- }, {
308
- content?: string;
309
- name?: string;
310
- id?: string;
311
- role?: "assistant";
312
- timestamp?: number;
313
- reasoningContent?: string;
314
- toolCalls?: {
315
- function?: {
316
- name?: string;
317
- arguments?: string;
318
- };
319
- type?: "function";
320
- id?: string;
321
- }[];
322
- }>, z.ZodObject<{
323
- id: z.ZodString;
324
- name: z.ZodOptional<z.ZodString>;
325
- timestamp: z.ZodOptional<z.ZodNumber>;
326
- } & {
327
- role: z.ZodLiteral<"user">;
328
- content: z.ZodString;
329
- }, "strip", z.ZodTypeAny, {
330
- content?: string;
331
- name?: string;
332
- id?: string;
333
- role?: "user";
334
- timestamp?: number;
335
- }, {
336
- content?: string;
337
- name?: string;
338
- id?: string;
339
- role?: "user";
340
- timestamp?: number;
341
- }>, z.ZodObject<{
342
- id: z.ZodString;
343
- content: z.ZodString;
344
- role: z.ZodLiteral<"tool">;
345
- toolCallId: z.ZodString;
346
- }, "strip", z.ZodTypeAny, {
347
- content?: string;
348
- id?: string;
349
- role?: "tool";
350
- toolCallId?: string;
351
- }, {
352
- content?: string;
353
- id?: string;
354
- role?: "tool";
355
- toolCallId?: string;
356
- }>, z.ZodObject<{
357
- id: z.ZodString;
358
- role: z.ZodLiteral<"activity">;
359
- activityType: z.ZodString;
360
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
361
- }, "strip", z.ZodTypeAny, {
362
- content?: Record<string, any>;
363
- activityType?: string;
364
- id?: string;
365
- role?: "activity";
366
- }, {
367
- content?: Record<string, any>;
368
- activityType?: string;
369
- id?: string;
370
- role?: "activity";
371
- }>]>;
372
- export declare const HistoryMessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
373
- id: z.ZodString;
374
- name: z.ZodOptional<z.ZodString>;
375
- timestamp: z.ZodOptional<z.ZodNumber>;
376
- } & {
377
- role: z.ZodLiteral<"user">;
378
- content: z.ZodString;
379
- }, "strip", z.ZodTypeAny, {
380
- content?: string;
381
- name?: string;
382
- id?: string;
383
- role?: "user";
384
- timestamp?: number;
385
- }, {
386
- content?: string;
387
- name?: string;
388
- id?: string;
389
- role?: "user";
390
- timestamp?: number;
391
- }>, z.ZodObject<{
392
- id: z.ZodString;
393
- name: z.ZodOptional<z.ZodString>;
394
- timestamp: z.ZodOptional<z.ZodNumber>;
395
- } & {
396
- role: z.ZodLiteral<"assistant">;
397
- content: z.ZodOptional<z.ZodString>;
398
- reasoningContent: z.ZodOptional<z.ZodString>;
399
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
400
- id: z.ZodString;
401
- type: z.ZodLiteral<"function">;
402
- function: z.ZodObject<{
403
- name: z.ZodString;
404
- arguments: z.ZodString;
405
- }, "strip", z.ZodTypeAny, {
406
- name?: string;
407
- arguments?: string;
408
- }, {
409
- name?: string;
410
- arguments?: string;
411
- }>;
412
- }, "strip", z.ZodTypeAny, {
413
- function?: {
414
- name?: string;
415
- arguments?: string;
416
- };
417
- type?: "function";
418
- id?: string;
419
- }, {
420
- function?: {
421
- name?: string;
422
- arguments?: string;
423
- };
424
- type?: "function";
425
- id?: string;
426
- }>, "many">>;
427
- }, "strip", z.ZodTypeAny, {
428
- content?: string;
429
- name?: string;
430
- id?: string;
431
- role?: "assistant";
432
- timestamp?: number;
433
- reasoningContent?: string;
434
- toolCalls?: {
435
- function?: {
436
- name?: string;
437
- arguments?: string;
438
- };
439
- type?: "function";
440
- id?: string;
441
- }[];
442
- }, {
443
- content?: string;
444
- name?: string;
445
- id?: string;
446
- role?: "assistant";
447
- timestamp?: number;
448
- reasoningContent?: string;
449
- toolCalls?: {
450
- function?: {
451
- name?: string;
452
- arguments?: string;
453
- };
454
- type?: "function";
455
- id?: string;
456
- }[];
457
- }>, z.ZodObject<{
458
- id: z.ZodString;
459
- content: z.ZodString;
460
- role: z.ZodLiteral<"tool">;
461
- toolCallId: z.ZodString;
462
- }, "strip", z.ZodTypeAny, {
463
- content?: string;
464
- id?: string;
465
- role?: "tool";
466
- toolCallId?: string;
467
- }, {
468
- content?: string;
469
- id?: string;
470
- role?: "tool";
471
- toolCallId?: string;
472
- }>]>;
473
- export declare const RoleSchema: z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">, z.ZodLiteral<"tool">, z.ZodLiteral<"activity">]>;
474
- export declare const ContextSchema: z.ZodObject<{
475
- description: z.ZodString;
476
- value: z.ZodString;
477
- }, "strip", z.ZodTypeAny, {
478
- value?: string;
479
- description?: string;
480
- }, {
481
- value?: string;
482
- description?: string;
483
- }>;
484
- export declare const ToolSchema: z.ZodObject<{
485
- name: z.ZodString;
486
- description: z.ZodString;
487
- parameters: z.ZodAny;
488
- }, "strip", z.ZodTypeAny, {
489
- name?: string;
490
- description?: string;
491
- parameters?: any;
492
- }, {
493
- name?: string;
494
- description?: string;
495
- parameters?: any;
496
- }>;
497
- export declare const RunAgentInputSchema: z.ZodObject<{
498
- threadId: z.ZodString;
499
- runId: z.ZodString;
500
- state: z.ZodAny;
501
- messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
502
- id: z.ZodString;
503
- name: z.ZodOptional<z.ZodString>;
504
- timestamp: z.ZodOptional<z.ZodNumber>;
505
- } & {
506
- role: z.ZodLiteral<"developer">;
507
- content: z.ZodString;
508
- }, "strip", z.ZodTypeAny, {
509
- content?: string;
510
- name?: string;
511
- id?: string;
512
- role?: "developer";
513
- timestamp?: number;
514
- }, {
515
- content?: string;
516
- name?: string;
517
- id?: string;
518
- role?: "developer";
519
- timestamp?: number;
520
- }>, z.ZodObject<{
521
- id: z.ZodString;
522
- name: z.ZodOptional<z.ZodString>;
523
- timestamp: z.ZodOptional<z.ZodNumber>;
524
- } & {
525
- role: z.ZodLiteral<"system">;
526
- content: z.ZodString;
527
- }, "strip", z.ZodTypeAny, {
528
- content?: string;
529
- name?: string;
530
- id?: string;
531
- role?: "system";
532
- timestamp?: number;
533
- }, {
534
- content?: string;
535
- name?: string;
536
- id?: string;
537
- role?: "system";
538
- timestamp?: number;
539
- }>, z.ZodObject<{
540
- id: z.ZodString;
541
- name: z.ZodOptional<z.ZodString>;
542
- timestamp: z.ZodOptional<z.ZodNumber>;
543
- } & {
544
- role: z.ZodLiteral<"assistant">;
545
- content: z.ZodOptional<z.ZodString>;
546
- reasoningContent: z.ZodOptional<z.ZodString>;
547
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
548
- id: z.ZodString;
549
- type: z.ZodLiteral<"function">;
550
- function: z.ZodObject<{
551
- name: z.ZodString;
552
- arguments: z.ZodString;
553
- }, "strip", z.ZodTypeAny, {
554
- name?: string;
555
- arguments?: string;
556
- }, {
557
- name?: string;
558
- arguments?: string;
559
- }>;
560
- }, "strip", z.ZodTypeAny, {
561
- function?: {
562
- name?: string;
563
- arguments?: string;
564
- };
565
- type?: "function";
566
- id?: string;
567
- }, {
568
- function?: {
569
- name?: string;
570
- arguments?: string;
571
- };
572
- type?: "function";
573
- id?: string;
574
- }>, "many">>;
575
- }, "strip", z.ZodTypeAny, {
576
- content?: string;
577
- name?: string;
578
- id?: string;
579
- role?: "assistant";
580
- timestamp?: number;
581
- reasoningContent?: string;
582
- toolCalls?: {
583
- function?: {
584
- name?: string;
585
- arguments?: string;
586
- };
587
- type?: "function";
588
- id?: string;
589
- }[];
590
- }, {
591
- content?: string;
592
- name?: string;
593
- id?: string;
594
- role?: "assistant";
595
- timestamp?: number;
596
- reasoningContent?: string;
597
- toolCalls?: {
598
- function?: {
599
- name?: string;
600
- arguments?: string;
601
- };
602
- type?: "function";
603
- id?: string;
604
- }[];
605
- }>, z.ZodObject<{
606
- id: z.ZodString;
607
- name: z.ZodOptional<z.ZodString>;
608
- timestamp: z.ZodOptional<z.ZodNumber>;
609
- } & {
610
- role: z.ZodLiteral<"user">;
611
- content: z.ZodString;
612
- }, "strip", z.ZodTypeAny, {
613
- content?: string;
614
- name?: string;
615
- id?: string;
616
- role?: "user";
617
- timestamp?: number;
618
- }, {
619
- content?: string;
620
- name?: string;
621
- id?: string;
622
- role?: "user";
623
- timestamp?: number;
624
- }>, z.ZodObject<{
625
- id: z.ZodString;
626
- content: z.ZodString;
627
- role: z.ZodLiteral<"tool">;
628
- toolCallId: z.ZodString;
629
- }, "strip", z.ZodTypeAny, {
630
- content?: string;
631
- id?: string;
632
- role?: "tool";
633
- toolCallId?: string;
634
- }, {
635
- content?: string;
636
- id?: string;
637
- role?: "tool";
638
- toolCallId?: string;
639
- }>, z.ZodObject<{
640
- id: z.ZodString;
641
- role: z.ZodLiteral<"activity">;
642
- activityType: z.ZodString;
643
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
644
- }, "strip", z.ZodTypeAny, {
645
- content?: Record<string, any>;
646
- activityType?: string;
647
- id?: string;
648
- role?: "activity";
649
- }, {
650
- content?: Record<string, any>;
651
- activityType?: string;
652
- id?: string;
653
- role?: "activity";
654
- }>]>, "many">;
655
- tools: z.ZodArray<z.ZodObject<{
656
- name: z.ZodString;
657
- description: z.ZodString;
658
- parameters: z.ZodAny;
659
- }, "strip", z.ZodTypeAny, {
660
- name?: string;
661
- description?: string;
662
- parameters?: any;
663
- }, {
664
- name?: string;
665
- description?: string;
666
- parameters?: any;
667
- }>, "many">;
668
- context: z.ZodArray<z.ZodObject<{
669
- description: z.ZodString;
670
- value: z.ZodString;
671
- }, "strip", z.ZodTypeAny, {
672
- value?: string;
673
- description?: string;
674
- }, {
675
- value?: string;
676
- description?: string;
677
- }>, "many">;
678
- forwardedProps: z.ZodAny;
679
- }, "strip", z.ZodTypeAny, {
680
- messages?: ({
681
- content?: string;
682
- name?: string;
683
- id?: string;
684
- role?: "developer";
685
- timestamp?: number;
686
- } | {
687
- content?: string;
688
- name?: string;
689
- id?: string;
690
- role?: "system";
691
- timestamp?: number;
692
- } | {
693
- content?: string;
694
- name?: string;
695
- id?: string;
696
- role?: "assistant";
697
- timestamp?: number;
698
- reasoningContent?: string;
699
- toolCalls?: {
700
- function?: {
701
- name?: string;
702
- arguments?: string;
703
- };
704
- type?: "function";
705
- id?: string;
706
- }[];
707
- } | {
708
- content?: string;
709
- name?: string;
710
- id?: string;
711
- role?: "user";
712
- timestamp?: number;
713
- } | {
714
- content?: string;
715
- id?: string;
716
- role?: "tool";
717
- toolCallId?: string;
718
- } | {
719
- content?: Record<string, any>;
720
- activityType?: string;
721
- id?: string;
722
- role?: "activity";
723
- })[];
724
- threadId?: string;
725
- runId?: string;
726
- state?: any;
727
- tools?: {
728
- name?: string;
729
- description?: string;
730
- parameters?: any;
731
- }[];
732
- context?: {
733
- value?: string;
734
- description?: string;
735
- }[];
736
- forwardedProps?: any;
737
- }, {
738
- messages?: ({
739
- content?: string;
740
- name?: string;
741
- id?: string;
742
- role?: "developer";
743
- timestamp?: number;
744
- } | {
745
- content?: string;
746
- name?: string;
747
- id?: string;
748
- role?: "system";
749
- timestamp?: number;
750
- } | {
751
- content?: string;
752
- name?: string;
753
- id?: string;
754
- role?: "assistant";
755
- timestamp?: number;
756
- reasoningContent?: string;
757
- toolCalls?: {
758
- function?: {
759
- name?: string;
760
- arguments?: string;
761
- };
762
- type?: "function";
763
- id?: string;
764
- }[];
765
- } | {
766
- content?: string;
767
- name?: string;
768
- id?: string;
769
- role?: "user";
770
- timestamp?: number;
771
- } | {
772
- content?: string;
773
- id?: string;
774
- role?: "tool";
775
- toolCallId?: string;
776
- } | {
777
- content?: Record<string, any>;
778
- activityType?: string;
779
- id?: string;
780
- role?: "activity";
781
- })[];
782
- threadId?: string;
783
- runId?: string;
784
- state?: any;
785
- tools?: {
786
- name?: string;
787
- description?: string;
788
- parameters?: any;
789
- }[];
790
- context?: {
791
- value?: string;
792
- description?: string;
793
- }[];
794
- forwardedProps?: any;
795
- }>;
796
- export declare const StateSchema: z.ZodAny;
797
- export type AGUIToolCall = z.infer<typeof ToolCallSchema>;
798
- export type FunctionCall = z.infer<typeof FunctionCallSchema>;
799
- export type DeveloperMessage = z.infer<typeof DeveloperMessageSchema>;
800
- export type SystemMessage = z.infer<typeof SystemMessageSchema>;
801
- export type AssistantMessage = z.infer<typeof AssistantMessageSchema>;
802
- export type UserMessage = z.infer<typeof UserMessageSchema>;
803
- export type ToolMessage = z.infer<typeof ToolMessageSchema>;
804
- export type ActivityMessage = z.infer<typeof ActivityMessageSchema>;
805
- export type Message = z.infer<typeof MessageSchema>;
806
- export type Context = z.infer<typeof ContextSchema>;
807
- export type Tool = z.infer<typeof ToolSchema>;
808
- export type RunAgentInput = z.infer<typeof RunAgentInputSchema>;
809
- export type State = z.infer<typeof StateSchema>;
810
- export type Role = z.infer<typeof RoleSchema>;
811
- export type AGUIHistoryMessage = Message;
812
- export type AGUIUserHistoryMessage = UserMessage;
813
- export type AGUIAssistantHistoryMessage = AssistantMessage;
814
- export type AGUIToolHistoryMessage = ToolMessage;
815
- export declare class AGUIError extends Error {
816
- constructor(message: string);
817
- }