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

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,1550 +0,0 @@
1
- import { z } from 'zod';
2
- export type ToolCallEventType = 'TOOL_CALL_START' | 'TOOL_CALL_ARGS' | 'TOOL_CALL_END' | 'TOOL_CALL_CHUNK' | 'TOOL_CALL_RESULT';
3
- export declare enum EventType {
4
- TEXT_MESSAGE_START = "TEXT_MESSAGE_START",
5
- TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT",
6
- TEXT_MESSAGE_END = "TEXT_MESSAGE_END",
7
- TEXT_MESSAGE_CHUNK = "TEXT_MESSAGE_CHUNK",
8
- THINKING_TEXT_MESSAGE_START = "THINKING_TEXT_MESSAGE_START",
9
- THINKING_TEXT_MESSAGE_CONTENT = "THINKING_TEXT_MESSAGE_CONTENT",
10
- THINKING_TEXT_MESSAGE_END = "THINKING_TEXT_MESSAGE_END",
11
- THINKING_START = "THINKING_START",
12
- THINKING_END = "THINKING_END",
13
- TOOL_CALL_START = "TOOL_CALL_START",
14
- TOOL_CALL_ARGS = "TOOL_CALL_ARGS",
15
- TOOL_CALL_END = "TOOL_CALL_END",
16
- TOOL_CALL_CHUNK = "TOOL_CALL_CHUNK",
17
- TOOL_CALL_RESULT = "TOOL_CALL_RESULT",
18
- ACTIVITY_SNAPSHOT = "ACTIVITY_SNAPSHOT",
19
- ACTIVITY_DELTA = "ACTIVITY_DELTA",
20
- STATE_SNAPSHOT = "STATE_SNAPSHOT",
21
- STATE_DELTA = "STATE_DELTA",
22
- MESSAGES_SNAPSHOT = "MESSAGES_SNAPSHOT",
23
- RAW = "RAW",
24
- CUSTOM = "CUSTOM",
25
- RUN_STARTED = "RUN_STARTED",
26
- RUN_FINISHED = "RUN_FINISHED",
27
- RUN_ERROR = "RUN_ERROR",
28
- STEP_STARTED = "STEP_STARTED",
29
- STEP_FINISHED = "STEP_FINISHED"
30
- }
31
- /**
32
- * 检查事件类型是否为文本消息相关
33
- * @param eventType 事件类型
34
- * @returns 是否为文本消息事件
35
- */
36
- export declare function isTextMessageEvent(eventType: string): boolean;
37
- /**
38
- * 检查事件类型是否为思考相关
39
- * @param eventType 事件类型
40
- * @returns 是否为思考事件
41
- */
42
- export declare function isThinkingEvent(eventType: string): boolean;
43
- /**
44
- * 检查事件类型是否为工具调用相关
45
- * @param eventType 事件类型
46
- * @returns 是否为工具调用事件
47
- */
48
- export declare function isToolCallEvent(eventType: string): boolean;
49
- /**
50
- * 检查事件类型是否为活动相关
51
- * @param eventType 事件类型
52
- * @returns 是否为活动事件
53
- */
54
- export declare function isActivityEvent(eventType: string): boolean;
55
- /**
56
- * 检查事件类型是否为状态相关
57
- * @param eventType 事件类型
58
- * @returns 是否为状态事件
59
- */
60
- export declare function isStateEvent(eventType: string): boolean;
61
- declare const BaseEventSchema: z.ZodObject<{
62
- type: z.ZodNativeEnum<typeof EventType>;
63
- timestamp: z.ZodOptional<z.ZodNumber>;
64
- rawEvent: z.ZodOptional<z.ZodAny>;
65
- }, "strip", z.ZodTypeAny, {
66
- type?: EventType;
67
- timestamp?: number;
68
- rawEvent?: any;
69
- }, {
70
- type?: EventType;
71
- timestamp?: number;
72
- rawEvent?: any;
73
- }>;
74
- export declare const TextMessageStartEventSchema: z.ZodObject<{
75
- timestamp: z.ZodOptional<z.ZodNumber>;
76
- rawEvent: z.ZodOptional<z.ZodAny>;
77
- } & {
78
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
79
- messageId: z.ZodString;
80
- role: z.ZodLiteral<"assistant">;
81
- }, "strip", z.ZodTypeAny, {
82
- type?: EventType.TEXT_MESSAGE_START;
83
- role?: "assistant";
84
- timestamp?: number;
85
- rawEvent?: any;
86
- messageId?: string;
87
- }, {
88
- type?: EventType.TEXT_MESSAGE_START;
89
- role?: "assistant";
90
- timestamp?: number;
91
- rawEvent?: any;
92
- messageId?: string;
93
- }>;
94
- export declare const TextMessageContentEventSchema: z.ZodObject<{
95
- timestamp: z.ZodOptional<z.ZodNumber>;
96
- rawEvent: z.ZodOptional<z.ZodAny>;
97
- } & {
98
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
99
- messageId: z.ZodString;
100
- delta: z.ZodEffects<z.ZodString, string, string>;
101
- }, "strip", z.ZodTypeAny, {
102
- type?: EventType.TEXT_MESSAGE_CONTENT;
103
- timestamp?: number;
104
- rawEvent?: any;
105
- messageId?: string;
106
- delta?: string;
107
- }, {
108
- type?: EventType.TEXT_MESSAGE_CONTENT;
109
- timestamp?: number;
110
- rawEvent?: any;
111
- messageId?: string;
112
- delta?: string;
113
- }>;
114
- export declare const TextMessageEndEventSchema: z.ZodObject<{
115
- timestamp: z.ZodOptional<z.ZodNumber>;
116
- rawEvent: z.ZodOptional<z.ZodAny>;
117
- } & {
118
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
119
- messageId: z.ZodString;
120
- }, "strip", z.ZodTypeAny, {
121
- type?: EventType.TEXT_MESSAGE_END;
122
- timestamp?: number;
123
- rawEvent?: any;
124
- messageId?: string;
125
- }, {
126
- type?: EventType.TEXT_MESSAGE_END;
127
- timestamp?: number;
128
- rawEvent?: any;
129
- messageId?: string;
130
- }>;
131
- export declare const TextMessageChunkEventSchema: z.ZodObject<{
132
- timestamp: z.ZodOptional<z.ZodNumber>;
133
- rawEvent: z.ZodOptional<z.ZodAny>;
134
- } & {
135
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
136
- messageId: z.ZodOptional<z.ZodString>;
137
- role: z.ZodOptional<z.ZodLiteral<"assistant">>;
138
- delta: z.ZodOptional<z.ZodString>;
139
- }, "strip", z.ZodTypeAny, {
140
- type?: EventType.TEXT_MESSAGE_CHUNK;
141
- role?: "assistant";
142
- timestamp?: number;
143
- rawEvent?: any;
144
- messageId?: string;
145
- delta?: string;
146
- }, {
147
- type?: EventType.TEXT_MESSAGE_CHUNK;
148
- role?: "assistant";
149
- timestamp?: number;
150
- rawEvent?: any;
151
- messageId?: string;
152
- delta?: string;
153
- }>;
154
- export declare const ThinkingTextMessageStartEventSchema: z.ZodObject<{
155
- timestamp: z.ZodOptional<z.ZodNumber>;
156
- rawEvent: z.ZodOptional<z.ZodAny>;
157
- } & {
158
- type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
159
- }, "strip", z.ZodTypeAny, {
160
- type?: EventType.THINKING_TEXT_MESSAGE_START;
161
- timestamp?: number;
162
- rawEvent?: any;
163
- }, {
164
- type?: EventType.THINKING_TEXT_MESSAGE_START;
165
- timestamp?: number;
166
- rawEvent?: any;
167
- }>;
168
- export declare const ThinkingTextMessageContentEventSchema: z.ZodObject<Omit<{
169
- timestamp: z.ZodOptional<z.ZodNumber>;
170
- rawEvent: z.ZodOptional<z.ZodAny>;
171
- } & {
172
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
173
- messageId: z.ZodString;
174
- delta: z.ZodEffects<z.ZodString, string, string>;
175
- }, "type" | "messageId"> & {
176
- type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
177
- }, "strip", z.ZodTypeAny, {
178
- type?: EventType.THINKING_TEXT_MESSAGE_CONTENT;
179
- timestamp?: number;
180
- rawEvent?: any;
181
- delta?: string;
182
- }, {
183
- type?: EventType.THINKING_TEXT_MESSAGE_CONTENT;
184
- timestamp?: number;
185
- rawEvent?: any;
186
- delta?: string;
187
- }>;
188
- export declare const ThinkingTextMessageEndEventSchema: z.ZodObject<{
189
- timestamp: z.ZodOptional<z.ZodNumber>;
190
- rawEvent: z.ZodOptional<z.ZodAny>;
191
- } & {
192
- type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
193
- }, "strip", z.ZodTypeAny, {
194
- type?: EventType.THINKING_TEXT_MESSAGE_END;
195
- timestamp?: number;
196
- rawEvent?: any;
197
- }, {
198
- type?: EventType.THINKING_TEXT_MESSAGE_END;
199
- timestamp?: number;
200
- rawEvent?: any;
201
- }>;
202
- export declare const ToolCallStartEventSchema: z.ZodObject<{
203
- timestamp: z.ZodOptional<z.ZodNumber>;
204
- rawEvent: z.ZodOptional<z.ZodAny>;
205
- } & {
206
- type: z.ZodLiteral<EventType.TOOL_CALL_START>;
207
- toolCallId: z.ZodString;
208
- toolCallName: z.ZodString;
209
- parentMessageId: z.ZodOptional<z.ZodString>;
210
- }, "strip", z.ZodTypeAny, {
211
- type?: EventType.TOOL_CALL_START;
212
- timestamp?: number;
213
- toolCallId?: string;
214
- rawEvent?: any;
215
- toolCallName?: string;
216
- parentMessageId?: string;
217
- }, {
218
- type?: EventType.TOOL_CALL_START;
219
- timestamp?: number;
220
- toolCallId?: string;
221
- rawEvent?: any;
222
- toolCallName?: string;
223
- parentMessageId?: string;
224
- }>;
225
- export declare const ToolCallArgsEventSchema: z.ZodObject<{
226
- timestamp: z.ZodOptional<z.ZodNumber>;
227
- rawEvent: z.ZodOptional<z.ZodAny>;
228
- } & {
229
- type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
230
- toolCallId: z.ZodString;
231
- delta: z.ZodString;
232
- }, "strip", z.ZodTypeAny, {
233
- type?: EventType.TOOL_CALL_ARGS;
234
- timestamp?: number;
235
- toolCallId?: string;
236
- rawEvent?: any;
237
- delta?: string;
238
- }, {
239
- type?: EventType.TOOL_CALL_ARGS;
240
- timestamp?: number;
241
- toolCallId?: string;
242
- rawEvent?: any;
243
- delta?: string;
244
- }>;
245
- export declare const ToolCallEndEventSchema: z.ZodObject<{
246
- timestamp: z.ZodOptional<z.ZodNumber>;
247
- rawEvent: z.ZodOptional<z.ZodAny>;
248
- } & {
249
- type: z.ZodLiteral<EventType.TOOL_CALL_END>;
250
- toolCallId: z.ZodString;
251
- }, "strip", z.ZodTypeAny, {
252
- type?: EventType.TOOL_CALL_END;
253
- timestamp?: number;
254
- toolCallId?: string;
255
- rawEvent?: any;
256
- }, {
257
- type?: EventType.TOOL_CALL_END;
258
- timestamp?: number;
259
- toolCallId?: string;
260
- rawEvent?: any;
261
- }>;
262
- export declare const ToolCallResultEventSchema: z.ZodObject<{
263
- timestamp: z.ZodOptional<z.ZodNumber>;
264
- rawEvent: z.ZodOptional<z.ZodAny>;
265
- } & {
266
- messageId: z.ZodString;
267
- type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
268
- toolCallId: z.ZodString;
269
- toolCallName: z.ZodString;
270
- content: z.ZodString;
271
- role: z.ZodOptional<z.ZodLiteral<"tool">>;
272
- }, "strip", z.ZodTypeAny, {
273
- content?: string;
274
- type?: EventType.TOOL_CALL_RESULT;
275
- role?: "tool";
276
- timestamp?: number;
277
- toolCallId?: string;
278
- rawEvent?: any;
279
- messageId?: string;
280
- toolCallName?: string;
281
- }, {
282
- content?: string;
283
- type?: EventType.TOOL_CALL_RESULT;
284
- role?: "tool";
285
- timestamp?: number;
286
- toolCallId?: string;
287
- rawEvent?: any;
288
- messageId?: string;
289
- toolCallName?: string;
290
- }>;
291
- export declare const ToolCallChunkEventSchema: z.ZodObject<{
292
- timestamp: z.ZodOptional<z.ZodNumber>;
293
- rawEvent: z.ZodOptional<z.ZodAny>;
294
- } & {
295
- type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
296
- toolCallId: z.ZodOptional<z.ZodString>;
297
- toolCallName: z.ZodOptional<z.ZodString>;
298
- parentMessageId: z.ZodOptional<z.ZodString>;
299
- delta: z.ZodOptional<z.ZodString>;
300
- }, "strip", z.ZodTypeAny, {
301
- type?: EventType.TOOL_CALL_CHUNK;
302
- timestamp?: number;
303
- toolCallId?: string;
304
- rawEvent?: any;
305
- delta?: string;
306
- toolCallName?: string;
307
- parentMessageId?: string;
308
- }, {
309
- type?: EventType.TOOL_CALL_CHUNK;
310
- timestamp?: number;
311
- toolCallId?: string;
312
- rawEvent?: any;
313
- delta?: string;
314
- toolCallName?: string;
315
- parentMessageId?: string;
316
- }>;
317
- export declare const ActivitySnapshotEventSchema: z.ZodObject<{
318
- timestamp: z.ZodOptional<z.ZodNumber>;
319
- rawEvent: z.ZodOptional<z.ZodAny>;
320
- } & {
321
- type: z.ZodLiteral<EventType.ACTIVITY_SNAPSHOT>;
322
- messageId: z.ZodOptional<z.ZodString>;
323
- activityType: z.ZodString;
324
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
325
- replace: z.ZodOptional<z.ZodBoolean>;
326
- }, "strip", z.ZodTypeAny, {
327
- replace?: boolean;
328
- content?: Record<string, any>;
329
- type?: EventType.ACTIVITY_SNAPSHOT;
330
- timestamp?: number;
331
- activityType?: string;
332
- rawEvent?: any;
333
- messageId?: string;
334
- }, {
335
- replace?: boolean;
336
- content?: Record<string, any>;
337
- type?: EventType.ACTIVITY_SNAPSHOT;
338
- timestamp?: number;
339
- activityType?: string;
340
- rawEvent?: any;
341
- messageId?: string;
342
- }>;
343
- export declare const ActivityDeltaEventSchema: z.ZodObject<{
344
- timestamp: z.ZodOptional<z.ZodNumber>;
345
- rawEvent: z.ZodOptional<z.ZodAny>;
346
- } & {
347
- type: z.ZodLiteral<EventType.ACTIVITY_DELTA>;
348
- messageId: z.ZodOptional<z.ZodString>;
349
- activityType: z.ZodOptional<z.ZodString>;
350
- patch: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
351
- }, "strip", z.ZodTypeAny, {
352
- type?: EventType.ACTIVITY_DELTA;
353
- timestamp?: number;
354
- activityType?: string;
355
- rawEvent?: any;
356
- messageId?: string;
357
- patch?: any[];
358
- }, {
359
- type?: EventType.ACTIVITY_DELTA;
360
- timestamp?: number;
361
- activityType?: string;
362
- rawEvent?: any;
363
- messageId?: string;
364
- patch?: any[];
365
- }>;
366
- export declare const ThinkingStartEventSchema: z.ZodObject<{
367
- timestamp: z.ZodOptional<z.ZodNumber>;
368
- rawEvent: z.ZodOptional<z.ZodAny>;
369
- } & {
370
- type: z.ZodLiteral<EventType.THINKING_START>;
371
- title: z.ZodOptional<z.ZodString>;
372
- }, "strip", z.ZodTypeAny, {
373
- title?: string;
374
- type?: EventType.THINKING_START;
375
- timestamp?: number;
376
- rawEvent?: any;
377
- }, {
378
- title?: string;
379
- type?: EventType.THINKING_START;
380
- timestamp?: number;
381
- rawEvent?: any;
382
- }>;
383
- export declare const ThinkingEndEventSchema: z.ZodObject<{
384
- timestamp: z.ZodOptional<z.ZodNumber>;
385
- rawEvent: z.ZodOptional<z.ZodAny>;
386
- } & {
387
- type: z.ZodLiteral<EventType.THINKING_END>;
388
- title: z.ZodOptional<z.ZodString>;
389
- }, "strip", z.ZodTypeAny, {
390
- title?: string;
391
- type?: EventType.THINKING_END;
392
- timestamp?: number;
393
- rawEvent?: any;
394
- }, {
395
- title?: string;
396
- type?: EventType.THINKING_END;
397
- timestamp?: number;
398
- rawEvent?: any;
399
- }>;
400
- export declare const StateSnapshotEventSchema: z.ZodObject<{
401
- timestamp: z.ZodOptional<z.ZodNumber>;
402
- rawEvent: z.ZodOptional<z.ZodAny>;
403
- } & {
404
- type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
405
- snapshot: z.ZodAny;
406
- }, "strip", z.ZodTypeAny, {
407
- type?: EventType.STATE_SNAPSHOT;
408
- timestamp?: number;
409
- rawEvent?: any;
410
- snapshot?: any;
411
- }, {
412
- type?: EventType.STATE_SNAPSHOT;
413
- timestamp?: number;
414
- rawEvent?: any;
415
- snapshot?: any;
416
- }>;
417
- export declare const StateDeltaEventSchema: z.ZodObject<{
418
- timestamp: z.ZodOptional<z.ZodNumber>;
419
- rawEvent: z.ZodOptional<z.ZodAny>;
420
- } & {
421
- type: z.ZodLiteral<EventType.STATE_DELTA>;
422
- delta: z.ZodArray<z.ZodAny, "many">;
423
- }, "strip", z.ZodTypeAny, {
424
- type?: EventType.STATE_DELTA;
425
- timestamp?: number;
426
- rawEvent?: any;
427
- delta?: any[];
428
- }, {
429
- type?: EventType.STATE_DELTA;
430
- timestamp?: number;
431
- rawEvent?: any;
432
- delta?: any[];
433
- }>;
434
- export declare const MessagesSnapshotEventSchema: z.ZodObject<{
435
- timestamp: z.ZodOptional<z.ZodNumber>;
436
- rawEvent: z.ZodOptional<z.ZodAny>;
437
- } & {
438
- type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
439
- messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
440
- id: z.ZodString;
441
- name: z.ZodOptional<z.ZodString>;
442
- timestamp: z.ZodOptional<z.ZodNumber>;
443
- } & {
444
- role: z.ZodLiteral<"developer">;
445
- content: z.ZodString;
446
- }, "strip", z.ZodTypeAny, {
447
- content?: string;
448
- name?: string;
449
- id?: string;
450
- role?: "developer";
451
- timestamp?: number;
452
- }, {
453
- content?: string;
454
- name?: string;
455
- id?: string;
456
- role?: "developer";
457
- timestamp?: number;
458
- }>, z.ZodObject<{
459
- id: z.ZodString;
460
- name: z.ZodOptional<z.ZodString>;
461
- timestamp: z.ZodOptional<z.ZodNumber>;
462
- } & {
463
- role: z.ZodLiteral<"system">;
464
- content: z.ZodString;
465
- }, "strip", z.ZodTypeAny, {
466
- content?: string;
467
- name?: string;
468
- id?: string;
469
- role?: "system";
470
- timestamp?: number;
471
- }, {
472
- content?: string;
473
- name?: string;
474
- id?: string;
475
- role?: "system";
476
- timestamp?: number;
477
- }>, z.ZodObject<{
478
- id: z.ZodString;
479
- name: z.ZodOptional<z.ZodString>;
480
- timestamp: z.ZodOptional<z.ZodNumber>;
481
- } & {
482
- role: z.ZodLiteral<"assistant">;
483
- content: z.ZodOptional<z.ZodString>;
484
- reasoningContent: z.ZodOptional<z.ZodString>;
485
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
486
- id: z.ZodString;
487
- type: z.ZodLiteral<"function">;
488
- function: z.ZodObject<{
489
- name: z.ZodString;
490
- arguments: z.ZodString;
491
- }, "strip", z.ZodTypeAny, {
492
- name?: string;
493
- arguments?: string;
494
- }, {
495
- name?: string;
496
- arguments?: string;
497
- }>;
498
- }, "strip", z.ZodTypeAny, {
499
- function?: {
500
- name?: string;
501
- arguments?: string;
502
- };
503
- type?: "function";
504
- id?: string;
505
- }, {
506
- function?: {
507
- name?: string;
508
- arguments?: string;
509
- };
510
- type?: "function";
511
- id?: string;
512
- }>, "many">>;
513
- }, "strip", z.ZodTypeAny, {
514
- content?: string;
515
- name?: string;
516
- id?: string;
517
- role?: "assistant";
518
- timestamp?: number;
519
- reasoningContent?: string;
520
- toolCalls?: {
521
- function?: {
522
- name?: string;
523
- arguments?: string;
524
- };
525
- type?: "function";
526
- id?: string;
527
- }[];
528
- }, {
529
- content?: string;
530
- name?: string;
531
- id?: string;
532
- role?: "assistant";
533
- timestamp?: number;
534
- reasoningContent?: string;
535
- toolCalls?: {
536
- function?: {
537
- name?: string;
538
- arguments?: string;
539
- };
540
- type?: "function";
541
- id?: string;
542
- }[];
543
- }>, z.ZodObject<{
544
- id: z.ZodString;
545
- name: z.ZodOptional<z.ZodString>;
546
- timestamp: z.ZodOptional<z.ZodNumber>;
547
- } & {
548
- role: z.ZodLiteral<"user">;
549
- content: z.ZodString;
550
- }, "strip", z.ZodTypeAny, {
551
- content?: string;
552
- name?: string;
553
- id?: string;
554
- role?: "user";
555
- timestamp?: number;
556
- }, {
557
- content?: string;
558
- name?: string;
559
- id?: string;
560
- role?: "user";
561
- timestamp?: number;
562
- }>, z.ZodObject<{
563
- id: z.ZodString;
564
- content: z.ZodString;
565
- role: z.ZodLiteral<"tool">;
566
- toolCallId: z.ZodString;
567
- }, "strip", z.ZodTypeAny, {
568
- content?: string;
569
- id?: string;
570
- role?: "tool";
571
- toolCallId?: string;
572
- }, {
573
- content?: string;
574
- id?: string;
575
- role?: "tool";
576
- toolCallId?: string;
577
- }>, z.ZodObject<{
578
- id: z.ZodString;
579
- role: z.ZodLiteral<"activity">;
580
- activityType: z.ZodString;
581
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
582
- }, "strip", z.ZodTypeAny, {
583
- content?: Record<string, any>;
584
- id?: string;
585
- role?: "activity";
586
- activityType?: string;
587
- }, {
588
- content?: Record<string, any>;
589
- id?: string;
590
- role?: "activity";
591
- activityType?: string;
592
- }>]>, "many">;
593
- }, "strip", z.ZodTypeAny, {
594
- type?: EventType.MESSAGES_SNAPSHOT;
595
- timestamp?: number;
596
- messages?: ({
597
- content?: string;
598
- name?: string;
599
- id?: string;
600
- role?: "developer";
601
- timestamp?: number;
602
- } | {
603
- content?: string;
604
- name?: string;
605
- id?: string;
606
- role?: "system";
607
- timestamp?: number;
608
- } | {
609
- content?: string;
610
- name?: string;
611
- id?: string;
612
- role?: "assistant";
613
- timestamp?: number;
614
- reasoningContent?: string;
615
- toolCalls?: {
616
- function?: {
617
- name?: string;
618
- arguments?: string;
619
- };
620
- type?: "function";
621
- id?: string;
622
- }[];
623
- } | {
624
- content?: string;
625
- name?: string;
626
- id?: string;
627
- role?: "user";
628
- timestamp?: number;
629
- } | {
630
- content?: string;
631
- id?: string;
632
- role?: "tool";
633
- toolCallId?: string;
634
- } | {
635
- content?: Record<string, any>;
636
- id?: string;
637
- role?: "activity";
638
- activityType?: string;
639
- })[];
640
- rawEvent?: any;
641
- }, {
642
- type?: EventType.MESSAGES_SNAPSHOT;
643
- timestamp?: number;
644
- messages?: ({
645
- content?: string;
646
- name?: string;
647
- id?: string;
648
- role?: "developer";
649
- timestamp?: number;
650
- } | {
651
- content?: string;
652
- name?: string;
653
- id?: string;
654
- role?: "system";
655
- timestamp?: number;
656
- } | {
657
- content?: string;
658
- name?: string;
659
- id?: string;
660
- role?: "assistant";
661
- timestamp?: number;
662
- reasoningContent?: string;
663
- toolCalls?: {
664
- function?: {
665
- name?: string;
666
- arguments?: string;
667
- };
668
- type?: "function";
669
- id?: string;
670
- }[];
671
- } | {
672
- content?: string;
673
- name?: string;
674
- id?: string;
675
- role?: "user";
676
- timestamp?: number;
677
- } | {
678
- content?: string;
679
- id?: string;
680
- role?: "tool";
681
- toolCallId?: string;
682
- } | {
683
- content?: Record<string, any>;
684
- id?: string;
685
- role?: "activity";
686
- activityType?: string;
687
- })[];
688
- rawEvent?: any;
689
- }>;
690
- export declare const RawEventSchema: z.ZodObject<{
691
- timestamp: z.ZodOptional<z.ZodNumber>;
692
- rawEvent: z.ZodOptional<z.ZodAny>;
693
- } & {
694
- type: z.ZodLiteral<EventType.RAW>;
695
- event: z.ZodAny;
696
- source: z.ZodOptional<z.ZodString>;
697
- }, "strip", z.ZodTypeAny, {
698
- source?: string;
699
- event?: any;
700
- type?: EventType.RAW;
701
- timestamp?: number;
702
- rawEvent?: any;
703
- }, {
704
- source?: string;
705
- event?: any;
706
- type?: EventType.RAW;
707
- timestamp?: number;
708
- rawEvent?: any;
709
- }>;
710
- export declare const CustomEventSchema: z.ZodObject<{
711
- timestamp: z.ZodOptional<z.ZodNumber>;
712
- rawEvent: z.ZodOptional<z.ZodAny>;
713
- } & {
714
- type: z.ZodLiteral<EventType.CUSTOM>;
715
- name: z.ZodString;
716
- value: z.ZodAny;
717
- }, "strip", z.ZodTypeAny, {
718
- name?: string;
719
- value?: any;
720
- type?: EventType.CUSTOM;
721
- timestamp?: number;
722
- rawEvent?: any;
723
- }, {
724
- name?: string;
725
- value?: any;
726
- type?: EventType.CUSTOM;
727
- timestamp?: number;
728
- rawEvent?: any;
729
- }>;
730
- export declare const RunStartedEventSchema: z.ZodObject<{
731
- timestamp: z.ZodOptional<z.ZodNumber>;
732
- rawEvent: z.ZodOptional<z.ZodAny>;
733
- } & {
734
- type: z.ZodLiteral<EventType.RUN_STARTED>;
735
- threadId: z.ZodString;
736
- runId: z.ZodString;
737
- }, "strip", z.ZodTypeAny, {
738
- type?: EventType.RUN_STARTED;
739
- timestamp?: number;
740
- threadId?: string;
741
- runId?: string;
742
- rawEvent?: any;
743
- }, {
744
- type?: EventType.RUN_STARTED;
745
- timestamp?: number;
746
- threadId?: string;
747
- runId?: string;
748
- rawEvent?: any;
749
- }>;
750
- export declare const RunFinishedEventSchema: z.ZodObject<{
751
- timestamp: z.ZodOptional<z.ZodNumber>;
752
- rawEvent: z.ZodOptional<z.ZodAny>;
753
- } & {
754
- type: z.ZodLiteral<EventType.RUN_FINISHED>;
755
- threadId: z.ZodString;
756
- runId: z.ZodString;
757
- result: z.ZodOptional<z.ZodAny>;
758
- }, "strip", z.ZodTypeAny, {
759
- type?: EventType.RUN_FINISHED;
760
- timestamp?: number;
761
- threadId?: string;
762
- runId?: string;
763
- rawEvent?: any;
764
- result?: any;
765
- }, {
766
- type?: EventType.RUN_FINISHED;
767
- timestamp?: number;
768
- threadId?: string;
769
- runId?: string;
770
- rawEvent?: any;
771
- result?: any;
772
- }>;
773
- export declare const RunErrorEventSchema: z.ZodObject<{
774
- timestamp: z.ZodOptional<z.ZodNumber>;
775
- rawEvent: z.ZodOptional<z.ZodAny>;
776
- } & {
777
- type: z.ZodLiteral<EventType.RUN_ERROR>;
778
- message: z.ZodString;
779
- code: z.ZodOptional<z.ZodString>;
780
- }, "strip", z.ZodTypeAny, {
781
- code?: string;
782
- message?: string;
783
- type?: EventType.RUN_ERROR;
784
- timestamp?: number;
785
- rawEvent?: any;
786
- }, {
787
- code?: string;
788
- message?: string;
789
- type?: EventType.RUN_ERROR;
790
- timestamp?: number;
791
- rawEvent?: any;
792
- }>;
793
- export declare const StepStartedEventSchema: z.ZodObject<{
794
- timestamp: z.ZodOptional<z.ZodNumber>;
795
- rawEvent: z.ZodOptional<z.ZodAny>;
796
- } & {
797
- type: z.ZodLiteral<EventType.STEP_STARTED>;
798
- stepName: z.ZodString;
799
- }, "strip", z.ZodTypeAny, {
800
- type?: EventType.STEP_STARTED;
801
- timestamp?: number;
802
- rawEvent?: any;
803
- stepName?: string;
804
- }, {
805
- type?: EventType.STEP_STARTED;
806
- timestamp?: number;
807
- rawEvent?: any;
808
- stepName?: string;
809
- }>;
810
- export declare const StepFinishedEventSchema: z.ZodObject<{
811
- timestamp: z.ZodOptional<z.ZodNumber>;
812
- rawEvent: z.ZodOptional<z.ZodAny>;
813
- } & {
814
- type: z.ZodLiteral<EventType.STEP_FINISHED>;
815
- stepName: z.ZodString;
816
- }, "strip", z.ZodTypeAny, {
817
- type?: EventType.STEP_FINISHED;
818
- timestamp?: number;
819
- rawEvent?: any;
820
- stepName?: string;
821
- }, {
822
- type?: EventType.STEP_FINISHED;
823
- timestamp?: number;
824
- rawEvent?: any;
825
- stepName?: string;
826
- }>;
827
- export declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
828
- timestamp: z.ZodOptional<z.ZodNumber>;
829
- rawEvent: z.ZodOptional<z.ZodAny>;
830
- } & {
831
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
832
- messageId: z.ZodString;
833
- role: z.ZodLiteral<"assistant">;
834
- }, "strip", z.ZodTypeAny, {
835
- type?: EventType.TEXT_MESSAGE_START;
836
- role?: "assistant";
837
- timestamp?: number;
838
- rawEvent?: any;
839
- messageId?: string;
840
- }, {
841
- type?: EventType.TEXT_MESSAGE_START;
842
- role?: "assistant";
843
- timestamp?: number;
844
- rawEvent?: any;
845
- messageId?: string;
846
- }>, z.ZodObject<{
847
- timestamp: z.ZodOptional<z.ZodNumber>;
848
- rawEvent: z.ZodOptional<z.ZodAny>;
849
- } & {
850
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
851
- messageId: z.ZodString;
852
- delta: z.ZodEffects<z.ZodString, string, string>;
853
- }, "strip", z.ZodTypeAny, {
854
- type?: EventType.TEXT_MESSAGE_CONTENT;
855
- timestamp?: number;
856
- rawEvent?: any;
857
- messageId?: string;
858
- delta?: string;
859
- }, {
860
- type?: EventType.TEXT_MESSAGE_CONTENT;
861
- timestamp?: number;
862
- rawEvent?: any;
863
- messageId?: string;
864
- delta?: string;
865
- }>, z.ZodObject<{
866
- timestamp: z.ZodOptional<z.ZodNumber>;
867
- rawEvent: z.ZodOptional<z.ZodAny>;
868
- } & {
869
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
870
- messageId: z.ZodString;
871
- }, "strip", z.ZodTypeAny, {
872
- type?: EventType.TEXT_MESSAGE_END;
873
- timestamp?: number;
874
- rawEvent?: any;
875
- messageId?: string;
876
- }, {
877
- type?: EventType.TEXT_MESSAGE_END;
878
- timestamp?: number;
879
- rawEvent?: any;
880
- messageId?: string;
881
- }>, z.ZodObject<{
882
- timestamp: z.ZodOptional<z.ZodNumber>;
883
- rawEvent: z.ZodOptional<z.ZodAny>;
884
- } & {
885
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
886
- messageId: z.ZodOptional<z.ZodString>;
887
- role: z.ZodOptional<z.ZodLiteral<"assistant">>;
888
- delta: z.ZodOptional<z.ZodString>;
889
- }, "strip", z.ZodTypeAny, {
890
- type?: EventType.TEXT_MESSAGE_CHUNK;
891
- role?: "assistant";
892
- timestamp?: number;
893
- rawEvent?: any;
894
- messageId?: string;
895
- delta?: string;
896
- }, {
897
- type?: EventType.TEXT_MESSAGE_CHUNK;
898
- role?: "assistant";
899
- timestamp?: number;
900
- rawEvent?: any;
901
- messageId?: string;
902
- delta?: string;
903
- }>, z.ZodObject<{
904
- timestamp: z.ZodOptional<z.ZodNumber>;
905
- rawEvent: z.ZodOptional<z.ZodAny>;
906
- } & {
907
- type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
908
- }, "strip", z.ZodTypeAny, {
909
- type?: EventType.THINKING_TEXT_MESSAGE_START;
910
- timestamp?: number;
911
- rawEvent?: any;
912
- }, {
913
- type?: EventType.THINKING_TEXT_MESSAGE_START;
914
- timestamp?: number;
915
- rawEvent?: any;
916
- }>, z.ZodObject<Omit<{
917
- timestamp: z.ZodOptional<z.ZodNumber>;
918
- rawEvent: z.ZodOptional<z.ZodAny>;
919
- } & {
920
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
921
- messageId: z.ZodString;
922
- delta: z.ZodEffects<z.ZodString, string, string>;
923
- }, "type" | "messageId"> & {
924
- type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
925
- }, "strip", z.ZodTypeAny, {
926
- type?: EventType.THINKING_TEXT_MESSAGE_CONTENT;
927
- timestamp?: number;
928
- rawEvent?: any;
929
- delta?: string;
930
- }, {
931
- type?: EventType.THINKING_TEXT_MESSAGE_CONTENT;
932
- timestamp?: number;
933
- rawEvent?: any;
934
- delta?: string;
935
- }>, z.ZodObject<{
936
- timestamp: z.ZodOptional<z.ZodNumber>;
937
- rawEvent: z.ZodOptional<z.ZodAny>;
938
- } & {
939
- type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
940
- }, "strip", z.ZodTypeAny, {
941
- type?: EventType.THINKING_TEXT_MESSAGE_END;
942
- timestamp?: number;
943
- rawEvent?: any;
944
- }, {
945
- type?: EventType.THINKING_TEXT_MESSAGE_END;
946
- timestamp?: number;
947
- rawEvent?: any;
948
- }>, z.ZodObject<{
949
- timestamp: z.ZodOptional<z.ZodNumber>;
950
- rawEvent: z.ZodOptional<z.ZodAny>;
951
- } & {
952
- type: z.ZodLiteral<EventType.TOOL_CALL_START>;
953
- toolCallId: z.ZodString;
954
- toolCallName: z.ZodString;
955
- parentMessageId: z.ZodOptional<z.ZodString>;
956
- }, "strip", z.ZodTypeAny, {
957
- type?: EventType.TOOL_CALL_START;
958
- timestamp?: number;
959
- toolCallId?: string;
960
- rawEvent?: any;
961
- toolCallName?: string;
962
- parentMessageId?: string;
963
- }, {
964
- type?: EventType.TOOL_CALL_START;
965
- timestamp?: number;
966
- toolCallId?: string;
967
- rawEvent?: any;
968
- toolCallName?: string;
969
- parentMessageId?: string;
970
- }>, z.ZodObject<{
971
- timestamp: z.ZodOptional<z.ZodNumber>;
972
- rawEvent: z.ZodOptional<z.ZodAny>;
973
- } & {
974
- type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
975
- toolCallId: z.ZodString;
976
- delta: z.ZodString;
977
- }, "strip", z.ZodTypeAny, {
978
- type?: EventType.TOOL_CALL_ARGS;
979
- timestamp?: number;
980
- toolCallId?: string;
981
- rawEvent?: any;
982
- delta?: string;
983
- }, {
984
- type?: EventType.TOOL_CALL_ARGS;
985
- timestamp?: number;
986
- toolCallId?: string;
987
- rawEvent?: any;
988
- delta?: string;
989
- }>, z.ZodObject<{
990
- timestamp: z.ZodOptional<z.ZodNumber>;
991
- rawEvent: z.ZodOptional<z.ZodAny>;
992
- } & {
993
- type: z.ZodLiteral<EventType.TOOL_CALL_END>;
994
- toolCallId: z.ZodString;
995
- }, "strip", z.ZodTypeAny, {
996
- type?: EventType.TOOL_CALL_END;
997
- timestamp?: number;
998
- toolCallId?: string;
999
- rawEvent?: any;
1000
- }, {
1001
- type?: EventType.TOOL_CALL_END;
1002
- timestamp?: number;
1003
- toolCallId?: string;
1004
- rawEvent?: any;
1005
- }>, z.ZodObject<{
1006
- timestamp: z.ZodOptional<z.ZodNumber>;
1007
- rawEvent: z.ZodOptional<z.ZodAny>;
1008
- } & {
1009
- type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
1010
- toolCallId: z.ZodOptional<z.ZodString>;
1011
- toolCallName: z.ZodOptional<z.ZodString>;
1012
- parentMessageId: z.ZodOptional<z.ZodString>;
1013
- delta: z.ZodOptional<z.ZodString>;
1014
- }, "strip", z.ZodTypeAny, {
1015
- type?: EventType.TOOL_CALL_CHUNK;
1016
- timestamp?: number;
1017
- toolCallId?: string;
1018
- rawEvent?: any;
1019
- delta?: string;
1020
- toolCallName?: string;
1021
- parentMessageId?: string;
1022
- }, {
1023
- type?: EventType.TOOL_CALL_CHUNK;
1024
- timestamp?: number;
1025
- toolCallId?: string;
1026
- rawEvent?: any;
1027
- delta?: string;
1028
- toolCallName?: string;
1029
- parentMessageId?: string;
1030
- }>, z.ZodObject<{
1031
- timestamp: z.ZodOptional<z.ZodNumber>;
1032
- rawEvent: z.ZodOptional<z.ZodAny>;
1033
- } & {
1034
- messageId: z.ZodString;
1035
- type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
1036
- toolCallId: z.ZodString;
1037
- toolCallName: z.ZodString;
1038
- content: z.ZodString;
1039
- role: z.ZodOptional<z.ZodLiteral<"tool">>;
1040
- }, "strip", z.ZodTypeAny, {
1041
- content?: string;
1042
- type?: EventType.TOOL_CALL_RESULT;
1043
- role?: "tool";
1044
- timestamp?: number;
1045
- toolCallId?: string;
1046
- rawEvent?: any;
1047
- messageId?: string;
1048
- toolCallName?: string;
1049
- }, {
1050
- content?: string;
1051
- type?: EventType.TOOL_CALL_RESULT;
1052
- role?: "tool";
1053
- timestamp?: number;
1054
- toolCallId?: string;
1055
- rawEvent?: any;
1056
- messageId?: string;
1057
- toolCallName?: string;
1058
- }>, z.ZodObject<{
1059
- timestamp: z.ZodOptional<z.ZodNumber>;
1060
- rawEvent: z.ZodOptional<z.ZodAny>;
1061
- } & {
1062
- type: z.ZodLiteral<EventType.ACTIVITY_SNAPSHOT>;
1063
- messageId: z.ZodOptional<z.ZodString>;
1064
- activityType: z.ZodString;
1065
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
1066
- replace: z.ZodOptional<z.ZodBoolean>;
1067
- }, "strip", z.ZodTypeAny, {
1068
- replace?: boolean;
1069
- content?: Record<string, any>;
1070
- type?: EventType.ACTIVITY_SNAPSHOT;
1071
- timestamp?: number;
1072
- activityType?: string;
1073
- rawEvent?: any;
1074
- messageId?: string;
1075
- }, {
1076
- replace?: boolean;
1077
- content?: Record<string, any>;
1078
- type?: EventType.ACTIVITY_SNAPSHOT;
1079
- timestamp?: number;
1080
- activityType?: string;
1081
- rawEvent?: any;
1082
- messageId?: string;
1083
- }>, z.ZodObject<{
1084
- timestamp: z.ZodOptional<z.ZodNumber>;
1085
- rawEvent: z.ZodOptional<z.ZodAny>;
1086
- } & {
1087
- type: z.ZodLiteral<EventType.ACTIVITY_DELTA>;
1088
- messageId: z.ZodOptional<z.ZodString>;
1089
- activityType: z.ZodOptional<z.ZodString>;
1090
- patch: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1091
- }, "strip", z.ZodTypeAny, {
1092
- type?: EventType.ACTIVITY_DELTA;
1093
- timestamp?: number;
1094
- activityType?: string;
1095
- rawEvent?: any;
1096
- messageId?: string;
1097
- patch?: any[];
1098
- }, {
1099
- type?: EventType.ACTIVITY_DELTA;
1100
- timestamp?: number;
1101
- activityType?: string;
1102
- rawEvent?: any;
1103
- messageId?: string;
1104
- patch?: any[];
1105
- }>, z.ZodObject<{
1106
- timestamp: z.ZodOptional<z.ZodNumber>;
1107
- rawEvent: z.ZodOptional<z.ZodAny>;
1108
- } & {
1109
- type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
1110
- snapshot: z.ZodAny;
1111
- }, "strip", z.ZodTypeAny, {
1112
- type?: EventType.STATE_SNAPSHOT;
1113
- timestamp?: number;
1114
- rawEvent?: any;
1115
- snapshot?: any;
1116
- }, {
1117
- type?: EventType.STATE_SNAPSHOT;
1118
- timestamp?: number;
1119
- rawEvent?: any;
1120
- snapshot?: any;
1121
- }>, z.ZodObject<{
1122
- timestamp: z.ZodOptional<z.ZodNumber>;
1123
- rawEvent: z.ZodOptional<z.ZodAny>;
1124
- } & {
1125
- type: z.ZodLiteral<EventType.STATE_DELTA>;
1126
- delta: z.ZodArray<z.ZodAny, "many">;
1127
- }, "strip", z.ZodTypeAny, {
1128
- type?: EventType.STATE_DELTA;
1129
- timestamp?: number;
1130
- rawEvent?: any;
1131
- delta?: any[];
1132
- }, {
1133
- type?: EventType.STATE_DELTA;
1134
- timestamp?: number;
1135
- rawEvent?: any;
1136
- delta?: any[];
1137
- }>, z.ZodObject<{
1138
- timestamp: z.ZodOptional<z.ZodNumber>;
1139
- rawEvent: z.ZodOptional<z.ZodAny>;
1140
- } & {
1141
- type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
1142
- messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
1143
- id: z.ZodString;
1144
- name: z.ZodOptional<z.ZodString>;
1145
- timestamp: z.ZodOptional<z.ZodNumber>;
1146
- } & {
1147
- role: z.ZodLiteral<"developer">;
1148
- content: z.ZodString;
1149
- }, "strip", z.ZodTypeAny, {
1150
- content?: string;
1151
- name?: string;
1152
- id?: string;
1153
- role?: "developer";
1154
- timestamp?: number;
1155
- }, {
1156
- content?: string;
1157
- name?: string;
1158
- id?: string;
1159
- role?: "developer";
1160
- timestamp?: number;
1161
- }>, z.ZodObject<{
1162
- id: z.ZodString;
1163
- name: z.ZodOptional<z.ZodString>;
1164
- timestamp: z.ZodOptional<z.ZodNumber>;
1165
- } & {
1166
- role: z.ZodLiteral<"system">;
1167
- content: z.ZodString;
1168
- }, "strip", z.ZodTypeAny, {
1169
- content?: string;
1170
- name?: string;
1171
- id?: string;
1172
- role?: "system";
1173
- timestamp?: number;
1174
- }, {
1175
- content?: string;
1176
- name?: string;
1177
- id?: string;
1178
- role?: "system";
1179
- timestamp?: number;
1180
- }>, z.ZodObject<{
1181
- id: z.ZodString;
1182
- name: z.ZodOptional<z.ZodString>;
1183
- timestamp: z.ZodOptional<z.ZodNumber>;
1184
- } & {
1185
- role: z.ZodLiteral<"assistant">;
1186
- content: z.ZodOptional<z.ZodString>;
1187
- reasoningContent: z.ZodOptional<z.ZodString>;
1188
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
1189
- id: z.ZodString;
1190
- type: z.ZodLiteral<"function">;
1191
- function: z.ZodObject<{
1192
- name: z.ZodString;
1193
- arguments: z.ZodString;
1194
- }, "strip", z.ZodTypeAny, {
1195
- name?: string;
1196
- arguments?: string;
1197
- }, {
1198
- name?: string;
1199
- arguments?: string;
1200
- }>;
1201
- }, "strip", z.ZodTypeAny, {
1202
- function?: {
1203
- name?: string;
1204
- arguments?: string;
1205
- };
1206
- type?: "function";
1207
- id?: string;
1208
- }, {
1209
- function?: {
1210
- name?: string;
1211
- arguments?: string;
1212
- };
1213
- type?: "function";
1214
- id?: string;
1215
- }>, "many">>;
1216
- }, "strip", z.ZodTypeAny, {
1217
- content?: string;
1218
- name?: string;
1219
- id?: string;
1220
- role?: "assistant";
1221
- timestamp?: number;
1222
- reasoningContent?: string;
1223
- toolCalls?: {
1224
- function?: {
1225
- name?: string;
1226
- arguments?: string;
1227
- };
1228
- type?: "function";
1229
- id?: string;
1230
- }[];
1231
- }, {
1232
- content?: string;
1233
- name?: string;
1234
- id?: string;
1235
- role?: "assistant";
1236
- timestamp?: number;
1237
- reasoningContent?: string;
1238
- toolCalls?: {
1239
- function?: {
1240
- name?: string;
1241
- arguments?: string;
1242
- };
1243
- type?: "function";
1244
- id?: string;
1245
- }[];
1246
- }>, z.ZodObject<{
1247
- id: z.ZodString;
1248
- name: z.ZodOptional<z.ZodString>;
1249
- timestamp: z.ZodOptional<z.ZodNumber>;
1250
- } & {
1251
- role: z.ZodLiteral<"user">;
1252
- content: z.ZodString;
1253
- }, "strip", z.ZodTypeAny, {
1254
- content?: string;
1255
- name?: string;
1256
- id?: string;
1257
- role?: "user";
1258
- timestamp?: number;
1259
- }, {
1260
- content?: string;
1261
- name?: string;
1262
- id?: string;
1263
- role?: "user";
1264
- timestamp?: number;
1265
- }>, z.ZodObject<{
1266
- id: z.ZodString;
1267
- content: z.ZodString;
1268
- role: z.ZodLiteral<"tool">;
1269
- toolCallId: z.ZodString;
1270
- }, "strip", z.ZodTypeAny, {
1271
- content?: string;
1272
- id?: string;
1273
- role?: "tool";
1274
- toolCallId?: string;
1275
- }, {
1276
- content?: string;
1277
- id?: string;
1278
- role?: "tool";
1279
- toolCallId?: string;
1280
- }>, z.ZodObject<{
1281
- id: z.ZodString;
1282
- role: z.ZodLiteral<"activity">;
1283
- activityType: z.ZodString;
1284
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
1285
- }, "strip", z.ZodTypeAny, {
1286
- content?: Record<string, any>;
1287
- id?: string;
1288
- role?: "activity";
1289
- activityType?: string;
1290
- }, {
1291
- content?: Record<string, any>;
1292
- id?: string;
1293
- role?: "activity";
1294
- activityType?: string;
1295
- }>]>, "many">;
1296
- }, "strip", z.ZodTypeAny, {
1297
- type?: EventType.MESSAGES_SNAPSHOT;
1298
- timestamp?: number;
1299
- messages?: ({
1300
- content?: string;
1301
- name?: string;
1302
- id?: string;
1303
- role?: "developer";
1304
- timestamp?: number;
1305
- } | {
1306
- content?: string;
1307
- name?: string;
1308
- id?: string;
1309
- role?: "system";
1310
- timestamp?: number;
1311
- } | {
1312
- content?: string;
1313
- name?: string;
1314
- id?: string;
1315
- role?: "assistant";
1316
- timestamp?: number;
1317
- reasoningContent?: string;
1318
- toolCalls?: {
1319
- function?: {
1320
- name?: string;
1321
- arguments?: string;
1322
- };
1323
- type?: "function";
1324
- id?: string;
1325
- }[];
1326
- } | {
1327
- content?: string;
1328
- name?: string;
1329
- id?: string;
1330
- role?: "user";
1331
- timestamp?: number;
1332
- } | {
1333
- content?: string;
1334
- id?: string;
1335
- role?: "tool";
1336
- toolCallId?: string;
1337
- } | {
1338
- content?: Record<string, any>;
1339
- id?: string;
1340
- role?: "activity";
1341
- activityType?: string;
1342
- })[];
1343
- rawEvent?: any;
1344
- }, {
1345
- type?: EventType.MESSAGES_SNAPSHOT;
1346
- timestamp?: number;
1347
- messages?: ({
1348
- content?: string;
1349
- name?: string;
1350
- id?: string;
1351
- role?: "developer";
1352
- timestamp?: number;
1353
- } | {
1354
- content?: string;
1355
- name?: string;
1356
- id?: string;
1357
- role?: "system";
1358
- timestamp?: number;
1359
- } | {
1360
- content?: string;
1361
- name?: string;
1362
- id?: string;
1363
- role?: "assistant";
1364
- timestamp?: number;
1365
- reasoningContent?: string;
1366
- toolCalls?: {
1367
- function?: {
1368
- name?: string;
1369
- arguments?: string;
1370
- };
1371
- type?: "function";
1372
- id?: string;
1373
- }[];
1374
- } | {
1375
- content?: string;
1376
- name?: string;
1377
- id?: string;
1378
- role?: "user";
1379
- timestamp?: number;
1380
- } | {
1381
- content?: string;
1382
- id?: string;
1383
- role?: "tool";
1384
- toolCallId?: string;
1385
- } | {
1386
- content?: Record<string, any>;
1387
- id?: string;
1388
- role?: "activity";
1389
- activityType?: string;
1390
- })[];
1391
- rawEvent?: any;
1392
- }>, z.ZodObject<{
1393
- timestamp: z.ZodOptional<z.ZodNumber>;
1394
- rawEvent: z.ZodOptional<z.ZodAny>;
1395
- } & {
1396
- type: z.ZodLiteral<EventType.RAW>;
1397
- event: z.ZodAny;
1398
- source: z.ZodOptional<z.ZodString>;
1399
- }, "strip", z.ZodTypeAny, {
1400
- source?: string;
1401
- event?: any;
1402
- type?: EventType.RAW;
1403
- timestamp?: number;
1404
- rawEvent?: any;
1405
- }, {
1406
- source?: string;
1407
- event?: any;
1408
- type?: EventType.RAW;
1409
- timestamp?: number;
1410
- rawEvent?: any;
1411
- }>, z.ZodObject<{
1412
- timestamp: z.ZodOptional<z.ZodNumber>;
1413
- rawEvent: z.ZodOptional<z.ZodAny>;
1414
- } & {
1415
- type: z.ZodLiteral<EventType.CUSTOM>;
1416
- name: z.ZodString;
1417
- value: z.ZodAny;
1418
- }, "strip", z.ZodTypeAny, {
1419
- name?: string;
1420
- value?: any;
1421
- type?: EventType.CUSTOM;
1422
- timestamp?: number;
1423
- rawEvent?: any;
1424
- }, {
1425
- name?: string;
1426
- value?: any;
1427
- type?: EventType.CUSTOM;
1428
- timestamp?: number;
1429
- rawEvent?: any;
1430
- }>, z.ZodObject<{
1431
- timestamp: z.ZodOptional<z.ZodNumber>;
1432
- rawEvent: z.ZodOptional<z.ZodAny>;
1433
- } & {
1434
- type: z.ZodLiteral<EventType.RUN_STARTED>;
1435
- threadId: z.ZodString;
1436
- runId: z.ZodString;
1437
- }, "strip", z.ZodTypeAny, {
1438
- type?: EventType.RUN_STARTED;
1439
- timestamp?: number;
1440
- threadId?: string;
1441
- runId?: string;
1442
- rawEvent?: any;
1443
- }, {
1444
- type?: EventType.RUN_STARTED;
1445
- timestamp?: number;
1446
- threadId?: string;
1447
- runId?: string;
1448
- rawEvent?: any;
1449
- }>, z.ZodObject<{
1450
- timestamp: z.ZodOptional<z.ZodNumber>;
1451
- rawEvent: z.ZodOptional<z.ZodAny>;
1452
- } & {
1453
- type: z.ZodLiteral<EventType.RUN_FINISHED>;
1454
- threadId: z.ZodString;
1455
- runId: z.ZodString;
1456
- result: z.ZodOptional<z.ZodAny>;
1457
- }, "strip", z.ZodTypeAny, {
1458
- type?: EventType.RUN_FINISHED;
1459
- timestamp?: number;
1460
- threadId?: string;
1461
- runId?: string;
1462
- rawEvent?: any;
1463
- result?: any;
1464
- }, {
1465
- type?: EventType.RUN_FINISHED;
1466
- timestamp?: number;
1467
- threadId?: string;
1468
- runId?: string;
1469
- rawEvent?: any;
1470
- result?: any;
1471
- }>, z.ZodObject<{
1472
- timestamp: z.ZodOptional<z.ZodNumber>;
1473
- rawEvent: z.ZodOptional<z.ZodAny>;
1474
- } & {
1475
- type: z.ZodLiteral<EventType.RUN_ERROR>;
1476
- message: z.ZodString;
1477
- code: z.ZodOptional<z.ZodString>;
1478
- }, "strip", z.ZodTypeAny, {
1479
- code?: string;
1480
- message?: string;
1481
- type?: EventType.RUN_ERROR;
1482
- timestamp?: number;
1483
- rawEvent?: any;
1484
- }, {
1485
- code?: string;
1486
- message?: string;
1487
- type?: EventType.RUN_ERROR;
1488
- timestamp?: number;
1489
- rawEvent?: any;
1490
- }>, z.ZodObject<{
1491
- timestamp: z.ZodOptional<z.ZodNumber>;
1492
- rawEvent: z.ZodOptional<z.ZodAny>;
1493
- } & {
1494
- type: z.ZodLiteral<EventType.STEP_STARTED>;
1495
- stepName: z.ZodString;
1496
- }, "strip", z.ZodTypeAny, {
1497
- type?: EventType.STEP_STARTED;
1498
- timestamp?: number;
1499
- rawEvent?: any;
1500
- stepName?: string;
1501
- }, {
1502
- type?: EventType.STEP_STARTED;
1503
- timestamp?: number;
1504
- rawEvent?: any;
1505
- stepName?: string;
1506
- }>, z.ZodObject<{
1507
- timestamp: z.ZodOptional<z.ZodNumber>;
1508
- rawEvent: z.ZodOptional<z.ZodAny>;
1509
- } & {
1510
- type: z.ZodLiteral<EventType.STEP_FINISHED>;
1511
- stepName: z.ZodString;
1512
- }, "strip", z.ZodTypeAny, {
1513
- type?: EventType.STEP_FINISHED;
1514
- timestamp?: number;
1515
- rawEvent?: any;
1516
- stepName?: string;
1517
- }, {
1518
- type?: EventType.STEP_FINISHED;
1519
- timestamp?: number;
1520
- rawEvent?: any;
1521
- stepName?: string;
1522
- }>]>;
1523
- export type BaseEvent = z.infer<typeof BaseEventSchema>;
1524
- export type TextMessageStartEvent = z.infer<typeof TextMessageStartEventSchema>;
1525
- export type TextMessageContentEvent = z.infer<typeof TextMessageContentEventSchema>;
1526
- export type TextMessageEndEvent = z.infer<typeof TextMessageEndEventSchema>;
1527
- export type TextMessageChunkEvent = z.infer<typeof TextMessageChunkEventSchema>;
1528
- export type ThinkingTextMessageStartEvent = z.infer<typeof ThinkingTextMessageStartEventSchema>;
1529
- export type ThinkingTextMessageContentEvent = z.infer<typeof ThinkingTextMessageContentEventSchema>;
1530
- export type ThinkingTextMessageEndEvent = z.infer<typeof ThinkingTextMessageEndEventSchema>;
1531
- export type ToolCallStartEvent = z.infer<typeof ToolCallStartEventSchema>;
1532
- export type ToolCallArgsEvent = z.infer<typeof ToolCallArgsEventSchema>;
1533
- export type ToolCallEndEvent = z.infer<typeof ToolCallEndEventSchema>;
1534
- export type ToolCallChunkEvent = z.infer<typeof ToolCallChunkEventSchema>;
1535
- export type ToolCallResultEvent = z.infer<typeof ToolCallResultEventSchema>;
1536
- export type ActivitySnapshotEvent = z.infer<typeof ActivitySnapshotEventSchema>;
1537
- export type ActivityDeltaEvent = z.infer<typeof ActivityDeltaEventSchema>;
1538
- export type ThinkingStartEvent = z.infer<typeof ThinkingStartEventSchema>;
1539
- export type ThinkingEndEvent = z.infer<typeof ThinkingEndEventSchema>;
1540
- export type StateSnapshotEvent = z.infer<typeof StateSnapshotEventSchema>;
1541
- export type StateDeltaEvent = z.infer<typeof StateDeltaEventSchema>;
1542
- export type MessagesSnapshotEvent = z.infer<typeof MessagesSnapshotEventSchema>;
1543
- export type RawEvent = z.infer<typeof RawEventSchema>;
1544
- export type CustomEvent = z.infer<typeof CustomEventSchema>;
1545
- export type RunStartedEvent = z.infer<typeof RunStartedEventSchema>;
1546
- export type RunFinishedEvent = z.infer<typeof RunFinishedEventSchema>;
1547
- export type RunErrorEvent = z.infer<typeof RunErrorEventSchema>;
1548
- export type StepStartedEvent = z.infer<typeof StepStartedEventSchema>;
1549
- export type StepFinishedEvent = z.infer<typeof StepFinishedEventSchema>;
1550
- export {};