@tdesign-react/chat 1.0.2-alpha.0 → 1.0.2-alpha.10

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 (228) 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 +55 -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 +31 -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.d.ts +1 -1
  59. package/es/chat-engine/components/toolcall/render.js +98 -25
  60. package/es/chat-engine/components/toolcall/render.js.map +1 -1
  61. package/es/chat-engine/components/toolcall/types.js +1 -1
  62. package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +109 -0
  63. package/es/chat-engine/core/adapters/agui/event-mapper.js +375 -0
  64. package/es/chat-engine/core/adapters/agui/event-mapper.js.map +1 -0
  65. package/es/chat-engine/core/adapters/agui/events.d.ts +1550 -0
  66. package/es/chat-engine/core/adapters/agui/events.js +199 -0
  67. package/es/chat-engine/core/adapters/agui/events.js.map +1 -0
  68. package/es/chat-engine/core/adapters/agui/index.d.ts +91 -0
  69. package/es/chat-engine/core/adapters/agui/index.js +189 -0
  70. package/es/chat-engine/core/adapters/agui/index.js.map +1 -0
  71. package/es/chat-engine/core/adapters/agui/state-manager.d.ts +99 -0
  72. package/es/chat-engine/core/adapters/agui/state-manager.js +168 -0
  73. package/es/chat-engine/core/adapters/agui/state-manager.js.map +1 -0
  74. package/es/chat-engine/core/adapters/agui/types.d.ts +818 -0
  75. package/es/chat-engine/core/adapters/agui/types.js +95 -0
  76. package/es/chat-engine/core/adapters/agui/types.js.map +1 -0
  77. package/es/chat-engine/core/adapters/agui/utils.d.ts +198 -0
  78. package/es/chat-engine/core/adapters/agui/utils.js +318 -0
  79. package/es/chat-engine/core/adapters/agui/utils.js.map +1 -0
  80. package/es/chat-engine/core/index.d.ts +132 -0
  81. package/es/chat-engine/core/index.js +597 -0
  82. package/es/chat-engine/core/index.js.map +1 -0
  83. package/es/chat-engine/core/processor/index.d.ts +20 -0
  84. package/es/chat-engine/core/processor/index.js +146 -0
  85. package/es/chat-engine/core/processor/index.js.map +1 -0
  86. package/es/chat-engine/core/server/batch-client.d.ts +20 -0
  87. package/es/chat-engine/core/server/batch-client.js +114 -0
  88. package/es/chat-engine/core/server/batch-client.js.map +1 -0
  89. package/es/chat-engine/core/server/connection-manager.d.ts +39 -0
  90. package/es/chat-engine/core/server/connection-manager.js +84 -0
  91. package/es/chat-engine/core/server/connection-manager.js.map +1 -0
  92. package/es/chat-engine/core/server/errors.d.ts +22 -0
  93. package/es/chat-engine/core/server/errors.js +80 -0
  94. package/es/chat-engine/core/server/errors.js.map +1 -0
  95. package/es/chat-engine/core/server/index.d.ts +11 -0
  96. package/es/chat-engine/core/server/index.js +26 -0
  97. package/es/chat-engine/core/server/index.js.map +1 -0
  98. package/es/chat-engine/core/server/llm-service.d.ts +44 -0
  99. package/es/chat-engine/core/server/llm-service.js +198 -0
  100. package/es/chat-engine/core/server/llm-service.js.map +1 -0
  101. package/es/chat-engine/core/server/sse-client.d.ts +77 -0
  102. package/es/chat-engine/core/server/sse-client.js +362 -0
  103. package/es/chat-engine/core/server/sse-client.js.map +1 -0
  104. package/es/chat-engine/core/server/sse-parser.d.ts +49 -0
  105. package/es/chat-engine/core/server/sse-parser.js +116 -0
  106. package/es/chat-engine/core/server/sse-parser.js.map +1 -0
  107. package/es/chat-engine/core/server/types.d.ts +54 -0
  108. package/es/chat-engine/core/server/types.js +28 -0
  109. package/es/chat-engine/core/server/types.js.map +1 -0
  110. package/es/chat-engine/core/store/message.d.ts +27 -0
  111. package/es/chat-engine/core/store/message.js +263 -0
  112. package/es/chat-engine/core/store/message.js.map +1 -0
  113. package/es/chat-engine/core/store/model.d.ts +8 -0
  114. package/es/chat-engine/core/store/model.js +65 -0
  115. package/es/chat-engine/core/store/model.js.map +1 -0
  116. package/es/chat-engine/core/store/reactiveState.d.ts +52 -0
  117. package/es/chat-engine/core/store/reactiveState.js +1359 -0
  118. package/es/chat-engine/core/store/reactiveState.js.map +1 -0
  119. package/es/chat-engine/core/type.d.ts +255 -0
  120. package/es/chat-engine/core/type.js +7 -0
  121. package/es/chat-engine/core/type.js.map +1 -0
  122. package/es/chat-engine/core/utils/eventEmitter.d.ts +10 -0
  123. package/es/chat-engine/core/utils/eventEmitter.js +67 -0
  124. package/es/chat-engine/core/utils/eventEmitter.js.map +1 -0
  125. package/es/chat-engine/core/utils/index.d.ts +33 -0
  126. package/es/chat-engine/core/utils/index.js +999 -0
  127. package/es/chat-engine/core/utils/index.js.map +1 -0
  128. package/es/chat-engine/core/utils/logger.d.ts +30 -0
  129. package/es/chat-engine/core/utils/logger.js +87 -0
  130. package/es/chat-engine/core/utils/logger.js.map +1 -0
  131. package/es/chat-engine/hooks/index.d.ts +4 -0
  132. package/es/chat-engine/hooks/index.js +20 -0
  133. package/es/chat-engine/hooks/index.js.map +1 -0
  134. package/es/chat-engine/hooks/useAgentActivity.d.ts +16 -0
  135. package/es/chat-engine/hooks/useAgentActivity.js +73 -0
  136. package/es/chat-engine/hooks/useAgentActivity.js.map +1 -0
  137. package/es/chat-engine/hooks/useAgentState.js +1 -1
  138. package/es/chat-engine/hooks/useAgentState.js.map +1 -1
  139. package/es/chat-engine/hooks/useAgentToolcall.js +1 -1
  140. package/es/chat-engine/hooks/useChat.js +3 -3
  141. package/es/chat-engine/hooks/useChat.js.map +1 -1
  142. package/es/chat-engine/index.d.ts +3 -3
  143. package/es/chat-engine/index.js +40 -5
  144. package/es/chat-engine/index.js.map +1 -1
  145. package/es/chat-filecard/_example-js/base.d.ts +1 -0
  146. package/es/chat-filecard/index.js +4 -6
  147. package/es/chat-filecard/index.js.map +1 -1
  148. package/es/chat-loading/_example-js/base.d.ts +2 -0
  149. package/es/chat-loading/_example-js/text.d.ts +2 -0
  150. package/es/chat-loading/index.js +4 -6
  151. package/es/chat-loading/index.js.map +1 -1
  152. package/es/chat-markdown/_example-js/base.d.ts +1 -0
  153. package/es/chat-markdown/_example-js/custom.d.ts +2 -0
  154. package/es/chat-markdown/_example-js/event.d.ts +1 -0
  155. package/es/chat-markdown/_example-js/footnote.d.ts +2 -0
  156. package/es/chat-markdown/_example-js/plugin.d.ts +2 -0
  157. package/es/chat-markdown/_example-js/theme.d.ts +2 -0
  158. package/es/chat-markdown/index.js +4 -6
  159. package/es/chat-markdown/index.js.map +1 -1
  160. package/es/chat-message/_example-js/action.d.ts +1 -0
  161. package/es/chat-message/_example-js/base.d.ts +1 -0
  162. package/es/chat-message/_example-js/configure.d.ts +1 -0
  163. package/es/chat-message/_example-js/content.d.ts +1 -0
  164. package/es/chat-message/_example-js/custom.d.ts +1 -0
  165. package/es/chat-message/_example-js/handle-actions.d.ts +7 -0
  166. package/es/chat-message/_example-js/status.d.ts +1 -0
  167. package/es/chat-message/_example-js/think.d.ts +1 -0
  168. package/es/chat-message/index.js +4 -6
  169. package/es/chat-message/index.js.map +1 -1
  170. package/es/chat-sender/_example-js/attachment.d.ts +2 -0
  171. package/es/chat-sender/_example-js/base.d.ts +2 -0
  172. package/es/chat-sender/_example-js/custom.d.ts +2 -0
  173. package/es/chat-sender/index.js +4 -6
  174. package/es/chat-sender/index.js.map +1 -1
  175. package/es/chat-thinking/_example-js/base.d.ts +1 -0
  176. package/es/chat-thinking/_example-js/style.d.ts +1 -0
  177. package/es/chat-thinking/index.js +4 -6
  178. package/es/chat-thinking/index.js.map +1 -1
  179. package/es/chatbot/_example-js/agent.d.ts +1 -0
  180. package/es/chatbot/_example-js/agui.d.ts +13 -0
  181. package/es/chatbot/_example-js/backup/travel.d.ts +1 -0
  182. package/es/chatbot/_example-js/basic.d.ts +1 -0
  183. package/es/chatbot/_example-js/code.d.ts +1 -0
  184. package/es/chatbot/_example-js/components/ItineraryCard.d.ts +3 -0
  185. package/es/chatbot/_example-js/components/login.d.ts +1 -0
  186. package/es/chatbot/_example-js/comprehensive.d.ts +1 -0
  187. package/es/chatbot/_example-js/custom-content.d.ts +1 -0
  188. package/es/chatbot/_example-js/custom-merge.d.ts +1 -0
  189. package/es/chatbot/_example-js/custom.d.ts +1 -0
  190. package/es/chatbot/_example-js/docs.d.ts +1 -0
  191. package/es/chatbot/_example-js/image.d.ts +1 -0
  192. package/es/chatbot/_example-js/initial-messages.d.ts +9 -0
  193. package/es/chatbot/_example-js/instance-methods.d.ts +14 -0
  194. package/es/chatbot/_example-js/nostream.d.ts +1 -0
  195. package/es/chatbot/_example-js/quick-start.d.ts +9 -0
  196. package/es/chatbot/_example-js/research.d.ts +1 -0
  197. package/es/chatbot/_example-js/role-message-config.d.ts +22 -0
  198. package/es/chatbot/_example-js/sender-config.d.ts +20 -0
  199. package/es/chatbot/_example-js/service-config.d.ts +17 -0
  200. package/es/chatbot/_example-js/simple.d.ts +1 -0
  201. package/es/chatbot/_example-js/utils/messageRenderer.d.ts +5 -0
  202. package/es/chatbot/index.js +4 -6
  203. package/es/chatbot/index.js.map +1 -1
  204. package/es/index.js +38 -9
  205. package/es/index.js.map +1 -1
  206. package/es/style/index.js +1 -1
  207. package/package.json +2 -2
  208. package/es/chatbot/components/provider/agent-state.d.ts +0 -5
  209. package/es/chatbot/components/provider/agent-state.js +0 -28
  210. package/es/chatbot/components/provider/agent-state.js.map +0 -1
  211. package/es/chatbot/components/toolcall/index.js +0 -19
  212. package/es/chatbot/components/toolcall/registry.d.ts +0 -35
  213. package/es/chatbot/components/toolcall/registry.js.map +0 -1
  214. package/es/chatbot/components/toolcall/render.d.ts +0 -13
  215. package/es/chatbot/components/toolcall/render.js +0 -207
  216. package/es/chatbot/components/toolcall/render.js.map +0 -1
  217. package/es/chatbot/components/toolcall/types.d.ts +0 -57
  218. package/es/chatbot/components/toolcall/types.js +0 -15
  219. package/es/chatbot/components/toolcall/types.js.map +0 -1
  220. package/es/chatbot/hooks/useAgentState.d.ts +0 -40
  221. package/es/chatbot/hooks/useAgentState.js +0 -76
  222. package/es/chatbot/hooks/useAgentState.js.map +0 -1
  223. package/es/chatbot/hooks/useAgentToolcall.d.ts +0 -28
  224. package/es/chatbot/hooks/useAgentToolcall.js +0 -78
  225. package/es/chatbot/hooks/useAgentToolcall.js.map +0 -1
  226. package/es/chatbot/hooks/useChat.d.ts +0 -11
  227. package/es/chatbot/hooks/useChat.js +0 -66
  228. package/es/chatbot/hooks/useChat.js.map +0 -1
