@tdesign-react/chat 1.0.0 → 1.0.2-alpha.1

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