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

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 (227) hide show
  1. package/es/_util/reactify.d.ts +1 -2
  2. package/es/_util/reactify.js +81 -231
  3. package/es/_util/reactify.js.map +1 -1
  4. package/es/_util/useDynamicStyle.js +1 -1
  5. package/es/attachments/index.js +4 -6
  6. package/es/attachments/index.js.map +1 -1
  7. package/es/chat-actionbar/_example-js/base.d.ts +2 -0
  8. package/es/chat-actionbar/_example-js/custom.d.ts +2 -0
  9. package/es/chat-actionbar/_example-js/style.d.ts +2 -0
  10. package/es/chat-actionbar/index.js +4 -6
  11. package/es/chat-actionbar/index.js.map +1 -1
  12. package/es/chat-attachments/_example-js/base.d.ts +2 -0
  13. package/es/chat-attachments/_example-js/scroll-x.d.ts +2 -0
  14. package/es/chat-attachments/_example-js/scroll-y.d.ts +2 -0
  15. package/es/chat-attachments/index.js +3 -1
  16. package/es/chat-attachments/index.js.map +1 -1
  17. package/es/chat-engine/_example-js/agui-basic.d.ts +10 -0
  18. package/es/chat-engine/_example-js/agui-comprehensive.d.ts +2 -0
  19. package/es/chat-engine/_example-js/agui-test.d.ts +11 -0
  20. package/es/chat-engine/_example-js/agui-toolcall.d.ts +5 -0
  21. package/es/chat-engine/_example-js/agui-videoclip.d.ts +8 -0
  22. package/es/chat-engine/_example-js/agui.d.ts +1 -0
  23. package/es/chat-engine/_example-js/basic.d.ts +9 -0
  24. package/es/chat-engine/_example-js/components/HotelCard.d.ts +3 -0
  25. package/es/chat-engine/_example-js/components/HumanInputForm.d.ts +6 -0
  26. package/es/chat-engine/_example-js/components/HumanInputResult.d.ts +3 -0
  27. package/es/chat-engine/_example-js/components/ItineraryCard.d.ts +3 -0
  28. package/es/chat-engine/_example-js/components/PlanningStatePanel.d.ts +4 -0
  29. package/es/chat-engine/_example-js/components/Toolcall.d.ts +4 -0
  30. package/es/chat-engine/_example-js/components/WeatherCard.d.ts +3 -0
  31. package/es/chat-engine/_example-js/components/login.d.ts +1 -0
  32. package/es/chat-engine/_example-js/comprehensive.d.ts +12 -0
  33. package/es/chat-engine/_example-js/custom-content.d.ts +1 -0
  34. package/es/chat-engine/_example-js/hookComponent.d.ts +1 -0
  35. package/es/chat-engine/_example-js/initial-messages.d.ts +9 -0
  36. package/es/chat-engine/_example-js/instance-methods.d.ts +13 -0
  37. package/es/chat-engine/_example-js/travel-actions.d.ts +91 -0
  38. package/es/chat-engine/_example-js/travelToolcall.d.ts +1 -0
  39. package/es/{chatbot/components/toolcall → chat-engine/components/activity}/index.d.ts +1 -0
  40. package/es/chat-engine/components/activity/index.js +18 -0
  41. package/es/{chatbot/components/toolcall → chat-engine/components/activity}/index.js.map +1 -1
  42. package/es/chat-engine/components/activity/registry.d.ts +44 -0
  43. package/es/{chatbot/components/toolcall → chat-engine/components/activity}/registry.js +32 -22
  44. package/es/chat-engine/components/activity/registry.js.map +1 -0
  45. package/es/chat-engine/components/activity/render.d.ts +11 -0
  46. package/es/chat-engine/components/activity/render.js +107 -0
  47. package/es/chat-engine/components/activity/render.js.map +1 -0
  48. package/es/chat-engine/components/activity/types.d.ts +32 -0
  49. package/es/chat-engine/components/activity/types.js +7 -0
  50. package/es/chat-engine/components/activity/types.js.map +1 -0
  51. package/es/chat-engine/components/index.d.ts +3 -0
  52. package/es/chat-engine/components/index.js +28 -0
  53. package/es/chat-engine/components/index.js.map +1 -0
  54. package/es/chat-engine/components/provider/agent-state.js +1 -1
  55. package/es/chat-engine/components/toolcall/index.js +4 -1
  56. package/es/chat-engine/components/toolcall/index.js.map +1 -1
  57. package/es/chat-engine/components/toolcall/registry.js +1 -1
  58. package/es/chat-engine/components/toolcall/render.js +72 -25
  59. package/es/chat-engine/components/toolcall/render.js.map +1 -1
  60. package/es/chat-engine/components/toolcall/types.js +1 -1
  61. package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +109 -0
  62. package/es/chat-engine/core/adapters/agui/event-mapper.js +375 -0
  63. package/es/chat-engine/core/adapters/agui/event-mapper.js.map +1 -0
  64. package/es/chat-engine/core/adapters/agui/events.d.ts +1550 -0
  65. package/es/chat-engine/core/adapters/agui/events.js +199 -0
  66. package/es/chat-engine/core/adapters/agui/events.js.map +1 -0
  67. package/es/chat-engine/core/adapters/agui/index.d.ts +75 -0
  68. package/es/chat-engine/core/adapters/agui/index.js +175 -0
  69. package/es/chat-engine/core/adapters/agui/index.js.map +1 -0
  70. package/es/chat-engine/core/adapters/agui/state-manager.d.ts +99 -0
  71. package/es/chat-engine/core/adapters/agui/state-manager.js +168 -0
  72. package/es/chat-engine/core/adapters/agui/state-manager.js.map +1 -0
  73. package/es/chat-engine/core/adapters/agui/types.d.ts +817 -0
  74. package/es/chat-engine/core/adapters/agui/types.js +95 -0
  75. package/es/chat-engine/core/adapters/agui/types.js.map +1 -0
  76. package/es/chat-engine/core/adapters/agui/utils.d.ts +197 -0
  77. package/es/chat-engine/core/adapters/agui/utils.js +311 -0
  78. package/es/chat-engine/core/adapters/agui/utils.js.map +1 -0
  79. package/es/chat-engine/core/index.d.ts +132 -0
  80. package/es/chat-engine/core/index.js +597 -0
  81. package/es/chat-engine/core/index.js.map +1 -0
  82. package/es/chat-engine/core/processor/index.d.ts +20 -0
  83. package/es/chat-engine/core/processor/index.js +146 -0
  84. package/es/chat-engine/core/processor/index.js.map +1 -0
  85. package/es/chat-engine/core/server/batch-client.d.ts +20 -0
  86. package/es/chat-engine/core/server/batch-client.js +114 -0
  87. package/es/chat-engine/core/server/batch-client.js.map +1 -0
  88. package/es/chat-engine/core/server/connection-manager.d.ts +39 -0
  89. package/es/chat-engine/core/server/connection-manager.js +84 -0
  90. package/es/chat-engine/core/server/connection-manager.js.map +1 -0
  91. package/es/chat-engine/core/server/errors.d.ts +22 -0
  92. package/es/chat-engine/core/server/errors.js +80 -0
  93. package/es/chat-engine/core/server/errors.js.map +1 -0
  94. package/es/chat-engine/core/server/index.d.ts +11 -0
  95. package/es/chat-engine/core/server/index.js +26 -0
  96. package/es/chat-engine/core/server/index.js.map +1 -0
  97. package/es/chat-engine/core/server/llm-service.d.ts +44 -0
  98. package/es/chat-engine/core/server/llm-service.js +198 -0
  99. package/es/chat-engine/core/server/llm-service.js.map +1 -0
  100. package/es/chat-engine/core/server/sse-client.d.ts +77 -0
  101. package/es/chat-engine/core/server/sse-client.js +362 -0
  102. package/es/chat-engine/core/server/sse-client.js.map +1 -0
  103. package/es/chat-engine/core/server/sse-parser.d.ts +49 -0
  104. package/es/chat-engine/core/server/sse-parser.js +116 -0
  105. package/es/chat-engine/core/server/sse-parser.js.map +1 -0
  106. package/es/chat-engine/core/server/types.d.ts +54 -0
  107. package/es/chat-engine/core/server/types.js +28 -0
  108. package/es/chat-engine/core/server/types.js.map +1 -0
  109. package/es/chat-engine/core/store/message.d.ts +27 -0
  110. package/es/chat-engine/core/store/message.js +263 -0
  111. package/es/chat-engine/core/store/message.js.map +1 -0
  112. package/es/chat-engine/core/store/model.d.ts +8 -0
  113. package/es/chat-engine/core/store/model.js +65 -0
  114. package/es/chat-engine/core/store/model.js.map +1 -0
  115. package/es/chat-engine/core/store/reactiveState.d.ts +52 -0
  116. package/es/chat-engine/core/store/reactiveState.js +1359 -0
  117. package/es/chat-engine/core/store/reactiveState.js.map +1 -0
  118. package/es/chat-engine/core/type.d.ts +255 -0
  119. package/es/chat-engine/core/type.js +7 -0
  120. package/es/chat-engine/core/type.js.map +1 -0
  121. package/es/chat-engine/core/utils/eventEmitter.d.ts +10 -0
  122. package/es/chat-engine/core/utils/eventEmitter.js +67 -0
  123. package/es/chat-engine/core/utils/eventEmitter.js.map +1 -0
  124. package/es/chat-engine/core/utils/index.d.ts +33 -0
  125. package/es/chat-engine/core/utils/index.js +999 -0
  126. package/es/chat-engine/core/utils/index.js.map +1 -0
  127. package/es/chat-engine/core/utils/logger.d.ts +30 -0
  128. package/es/chat-engine/core/utils/logger.js +87 -0
  129. package/es/chat-engine/core/utils/logger.js.map +1 -0
  130. package/es/chat-engine/hooks/index.d.ts +4 -0
  131. package/es/chat-engine/hooks/index.js +20 -0
  132. package/es/chat-engine/hooks/index.js.map +1 -0
  133. package/es/chat-engine/hooks/useAgentActivity.d.ts +16 -0
  134. package/es/chat-engine/hooks/useAgentActivity.js +73 -0
  135. package/es/chat-engine/hooks/useAgentActivity.js.map +1 -0
  136. package/es/chat-engine/hooks/useAgentState.js +1 -1
  137. package/es/chat-engine/hooks/useAgentState.js.map +1 -1
  138. package/es/chat-engine/hooks/useAgentToolcall.js +1 -1
  139. package/es/chat-engine/hooks/useChat.js +3 -3
  140. package/es/chat-engine/hooks/useChat.js.map +1 -1
  141. package/es/chat-engine/index.d.ts +3 -1
  142. package/es/chat-engine/index.js +37 -3
  143. package/es/chat-engine/index.js.map +1 -1
  144. package/es/chat-filecard/_example-js/base.d.ts +1 -0
  145. package/es/chat-filecard/index.js +4 -6
  146. package/es/chat-filecard/index.js.map +1 -1
  147. package/es/chat-loading/_example-js/base.d.ts +2 -0
  148. package/es/chat-loading/_example-js/text.d.ts +2 -0
  149. package/es/chat-loading/index.js +4 -6
  150. package/es/chat-loading/index.js.map +1 -1
  151. package/es/chat-markdown/_example-js/base.d.ts +1 -0
  152. package/es/chat-markdown/_example-js/custom.d.ts +2 -0
  153. package/es/chat-markdown/_example-js/event.d.ts +1 -0
  154. package/es/chat-markdown/_example-js/footnote.d.ts +2 -0
  155. package/es/chat-markdown/_example-js/plugin.d.ts +2 -0
  156. package/es/chat-markdown/_example-js/theme.d.ts +2 -0
  157. package/es/chat-markdown/index.js +4 -6
  158. package/es/chat-markdown/index.js.map +1 -1
  159. package/es/chat-message/_example-js/action.d.ts +1 -0
  160. package/es/chat-message/_example-js/base.d.ts +1 -0
  161. package/es/chat-message/_example-js/configure.d.ts +1 -0
  162. package/es/chat-message/_example-js/content.d.ts +1 -0
  163. package/es/chat-message/_example-js/custom.d.ts +1 -0
  164. package/es/chat-message/_example-js/handle-actions.d.ts +7 -0
  165. package/es/chat-message/_example-js/status.d.ts +1 -0
  166. package/es/chat-message/_example-js/think.d.ts +1 -0
  167. package/es/chat-message/index.js +4 -6
  168. package/es/chat-message/index.js.map +1 -1
  169. package/es/chat-sender/_example-js/attachment.d.ts +2 -0
  170. package/es/chat-sender/_example-js/base.d.ts +2 -0
  171. package/es/chat-sender/_example-js/custom.d.ts +2 -0
  172. package/es/chat-sender/index.js +4 -6
  173. package/es/chat-sender/index.js.map +1 -1
  174. package/es/chat-thinking/_example-js/base.d.ts +1 -0
  175. package/es/chat-thinking/_example-js/style.d.ts +1 -0
  176. package/es/chat-thinking/index.js +4 -6
  177. package/es/chat-thinking/index.js.map +1 -1
  178. package/es/chatbot/_example-js/agent.d.ts +1 -0
  179. package/es/chatbot/_example-js/agui.d.ts +13 -0
  180. package/es/chatbot/_example-js/backup/travel.d.ts +1 -0
  181. package/es/chatbot/_example-js/basic.d.ts +1 -0
  182. package/es/chatbot/_example-js/code.d.ts +1 -0
  183. package/es/chatbot/_example-js/components/ItineraryCard.d.ts +3 -0
  184. package/es/chatbot/_example-js/components/login.d.ts +1 -0
  185. package/es/chatbot/_example-js/comprehensive.d.ts +1 -0
  186. package/es/chatbot/_example-js/custom-content.d.ts +1 -0
  187. package/es/chatbot/_example-js/custom-merge.d.ts +1 -0
  188. package/es/chatbot/_example-js/custom.d.ts +1 -0
  189. package/es/chatbot/_example-js/docs.d.ts +1 -0
  190. package/es/chatbot/_example-js/image.d.ts +1 -0
  191. package/es/chatbot/_example-js/initial-messages.d.ts +9 -0
  192. package/es/chatbot/_example-js/instance-methods.d.ts +14 -0
  193. package/es/chatbot/_example-js/nostream.d.ts +1 -0
  194. package/es/chatbot/_example-js/quick-start.d.ts +9 -0
  195. package/es/chatbot/_example-js/research.d.ts +1 -0
  196. package/es/chatbot/_example-js/role-message-config.d.ts +22 -0
  197. package/es/chatbot/_example-js/sender-config.d.ts +20 -0
  198. package/es/chatbot/_example-js/service-config.d.ts +17 -0
  199. package/es/chatbot/_example-js/simple.d.ts +1 -0
  200. package/es/chatbot/_example-js/utils/messageRenderer.d.ts +5 -0
  201. package/es/chatbot/index.js +4 -6
  202. package/es/chatbot/index.js.map +1 -1
  203. package/es/index.js +37 -9
  204. package/es/index.js.map +1 -1
  205. package/es/style/index.js +1 -1
  206. package/package.json +2 -2
  207. package/es/chatbot/components/provider/agent-state.d.ts +0 -5
  208. package/es/chatbot/components/provider/agent-state.js +0 -28
  209. package/es/chatbot/components/provider/agent-state.js.map +0 -1
  210. package/es/chatbot/components/toolcall/index.js +0 -19
  211. package/es/chatbot/components/toolcall/registry.d.ts +0 -35
  212. package/es/chatbot/components/toolcall/registry.js.map +0 -1
  213. package/es/chatbot/components/toolcall/render.d.ts +0 -13
  214. package/es/chatbot/components/toolcall/render.js +0 -207
  215. package/es/chatbot/components/toolcall/render.js.map +0 -1
  216. package/es/chatbot/components/toolcall/types.d.ts +0 -57
  217. package/es/chatbot/components/toolcall/types.js +0 -15
  218. package/es/chatbot/components/toolcall/types.js.map +0 -1
  219. package/es/chatbot/hooks/useAgentState.d.ts +0 -40
  220. package/es/chatbot/hooks/useAgentState.js +0 -76
  221. package/es/chatbot/hooks/useAgentState.js.map +0 -1
  222. package/es/chatbot/hooks/useAgentToolcall.d.ts +0 -28
  223. package/es/chatbot/hooks/useAgentToolcall.js +0 -78
  224. package/es/chatbot/hooks/useAgentToolcall.js.map +0 -1
  225. package/es/chatbot/hooks/useChat.d.ts +0 -11
  226. package/es/chatbot/hooks/useChat.js +0 -66
  227. package/es/chatbot/hooks/useChat.js.map +0 -1
@@ -0,0 +1,817 @@
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
+ }