@ag-ui/core 0.0.42-alpha.3 → 0.0.43

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/dist/index.d.mts CHANGED
@@ -1033,15 +1033,15 @@ declare const BaseEventSchema: z.ZodObject<{
1033
1033
  type: z.ZodNativeEnum<typeof EventType>;
1034
1034
  timestamp: z.ZodOptional<z.ZodNumber>;
1035
1035
  rawEvent: z.ZodOptional<z.ZodAny>;
1036
- }, "strip", z.ZodTypeAny, {
1037
- type: EventType;
1038
- timestamp?: number | undefined;
1039
- rawEvent?: any;
1040
- }, {
1041
- type: EventType;
1042
- timestamp?: number | undefined;
1043
- rawEvent?: any;
1044
- }>;
1036
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1037
+ type: z.ZodNativeEnum<typeof EventType>;
1038
+ timestamp: z.ZodOptional<z.ZodNumber>;
1039
+ rawEvent: z.ZodOptional<z.ZodAny>;
1040
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1041
+ type: z.ZodNativeEnum<typeof EventType>;
1042
+ timestamp: z.ZodOptional<z.ZodNumber>;
1043
+ rawEvent: z.ZodOptional<z.ZodAny>;
1044
+ }, z.ZodTypeAny, "passthrough">>;
1045
1045
  declare const TextMessageStartEventSchema: z.ZodObject<{
1046
1046
  timestamp: z.ZodOptional<z.ZodNumber>;
1047
1047
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1049,19 +1049,21 @@ declare const TextMessageStartEventSchema: z.ZodObject<{
1049
1049
  type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
1050
1050
  messageId: z.ZodString;
1051
1051
  role: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
1052
- }, "strip", z.ZodTypeAny, {
1053
- type: EventType.TEXT_MESSAGE_START;
1054
- role: "developer" | "system" | "assistant" | "user";
1055
- messageId: string;
1056
- timestamp?: number | undefined;
1057
- rawEvent?: any;
1058
- }, {
1059
- type: EventType.TEXT_MESSAGE_START;
1060
- messageId: string;
1061
- role?: "developer" | "system" | "assistant" | "user" | undefined;
1062
- timestamp?: number | undefined;
1063
- rawEvent?: any;
1064
- }>;
1052
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1053
+ timestamp: z.ZodOptional<z.ZodNumber>;
1054
+ rawEvent: z.ZodOptional<z.ZodAny>;
1055
+ } & {
1056
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
1057
+ messageId: z.ZodString;
1058
+ role: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
1059
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1060
+ timestamp: z.ZodOptional<z.ZodNumber>;
1061
+ rawEvent: z.ZodOptional<z.ZodAny>;
1062
+ } & {
1063
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
1064
+ messageId: z.ZodString;
1065
+ role: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
1066
+ }, z.ZodTypeAny, "passthrough">>;
1065
1067
  declare const TextMessageContentEventSchema: z.ZodObject<{
1066
1068
  timestamp: z.ZodOptional<z.ZodNumber>;
1067
1069
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1069,36 +1071,40 @@ declare const TextMessageContentEventSchema: z.ZodObject<{
1069
1071
  type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
1070
1072
  messageId: z.ZodString;
1071
1073
  delta: z.ZodEffects<z.ZodString, string, string>;
1072
- }, "strip", z.ZodTypeAny, {
1073
- type: EventType.TEXT_MESSAGE_CONTENT;
1074
- messageId: string;
1075
- delta: string;
1076
- timestamp?: number | undefined;
1077
- rawEvent?: any;
1078
- }, {
1079
- type: EventType.TEXT_MESSAGE_CONTENT;
1080
- messageId: string;
1081
- delta: string;
1082
- timestamp?: number | undefined;
1083
- rawEvent?: any;
1084
- }>;
1074
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1075
+ timestamp: z.ZodOptional<z.ZodNumber>;
1076
+ rawEvent: z.ZodOptional<z.ZodAny>;
1077
+ } & {
1078
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
1079
+ messageId: z.ZodString;
1080
+ delta: z.ZodEffects<z.ZodString, string, string>;
1081
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1082
+ timestamp: z.ZodOptional<z.ZodNumber>;
1083
+ rawEvent: z.ZodOptional<z.ZodAny>;
1084
+ } & {
1085
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
1086
+ messageId: z.ZodString;
1087
+ delta: z.ZodEffects<z.ZodString, string, string>;
1088
+ }, z.ZodTypeAny, "passthrough">>;
1085
1089
  declare const TextMessageEndEventSchema: z.ZodObject<{
1086
1090
  timestamp: z.ZodOptional<z.ZodNumber>;
1087
1091
  rawEvent: z.ZodOptional<z.ZodAny>;
1088
1092
  } & {
1089
1093
  type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
1090
1094
  messageId: z.ZodString;
1091
- }, "strip", z.ZodTypeAny, {
1092
- type: EventType.TEXT_MESSAGE_END;
1093
- messageId: string;
1094
- timestamp?: number | undefined;
1095
- rawEvent?: any;
1096
- }, {
1097
- type: EventType.TEXT_MESSAGE_END;
1098
- messageId: string;
1099
- timestamp?: number | undefined;
1100
- rawEvent?: any;
1101
- }>;
1095
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1096
+ timestamp: z.ZodOptional<z.ZodNumber>;
1097
+ rawEvent: z.ZodOptional<z.ZodAny>;
1098
+ } & {
1099
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
1100
+ messageId: z.ZodString;
1101
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1102
+ timestamp: z.ZodOptional<z.ZodNumber>;
1103
+ rawEvent: z.ZodOptional<z.ZodAny>;
1104
+ } & {
1105
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
1106
+ messageId: z.ZodString;
1107
+ }, z.ZodTypeAny, "passthrough">>;
1102
1108
  declare const TextMessageChunkEventSchema: z.ZodObject<{
1103
1109
  timestamp: z.ZodOptional<z.ZodNumber>;
1104
1110
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1107,35 +1113,39 @@ declare const TextMessageChunkEventSchema: z.ZodObject<{
1107
1113
  messageId: z.ZodOptional<z.ZodString>;
1108
1114
  role: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
1109
1115
  delta: z.ZodOptional<z.ZodString>;
1110
- }, "strip", z.ZodTypeAny, {
1111
- type: EventType.TEXT_MESSAGE_CHUNK;
1112
- role?: "developer" | "system" | "assistant" | "user" | undefined;
1113
- timestamp?: number | undefined;
1114
- rawEvent?: any;
1115
- messageId?: string | undefined;
1116
- delta?: string | undefined;
1117
- }, {
1118
- type: EventType.TEXT_MESSAGE_CHUNK;
1119
- role?: "developer" | "system" | "assistant" | "user" | undefined;
1120
- timestamp?: number | undefined;
1121
- rawEvent?: any;
1122
- messageId?: string | undefined;
1123
- delta?: string | undefined;
1124
- }>;
1116
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1117
+ timestamp: z.ZodOptional<z.ZodNumber>;
1118
+ rawEvent: z.ZodOptional<z.ZodAny>;
1119
+ } & {
1120
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
1121
+ messageId: z.ZodOptional<z.ZodString>;
1122
+ role: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
1123
+ delta: z.ZodOptional<z.ZodString>;
1124
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1125
+ timestamp: z.ZodOptional<z.ZodNumber>;
1126
+ rawEvent: z.ZodOptional<z.ZodAny>;
1127
+ } & {
1128
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
1129
+ messageId: z.ZodOptional<z.ZodString>;
1130
+ role: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
1131
+ delta: z.ZodOptional<z.ZodString>;
1132
+ }, z.ZodTypeAny, "passthrough">>;
1125
1133
  declare const ThinkingTextMessageStartEventSchema: z.ZodObject<{
1126
1134
  timestamp: z.ZodOptional<z.ZodNumber>;
1127
1135
  rawEvent: z.ZodOptional<z.ZodAny>;
1128
1136
  } & {
1129
1137
  type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
1130
- }, "strip", z.ZodTypeAny, {
1131
- type: EventType.THINKING_TEXT_MESSAGE_START;
1132
- timestamp?: number | undefined;
1133
- rawEvent?: any;
1134
- }, {
1135
- type: EventType.THINKING_TEXT_MESSAGE_START;
1136
- timestamp?: number | undefined;
1137
- rawEvent?: any;
1138
- }>;
1138
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1139
+ timestamp: z.ZodOptional<z.ZodNumber>;
1140
+ rawEvent: z.ZodOptional<z.ZodAny>;
1141
+ } & {
1142
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
1143
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1144
+ timestamp: z.ZodOptional<z.ZodNumber>;
1145
+ rawEvent: z.ZodOptional<z.ZodAny>;
1146
+ } & {
1147
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
1148
+ }, z.ZodTypeAny, "passthrough">>;
1139
1149
  declare const ThinkingTextMessageContentEventSchema: z.ZodObject<Omit<{
1140
1150
  timestamp: z.ZodOptional<z.ZodNumber>;
1141
1151
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1145,31 +1155,41 @@ declare const ThinkingTextMessageContentEventSchema: z.ZodObject<Omit<{
1145
1155
  delta: z.ZodEffects<z.ZodString, string, string>;
1146
1156
  }, "type" | "messageId"> & {
1147
1157
  type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
1148
- }, "strip", z.ZodTypeAny, {
1149
- type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
1150
- delta: string;
1151
- timestamp?: number | undefined;
1152
- rawEvent?: any;
1153
- }, {
1154
- type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
1155
- delta: string;
1156
- timestamp?: number | undefined;
1157
- rawEvent?: any;
1158
- }>;
1158
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<Omit<{
1159
+ timestamp: z.ZodOptional<z.ZodNumber>;
1160
+ rawEvent: z.ZodOptional<z.ZodAny>;
1161
+ } & {
1162
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
1163
+ messageId: z.ZodString;
1164
+ delta: z.ZodEffects<z.ZodString, string, string>;
1165
+ }, "type" | "messageId"> & {
1166
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
1167
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<Omit<{
1168
+ timestamp: z.ZodOptional<z.ZodNumber>;
1169
+ rawEvent: z.ZodOptional<z.ZodAny>;
1170
+ } & {
1171
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
1172
+ messageId: z.ZodString;
1173
+ delta: z.ZodEffects<z.ZodString, string, string>;
1174
+ }, "type" | "messageId"> & {
1175
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
1176
+ }, z.ZodTypeAny, "passthrough">>;
1159
1177
  declare const ThinkingTextMessageEndEventSchema: z.ZodObject<{
1160
1178
  timestamp: z.ZodOptional<z.ZodNumber>;
1161
1179
  rawEvent: z.ZodOptional<z.ZodAny>;
1162
1180
  } & {
1163
1181
  type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
1164
- }, "strip", z.ZodTypeAny, {
1165
- type: EventType.THINKING_TEXT_MESSAGE_END;
1166
- timestamp?: number | undefined;
1167
- rawEvent?: any;
1168
- }, {
1169
- type: EventType.THINKING_TEXT_MESSAGE_END;
1170
- timestamp?: number | undefined;
1171
- rawEvent?: any;
1172
- }>;
1182
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1183
+ timestamp: z.ZodOptional<z.ZodNumber>;
1184
+ rawEvent: z.ZodOptional<z.ZodAny>;
1185
+ } & {
1186
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
1187
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1188
+ timestamp: z.ZodOptional<z.ZodNumber>;
1189
+ rawEvent: z.ZodOptional<z.ZodAny>;
1190
+ } & {
1191
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
1192
+ }, z.ZodTypeAny, "passthrough">>;
1173
1193
  declare const ToolCallStartEventSchema: z.ZodObject<{
1174
1194
  timestamp: z.ZodOptional<z.ZodNumber>;
1175
1195
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1178,21 +1198,23 @@ declare const ToolCallStartEventSchema: z.ZodObject<{
1178
1198
  toolCallId: z.ZodString;
1179
1199
  toolCallName: z.ZodString;
1180
1200
  parentMessageId: z.ZodOptional<z.ZodString>;
1181
- }, "strip", z.ZodTypeAny, {
1182
- type: EventType.TOOL_CALL_START;
1183
- toolCallId: string;
1184
- toolCallName: string;
1185
- timestamp?: number | undefined;
1186
- rawEvent?: any;
1187
- parentMessageId?: string | undefined;
1188
- }, {
1189
- type: EventType.TOOL_CALL_START;
1190
- toolCallId: string;
1191
- toolCallName: string;
1192
- timestamp?: number | undefined;
1193
- rawEvent?: any;
1194
- parentMessageId?: string | undefined;
1195
- }>;
1201
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1202
+ timestamp: z.ZodOptional<z.ZodNumber>;
1203
+ rawEvent: z.ZodOptional<z.ZodAny>;
1204
+ } & {
1205
+ type: z.ZodLiteral<EventType.TOOL_CALL_START>;
1206
+ toolCallId: z.ZodString;
1207
+ toolCallName: z.ZodString;
1208
+ parentMessageId: z.ZodOptional<z.ZodString>;
1209
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1210
+ timestamp: z.ZodOptional<z.ZodNumber>;
1211
+ rawEvent: z.ZodOptional<z.ZodAny>;
1212
+ } & {
1213
+ type: z.ZodLiteral<EventType.TOOL_CALL_START>;
1214
+ toolCallId: z.ZodString;
1215
+ toolCallName: z.ZodString;
1216
+ parentMessageId: z.ZodOptional<z.ZodString>;
1217
+ }, z.ZodTypeAny, "passthrough">>;
1196
1218
  declare const ToolCallArgsEventSchema: z.ZodObject<{
1197
1219
  timestamp: z.ZodOptional<z.ZodNumber>;
1198
1220
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1200,36 +1222,40 @@ declare const ToolCallArgsEventSchema: z.ZodObject<{
1200
1222
  type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
1201
1223
  toolCallId: z.ZodString;
1202
1224
  delta: z.ZodString;
1203
- }, "strip", z.ZodTypeAny, {
1204
- type: EventType.TOOL_CALL_ARGS;
1205
- toolCallId: string;
1206
- delta: string;
1207
- timestamp?: number | undefined;
1208
- rawEvent?: any;
1209
- }, {
1210
- type: EventType.TOOL_CALL_ARGS;
1211
- toolCallId: string;
1212
- delta: string;
1213
- timestamp?: number | undefined;
1214
- rawEvent?: any;
1215
- }>;
1225
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1226
+ timestamp: z.ZodOptional<z.ZodNumber>;
1227
+ rawEvent: z.ZodOptional<z.ZodAny>;
1228
+ } & {
1229
+ type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
1230
+ toolCallId: z.ZodString;
1231
+ delta: z.ZodString;
1232
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1233
+ timestamp: z.ZodOptional<z.ZodNumber>;
1234
+ rawEvent: z.ZodOptional<z.ZodAny>;
1235
+ } & {
1236
+ type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
1237
+ toolCallId: z.ZodString;
1238
+ delta: z.ZodString;
1239
+ }, z.ZodTypeAny, "passthrough">>;
1216
1240
  declare const ToolCallEndEventSchema: z.ZodObject<{
1217
1241
  timestamp: z.ZodOptional<z.ZodNumber>;
1218
1242
  rawEvent: z.ZodOptional<z.ZodAny>;
1219
1243
  } & {
1220
1244
  type: z.ZodLiteral<EventType.TOOL_CALL_END>;
1221
1245
  toolCallId: z.ZodString;
1222
- }, "strip", z.ZodTypeAny, {
1223
- type: EventType.TOOL_CALL_END;
1224
- toolCallId: string;
1225
- timestamp?: number | undefined;
1226
- rawEvent?: any;
1227
- }, {
1228
- type: EventType.TOOL_CALL_END;
1229
- toolCallId: string;
1230
- timestamp?: number | undefined;
1231
- rawEvent?: any;
1232
- }>;
1246
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1247
+ timestamp: z.ZodOptional<z.ZodNumber>;
1248
+ rawEvent: z.ZodOptional<z.ZodAny>;
1249
+ } & {
1250
+ type: z.ZodLiteral<EventType.TOOL_CALL_END>;
1251
+ toolCallId: z.ZodString;
1252
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1253
+ timestamp: z.ZodOptional<z.ZodNumber>;
1254
+ rawEvent: z.ZodOptional<z.ZodAny>;
1255
+ } & {
1256
+ type: z.ZodLiteral<EventType.TOOL_CALL_END>;
1257
+ toolCallId: z.ZodString;
1258
+ }, z.ZodTypeAny, "passthrough">>;
1233
1259
  declare const ToolCallResultEventSchema: z.ZodObject<{
1234
1260
  timestamp: z.ZodOptional<z.ZodNumber>;
1235
1261
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1239,23 +1265,25 @@ declare const ToolCallResultEventSchema: z.ZodObject<{
1239
1265
  toolCallId: z.ZodString;
1240
1266
  content: z.ZodString;
1241
1267
  role: z.ZodOptional<z.ZodLiteral<"tool">>;
1242
- }, "strip", z.ZodTypeAny, {
1243
- type: EventType.TOOL_CALL_RESULT;
1244
- content: string;
1245
- toolCallId: string;
1246
- messageId: string;
1247
- role?: "tool" | undefined;
1248
- timestamp?: number | undefined;
1249
- rawEvent?: any;
1250
- }, {
1251
- type: EventType.TOOL_CALL_RESULT;
1252
- content: string;
1253
- toolCallId: string;
1254
- messageId: string;
1255
- role?: "tool" | undefined;
1256
- timestamp?: number | undefined;
1257
- rawEvent?: any;
1258
- }>;
1268
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1269
+ timestamp: z.ZodOptional<z.ZodNumber>;
1270
+ rawEvent: z.ZodOptional<z.ZodAny>;
1271
+ } & {
1272
+ messageId: z.ZodString;
1273
+ type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
1274
+ toolCallId: z.ZodString;
1275
+ content: z.ZodString;
1276
+ role: z.ZodOptional<z.ZodLiteral<"tool">>;
1277
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1278
+ timestamp: z.ZodOptional<z.ZodNumber>;
1279
+ rawEvent: z.ZodOptional<z.ZodAny>;
1280
+ } & {
1281
+ messageId: z.ZodString;
1282
+ type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
1283
+ toolCallId: z.ZodString;
1284
+ content: z.ZodString;
1285
+ role: z.ZodOptional<z.ZodLiteral<"tool">>;
1286
+ }, z.ZodTypeAny, "passthrough">>;
1259
1287
  declare const ToolCallChunkEventSchema: z.ZodObject<{
1260
1288
  timestamp: z.ZodOptional<z.ZodNumber>;
1261
1289
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1265,88 +1293,98 @@ declare const ToolCallChunkEventSchema: z.ZodObject<{
1265
1293
  toolCallName: z.ZodOptional<z.ZodString>;
1266
1294
  parentMessageId: z.ZodOptional<z.ZodString>;
1267
1295
  delta: z.ZodOptional<z.ZodString>;
1268
- }, "strip", z.ZodTypeAny, {
1269
- type: EventType.TOOL_CALL_CHUNK;
1270
- toolCallId?: string | undefined;
1271
- timestamp?: number | undefined;
1272
- rawEvent?: any;
1273
- delta?: string | undefined;
1274
- toolCallName?: string | undefined;
1275
- parentMessageId?: string | undefined;
1276
- }, {
1277
- type: EventType.TOOL_CALL_CHUNK;
1278
- toolCallId?: string | undefined;
1279
- timestamp?: number | undefined;
1280
- rawEvent?: any;
1281
- delta?: string | undefined;
1282
- toolCallName?: string | undefined;
1283
- parentMessageId?: string | undefined;
1284
- }>;
1296
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1297
+ timestamp: z.ZodOptional<z.ZodNumber>;
1298
+ rawEvent: z.ZodOptional<z.ZodAny>;
1299
+ } & {
1300
+ type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
1301
+ toolCallId: z.ZodOptional<z.ZodString>;
1302
+ toolCallName: z.ZodOptional<z.ZodString>;
1303
+ parentMessageId: z.ZodOptional<z.ZodString>;
1304
+ delta: z.ZodOptional<z.ZodString>;
1305
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1306
+ timestamp: z.ZodOptional<z.ZodNumber>;
1307
+ rawEvent: z.ZodOptional<z.ZodAny>;
1308
+ } & {
1309
+ type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
1310
+ toolCallId: z.ZodOptional<z.ZodString>;
1311
+ toolCallName: z.ZodOptional<z.ZodString>;
1312
+ parentMessageId: z.ZodOptional<z.ZodString>;
1313
+ delta: z.ZodOptional<z.ZodString>;
1314
+ }, z.ZodTypeAny, "passthrough">>;
1285
1315
  declare const ThinkingStartEventSchema: z.ZodObject<{
1286
1316
  timestamp: z.ZodOptional<z.ZodNumber>;
1287
1317
  rawEvent: z.ZodOptional<z.ZodAny>;
1288
1318
  } & {
1289
1319
  type: z.ZodLiteral<EventType.THINKING_START>;
1290
1320
  title: z.ZodOptional<z.ZodString>;
1291
- }, "strip", z.ZodTypeAny, {
1292
- type: EventType.THINKING_START;
1293
- timestamp?: number | undefined;
1294
- rawEvent?: any;
1295
- title?: string | undefined;
1296
- }, {
1297
- type: EventType.THINKING_START;
1298
- timestamp?: number | undefined;
1299
- rawEvent?: any;
1300
- title?: string | undefined;
1301
- }>;
1321
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1322
+ timestamp: z.ZodOptional<z.ZodNumber>;
1323
+ rawEvent: z.ZodOptional<z.ZodAny>;
1324
+ } & {
1325
+ type: z.ZodLiteral<EventType.THINKING_START>;
1326
+ title: z.ZodOptional<z.ZodString>;
1327
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1328
+ timestamp: z.ZodOptional<z.ZodNumber>;
1329
+ rawEvent: z.ZodOptional<z.ZodAny>;
1330
+ } & {
1331
+ type: z.ZodLiteral<EventType.THINKING_START>;
1332
+ title: z.ZodOptional<z.ZodString>;
1333
+ }, z.ZodTypeAny, "passthrough">>;
1302
1334
  declare const ThinkingEndEventSchema: z.ZodObject<{
1303
1335
  timestamp: z.ZodOptional<z.ZodNumber>;
1304
1336
  rawEvent: z.ZodOptional<z.ZodAny>;
1305
1337
  } & {
1306
1338
  type: z.ZodLiteral<EventType.THINKING_END>;
1307
- }, "strip", z.ZodTypeAny, {
1308
- type: EventType.THINKING_END;
1309
- timestamp?: number | undefined;
1310
- rawEvent?: any;
1311
- }, {
1312
- type: EventType.THINKING_END;
1313
- timestamp?: number | undefined;
1314
- rawEvent?: any;
1315
- }>;
1339
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1340
+ timestamp: z.ZodOptional<z.ZodNumber>;
1341
+ rawEvent: z.ZodOptional<z.ZodAny>;
1342
+ } & {
1343
+ type: z.ZodLiteral<EventType.THINKING_END>;
1344
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1345
+ timestamp: z.ZodOptional<z.ZodNumber>;
1346
+ rawEvent: z.ZodOptional<z.ZodAny>;
1347
+ } & {
1348
+ type: z.ZodLiteral<EventType.THINKING_END>;
1349
+ }, z.ZodTypeAny, "passthrough">>;
1316
1350
  declare const StateSnapshotEventSchema: z.ZodObject<{
1317
1351
  timestamp: z.ZodOptional<z.ZodNumber>;
1318
1352
  rawEvent: z.ZodOptional<z.ZodAny>;
1319
1353
  } & {
1320
1354
  type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
1321
1355
  snapshot: z.ZodAny;
1322
- }, "strip", z.ZodTypeAny, {
1323
- type: EventType.STATE_SNAPSHOT;
1324
- timestamp?: number | undefined;
1325
- rawEvent?: any;
1326
- snapshot?: any;
1327
- }, {
1328
- type: EventType.STATE_SNAPSHOT;
1329
- timestamp?: number | undefined;
1330
- rawEvent?: any;
1331
- snapshot?: any;
1332
- }>;
1356
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1357
+ timestamp: z.ZodOptional<z.ZodNumber>;
1358
+ rawEvent: z.ZodOptional<z.ZodAny>;
1359
+ } & {
1360
+ type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
1361
+ snapshot: z.ZodAny;
1362
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1363
+ timestamp: z.ZodOptional<z.ZodNumber>;
1364
+ rawEvent: z.ZodOptional<z.ZodAny>;
1365
+ } & {
1366
+ type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
1367
+ snapshot: z.ZodAny;
1368
+ }, z.ZodTypeAny, "passthrough">>;
1333
1369
  declare const StateDeltaEventSchema: z.ZodObject<{
1334
1370
  timestamp: z.ZodOptional<z.ZodNumber>;
1335
1371
  rawEvent: z.ZodOptional<z.ZodAny>;
1336
1372
  } & {
1337
1373
  type: z.ZodLiteral<EventType.STATE_DELTA>;
1338
1374
  delta: z.ZodArray<z.ZodAny, "many">;
1339
- }, "strip", z.ZodTypeAny, {
1340
- type: EventType.STATE_DELTA;
1341
- delta: any[];
1342
- timestamp?: number | undefined;
1343
- rawEvent?: any;
1344
- }, {
1345
- type: EventType.STATE_DELTA;
1346
- delta: any[];
1347
- timestamp?: number | undefined;
1348
- rawEvent?: any;
1349
- }>;
1375
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1376
+ timestamp: z.ZodOptional<z.ZodNumber>;
1377
+ rawEvent: z.ZodOptional<z.ZodAny>;
1378
+ } & {
1379
+ type: z.ZodLiteral<EventType.STATE_DELTA>;
1380
+ delta: z.ZodArray<z.ZodAny, "many">;
1381
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1382
+ timestamp: z.ZodOptional<z.ZodNumber>;
1383
+ rawEvent: z.ZodOptional<z.ZodAny>;
1384
+ } & {
1385
+ type: z.ZodLiteral<EventType.STATE_DELTA>;
1386
+ delta: z.ZodArray<z.ZodAny, "many">;
1387
+ }, z.ZodTypeAny, "passthrough">>;
1350
1388
  declare const MessagesSnapshotEventSchema: z.ZodObject<{
1351
1389
  timestamp: z.ZodOptional<z.ZodNumber>;
1352
1390
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1564,19 +1602,78 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<{
1564
1602
  content: Record<string, any>;
1565
1603
  activityType: string;
1566
1604
  }>]>, "many">;
