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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/es/_util/reactify.d.ts +1 -2
  2. package/es/_util/reactify.js +81 -231
  3. package/es/_util/reactify.js.map +1 -1
  4. package/es/_util/useDynamicStyle.js +1 -1
  5. package/es/attachments/index.js +4 -6
  6. package/es/attachments/index.js.map +1 -1
  7. package/es/chat-actionbar/_example-js/base.d.ts +2 -0
  8. package/es/chat-actionbar/_example-js/custom.d.ts +2 -0
  9. package/es/chat-actionbar/_example-js/style.d.ts +2 -0
  10. package/es/chat-actionbar/index.js +4 -6
  11. package/es/chat-actionbar/index.js.map +1 -1
  12. package/es/chat-attachments/_example-js/base.d.ts +2 -0
  13. package/es/chat-attachments/_example-js/scroll-x.d.ts +2 -0
  14. package/es/chat-attachments/_example-js/scroll-y.d.ts +2 -0
  15. package/es/chat-attachments/index.js +3 -1
  16. package/es/chat-attachments/index.js.map +1 -1
  17. package/es/chat-engine/_example-js/agui-basic.d.ts +10 -0
  18. package/es/chat-engine/_example-js/agui-comprehensive.d.ts +2 -0
  19. package/es/chat-engine/_example-js/agui-test.d.ts +11 -0
  20. package/es/chat-engine/_example-js/agui-toolcall.d.ts +5 -0
  21. package/es/chat-engine/_example-js/agui-videoclip.d.ts +8 -0
  22. package/es/chat-engine/_example-js/agui.d.ts +1 -0
  23. package/es/chat-engine/_example-js/basic.d.ts +9 -0
  24. package/es/chat-engine/_example-js/components/HotelCard.d.ts +3 -0
  25. package/es/chat-engine/_example-js/components/HumanInputForm.d.ts +6 -0
  26. package/es/chat-engine/_example-js/components/HumanInputResult.d.ts +3 -0
  27. package/es/chat-engine/_example-js/components/ItineraryCard.d.ts +3 -0
  28. package/es/chat-engine/_example-js/components/PlanningStatePanel.d.ts +4 -0
  29. package/es/chat-engine/_example-js/components/Toolcall.d.ts +4 -0
  30. package/es/chat-engine/_example-js/components/WeatherCard.d.ts +3 -0
  31. package/es/chat-engine/_example-js/components/login.d.ts +1 -0
  32. package/es/chat-engine/_example-js/comprehensive.d.ts +12 -0
  33. package/es/chat-engine/_example-js/custom-content.d.ts +1 -0
  34. package/es/chat-engine/_example-js/hookComponent.d.ts +1 -0
  35. package/es/chat-engine/_example-js/initial-messages.d.ts +9 -0
  36. package/es/chat-engine/_example-js/instance-methods.d.ts +13 -0
  37. package/es/chat-engine/_example-js/travel-actions.d.ts +91 -0
  38. package/es/chat-engine/_example-js/travelToolcall.d.ts +1 -0
  39. package/es/{chatbot/components/toolcall → chat-engine/components/activity}/index.d.ts +1 -0
  40. package/es/chat-engine/components/activity/index.js +18 -0
  41. package/es/{chatbot/components/toolcall → chat-engine/components/activity}/index.js.map +1 -1
  42. package/es/chat-engine/components/activity/registry.d.ts +44 -0
  43. package/es/{chatbot/components/toolcall → chat-engine/components/activity}/registry.js +32 -22
  44. package/es/chat-engine/components/activity/registry.js.map +1 -0
  45. package/es/chat-engine/components/activity/render.d.ts +11 -0
  46. package/es/chat-engine/components/activity/render.js +107 -0
  47. package/es/chat-engine/components/activity/render.js.map +1 -0
  48. package/es/chat-engine/components/activity/types.d.ts +32 -0
  49. package/es/chat-engine/components/activity/types.js +7 -0
  50. package/es/chat-engine/components/activity/types.js.map +1 -0
  51. package/es/chat-engine/components/index.d.ts +3 -0
  52. package/es/chat-engine/components/index.js +28 -0
  53. package/es/chat-engine/components/index.js.map +1 -0
  54. package/es/chat-engine/components/provider/agent-state.js +1 -1
  55. package/es/chat-engine/components/toolcall/index.js +4 -1
  56. package/es/chat-engine/components/toolcall/index.js.map +1 -1
  57. package/es/chat-engine/components/toolcall/registry.js +1 -1
  58. package/es/chat-engine/components/toolcall/render.js +72 -25
  59. package/es/chat-engine/components/toolcall/render.js.map +1 -1
  60. package/es/chat-engine/components/toolcall/types.js +1 -1
  61. package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +109 -0
  62. package/es/chat-engine/core/adapters/agui/event-mapper.js +375 -0
  63. package/es/chat-engine/core/adapters/agui/event-mapper.js.map +1 -0
  64. package/es/chat-engine/core/adapters/agui/events.d.ts +1550 -0
  65. package/es/chat-engine/core/adapters/agui/events.js +199 -0
  66. package/es/chat-engine/core/adapters/agui/events.js.map +1 -0
  67. package/es/chat-engine/core/adapters/agui/index.d.ts +75 -0
  68. package/es/chat-engine/core/adapters/agui/index.js +175 -0
  69. package/es/chat-engine/core/adapters/agui/index.js.map +1 -0
  70. package/es/chat-engine/core/adapters/agui/state-manager.d.ts +99 -0
  71. package/es/chat-engine/core/adapters/agui/state-manager.js +168 -0
  72. package/es/chat-engine/core/adapters/agui/state-manager.js.map +1 -0
  73. package/es/chat-engine/core/adapters/agui/types.d.ts +817 -0
  74. package/es/chat-engine/core/adapters/agui/types.js +95 -0
  75. package/es/chat-engine/core/adapters/agui/types.js.map +1 -0
  76. package/es/chat-engine/core/adapters/agui/utils.d.ts +197 -0
  77. package/es/chat-engine/core/adapters/agui/utils.js +311 -0
  78. package/es/chat-engine/core/adapters/agui/utils.js.map +1 -0
  79. package/es/chat-engine/core/index.d.ts +132 -0
  80. package/es/chat-engine/core/index.js +597 -0
  81. package/es/chat-engine/core/index.js.map +1 -0
  82. package/es/chat-engine/core/processor/index.d.ts +20 -0
  83. package/es/chat-engine/core/processor/index.js +146 -0
  84. package/es/chat-engine/core/processor/index.js.map +1 -0
  85. package/es/chat-engine/core/server/batch-client.d.ts +20 -0
  86. package/es/chat-engine/core/server/batch-client.js +114 -0
  87. package/es/chat-engine/core/server/batch-client.js.map +1 -0
  88. package/es/chat-engine/core/server/connection-manager.d.ts +39 -0
  89. package/es/chat-engine/core/server/connection-manager.js +84 -0
  90. package/es/chat-engine/core/server/connection-manager.js.map +1 -0
  91. package/es/chat-engine/core/server/errors.d.ts +22 -0
  92. package/es/chat-engine/core/server/errors.js +80 -0
  93. package/es/chat-engine/core/server/errors.js.map +1 -0
  94. package/es/chat-engine/core/server/index.d.ts +11 -0
  95. package/es/chat-engine/core/server/index.js +26 -0
  96. package/es/chat-engine/core/server/index.js.map +1 -0
  97. package/es/chat-engine/core/server/llm-service.d.ts +44 -0
  98. package/es/chat-engine/core/server/llm-service.js +198 -0
  99. package/es/chat-engine/core/server/llm-service.js.map +1 -0
  100. package/es/chat-engine/core/server/sse-client.d.ts +77 -0
  101. package/es/chat-engine/core/server/sse-client.js +362 -0
  102. package/es/chat-engine/core/server/sse-client.js.map +1 -0
  103. package/es/chat-engine/core/server/sse-parser.d.ts +49 -0
  104. package/es/chat-engine/core/server/sse-parser.js +116 -0
  105. package/es/chat-engine/core/server/sse-parser.js.map +1 -0
  106. package/es/chat-engine/core/server/types.d.ts +54 -0
  107. package/es/chat-engine/core/server/types.js +28 -0
  108. package/es/chat-engine/core/server/types.js.map +1 -0
  109. package/es/chat-engine/core/store/message.d.ts +27 -0
  110. package/es/chat-engine/core/store/message.js +263 -0
  111. package/es/chat-engine/core/store/message.js.map +1 -0
  112. package/es/chat-engine/core/store/model.d.ts +8 -0
  113. package/es/chat-engine/core/store/model.js +65 -0
  114. package/es/chat-engine/core/store/model.js.map +1 -0
  115. package/es/chat-engine/core/store/reactiveState.d.ts +52 -0
  116. package/es/chat-engine/core/store/reactiveState.js +1359 -0
  117. package/es/chat-engine/core/store/reactiveState.js.map +1 -0
  118. package/es/chat-engine/core/type.d.ts +255 -0
  119. package/es/chat-engine/core/type.js +7 -0
  120. package/es/chat-engine/core/type.js.map +1 -0
  121. package/es/chat-engine/core/utils/eventEmitter.d.ts +10 -0
  122. package/es/chat-engine/core/utils/eventEmitter.js +67 -0
  123. package/es/chat-engine/core/utils/eventEmitter.js.map +1 -0
  124. package/es/chat-engine/core/utils/index.d.ts +33 -0
  125. package/es/chat-engine/core/utils/index.js +999 -0
  126. package/es/chat-engine/core/utils/index.js.map +1 -0
  127. package/es/chat-engine/core/utils/logger.d.ts +30 -0
  128. package/es/chat-engine/core/utils/logger.js +87 -0
  129. package/es/chat-engine/core/utils/logger.js.map +1 -0
  130. package/es/chat-engine/hooks/index.d.ts +4 -0
  131. package/es/chat-engine/hooks/index.js +20 -0
  132. package/es/chat-engine/hooks/index.js.map +1 -0
  133. package/es/chat-engine/hooks/useAgentActivity.d.ts +16 -0
  134. package/es/chat-engine/hooks/useAgentActivity.js +73 -0
  135. package/es/chat-engine/hooks/useAgentActivity.js.map +1 -0
  136. package/es/chat-engine/hooks/useAgentState.js +1 -1
  137. package/es/chat-engine/hooks/useAgentState.js.map +1 -1
  138. package/es/chat-engine/hooks/useAgentToolcall.js +1 -1
  139. package/es/chat-engine/hooks/useChat.js +3 -3
  140. package/es/chat-engine/hooks/useChat.js.map +1 -1
  141. package/es/chat-engine/index.d.ts +3 -1
  142. package/es/chat-engine/index.js +37 -3
  143. package/es/chat-engine/index.js.map +1 -1
  144. package/es/chat-filecard/_example-js/base.d.ts +1 -0
  145. package/es/chat-filecard/index.js +4 -6
  146. package/es/chat-filecard/index.js.map +1 -1
  147. package/es/chat-loading/_example-js/base.d.ts +2 -0
  148. package/es/chat-loading/_example-js/text.d.ts +2 -0
  149. package/es/chat-loading/index.js +4 -6
  150. package/es/chat-loading/index.js.map +1 -1
  151. package/es/chat-markdown/_example-js/base.d.ts +1 -0
  152. package/es/chat-markdown/_example-js/custom.d.ts +2 -0
  153. package/es/chat-markdown/_example-js/event.d.ts +1 -0
  154. package/es/chat-markdown/_example-js/footnote.d.ts +2 -0
  155. package/es/chat-markdown/_example-js/plugin.d.ts +2 -0
  156. package/es/chat-markdown/_example-js/theme.d.ts +2 -0
  157. package/es/chat-markdown/index.js +4 -6
  158. package/es/chat-markdown/index.js.map +1 -1
  159. package/es/chat-message/_example-js/action.d.ts +1 -0
  160. package/es/chat-message/_example-js/base.d.ts +1 -0
  161. package/es/chat-message/_example-js/configure.d.ts +1 -0
  162. package/es/chat-message/_example-js/content.d.ts +1 -0
  163. package/es/chat-message/_example-js/custom.d.ts +1 -0
  164. package/es/chat-message/_example-js/handle-actions.d.ts +7 -0
  165. package/es/chat-message/_example-js/status.d.ts +1 -0
  166. package/es/chat-message/_example-js/think.d.ts +1 -0
  167. package/es/chat-message/index.js +4 -6
  168. package/es/chat-message/index.js.map +1 -1
  169. package/es/chat-sender/_example-js/attachment.d.ts +2 -0
  170. package/es/chat-sender/_example-js/base.d.ts +2 -0
  171. package/es/chat-sender/_example-js/custom.d.ts +2 -0
  172. package/es/chat-sender/index.js +4 -6
  173. package/es/chat-sender/index.js.map +1 -1
  174. package/es/chat-thinking/_example-js/base.d.ts +1 -0
  175. package/es/chat-thinking/_example-js/style.d.ts +1 -0
  176. package/es/chat-thinking/index.js +4 -6
  177. package/es/chat-thinking/index.js.map +1 -1
  178. package/es/chatbot/_example-js/agent.d.ts +1 -0
  179. package/es/chatbot/_example-js/agui.d.ts +13 -0
  180. package/es/chatbot/_example-js/backup/travel.d.ts +1 -0
  181. package/es/chatbot/_example-js/basic.d.ts +1 -0
  182. package/es/chatbot/_example-js/code.d.ts +1 -0
  183. package/es/chatbot/_example-js/components/ItineraryCard.d.ts +3 -0
  184. package/es/chatbot/_example-js/components/login.d.ts +1 -0
  185. package/es/chatbot/_example-js/comprehensive.d.ts +1 -0
  186. package/es/chatbot/_example-js/custom-content.d.ts +1 -0
  187. package/es/chatbot/_example-js/custom-merge.d.ts +1 -0
  188. package/es/chatbot/_example-js/custom.d.ts +1 -0
  189. package/es/chatbot/_example-js/docs.d.ts +1 -0
  190. package/es/chatbot/_example-js/image.d.ts +1 -0
  191. package/es/chatbot/_example-js/initial-messages.d.ts +9 -0
  192. package/es/chatbot/_example-js/instance-methods.d.ts +14 -0
  193. package/es/chatbot/_example-js/nostream.d.ts +1 -0
  194. package/es/chatbot/_example-js/quick-start.d.ts +9 -0
  195. package/es/chatbot/_example-js/research.d.ts +1 -0
  196. package/es/chatbot/_example-js/role-message-config.d.ts +22 -0
  197. package/es/chatbot/_example-js/sender-config.d.ts +20 -0
  198. package/es/chatbot/_example-js/service-config.d.ts +17 -0
  199. package/es/chatbot/_example-js/simple.d.ts +1 -0
  200. package/es/chatbot/_example-js/utils/messageRenderer.d.ts +5 -0
  201. package/es/chatbot/index.js +4 -6
  202. package/es/chatbot/index.js.map +1 -1
  203. package/es/index.js +37 -9
  204. package/es/index.js.map +1 -1
  205. package/es/style/index.js +1 -1
  206. package/package.json +2 -2
  207. package/es/chatbot/components/provider/agent-state.d.ts +0 -5
  208. package/es/chatbot/components/provider/agent-state.js +0 -28
  209. package/es/chatbot/components/provider/agent-state.js.map +0 -1
  210. package/es/chatbot/components/toolcall/index.js +0 -19
  211. package/es/chatbot/components/toolcall/registry.d.ts +0 -35
  212. package/es/chatbot/components/toolcall/registry.js.map +0 -1
  213. package/es/chatbot/components/toolcall/render.d.ts +0 -13
  214. package/es/chatbot/components/toolcall/render.js +0 -207
  215. package/es/chatbot/components/toolcall/render.js.map +0 -1
  216. package/es/chatbot/components/toolcall/types.d.ts +0 -57
  217. package/es/chatbot/components/toolcall/types.js +0 -15
  218. package/es/chatbot/components/toolcall/types.js.map +0 -1
  219. package/es/chatbot/hooks/useAgentState.d.ts +0 -40
  220. package/es/chatbot/hooks/useAgentState.js +0 -76
  221. package/es/chatbot/hooks/useAgentState.js.map +0 -1
  222. package/es/chatbot/hooks/useAgentToolcall.d.ts +0 -28
  223. package/es/chatbot/hooks/useAgentToolcall.js +0 -78
  224. package/es/chatbot/hooks/useAgentToolcall.js.map +0 -1
  225. package/es/chatbot/hooks/useChat.d.ts +0 -11
  226. package/es/chatbot/hooks/useChat.js +0 -66
  227. package/es/chatbot/hooks/useChat.js.map +0 -1
