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