1567
- }, "strip", z.ZodTypeAny, {
1568
- type: EventType.MESSAGES_SNAPSHOT;
1569
- messages: ({
1570
- id: string;
1605
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1606
+ timestamp: z.ZodOptional<z.ZodNumber>;
1607
+ rawEvent: z.ZodOptional<z.ZodAny>;
1608
+ } & {
1609
+ type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
1610
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
1611
+ id: z.ZodString;
1612
+ name: z.ZodOptional<z.ZodString>;
1613
+ } & {
1614
+ role: z.ZodLiteral<"developer">;
1615
+ content: z.ZodString;
1616
+ }, "strip", z.ZodTypeAny, {
1617
+ id: string;
1571
1618
  role: "developer";
1572
1619
  content: string;
1573
1620
  name?: string | undefined;
1574
- } | {
1621
+ }, {
1622
+ id: string;
1623
+ role: "developer";
1624
+ content: string;
1625
+ name?: string | undefined;
1626
+ }>, z.ZodObject<{
1627
+ id: z.ZodString;
1628
+ name: z.ZodOptional<z.ZodString>;
1629
+ } & {
1630
+ role: z.ZodLiteral<"system">;
1631
+ content: z.ZodString;
1632
+ }, "strip", z.ZodTypeAny, {
1575
1633
  id: string;
1576
1634
  role: "system";
1577
1635
  content: string;
1578
1636
  name?: string | undefined;
1579
- } | {
1637
+ }, {
1638
+ id: string;
1639
+ role: "system";
1640
+ content: string;
1641
+ name?: string | undefined;
1642
+ }>, z.ZodObject<{
1643
+ id: z.ZodString;
1644
+ name: z.ZodOptional<z.ZodString>;
1645
+ } & {
1646
+ role: z.ZodLiteral<"assistant">;
1647
+ content: z.ZodOptional<z.ZodString>;
1648
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
1649
+ id: z.ZodString;
1650
+ type: z.ZodLiteral<"function">;
1651
+ function: z.ZodObject<{
1652
+ name: z.ZodString;
1653
+ arguments: z.ZodString;
1654
+ }, "strip", z.ZodTypeAny, {
1655
+ name: string;
1656
+ arguments: string;
1657
+ }, {
1658
+ name: string;
1659
+ arguments: string;
1660
+ }>;
1661
+ }, "strip", z.ZodTypeAny, {
1662
+ function: {
1663
+ name: string;
1664
+ arguments: string;
1665
+ };
1666
+ type: "function";
1667
+ id: string;
1668
+ }, {
1669
+ function: {
1670
+ name: string;
1671
+ arguments: string;
1672
+ };
1673
+ type: "function";
1674
+ id: string;
1675
+ }>, "many">>;
1676
+ }, "strip", z.ZodTypeAny, {
1580
1677
  id: string;
1581
1678
  role: "assistant";
1582
1679
  name?: string | undefined;
@@ -1589,7 +1686,76 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<{
1589
1686
  type: "function";
1590
1687
  id: string;
1591
1688
  }[] | undefined;
1592
- } | {
1689
+ }, {
1690
+ id: string;
1691
+ role: "assistant";
1692
+ name?: string | undefined;
1693
+ content?: string | undefined;
1694
+ toolCalls?: {
1695
+ function: {
1696
+ name: string;
1697
+ arguments: string;
1698
+ };
1699
+ type: "function";
1700
+ id: string;
1701
+ }[] | undefined;
1702
+ }>, z.ZodObject<{
1703
+ id: z.ZodString;
1704
+ name: z.ZodOptional<z.ZodString>;
1705
+ } & {
1706
+ role: z.ZodLiteral<"user">;
1707
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1708
+ type: z.ZodLiteral<"text">;
1709
+ text: z.ZodString;
1710
+ }, "strip", z.ZodTypeAny, {
1711
+ type: "text";
1712
+ text: string;
1713
+ }, {
1714
+ type: "text";
1715
+ text: string;
1716
+ }>, z.ZodObject<{
1717
+ type: z.ZodLiteral<"binary">;
1718
+ mimeType: z.ZodString;
1719
+ id: z.ZodOptional<z.ZodString>;
1720
+ url: z.ZodOptional<z.ZodString>;
1721
+ data: z.ZodOptional<z.ZodString>;
1722
+ filename: z.ZodOptional<z.ZodString>;
1723
+ }, "strip", z.ZodTypeAny, {
1724
+ type: "binary";
1725
+ mimeType: string;
1726
+ id?: string | undefined;
1727
+ url?: string | undefined;
1728
+ data?: string | undefined;
1729
+ filename?: string | undefined;
1730
+ }, {
1731
+ type: "binary";
1732
+ mimeType: string;
1733
+ id?: string | undefined;
1734
+ url?: string | undefined;
1735
+ data?: string | undefined;
1736
+ filename?: string | undefined;
1737
+ }>]>, {
1738
+ type: "text";
1739
+ text: string;
1740
+ } | {
1741
+ type: "binary";
1742
+ mimeType: string;
1743
+ id?: string | undefined;
1744
+ url?: string | undefined;
1745
+ data?: string | undefined;
1746
+ filename?: string | undefined;
1747
+ }, {
1748
+ type: "text";
1749
+ text: string;
1750
+ } | {
1751
+ type: "binary";
1752
+ mimeType: string;
1753
+ id?: string | undefined;
1754
+ url?: string | undefined;
1755
+ data?: string | undefined;
1756
+ filename?: string | undefined;
1757
+ }>, "many">]>;
1758
+ }, "strip", z.ZodTypeAny, {
1593
1759
  id: string;
1594
1760
  role: "user";
1595
1761
  content: string | ({
@@ -1604,33 +1770,127 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<{
1604
1770
  filename?: string | undefined;
1605
1771
  })[];
1606
1772
  name?: string | undefined;
1607
- } | {
1773
+ }, {
1774
+ id: string;
1775
+ role: "user";
1776
+ content: string | ({
1777
+ type: "text";
1778
+ text: string;
1779
+ } | {
1780
+ type: "binary";
1781
+ mimeType: string;
1782
+ id?: string | undefined;
1783
+ url?: string | undefined;
1784
+ data?: string | undefined;
1785
+ filename?: string | undefined;
1786
+ })[];
1787
+ name?: string | undefined;
1788
+ }>, z.ZodObject<{
1789
+ id: z.ZodString;
1790
+ content: z.ZodString;
1791
+ role: z.ZodLiteral<"tool">;
1792
+ toolCallId: z.ZodString;
1793
+ error: z.ZodOptional<z.ZodString>;
1794
+ }, "strip", z.ZodTypeAny, {
1608
1795
  id: string;
1609
1796
  role: "tool";
1610
1797
  content: string;
1611
1798
  toolCallId: string;
1612
1799
  error?: string | undefined;
1613
- } | {
1800
+ }, {
1801
+ id: string;
1802
+ role: "tool";
1803
+ content: string;
1804
+ toolCallId: string;
1805
+ error?: string | undefined;
1806
+ }>, z.ZodObject<{
1807
+ id: z.ZodString;
1808
+ role: z.ZodLiteral<"activity">;
1809
+ activityType: z.ZodString;
1810
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
1811
+ }, "strip", z.ZodTypeAny, {
1614
1812
  id: string;
1615
1813
  role: "activity";
1616
1814
  content: Record<string, any>;
1617
1815
  activityType: string;
1618
- })[];
1619
- timestamp?: number | undefined;
1620
- rawEvent?: any;
1621
- }, {
1622
- type: EventType.MESSAGES_SNAPSHOT;
1623
- messages: ({
1816
+ }, {
1817
+ id: string;
1818
+ role: "activity";
1819
+ content: Record<string, any>;
1820
+ activityType: string;
1821
+ }>]>, "many">;
1822
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1823
+ timestamp: z.ZodOptional<z.ZodNumber>;
1824
+ rawEvent: z.ZodOptional<z.ZodAny>;
1825
+ } & {
1826
+ type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
1827
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
1828
+ id: z.ZodString;
1829
+ name: z.ZodOptional<z.ZodString>;
1830
+ } & {
1831
+ role: z.ZodLiteral<"developer">;
1832
+ content: z.ZodString;
1833
+ }, "strip", z.ZodTypeAny, {
1624
1834
  id: string;
1625
1835
  role: "developer";
1626
1836
  content: string;
1627
1837
  name?: string | undefined;
1628
- } | {
1838
+ }, {
1839
+ id: string;
1840
+ role: "developer";
1841
+ content: string;
1842
+ name?: string | undefined;
1843
+ }>, z.ZodObject<{
1844
+ id: z.ZodString;
1845
+ name: z.ZodOptional<z.ZodString>;
1846
+ } & {
1847
+ role: z.ZodLiteral<"system">;
1848
+ content: z.ZodString;
1849
+ }, "strip", z.ZodTypeAny, {
1629
1850
  id: string;
1630
1851
  role: "system";
1631
1852
  content: string;
1632
1853
  name?: string | undefined;
1633
- } | {
1854
+ }, {
1855
+ id: string;
1856
+ role: "system";
1857
+ content: string;
1858
+ name?: string | undefined;
1859
+ }>, z.ZodObject<{
1860
+ id: z.ZodString;
1861
+ name: z.ZodOptional<z.ZodString>;
1862
+ } & {
1863
+ role: z.ZodLiteral<"assistant">;
1864
+ content: z.ZodOptional<z.ZodString>;
1865
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
1866
+ id: z.ZodString;
1867
+ type: z.ZodLiteral<"function">;
1868
+ function: z.ZodObject<{
1869
+ name: z.ZodString;
1870
+ arguments: z.ZodString;
1871
+ }, "strip", z.ZodTypeAny, {
1872
+ name: string;
1873
+ arguments: string;
1874
+ }, {
1875
+ name: string;
1876
+ arguments: string;
1877
+ }>;
1878
+ }, "strip", z.ZodTypeAny, {
1879
+ function: {
1880
+ name: string;
1881
+ arguments: string;
1882
+ };
1883
+ type: "function";
1884
+ id: string;
1885
+ }, {
1886
+ function: {
1887
+ name: string;
1888
+ arguments: string;
1889
+ };
1890
+ type: "function";
1891
+ id: string;
1892
+ }>, "many">>;
1893
+ }, "strip", z.ZodTypeAny, {
1634
1894
  id: string;
1635
1895
  role: "assistant";
1636
1896
  name?: string | undefined;
@@ -1643,36 +1903,140 @@ declare const MessagesSnapshotEventSchema: z.ZodObject<{
1643
1903
  type: "function";
1644
1904
  id: string;
1645
1905
  }[] | undefined;
1646
- } | {
1906
+ }, {
1647
1907
  id: string;
1648
- role: "user";
1649
- content: string | ({
1650
- type: "text";
1651
- text: string;
1652
- } | {
1653
- type: "binary";
1654
- mimeType: string;
1908
+ role: "assistant";
1909
+ name?: string | undefined;
1910
+ content?: string | undefined;
1911
+ toolCalls?: {
1912
+ function: {
1913
+ name: string;
1914
+ arguments: string;
1915
+ };
1916
+ type: "function";
1917
+ id: string;
1918
+ }[] | undefined;
1919
+ }>, z.ZodObject<{
1920
+ id: z.ZodString;
1921
+ name: z.ZodOptional<z.ZodString>;
1922
+ } & {
1923
+ role: z.ZodLiteral<"user">;
1924
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1925
+ type: z.ZodLiteral<"text">;
1926
+ text: z.ZodString;
1927
+ }, "strip", z.ZodTypeAny, {
1928
+ type: "text";
1929
+ text: string;
1930
+ }, {
1931
+ type: "text";
1932
+ text: string;
1933
+ }>, z.ZodObject<{
1934
+ type: z.ZodLiteral<"binary">;
1935
+ mimeType: z.ZodString;
1936
+ id: z.ZodOptional<z.ZodString>;
1937
+ url: z.ZodOptional<z.ZodString>;
1938
+ data: z.ZodOptional<z.ZodString>;
1939
+ filename: z.ZodOptional<z.ZodString>;
1940
+ }, "strip", z.ZodTypeAny, {
1941
+ type: "binary";
1942
+ mimeType: string;
1943
+ id?: string | undefined;
1944
+ url?: string | undefined;
1945
+ data?: string | undefined;
1946
+ filename?: string | undefined;
1947
+ }, {
1948
+ type: "binary";
1949
+ mimeType: string;
1950
+ id?: string | undefined;
1951
+ url?: string | undefined;
1952
+ data?: string | undefined;
1953
+ filename?: string | undefined;
1954
+ }>]>, {
1955
+ type: "text";
1956
+ text: string;
1957
+ } | {
1958
+ type: "binary";
1959
+ mimeType: string;
1960
+ id?: string | undefined;
1961
+ url?: string | undefined;
1962
+ data?: string | undefined;
1963
+ filename?: string | undefined;
1964
+ }, {
1965
+ type: "text";
1966
+ text: string;
1967
+ } | {
1968
+ type: "binary";
1969
+ mimeType: string;
1970
+ id?: string | undefined;
1971
+ url?: string | undefined;
1972
+ data?: string | undefined;
1973
+ filename?: string | undefined;
1974
+ }>, "many">]>;
1975
+ }, "strip", z.ZodTypeAny, {
1976
+ id: string;
1977
+ role: "user";
1978
+ content: string | ({
1979
+ type: "text";
1980
+ text: string;
1981
+ } | {
1982
+ type: "binary";
1983
+ mimeType: string;
1655
1984
  id?: string | undefined;
1656
1985
  url?: string | undefined;
1657
1986
  data?: string | undefined;
1658
1987
  filename?: string | undefined;
1659
1988
  })[];
1660
1989
  name?: string | undefined;
1661
- } | {
1990
+ }, {
1991
+ id: string;
1992
+ role: "user";
1993
+ content: string | ({
1994
+ type: "text";
1995
+ text: string;
1996
+ } | {
1997
+ type: "binary";
1998
+ mimeType: string;
1999
+ id?: string | undefined;
2000
+ url?: string | undefined;
2001
+ data?: string | undefined;
2002
+ filename?: string | undefined;
2003
+ })[];
2004
+ name?: string | undefined;
2005
+ }>, z.ZodObject<{
2006
+ id: z.ZodString;
2007
+ content: z.ZodString;
2008
+ role: z.ZodLiteral<"tool">;
2009
+ toolCallId: z.ZodString;
2010
+ error: z.ZodOptional<z.ZodString>;
2011
+ }, "strip", z.ZodTypeAny, {
1662
2012
  id: string;
1663
2013
  role: "tool";
1664
2014
  content: string;
1665
2015
  toolCallId: string;
1666
2016
  error?: string | undefined;
1667
- } | {
2017
+ }, {
2018
+ id: string;
2019
+ role: "tool";
2020
+ content: string;
2021
+ toolCallId: string;
2022
+ error?: string | undefined;
2023
+ }>, z.ZodObject<{
2024
+ id: z.ZodString;
2025
+ role: z.ZodLiteral<"activity">;
2026
+ activityType: z.ZodString;
2027
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
2028
+ }, "strip", z.ZodTypeAny, {
1668
2029
  id: string;
1669
2030
  role: "activity";
1670
2031
  content: Record<string, any>;
1671
2032
  activityType: string;
1672
- })[];
1673
- timestamp?: number | undefined;
1674
- rawEvent?: any;
1675
- }>;
2033
+ }, {
2034
+ id: string;
2035
+ role: "activity";
2036
+ content: Record<string, any>;
2037
+ activityType: string;
2038
+ }>]>, "many">;
2039
+ }, z.ZodTypeAny, "passthrough">>;
1676
2040
  declare const ActivitySnapshotEventSchema: z.ZodObject<{
1677
2041
  timestamp: z.ZodOptional<z.ZodNumber>;
1678
2042
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1682,23 +2046,25 @@ declare const ActivitySnapshotEventSchema: z.ZodObject<{
1682
2046
  activityType: z.ZodString;
1683
2047
  content: z.ZodRecord<z.ZodString, z.ZodAny>;
1684
2048
  replace: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1685
- }, "strip", z.ZodTypeAny, {
1686
- type: EventType.ACTIVITY_SNAPSHOT;
1687
- content: Record<string, any>;
1688
- activityType: string;
1689
- messageId: string;
1690
- replace: boolean;
1691
- timestamp?: number | undefined;
1692
- rawEvent?: any;
1693
- }, {
1694
- type: EventType.ACTIVITY_SNAPSHOT;
1695
- content: Record<string, any>;
1696
- activityType: string;
1697
- messageId: string;
1698
- timestamp?: number | undefined;
1699
- rawEvent?: any;
1700
- replace?: boolean | undefined;
1701
- }>;
2049
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2050
+ timestamp: z.ZodOptional<z.ZodNumber>;
2051
+ rawEvent: z.ZodOptional<z.ZodAny>;
2052
+ } & {
2053
+ type: z.ZodLiteral<EventType.ACTIVITY_SNAPSHOT>;
2054
+ messageId: z.ZodString;
2055
+ activityType: z.ZodString;
2056
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
2057
+ replace: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2058
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2059
+ timestamp: z.ZodOptional<z.ZodNumber>;
2060
+ rawEvent: z.ZodOptional<z.ZodAny>;
2061
+ } & {
2062
+ type: z.ZodLiteral<EventType.ACTIVITY_SNAPSHOT>;
2063
+ messageId: z.ZodString;
2064
+ activityType: z.ZodString;
2065
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
2066
+ replace: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2067
+ }, z.ZodTypeAny, "passthrough">>;
1702
2068
  declare const ActivityDeltaEventSchema: z.ZodObject<{
1703
2069
  timestamp: z.ZodOptional<z.ZodNumber>;
1704
2070
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1707,21 +2073,23 @@ declare const ActivityDeltaEventSchema: z.ZodObject<{
1707
2073
  messageId: z.ZodString;
1708
2074
  activityType: z.ZodString;
1709
2075
  patch: z.ZodArray<z.ZodAny, "many">;
1710
- }, "strip", z.ZodTypeAny, {
1711
- type: EventType.ACTIVITY_DELTA;
1712
- activityType: string;
1713
- messageId: string;
1714
- patch: any[];
1715
- timestamp?: number | undefined;
1716
- rawEvent?: any;
1717
- }, {
1718
- type: EventType.ACTIVITY_DELTA;
1719
- activityType: string;
1720
- messageId: string;
1721
- patch: any[];
1722
- timestamp?: number | undefined;
1723
- rawEvent?: any;
1724
- }>;
2076
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2077
+ timestamp: z.ZodOptional<z.ZodNumber>;
2078
+ rawEvent: z.ZodOptional<z.ZodAny>;
2079
+ } & {
2080
+ type: z.ZodLiteral<EventType.ACTIVITY_DELTA>;
2081
+ messageId: z.ZodString;
2082
+ activityType: z.ZodString;
2083
+ patch: z.ZodArray<z.ZodAny, "many">;
2084
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2085
+ timestamp: z.ZodOptional<z.ZodNumber>;
2086
+ rawEvent: z.ZodOptional<z.ZodAny>;
2087
+ } & {
2088
+ type: z.ZodLiteral<EventType.ACTIVITY_DELTA>;
2089
+ messageId: z.ZodString;
2090
+ activityType: z.ZodString;
2091
+ patch: z.ZodArray<z.ZodAny, "many">;
2092
+ }, z.ZodTypeAny, "passthrough">>;
1725
2093
  declare const RawEventSchema: z.ZodObject<{
1726
2094
  timestamp: z.ZodOptional<z.ZodNumber>;
1727
2095
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1729,19 +2097,21 @@ declare const RawEventSchema: z.ZodObject<{
1729
2097
  type: z.ZodLiteral<EventType.RAW>;
1730
2098
  event: z.ZodAny;
1731
2099
  source: z.ZodOptional<z.ZodString>;
1732
- }, "strip", z.ZodTypeAny, {
1733
- type: EventType.RAW;
1734
- timestamp?: number | undefined;
1735
- rawEvent?: any;
1736
- event?: any;
1737
- source?: string | undefined;
1738
- }, {
1739
- type: EventType.RAW;
1740
- timestamp?: number | undefined;
1741
- rawEvent?: any;
1742
- event?: any;
1743
- source?: string | undefined;
1744
- }>;
2100
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2101
+ timestamp: z.ZodOptional<z.ZodNumber>;
2102
+ rawEvent: z.ZodOptional<z.ZodAny>;
2103
+ } & {
2104
+ type: z.ZodLiteral<EventType.RAW>;
2105
+ event: z.ZodAny;
2106
+ source: z.ZodOptional<z.ZodString>;
2107
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2108
+ timestamp: z.ZodOptional<z.ZodNumber>;
2109
+ rawEvent: z.ZodOptional<z.ZodAny>;
2110
+ } & {
2111
+ type: z.ZodLiteral<EventType.RAW>;
2112
+ event: z.ZodAny;
2113
+ source: z.ZodOptional<z.ZodString>;
2114
+ }, z.ZodTypeAny, "passthrough">>;
1745
2115
  declare const CustomEventSchema: z.ZodObject<{
1746
2116
  timestamp: z.ZodOptional<z.ZodNumber>;
1747
2117
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -1749,19 +2119,21 @@ declare const CustomEventSchema: z.ZodObject<{
1749
2119
  type: z.ZodLiteral<EventType.CUSTOM>;
1750
2120
  name: z.ZodString;
1751
2121
  value: z.ZodAny;
1752
- }, "strip", z.ZodTypeAny, {
1753
- name: string;
1754
- type: EventType.CUSTOM;
1755
- value?: any;
1756
- timestamp?: number | undefined;
1757
- rawEvent?: any;
1758
- }, {
1759
- name: string;
1760
- type: EventType.CUSTOM;
1761
- value?: any;
1762
- timestamp?: number | undefined;
1763
- rawEvent?: any;
1764
- }>;
2122
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2123
+ timestamp: z.ZodOptional<z.ZodNumber>;
2124
+ rawEvent: z.ZodOptional<z.ZodAny>;
2125
+ } & {
2126
+ type: z.ZodLiteral<EventType.CUSTOM>;
2127
+ name: z.ZodString;
2128
+ value: z.ZodAny;
2129
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2130
+ timestamp: z.ZodOptional<z.ZodNumber>;
2131
+ rawEvent: z.ZodOptional<z.ZodAny>;
2132
+ } & {
2133
+ type: z.ZodLiteral<EventType.CUSTOM>;
2134
+ name: z.ZodString;
2135
+ value: z.ZodAny;
2136
+ }, z.ZodTypeAny, "passthrough">>;
1765
2137
  declare const RunStartedEventSchema: z.ZodObject<{
1766
2138
  timestamp: z.ZodOptional<z.ZodNumber>;
1767
2139
  rawEvent: z.ZodOptional<z.ZodAny>;
@@ -2142,37 +2514,279 @@ declare const RunStartedEventSchema: z.ZodObject<{
2142
2514
  state?: any;
2143
2515
  forwardedProps?: any;
2144
2516
  }>>;
2145
- }, "strip", z.ZodTypeAny, {
2146
- type: EventType.RUN_STARTED;
2147
- threadId: string;
2148
- runId: string;
2149
- parentRunId?: string | undefined;
2150
- timestamp?: number | undefined;
2151
- rawEvent?: any;
2152
- input?: {
2153
- threadId: string;
2154
- runId: string;
2155
- messages: ({
2517
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2518
+ timestamp: z.ZodOptional<z.ZodNumber>;
2519
+ rawEvent: z.ZodOptional<z.ZodAny>;
2520
+ } & {
2521
+ type: z.ZodLiteral<EventType.RUN_STARTED>;
2522
+ threadId: z.ZodString;
2523
+ runId: z.ZodString;
2524
+ parentRunId: z.ZodOptional<z.ZodString>;
2525
+ input: z.ZodOptional<z.ZodObject<{
2526
+ threadId: z.ZodString;
2527
+ runId: z.ZodString;
2528
+ parentRunId: z.ZodOptional<z.ZodString>;
2529
+ state: z.ZodAny;
2530
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
2531
+ id: z.ZodString;
2532
+ name: z.ZodOptional<z.ZodString>;
2533
+ } & {
2534
+ role: z.ZodLiteral<"developer">;
2535
+ content: z.ZodString;
2536
+ }, "strip", z.ZodTypeAny, {
2156
2537
  id: string;
2157
2538
  role: "developer";
2158
2539
  content: string;
2159
2540
  name?: string | undefined;
2160
- } | {
2541
+ }, {
2542
+ id: string;
2543
+ role: "developer";
2544
+ content: string;
2545
+ name?: string | undefined;
2546
+ }>, z.ZodObject<{
2547
+ id: z.ZodString;
2548
+ name: z.ZodOptional<z.ZodString>;
2549
+ } & {
2550
+ role: z.ZodLiteral<"system">;
2551
+ content: z.ZodString;
2552
+ }, "strip", z.ZodTypeAny, {
2161
2553
  id: string;
2162
2554
  role: "system";
2163
2555
  content: string;
2164
2556
  name?: string | undefined;
2165
- } | {
2557
+ }, {
2166
2558
  id: string;
2167
- role: "assistant";
2559
+ role: "system";
2560
+ content: string;
2168
2561
  name?: string | undefined;
2169
- content?: string | undefined;
2170
- toolCalls?: {
2171
- function: {
2562
+ }>, z.ZodObject<{
2563
+ id: z.ZodString;
2564
+ name: z.ZodOptional<z.ZodString>;
2565
+ } & {
2566
+ role: z.ZodLiteral<"assistant">;
2567
+ content: z.ZodOptional<z.ZodString>;
2568
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
2569
+ id: z.ZodString;
2570
+ type: z.ZodLiteral<"function">;
2571
+ function: z.ZodObject<{
2572
+ name: z.ZodString;
2573
+ arguments: z.ZodString;
2574
+ }, "strip", z.ZodTypeAny, {
2172
2575
  name: string;
2173
2576
  arguments: string;
2174
- };
2175
- type: "function";
2577
+ }, {
2578
+ name: string;
2579
+ arguments: string;
2580
+ }>;
2581
+ }, "strip", z.ZodTypeAny, {
2582
+ function: {
2583
+ name: string;
2584
+ arguments: string;
2585
+ };
2586
+ type: "function";
2587
+ id: string;
2588
+ }, {
2589
+ function: {
2590
+ name: string;
2591
+ arguments: string;
2592
+ };
2593
+ type: "function";
2594
+ id: string;
2595
+ }>, "many">>;
2596
+ }, "strip", z.ZodTypeAny, {
2597
+ id: string;
2598
+ role: "assistant";
2599
+ name?: string | undefined;
2600
+ content?: string | undefined;
2601
+ toolCalls?: {
2602
+ function: {
2603
+ name: string;
2604
+ arguments: string;
2605
+ };
2606
+ type: "function";
2607
+ id: string;
2608
+ }[] | undefined;
2609
+ }, {
2610
+ id: string;
2611
+ role: "assistant";
2612
+ name?: string | undefined;
2613
+ content?: string | undefined;
2614
+ toolCalls?: {
2615
+ function: {
2616
+ name: string;
2617
+ arguments: string;
2618
+ };
2619
+ type: "function";
2620
+ id: string;
2621
+ }[] | undefined;
2622
+ }>, z.ZodObject<{
2623
+ id: z.ZodString;
2624
+ name: z.ZodOptional<z.ZodString>;
2625
+ } & {
2626
+ role: z.ZodLiteral<"user">;
2627
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2628
+ type: z.ZodLiteral<"text">;
2629
+ text: z.ZodString;
2630
+ }, "strip", z.ZodTypeAny, {
2631
+ type: "text";
2632
+ text: string;
2633
+ }, {
2634
+ type: "text";
2635
+ text: string;
2636
+ }>, z.ZodObject<{
2637
+ type: z.ZodLiteral<"binary">;
2638
+ mimeType: z.ZodString;
2639
+ id: z.ZodOptional<z.ZodString>;
2640
+ url: z.ZodOptional<z.ZodString>;
2641
+ data: z.ZodOptional<z.ZodString>;
2642
+ filename: z.ZodOptional<z.ZodString>;
2643
+ }, "strip", z.ZodTypeAny, {
2644
+ type: "binary";
2645
+ mimeType: string;
2646
+ id?: string | undefined;
2647
+ url?: string | undefined;
2648
+ data?: string | undefined;
2649
+ filename?: string | undefined;
2650
+ }, {
2651
+ type: "binary";
2652
+ mimeType: string;
2653
+ id?: string | undefined;
2654
+ url?: string | undefined;
2655
+ data?: string | undefined;
2656
+ filename?: string | undefined;
2657
+ }>]>, {
2658
+ type: "text";
2659
+ text: string;
2660
+ } | {
2661
+ type: "binary";
2662
+ mimeType: string;
2663
+ id?: string | undefined;
2664
+ url?: string | undefined;
2665
+ data?: string | undefined;
2666
+ filename?: string | undefined;
2667
+ }, {
2668
+ type: "text";
2669
+ text: string;
2670
+ } | {
2671
+ type: "binary";
2672
+ mimeType: string;
2673
+ id?: string | undefined;
2674
+ url?: string | undefined;
2675
+ data?: string | undefined;
2676
+ filename?: string | undefined;
2677
+ }>, "many">]>;
2678
+ }, "strip", z.ZodTypeAny, {
2679
+ id: string;
2680
+ role: "user";
2681
+ content: string | ({
2682
+ type: "text";
2683
+ text: string;
2684
+ } | {
2685
+ type: "binary";
2686
+ mimeType: string;
2687
+ id?: string | undefined;
2688
+ url?: string | undefined;
2689
+ data?: string | undefined;
2690
+ filename?: string | undefined;
2691
+ })[];
2692
+ name?: string | undefined;
2693
+ }, {
2694
+ id: string;
2695
+ role: "user";
2696
+ content: string | ({
2697
+ type: "text";
2698
+ text: string;
2699
+ } | {
2700
+ type: "binary";
2701
+ mimeType: string;
2702
+ id?: string | undefined;
2703
+ url?: string | undefined;
2704
+ data?: string | undefined;
2705
+ filename?: string | undefined;
2706
+ })[];
2707
+ name?: string | undefined;
2708
+ }>, z.ZodObject<{
2709
+ id: z.ZodString;
2710
+ content: z.ZodString;
2711
+ role: z.ZodLiteral<"tool">;
2712
+ toolCallId: z.ZodString;
2713
+ error: z.ZodOptional<z.ZodString>;
2714
+ }, "strip", z.ZodTypeAny, {
2715
+ id: string;
2716
+ role: "tool";
2717
+ content: string;
2718
+ toolCallId: string;
2719
+ error?: string | undefined;
2720
+ }, {
2721
+ id: string;
2722
+ role: "tool";
2723
+ content: string;
2724
+ toolCallId: string;
2725
+ error?: string | undefined;
2726
+ }>, z.ZodObject<{
2727
+ id: z.ZodString;
2728
+ role: z.ZodLiteral<"activity">;
2729
+ activityType: z.ZodString;
2730
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
2731
+ }, "strip", z.ZodTypeAny, {
2732
+ id: string;
2733
+ role: "activity";
2734
+ content: Record<string, any>;
2735
+ activityType: string;
2736
+ }, {
2737
+ id: string;
2738
+ role: "activity";
2739
+ content: Record<string, any>;
2740
+ activityType: string;
2741
+ }>]>, "many">;
2742
+ tools: z.ZodArray<z.ZodObject<{
2743
+ name: z.ZodString;
2744
+ description: z.ZodString;
2745
+ parameters: z.ZodAny;
2746
+ }, "strip", z.ZodTypeAny, {
2747
+ name: string;
2748
+ description: string;
2749
+ parameters?: any;
2750
+ }, {
2751
+ name: string;
2752
+ description: string;
2753
+ parameters?: any;
2754
+ }>, "many">;
2755
+ context: z.ZodArray<z.ZodObject<{
2756
+ description: z.ZodString;
2757
+ value: z.ZodString;
2758
+ }, "strip", z.ZodTypeAny, {
2759
+ value: string;
2760
+ description: string;
2761
+ }, {
2762
+ value: string;
2763
+ description: string;
2764
+ }>, "many">;
2765
+ forwardedProps: z.ZodAny;
2766
+ }, "strip", z.ZodTypeAny, {
2767
+ threadId: string;
2768
+ runId: string;
2769
+ messages: ({
2770
+ id: string;
2771
+ role: "developer";
2772
+ content: string;
2773
+ name?: string | undefined;
2774
+ } | {
2775
+ id: string;
2776
+ role: "system";
2777
+ content: string;
2778
+ name?: string | undefined;
2779
+ } | {
2780
+ id: string;
2781
+ role: "assistant";
2782
+ name?: string | undefined;
2783
+ content?: string | undefined;
2784
+ toolCalls?: {
2785
+ function: {
2786
+ name: string;
2787
+ arguments: string;
2788
+ };
2789
+ type: "function";
2176
2790
  id: string;
2177
2791
  }[] | undefined;
2178
2792
  } | {
@@ -2214,15 +2828,7 @@ declare const RunStartedEventSchema: z.ZodObject<{
2214
2828
  parentRunId?: string | undefined;
2215
2829
  state?: any;
2216
2830
  forwardedProps?: any;
2217
- } | undefined;
2218
- }, {
2219
- type: EventType.RUN_STARTED;
2220
- threadId: string;
2221
- runId: string;
2222
- parentRunId?: string | undefined;
2223
- timestamp?: number | undefined;
2224
- rawEvent?: any;
2225
- input?: {
2831
+ }, {
2226
2832
  threadId: string;
2227
2833
  runId: string;
2228
2834
  messages: ({
@@ -2287,785 +2893,2305 @@ declare const RunStartedEventSchema: z.ZodObject<{
2287
2893
  parentRunId?: string | undefined;
2288
2894
  state?: any;
2289
2895
  forwardedProps?: any;
2290
- } | undefined;
2291
- }>;
2292
- declare const RunFinishedEventSchema: z.ZodObject<{
2896
+ }>>;
2897
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2293
2898
  timestamp: z.ZodOptional<z.ZodNumber>;
2294
2899
  rawEvent: z.ZodOptional<z.ZodAny>;
2295
2900
  } & {
2296
- type: z.ZodLiteral<EventType.RUN_FINISHED>;
2901
+ type: z.ZodLiteral<EventType.RUN_STARTED>;
2297
2902
  threadId: z.ZodString;
2298
2903
  runId: z.ZodString;
2299
- result: z.ZodOptional<z.ZodAny>;
2300
- }, "strip", z.ZodTypeAny, {
2301
- type: EventType.RUN_FINISHED;
2302
- threadId: string;
2303
- runId: string;
2304
- timestamp?: number | undefined;
2305
- rawEvent?: any;
2306
- result?: any;
2307
- }, {
2308
- type: EventType.RUN_FINISHED;
2309
- threadId: string;
2310
- runId: string;
2311
- timestamp?: number | undefined;
2312
- rawEvent?: any;
2313
- result?: any;
2314
- }>;
2315
- declare const RunErrorEventSchema: z.ZodObject<{
2316
- timestamp: z.ZodOptional<z.ZodNumber>;
2317
- rawEvent: z.ZodOptional<z.ZodAny>;
2318
- } & {
2319
- type: z.ZodLiteral<EventType.RUN_ERROR>;
2320
- message: z.ZodString;
2321
- code: z.ZodOptional<z.ZodString>;
2322
- }, "strip", z.ZodTypeAny, {
2323
- message: string;
2324
- type: EventType.RUN_ERROR;
2325
- code?: string | undefined;
2326
- timestamp?: number | undefined;
2327
- rawEvent?: any;
2328
- }, {
2329
- message: string;
2330
- type: EventType.RUN_ERROR;
2331
- code?: string | undefined;
2332
- timestamp?: number | undefined;
2333
- rawEvent?: any;
2334
- }>;
2335
- declare const StepStartedEventSchema: z.ZodObject<{
2336
- timestamp: z.ZodOptional<z.ZodNumber>;
2337
- rawEvent: z.ZodOptional<z.ZodAny>;
2338
- } & {
2339
- type: z.ZodLiteral<EventType.STEP_STARTED>;
2340
- stepName: z.ZodString;
2341
- }, "strip", z.ZodTypeAny, {
2342
- type: EventType.STEP_STARTED;
2343
- stepName: string;
2344
- timestamp?: number | undefined;
2345
- rawEvent?: any;
2346
- }, {
2347
- type: EventType.STEP_STARTED;
2348
- stepName: string;
2349
- timestamp?: number | undefined;
2350
- rawEvent?: any;
2351
- }>;
2352
- declare const StepFinishedEventSchema: z.ZodObject<{
2353
- timestamp: z.ZodOptional<z.ZodNumber>;
2354
- rawEvent: z.ZodOptional<z.ZodAny>;
2355
- } & {
2356
- type: z.ZodLiteral<EventType.STEP_FINISHED>;
2357
- stepName: z.ZodString;
2358
- }, "strip", z.ZodTypeAny, {
2359
- type: EventType.STEP_FINISHED;
2360
- stepName: string;
2361
- timestamp?: number | undefined;
2362
- rawEvent?: any;
2363
- }, {
2364
- type: EventType.STEP_FINISHED;
2365
- stepName: string;
2366
- timestamp?: number | undefined;
2367
- rawEvent?: any;
2368
- }>;
2904
+ parentRunId: z.ZodOptional<z.ZodString>;
2905
+ input: z.ZodOptional<z.ZodObject<{
2906
+ threadId: z.ZodString;
2907
+ runId: z.ZodString;
2908
+ parentRunId: z.ZodOptional<z.ZodString>;
2909
+ state: z.ZodAny;
2910
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
2911
+ id: z.ZodString;
2912
+ name: z.ZodOptional<z.ZodString>;
2913
+ } & {
2914
+ role: z.ZodLiteral<"developer">;
2915
+ content: z.ZodString;
2916
+ }, "strip", z.ZodTypeAny, {
2917
+ id: string;
2918
+ role: "developer";
2919
+ content: string;
2920
+ name?: string | undefined;
2921
+ }, {
2922
+ id: string;
2923
+ role: "developer";
2924
+ content: string;
2925
+ name?: string | undefined;
2926
+ }>, z.ZodObject<{
2927
+ id: z.ZodString;
2928
+ name: z.ZodOptional<z.ZodString>;
2929
+ } & {
2930
+ role: z.ZodLiteral<"system">;
2931
+ content: z.ZodString;
2932
+ }, "strip", z.ZodTypeAny, {
2933
+ id: string;
2934
+ role: "system";
2935
+ content: string;
2936
+ name?: string | undefined;
2937
+ }, {
2938
+ id: string;
2939
+ role: "system";
2940
+ content: string;
2941
+ name?: string | undefined;
2942
+ }>, z.ZodObject<{
2943
+ id: z.ZodString;
2944
+ name: z.ZodOptional<z.ZodString>;
2945
+ } & {
2946
+ role: z.ZodLiteral<"assistant">;
2947
+ content: z.ZodOptional<z.ZodString>;
2948
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
2949
+ id: z.ZodString;
2950
+ type: z.ZodLiteral<"function">;
2951
+ function: z.ZodObject<{
2952
+ name: z.ZodString;
2953
+ arguments: z.ZodString;
2954
+ }, "strip", z.ZodTypeAny, {
2955
+ name: string;
2956
+ arguments: string;
2957
+ }, {
2958
+ name: string;
2959
+ arguments: string;
2960
+ }>;
2961
+ }, "strip", z.ZodTypeAny, {
2962
+ function: {
2963
+ name: string;
2964
+ arguments: string;
2965
+ };
2966
+ type: "function";
2967
+ id: string;
2968
+ }, {
2969
+ function: {
2970
+ name: string;
2971
+ arguments: string;
2972
+ };
2973
+ type: "function";
2974
+ id: string;
2975
+ }>, "many">>;
2976
+ }, "strip", z.ZodTypeAny, {
2977
+ id: string;
2978
+ role: "assistant";
2979
+ name?: string | undefined;
2980
+ content?: string | undefined;
2981
+ toolCalls?: {
2982
+ function: {
2983
+ name: string;
2984
+ arguments: string;
2985
+ };
2986
+ type: "function";
2987
+ id: string;
2988
+ }[] | undefined;
2989
+ }, {
2990
+ id: string;
2991
+ role: "assistant";
2992
+ name?: string | undefined;
2993
+ content?: string | undefined;
2994
+ toolCalls?: {
2995
+ function: {
2996
+ name: string;
2997
+ arguments: string;
2998
+ };
2999
+ type: "function";
3000
+ id: string;
3001
+ }[] | undefined;
3002
+ }>, z.ZodObject<{
3003
+ id: z.ZodString;
3004
+ name: z.ZodOptional<z.ZodString>;
3005
+ } & {
3006
+ role: z.ZodLiteral<"user">;
3007
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3008
+ type: z.ZodLiteral<"text">;
3009
+ text: z.ZodString;
3010
+ }, "strip", z.ZodTypeAny, {
3011
+ type: "text";
3012
+ text: string;
3013
+ }, {
3014
+ type: "text";
3015
+ text: string;
3016
+ }>, z.ZodObject<{
3017
+ type: z.ZodLiteral<"binary">;
3018
+ mimeType: z.ZodString;
3019
+ id: z.ZodOptional<z.ZodString>;
3020
+ url: z.ZodOptional<z.ZodString>;
3021
+ data: z.ZodOptional<z.ZodString>;
3022
+ filename: z.ZodOptional<z.ZodString>;
3023
+ }, "strip", z.ZodTypeAny, {
3024
+ type: "binary";
3025
+ mimeType: string;
3026
+ id?: string | undefined;
3027
+ url?: string | undefined;
3028
+ data?: string | undefined;
3029
+ filename?: string | undefined;
3030
+ }, {
3031
+ type: "binary";
3032
+ mimeType: string;
3033
+ id?: string | undefined;
3034
+ url?: string | undefined;
3035
+ data?: string | undefined;
3036
+ filename?: string | undefined;
3037
+ }>]>, {
3038
+ type: "text";
3039
+ text: string;
3040
+ } | {
3041
+ type: "binary";
3042
+ mimeType: string;
3043
+ id?: string | undefined;
3044
+ url?: string | undefined;
3045
+ data?: string | undefined;
3046
+ filename?: string | undefined;
3047
+ }, {
3048
+ type: "text";
3049
+ text: string;
3050
+ } | {
3051
+ type: "binary";
3052
+ mimeType: string;
3053
+ id?: string | undefined;
3054
+ url?: string | undefined;
3055
+ data?: string | undefined;
3056
+ filename?: string | undefined;
3057
+ }>, "many">]>;
3058
+ }, "strip", z.ZodTypeAny, {
3059
+ id: string;
3060
+ role: "user";
3061
+ content: string | ({
3062
+ type: "text";
3063
+ text: string;
3064
+ } | {
3065
+ type: "binary";
3066
+ mimeType: string;
3067
+ id?: string | undefined;
3068
+ url?: string | undefined;
3069
+ data?: string | undefined;
3070
+ filename?: string | undefined;
3071
+ })[];
3072
+ name?: string | undefined;
3073
+ }, {
3074
+ id: string;
3075
+ role: "user";
3076
+ content: string | ({
3077
+ type: "text";
3078
+ text: string;
3079
+ } | {
3080
+ type: "binary";
3081
+ mimeType: string;
3082
+ id?: string | undefined;
3083
+ url?: string | undefined;
3084
+ data?: string | undefined;
3085
+ filename?: string | undefined;
3086
+ })[];
3087
+ name?: string | undefined;
3088
+ }>, z.ZodObject<{
3089
+ id: z.ZodString;
3090
+ content: z.ZodString;
3091
+ role: z.ZodLiteral<"tool">;
3092
+ toolCallId: z.ZodString;
3093
+ error: z.ZodOptional<z.ZodString>;
3094
+ }, "strip", z.ZodTypeAny, {
3095
+ id: string;
3096
+ role: "tool";
3097
+ content: string;
3098
+ toolCallId: string;
3099
+ error?: string | undefined;
3100
+ }, {
3101
+ id: string;
3102
+ role: "tool";
3103
+ content: string;
3104
+ toolCallId: string;
3105
+ error?: string | undefined;
3106
+ }>, z.ZodObject<{
3107
+ id: z.ZodString;
3108
+ role: z.ZodLiteral<"activity">;
3109
+ activityType: z.ZodString;
3110
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
3111
+ }, "strip", z.ZodTypeAny, {
3112
+ id: string;
3113
+ role: "activity";
3114
+ content: Record<string, any>;
3115
+ activityType: string;
3116
+ }, {
3117
+ id: string;
3118
+ role: "activity";
3119
+ content: Record<string, any>;
3120
+ activityType: string;
3121
+ }>]>, "many">;
3122
+ tools: z.ZodArray<z.ZodObject<{
3123
+ name: z.ZodString;
3124
+ description: z.ZodString;
3125
+ parameters: z.ZodAny;
3126
+ }, "strip", z.ZodTypeAny, {
3127
+ name: string;
3128
+ description: string;
3129
+ parameters?: any;
3130
+ }, {
3131
+ name: string;
3132
+ description: string;
3133
+ parameters?: any;
3134
+ }>, "many">;
3135
+ context: z.ZodArray<z.ZodObject<{
3136
+ description: z.ZodString;
3137
+ value: z.ZodString;
3138
+ }, "strip", z.ZodTypeAny, {
3139
+ value: string;
3140
+ description: string;
3141
+ }, {
3142
+ value: string;
3143
+ description: string;
3144
+ }>, "many">;
3145
+ forwardedProps: z.ZodAny;
3146
+ }, "strip", z.ZodTypeAny, {
3147
+ threadId: string;
3148
+ runId: string;
3149
+ messages: ({
3150
+ id: string;
3151
+ role: "developer";
3152
+ content: string;
3153
+ name?: string | undefined;
3154
+ } | {
3155
+ id: string;
3156
+ role: "system";
3157
+ content: string;
3158
+ name?: string | undefined;
3159
+ } | {
3160
+ id: string;
3161
+ role: "assistant";
3162
+ name?: string | undefined;
3163
+ content?: string | undefined;
3164
+ toolCalls?: {
3165
+ function: {
3166
+ name: string;
3167
+ arguments: string;
3168
+ };
3169
+ type: "function";
3170
+ id: string;
3171
+ }[] | undefined;
3172
+ } | {
3173
+ id: string;
3174
+ role: "user";
3175
+ content: string | ({
3176
+ type: "text";
3177
+ text: string;
3178
+ } | {
3179
+ type: "binary";
3180
+ mimeType: string;
3181
+ id?: string | undefined;
3182
+ url?: string | undefined;
3183
+ data?: string | undefined;
3184
+ filename?: string | undefined;
3185
+ })[];
3186
+ name?: string | undefined;
3187
+ } | {
3188
+ id: string;
3189
+ role: "tool";
3190
+ content: string;
3191
+ toolCallId: string;
3192
+ error?: string | undefined;
3193
+ } | {
3194
+ id: string;
3195
+ role: "activity";
3196
+ content: Record<string, any>;
3197
+ activityType: string;
3198
+ })[];
3199
+ tools: {
3200
+ name: string;
3201
+ description: string;
3202
+ parameters?: any;
3203
+ }[];
3204
+ context: {
3205
+ value: string;
3206
+ description: string;
3207
+ }[];
3208
+ parentRunId?: string | undefined;
3209
+ state?: any;
3210
+ forwardedProps?: any;
3211
+ }, {
3212
+ threadId: string;
3213
+ runId: string;
3214
+ messages: ({
3215
+ id: string;
3216
+ role: "developer";
3217
+ content: string;
3218
+ name?: string | undefined;
3219
+ } | {
3220
+ id: string;
3221
+ role: "system";
3222
+ content: string;
3223
+ name?: string | undefined;
3224
+ } | {
3225
+ id: string;
3226
+ role: "assistant";
3227
+ name?: string | undefined;
3228
+ content?: string | undefined;
3229
+ toolCalls?: {
3230
+ function: {
3231
+ name: string;
3232
+ arguments: string;
3233
+ };
3234
+ type: "function";
3235
+ id: string;
3236
+ }[] | undefined;
3237
+ } | {
3238
+ id: string;
3239
+ role: "user";
3240
+ content: string | ({
3241
+ type: "text";
3242
+ text: string;
3243
+ } | {
3244
+ type: "binary";
3245
+ mimeType: string;
3246
+ id?: string | undefined;
3247
+ url?: string | undefined;
3248
+ data?: string | undefined;
3249
+ filename?: string | undefined;
3250
+ })[];
3251
+ name?: string | undefined;
3252
+ } | {
3253
+ id: string;
3254
+ role: "tool";
3255
+ content: string;
3256
+ toolCallId: string;
3257
+ error?: string | undefined;
3258
+ } | {
3259
+ id: string;
3260
+ role: "activity";
3261
+ content: Record<string, any>;
3262
+ activityType: string;
3263
+ })[];
3264
+ tools: {
3265
+ name: string;
3266
+ description: string;
3267
+ parameters?: any;
3268
+ }[];
3269
+ context: {
3270
+ value: string;
3271
+ description: string;
3272
+ }[];
3273
+ parentRunId?: string | undefined;
3274
+ state?: any;
3275
+ forwardedProps?: any;
3276
+ }>>;
3277
+ }, z.ZodTypeAny, "passthrough">>;
3278
+ declare const RunFinishedEventSchema: z.ZodObject<{
3279
+ timestamp: z.ZodOptional<z.ZodNumber>;
3280
+ rawEvent: z.ZodOptional<z.ZodAny>;
3281
+ } & {
3282
+ type: z.ZodLiteral<EventType.RUN_FINISHED>;
3283
+ threadId: z.ZodString;
3284
+ runId: z.ZodString;
3285
+ result: z.ZodOptional<z.ZodAny>;
3286
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3287
+ timestamp: z.ZodOptional<z.ZodNumber>;
3288
+ rawEvent: z.ZodOptional<z.ZodAny>;
3289
+ } & {
3290
+ type: z.ZodLiteral<EventType.RUN_FINISHED>;
3291
+ threadId: z.ZodString;
3292
+ runId: z.ZodString;
3293
+ result: z.ZodOptional<z.ZodAny>;
3294
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3295
+ timestamp: z.ZodOptional<z.ZodNumber>;
3296
+ rawEvent: z.ZodOptional<z.ZodAny>;
3297
+ } & {
3298
+ type: z.ZodLiteral<EventType.RUN_FINISHED>;
3299
+ threadId: z.ZodString;
3300
+ runId: z.ZodString;
3301
+ result: z.ZodOptional<z.ZodAny>;
3302
+ }, z.ZodTypeAny, "passthrough">>;
3303
+ declare const RunErrorEventSchema: z.ZodObject<{
3304
+ timestamp: z.ZodOptional<z.ZodNumber>;
3305
+ rawEvent: z.ZodOptional<z.ZodAny>;
3306
+ } & {
3307
+ type: z.ZodLiteral<EventType.RUN_ERROR>;
3308
+ message: z.ZodString;
3309
+ code: z.ZodOptional<z.ZodString>;
3310
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3311
+ timestamp: z.ZodOptional<z.ZodNumber>;
3312
+ rawEvent: z.ZodOptional<z.ZodAny>;
3313
+ } & {
3314
+ type: z.ZodLiteral<EventType.RUN_ERROR>;
3315
+ message: z.ZodString;
3316
+ code: z.ZodOptional<z.ZodString>;
3317
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3318
+ timestamp: z.ZodOptional<z.ZodNumber>;
3319
+ rawEvent: z.ZodOptional<z.ZodAny>;
3320
+ } & {
3321
+ type: z.ZodLiteral<EventType.RUN_ERROR>;
3322
+ message: z.ZodString;
3323
+ code: z.ZodOptional<z.ZodString>;
3324
+ }, z.ZodTypeAny, "passthrough">>;
3325
+ declare const StepStartedEventSchema: z.ZodObject<{
3326
+ timestamp: z.ZodOptional<z.ZodNumber>;
3327
+ rawEvent: z.ZodOptional<z.ZodAny>;
3328
+ } & {
3329
+ type: z.ZodLiteral<EventType.STEP_STARTED>;
3330
+ stepName: z.ZodString;
3331
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3332
+ timestamp: z.ZodOptional<z.ZodNumber>;
3333
+ rawEvent: z.ZodOptional<z.ZodAny>;
3334
+ } & {
3335
+ type: z.ZodLiteral<EventType.STEP_STARTED>;
3336
+ stepName: z.ZodString;
3337
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3338
+ timestamp: z.ZodOptional<z.ZodNumber>;
3339
+ rawEvent: z.ZodOptional<z.ZodAny>;
3340
+ } & {
3341
+ type: z.ZodLiteral<EventType.STEP_STARTED>;
3342
+ stepName: z.ZodString;
3343
+ }, z.ZodTypeAny, "passthrough">>;
3344
+ declare const StepFinishedEventSchema: z.ZodObject<{
3345
+ timestamp: z.ZodOptional<z.ZodNumber>;
3346
+ rawEvent: z.ZodOptional<z.ZodAny>;
3347
+ } & {
3348
+ type: z.ZodLiteral<EventType.STEP_FINISHED>;
3349
+ stepName: z.ZodString;
3350
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3351
+ timestamp: z.ZodOptional<z.ZodNumber>;
3352
+ rawEvent: z.ZodOptional<z.ZodAny>;
3353
+ } & {
3354
+ type: z.ZodLiteral<EventType.STEP_FINISHED>;
3355
+ stepName: z.ZodString;
3356
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3357
+ timestamp: z.ZodOptional<z.ZodNumber>;
3358
+ rawEvent: z.ZodOptional<z.ZodAny>;
3359
+ } & {
3360
+ type: z.ZodLiteral<EventType.STEP_FINISHED>;
3361
+ stepName: z.ZodString;
3362
+ }, z.ZodTypeAny, "passthrough">>;
2369
3363
  declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2370
