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

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 (230) hide show
  1. package/es/_util/reactify.d.ts +2 -1
  2. package/es/_util/reactify.js +231 -81
  3. package/es/_util/reactify.js.map +1 -1
  4. package/es/_util/useDynamicStyle.js +1 -1
  5. package/es/attachments/index.js +6 -4
  6. package/es/attachments/index.js.map +1 -1
  7. package/es/chat-actionbar/index.js +6 -4
  8. package/es/chat-actionbar/index.js.map +1 -1
  9. package/es/chat-attachments/index.js +1 -3
  10. package/es/chat-attachments/index.js.map +1 -1
  11. package/es/chat-engine/components/provider/agent-state.js +2 -6
  12. package/es/chat-engine/components/provider/agent-state.js.map +1 -1
  13. package/es/chat-engine/components/toolcall/index.js +2 -7
  14. package/es/chat-engine/components/toolcall/index.js.map +1 -1
  15. package/es/chat-engine/components/toolcall/registry.js +1 -1
  16. package/es/chat-engine/components/toolcall/render.d.ts +1 -1
  17. package/es/chat-engine/components/toolcall/render.js +24 -68
  18. package/es/chat-engine/components/toolcall/render.js.map +1 -1
  19. package/es/chat-engine/components/toolcall/types.js +1 -1
  20. package/es/chat-engine/hooks/useAgentState.js +2 -6
  21. package/es/chat-engine/hooks/useAgentState.js.map +1 -1
  22. package/es/chat-engine/hooks/useAgentToolcall.js +1 -1
  23. package/es/chat-engine/hooks/useChat.d.ts +2 -2
  24. package/es/chat-engine/hooks/useChat.js +3 -37
  25. package/es/chat-engine/hooks/useChat.js.map +1 -1
  26. package/es/chat-engine/index.d.ts +1 -3
  27. package/es/chat-engine/index.js +3 -36
  28. package/es/chat-engine/index.js.map +1 -1
  29. package/es/chat-filecard/index.js +6 -4
  30. package/es/chat-filecard/index.js.map +1 -1
  31. package/es/chat-loading/index.js +6 -4
  32. package/es/chat-loading/index.js.map +1 -1
  33. package/es/chat-markdown/index.js +6 -4
  34. package/es/chat-markdown/index.js.map +1 -1
  35. package/es/chat-message/index.js +6 -4
  36. package/es/chat-message/index.js.map +1 -1
  37. package/es/chat-sender/index.js +6 -4
  38. package/es/chat-sender/index.js.map +1 -1
  39. package/es/chat-thinking/index.js +6 -4
  40. package/es/chat-thinking/index.js.map +1 -1
  41. package/es/chatbot/components/provider/agent-state.d.ts +5 -0
  42. package/es/chatbot/components/provider/agent-state.js +28 -0
  43. package/es/chatbot/components/provider/agent-state.js.map +1 -0
  44. package/es/{chat-engine/components/activity → chatbot/components/toolcall}/index.d.ts +0 -1
  45. package/es/chatbot/components/toolcall/index.js +19 -0
  46. package/es/{chat-engine/components/activity → chatbot/components/toolcall}/index.js.map +1 -1
  47. package/es/chatbot/components/toolcall/registry.d.ts +35 -0
  48. package/es/{chat-engine/components/activity → chatbot/components/toolcall}/registry.js +22 -32
  49. package/es/chatbot/components/toolcall/registry.js.map +1 -0
  50. package/es/chatbot/components/toolcall/render.d.ts +13 -0
  51. package/es/chatbot/components/toolcall/render.js +207 -0
  52. package/es/chatbot/components/toolcall/render.js.map +1 -0
  53. package/es/chatbot/components/toolcall/types.d.ts +57 -0
  54. package/es/chatbot/components/toolcall/types.js +15 -0
  55. package/es/chatbot/components/toolcall/types.js.map +1 -0
  56. package/es/chatbot/hooks/useAgentState.d.ts +40 -0
  57. package/es/chatbot/hooks/useAgentState.js +76 -0
  58. package/es/chatbot/hooks/useAgentState.js.map +1 -0
  59. package/es/chatbot/hooks/useAgentToolcall.d.ts +28 -0
  60. package/es/chatbot/hooks/useAgentToolcall.js +78 -0
  61. package/es/chatbot/hooks/useAgentToolcall.js.map +1 -0
  62. package/es/chatbot/hooks/useChat.d.ts +11 -0
  63. package/es/chatbot/hooks/useChat.js +66 -0
  64. package/es/chatbot/hooks/useChat.js.map +1 -0
  65. package/es/chatbot/index.js +6 -4
  66. package/es/chatbot/index.js.map +1 -1
  67. package/es/index.js +9 -36
  68. package/es/index.js.map +1 -1
  69. package/es/style/index.js +1 -1
  70. package/package.json +2 -2
  71. package/es/chat-actionbar/_example-js/base.d.ts +0 -2
  72. package/es/chat-actionbar/_example-js/custom.d.ts +0 -2
  73. package/es/chat-actionbar/_example-js/style.d.ts +0 -2
  74. package/es/chat-attachments/_example-js/base.d.ts +0 -2
  75. package/es/chat-attachments/_example-js/scroll-x.d.ts +0 -2
  76. package/es/chat-attachments/_example-js/scroll-y.d.ts +0 -2
  77. package/es/chat-engine/_example-js/agui-basic.d.ts +0 -10
  78. package/es/chat-engine/_example-js/agui-comprehensive.d.ts +0 -2
  79. package/es/chat-engine/_example-js/agui-test.d.ts +0 -11
  80. package/es/chat-engine/_example-js/agui-toolcall.d.ts +0 -5
  81. package/es/chat-engine/_example-js/agui-videoclip.d.ts +0 -8
  82. package/es/chat-engine/_example-js/agui.d.ts +0 -1
  83. package/es/chat-engine/_example-js/basic.d.ts +0 -9
  84. package/es/chat-engine/_example-js/components/HotelCard.d.ts +0 -3
  85. package/es/chat-engine/_example-js/components/HumanInputForm.d.ts +0 -6
  86. package/es/chat-engine/_example-js/components/HumanInputResult.d.ts +0 -3
  87. package/es/chat-engine/_example-js/components/ItineraryCard.d.ts +0 -3
  88. package/es/chat-engine/_example-js/components/PlanningStatePanel.d.ts +0 -4
  89. package/es/chat-engine/_example-js/components/Toolcall.d.ts +0 -4
  90. package/es/chat-engine/_example-js/components/WeatherCard.d.ts +0 -3
  91. package/es/chat-engine/_example-js/components/login.d.ts +0 -1
  92. package/es/chat-engine/_example-js/comprehensive.d.ts +0 -12
  93. package/es/chat-engine/_example-js/custom-content.d.ts +0 -1
  94. package/es/chat-engine/_example-js/hookComponent.d.ts +0 -1
  95. package/es/chat-engine/_example-js/initial-messages.d.ts +0 -9
  96. package/es/chat-engine/_example-js/instance-methods.d.ts +0 -13
  97. package/es/chat-engine/_example-js/travel-actions.d.ts +0 -91
  98. package/es/chat-engine/_example-js/travelToolcall.d.ts +0 -1
  99. package/es/chat-engine/components/activity/index.js +0 -18
  100. package/es/chat-engine/components/activity/registry.d.ts +0 -44
  101. package/es/chat-engine/components/activity/registry.js.map +0 -1
  102. package/es/chat-engine/components/activity/render.d.ts +0 -11
  103. package/es/chat-engine/components/activity/render.js +0 -107
  104. package/es/chat-engine/components/activity/render.js.map +0 -1
  105. package/es/chat-engine/components/activity/types.d.ts +0 -32
  106. package/es/chat-engine/components/activity/types.js +0 -7
  107. package/es/chat-engine/components/activity/types.js.map +0 -1
  108. package/es/chat-engine/components/index.d.ts +0 -3
  109. package/es/chat-engine/components/index.js +0 -30
  110. package/es/chat-engine/components/index.js.map +0 -1
  111. package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +0 -109
  112. package/es/chat-engine/core/adapters/agui/event-mapper.js +0 -370
  113. package/es/chat-engine/core/adapters/agui/event-mapper.js.map +0 -1
  114. package/es/chat-engine/core/adapters/agui/events.d.ts +0 -1550
  115. package/es/chat-engine/core/adapters/agui/events.js +0 -199
  116. package/es/chat-engine/core/adapters/agui/events.js.map +0 -1
  117. package/es/chat-engine/core/adapters/agui/index.d.ts +0 -75
  118. package/es/chat-engine/core/adapters/agui/index.js +0 -175
  119. package/es/chat-engine/core/adapters/agui/index.js.map +0 -1
  120. package/es/chat-engine/core/adapters/agui/state-manager.d.ts +0 -99
  121. package/es/chat-engine/core/adapters/agui/state-manager.js +0 -168
  122. package/es/chat-engine/core/adapters/agui/state-manager.js.map +0 -1
  123. package/es/chat-engine/core/adapters/agui/types.d.ts +0 -817
  124. package/es/chat-engine/core/adapters/agui/types.js +0 -95
  125. package/es/chat-engine/core/adapters/agui/types.js.map +0 -1
  126. package/es/chat-engine/core/adapters/agui/utils.d.ts +0 -197
  127. package/es/chat-engine/core/adapters/agui/utils.js +0 -311
  128. package/es/chat-engine/core/adapters/agui/utils.js.map +0 -1
  129. package/es/chat-engine/core/index.d.ts +0 -132
  130. package/es/chat-engine/core/index.js +0 -597
  131. package/es/chat-engine/core/index.js.map +0 -1
  132. package/es/chat-engine/core/processor/index.d.ts +0 -20
  133. package/es/chat-engine/core/processor/index.js +0 -146
  134. package/es/chat-engine/core/processor/index.js.map +0 -1
  135. package/es/chat-engine/core/server/batch-client.d.ts +0 -20
  136. package/es/chat-engine/core/server/batch-client.js +0 -114
  137. package/es/chat-engine/core/server/batch-client.js.map +0 -1
  138. package/es/chat-engine/core/server/connection-manager.d.ts +0 -39
  139. package/es/chat-engine/core/server/connection-manager.js +0 -84
  140. package/es/chat-engine/core/server/connection-manager.js.map +0 -1
  141. package/es/chat-engine/core/server/errors.d.ts +0 -22
  142. package/es/chat-engine/core/server/errors.js +0 -80
  143. package/es/chat-engine/core/server/errors.js.map +0 -1
  144. package/es/chat-engine/core/server/index.d.ts +0 -11
  145. package/es/chat-engine/core/server/index.js +0 -26
  146. package/es/chat-engine/core/server/index.js.map +0 -1
  147. package/es/chat-engine/core/server/llm-service.d.ts +0 -44
  148. package/es/chat-engine/core/server/llm-service.js +0 -198
  149. package/es/chat-engine/core/server/llm-service.js.map +0 -1
  150. package/es/chat-engine/core/server/sse-client.d.ts +0 -77
  151. package/es/chat-engine/core/server/sse-client.js +0 -362
  152. package/es/chat-engine/core/server/sse-client.js.map +0 -1
  153. package/es/chat-engine/core/server/sse-parser.d.ts +0 -49
  154. package/es/chat-engine/core/server/sse-parser.js +0 -116
  155. package/es/chat-engine/core/server/sse-parser.js.map +0 -1
  156. package/es/chat-engine/core/server/types.d.ts +0 -54
  157. package/es/chat-engine/core/server/types.js +0 -28
  158. package/es/chat-engine/core/server/types.js.map +0 -1
  159. package/es/chat-engine/core/store/message.d.ts +0 -27
  160. package/es/chat-engine/core/store/message.js +0 -263
  161. package/es/chat-engine/core/store/message.js.map +0 -1
  162. package/es/chat-engine/core/store/model.d.ts +0 -8
  163. package/es/chat-engine/core/store/model.js +0 -65
  164. package/es/chat-engine/core/store/model.js.map +0 -1
  165. package/es/chat-engine/core/store/reactiveState.d.ts +0 -52
  166. package/es/chat-engine/core/store/reactiveState.js +0 -1359
  167. package/es/chat-engine/core/store/reactiveState.js.map +0 -1
  168. package/es/chat-engine/core/type.d.ts +0 -255
  169. package/es/chat-engine/core/type.js +0 -7
  170. package/es/chat-engine/core/type.js.map +0 -1
  171. package/es/chat-engine/core/utils/eventEmitter.d.ts +0 -10
  172. package/es/chat-engine/core/utils/eventEmitter.js +0 -67
  173. package/es/chat-engine/core/utils/eventEmitter.js.map +0 -1
  174. package/es/chat-engine/core/utils/index.d.ts +0 -33
  175. package/es/chat-engine/core/utils/index.js +0 -999
  176. package/es/chat-engine/core/utils/index.js.map +0 -1
  177. package/es/chat-engine/core/utils/logger.d.ts +0 -30
  178. package/es/chat-engine/core/utils/logger.js +0 -87
  179. package/es/chat-engine/core/utils/logger.js.map +0 -1
  180. package/es/chat-engine/hooks/index.d.ts +0 -4
  181. package/es/chat-engine/hooks/index.js +0 -50
  182. package/es/chat-engine/hooks/index.js.map +0 -1
  183. package/es/chat-engine/hooks/useAgentActivity.d.ts +0 -16
  184. package/es/chat-engine/hooks/useAgentActivity.js +0 -73
  185. package/es/chat-engine/hooks/useAgentActivity.js.map +0 -1
  186. package/es/chat-filecard/_example-js/base.d.ts +0 -1
  187. package/es/chat-loading/_example-js/base.d.ts +0 -2
  188. package/es/chat-loading/_example-js/text.d.ts +0 -2
  189. package/es/chat-markdown/_example-js/base.d.ts +0 -1
  190. package/es/chat-markdown/_example-js/custom.d.ts +0 -2
  191. package/es/chat-markdown/_example-js/event.d.ts +0 -1
  192. package/es/chat-markdown/_example-js/footnote.d.ts +0 -2
  193. package/es/chat-markdown/_example-js/plugin.d.ts +0 -2
  194. package/es/chat-markdown/_example-js/theme.d.ts +0 -2
  195. package/es/chat-message/_example-js/action.d.ts +0 -1
  196. package/es/chat-message/_example-js/base.d.ts +0 -1
  197. package/es/chat-message/_example-js/configure.d.ts +0 -1
  198. package/es/chat-message/_example-js/content.d.ts +0 -1
  199. package/es/chat-message/_example-js/custom.d.ts +0 -1
  200. package/es/chat-message/_example-js/handle-actions.d.ts +0 -7
  201. package/es/chat-message/_example-js/status.d.ts +0 -1
  202. package/es/chat-message/_example-js/think.d.ts +0 -1
  203. package/es/chat-sender/_example-js/attachment.d.ts +0 -2
  204. package/es/chat-sender/_example-js/base.d.ts +0 -2
  205. package/es/chat-sender/_example-js/custom.d.ts +0 -2
  206. package/es/chat-thinking/_example-js/base.d.ts +0 -1
  207. package/es/chat-thinking/_example-js/style.d.ts +0 -1
  208. package/es/chatbot/_example-js/agent.d.ts +0 -1
  209. package/es/chatbot/_example-js/agui.d.ts +0 -13
  210. package/es/chatbot/_example-js/backup/travel.d.ts +0 -1
  211. package/es/chatbot/_example-js/basic.d.ts +0 -1
  212. package/es/chatbot/_example-js/code.d.ts +0 -1
  213. package/es/chatbot/_example-js/components/ItineraryCard.d.ts +0 -3
  214. package/es/chatbot/_example-js/components/login.d.ts +0 -1
  215. package/es/chatbot/_example-js/comprehensive.d.ts +0 -1
  216. package/es/chatbot/_example-js/custom-content.d.ts +0 -1
  217. package/es/chatbot/_example-js/custom-merge.d.ts +0 -1
  218. package/es/chatbot/_example-js/custom.d.ts +0 -1
  219. package/es/chatbot/_example-js/docs.d.ts +0 -1
  220. package/es/chatbot/_example-js/image.d.ts +0 -1
  221. package/es/chatbot/_example-js/initial-messages.d.ts +0 -9
  222. package/es/chatbot/_example-js/instance-methods.d.ts +0 -14
  223. package/es/chatbot/_example-js/nostream.d.ts +0 -1
  224. package/es/chatbot/_example-js/quick-start.d.ts +0 -9
  225. package/es/chatbot/_example-js/research.d.ts +0 -1
  226. package/es/chatbot/_example-js/role-message-config.d.ts +0 -22
  227. package/es/chatbot/_example-js/sender-config.d.ts +0 -20
  228. package/es/chatbot/_example-js/service-config.d.ts +0 -17
  229. package/es/chatbot/_example-js/simple.d.ts +0 -1
  230. package/es/chatbot/_example-js/utils/messageRenderer.d.ts +0 -5