@@ -0,0 +1,1550 @@
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
+ messageId?: string;
83
+ type?: EventType.TEXT_MESSAGE_START;
84
+ role?: "assistant";
85
+ timestamp?: number;
86
+ rawEvent?: any;
87
+ }, {
88
+ messageId?: string;
89
+ type?: EventType.TEXT_MESSAGE_START;
90
+ role?: "assistant";
91
+ timestamp?: number;
92
+ rawEvent?: any;
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
+ messageId?: string;
103
+ type?: EventType.TEXT_MESSAGE_CONTENT;
104
+ timestamp?: number;
105
+ rawEvent?: any;
106
+ delta?: string;
107
+ }, {
108
+ messageId?: string;
109
+ type?: EventType.TEXT_MESSAGE_CONTENT;
110
+ timestamp?: number;
111
+ rawEvent?: any;
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
+ messageId?: string;
122
+ type?: EventType.TEXT_MESSAGE_END;
123
+ timestamp?: number;
124
+ rawEvent?: any;
125
+ }, {
126
+ messageId?: string;
127
+ type?: EventType.TEXT_MESSAGE_END;
128
+ timestamp?: number;
129
+ rawEvent?: any;
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
+ messageId?: string;
141
+ type?: EventType.TEXT_MESSAGE_CHUNK;
142
+ role?: "assistant";
143
+ timestamp?: number;
144
+ rawEvent?: any;
145
+ delta?: string;
146
+ }, {
147
+ messageId?: string;
148
+ type?: EventType.TEXT_MESSAGE_CHUNK;
149
+ role?: "assistant";
150
+ timestamp?: number;
151
+ rawEvent?: any;
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
+ }, "messageId" | "type"> & {
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
+ toolCallName?: string;
212
+ type?: EventType.TOOL_CALL_START;
213
+ timestamp?: number;
214
+ toolCallId?: string;
215
+ rawEvent?: any;
216
+ parentMessageId?: string;
217
+ }, {
218
+ toolCallName?: string;
219
+ type?: EventType.TOOL_CALL_START;
220
+ timestamp?: number;
221
+ toolCallId?: string;
222
+ rawEvent?: any;
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
+ messageId?: string;
275
+ toolCallName?: string;
276
+ type?: EventType.TOOL_CALL_RESULT;
277
+ role?: "tool";
278
+ timestamp?: number;
279
+ toolCallId?: string;
280
+ rawEvent?: any;
281
+ }, {
282
+ content?: string;
283
+ messageId?: string;
284
+ toolCallName?: string;
285
+ type?: EventType.TOOL_CALL_RESULT;
286
+ role?: "tool";
287
+ timestamp?: number;
288
+ toolCallId?: string;
289
+ rawEvent?: any;
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
+ toolCallName?: string;
302
+ type?: EventType.TOOL_CALL_CHUNK;
303
+ timestamp?: number;
304
+ toolCallId?: string;
305
+ rawEvent?: any;
306
+ delta?: string;
307
+ parentMessageId?: string;
308
+ }, {
309
+ toolCallName?: string;
310
+ type?: EventType.TOOL_CALL_CHUNK;
311
+ timestamp?: number;
312
+ toolCallId?: string;
313
+ rawEvent?: any;
314
+ delta?: 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
+ activityType?: string;
330
+ messageId?: string;
331
+ type?: EventType.ACTIVITY_SNAPSHOT;
332
+ timestamp?: number;
333
+ rawEvent?: any;
334
+ }, {
335
+ replace?: boolean;
336
+ content?: Record<string, any>;
337
+ activityType?: string;
338
+ messageId?: string;
339
+ type?: EventType.ACTIVITY_SNAPSHOT;
340
+ timestamp?: number;
341
+ rawEvent?: any;
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
+ activityType?: string;
353
+ messageId?: string;
354
+ type?: EventType.ACTIVITY_DELTA;
355
+ timestamp?: number;
356
+ rawEvent?: any;
357
+ patch?: any[];
358
+ }, {
359
+ activityType?: string;
360
+ messageId?: string;
361
+ type?: EventType.ACTIVITY_DELTA;
362
+ timestamp?: number;
363
+ rawEvent?: any;
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
+ activityType?: string;
585
+ id?: string;
586
+ role?: "activity";
587
+ }, {
588
+ content?: Record<string, any>;
589
+ activityType?: string;
590
+ id?: string;
591
+ role?: "activity";
592
+ }>]>, "many">;
593
+ }, "strip", z.ZodTypeAny, {
594
+ messages?: ({
595
+ content?: string;
596
+ name?: string;
597
+ id?: string;
598
+ role?: "developer";
599
+ timestamp?: number;
600
+ } | {
601
+ content?: string;
602
+ name?: string;
603
+ id?: string;
604
+ role?: "system";
605
+ timestamp?: number;
606
+ } | {
607
+ content?: string;
608
+ name?: string;
609
+ id?: string;
610
+ role?: "assistant";
611
+ timestamp?: number;
612
+ reasoningContent?: string;
613
+ toolCalls?: {
614
+ function?: {
615
+ name?: string;
616
+ arguments?: string;
617
+ };
618
+ type?: "function";
619
+ id?: string;
620
+ }[];
621
+ } | {
622
+ content?: string;
623
+ name?: string;
624
+ id?: string;
625
+ role?: "user";
626
+ timestamp?: number;
627
+ } | {
628
+ content?: string;
629
+ id?: string;
630
+ role?: "tool";
631
+ toolCallId?: string;
632
+ } | {
633
+ content?: Record<string, any>;
634
+ activityType?: string;
635
+ id?: string;
636
+ role?: "activity";
637
+ })[];
638
+ type?: EventType.MESSAGES_SNAPSHOT;
639
+ timestamp?: number;
640
+ rawEvent?: any;
641
+ }, {
642
+ messages?: ({
643
+ content?: string;
644
+ name?: string;
645
+ id?: string;
646
+ role?: "developer";
647
+ timestamp?: number;
648
+ } | {
649
+ content?: string;
650
+ name?: string;
651
+ id?: string;
652
+ role?: "system";
653
+ timestamp?: number;
654
+ } | {
655
+ content?: string;
656
+ name?: string;
657
+ id?: string;
658
+ role?: "assistant";
659
+ timestamp?: number;
660
+ reasoningContent?: string;
661
+ toolCalls?: {
662
+ function?: {
663
+ name?: string;
664
+ arguments?: string;
665
+ };
666
+ type?: "function";
667
+ id?: string;
668
+ }[];
669
+ } | {
670
+ content?: string;
671
+ name?: string;
672
+ id?: string;
673
+ role?: "user";
674
+ timestamp?: number;
675
+ } | {
676
+ content?: string;
677
+ id?: string;
678
+ role?: "tool";
679
+ toolCallId?: string;
680
+ } | {
681
+ content?: Record<string, any>;
682
+ activityType?: string;
683
+ id?: string;
684
+ role?: "activity";
685
+ })[];
686
+ type?: EventType.MESSAGES_SNAPSHOT;
687
+ timestamp?: number;
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
+ result?: any;
760
+ type?: EventType.RUN_FINISHED;
761
+ timestamp?: number;
762
+ threadId?: string;
763
+ runId?: string;
764
+ rawEvent?: any;
765
+ }, {
766
+ result?: any;
767
+ type?: EventType.RUN_FINISHED;
768
+ timestamp?: number;
769
+ threadId?: string;
770
+ runId?: string;
771
+ rawEvent?: 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
+ messageId?: string;
836
+ type?: EventType.TEXT_MESSAGE_START;
837
+ role?: "assistant";
838
+ timestamp?: number;
839
+ rawEvent?: any;
840
+ }, {
841
+ messageId?: string;
842
+ type?: EventType.TEXT_MESSAGE_START;
843
+ role?: "assistant";
844
+ timestamp?: number;
845
+ rawEvent?: any;
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
+ messageId?: string;
855
+ type?: EventType.TEXT_MESSAGE_CONTENT;
856
+ timestamp?: number;
857
+ rawEvent?: any;
858
+ delta?: string;
859
+ }, {
860
+ messageId?: string;
861
+ type?: EventType.TEXT_MESSAGE_CONTENT;
862
+ timestamp?: number;
863
+ rawEvent?: any;
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
+ messageId?: string;
873
+ type?: EventType.TEXT_MESSAGE_END;
874
+ timestamp?: number;
875
+ rawEvent?: any;
876
+ }, {
877
+ messageId?: string;
878
+ type?: EventType.TEXT_MESSAGE_END;
879
+ timestamp?: number;
880
+ rawEvent?: any;
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
+ messageId?: string;
891
+ type?: EventType.TEXT_MESSAGE_CHUNK;
892
+ role?: "assistant";
893
+ timestamp?: number;
894
+ rawEvent?: any;
895
+ delta?: string;
896
+ }, {
897
+ messageId?: string;
898
+ type?: EventType.TEXT_MESSAGE_CHUNK;
899
+ role?: "assistant";
900
+ timestamp?: number;
901
+ rawEvent?: any;
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
+ }, "messageId" | "type"> & {
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
+ toolCallName?: string;
958
+ type?: EventType.TOOL_CALL_START;
959
+ timestamp?: number;
960
+ toolCallId?: string;
961
+ rawEvent?: any;
962
+ parentMessageId?: string;
963
+ }, {
964
+ toolCallName?: string;
965
+ type?: EventType.TOOL_CALL_START;
966
+ timestamp?: number;
967
+ toolCallId?: string;
968
+ rawEvent?: any;
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
+ toolCallName?: string;
1016
+ type?: EventType.TOOL_CALL_CHUNK;
1017
+ timestamp?: number;
1018
+ toolCallId?: string;
1019
+ rawEvent?: any;
1020
+ delta?: string;
1021
+ parentMessageId?: string;
1022
+ }, {
1023
+ toolCallName?: string;
1024
+ type?: EventType.TOOL_CALL_CHUNK;
1025
+ timestamp?: number;
1026
+ toolCallId?: string;
1027
+ rawEvent?: any;
1028
+ delta?: 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
+ messageId?: string;
1043
+ toolCallName?: string;
1044
+ type?: EventType.TOOL_CALL_RESULT;
1045
+ role?: "tool";
1046
+ timestamp?: number;
1047
+ toolCallId?: string;
1048
+ rawEvent?: any;
1049
+ }, {
1050
+ content?: string;
1051
+ messageId?: string;
1052
+ toolCallName?: string;
1053
+ type?: EventType.TOOL_CALL_RESULT;
1054
+ role?: "tool";
1055
+ timestamp?: number;
1056
+ toolCallId?: string;
1057
+ rawEvent?: any;
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
+ activityType?: string;
1071
+ messageId?: string;
1072
+ type?: EventType.ACTIVITY_SNAPSHOT;
1073
+ timestamp?: number;
1074
+ rawEvent?: any;
1075
+ }, {
1076
+ replace?: boolean;
1077
+ content?: Record<string, any>;
1078
+ activityType?: string;
1079
+ messageId?: string;
1080
+ type?: EventType.ACTIVITY_SNAPSHOT;
1081
+ timestamp?: number;
1082
+ rawEvent?: any;
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
+ activityType?: string;
1093
+ messageId?: string;
1094
+ type?: EventType.ACTIVITY_DELTA;
1095
+ timestamp?: number;
1096
+ rawEvent?: any;
1097
+ patch?: any[];
1098
+ }, {
1099
+ activityType?: string;
1100
+ messageId?: string;
1101
+ type?: EventType.ACTIVITY_DELTA;
1102
+ timestamp?: number;
1103
+ rawEvent?: any;
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
+ activityType?: string;
1288
+ id?: string;
1289
+ role?: "activity";
1290
+ }, {
1291
+ content?: Record<string, any>;
1292
+ activityType?: string;
1293
+ id?: string;
1294
+ role?: "activity";
1295
+ }>]>, "many">;
1296
+ }, "strip", z.ZodTypeAny, {
1297
+ messages?: ({
1298
+ content?: string;
1299
+ name?: string;
1300
+ id?: string;
1301
+ role?: "developer";
1302
+ timestamp?: number;
1303
+ } | {
1304
+ content?: string;
1305
+ name?: string;
1306
+ id?: string;
1307
+ role?: "system";
1308
+ timestamp?: number;
1309
+ } | {
1310
+ content?: string;
1311
+ name?: string;
1312
+ id?: string;
1313
+ role?: "assistant";
1314
+ timestamp?: number;
1315
+ reasoningContent?: string;
1316
+ toolCalls?: {
1317
+ function?: {
1318
+ name?: string;
1319
+ arguments?: string;
1320
+ };
1321
+ type?: "function";
1322
+ id?: string;
1323
+ }[];
1324
+ } | {
1325
+ content?: string;
1326
+ name?: string;
1327
+ id?: string;
1328
+ role?: "user";
1329
+ timestamp?: number;
1330
+ } | {
1331
+ content?: string;
1332
+ id?: string;
1333
+ role?: "tool";
1334
+ toolCallId?: string;
1335
+ } | {
1336
+ content?: Record<string, any>;
1337
+ activityType?: string;
1338
+ id?: string;
1339
+ role?: "activity";
1340
+ })[];
1341
+ type?: EventType.MESSAGES_SNAPSHOT;
1342
+ timestamp?: number;
1343
+ rawEvent?: any;
1344
+ }, {
1345
+ messages?: ({
1346
+ content?: string;
1347
+ name?: string;
1348
+ id?: string;
1349
+ role?: "developer";
1350
+ timestamp?: number;
1351
+ } | {
1352
+ content?: string;
1353
+ name?: string;
1354
+ id?: string;
1355
+ role?: "system";
1356
+ timestamp?: number;
1357
+ } | {
1358
+ content?: string;
1359
+ name?: string;
1360
+ id?: string;
1361
+ role?: "assistant";
1362
+ timestamp?: number;
1363
+ reasoningContent?: string;
1364
+ toolCalls?: {
1365
+ function?: {
1366
+ name?: string;
1367
+ arguments?: string;
1368
+ };
1369
+ type?: "function";
1370
+ id?: string;
1371
+ }[];
1372
+ } | {
1373
+ content?: string;
1374
+ name?: string;
1375
+ id?: string;
1376
+ role?: "user";
1377
+ timestamp?: number;
1378
+ } | {
1379
+ content?: string;
1380
+ id?: string;
1381
+ role?: "tool";
1382
+ toolCallId?: string;
1383
+ } | {
1384
+ content?: Record<string, any>;
1385
+ activityType?: string;
1386
+ id?: string;
1387
+ role?: "activity";
1388
+ })[];
1389
+ type?: EventType.MESSAGES_SNAPSHOT;
1390
+ timestamp?: number;
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
+ result?: any;
1459
+ type?: EventType.RUN_FINISHED;
1460
+ timestamp?: number;
1461
+ threadId?: string;
1462
+ runId?: string;
1463
+ rawEvent?: any;
1464
+ }, {
1465
+ result?: any;
1466
+ type?: EventType.RUN_FINISHED;
1467
+ timestamp?: number;
1468
+ threadId?: string;
1469
+ runId?: string;
1470
+ rawEvent?: 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 {};