3364
  timestamp: z.ZodOptional<z.ZodNumber>;
2371
3365
  rawEvent: z.ZodOptional<z.ZodAny>;
2372
3366
  } & {
2373
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
3367
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
3368
+ messageId: z.ZodString;
3369
+ role: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
3370
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3371
+ timestamp: z.ZodOptional<z.ZodNumber>;
3372
+ rawEvent: z.ZodOptional<z.ZodAny>;
3373
+ } & {
3374
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
3375
+ messageId: z.ZodString;
3376
+ role: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
3377
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3378
+ timestamp: z.ZodOptional<z.ZodNumber>;
3379
+ rawEvent: z.ZodOptional<z.ZodAny>;
3380
+ } & {
3381
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_START>;
3382
+ messageId: z.ZodString;
3383
+ role: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
3384
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3385
+ timestamp: z.ZodOptional<z.ZodNumber>;
3386
+ rawEvent: z.ZodOptional<z.ZodAny>;
3387
+ } & {
3388
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
3389
+ messageId: z.ZodString;
3390
+ delta: z.ZodEffects<z.ZodString, string, string>;
3391
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3392
+ timestamp: z.ZodOptional<z.ZodNumber>;
3393
+ rawEvent: z.ZodOptional<z.ZodAny>;
3394
+ } & {
3395
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
3396
+ messageId: z.ZodString;
3397
+ delta: z.ZodEffects<z.ZodString, string, string>;
3398
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3399
+ timestamp: z.ZodOptional<z.ZodNumber>;
3400
+ rawEvent: z.ZodOptional<z.ZodAny>;
3401
+ } & {
3402
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
3403
+ messageId: z.ZodString;
3404
+ delta: z.ZodEffects<z.ZodString, string, string>;
3405
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3406
+ timestamp: z.ZodOptional<z.ZodNumber>;
3407
+ rawEvent: z.ZodOptional<z.ZodAny>;
3408
+ } & {
3409
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
3410
+ messageId: z.ZodString;
3411
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3412
+ timestamp: z.ZodOptional<z.ZodNumber>;
3413
+ rawEvent: z.ZodOptional<z.ZodAny>;
3414
+ } & {
3415
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
3416
+ messageId: z.ZodString;
3417
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3418
+ timestamp: z.ZodOptional<z.ZodNumber>;
3419
+ rawEvent: z.ZodOptional<z.ZodAny>;
3420
+ } & {
3421
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
3422
+ messageId: z.ZodString;
3423
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3424
+ timestamp: z.ZodOptional<z.ZodNumber>;
3425
+ rawEvent: z.ZodOptional<z.ZodAny>;
3426
+ } & {
3427
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
3428
+ messageId: z.ZodOptional<z.ZodString>;
3429
+ role: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
3430
+ delta: z.ZodOptional<z.ZodString>;
3431
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3432
+ timestamp: z.ZodOptional<z.ZodNumber>;
3433
+ rawEvent: z.ZodOptional<z.ZodAny>;
3434
+ } & {
3435
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
3436
+ messageId: z.ZodOptional<z.ZodString>;
3437
+ role: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
3438
+ delta: z.ZodOptional<z.ZodString>;
3439
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3440
+ timestamp: z.ZodOptional<z.ZodNumber>;
3441
+ rawEvent: z.ZodOptional<z.ZodAny>;
3442
+ } & {
3443
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
3444
+ messageId: z.ZodOptional<z.ZodString>;
3445
+ role: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
3446
+ delta: z.ZodOptional<z.ZodString>;
3447
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3448
+ timestamp: z.ZodOptional<z.ZodNumber>;
3449
+ rawEvent: z.ZodOptional<z.ZodAny>;
3450
+ } & {
3451
+ type: z.ZodLiteral<EventType.THINKING_START>;
3452
+ title: z.ZodOptional<z.ZodString>;
3453
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3454
+ timestamp: z.ZodOptional<z.ZodNumber>;
3455
+ rawEvent: z.ZodOptional<z.ZodAny>;
3456
+ } & {
3457
+ type: z.ZodLiteral<EventType.THINKING_START>;
3458
+ title: z.ZodOptional<z.ZodString>;
3459
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3460
+ timestamp: z.ZodOptional<z.ZodNumber>;
3461
+ rawEvent: z.ZodOptional<z.ZodAny>;
3462
+ } & {
3463
+ type: z.ZodLiteral<EventType.THINKING_START>;
3464
+ title: z.ZodOptional<z.ZodString>;
3465
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3466
+ timestamp: z.ZodOptional<z.ZodNumber>;
3467
+ rawEvent: z.ZodOptional<z.ZodAny>;
3468
+ } & {
3469
+ type: z.ZodLiteral<EventType.THINKING_END>;
3470
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3471
+ timestamp: z.ZodOptional<z.ZodNumber>;
3472
+ rawEvent: z.ZodOptional<z.ZodAny>;
3473
+ } & {
3474
+ type: z.ZodLiteral<EventType.THINKING_END>;
3475
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3476
+ timestamp: z.ZodOptional<z.ZodNumber>;
3477
+ rawEvent: z.ZodOptional<z.ZodAny>;
3478
+ } & {
3479
+ type: z.ZodLiteral<EventType.THINKING_END>;
3480
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3481
+ timestamp: z.ZodOptional<z.ZodNumber>;
3482
+ rawEvent: z.ZodOptional<z.ZodAny>;
3483
+ } & {
3484
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
3485
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3486
+ timestamp: z.ZodOptional<z.ZodNumber>;
3487
+ rawEvent: z.ZodOptional<z.ZodAny>;
3488
+ } & {
3489
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
3490
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3491
+ timestamp: z.ZodOptional<z.ZodNumber>;
3492
+ rawEvent: z.ZodOptional<z.ZodAny>;
3493
+ } & {
3494
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
3495
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<Omit<{
3496
+ timestamp: z.ZodOptional<z.ZodNumber>;
3497
+ rawEvent: z.ZodOptional<z.ZodAny>;
3498
+ } & {
3499
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
3500
+ messageId: z.ZodString;
3501
+ delta: z.ZodEffects<z.ZodString, string, string>;
3502
+ }, "type" | "messageId"> & {
3503
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
3504
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<Omit<{
3505
+ timestamp: z.ZodOptional<z.ZodNumber>;
3506
+ rawEvent: z.ZodOptional<z.ZodAny>;
3507
+ } & {
3508
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
3509
+ messageId: z.ZodString;
3510
+ delta: z.ZodEffects<z.ZodString, string, string>;
3511
+ }, "type" | "messageId"> & {
3512
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
3513
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<Omit<{
3514
+ timestamp: z.ZodOptional<z.ZodNumber>;
3515
+ rawEvent: z.ZodOptional<z.ZodAny>;
3516
+ } & {
3517
+ type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
3518
+ messageId: z.ZodString;
3519
+ delta: z.ZodEffects<z.ZodString, string, string>;
3520
+ }, "type" | "messageId"> & {
3521
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
3522
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3523
+ timestamp: z.ZodOptional<z.ZodNumber>;
3524
+ rawEvent: z.ZodOptional<z.ZodAny>;
3525
+ } & {
3526
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
3527
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3528
+ timestamp: z.ZodOptional<z.ZodNumber>;
3529
+ rawEvent: z.ZodOptional<z.ZodAny>;
3530
+ } & {
3531
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
3532
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3533
+ timestamp: z.ZodOptional<z.ZodNumber>;
3534
+ rawEvent: z.ZodOptional<z.ZodAny>;
3535
+ } & {
3536
+ type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
3537
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3538
+ timestamp: z.ZodOptional<z.ZodNumber>;
3539
+ rawEvent: z.ZodOptional<z.ZodAny>;
3540
+ } & {
3541
+ type: z.ZodLiteral<EventType.TOOL_CALL_START>;
3542
+ toolCallId: z.ZodString;
3543
+ toolCallName: z.ZodString;
3544
+ parentMessageId: z.ZodOptional<z.ZodString>;
3545
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3546
+ timestamp: z.ZodOptional<z.ZodNumber>;
3547
+ rawEvent: z.ZodOptional<z.ZodAny>;
3548
+ } & {
3549
+ type: z.ZodLiteral<EventType.TOOL_CALL_START>;
3550
+ toolCallId: z.ZodString;
3551
+ toolCallName: z.ZodString;
3552
+ parentMessageId: z.ZodOptional<z.ZodString>;
3553
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3554
+ timestamp: z.ZodOptional<z.ZodNumber>;
3555
+ rawEvent: z.ZodOptional<z.ZodAny>;
3556
+ } & {
3557
+ type: z.ZodLiteral<EventType.TOOL_CALL_START>;
3558
+ toolCallId: z.ZodString;
3559
+ toolCallName: z.ZodString;
3560
+ parentMessageId: z.ZodOptional<z.ZodString>;
3561
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3562
+ timestamp: z.ZodOptional<z.ZodNumber>;
3563
+ rawEvent: z.ZodOptional<z.ZodAny>;
3564
+ } & {
3565
+ type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
3566
+ toolCallId: z.ZodString;
3567
+ delta: z.ZodString;
3568
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3569
+ timestamp: z.ZodOptional<z.ZodNumber>;
3570
+ rawEvent: z.ZodOptional<z.ZodAny>;
3571
+ } & {
3572
+ type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
3573
+ toolCallId: z.ZodString;
3574
+ delta: z.ZodString;
3575
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3576
+ timestamp: z.ZodOptional<z.ZodNumber>;
3577
+ rawEvent: z.ZodOptional<z.ZodAny>;
3578
+ } & {
3579
+ type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
3580
+ toolCallId: z.ZodString;
3581
+ delta: z.ZodString;
3582
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3583
+ timestamp: z.ZodOptional<z.ZodNumber>;
3584
+ rawEvent: z.ZodOptional<z.ZodAny>;
3585
+ } & {
3586
+ type: z.ZodLiteral<EventType.TOOL_CALL_END>;
3587
+ toolCallId: z.ZodString;
3588
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3589
+ timestamp: z.ZodOptional<z.ZodNumber>;
3590
+ rawEvent: z.ZodOptional<z.ZodAny>;
3591
+ } & {
3592
+ type: z.ZodLiteral<EventType.TOOL_CALL_END>;
3593
+ toolCallId: z.ZodString;
3594
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3595
+ timestamp: z.ZodOptional<z.ZodNumber>;
3596
+ rawEvent: z.ZodOptional<z.ZodAny>;
3597
+ } & {
3598
+ type: z.ZodLiteral<EventType.TOOL_CALL_END>;
3599
+ toolCallId: z.ZodString;
3600
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3601
+ timestamp: z.ZodOptional<z.ZodNumber>;
3602
+ rawEvent: z.ZodOptional<z.ZodAny>;
3603
+ } & {
3604
+ type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
3605
+ toolCallId: z.ZodOptional<z.ZodString>;
3606
+ toolCallName: z.ZodOptional<z.ZodString>;
3607
+ parentMessageId: z.ZodOptional<z.ZodString>;
3608
+ delta: z.ZodOptional<z.ZodString>;
3609
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3610
+ timestamp: z.ZodOptional<z.ZodNumber>;
3611
+ rawEvent: z.ZodOptional<z.ZodAny>;
3612
+ } & {
3613
+ type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
3614
+ toolCallId: z.ZodOptional<z.ZodString>;
3615
+ toolCallName: z.ZodOptional<z.ZodString>;
3616
+ parentMessageId: z.ZodOptional<z.ZodString>;
3617
+ delta: z.ZodOptional<z.ZodString>;
3618
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3619
+ timestamp: z.ZodOptional<z.ZodNumber>;
3620
+ rawEvent: z.ZodOptional<z.ZodAny>;
3621
+ } & {
3622
+ type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
3623
+ toolCallId: z.ZodOptional<z.ZodString>;
3624
+ toolCallName: z.ZodOptional<z.ZodString>;
3625
+ parentMessageId: z.ZodOptional<z.ZodString>;
3626
+ delta: z.ZodOptional<z.ZodString>;
3627
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3628
+ timestamp: z.ZodOptional<z.ZodNumber>;
3629
+ rawEvent: z.ZodOptional<z.ZodAny>;
3630
+ } & {
3631
+ messageId: z.ZodString;
3632
+ type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
3633
+ toolCallId: z.ZodString;
3634
+ content: z.ZodString;
3635
+ role: z.ZodOptional<z.ZodLiteral<"tool">>;
3636
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3637
+ timestamp: z.ZodOptional<z.ZodNumber>;
3638
+ rawEvent: z.ZodOptional<z.ZodAny>;
3639
+ } & {
3640
+ messageId: z.ZodString;
3641
+ type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
3642
+ toolCallId: z.ZodString;
3643
+ content: z.ZodString;
3644
+ role: z.ZodOptional<z.ZodLiteral<"tool">>;
3645
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3646
+ timestamp: z.ZodOptional<z.ZodNumber>;
3647
+ rawEvent: z.ZodOptional<z.ZodAny>;
3648
+ } & {
3649
+ messageId: z.ZodString;
3650
+ type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
3651
+ toolCallId: z.ZodString;
3652
+ content: z.ZodString;
3653
+ role: z.ZodOptional<z.ZodLiteral<"tool">>;
3654
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3655
+ timestamp: z.ZodOptional<z.ZodNumber>;
3656
+ rawEvent: z.ZodOptional<z.ZodAny>;
3657
+ } & {
3658
+ type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
3659
+ snapshot: z.ZodAny;
3660
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3661
+ timestamp: z.ZodOptional<z.ZodNumber>;
3662
+ rawEvent: z.ZodOptional<z.ZodAny>;
3663
+ } & {
3664
+ type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
3665
+ snapshot: z.ZodAny;
3666
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3667
+ timestamp: z.ZodOptional<z.ZodNumber>;
3668
+ rawEvent: z.ZodOptional<z.ZodAny>;
3669
+ } & {
3670
+ type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
3671
+ snapshot: z.ZodAny;
3672
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3673
+ timestamp: z.ZodOptional<z.ZodNumber>;
3674
+ rawEvent: z.ZodOptional<z.ZodAny>;
3675
+ } & {
3676
+ type: z.ZodLiteral<EventType.STATE_DELTA>;
3677
+ delta: z.ZodArray<z.ZodAny, "many">;
3678
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3679
+ timestamp: z.ZodOptional<z.ZodNumber>;
3680
+ rawEvent: z.ZodOptional<z.ZodAny>;
3681
+ } & {
3682
+ type: z.ZodLiteral<EventType.STATE_DELTA>;
3683
+ delta: z.ZodArray<z.ZodAny, "many">;
3684
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3685
+ timestamp: z.ZodOptional<z.ZodNumber>;
3686
+ rawEvent: z.ZodOptional<z.ZodAny>;
3687
+ } & {
3688
+ type: z.ZodLiteral<EventType.STATE_DELTA>;
3689
+ delta: z.ZodArray<z.ZodAny, "many">;
3690
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3691
+ timestamp: z.ZodOptional<z.ZodNumber>;
3692
+ rawEvent: z.ZodOptional<z.ZodAny>;
3693
+ } & {
3694
+ type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
3695
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
3696
+ id: z.ZodString;
3697
+ name: z.ZodOptional<z.ZodString>;
3698
+ } & {
3699
+ role: z.ZodLiteral<"developer">;
3700
+ content: z.ZodString;
3701
+ }, "strip", z.ZodTypeAny, {
3702
+ id: string;
3703
+ role: "developer";
3704
+ content: string;
3705
+ name?: string | undefined;
3706
+ }, {
3707
+ id: string;
3708
+ role: "developer";
3709
+ content: string;
3710
+ name?: string | undefined;
3711
+ }>, z.ZodObject<{
3712
+ id: z.ZodString;
3713
+ name: z.ZodOptional<z.ZodString>;
3714
+ } & {
3715
+ role: z.ZodLiteral<"system">;
3716
+ content: z.ZodString;
3717
+ }, "strip", z.ZodTypeAny, {
3718
+ id: string;
3719
+ role: "system";
3720
+ content: string;
3721
+ name?: string | undefined;
3722
+ }, {
3723
+ id: string;
3724
+ role: "system";
3725
+ content: string;
3726
+ name?: string | undefined;
3727
+ }>, z.ZodObject<{
3728
+ id: z.ZodString;
3729
+ name: z.ZodOptional<z.ZodString>;
3730
+ } & {
3731
+ role: z.ZodLiteral<"assistant">;
3732
+ content: z.ZodOptional<z.ZodString>;
3733
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
3734
+ id: z.ZodString;
3735
+ type: z.ZodLiteral<"function">;
3736
+ function: z.ZodObject<{
3737
+ name: z.ZodString;
3738
+ arguments: z.ZodString;
3739
+ }, "strip", z.ZodTypeAny, {
3740
+ name: string;
3741
+ arguments: string;
3742
+ }, {
3743
+ name: string;
3744
+ arguments: string;
3745
+ }>;
3746
+ }, "strip", z.ZodTypeAny, {
3747
+ function: {
3748
+ name: string;
3749
+ arguments: string;
3750
+ };
3751
+ type: "function";
3752
+ id: string;
3753
+ }, {
3754
+ function: {
3755
+ name: string;
3756
+ arguments: string;
3757
+ };
3758
+ type: "function";
3759
+ id: string;
3760
+ }>, "many">>;
3761
+ }, "strip", z.ZodTypeAny, {
3762
+ id: string;
3763
+ role: "assistant";
3764
+ name?: string | undefined;
3765
+ content?: string | undefined;
3766
+ toolCalls?: {
3767
+ function: {
3768
+ name: string;
3769
+ arguments: string;
3770
+ };
3771
+ type: "function";
3772
+ id: string;
3773
+ }[] | undefined;
3774
+ }, {
3775
+ id: string;
3776
+ role: "assistant";
3777
+ name?: string | undefined;
3778
+ content?: string | undefined;
3779
+ toolCalls?: {
3780
+ function: {
3781
+ name: string;
3782
+ arguments: string;
3783
+ };
3784
+ type: "function";
3785
+ id: string;
3786
+ }[] | undefined;
3787
+ }>, z.ZodObject<{
3788
+ id: z.ZodString;
3789
+ name: z.ZodOptional<z.ZodString>;
3790
+ } & {
3791
+ role: z.ZodLiteral<"user">;
3792
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3793
+ type: z.ZodLiteral<"text">;
3794
+ text: z.ZodString;
3795
+ }, "strip", z.ZodTypeAny, {
3796
+ type: "text";
3797
+ text: string;
3798
+ }, {
3799
+ type: "text";
3800
+ text: string;
3801
+ }>, z.ZodObject<{
3802
+ type: z.ZodLiteral<"binary">;
3803
+ mimeType: z.ZodString;
3804
+ id: z.ZodOptional<z.ZodString>;
3805
+ url: z.ZodOptional<z.ZodString>;
3806
+ data: z.ZodOptional<z.ZodString>;
3807
+ filename: z.ZodOptional<z.ZodString>;
3808
+ }, "strip", z.ZodTypeAny, {
3809
+ type: "binary";
3810
+ mimeType: string;
3811
+ id?: string | undefined;
3812
+ url?: string | undefined;
3813
+ data?: string | undefined;
3814
+ filename?: string | undefined;
3815
+ }, {
3816
+ type: "binary";
3817
+ mimeType: string;
3818
+ id?: string | undefined;
3819
+ url?: string | undefined;
3820
+ data?: string | undefined;
3821
+ filename?: string | undefined;
3822
+ }>]>, {
3823
+ type: "text";
3824
+ text: string;
3825
+ } | {
3826
+ type: "binary";
3827
+ mimeType: string;
3828
+ id?: string | undefined;
3829
+ url?: string | undefined;
3830
+ data?: string | undefined;
3831
+ filename?: string | undefined;
3832
+ }, {
3833
+ type: "text";
3834
+ text: string;
3835
+ } | {
3836
+ type: "binary";
3837
+ mimeType: string;
3838
+ id?: string | undefined;
3839
+ url?: string | undefined;
3840
+ data?: string | undefined;
3841
+ filename?: string | undefined;
3842
+ }>, "many">]>;
3843
+ }, "strip", z.ZodTypeAny, {
3844
+ id: string;
3845
+ role: "user";
3846
+ content: string | ({
3847
+ type: "text";
3848
+ text: string;
3849
+ } | {
3850
+ type: "binary";
3851
+ mimeType: string;
3852
+ id?: string | undefined;
3853
+ url?: string | undefined;
3854
+ data?: string | undefined;
3855
+ filename?: string | undefined;
3856
+ })[];
3857
+ name?: string | undefined;
3858
+ }, {
3859
+ id: string;
3860
+ role: "user";
3861
+ content: string | ({
3862
+ type: "text";
3863
+ text: string;
3864
+ } | {
3865
+ type: "binary";
3866
+ mimeType: string;
3867
+ id?: string | undefined;
3868
+ url?: string | undefined;
3869
+ data?: string | undefined;
3870
+ filename?: string | undefined;
3871
+ })[];
3872
+ name?: string | undefined;
3873
+ }>, z.ZodObject<{
3874
+ id: z.ZodString;
3875
+ content: z.ZodString;
3876
+ role: z.ZodLiteral<"tool">;
3877
+ toolCallId: z.ZodString;
3878
+ error: z.ZodOptional<z.ZodString>;
3879
+ }, "strip", z.ZodTypeAny, {
3880
+ id: string;
3881
+ role: "tool";
3882
+ content: string;
3883
+ toolCallId: string;
3884
+ error?: string | undefined;
3885
+ }, {
3886
+ id: string;
3887
+ role: "tool";
3888
+ content: string;
3889
+ toolCallId: string;
3890
+ error?: string | undefined;
3891
+ }>, z.ZodObject<{
3892
+ id: z.ZodString;
3893
+ role: z.ZodLiteral<"activity">;
3894
+ activityType: z.ZodString;
3895
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
3896
+ }, "strip", z.ZodTypeAny, {
3897
+ id: string;
3898
+ role: "activity";
3899
+ content: Record<string, any>;
3900
+ activityType: string;
3901
+ }, {
3902
+ id: string;
3903
+ role: "activity";
3904
+ content: Record<string, any>;
3905
+ activityType: string;
3906
+ }>]>, "many">;
3907
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3908
+ timestamp: z.ZodOptional<z.ZodNumber>;
3909
+ rawEvent: z.ZodOptional<z.ZodAny>;
3910
+ } & {
3911
+ type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
3912
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
3913
+ id: z.ZodString;
3914
+ name: z.ZodOptional<z.ZodString>;
3915
+ } & {
3916
+ role: z.ZodLiteral<"developer">;
3917
+ content: z.ZodString;
3918
+ }, "strip", z.ZodTypeAny, {
3919
+ id: string;
3920
+ role: "developer";
3921
+ content: string;
3922
+ name?: string | undefined;
3923
+ }, {
3924
+ id: string;
3925
+ role: "developer";
3926
+ content: string;
3927
+ name?: string | undefined;
3928
+ }>, z.ZodObject<{
3929
+ id: z.ZodString;
3930
+ name: z.ZodOptional<z.ZodString>;
3931
+ } & {
3932
+ role: z.ZodLiteral<"system">;
3933
+ content: z.ZodString;
3934
+ }, "strip", z.ZodTypeAny, {
3935
+ id: string;
3936
+ role: "system";
3937
+ content: string;
3938
+ name?: string | undefined;
3939
+ }, {
3940
+ id: string;
3941
+ role: "system";
3942
+ content: string;
3943
+ name?: string | undefined;
3944
+ }>, z.ZodObject<{
3945
+ id: z.ZodString;
3946
+ name: z.ZodOptional<z.ZodString>;
3947
+ } & {
3948
+ role: z.ZodLiteral<"assistant">;
3949
+ content: z.ZodOptional<z.ZodString>;
3950
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
3951
+ id: z.ZodString;
3952
+ type: z.ZodLiteral<"function">;
3953
+ function: z.ZodObject<{
3954
+ name: z.ZodString;
3955
+ arguments: z.ZodString;
3956
+ }, "strip", z.ZodTypeAny, {
3957
+ name: string;
3958
+ arguments: string;
3959
+ }, {
3960
+ name: string;
3961
+ arguments: string;
3962
+ }>;
3963
+ }, "strip", z.ZodTypeAny, {
3964
+ function: {
3965
+ name: string;
3966
+ arguments: string;
3967
+ };
3968
+ type: "function";
3969
+ id: string;
3970
+ }, {
3971
+ function: {
3972
+ name: string;
3973
+ arguments: string;
3974
+ };
3975
+ type: "function";
3976
+ id: string;
3977
+ }>, "many">>;
3978
+ }, "strip", z.ZodTypeAny, {
3979
+ id: string;
3980
+ role: "assistant";
3981
+ name?: string | undefined;
3982
+ content?: string | undefined;
3983
+ toolCalls?: {
3984
+ function: {
3985
+ name: string;
3986
+ arguments: string;
3987
+ };
3988
+ type: "function";
3989
+ id: string;
3990
+ }[] | undefined;
3991
+ }, {
3992
+ id: string;
3993
+ role: "assistant";
3994
+ name?: string | undefined;
3995
+ content?: string | undefined;
3996
+ toolCalls?: {
3997
+ function: {
3998
+ name: string;
3999
+ arguments: string;
4000
+ };
4001
+ type: "function";
4002
+ id: string;
4003
+ }[] | undefined;
4004
+ }>, z.ZodObject<{
4005
+ id: z.ZodString;
4006
+ name: z.ZodOptional<z.ZodString>;
4007
+ } & {
4008
+ role: z.ZodLiteral<"user">;
4009
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4010
+ type: z.ZodLiteral<"text">;
4011
+ text: z.ZodString;
4012
+ }, "strip", z.ZodTypeAny, {
4013
+ type: "text";
4014
+ text: string;
4015
+ }, {
4016
+ type: "text";
4017
+ text: string;
4018
+ }>, z.ZodObject<{
4019
+ type: z.ZodLiteral<"binary">;
4020
+ mimeType: z.ZodString;
4021
+ id: z.ZodOptional<z.ZodString>;
4022
+ url: z.ZodOptional<z.ZodString>;
4023
+ data: z.ZodOptional<z.ZodString>;
4024
+ filename: z.ZodOptional<z.ZodString>;
4025
+ }, "strip", z.ZodTypeAny, {
4026
+ type: "binary";
4027
+ mimeType: string;
4028
+ id?: string | undefined;
4029
+ url?: string | undefined;
4030
+ data?: string | undefined;
4031
+ filename?: string | undefined;
4032
+ }, {
4033
+ type: "binary";
4034
+ mimeType: string;
4035
+ id?: string | undefined;
4036
+ url?: string | undefined;
4037
+ data?: string | undefined;
4038
+ filename?: string | undefined;
4039
+ }>]>, {
4040
+ type: "text";
4041
+ text: string;
4042
+ } | {
4043
+ type: "binary";
4044
+ mimeType: string;
4045
+ id?: string | undefined;
4046
+ url?: string | undefined;
4047
+ data?: string | undefined;
4048
+ filename?: string | undefined;
4049
+ }, {
4050
+ type: "text";
4051
+ text: string;
4052
+ } | {
4053
+ type: "binary";
4054
+ mimeType: string;
4055
+ id?: string | undefined;
4056
+ url?: string | undefined;
4057
+ data?: string | undefined;
4058
+ filename?: string | undefined;
4059
+ }>, "many">]>;
4060
+ }, "strip", z.ZodTypeAny, {
4061
+ id: string;
4062
+ role: "user";
4063
+ content: string | ({
4064
+ type: "text";
4065
+ text: string;
4066
+ } | {
4067
+ type: "binary";
4068
+ mimeType: string;
4069
+ id?: string | undefined;
4070
+ url?: string | undefined;
4071
+ data?: string | undefined;
4072
+ filename?: string | undefined;
4073
+ })[];
4074
+ name?: string | undefined;
4075
+ }, {
4076
+ id: string;
4077
+ role: "user";
4078
+ content: string | ({
4079
+ type: "text";
4080
+ text: string;
4081
+ } | {
4082
+ type: "binary";
4083
+ mimeType: string;
4084
+ id?: string | undefined;
4085
+ url?: string | undefined;
4086
+ data?: string | undefined;
4087
+ filename?: string | undefined;
4088
+ })[];
4089
+ name?: string | undefined;
4090
+ }>, z.ZodObject<{
4091
+ id: z.ZodString;
4092
+ content: z.ZodString;
4093
+ role: z.ZodLiteral<"tool">;
4094
+ toolCallId: z.ZodString;
4095
+ error: z.ZodOptional<z.ZodString>;
4096
+ }, "strip", z.ZodTypeAny, {
4097
+ id: string;
4098
+ role: "tool";
4099
+ content: string;
4100
+ toolCallId: string;
4101
+ error?: string | undefined;
4102
+ }, {
4103
+ id: string;
4104
+ role: "tool";
4105
+ content: string;
4106
+ toolCallId: string;
4107
+ error?: string | undefined;
4108
+ }>, z.ZodObject<{
4109
+ id: z.ZodString;
4110
+ role: z.ZodLiteral<"activity">;
4111
+ activityType: z.ZodString;
4112
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
4113
+ }, "strip", z.ZodTypeAny, {
4114
+ id: string;
4115
+ role: "activity";
4116
+ content: Record<string, any>;
4117
+ activityType: string;
4118
+ }, {
4119
+ id: string;
4120
+ role: "activity";
4121
+ content: Record<string, any>;
4122
+ activityType: string;
4123
+ }>]>, "many">;
4124
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4125
+ timestamp: z.ZodOptional<z.ZodNumber>;
4126
+ rawEvent: z.ZodOptional<z.ZodAny>;
4127
+ } & {
4128
+ type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
4129
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
4130
+ id: z.ZodString;
4131
+ name: z.ZodOptional<z.ZodString>;
4132
+ } & {
4133
+ role: z.ZodLiteral<"developer">;
4134
+ content: z.ZodString;
4135
+ }, "strip", z.ZodTypeAny, {
4136
+ id: string;
4137
+ role: "developer";
4138
+ content: string;
4139
+ name?: string | undefined;
4140
+ }, {
4141
+ id: string;
4142
+ role: "developer";
4143
+ content: string;
4144
+ name?: string | undefined;
4145
+ }>, z.ZodObject<{
4146
+ id: z.ZodString;
4147
+ name: z.ZodOptional<z.ZodString>;
4148
+ } & {
4149
+ role: z.ZodLiteral<"system">;
4150
+ content: z.ZodString;
4151
+ }, "strip", z.ZodTypeAny, {
4152
+ id: string;
4153
+ role: "system";
4154
+ content: string;
4155
+ name?: string | undefined;
4156
+ }, {
4157
+ id: string;
4158
+ role: "system";
4159
+ content: string;
4160
+ name?: string | undefined;
4161
+ }>, z.ZodObject<{
4162
+ id: z.ZodString;
4163
+ name: z.ZodOptional<z.ZodString>;
4164
+ } & {
4165
+ role: z.ZodLiteral<"assistant">;
4166
+ content: z.ZodOptional<z.ZodString>;
4167
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
4168
+ id: z.ZodString;
4169
+ type: z.ZodLiteral<"function">;
4170
+ function: z.ZodObject<{
4171
+ name: z.ZodString;
4172
+ arguments: z.ZodString;
4173
+ }, "strip", z.ZodTypeAny, {
4174
+ name: string;
4175
+ arguments: string;
4176
+ }, {
4177
+ name: string;
4178
+ arguments: string;
4179
+ }>;
4180
+ }, "strip", z.ZodTypeAny, {
4181
+ function: {
4182
+ name: string;
4183
+ arguments: string;
4184
+ };
4185
+ type: "function";
4186
+ id: string;
4187
+ }, {
4188
+ function: {
4189
+ name: string;
4190
+ arguments: string;
4191
+ };
4192
+ type: "function";
4193
+ id: string;
4194
+ }>, "many">>;
4195
+ }, "strip", z.ZodTypeAny, {
4196
+ id: string;
4197
+ role: "assistant";
4198
+ name?: string | undefined;
4199
+ content?: string | undefined;
4200
+ toolCalls?: {
4201
+ function: {
4202
+ name: string;
4203
+ arguments: string;
4204
+ };
4205
+ type: "function";
4206
+ id: string;
4207
+ }[] | undefined;
4208
+ }, {
4209
+ id: string;
4210
+ role: "assistant";
4211
+ name?: string | undefined;
4212
+ content?: string | undefined;
4213
+ toolCalls?: {
4214
+ function: {
4215
+ name: string;
4216
+ arguments: string;
4217
+ };
4218
+ type: "function";
4219
+ id: string;
4220
+ }[] | undefined;
4221
+ }>, z.ZodObject<{
4222
+ id: z.ZodString;
4223
+ name: z.ZodOptional<z.ZodString>;
4224
+ } & {
4225
+ role: z.ZodLiteral<"user">;
4226
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4227
+ type: z.ZodLiteral<"text">;
4228
+ text: z.ZodString;
4229
+ }, "strip", z.ZodTypeAny, {
4230
+ type: "text";
4231
+ text: string;
4232
+ }, {
4233
+ type: "text";
4234
+ text: string;
4235
+ }>, z.ZodObject<{
4236
+ type: z.ZodLiteral<"binary">;
4237
+ mimeType: z.ZodString;
4238
+ id: z.ZodOptional<z.ZodString>;
4239
+ url: z.ZodOptional<z.ZodString>;
4240
+ data: z.ZodOptional<z.ZodString>;
4241
+ filename: z.ZodOptional<z.ZodString>;
4242
+ }, "strip", z.ZodTypeAny, {
4243
+ type: "binary";
4244
+ mimeType: string;
4245
+ id?: string | undefined;
4246
+ url?: string | undefined;
4247
+ data?: string | undefined;
4248
+ filename?: string | undefined;
4249
+ }, {
4250
+ type: "binary";
4251
+ mimeType: string;
4252
+ id?: string | undefined;
4253
+ url?: string | undefined;
4254
+ data?: string | undefined;
4255
+ filename?: string | undefined;
4256
+ }>]>, {
4257
+ type: "text";
4258
+ text: string;
4259
+ } | {
4260
+ type: "binary";
4261
+ mimeType: string;
4262
+ id?: string | undefined;
4263
+ url?: string | undefined;
4264
+ data?: string | undefined;
4265
+ filename?: string | undefined;
4266
+ }, {
4267
+ type: "text";
4268
+ text: string;
4269
+ } | {
4270
+ type: "binary";
4271
+ mimeType: string;
4272
+ id?: string | undefined;
4273
+ url?: string | undefined;
4274
+ data?: string | undefined;
4275
+ filename?: string | undefined;
4276
+ }>, "many">]>;
4277
+ }, "strip", z.ZodTypeAny, {
4278
+ id: string;
4279
+ role: "user";
4280
+ content: string | ({
4281
+ type: "text";
4282
+ text: string;
4283
+ } | {
4284
+ type: "binary";
4285
+ mimeType: string;
4286
+ id?: string | undefined;
4287
+ url?: string | undefined;
4288
+ data?: string | undefined;
4289
+ filename?: string | undefined;
4290
+ })[];
4291
+ name?: string | undefined;
4292
+ }, {
4293
+ id: string;
4294
+ role: "user";
4295
+ content: string | ({
4296
+ type: "text";
4297
+ text: string;
4298
+ } | {
4299
+ type: "binary";
4300
+ mimeType: string;
4301
+ id?: string | undefined;
4302
+ url?: string | undefined;
4303
+ data?: string | undefined;
4304
+ filename?: string | undefined;
4305
+ })[];
4306
+ name?: string | undefined;
4307
+ }>, z.ZodObject<{
4308
+ id: z.ZodString;
4309
+ content: z.ZodString;
4310
+ role: z.ZodLiteral<"tool">;
4311
+ toolCallId: z.ZodString;
4312
+ error: z.ZodOptional<z.ZodString>;
4313
+ }, "strip", z.ZodTypeAny, {
4314
+ id: string;
4315
+ role: "tool";
4316
+ content: string;
4317
+ toolCallId: string;
4318
+ error?: string | undefined;
4319
+ }, {
4320
+ id: string;
4321
+ role: "tool";
4322
+ content: string;
4323
+ toolCallId: string;
4324
+ error?: string | undefined;
4325
+ }>, z.ZodObject<{
4326
+ id: z.ZodString;
4327
+ role: z.ZodLiteral<"activity">;
4328
+ activityType: z.ZodString;
4329
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
4330
+ }, "strip", z.ZodTypeAny, {
4331
+ id: string;
4332
+ role: "activity";
4333
+ content: Record<string, any>;
4334
+ activityType: string;
4335
+ }, {
4336
+ id: string;
4337
+ role: "activity";
4338
+ content: Record<string, any>;
4339
+ activityType: string;
4340
+ }>]>, "many">;
4341
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4342
+ timestamp: z.ZodOptional<z.ZodNumber>;
4343
+ rawEvent: z.ZodOptional<z.ZodAny>;
4344
+ } & {
4345
+ type: z.ZodLiteral<EventType.ACTIVITY_SNAPSHOT>;
2374
4346
  messageId: z.ZodString;
2375
- role: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
2376
- }, "strip", z.ZodTypeAny, {
2377
- type: EventType.TEXT_MESSAGE_START;
2378
- role: "developer" | "system" | "assistant" | "user";
2379
- messageId: string;
2380
- timestamp?: number | undefined;
2381
- rawEvent?: any;
2382
- }, {
2383
- type: EventType.TEXT_MESSAGE_START;
2384
- messageId: string;
2385
- role?: "developer" | "system" | "assistant" | "user" | undefined;
2386
- timestamp?: number | undefined;
2387
- rawEvent?: any;
2388
- }>, z.ZodObject<{
4347
+ activityType: z.ZodString;
4348
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
4349
+ replace: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4350
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2389
4351
  timestamp: z.ZodOptional<z.ZodNumber>;
2390
4352
  rawEvent: z.ZodOptional<z.ZodAny>;
2391
4353
  } & {
2392
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
4354
+ type: z.ZodLiteral<EventType.ACTIVITY_SNAPSHOT>;
2393
4355
  messageId: z.ZodString;
2394
- delta: z.ZodEffects<z.ZodString, string, string>;
2395
- }, "strip", z.ZodTypeAny, {
2396
- type: EventType.TEXT_MESSAGE_CONTENT;
2397
- messageId: string;
2398
- delta: string;
2399
- timestamp?: number | undefined;
2400
- rawEvent?: any;
2401
- }, {
2402
- type: EventType.TEXT_MESSAGE_CONTENT;
2403
- messageId: string;
2404
- delta: string;
2405
- timestamp?: number | undefined;
2406
- rawEvent?: any;
2407
- }>, z.ZodObject<{
4356
+ activityType: z.ZodString;
4357
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
4358
+ replace: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4359
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2408
4360
  timestamp: z.ZodOptional<z.ZodNumber>;
2409
4361
  rawEvent: z.ZodOptional<z.ZodAny>;
2410
4362
  } & {
2411
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_END>;
4363
+ type: z.ZodLiteral<EventType.ACTIVITY_SNAPSHOT>;
2412
4364
  messageId: z.ZodString;
2413
- }, "strip", z.ZodTypeAny, {
2414
- type: EventType.TEXT_MESSAGE_END;
2415
- messageId: string;
2416
- timestamp?: number | undefined;
2417
- rawEvent?: any;
2418
- }, {
2419
- type: EventType.TEXT_MESSAGE_END;
2420
- messageId: string;
2421
- timestamp?: number | undefined;
2422
- rawEvent?: any;
2423
- }>, z.ZodObject<{
2424
- timestamp: z.ZodOptional<z.ZodNumber>;
2425
- rawEvent: z.ZodOptional<z.ZodAny>;
2426
- } & {
2427
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_CHUNK>;
2428
- messageId: z.ZodOptional<z.ZodString>;
2429
- role: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"developer">, z.ZodLiteral<"system">, z.ZodLiteral<"assistant">, z.ZodLiteral<"user">]>>;
2430
- delta: z.ZodOptional<z.ZodString>;
2431
- }, "strip", z.ZodTypeAny, {
2432
- type: EventType.TEXT_MESSAGE_CHUNK;
2433
- role?: "developer" | "system" | "assistant" | "user" | undefined;
2434
- timestamp?: number | undefined;
2435
- rawEvent?: any;
2436
- messageId?: string | undefined;
2437
- delta?: string | undefined;
2438
- }, {
2439
- type: EventType.TEXT_MESSAGE_CHUNK;
2440
- role?: "developer" | "system" | "assistant" | "user" | undefined;
2441
- timestamp?: number | undefined;
2442
- rawEvent?: any;
2443
- messageId?: string | undefined;
2444
- delta?: string | undefined;
2445
- }>, z.ZodObject<{
2446
- timestamp: z.ZodOptional<z.ZodNumber>;
2447
- rawEvent: z.ZodOptional<z.ZodAny>;
2448
- } & {
2449
- type: z.ZodLiteral<EventType.THINKING_START>;
2450
- title: z.ZodOptional<z.ZodString>;
2451
- }, "strip", z.ZodTypeAny, {
2452
- type: EventType.THINKING_START;
2453
- timestamp?: number | undefined;
2454
- rawEvent?: any;
2455
- title?: string | undefined;
2456
- }, {
2457
- type: EventType.THINKING_START;
2458
- timestamp?: number | undefined;
2459
- rawEvent?: any;
2460
- title?: string | undefined;
2461
- }>, z.ZodObject<{
2462
- timestamp: z.ZodOptional<z.ZodNumber>;
2463
- rawEvent: z.ZodOptional<z.ZodAny>;
2464
- } & {
2465
- type: z.ZodLiteral<EventType.THINKING_END>;
2466
- }, "strip", z.ZodTypeAny, {
2467
- type: EventType.THINKING_END;
2468
- timestamp?: number | undefined;
2469
- rawEvent?: any;
2470
- }, {
2471
- type: EventType.THINKING_END;
2472
- timestamp?: number | undefined;
2473
- rawEvent?: any;
2474
- }>, z.ZodObject<{
4365
+ activityType: z.ZodString;
4366
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
4367
+ replace: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4368
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
2475
4369
  timestamp: z.ZodOptional<z.ZodNumber>;
2476
4370
  rawEvent: z.ZodOptional<z.ZodAny>;
2477
4371
  } & {
2478
- type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_START>;
2479
- }, "strip", z.ZodTypeAny, {
2480
- type: EventType.THINKING_TEXT_MESSAGE_START;
2481
- timestamp?: number | undefined;
2482
- rawEvent?: any;
2483
- }, {
2484
- type: EventType.THINKING_TEXT_MESSAGE_START;
2485
- timestamp?: number | undefined;
2486
- rawEvent?: any;
2487
- }>, z.ZodObject<Omit<{
4372
+ type: z.ZodLiteral<EventType.ACTIVITY_DELTA>;
4373
+ messageId: z.ZodString;
4374
+ activityType: z.ZodString;
4375
+ patch: z.ZodArray<z.ZodAny, "many">;
4376
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2488
4377
  timestamp: z.ZodOptional<z.ZodNumber>;
2489
4378
  rawEvent: z.ZodOptional<z.ZodAny>;
2490
4379
  } & {
2491
- type: z.ZodLiteral<EventType.TEXT_MESSAGE_CONTENT>;
4380
+ type: z.ZodLiteral<EventType.ACTIVITY_DELTA>;
2492
4381
  messageId: z.ZodString;
2493
- delta: z.ZodEffects<z.ZodString, string, string>;
2494
- }, "type" | "messageId"> & {
2495
- type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_CONTENT>;
2496
- }, "strip", z.ZodTypeAny, {
2497
- type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
2498
- delta: string;
2499
- timestamp?: number | undefined;
2500
- rawEvent?: any;
2501
- }, {
2502
- type: EventType.THINKING_TEXT_MESSAGE_CONTENT;
2503
- delta: string;
2504
- timestamp?: number | undefined;
2505
- rawEvent?: any;
2506
- }>, z.ZodObject<{
4382
+ activityType: z.ZodString;
4383
+ patch: z.ZodArray<z.ZodAny, "many">;
4384
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2507
4385
  timestamp: z.ZodOptional<z.ZodNumber>;
2508
4386
  rawEvent: z.ZodOptional<z.ZodAny>;
2509
4387
  } & {
2510
- type: z.ZodLiteral<EventType.THINKING_TEXT_MESSAGE_END>;
2511
- }, "strip", z.ZodTypeAny, {
2512
- type: EventType.THINKING_TEXT_MESSAGE_END;
2513
- timestamp?: number | undefined;
2514
- rawEvent?: any;
2515
- }, {
2516
- type: EventType.THINKING_TEXT_MESSAGE_END;
2517
- timestamp?: number | undefined;
2518
- rawEvent?: any;
2519
- }>, z.ZodObject<{
4388
+ type: z.ZodLiteral<EventType.ACTIVITY_DELTA>;
4389
+ messageId: z.ZodString;
4390
+ activityType: z.ZodString;
4391
+ patch: z.ZodArray<z.ZodAny, "many">;
4392
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
2520
4393
  timestamp: z.ZodOptional<z.ZodNumber>;
2521
4394
  rawEvent: z.ZodOptional<z.ZodAny>;
2522
4395
  } & {
2523
- type: z.ZodLiteral<EventType.TOOL_CALL_START>;
2524
- toolCallId: z.ZodString;
2525
- toolCallName: z.ZodString;
2526
- parentMessageId: z.ZodOptional<z.ZodString>;
2527
- }, "strip", z.ZodTypeAny, {
2528
- type: EventType.TOOL_CALL_START;
2529
- toolCallId: string;
2530
- toolCallName: string;
2531
- timestamp?: number | undefined;
2532
- rawEvent?: any;
2533
- parentMessageId?: string | undefined;
2534
- }, {
2535
- type: EventType.TOOL_CALL_START;
2536
- toolCallId: string;
2537
- toolCallName: string;
2538
- timestamp?: number | undefined;
2539
- rawEvent?: any;
2540
- parentMessageId?: string | undefined;
2541
- }>, z.ZodObject<{
4396
+ type: z.ZodLiteral<EventType.RAW>;
4397
+ event: z.ZodAny;
4398
+ source: z.ZodOptional<z.ZodString>;
4399
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2542
4400
  timestamp: z.ZodOptional<z.ZodNumber>;
2543
4401
  rawEvent: z.ZodOptional<z.ZodAny>;
2544
4402
  } & {
2545
- type: z.ZodLiteral<EventType.TOOL_CALL_ARGS>;
2546
- toolCallId: z.ZodString;
2547
- delta: z.ZodString;
2548
- }, "strip", z.ZodTypeAny, {
2549
- type: EventType.TOOL_CALL_ARGS;
2550
- toolCallId: string;
2551
- delta: string;
2552
- timestamp?: number | undefined;
2553
- rawEvent?: any;
2554
- }, {
2555
- type: EventType.TOOL_CALL_ARGS;
2556
- toolCallId: string;
2557
- delta: string;
2558
- timestamp?: number | undefined;
2559
- rawEvent?: any;
2560
- }>, z.ZodObject<{
4403
+ type: z.ZodLiteral<EventType.RAW>;
4404
+ event: z.ZodAny;
4405
+ source: z.ZodOptional<z.ZodString>;
4406
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2561
4407
  timestamp: z.ZodOptional<z.ZodNumber>;
2562
4408
  rawEvent: z.ZodOptional<z.ZodAny>;
2563
4409
  } & {
2564
- type: z.ZodLiteral<EventType.TOOL_CALL_END>;
2565
- toolCallId: z.ZodString;
2566
- }, "strip", z.ZodTypeAny, {
2567
- type: EventType.TOOL_CALL_END;
2568
- toolCallId: string;
2569
- timestamp?: number | undefined;
2570
- rawEvent?: any;
2571
- }, {
2572
- type: EventType.TOOL_CALL_END;
2573
- toolCallId: string;
2574
- timestamp?: number | undefined;
2575
- rawEvent?: any;
2576
- }>, z.ZodObject<{
4410
+ type: z.ZodLiteral<EventType.RAW>;
4411
+ event: z.ZodAny;
4412
+ source: z.ZodOptional<z.ZodString>;
4413
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
2577
4414
  timestamp: z.ZodOptional<z.ZodNumber>;
2578
4415
  rawEvent: z.ZodOptional<z.ZodAny>;
2579
4416
  } & {
2580
- type: z.ZodLiteral<EventType.TOOL_CALL_CHUNK>;
2581
- toolCallId: z.ZodOptional<z.ZodString>;
2582
- toolCallName: z.ZodOptional<z.ZodString>;
2583
- parentMessageId: z.ZodOptional<z.ZodString>;
2584
- delta: z.ZodOptional<z.ZodString>;
2585
- }, "strip", z.ZodTypeAny, {
2586
- type: EventType.TOOL_CALL_CHUNK;
2587
- toolCallId?: string | undefined;
2588
- timestamp?: number | undefined;
2589
- rawEvent?: any;
2590
- delta?: string | undefined;
2591
- toolCallName?: string | undefined;
2592
- parentMessageId?: string | undefined;
2593
- }, {
2594
- type: EventType.TOOL_CALL_CHUNK;
2595
- toolCallId?: string | undefined;
2596
- timestamp?: number | undefined;
2597
- rawEvent?: any;
2598
- delta?: string | undefined;
2599
- toolCallName?: string | undefined;
2600
- parentMessageId?: string | undefined;
2601
- }>, z.ZodObject<{
4417
+ type: z.ZodLiteral<EventType.CUSTOM>;
4418
+ name: z.ZodString;
4419
+ value: z.ZodAny;
4420
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2602
4421
  timestamp: z.ZodOptional<z.ZodNumber>;
2603
4422
  rawEvent: z.ZodOptional<z.ZodAny>;
2604
4423
  } & {
2605
- messageId: z.ZodString;
2606
- type: z.ZodLiteral<EventType.TOOL_CALL_RESULT>;
2607
- toolCallId: z.ZodString;
2608
- content: z.ZodString;
2609
- role: z.ZodOptional<z.ZodLiteral<"tool">>;
2610
- }, "strip", z.ZodTypeAny, {
2611
- type: EventType.TOOL_CALL_RESULT;
2612
- content: string;
2613
- toolCallId: string;
2614
- messageId: string;
2615
- role?: "tool" | undefined;
2616
- timestamp?: number | undefined;
2617
- rawEvent?: any;
2618
- }, {
2619
- type: EventType.TOOL_CALL_RESULT;
2620
- content: string;
2621
- toolCallId: string;
2622
- messageId: string;
2623
- role?: "tool" | undefined;
2624
- timestamp?: number | undefined;
2625
- rawEvent?: any;
2626
- }>, z.ZodObject<{
4424
+ type: z.ZodLiteral<EventType.CUSTOM>;
4425
+ name: z.ZodString;
4426
+ value: z.ZodAny;
4427
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2627
4428
  timestamp: z.ZodOptional<z.ZodNumber>;
2628
- rawEvent: z.ZodOptional<z.ZodAny>;
2629
- } & {
2630
- type: z.ZodLiteral<EventType.STATE_SNAPSHOT>;
2631
- snapshot: z.ZodAny;
2632
- }, "strip", z.ZodTypeAny, {
2633
- type: EventType.STATE_SNAPSHOT;
2634
- timestamp?: number | undefined;
2635
- rawEvent?: any;
2636
- snapshot?: any;
2637
- }, {
2638
- type: EventType.STATE_SNAPSHOT;
2639
- timestamp?: number | undefined;
2640
- rawEvent?: any;
2641
- snapshot?: any;
2642
- }>, z.ZodObject<{
4429
+ rawEvent: z.ZodOptional<z.ZodAny>;
4430
+ } & {
4431
+ type: z.ZodLiteral<EventType.CUSTOM>;
4432
+ name: z.ZodString;
4433
+ value: z.ZodAny;
4434
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
2643
4435
  timestamp: z.ZodOptional<z.ZodNumber>;
2644
4436
  rawEvent: z.ZodOptional<z.ZodAny>;
2645
4437
  } & {
2646
- type: z.ZodLiteral<EventType.STATE_DELTA>;
2647
- delta: z.ZodArray<z.ZodAny, "many">;
2648
- }, "strip", z.ZodTypeAny, {
2649
- type: EventType.STATE_DELTA;
2650
- delta: any[];
2651
- timestamp?: number | undefined;
2652
- rawEvent?: any;
2653
- }, {
2654
- type: EventType.STATE_DELTA;
2655
- delta: any[];
2656
- timestamp?: number | undefined;
2657
- rawEvent?: any;
2658
- }>, z.ZodObject<{
4438
+ type: z.ZodLiteral<EventType.RUN_STARTED>;
4439
+ threadId: z.ZodString;
4440
+ runId: z.ZodString;
4441
+ parentRunId: z.ZodOptional<z.ZodString>;
4442
+ input: z.ZodOptional<z.ZodObject<{
4443
+ threadId: z.ZodString;
4444
+ runId: z.ZodString;
4445
+ parentRunId: z.ZodOptional<z.ZodString>;
4446
+ state: z.ZodAny;
4447
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
4448
+ id: z.ZodString;
4449
+ name: z.ZodOptional<z.ZodString>;
4450
+ } & {
4451
+ role: z.ZodLiteral<"developer">;
4452
+ content: z.ZodString;
4453
+ }, "strip", z.ZodTypeAny, {
4454
+ id: string;
4455
+ role: "developer";
4456
+ content: string;
4457
+ name?: string | undefined;
4458
+ }, {
4459
+ id: string;
4460
+ role: "developer";
4461
+ content: string;
4462
+ name?: string | undefined;
4463
+ }>, z.ZodObject<{
4464
+ id: z.ZodString;
4465
+ name: z.ZodOptional<z.ZodString>;
4466
+ } & {
4467
+ role: z.ZodLiteral<"system">;
4468
+ content: z.ZodString;
4469
+ }, "strip", z.ZodTypeAny, {
4470
+ id: string;
4471
+ role: "system";
4472
+ content: string;
4473
+ name?: string | undefined;
4474
+ }, {
4475
+ id: string;
4476
+ role: "system";
4477
+ content: string;
4478
+ name?: string | undefined;
4479
+ }>, z.ZodObject<{
4480
+ id: z.ZodString;
4481
+ name: z.ZodOptional<z.ZodString>;
4482
+ } & {
4483
+ role: z.ZodLiteral<"assistant">;
4484
+ content: z.ZodOptional<z.ZodString>;
4485
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
4486
+ id: z.ZodString;
4487
+ type: z.ZodLiteral<"function">;
4488
+ function: z.ZodObject<{
4489
+ name: z.ZodString;
4490
+ arguments: z.ZodString;
4491
+ }, "strip", z.ZodTypeAny, {
4492
+ name: string;
4493
+ arguments: string;
4494
+ }, {
4495
+ name: string;
4496
+ arguments: string;
4497
+ }>;
4498
+ }, "strip", z.ZodTypeAny, {
4499
+ function: {
4500
+ name: string;
4501
+ arguments: string;
4502
+ };
4503
+ type: "function";
4504
+ id: string;
4505
+ }, {
4506
+ function: {
4507
+ name: string;
4508
+ arguments: string;
4509
+ };
4510
+ type: "function";
4511
+ id: string;
4512
+ }>, "many">>;
4513
+ }, "strip", z.ZodTypeAny, {
4514
+ id: string;
4515
+ role: "assistant";
4516
+ name?: string | undefined;
4517
+ content?: string | undefined;
4518
+ toolCalls?: {
4519
+ function: {
4520
+ name: string;
4521
+ arguments: string;
4522
+ };
4523
+ type: "function";
4524
+ id: string;
4525
+ }[] | undefined;
4526
+ }, {
4527
+ id: string;
4528
+ role: "assistant";
4529
+ name?: string | undefined;
4530
+ content?: string | undefined;
4531
+ toolCalls?: {
4532
+ function: {
4533
+ name: string;
4534
+ arguments: string;
4535
+ };
4536
+ type: "function";
4537
+ id: string;
4538
+ }[] | undefined;
4539
+ }>, z.ZodObject<{
4540
+ id: z.ZodString;
4541
+ name: z.ZodOptional<z.ZodString>;
4542
+ } & {
4543
+ role: z.ZodLiteral<"user">;
4544
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4545
+ type: z.ZodLiteral<"text">;
4546
+ text: z.ZodString;
4547
+ }, "strip", z.ZodTypeAny, {
4548
+ type: "text";
4549
+ text: string;
4550
+ }, {
4551
+ type: "text";
4552
+ text: string;
4553
+ }>, z.ZodObject<{
4554
+ type: z.ZodLiteral<"binary">;
4555
+ mimeType: z.ZodString;
4556
+ id: z.ZodOptional<z.ZodString>;
4557
+ url: z.ZodOptional<z.ZodString>;
4558
+ data: z.ZodOptional<z.ZodString>;
4559
+ filename: z.ZodOptional<z.ZodString>;
4560
+ }, "strip", z.ZodTypeAny, {
4561
+ type: "binary";
4562
+ mimeType: string;
4563
+ id?: string | undefined;
4564
+ url?: string | undefined;
4565
+ data?: string | undefined;
4566
+ filename?: string | undefined;
4567
+ }, {
4568
+ type: "binary";
4569
+ mimeType: string;
4570
+ id?: string | undefined;
4571
+ url?: string | undefined;
4572
+ data?: string | undefined;
4573
+ filename?: string | undefined;
4574
+ }>]>, {
4575
+ type: "text";
4576
+ text: string;
4577
+ } | {
4578
+ type: "binary";
4579
+ mimeType: string;
4580
+ id?: string | undefined;
4581
+ url?: string | undefined;
4582
+ data?: string | undefined;
4583
+ filename?: string | undefined;
4584
+ }, {
4585
+ type: "text";
4586
+ text: string;
4587
+ } | {
4588
+ type: "binary";
4589
+ mimeType: string;
4590
+ id?: string | undefined;
4591
+ url?: string | undefined;
4592
+ data?: string | undefined;
4593
+ filename?: string | undefined;
4594
+ }>, "many">]>;
4595
+ }, "strip", z.ZodTypeAny, {
4596
+ id: string;
4597
+ role: "user";
4598
+ content: string | ({
4599
+ type: "text";
4600
+ text: string;
4601
+ } | {
4602
+ type: "binary";
4603
+ mimeType: string;
4604
+ id?: string | undefined;
4605
+ url?: string | undefined;
4606
+ data?: string | undefined;
4607
+ filename?: string | undefined;
4608
+ })[];
4609
+ name?: string | undefined;
4610
+ }, {
4611
+ id: string;
4612
+ role: "user";
4613
+ content: string | ({
4614
+ type: "text";
4615
+ text: string;
4616
+ } | {
4617
+ type: "binary";
4618
+ mimeType: string;
4619
+ id?: string | undefined;
4620
+ url?: string | undefined;
4621
+ data?: string | undefined;
4622
+ filename?: string | undefined;
4623
+ })[];
4624
+ name?: string | undefined;
4625
+ }>, z.ZodObject<{
4626
+ id: z.ZodString;
4627
+ content: z.ZodString;
4628
+ role: z.ZodLiteral<"tool">;
4629
+ toolCallId: z.ZodString;
4630
+ error: z.ZodOptional<z.ZodString>;
4631
+ }, "strip", z.ZodTypeAny, {
4632
+ id: string;
4633
+ role: "tool";
4634
+ content: string;
4635
+ toolCallId: string;
4636
+ error?: string | undefined;
4637
+ }, {
4638
+ id: string;
4639
+ role: "tool";
4640
+ content: string;
4641
+ toolCallId: string;
4642
+ error?: string | undefined;
4643
+ }>, z.ZodObject<{
4644
+ id: z.ZodString;
4645
+ role: z.ZodLiteral<"activity">;
4646
+ activityType: z.ZodString;
4647
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
4648
+ }, "strip", z.ZodTypeAny, {
4649
+ id: string;
4650
+ role: "activity";
4651
+ content: Record<string, any>;
4652
+ activityType: string;
4653
+ }, {
4654
+ id: string;
4655
+ role: "activity";
4656
+ content: Record<string, any>;
4657
+ activityType: string;
4658
+ }>]>, "many">;
4659
+ tools: z.ZodArray<z.ZodObject<{
4660
+ name: z.ZodString;
4661
+ description: z.ZodString;
4662
+ parameters: z.ZodAny;
4663
+ }, "strip", z.ZodTypeAny, {
4664
+ name: string;
4665
+ description: string;
4666
+ parameters?: any;
4667
+ }, {
4668
+ name: string;
4669
+ description: string;
4670
+ parameters?: any;
4671
+ }>, "many">;
4672
+ context: z.ZodArray<z.ZodObject<{
4673
+ description: z.ZodString;
4674
+ value: z.ZodString;
4675
+ }, "strip", z.ZodTypeAny, {
4676
+ value: string;
4677
+ description: string;
4678
+ }, {
4679
+ value: string;
4680
+ description: string;
4681
+ }>, "many">;
4682
+ forwardedProps: z.ZodAny;
4683
+ }, "strip", z.ZodTypeAny, {
4684
+ threadId: string;
4685
+ runId: string;
4686
+ messages: ({
4687
+ id: string;
4688
+ role: "developer";
4689
+ content: string;
4690
+ name?: string | undefined;
4691
+ } | {
4692
+ id: string;
4693
+ role: "system";
4694
+ content: string;
4695
+ name?: string | undefined;
4696
+ } | {
4697
+ id: string;
4698
+ role: "assistant";
4699
+ name?: string | undefined;
4700
+ content?: string | undefined;
4701
+ toolCalls?: {
4702
+ function: {
4703
+ name: string;
4704
+ arguments: string;
4705
+ };
4706
+ type: "function";
4707
+ id: string;
4708
+ }[] | undefined;
4709
+ } | {
4710
+ id: string;
4711
+ role: "user";
4712
+ content: string | ({
4713
+ type: "text";
4714
+ text: string;
4715
+ } | {
4716
+ type: "binary";
4717
+ mimeType: string;
4718
+ id?: string | undefined;
4719
+ url?: string | undefined;
4720
+ data?: string | undefined;
4721
+ filename?: string | undefined;
4722
+ })[];
4723
+ name?: string | undefined;
4724
+ } | {
4725
+ id: string;
4726
+ role: "tool";
4727
+ content: string;
4728
+ toolCallId: string;
4729
+ error?: string | undefined;
4730
+ } | {
4731
+ id: string;
4732
+ role: "activity";
4733
+ content: Record<string, any>;
4734
+ activityType: string;
4735
+ })[];
4736
+ tools: {
4737
+ name: string;
4738
+ description: string;
4739
+ parameters?: any;
4740
+ }[];
4741
+ context: {
4742
+ value: string;
4743
+ description: string;
4744
+ }[];
4745
+ parentRunId?: string | undefined;
4746
+ state?: any;
4747
+ forwardedProps?: any;
4748
+ }, {
4749
+ threadId: string;
4750
+ runId: string;
4751
+ messages: ({
4752
+ id: string;
4753
+ role: "developer";
4754
+ content: string;
4755
+ name?: string | undefined;
4756
+ } | {
4757
+ id: string;
4758
+ role: "system";
4759
+ content: string;
4760
+ name?: string | undefined;
4761
+ } | {
4762
+ id: string;
4763
+ role: "assistant";
4764
+ name?: string | undefined;
4765
+ content?: string | undefined;
4766
+ toolCalls?: {
4767
+ function: {
4768
+ name: string;
4769
+ arguments: string;
4770
+ };
4771
+ type: "function";
4772
+ id: string;
4773
+ }[] | undefined;
4774
+ } | {
4775
+ id: string;
4776
+ role: "user";
4777
+ content: string | ({
4778
+ type: "text";
4779
+ text: string;
4780
+ } | {
4781
+ type: "binary";
4782
+ mimeType: string;
4783
+ id?: string | undefined;
4784
+ url?: string | undefined;
4785
+ data?: string | undefined;
4786
+ filename?: string | undefined;
4787
+ })[];
4788
+ name?: string | undefined;
4789
+ } | {
4790
+ id: string;
4791
+ role: "tool";
4792
+ content: string;
4793
+ toolCallId: string;
4794
+ error?: string | undefined;
4795
+ } | {
4796
+ id: string;
4797
+ role: "activity";
4798
+ content: Record<string, any>;
4799
+ activityType: string;
4800
+ })[];
4801
+ tools: {
4802
+ name: string;
4803
+ description: string;
4804
+ parameters?: any;
4805
+ }[];
4806
+ context: {
4807
+ value: string;
4808
+ description: string;
4809
+ }[];
4810
+ parentRunId?: string | undefined;
4811
+ state?: any;
4812
+ forwardedProps?: any;
4813
+ }>>;
4814
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2659
4815
  timestamp: z.ZodOptional<z.ZodNumber>;
