@tdesign-react/chat 1.0.2-alpha.1 → 1.0.2-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +55 -0
- package/es/chat-engine/components/index.js.map +1 -0
- package/es/chat-engine/components/provider/agent-state.js +2 -2
- package/es/chat-engine/components/toolcall/index.js +32 -2
- 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 -15
- 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 +377 -221
- 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 +155 -97
- 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 +20 -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 +2 -2
- 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.js +4 -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 +41 -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 +40 -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,93 +75,93 @@ 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
|
-
|
|
82
|
+
messageId?: string;
|
|
83
|
+
type?: AGUIEventType.TEXT_MESSAGE_START;
|
|
75
84
|
role?: "assistant";
|
|
76
85
|
timestamp?: number;
|
|
77
86
|
rawEvent?: any;
|
|
78
|
-
messageId?: string;
|
|
79
87
|
}, {
|
|
80
|
-
|
|
88
|
+
messageId?: string;
|
|
89
|
+
type?: AGUIEventType.TEXT_MESSAGE_START;
|
|
81
90
|
role?: "assistant";
|
|
82
91
|
timestamp?: number;
|
|
83
92
|
rawEvent?: any;
|
|
84
|
-
messageId?: string;
|
|
85
93
|
}>;
|
|
86
94
|
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
|
-
|
|
102
|
+
messageId?: string;
|
|
103
|
+
type?: AGUIEventType.TEXT_MESSAGE_CONTENT;
|
|
95
104
|
timestamp?: number;
|
|
96
105
|
rawEvent?: any;
|
|
97
|
-
messageId?: string;
|
|
98
106
|
delta?: string;
|
|
99
107
|
}, {
|
|
100
|
-
|
|
108
|
+
messageId?: string;
|
|
109
|
+
type?: AGUIEventType.TEXT_MESSAGE_CONTENT;
|
|
101
110
|
timestamp?: number;
|
|
102
111
|
rawEvent?: any;
|
|
103
|
-
messageId?: string;
|
|
104
112
|
delta?: string;
|
|
105
113
|
}>;
|
|
106
114
|
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
|
-
|
|
121
|
+
messageId?: string;
|
|
122
|
+
type?: AGUIEventType.TEXT_MESSAGE_END;
|
|
114
123
|
timestamp?: number;
|
|
115
124
|
rawEvent?: any;
|
|
116
|
-
messageId?: string;
|
|
117
125
|
}, {
|
|
118
|
-
|
|
126
|
+
messageId?: string;
|
|
127
|
+
type?: AGUIEventType.TEXT_MESSAGE_END;
|
|
119
128
|
timestamp?: number;
|
|
120
129
|
rawEvent?: any;
|
|
121
|
-
messageId?: string;
|
|
122
130
|
}>;
|
|
123
131
|
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
|
-
|
|
140
|
+
messageId?: string;
|
|
141
|
+
type?: AGUIEventType.TEXT_MESSAGE_CHUNK;
|
|
133
142
|
role?: "assistant";
|
|
134
143
|
timestamp?: number;
|
|
135
144
|
rawEvent?: any;
|
|
136
|
-
messageId?: string;
|
|
137
145
|
delta?: string;
|
|
138
146
|
}, {
|
|
139
|
-
|
|
147
|
+
messageId?: string;
|
|
148
|
+
type?: AGUIEventType.TEXT_MESSAGE_CHUNK;
|
|
140
149
|
role?: "assistant";
|
|
141
150
|
timestamp?: number;
|
|
142
151
|
rawEvent?: any;
|
|
143
|
-
messageId?: string;
|
|
144
152
|
delta?: string;
|
|
145
153
|
}>;
|
|
146
154
|
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
|
-
}, "
|
|
168
|
-
type: z.ZodLiteral<
|
|
175
|
+
}, "messageId" | "type"> & {
|
|
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
|
+
messageId?: string;
|
|
275
|
+
type?: AGUIEventType.TOOL_CALL_RESULT;
|
|
267
276
|
role?: "tool";
|
|
268
|
-
toolCallName?: string;
|
|
269
277
|
timestamp?: number;
|
|
270
278
|
toolCallId?: string;
|
|
271
279
|
rawEvent?: any;
|
|
272
|
-
|
|
280
|
+
toolCallName?: string;
|
|
273
281
|
}, {
|
|
274
|
-
type?: EventType.TOOL_CALL_RESULT;
|
|
275
282
|
content?: string;
|
|
283
|
+
messageId?: string;
|
|
284
|
+
type?: AGUIEventType.TOOL_CALL_RESULT;
|
|
276
285
|
role?: "tool";
|
|
277
|
-
toolCallName?: string;
|
|
278
286
|
timestamp?: number;
|
|
279
287
|
toolCallId?: string;
|
|
280
288
|
rawEvent?: any;
|
|
281
|
-
|
|
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
|
+
activityType?: string;
|
|
330
|
+
messageId?: string;
|
|
331
|
+
type?: AGUIEventType.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?: AGUIEventType.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<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
|
+
activityType?: string;
|
|
353
|
+
messageId?: string;
|
|
354
|
+
type?: AGUIEventType.ACTIVITY_DELTA;
|
|
355
|
+
timestamp?: number;
|
|
356
|
+
rawEvent?: any;
|
|
357
|
+
patch?: any[];
|
|
358
|
+
}, {
|
|
359
|
+
activityType?: string;
|
|
360
|
+
messageId?: string;
|
|
361
|
+
type?: AGUIEventType.ACTIVITY_DELTA;
|
|
362
|
+
timestamp?: number;
|
|
363
|
+
rawEvent?: any;
|
|
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,48 @@ 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
|
+
activityType?: string;
|
|
585
|
+
id?: string;
|
|
586
|
+
role?: "activity";
|
|
587
|
+
}, {
|
|
588
|
+
content?: Record<string, any>;
|
|
589
|
+
activityType?: string;
|
|
590
|
+
id?: string;
|
|
591
|
+
role?: "activity";
|
|
520
592
|
}>]>, "many">;
|
|
521
593
|
}, "strip", z.ZodTypeAny, {
|
|
522
|
-
type?: EventType.MESSAGES_SNAPSHOT;
|
|
523
594
|
messages?: ({
|
|
524
595
|
content?: string;
|
|
525
596
|
name?: string;
|
|
526
|
-
role?: "developer";
|
|
527
597
|
id?: string;
|
|
598
|
+
role?: "developer";
|
|
528
599
|
timestamp?: number;
|
|
529
600
|
} | {
|
|
530
601
|
content?: string;
|
|
531
602
|
name?: string;
|
|
532
|
-
role?: "system";
|
|
533
603
|
id?: string;
|
|
604
|
+
role?: "system";
|
|
534
605
|
timestamp?: number;
|
|
535
606
|
} | {
|
|
536
607
|
content?: string;
|
|
537
608
|
name?: string;
|
|
538
|
-
role?: "assistant";
|
|
539
609
|
id?: string;
|
|
610
|
+
role?: "assistant";
|
|
540
611
|
timestamp?: number;
|
|
541
612
|
reasoningContent?: string;
|
|
542
613
|
toolCalls?: {
|
|
@@ -550,36 +621,41 @@ export declare const MessagesSnapshotEventSchema: z.ZodObject<{
|
|
|
550
621
|
} | {
|
|
551
622
|
content?: string;
|
|
552
623
|
name?: string;
|
|
553
|
-
role?: "user";
|
|
554
624
|
id?: string;
|
|
625
|
+
role?: "user";
|
|
555
626
|
timestamp?: number;
|
|
556
627
|
} | {
|
|
557
628
|
content?: string;
|
|
558
|
-
role?: "tool";
|
|
559
629
|
id?: string;
|
|
630
|
+
role?: "tool";
|
|
560
631
|
toolCallId?: string;
|
|
632
|
+
} | {
|
|
633
|
+
content?: Record<string, any>;
|
|
634
|
+
activityType?: string;
|
|
635
|
+
id?: string;
|
|
636
|
+
role?: "activity";
|
|
561
637
|
})[];
|
|
638
|
+
type?: AGUIEventType.MESSAGES_SNAPSHOT;
|
|
562
639
|
timestamp?: number;
|
|
563
640
|
rawEvent?: any;
|
|
564
641
|
}, {
|
|
565
|
-
type?: EventType.MESSAGES_SNAPSHOT;
|
|
566
642
|
messages?: ({
|
|
567
643
|
content?: string;
|
|
568
644
|
name?: string;
|
|
569
|
-
role?: "developer";
|
|
570
645
|
id?: string;
|
|
646
|
+
role?: "developer";
|
|
571
647
|
timestamp?: number;
|
|
572
648
|
} | {
|
|
573
649
|
content?: string;
|
|
574
650
|
name?: string;
|
|
575
|
-
role?: "system";
|
|
576
651
|
id?: string;
|
|
652
|
+
role?: "system";
|
|
577
653
|
timestamp?: number;
|
|
578
654
|
} | {
|
|
579
655
|
content?: string;
|
|
580
656
|
name?: string;
|
|
581
|
-
role?: "assistant";
|
|
582
657
|
id?: string;
|
|
658
|
+
role?: "assistant";
|
|
583
659
|
timestamp?: number;
|
|
584
660
|
reasoningContent?: string;
|
|
585
661
|
toolCalls?: {
|
|
@@ -593,15 +669,21 @@ export declare const MessagesSnapshotEventSchema: z.ZodObject<{
|
|
|
593
669
|
} | {
|
|
594
670
|
content?: string;
|
|
595
671
|
name?: string;
|
|
596
|
-
role?: "user";
|
|
597
672
|
id?: string;
|
|
673
|
+
role?: "user";
|
|
598
674
|
timestamp?: number;
|
|
599
675
|
} | {
|
|
600
676
|
content?: string;
|
|
601
|
-
role?: "tool";
|
|
602
677
|
id?: string;
|
|
678
|
+
role?: "tool";
|
|
603
679
|
toolCallId?: string;
|
|
680
|
+
} | {
|
|
681
|
+
content?: Record<string, any>;
|
|
682
|
+
activityType?: string;
|
|
683
|
+
id?: string;
|
|
684
|
+
role?: "activity";
|
|
604
685
|
})[];
|
|
686
|
+
type?: AGUIEventType.MESSAGES_SNAPSHOT;
|
|
605
687
|
timestamp?: number;
|
|
606
688
|
rawEvent?: any;
|
|
607
689
|
}>;
|
|
@@ -609,19 +691,19 @@ 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,20 +751,20 @@ 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?: EventType.RUN_FINISHED;
|
|
678
759
|
result?: any;
|
|
760
|
+
type?: AGUIEventType.RUN_FINISHED;
|
|
679
761
|
timestamp?: number;
|
|
680
762
|
threadId?: string;
|
|
681
763
|
runId?: string;
|
|
682
764
|
rawEvent?: any;
|
|
683
765
|
}, {
|
|
684
|
-
type?: EventType.RUN_FINISHED;
|
|
685
766
|
result?: any;
|
|
767
|
+
type?: AGUIEventType.RUN_FINISHED;
|
|
686
768
|
timestamp?: number;
|
|
687
769
|
threadId?: string;
|
|
688
770
|
runId?: string;
|
|
@@ -692,19 +774,19 @@ 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,107 +828,107 @@ 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
|
-
|
|
835
|
+
messageId?: string;
|
|
836
|
+
type?: AGUIEventType.TEXT_MESSAGE_START;
|
|
754
837
|
role?: "assistant";
|
|
755
838
|
timestamp?: number;
|
|
756
839
|
rawEvent?: any;
|
|
757
|
-
messageId?: string;
|
|
758
840
|
}, {
|
|
759
|
-
|
|
841
|
+
messageId?: string;
|
|
842
|
+
type?: AGUIEventType.TEXT_MESSAGE_START;
|
|
760
843
|
role?: "assistant";
|
|
761
844
|
timestamp?: number;
|
|
762
845
|
rawEvent?: any;
|
|
763
|
-
messageId?: string;
|
|
764
846
|
}>, 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
|
-
|
|
854
|
+
messageId?: string;
|
|
855
|
+
type?: AGUIEventType.TEXT_MESSAGE_CONTENT;
|
|
773
856
|
timestamp?: number;
|
|
774
857
|
rawEvent?: any;
|
|
775
|
-
messageId?: string;
|
|
776
858
|
delta?: string;
|
|
777
859
|
}, {
|
|
778
|
-
|
|
860
|
+
messageId?: string;
|
|
861
|
+
type?: AGUIEventType.TEXT_MESSAGE_CONTENT;
|
|
779
862
|
timestamp?: number;
|
|
780
863
|
rawEvent?: any;
|
|
781
|
-
messageId?: string;
|
|
782
864
|
delta?: string;
|
|
783
865
|
}>, 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
|
-
|
|
872
|
+
messageId?: string;
|
|
873
|
+
type?: AGUIEventType.TEXT_MESSAGE_END;
|
|
791
874
|
timestamp?: number;
|
|
792
875
|
rawEvent?: any;
|
|
793
|
-
messageId?: string;
|
|
794
876
|
}, {
|
|
795
|
-
|
|
877
|
+
messageId?: string;
|
|
878
|
+
type?: AGUIEventType.TEXT_MESSAGE_END;
|
|
796
879
|
timestamp?: number;
|
|
797
880
|
rawEvent?: any;
|
|
798
|
-
messageId?: string;
|
|
799
881
|
}>, 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
|
-
|
|
890
|
+
messageId?: string;
|
|
891
|
+
type?: AGUIEventType.TEXT_MESSAGE_CHUNK;
|
|
809
892
|
role?: "assistant";
|
|
810
893
|
timestamp?: number;
|
|
811
894
|
rawEvent?: any;
|
|
812
|
-
messageId?: string;
|
|
813
895
|
delta?: string;
|
|
814
896
|
}, {
|
|
815
|
-
|
|
897
|
+
messageId?: string;
|
|
898
|
+
type?: AGUIEventType.TEXT_MESSAGE_CHUNK;
|
|
816
899
|
role?: "assistant";
|
|
817
900
|
timestamp?: number;
|
|
818
901
|
rawEvent?: any;
|
|
819
|
-
messageId?: string;
|
|
820
902
|
delta?: string;
|
|
821
903
|
}>, 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
|
-
}, "
|
|
842
|
-
type: z.ZodLiteral<
|
|
923
|
+
}, "messageId" | "type"> & {
|
|
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
|
+
messageId?: string;
|
|
1043
|
+
type?: AGUIEventType.TOOL_CALL_RESULT;
|
|
961
1044
|
role?: "tool";
|
|
962
|
-
toolCallName?: string;
|
|
963
1045
|
timestamp?: number;
|
|
964
1046
|
toolCallId?: string;
|
|
965
1047
|
rawEvent?: any;
|
|
966
|
-
|
|
1048
|
+
toolCallName?: string;
|
|
967
1049
|
}, {
|
|
968
|
-
type?: EventType.TOOL_CALL_RESULT;
|
|
969
1050
|
content?: string;
|
|
1051
|
+
messageId?: string;
|
|
1052
|
+
type?: AGUIEventType.TOOL_CALL_RESULT;
|
|
970
1053
|
role?: "tool";
|
|
971
|
-
toolCallName?: string;
|
|
972
1054
|
timestamp?: number;
|
|
973
1055
|
toolCallId?: string;
|
|
974
1056
|
rawEvent?: any;
|
|
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
|
+
activityType?: string;
|
|
1071
|
+
messageId?: string;
|
|
1072
|
+
type?: AGUIEventType.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?: AGUIEventType.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<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
|
+
activityType?: string;
|
|
1093
|
+
messageId?: string;
|
|
1094
|
+
type?: AGUIEventType.ACTIVITY_DELTA;
|
|
1095
|
+
timestamp?: number;
|
|
1096
|
+
rawEvent?: any;
|
|
1097
|
+
patch?: any[];
|
|
1098
|
+
}, {
|
|
1099
|
+
activityType?: string;
|
|
975
1100
|
messageId?: string;
|
|
1101
|
+
type?: AGUIEventType.ACTIVITY_DELTA;
|
|
1102
|
+
timestamp?: number;
|
|
1103
|
+
rawEvent?: any;
|
|
1104
|
+
patch?: any[];
|
|
976
1105
|
}>, z.ZodObject<{
|
|
977
1106
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
978
1107
|
rawEvent: z.ZodOptional<z.ZodAny>;
|
|
979
1108
|
} & {
|
|
980
|
-
type: z.ZodLiteral<
|
|
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,48 @@ 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
|
+
activityType?: string;
|
|
1288
|
+
id?: string;
|
|
1289
|
+
role?: "activity";
|
|
1290
|
+
}, {
|
|
1291
|
+
content?: Record<string, any>;
|
|
1292
|
+
activityType?: string;
|
|
1293
|
+
id?: string;
|
|
1294
|
+
role?: "activity";
|
|
1151
1295
|
}>]>, "many">;
|
|
1152
1296
|
}, "strip", z.ZodTypeAny, {
|
|
1153
|
-
type?: EventType.MESSAGES_SNAPSHOT;
|
|
1154
1297
|
messages?: ({
|
|
1155
1298
|
content?: string;
|
|
1156
1299
|
name?: string;
|
|
1157
|
-
role?: "developer";
|
|
1158
1300
|
id?: string;
|
|
1301
|
+
role?: "developer";
|
|
1159
1302
|
timestamp?: number;
|
|
1160
1303
|
} | {
|
|
1161
1304
|
content?: string;
|
|
1162
1305
|
name?: string;
|
|
1163
|
-
role?: "system";
|
|
1164
1306
|
id?: string;
|
|
1307
|
+
role?: "system";
|
|
1165
1308
|
timestamp?: number;
|
|
1166
1309
|
} | {
|
|
1167
1310
|
content?: string;
|
|
1168
1311
|
name?: string;
|
|
1169
|
-
role?: "assistant";
|
|
1170
1312
|
id?: string;
|
|
1313
|
+
role?: "assistant";
|
|
1171
1314
|
timestamp?: number;
|
|
1172
1315
|
reasoningContent?: string;
|
|
1173
1316
|
toolCalls?: {
|
|
@@ -1181,36 +1324,41 @@ export declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
1181
1324
|
} | {
|
|
1182
1325
|
content?: string;
|
|
1183
1326
|
name?: string;
|
|
1184
|
-
role?: "user";
|
|
1185
1327
|
id?: string;
|
|
1328
|
+
role?: "user";
|
|
1186
1329
|
timestamp?: number;
|
|
1187
1330
|
} | {
|
|
1188
1331
|
content?: string;
|
|
1189
|
-
role?: "tool";
|
|
1190
1332
|
id?: string;
|
|
1333
|
+
role?: "tool";
|
|
1191
1334
|
toolCallId?: string;
|
|
1335
|
+
} | {
|
|
1336
|
+
content?: Record<string, any>;
|
|
1337
|
+
activityType?: string;
|
|
1338
|
+
id?: string;
|
|
1339
|
+
role?: "activity";
|
|
1192
1340
|
})[];
|
|
1341
|
+
type?: AGUIEventType.MESSAGES_SNAPSHOT;
|
|
1193
1342
|
timestamp?: number;
|
|
1194
1343
|
rawEvent?: any;
|
|
1195
1344
|
}, {
|
|
1196
|
-
type?: EventType.MESSAGES_SNAPSHOT;
|
|
1197
1345
|
messages?: ({
|
|
1198
1346
|
content?: string;
|
|
1199
1347
|
name?: string;
|
|
1200
|
-
role?: "developer";
|
|
1201
1348
|
id?: string;
|
|
1349
|
+
role?: "developer";
|
|
1202
1350
|
timestamp?: number;
|
|
1203
1351
|
} | {
|
|
1204
1352
|
content?: string;
|
|
1205
1353
|
name?: string;
|
|
1206
|
-
role?: "system";
|
|
1207
1354
|
id?: string;
|
|
1355
|
+
role?: "system";
|
|
1208
1356
|
timestamp?: number;
|
|
1209
1357
|
} | {
|
|
1210
1358
|
content?: string;
|
|
1211
1359
|
name?: string;
|
|
1212
|
-
role?: "assistant";
|
|
1213
1360
|
id?: string;
|
|
1361
|
+
role?: "assistant";
|
|
1214
1362
|
timestamp?: number;
|
|
1215
1363
|
reasoningContent?: string;
|
|
1216
1364
|
toolCalls?: {
|
|
@@ -1224,70 +1372,76 @@ export declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
1224
1372
|
} | {
|
|
1225
1373
|
content?: string;
|
|
1226
1374
|
name?: string;
|
|
1227
|
-
role?: "user";
|
|
1228
1375
|
id?: string;
|
|
1376
|
+
role?: "user";
|
|
1229
1377
|
timestamp?: number;
|
|
1230
1378
|
} | {
|
|
1231
1379
|
content?: string;
|
|
1232
|
-
role?: "tool";
|
|
1233
1380
|
id?: string;
|
|
1381
|
+
role?: "tool";
|
|
1234
1382
|
toolCallId?: string;
|
|
1383
|
+
} | {
|
|
1384
|
+
content?: Record<string, any>;
|
|
1385
|
+
activityType?: string;
|
|
1386
|
+
id?: string;
|
|
1387
|
+
role?: "activity";
|
|
1235
1388
|
})[];
|
|
1389
|
+
type?: AGUIEventType.MESSAGES_SNAPSHOT;
|
|
1236
1390
|
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,20 +1450,20 @@ 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?: EventType.RUN_FINISHED;
|
|
1305
1458
|
result?: any;
|
|
1459
|
+
type?: AGUIEventType.RUN_FINISHED;
|
|
1306
1460
|
timestamp?: number;
|
|
1307
1461
|
threadId?: string;
|
|
1308
1462
|
runId?: string;
|
|
1309
1463
|
rawEvent?: any;
|
|
1310
1464
|
}, {
|
|
1311
|
-
type?: EventType.RUN_FINISHED;
|
|
1312
1465
|
result?: any;
|
|
1466
|
+
type?: AGUIEventType.RUN_FINISHED;
|
|
1313
1467
|
timestamp?: number;
|
|
1314
1468
|
threadId?: string;
|
|
1315
1469
|
runId?: string;
|
|
@@ -1318,34 +1472,34 @@ export declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [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>;
|