@@ -0,0 +1,818 @@
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
+ declare const DeveloperMessageSchema: z.ZodObject<{
41
+ id: z.ZodString;
42
+ name: z.ZodOptional<z.ZodString>;
43
+ timestamp: z.ZodOptional<z.ZodNumber>;
44
+ } & {
45
+ role: z.ZodLiteral<"developer">;
46
+ content: z.ZodString;
47
+ }, "strip", z.ZodTypeAny, {
48
+ content?: string;
49
+ name?: string;
50
+ id?: string;
51
+ role?: "developer";
52
+ timestamp?: number;
53
+ }, {
54
+ content?: string;
55
+ name?: string;
56
+ id?: string;
57
+ role?: "developer";
58
+ timestamp?: number;
59
+ }>;
60
+ declare const SystemMessageSchema: z.ZodObject<{
61
+ id: z.ZodString;
62
+ name: z.ZodOptional<z.ZodString>;
63
+ timestamp: z.ZodOptional<z.ZodNumber>;
64
+ } & {
65
+ role: z.ZodLiteral<"system">;
66
+ content: z.ZodString;
67
+ }, "strip", z.ZodTypeAny, {
68
+ content?: string;
69
+ name?: string;
70
+ id?: string;
71
+ role?: "system";
72
+ timestamp?: number;
73
+ }, {
74
+ content?: string;
75
+ name?: string;
76
+ id?: string;
77
+ role?: "system";
78
+ timestamp?: number;
79
+ }>;
80
+ declare const AssistantMessageSchema: z.ZodObject<{
81
+ id: z.ZodString;
82
+ name: z.ZodOptional<z.ZodString>;
83
+ timestamp: z.ZodOptional<z.ZodNumber>;
84
+ } & {
85
+ role: z.ZodLiteral<"assistant">;
86
+ content: z.ZodOptional<z.ZodString>;
87
+ reasoningContent: z.ZodOptional<z.ZodString>;
88
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
89
+ id: z.ZodString;
90
+ type: z.ZodLiteral<"function">;
91
+ function: z.ZodObject<{
92
+ name: z.ZodString;
93
+ arguments: z.ZodString;
94
+ }, "strip", z.ZodTypeAny, {
95
+ name?: string;
96
+ arguments?: string;
97
+ }, {
98
+ name?: string;
99
+ arguments?: string;
100
+ }>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ function?: {
103
+ name?: string;
104
+ arguments?: string;
105
+ };
106
+ type?: "function";
107
+ id?: string;
108
+ }, {
109
+ function?: {
110
+ name?: string;
111
+ arguments?: string;
112
+ };
113
+ type?: "function";
114
+ id?: string;
115
+ }>, "many">>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ content?: string;
118
+ name?: string;
119
+ id?: string;
120
+ role?: "assistant";
121
+ timestamp?: number;
122
+ reasoningContent?: string;
123
+ toolCalls?: {
124
+ function?: {
125
+ name?: string;
126
+ arguments?: string;
127
+ };
128
+ type?: "function";
129
+ id?: string;
130
+ }[];
131
+ }, {
132
+ content?: string;
133
+ name?: string;
134
+ id?: string;
135
+ role?: "assistant";
136
+ timestamp?: number;
137
+ reasoningContent?: string;
138
+ toolCalls?: {
139
+ function?: {
140
+ name?: string;
141
+ arguments?: string;
142
+ };
143
+ type?: "function";
144
+ id?: string;
145
+ }[];
146
+ }>;
147
+ declare const UserMessageSchema: z.ZodObject<{
148
+ id: z.ZodString;
149
+ name: z.ZodOptional<z.ZodString>;
150
+ timestamp: z.ZodOptional<z.ZodNumber>;
151
+ } & {
152
+ role: z.ZodLiteral<"user">;
153
+ content: z.ZodString;
154
+ }, "strip", z.ZodTypeAny, {
155
+ content?: string;
156
+ name?: string;
157
+ id?: string;
158
+ role?: "user";
159
+ timestamp?: number;
160
+ }, {
161
+ content?: string;
162
+ name?: string;
163
+ id?: string;
164
+ role?: "user";
165
+ timestamp?: number;
166
+ }>;
167
+ declare const ToolMessageSchema: z.ZodObject<{
168
+ id: z.ZodString;
169
+ content: z.ZodString;
170
+ role: z.ZodLiteral<"tool">;
171
+ toolCallId: z.ZodString;
172
+ }, "strip", z.ZodTypeAny, {
173
+ content?: string;
174
+ id?: string;
175
+ role?: "tool";
176
+ toolCallId?: string;
177
+ }, {
178
+ content?: string;
179
+ id?: string;
180
+ role?: "tool";
181
+ toolCallId?: string;
182
+ }>;
183
+ declare const ActivityMessageSchema: z.ZodObject<{
184
+ id: z.ZodString;
185
+ role: z.ZodLiteral<"activity">;
186
+ activityType: z.ZodString;
187
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ content?: Record<string, any>;
190
+ activityType?: string;
191
+ id?: string;
192
+ role?: "activity";
193
+ }, {
194
+ content?: Record<string, any>;
195
+ activityType?: string;
196
+ id?: string;
197
+ role?: "activity";
198
+ }>;
199
+ export declare const AGUIMessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
200
+ id: z.ZodString;
201
+ name: z.ZodOptional<z.ZodString>;
202
+ timestamp: z.ZodOptional<z.ZodNumber>;
203
+ } & {
204
+ role: z.ZodLiteral<"developer">;
205
+ content: z.ZodString;
206
+ }, "strip", z.ZodTypeAny, {
207
+ content?: string;
208
+ name?: string;
209
+ id?: string;
210
+ role?: "developer";
211
+ timestamp?: number;
212
+ }, {
213
+ content?: string;
214
+ name?: string;
215
+ id?: string;
216
+ role?: "developer";
217
+ timestamp?: number;
218
+ }>, z.ZodObject<{
219
+ id: z.ZodString;
220
+ name: z.ZodOptional<z.ZodString>;
221
+ timestamp: z.ZodOptional<z.ZodNumber>;
222
+ } & {
223
+ role: z.ZodLiteral<"system">;
224
+ content: z.ZodString;
225
+ }, "strip", z.ZodTypeAny, {
226
+ content?: string;
227
+ name?: string;
228
+ id?: string;
229
+ role?: "system";
230
+ timestamp?: number;
231
+ }, {
232
+ content?: string;
233
+ name?: string;
234
+ id?: string;
235
+ role?: "system";
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<"assistant">;
243
+ content: z.ZodOptional<z.ZodString>;
244
+ reasoningContent: z.ZodOptional<z.ZodString>;
245
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
246
+ id: z.ZodString;
247
+ type: z.ZodLiteral<"function">;
248
+ function: z.ZodObject<{
249
+ name: z.ZodString;
250
+ arguments: z.ZodString;
251
+ }, "strip", z.ZodTypeAny, {
252
+ name?: string;
253
+ arguments?: string;
254
+ }, {
255
+ name?: string;
256
+ arguments?: string;
257
+ }>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ function?: {
260
+ name?: string;
261
+ arguments?: string;
262
+ };
263
+ type?: "function";
264
+ id?: string;
265
+ }, {
266
+ function?: {
267
+ name?: string;
268
+ arguments?: string;
269
+ };
270
+ type?: "function";
271
+ id?: string;
272
+ }>, "many">>;
273
+ }, "strip", z.ZodTypeAny, {
274
+ content?: string;
275
+ name?: string;
276
+ id?: string;
277
+ role?: "assistant";
278
+ timestamp?: number;
279
+ reasoningContent?: string;
280
+ toolCalls?: {
281
+ function?: {
282
+ name?: string;
283
+ arguments?: string;
284
+ };
285
+ type?: "function";
286
+ id?: string;
287
+ }[];
288
+ }, {
289
+ content?: string;
290
+ name?: string;
291
+ id?: string;
292
+ role?: "assistant";
293
+ timestamp?: number;
294
+ reasoningContent?: string;
295
+ toolCalls?: {
296
+ function?: {
297
+ name?: string;
298
+ arguments?: string;
299
+ };
300
+ type?: "function";
301
+ id?: string;
302
+ }[];
303
+ }>, z.ZodObject<{
304
+ id: z.ZodString;
305
+ name: z.ZodOptional<z.ZodString>;
306
+ timestamp: z.ZodOptional<z.ZodNumber>;
307
+ } & {
308
+ role: z.ZodLiteral<"user">;
309
+ content: z.ZodString;
310
+ }, "strip", z.ZodTypeAny, {
311
+ content?: string;
312
+ name?: string;
313
+ id?: string;
314
+ role?: "user";
315
+ timestamp?: number;
316
+ }, {
317
+ content?: string;
318
+ name?: string;
319
+ id?: string;
320
+ role?: "user";
321
+ timestamp?: number;
322
+ }>, z.ZodObject<{
323
+ id: z.ZodString;
324
+ content: z.ZodString;
325
+ role: z.ZodLiteral<"tool">;
326
+ toolCallId: z.ZodString;
327
+ }, "strip", z.ZodTypeAny, {
328
+ content?: string;
329
+ id?: string;
330
+ role?: "tool";
331
+ toolCallId?: string;
332
+ }, {
333
+ content?: string;
334
+ id?: string;
335
+ role?: "tool";
336
+ toolCallId?: string;
337
+ }>, z.ZodObject<{
338
+ id: z.ZodString;
339
+ role: z.ZodLiteral<"activity">;
340
+ activityType: z.ZodString;
341
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
342
+ }, "strip", z.ZodTypeAny, {
343
+ content?: Record<string, any>;
344
+ activityType?: string;
345
+ id?: string;
346
+ role?: "activity";
347
+ }, {
348
+ content?: Record<string, any>;
349
+ activityType?: string;
350
+ id?: string;
351
+ role?: "activity";
352
+ }>]>;
353
+ /**
354
+ * 历史消息相关的类型定义
355
+ *
356
+ */
357
+ export declare const HistoryMessageSchema: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
358
+ id: z.ZodString;
359
+ name: z.ZodOptional<z.ZodString>;
360
+ timestamp: z.ZodOptional<z.ZodNumber>;
361
+ } & {
362
+ role: z.ZodLiteral<"user">;
363
+ content: z.ZodString;
364
+ }, "strip", z.ZodTypeAny, {
365
+ content?: string;
366
+ name?: string;
367
+ id?: string;
368
+ role?: "user";
369
+ timestamp?: number;
370
+ }, {
371
+ content?: string;
372
+ name?: string;
373
+ id?: string;
374
+ role?: "user";
375
+ timestamp?: number;
376
+ }>, z.ZodObject<{
377
+ id: z.ZodString;
378
+ name: z.ZodOptional<z.ZodString>;
379
+ timestamp: z.ZodOptional<z.ZodNumber>;
380
+ } & {
381
+ role: z.ZodLiteral<"assistant">;
382
+ content: z.ZodOptional<z.ZodString>;
383
+ reasoningContent: z.ZodOptional<z.ZodString>;
384
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
385
+ id: z.ZodString;
386
+ type: z.ZodLiteral<"function">;
387
+ function: z.ZodObject<{
388
+ name: z.ZodString;
389
+ arguments: z.ZodString;
390
+ }, "strip", z.ZodTypeAny, {
391
+ name?: string;
392
+ arguments?: string;
393
+ }, {
394
+ name?: string;
395
+ arguments?: string;
396
+ }>;
397
+ }, "strip", z.ZodTypeAny, {
398
+ function?: {
399
+ name?: string;
400
+ arguments?: string;
401
+ };
402
+ type?: "function";
403
+ id?: string;
404
+ }, {
405
+ function?: {
406
+ name?: string;
407
+ arguments?: string;
408
+ };
409
+ type?: "function";
410
+ id?: string;
411
+ }>, "many">>;
412
+ }, "strip", z.ZodTypeAny, {
413
+ content?: string;
414
+ name?: string;
415
+ id?: string;
416
+ role?: "assistant";
417
+ timestamp?: number;
418
+ reasoningContent?: string;
419
+ toolCalls?: {
420
+ function?: {
421
+ name?: string;
422
+ arguments?: string;
423
+ };
424
+ type?: "function";
425
+ id?: string;
426
+ }[];
427
+ }, {
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
+ }>, z.ZodObject<{
443
+ id: z.ZodString;
444
+ content: z.ZodString;
445
+ role: z.ZodLiteral<"tool">;
446
+ toolCallId: z.ZodString;
447
+ }, "strip", z.ZodTypeAny, {
448
+ content?: string;
449
+ id?: string;
450
+ role?: "tool";
451
+ toolCallId?: string;
452
+ }, {
453
+ content?: string;
454
+ id?: string;
455
+ role?: "tool";
456
+ toolCallId?: string;
457
+ }>, z.ZodObject<{
458
+ id: z.ZodString;
459
+ role: z.ZodLiteral<"activity">;
460
+ activityType: z.ZodString;
461
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
462
+ }, "strip", z.ZodTypeAny, {
463
+ content?: Record<string, any>;
464
+ activityType?: string;
465
+ id?: string;
466
+ role?: "activity";
467
+ }, {
468
+ content?: Record<string, any>;
469
+ activityType?: string;
470
+ id?: string;
471
+ role?: "activity";
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 AGUIFunctionCall = z.infer<typeof FunctionCallSchema>;
799
+ export type AGUIDeveloperMessage = z.infer<typeof DeveloperMessageSchema>;
800
+ export type AGUISystemMessage = z.infer<typeof SystemMessageSchema>;
801
+ export type AGUIAssistantMessage = z.infer<typeof AssistantMessageSchema>;
802
+ export type AGUIUserMessage = z.infer<typeof UserMessageSchema>;
803
+ export type AGUIToolMessage = z.infer<typeof ToolMessageSchema>;
804
+ export type AGUIActivityMessage = z.infer<typeof ActivityMessageSchema>;
805
+ export type AGUIMessage = z.infer<typeof AGUIMessageSchema>;
806
+ export type AGUIContext = z.infer<typeof ContextSchema>;
807
+ export type AGUITool = z.infer<typeof ToolSchema>;
808
+ export type RunAgentInput = z.infer<typeof RunAgentInputSchema>;
809
+ export type AGUIState = z.infer<typeof StateSchema>;
810
+ export type AGUIRole = z.infer<typeof RoleSchema>;
811
+ export type AGUIHistoryMessage = AGUIMessage;
812
+ export type AGUIUserHistoryMessage = AGUIUserMessage;
813
+ export type AGUIAssistantHistoryMessage = AGUIAssistantMessage;
814
+ export type AGUIToolHistoryMessage = AGUIToolMessage;
815
+ export declare class AGUIError extends Error {
816
+ constructor(message: string);
817
+ }
818
+ export {};