2660
4816
  rawEvent: z.ZodOptional<z.ZodAny>;
2661
4817
  } & {
2662
- type: z.ZodLiteral<EventType.MESSAGES_SNAPSHOT>;
2663
- messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
2664
- id: z.ZodString;
2665
- name: z.ZodOptional<z.ZodString>;
2666
- } & {
2667
- role: z.ZodLiteral<"developer">;
2668
- content: z.ZodString;
2669
- }, "strip", z.ZodTypeAny, {
2670
- id: string;
2671
- role: "developer";
2672
- content: string;
2673
- name?: string | undefined;
2674
- }, {
2675
- id: string;
2676
- role: "developer";
2677
- content: string;
2678
- name?: string | undefined;
2679
- }>, z.ZodObject<{
2680
- id: z.ZodString;
2681
- name: z.ZodOptional<z.ZodString>;
2682
- } & {
2683
- role: z.ZodLiteral<"system">;
2684
- content: z.ZodString;
2685
- }, "strip", z.ZodTypeAny, {
2686
- id: string;
2687
- role: "system";
2688
- content: string;
2689
- name?: string | undefined;
2690
- }, {
2691
- id: string;
2692
- role: "system";
2693
- content: string;
2694
- name?: string | undefined;
2695
- }>, z.ZodObject<{
2696
- id: z.ZodString;
2697
- name: z.ZodOptional<z.ZodString>;
2698
- } & {
2699
- role: z.ZodLiteral<"assistant">;
2700
- content: z.ZodOptional<z.ZodString>;
2701
- toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
4818
+ type: z.ZodLiteral<EventType.RUN_STARTED>;
4819
+ threadId: z.ZodString;
4820
+ runId: z.ZodString;
4821
+ parentRunId: z.ZodOptional<z.ZodString>;
4822
+ input: z.ZodOptional<z.ZodObject<{
4823
+ threadId: z.ZodString;
4824
+ runId: z.ZodString;
4825
+ parentRunId: z.ZodOptional<z.ZodString>;
4826
+ state: z.ZodAny;
4827
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
4828
+ id: z.ZodString;
4829
+ name: z.ZodOptional<z.ZodString>;
4830
+ } & {
4831
+ role: z.ZodLiteral<"developer">;
4832
+ content: z.ZodString;
4833
+ }, "strip", z.ZodTypeAny, {
4834
+ id: string;
4835
+ role: "developer";
4836
+ content: string;
4837
+ name?: string | undefined;
4838
+ }, {
4839
+ id: string;
4840
+ role: "developer";
4841
+ content: string;
4842
+ name?: string | undefined;
4843
+ }>, z.ZodObject<{
4844
+ id: z.ZodString;
4845
+ name: z.ZodOptional<z.ZodString>;
4846
+ } & {
4847
+ role: z.ZodLiteral<"system">;
4848
+ content: z.ZodString;
4849
+ }, "strip", z.ZodTypeAny, {
4850
+ id: string;
4851
+ role: "system";
4852
+ content: string;
4853
+ name?: string | undefined;
4854
+ }, {
4855
+ id: string;
4856
+ role: "system";
4857
+ content: string;
4858
+ name?: string | undefined;
4859
+ }>, z.ZodObject<{
4860
+ id: z.ZodString;
4861
+ name: z.ZodOptional<z.ZodString>;
4862
+ } & {
4863
+ role: z.ZodLiteral<"assistant">;
4864
+ content: z.ZodOptional<z.ZodString>;
4865
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
4866
+ id: z.ZodString;
4867
+ type: z.ZodLiteral<"function">;
4868
+ function: z.ZodObject<{
4869
+ name: z.ZodString;
4870
+ arguments: z.ZodString;
4871
+ }, "strip", z.ZodTypeAny, {
4872
+ name: string;
4873
+ arguments: string;
4874
+ }, {
4875
+ name: string;
4876
+ arguments: string;
4877
+ }>;
4878
+ }, "strip", z.ZodTypeAny, {
4879
+ function: {
4880
+ name: string;
4881
+ arguments: string;
4882
+ };
4883
+ type: "function";
4884
+ id: string;
4885
+ }, {
4886
+ function: {
4887
+ name: string;
4888
+ arguments: string;
4889
+ };
4890
+ type: "function";
4891
+ id: string;
4892
+ }>, "many">>;
4893
+ }, "strip", z.ZodTypeAny, {
4894
+ id: string;
4895
+ role: "assistant";
4896
+ name?: string | undefined;
4897
+ content?: string | undefined;
4898
+ toolCalls?: {
4899
+ function: {
4900
+ name: string;
4901
+ arguments: string;
4902
+ };
4903
+ type: "function";
4904
+ id: string;
4905
+ }[] | undefined;
4906
+ }, {
4907
+ id: string;
4908
+ role: "assistant";
4909
+ name?: string | undefined;
4910
+ content?: string | undefined;
4911
+ toolCalls?: {
4912
+ function: {
4913
+ name: string;
4914
+ arguments: string;
4915
+ };
4916
+ type: "function";
4917
+ id: string;
4918
+ }[] | undefined;
4919
+ }>, z.ZodObject<{
2702
4920
  id: z.ZodString;
2703
- type: z.ZodLiteral<"function">;
2704
- function: z.ZodObject<{
2705
- name: z.ZodString;
2706
- arguments: z.ZodString;
4921
+ name: z.ZodOptional<z.ZodString>;
4922
+ } & {
4923
+ role: z.ZodLiteral<"user">;
4924
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4925
+ type: z.ZodLiteral<"text">;
4926
+ text: z.ZodString;
2707
4927
  }, "strip", z.ZodTypeAny, {
2708
- name: string;
2709
- arguments: string;
4928
+ type: "text";
4929
+ text: string;
2710
4930
  }, {
2711
- name: string;
2712
- arguments: string;
2713
- }>;
4931
+ type: "text";
4932
+ text: string;
4933
+ }>, z.ZodObject<{
4934
+ type: z.ZodLiteral<"binary">;
4935
+ mimeType: z.ZodString;
4936
+ id: z.ZodOptional<z.ZodString>;
4937
+ url: z.ZodOptional<z.ZodString>;
4938
+ data: z.ZodOptional<z.ZodString>;
4939
+ filename: z.ZodOptional<z.ZodString>;
4940
+ }, "strip", z.ZodTypeAny, {
4941
+ type: "binary";
4942
+ mimeType: string;
4943
+ id?: string | undefined;
4944
+ url?: string | undefined;
4945
+ data?: string | undefined;
4946
+ filename?: string | undefined;
4947
+ }, {
4948
+ type: "binary";
4949
+ mimeType: string;
4950
+ id?: string | undefined;
4951
+ url?: string | undefined;
4952
+ data?: string | undefined;
4953
+ filename?: string | undefined;
4954
+ }>]>, {
4955
+ type: "text";
4956
+ text: string;
4957
+ } | {
4958
+ type: "binary";
4959
+ mimeType: string;
4960
+ id?: string | undefined;
4961
+ url?: string | undefined;
4962
+ data?: string | undefined;
4963
+ filename?: string | undefined;
4964
+ }, {
4965
+ type: "text";
4966
+ text: string;
4967
+ } | {
4968
+ type: "binary";
4969
+ mimeType: string;
4970
+ id?: string | undefined;
4971
+ url?: string | undefined;
4972
+ data?: string | undefined;
4973
+ filename?: string | undefined;
4974
+ }>, "many">]>;
2714
4975
  }, "strip", z.ZodTypeAny, {
2715
- function: {
2716
- name: string;
2717
- arguments: string;
2718
- };
2719
- type: "function";
2720
4976
  id: string;
4977
+ role: "user";
4978
+ content: string | ({
4979
+ type: "text";
4980
+ text: string;
4981
+ } | {
4982
+ type: "binary";
4983
+ mimeType: string;
4984
+ id?: string | undefined;
4985
+ url?: string | undefined;
4986
+ data?: string | undefined;
4987
+ filename?: string | undefined;
4988
+ })[];
4989
+ name?: string | undefined;
2721
4990
  }, {
2722
- function: {
2723
- name: string;
2724
- arguments: string;
2725
- };
2726
- type: "function";
2727
4991
  id: string;
2728
- }>, "many">>;
2729
- }, "strip", z.ZodTypeAny, {
2730
- id: string;
2731
- role: "assistant";
2732
- name?: string | undefined;
2733
- content?: string | undefined;
2734
- toolCalls?: {
2735
- function: {
2736
- name: string;
2737
- arguments: string;
2738
- };
2739
- type: "function";
4992
+ role: "user";
4993
+ content: string | ({
4994
+ type: "text";
4995
+ text: string;
4996
+ } | {
4997
+ type: "binary";
4998
+ mimeType: string;
4999
+ id?: string | undefined;
5000
+ url?: string | undefined;
5001
+ data?: string | undefined;
5002
+ filename?: string | undefined;
5003
+ })[];
5004
+ name?: string | undefined;
5005
+ }>, z.ZodObject<{
5006
+ id: z.ZodString;
5007
+ content: z.ZodString;
5008
+ role: z.ZodLiteral<"tool">;
5009
+ toolCallId: z.ZodString;
5010
+ error: z.ZodOptional<z.ZodString>;
5011
+ }, "strip", z.ZodTypeAny, {
2740
5012
  id: string;
2741
- }[] | undefined;
2742
- }, {
2743
- id: string;
2744
- role: "assistant";
2745
- name?: string | undefined;
2746
- content?: string | undefined;
2747
- toolCalls?: {
2748
- function: {
2749
- name: string;
2750
- arguments: string;
2751
- };
2752
- type: "function";
5013
+ role: "tool";
5014
+ content: string;
5015
+ toolCallId: string;
5016
+ error?: string | undefined;
5017
+ }, {
2753
5018
  id: string;
2754
- }[] | undefined;
2755
- }>, z.ZodObject<{
2756
- id: z.ZodString;
2757
- name: z.ZodOptional<z.ZodString>;
2758
- } & {
2759
- role: z.ZodLiteral<"user">;
2760
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2761
- type: z.ZodLiteral<"text">;
2762
- text: z.ZodString;
5019
+ role: "tool";
5020
+ content: string;
5021
+ toolCallId: string;
5022
+ error?: string | undefined;
5023
+ }>, z.ZodObject<{
5024
+ id: z.ZodString;
5025
+ role: z.ZodLiteral<"activity">;
5026
+ activityType: z.ZodString;
5027
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
2763
5028
  }, "strip", z.ZodTypeAny, {
2764
- type: "text";
2765
- text: string;
5029
+ id: string;
5030
+ role: "activity";
5031
+ content: Record<string, any>;
5032
+ activityType: string;
2766
5033
  }, {
2767
- type: "text";
2768
- text: string;
2769
- }>, z.ZodObject<{
2770
- type: z.ZodLiteral<"binary">;
2771
- mimeType: z.ZodString;
2772
- id: z.ZodOptional<z.ZodString>;
2773
- url: z.ZodOptional<z.ZodString>;
2774
- data: z.ZodOptional<z.ZodString>;
2775
- filename: z.ZodOptional<z.ZodString>;
5034
+ id: string;
5035
+ role: "activity";
5036
+ content: Record<string, any>;
5037
+ activityType: string;
5038
+ }>]>, "many">;
5039
+ tools: z.ZodArray<z.ZodObject<{
5040
+ name: z.ZodString;
5041
+ description: z.ZodString;
5042
+ parameters: z.ZodAny;
2776
5043
  }, "strip", z.ZodTypeAny, {
2777
- type: "binary";
2778
- mimeType: string;
2779
- id?: string | undefined;
2780
- url?: string | undefined;
2781
- data?: string | undefined;
2782
- filename?: string | undefined;
5044
+ name: string;
5045
+ description: string;
5046
+ parameters?: any;
2783
5047
  }, {
2784
- type: "binary";
2785
- mimeType: string;
2786
- id?: string | undefined;
2787
- url?: string | undefined;
2788
- data?: string | undefined;
2789
- filename?: string | undefined;
2790
- }>]>, {
2791
- type: "text";
2792
- text: string;
2793
- } | {
2794
- type: "binary";
2795
- mimeType: string;
2796
- id?: string | undefined;
2797
- url?: string | undefined;
2798
- data?: string | undefined;
2799
- filename?: string | undefined;
5048
+ name: string;
5049
+ description: string;
5050
+ parameters?: any;
5051
+ }>, "many">;
5052
+ context: z.ZodArray<z.ZodObject<{
5053
+ description: z.ZodString;
5054
+ value: z.ZodString;
5055
+ }, "strip", z.ZodTypeAny, {
5056
+ value: string;
5057
+ description: string;
2800
5058
  }, {
2801
- type: "text";
2802
- text: string;
2803
- } | {
2804
- type: "binary";
2805
- mimeType: string;
2806
- id?: string | undefined;
2807
- url?: string | undefined;
2808
- data?: string | undefined;
2809
- filename?: string | undefined;
2810
- }>, "many">]>;
5059
+ value: string;
5060
+ description: string;
5061
+ }>, "many">;
5062
+ forwardedProps: z.ZodAny;
2811
5063
  }, "strip", z.ZodTypeAny, {
2812
- id: string;
2813
- role: "user";
2814
- content: string | ({
2815
- type: "text";
2816
- text: string;
5064
+ threadId: string;
5065
+ runId: string;
5066
+ messages: ({
5067
+ id: string;
5068
+ role: "developer";
5069
+ content: string;
5070
+ name?: string | undefined;
5071
+ } | {
5072
+ id: string;
5073
+ role: "system";
5074
+ content: string;
5075
+ name?: string | undefined;
2817
5076
  } | {
2818
- type: "binary";
2819
- mimeType: string;
2820
- id?: string | undefined;
2821
- url?: string | undefined;
2822
- data?: string | undefined;
2823
- filename?: string | undefined;
2824
- })[];
2825
- name?: string | undefined;
2826
- }, {
2827
- id: string;
2828
- role: "user";
2829
- content: string | ({
2830
- type: "text";
2831
- text: string;
5077
+ id: string;
5078
+ role: "assistant";
5079
+ name?: string | undefined;
5080
+ content?: string | undefined;
5081
+ toolCalls?: {
5082
+ function: {
5083
+ name: string;
5084
+ arguments: string;
5085
+ };
5086
+ type: "function";
5087
+ id: string;
5088
+ }[] | undefined;
2832
5089
  } | {
2833
- type: "binary";
2834
- mimeType: string;
2835
- id?: string | undefined;
2836
- url?: string | undefined;
2837
- data?: string | undefined;
2838
- filename?: string | undefined;
2839
- })[];
2840
- name?: string | undefined;
2841
- }>, z.ZodObject<{
2842
- id: z.ZodString;
2843
- content: z.ZodString;
2844
- role: z.ZodLiteral<"tool">;
2845
- toolCallId: z.ZodString;
2846
- error: z.ZodOptional<z.ZodString>;
2847
- }, "strip", z.ZodTypeAny, {
2848
- id: string;
2849
- role: "tool";
2850
- content: string;
2851
- toolCallId: string;
2852
- error?: string | undefined;
2853
- }, {
2854
- id: string;
2855
- role: "tool";
2856
- content: string;
2857
- toolCallId: string;
2858
- error?: string | undefined;
2859
- }>, z.ZodObject<{
2860
- id: z.ZodString;
2861
- role: z.ZodLiteral<"activity">;
2862
- activityType: z.ZodString;
2863
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
2864
- }, "strip", z.ZodTypeAny, {
2865
- id: string;
2866
- role: "activity";
2867
- content: Record<string, any>;
2868
- activityType: string;
2869
- }, {
2870
- id: string;
2871
- role: "activity";
2872
- content: Record<string, any>;
2873
- activityType: string;
2874
- }>]>, "many">;
2875
- }, "strip", z.ZodTypeAny, {
2876
- type: EventType.MESSAGES_SNAPSHOT;
2877
- messages: ({
2878
- id: string;
2879
- role: "developer";
2880
- content: string;
2881
- name?: string | undefined;
2882
- } | {
2883
- id: string;
2884
- role: "system";
2885
- content: string;
2886
- name?: string | undefined;
2887
- } | {
2888
- id: string;
2889
- role: "assistant";
2890
- name?: string | undefined;
2891
- content?: string | undefined;
2892
- toolCalls?: {
2893
- function: {
2894
- name: string;
2895
- arguments: string;
2896
- };
2897
- type: "function";
2898
5090
  id: string;
2899
- }[] | undefined;
2900
- } | {
2901
- id: string;
2902
- role: "user";
2903
- content: string | ({
2904
- type: "text";
2905
- text: string;
5091
+ role: "user";
5092
+ content: string | ({
5093
+ type: "text";
5094
+ text: string;
5095
+ } | {
5096
+ type: "binary";
5097
+ mimeType: string;
5098
+ id?: string | undefined;
5099
+ url?: string | undefined;
5100
+ data?: string | undefined;
5101
+ filename?: string | undefined;
5102
+ })[];
5103
+ name?: string | undefined;
2906
5104
  } | {
2907
- type: "binary";
2908
- mimeType: string;
2909
- id?: string | undefined;
2910
- url?: string | undefined;
2911
- data?: string | undefined;
2912
- filename?: string | undefined;
2913
- })[];
2914
- name?: string | undefined;
2915
- } | {
2916
- id: string;
2917
- role: "tool";
2918
- content: string;
2919
- toolCallId: string;
2920
- error?: string | undefined;
2921
- } | {
2922
- id: string;
2923
- role: "activity";
2924
- content: Record<string, any>;
2925
- activityType: string;
2926
- })[];
2927
- timestamp?: number | undefined;
2928
- rawEvent?: any;
2929
- }, {
2930
- type: EventType.MESSAGES_SNAPSHOT;
2931
- messages: ({
2932
- id: string;
2933
- role: "developer";
2934
- content: string;
2935
- name?: string | undefined;
2936
- } | {
2937
- id: string;
2938
- role: "system";
2939
- content: string;
2940
- name?: string | undefined;
2941
- } | {
2942
- id: string;
2943
- role: "assistant";
2944
- name?: string | undefined;
2945
- content?: string | undefined;
2946
- toolCalls?: {
2947
- function: {
2948
- name: string;
2949
- arguments: string;
2950
- };
2951
- type: "function";
2952
5105
  id: string;
2953
- }[] | undefined;
2954
- } | {
2955
- id: string;
2956
- role: "user";
2957
- content: string | ({
2958
- type: "text";
2959
- text: string;
5106
+ role: "tool";
5107
+ content: string;
5108
+ toolCallId: string;
5109
+ error?: string | undefined;
2960
5110
  } | {
2961
- type: "binary";
2962
- mimeType: string;
2963
- id?: string | undefined;
2964
- url?: string | undefined;
2965
- data?: string | undefined;
2966
- filename?: string | undefined;
5111
+ id: string;
5112
+ role: "activity";
5113
+ content: Record<string, any>;
5114
+ activityType: string;
2967
5115
  })[];
2968
- name?: string | undefined;
2969
- } | {
2970
- id: string;
2971
- role: "tool";
2972
- content: string;
2973
- toolCallId: string;
2974
- error?: string | undefined;
2975
- } | {
2976
- id: string;
2977
- role: "activity";
2978
- content: Record<string, any>;
2979
- activityType: string;
2980
- })[];
2981
- timestamp?: number | undefined;
2982
- rawEvent?: any;
2983
- }>, z.ZodObject<{
2984
- timestamp: z.ZodOptional<z.ZodNumber>;
2985
- rawEvent: z.ZodOptional<z.ZodAny>;
2986
- } & {
2987
- type: z.ZodLiteral<EventType.ACTIVITY_SNAPSHOT>;
2988
- messageId: z.ZodString;
2989
- activityType: z.ZodString;
2990
- content: z.ZodRecord<z.ZodString, z.ZodAny>;
2991
- replace: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2992
- }, "strip", z.ZodTypeAny, {
2993
- type: EventType.ACTIVITY_SNAPSHOT;
2994
- content: Record<string, any>;
2995
- activityType: string;
2996
- messageId: string;
2997
- replace: boolean;
2998
- timestamp?: number | undefined;
2999
- rawEvent?: any;
3000
- }, {
3001
- type: EventType.ACTIVITY_SNAPSHOT;
3002
- content: Record<string, any>;
3003
- activityType: string;
3004
- messageId: string;
3005
- timestamp?: number | undefined;
3006
- rawEvent?: any;
3007
- replace?: boolean | undefined;
3008
- }>, z.ZodObject<{
3009
- timestamp: z.ZodOptional<z.ZodNumber>;
3010
- rawEvent: z.ZodOptional<z.ZodAny>;
3011
- } & {
3012
- type: z.ZodLiteral<EventType.ACTIVITY_DELTA>;
3013
- messageId: z.ZodString;
3014
- activityType: z.ZodString;
3015
- patch: z.ZodArray<z.ZodAny, "many">;
3016
- }, "strip", z.ZodTypeAny, {
3017
- type: EventType.ACTIVITY_DELTA;
3018
- activityType: string;
3019
- messageId: string;
3020
- patch: any[];
3021
- timestamp?: number | undefined;
3022
- rawEvent?: any;
3023
- }, {
3024
- type: EventType.ACTIVITY_DELTA;
3025
- activityType: string;
3026
- messageId: string;
3027
- patch: any[];
3028
- timestamp?: number | undefined;
3029
- rawEvent?: any;
3030
- }>, z.ZodObject<{
3031
- timestamp: z.ZodOptional<z.ZodNumber>;
3032
- rawEvent: z.ZodOptional<z.ZodAny>;
3033
- } & {
3034
- type: z.ZodLiteral<EventType.RAW>;
3035
- event: z.ZodAny;
3036
- source: z.ZodOptional<z.ZodString>;
3037
- }, "strip", z.ZodTypeAny, {
3038
- type: EventType.RAW;
3039
- timestamp?: number | undefined;
3040
- rawEvent?: any;
3041
- event?: any;
3042
- source?: string | undefined;
3043
- }, {
3044
- type: EventType.RAW;
3045
- timestamp?: number | undefined;
3046
- rawEvent?: any;
3047
- event?: any;
3048
- source?: string | undefined;
3049
- }>, z.ZodObject<{
3050
- timestamp: z.ZodOptional<z.ZodNumber>;
3051
- rawEvent: z.ZodOptional<z.ZodAny>;
3052
- } & {
3053
- type: z.ZodLiteral<EventType.CUSTOM>;
3054
- name: z.ZodString;
3055
- value: z.ZodAny;
3056
- }, "strip", z.ZodTypeAny, {
3057
- name: string;
3058
- type: EventType.CUSTOM;
3059
- value?: any;
3060
- timestamp?: number | undefined;
3061
- rawEvent?: any;
3062
- }, {
3063
- name: string;
3064
- type: EventType.CUSTOM;
3065
- value?: any;
3066
- timestamp?: number | undefined;
3067
- rawEvent?: any;
3068
- }>, z.ZodObject<{
5116
+ tools: {
5117
+ name: string;
5118
+ description: string;
5119
+ parameters?: any;
5120
+ }[];
5121
+ context: {
5122
+ value: string;
5123
+ description: string;
5124
+ }[];
5125
+ parentRunId?: string | undefined;
5126
+ state?: any;
5127
+ forwardedProps?: any;
5128
+ }, {
5129
+ threadId: string;
5130
+ runId: string;
5131
+ messages: ({
5132
+ id: string;
5133
+ role: "developer";
5134
+ content: string;
5135
+ name?: string | undefined;
5136
+ } | {
5137
+ id: string;
5138
+ role: "system";
5139
+ content: string;
5140
+ name?: string | undefined;
5141
+ } | {
5142
+ id: string;
5143
+ role: "assistant";
5144
+ name?: string | undefined;
5145
+ content?: string | undefined;
5146
+ toolCalls?: {
5147
+ function: {
5148
+ name: string;
5149
+ arguments: string;
5150
+ };
5151
+ type: "function";
5152
+ id: string;
5153
+ }[] | undefined;
5154
+ } | {
5155
+ id: string;
5156
+ role: "user";
5157
+ content: string | ({
5158
+ type: "text";
5159
+ text: string;
5160
+ } | {
5161
+ type: "binary";
5162
+ mimeType: string;
5163
+ id?: string | undefined;
5164
+ url?: string | undefined;
5165
+ data?: string | undefined;
5166
+ filename?: string | undefined;
5167
+ })[];
5168
+ name?: string | undefined;
5169
+ } | {
5170
+ id: string;
5171
+ role: "tool";
5172
+ content: string;
5173
+ toolCallId: string;
5174
+ error?: string | undefined;
5175
+ } | {
5176
+ id: string;
5177
+ role: "activity";
5178
+ content: Record<string, any>;
5179
+ activityType: string;
5180
+ })[];
5181
+ tools: {
5182
+ name: string;
5183
+ description: string;
5184
+ parameters?: any;
5185
+ }[];
5186
+ context: {
5187
+ value: string;
5188
+ description: string;
5189
+ }[];
5190
+ parentRunId?: string | undefined;
5191
+ state?: any;
5192
+ forwardedProps?: any;
5193
+ }>>;
5194
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3069
5195
  timestamp: z.ZodOptional<z.ZodNumber>;