@@ -1,817 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const FunctionCallSchema: z.ZodObject<{
3
- name: z.ZodString;
4
- arguments: z.ZodString;
5
- }, "strip", z.ZodTypeAny, {
6
- name?: string;
7
- arguments?: string;
8
- }, {
9
- name?: string;
10
- arguments?: string;
11
- }>;
12
- export declare const ToolCallSchema: z.ZodObject<{
13
- id: z.ZodString;
14
- type: z.ZodLiteral<"function">;
15
- function: z.ZodObject<{
16
- name: z.ZodString;
17
- arguments: z.ZodString;
18
- }, "strip", z.ZodTypeAny, {
19
- name?: string;
20
- arguments?: string;
21
- }, {
22
- name?: string;
23
- arguments?: string;
24
- }>;
25
- }, "strip", z.ZodTypeAny, {
26
- function?: {
27
- name?: string;
28
- arguments?: string;
29
- };
30
- type?: "function";
31
- id?: string;
32
- }, {
33
- function?: {
34
- name?: string;
35
- arguments?: string;
36
- };
37
- type?: "function";
38
- id?: string;
39
- }>;
40
- export declare const BaseMessageSchema: z.ZodObject<{
41
- id: z.ZodString;
42
- role: z.ZodString;
43
- content: z.ZodOptional<z.ZodString>;
44
- name: z.ZodOptional<z.ZodString>;
45
- timestamp: z.ZodOptional<z.ZodNumber>;
46
- }, "strip", z.ZodTypeAny, {
47
- content?: string;
48
- name?: string;
49
- id?: string;
50
- role?: string;
51
- timestamp?: number;
52
- }, {
53
- content?: string;
54
- name?: string;
55
- id?: string;
56
- role?: string;
57
- timestamp?: number;
58
- }>;
59
- export declare const DeveloperMessageSchema: z.ZodObject<{
60
- id: z.ZodString;
61
- name: z.ZodOptional<z.ZodString>;
62
- timestamp: z.ZodOptional<z.ZodNumber>;
63
- } & {
64
- role: z.ZodLiteral<"developer">;
65
- content: z.ZodString;
66
- }, "strip", z.ZodTypeAny, {
67
- content?: string;
68
- name?: string;
69
- id?: string;
70
- role?: "developer";
71
- timestamp?: number;
72
- }, {
73
- content?: string;
74
- name?: string;
75
- id?: string;
76
- role?: "developer";
77
- timestamp?: number;
78
- }>;
79
- export declare const SystemMessageSchema: z.ZodObject<{
80
- id: z.ZodString;
81
- name: z.ZodOptional<z.ZodString>;
82
- timestamp: z.ZodOptional<z.ZodNumber>;
83
- } & {
84
- role: z.ZodLiteral<"system">;
85
- content: z.ZodString;
86
- }, "strip", z.ZodTypeAny, {
87
- content?: string;
88
- name?: string;
89
- id?: string;
90
- role?: "system";
91
- timestamp?: number;
92
- }, {
93
- content?: string;
94
- name?: string;
95
- id?: string;
96
- role?: "system";
97
- timestamp?: number;
98
- }>;
99
- export declare const AssistantMessageSchema: z.ZodObject<{
100
- id: z.ZodString;
101
- name: z.ZodOptional<z.ZodString>;
102
- timestamp: z.ZodOptional<z.ZodNumber>;
103
- } & {
104
- role: z.ZodLiteral<"assistant">;
105
- content: z.ZodOptional<z.ZodString>;
106
- reasoningContent: z.ZodOptional<z.ZodString>;
107
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
108
- id: z.ZodString;
109
- type: z.ZodLiteral<"function">;
110
- function: z.ZodObject<{
111
- name: z.ZodString;
112
- arguments: z.ZodString;
113
- }, "strip", z.ZodTypeAny, {
114
- name?: string;
115
- arguments?: string;
116
- }, {
117
- name?: string;
118
- arguments?: string;
119
- }>;
120
- }, "strip", z.ZodTypeAny, {
121
- function?: {
122
- name?: string;
123
- arguments?: string;
124
- };
125
- type?: "function";
126
- id?: string;
127
- }, {
128
- function?: {
129
- name?: string;
130
- arguments?: string;
131
- };
132
- type?: "function";
133
- id?: string;
134
- }>, "many">>;
135
- }, "strip", z.ZodTypeAny, {
136
- content?: string;
137
- name?: string;
138
- id?: string;
139
- role?: "assistant";
140
- timestamp?: number;
141
- reasoningContent?: string;
142
- toolCalls?: {
143
- function?: {
144
- name?: string;
145
- arguments?: string;
146
- };
147
- type?: "function";
148
- id?: string;
149
- }[];
150
- }, {
151
- content?: string;
152
- name?: string;
153
- id?: string;
154
- role?: "assistant";
155
- timestamp?: number;
156
- reasoningContent?: string;
157
- toolCalls?: {
158
- function?: {
159
- name?: string;
160
- arguments?: string;
161
- };
162
- type?: "function";
163
- id?: string;
164
- }[];
165
- }>;
166
- export declare const UserMessageSchema: z.ZodObject<{
167
- id: z.ZodString;
168
- name: z.ZodOptional<z.ZodString>;
169
- timestamp: z.ZodOptional<z.ZodNumber>;
170
- } & {
171
- role: z.ZodLiteral<"user">;
172
- content: z.ZodString;
173
- }, "strip", z.ZodTypeAny, {
174
- content?: string;
175
- name?: string;
176
- id?: string;
177
- role?: "user";
178
- timestamp?: number;
179
- }, {
180
- content?: string;
181
- name?: string;
182
- id?: string;
183
- role?: "user";
184
- timestamp?: number;
185
- }>;
186
- export declare const ToolMessageSchema: z.ZodObject<{
187
- id: z.ZodString;
188
- content: z.ZodString;
189
- role: z.ZodLiteral<"tool">;
190
- toolCallId: z.ZodString;
191
- }, "strip", z.ZodTypeAny, {
192
- content?: string;
193
- id?: string;
194
- role?: "tool";
195
- toolCallId?: string;
196
- }, {
197
- content?: string;
198
- id?: string;
199
- role?: "tool";
200
- toolCallId?: string;
201
- }>;
202
- export declare const ActivityMessageSchema: z.ZodObject<{
203
- id: z.ZodString;
204
- role: z.ZodLiteral<"activity">;
205
- activityType: z.ZodString;
206
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
207
- }, "strip", z.ZodTypeAny, {
208
- content?: Record<string, any>;
209
- id?: string;
210
- role?: "activity";
211
- activityType?: string;
212
- }, {
213
- content?: Record<string, any>;
214
- id?: string;
215
- role?: "activity";
216
- activityType?: string;
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
- id?: string;
364
- role?: "activity";
365
- activityType?: string;
366
- }, {
367
- content?: Record<string, any>;
368
- id?: string;
369
- role?: "activity";
370
- activityType?: string;
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
- id?: string;
647
- role?: "activity";
648
- activityType?: string;
649
- }, {
650
- content?: Record<string, any>;
651
- id?: string;
652
- role?: "activity";
653
- activityType?: string;
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
- threadId?: string;
681
- runId?: string;
682
- state?: any;
683
- messages?: ({
684
- content?: string;
685
- name?: string;
686
- id?: string;
687
- role?: "developer";
688
- timestamp?: number;
689
- } | {
690
- content?: string;
691
- name?: string;
692
- id?: string;
693
- role?: "system";
694
- timestamp?: number;
695
- } | {
696
- content?: string;
697
- name?: string;
698
- id?: string;
699
- role?: "assistant";
700
- timestamp?: number;
701
- reasoningContent?: string;
702
- toolCalls?: {
703
- function?: {
704
- name?: string;
705
- arguments?: string;
706
- };
707
- type?: "function";
708
- id?: string;
709
- }[];
710
- } | {
711
- content?: string;
712
- name?: string;
713
- id?: string;
714
- role?: "user";
715
- timestamp?: number;
716
- } | {
717
- content?: string;
718
- id?: string;
719
- role?: "tool";
720
- toolCallId?: string;
721
- } | {
722
- content?: Record<string, any>;
723
- id?: string;
724
- role?: "activity";
725
- activityType?: string;
726
- })[];
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
- threadId?: string;
739
- runId?: string;
740
- state?: any;
741
- messages?: ({
742
- content?: string;
743
- name?: string;
744
- id?: string;
745
- role?: "developer";
746
- timestamp?: number;
747
- } | {
748
- content?: string;
749
- name?: string;
750
- id?: string;
751
- role?: "system";
752
- timestamp?: number;
753
- } | {
754
- content?: string;
755
- name?: string;
756
- id?: string;
757
- role?: "assistant";
758
- timestamp?: number;
759
- reasoningContent?: string;
760
- toolCalls?: {
761
- function?: {
762
- name?: string;
763
- arguments?: string;
764
- };
765
- type?: "function";
766
- id?: string;
767
- }[];
768
- } | {
769
- content?: string;
770
- name?: string;
771
- id?: string;
772
- role?: "user";
773
- timestamp?: number;
774
- } | {
775
- content?: string;
776
- id?: string;
777
- role?: "tool";
778
- toolCallId?: string;
779
- } | {
780
- content?: Record<string, any>;
781
- id?: string;
782
- role?: "activity";
783
- activityType?: string;
784
- })[];
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
- }