3070
5196
  rawEvent: z.ZodOptional<z.ZodAny>;
3071
5197
  } & {
@@ -3445,153 +5571,7 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3445
5571
  state?: any;
3446
5572
  forwardedProps?: any;
3447
5573
  }>>;
3448
- }, "strip", z.ZodTypeAny, {
3449
- type: EventType.RUN_STARTED;
3450
- threadId: string;
3451
- runId: string;
3452
- parentRunId?: string | undefined;
3453
- timestamp?: number | undefined;
3454
- rawEvent?: any;
3455
- input?: {
3456
- threadId: string;
3457
- runId: string;
3458
- messages: ({
3459
- id: string;
3460
- role: "developer";
3461
- content: string;
3462
- name?: string | undefined;
3463
- } | {
3464
- id: string;
3465
- role: "system";
3466
- content: string;
3467
- name?: string | undefined;
3468
- } | {
3469
- id: string;
3470
- role: "assistant";
3471
- name?: string | undefined;
3472
- content?: string | undefined;
3473
- toolCalls?: {
3474
- function: {
3475
- name: string;
3476
- arguments: string;
3477
- };
3478
- type: "function";
3479
- id: string;
3480
- }[] | undefined;
3481
- } | {
3482
- id: string;
3483
- role: "user";
3484
- content: string | ({
3485
- type: "text";
3486
- text: string;
3487
- } | {
3488
- type: "binary";
3489
- mimeType: string;
3490
- id?: string | undefined;
3491
- url?: string | undefined;
3492
- data?: string | undefined;
3493
- filename?: string | undefined;
3494
- })[];
3495
- name?: string | undefined;
3496
- } | {
3497
- id: string;
3498
- role: "tool";
3499
- content: string;
3500
- toolCallId: string;
3501
- error?: string | undefined;
3502
- } | {
3503
- id: string;
3504
- role: "activity";
3505
- content: Record<string, any>;
3506
- activityType: string;
3507
- })[];
3508
- tools: {
3509
- name: string;
3510
- description: string;
3511
- parameters?: any;
3512
- }[];
3513
- context: {
3514
- value: string;
3515
- description: string;
3516
- }[];
3517
- parentRunId?: string | undefined;
3518
- state?: any;
3519
- forwardedProps?: any;
3520
- } | undefined;
3521
- }, {
3522
- type: EventType.RUN_STARTED;
3523
- threadId: string;
3524
- runId: string;
3525
- parentRunId?: string | undefined;
3526
- timestamp?: number | undefined;
3527
- rawEvent?: any;
3528
- input?: {
3529
- threadId: string;
3530
- runId: string;
3531
- messages: ({
3532
- id: string;
3533
- role: "developer";
3534
- content: string;
3535
- name?: string | undefined;
3536
- } | {
3537
- id: string;
3538
- role: "system";
3539
- content: string;
3540
- name?: string | undefined;
3541
- } | {
3542
- id: string;
3543
- role: "assistant";
3544
- name?: string | undefined;
3545
- content?: string | undefined;
3546
- toolCalls?: {
3547
- function: {
3548
- name: string;
3549
- arguments: string;
3550
- };
3551
- type: "function";
3552
- id: string;
3553
- }[] | undefined;
3554
- } | {
3555
- id: string;
3556
- role: "user";
3557
- content: string | ({
3558
- type: "text";
3559
- text: string;
3560
- } | {
3561
- type: "binary";
3562
- mimeType: string;
3563
- id?: string | undefined;
3564
- url?: string | undefined;
3565
- data?: string | undefined;
3566
- filename?: string | undefined;
3567
- })[];
3568
- name?: string | undefined;
3569
- } | {
3570
- id: string;
3571
- role: "tool";
3572
- content: string;
3573
- toolCallId: string;
3574
- error?: string | undefined;
3575
- } | {
3576
- id: string;
3577
- role: "activity";
3578
- content: Record<string, any>;
3579
- activityType: string;
3580
- })[];
3581
- tools: {
3582
- name: string;
3583
- description: string;
3584
- parameters?: any;
3585
- }[];
3586
- context: {
3587
- value: string;
3588
- description: string;
3589
- }[];
3590
- parentRunId?: string | undefined;
3591
- state?: any;
3592
- forwardedProps?: any;
3593
- } | undefined;
3594
- }>, z.ZodObject<{
5574
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3595
5575
  timestamp: z.ZodOptional<z.ZodNumber>;
3596
5576
  rawEvent: z.ZodOptional<z.ZodAny>;
3597
5577
  } & {
@@ -3599,73 +5579,141 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3599
5579
  threadId: z.ZodString;
3600
5580
  runId: z.ZodString;
3601
5581
  result: z.ZodOptional<z.ZodAny>;
3602
- }, "strip", z.ZodTypeAny, {
3603
- type: EventType.RUN_FINISHED;
3604
- threadId: string;
3605
- runId: string;
3606
- timestamp?: number | undefined;
3607
- rawEvent?: any;
3608
- result?: any;
3609
- }, {
3610
- type: EventType.RUN_FINISHED;
3611
- threadId: string;
3612
- runId: string;
3613
- timestamp?: number | undefined;
3614
- rawEvent?: any;
3615
- result?: any;
3616
- }>, z.ZodObject<{
5582
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5583
+ timestamp: z.ZodOptional<z.ZodNumber>;
5584
+ rawEvent: z.ZodOptional<z.ZodAny>;
5585
+ } & {
5586
+ type: z.ZodLiteral<EventType.RUN_FINISHED>;
5587
+ threadId: z.ZodString;
5588
+ runId: z.ZodString;
5589
+ result: z.ZodOptional<z.ZodAny>;
5590
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5591
+ timestamp: z.ZodOptional<z.ZodNumber>;
5592
+ rawEvent: z.ZodOptional<z.ZodAny>;
5593
+ } & {
5594
+ type: z.ZodLiteral<EventType.RUN_FINISHED>;
5595
+ threadId: z.ZodString;
5596
+ runId: z.ZodString;
5597
+ result: z.ZodOptional<z.ZodAny>;
5598
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3617
5599
  timestamp: z.ZodOptional<z.ZodNumber>;
3618
5600
  rawEvent: z.ZodOptional<z.ZodAny>;
3619
5601
  } & {
3620
5602
  type: z.ZodLiteral<EventType.RUN_ERROR>;
3621
5603
  message: z.ZodString;
3622
5604
  code: z.ZodOptional<z.ZodString>;
3623
- }, "strip", z.ZodTypeAny, {
3624
- message: string;
3625
- type: EventType.RUN_ERROR;
3626
- code?: string | undefined;
3627
- timestamp?: number | undefined;
3628
- rawEvent?: any;
3629
- }, {
3630
- message: string;
3631
- type: EventType.RUN_ERROR;
3632
- code?: string | undefined;
3633
- timestamp?: number | undefined;
3634
- rawEvent?: any;
3635
- }>, z.ZodObject<{
5605
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5606
+ timestamp: z.ZodOptional<z.ZodNumber>;
5607
+ rawEvent: z.ZodOptional<z.ZodAny>;
5608
+ } & {
5609
+ type: z.ZodLiteral<EventType.RUN_ERROR>;
5610
+ message: z.ZodString;
5611
+ code: z.ZodOptional<z.ZodString>;
5612
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5613
+ timestamp: z.ZodOptional<z.ZodNumber>;
5614
+ rawEvent: z.ZodOptional<z.ZodAny>;
5615
+ } & {
5616
+ type: z.ZodLiteral<EventType.RUN_ERROR>;
5617
+ message: z.ZodString;
5618
+ code: z.ZodOptional<z.ZodString>;
5619
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3636
5620
  timestamp: z.ZodOptional<z.ZodNumber>;
3637
5621
  rawEvent: z.ZodOptional<z.ZodAny>;
3638
5622
  } & {
3639
5623
  type: z.ZodLiteral<EventType.STEP_STARTED>;
3640
5624
  stepName: z.ZodString;
3641
- }, "strip", z.ZodTypeAny, {
3642
- type: EventType.STEP_STARTED;
3643
- stepName: string;
3644
- timestamp?: number | undefined;
3645
- rawEvent?: any;
3646
- }, {
3647
- type: EventType.STEP_STARTED;
3648
- stepName: string;
3649
- timestamp?: number | undefined;
3650
- rawEvent?: any;
3651
- }>, z.ZodObject<{
5625
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5626
+ timestamp: z.ZodOptional<z.ZodNumber>;
5627
+ rawEvent: z.ZodOptional<z.ZodAny>;
5628
+ } & {
5629
+ type: z.ZodLiteral<EventType.STEP_STARTED>;
5630
+ stepName: z.ZodString;
5631
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5632
+ timestamp: z.ZodOptional<z.ZodNumber>;
5633
+ rawEvent: z.ZodOptional<z.ZodAny>;
5634
+ } & {
5635
+ type: z.ZodLiteral<EventType.STEP_STARTED>;
5636
+ stepName: z.ZodString;
5637
+ }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3652
5638
  timestamp: z.ZodOptional<z.ZodNumber>;
3653
5639
  rawEvent: z.ZodOptional<z.ZodAny>;
3654
5640
  } & {
3655
5641
  type: z.ZodLiteral<EventType.STEP_FINISHED>;
3656
5642
  stepName: z.ZodString;
3657
- }, "strip", z.ZodTypeAny, {
3658
- type: EventType.STEP_FINISHED;
3659
- stepName: string;
3660
- timestamp?: number | undefined;
3661
- rawEvent?: any;
3662
- }, {
3663
- type: EventType.STEP_FINISHED;
3664
- stepName: string;
3665
- timestamp?: number | undefined;
3666
- rawEvent?: any;
3667
- }>]>;
5643
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5644
+ timestamp: z.ZodOptional<z.ZodNumber>;
5645
+ rawEvent: z.ZodOptional<z.ZodAny>;
5646
+ } & {
5647
+ type: z.ZodLiteral<EventType.STEP_FINISHED>;
5648
+ stepName: z.ZodString;
5649
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5650
+ timestamp: z.ZodOptional<z.ZodNumber>;
5651
+ rawEvent: z.ZodOptional<z.ZodAny>;
5652
+ } & {
5653
+ type: z.ZodLiteral<EventType.STEP_FINISHED>;
5654
+ stepName: z.ZodString;
5655
+ }, z.ZodTypeAny, "passthrough">>]>;
3668
5656
  type BaseEvent = z.infer<typeof BaseEventSchema>;
5657
+ type AGUIEvent = z.infer<typeof EventSchemas>;
5658
+ type BaseEventFields = z.infer<typeof BaseEventSchema>;
5659
+ type AGUIEventByType = {
5660
+ [EventType.TEXT_MESSAGE_START]: TextMessageStartEvent;
5661
+ [EventType.TEXT_MESSAGE_CONTENT]: TextMessageContentEvent;
5662
+ [EventType.TEXT_MESSAGE_END]: TextMessageEndEvent;
5663
+ [EventType.TEXT_MESSAGE_CHUNK]: TextMessageChunkEvent;
5664
+ [EventType.THINKING_TEXT_MESSAGE_START]: ThinkingTextMessageStartEvent;
5665
+ [EventType.THINKING_TEXT_MESSAGE_CONTENT]: ThinkingTextMessageContentEvent;
5666
+ [EventType.THINKING_TEXT_MESSAGE_END]: ThinkingTextMessageEndEvent;
5667
+ [EventType.TOOL_CALL_START]: ToolCallStartEvent;
5668
+ [EventType.TOOL_CALL_ARGS]: ToolCallArgsEvent;
5669
+ [EventType.TOOL_CALL_END]: ToolCallEndEvent;
5670
+ [EventType.TOOL_CALL_CHUNK]: ToolCallChunkEvent;
5671
+ [EventType.TOOL_CALL_RESULT]: ToolCallResultEvent;
5672
+ [EventType.THINKING_START]: ThinkingStartEvent;
5673
+ [EventType.THINKING_END]: ThinkingEndEvent;
5674
+ [EventType.STATE_SNAPSHOT]: StateSnapshotEvent;
5675
+ [EventType.STATE_DELTA]: StateDeltaEvent;
5676
+ [EventType.MESSAGES_SNAPSHOT]: MessagesSnapshotEvent;
5677
+ [EventType.ACTIVITY_SNAPSHOT]: ActivitySnapshotEvent;
5678
+ [EventType.ACTIVITY_DELTA]: ActivityDeltaEvent;
5679
+ [EventType.RAW]: RawEvent;
5680
+ [EventType.CUSTOM]: CustomEvent;
5681
+ [EventType.RUN_STARTED]: RunStartedEvent;
5682
+ [EventType.RUN_FINISHED]: RunFinishedEvent;
5683
+ [EventType.RUN_ERROR]: RunErrorEvent;
5684
+ [EventType.STEP_STARTED]: StepStartedEvent;
5685
+ [EventType.STEP_FINISHED]: StepFinishedEvent;
5686
+ };
5687
+ type AGUIEventOf<T extends EventType> = AGUIEventByType[T];
5688
+ type EventPayloadOf<T extends EventType> = Omit<AGUIEventOf<T>, keyof BaseEventFields>;
5689
+ type EventProps<Schema extends z.ZodTypeAny> = Omit<z.input<Schema>, "type">;
5690
+ type BaseEventProps = EventProps<typeof BaseEventSchema>;
5691
+ type TextMessageStartEventProps = EventProps<typeof TextMessageStartEventSchema>;
5692
+ type TextMessageContentEventProps = EventProps<typeof TextMessageContentEventSchema>;
5693
+ type TextMessageEndEventProps = EventProps<typeof TextMessageEndEventSchema>;
5694
+ type TextMessageChunkEventProps = EventProps<typeof TextMessageChunkEventSchema>;
5695
+ type ThinkingTextMessageStartEventProps = EventProps<typeof ThinkingTextMessageStartEventSchema>;
5696
+ type ThinkingTextMessageContentEventProps = EventProps<typeof ThinkingTextMessageContentEventSchema>;
5697
+ type ThinkingTextMessageEndEventProps = EventProps<typeof ThinkingTextMessageEndEventSchema>;
5698
+ type ToolCallStartEventProps = EventProps<typeof ToolCallStartEventSchema>;
5699
+ type ToolCallArgsEventProps = EventProps<typeof ToolCallArgsEventSchema>;
5700
+ type ToolCallEndEventProps = EventProps<typeof ToolCallEndEventSchema>;
5701
+ type ToolCallChunkEventProps = EventProps<typeof ToolCallChunkEventSchema>;
5702
+ type ToolCallResultEventProps = EventProps<typeof ToolCallResultEventSchema>;
5703
+ type ThinkingStartEventProps = EventProps<typeof ThinkingStartEventSchema>;
5704
+ type ThinkingEndEventProps = EventProps<typeof ThinkingEndEventSchema>;
5705
+ type StateSnapshotEventProps = EventProps<typeof StateSnapshotEventSchema>;
5706
+ type StateDeltaEventProps = EventProps<typeof StateDeltaEventSchema>;
5707
+ type MessagesSnapshotEventProps = EventProps<typeof MessagesSnapshotEventSchema>;
5708
+ type ActivitySnapshotEventProps = EventProps<typeof ActivitySnapshotEventSchema>;
5709
+ type ActivityDeltaEventProps = EventProps<typeof ActivityDeltaEventSchema>;
5710
+ type RawEventProps = EventProps<typeof RawEventSchema>;
5711
+ type CustomEventProps = EventProps<typeof CustomEventSchema>;
5712
+ type RunStartedEventProps = EventProps<typeof RunStartedEventSchema>;
5713
+ type RunFinishedEventProps = EventProps<typeof RunFinishedEventSchema>;
5714
+ type RunErrorEventProps = EventProps<typeof RunErrorEventSchema>;
5715
+ type StepStartedEventProps = EventProps<typeof StepStartedEventSchema>;
5716
+ type StepFinishedEventProps = EventProps<typeof StepFinishedEventSchema>;
3669
5717
  type TextMessageStartEvent = z.infer<typeof TextMessageStartEventSchema>;
3670
5718
  type TextMessageContentEvent = z.infer<typeof TextMessageContentEventSchema>;
3671
5719
  type TextMessageEndEvent = z.infer<typeof TextMessageEndEventSchema>;
@@ -3693,4 +5741,4 @@ type RunErrorEvent = z.infer<typeof RunErrorEventSchema>;
3693
5741
  type StepStartedEvent = z.infer<typeof StepStartedEventSchema>;
3694
5742
  type StepFinishedEvent = z.infer<typeof StepFinishedEventSchema>;
3695
5743
 
3696
- export { AGUIConnectNotImplementedError, AGUIError, type ActivityDeltaEvent, ActivityDeltaEventSchema, type ActivityMessage, ActivityMessageSchema, type ActivitySnapshotEvent, ActivitySnapshotEventSchema, type AssistantMessage, AssistantMessageSchema, type BaseEvent, BaseEventSchema, BaseMessageSchema, type BinaryInputContent, BinaryInputContentSchema, type Context, ContextSchema, type CustomEvent, CustomEventSchema, type DeveloperMessage, DeveloperMessageSchema, EventSchemas, EventType, type FunctionCall, FunctionCallSchema, type InputContent, InputContentSchema, type Message, MessageSchema, type MessagesSnapshotEvent, MessagesSnapshotEventSchema, type RawEvent, RawEventSchema, type Role, RoleSchema, type RunAgentInput, RunAgentInputSchema, type RunErrorEvent, RunErrorEventSchema, type RunFinishedEvent, RunFinishedEventSchema, type RunStartedEvent, RunStartedEventSchema, type State, type StateDeltaEvent, StateDeltaEventSchema, StateSchema, type StateSnapshotEvent, StateSnapshotEventSchema, type StepFinishedEvent, StepFinishedEventSchema, type StepStartedEvent, StepStartedEventSchema, type SystemMessage, SystemMessageSchema, type TextInputContent, TextInputContentSchema, type TextMessageChunkEvent, TextMessageChunkEventSchema, type TextMessageContentEvent, TextMessageContentEventSchema, type TextMessageEndEvent, TextMessageEndEventSchema, type TextMessageStartEvent, TextMessageStartEventSchema, type ThinkingEndEvent, ThinkingEndEventSchema, type ThinkingStartEvent, ThinkingStartEventSchema, type ThinkingTextMessageContentEvent, ThinkingTextMessageContentEventSchema, type ThinkingTextMessageEndEvent, ThinkingTextMessageEndEventSchema, type ThinkingTextMessageStartEvent, ThinkingTextMessageStartEventSchema, type Tool, type ToolCall, type ToolCallArgsEvent, ToolCallArgsEventSchema, type ToolCallChunkEvent, ToolCallChunkEventSchema, type ToolCallEndEvent, ToolCallEndEventSchema, type ToolCallResultEvent, ToolCallResultEventSchema, ToolCallSchema, type ToolCallStartEvent, ToolCallStartEventSchema, type ToolMessage, ToolMessageSchema, ToolSchema, type UserMessage, UserMessageSchema };
5744
+ export { AGUIConnectNotImplementedError, AGUIError, type AGUIEvent, type AGUIEventByType, type AGUIEventOf, type ActivityDeltaEvent, type ActivityDeltaEventProps, ActivityDeltaEventSchema, type ActivityMessage, ActivityMessageSchema, type ActivitySnapshotEvent, type ActivitySnapshotEventProps, ActivitySnapshotEventSchema, type AssistantMessage, AssistantMessageSchema, type BaseEvent, type BaseEventFields, type BaseEventProps, BaseEventSchema, BaseMessageSchema, type BinaryInputContent, BinaryInputContentSchema, type Context, ContextSchema, type CustomEvent, type CustomEventProps, CustomEventSchema, type DeveloperMessage, DeveloperMessageSchema, type EventPayloadOf, EventSchemas, EventType, type FunctionCall, FunctionCallSchema, type InputContent, InputContentSchema, type Message, MessageSchema, type MessagesSnapshotEvent, type MessagesSnapshotEventProps, MessagesSnapshotEventSchema, type RawEvent, type RawEventProps, RawEventSchema, type Role, RoleSchema, type RunAgentInput, RunAgentInputSchema, type RunErrorEvent, type RunErrorEventProps, RunErrorEventSchema, type RunFinishedEvent, type RunFinishedEventProps, RunFinishedEventSchema, type RunStartedEvent, type RunStartedEventProps, RunStartedEventSchema, type State, type StateDeltaEvent, type StateDeltaEventProps, StateDeltaEventSchema, StateSchema, type StateSnapshotEvent, type StateSnapshotEventProps, StateSnapshotEventSchema, type StepFinishedEvent, type StepFinishedEventProps, StepFinishedEventSchema, type StepStartedEvent, type StepStartedEventProps, StepStartedEventSchema, type SystemMessage, SystemMessageSchema, type TextInputContent, TextInputContentSchema, type TextMessageChunkEvent, type TextMessageChunkEventProps, TextMessageChunkEventSchema, type TextMessageContentEvent, type TextMessageContentEventProps, TextMessageContentEventSchema, type TextMessageEndEvent, type TextMessageEndEventProps, TextMessageEndEventSchema, type TextMessageStartEvent, type TextMessageStartEventProps, TextMessageStartEventSchema, type ThinkingEndEvent, type ThinkingEndEventProps, ThinkingEndEventSchema, type ThinkingStartEvent, type ThinkingStartEventProps, ThinkingStartEventSchema, type ThinkingTextMessageContentEvent, type ThinkingTextMessageContentEventProps, ThinkingTextMessageContentEventSchema, type ThinkingTextMessageEndEvent, type ThinkingTextMessageEndEventProps, ThinkingTextMessageEndEventSchema, type ThinkingTextMessageStartEvent, type ThinkingTextMessageStartEventProps, ThinkingTextMessageStartEventSchema, type Tool, type ToolCall, type ToolCallArgsEvent, type ToolCallArgsEventProps, ToolCallArgsEventSchema, type ToolCallChunkEvent, type ToolCallChunkEventProps, ToolCallChunkEventSchema, type ToolCallEndEvent, type ToolCallEndEventProps, ToolCallEndEventSchema, type ToolCallResultEvent, type ToolCallResultEventProps, ToolCallResultEventSchema, ToolCallSchema, type ToolCallStartEvent, type ToolCallStartEventProps, ToolCallStartEventSchema, type ToolMessage, ToolMessageSchema, ToolSchema, type UserMessage, UserMessageSchema };