@openai/agents-core 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.js +3 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +1 -0
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/memory/memorySession.d.ts +22 -0
  7. package/dist/memory/memorySession.js +64 -0
  8. package/dist/memory/memorySession.js.map +1 -0
  9. package/dist/memory/memorySession.mjs +60 -0
  10. package/dist/memory/memorySession.mjs.map +1 -0
  11. package/dist/memory/session.d.ts +36 -0
  12. package/dist/memory/session.js +3 -0
  13. package/dist/memory/session.js.map +1 -0
  14. package/dist/memory/session.mjs +2 -0
  15. package/dist/memory/session.mjs.map +1 -0
  16. package/dist/metadata.js +2 -2
  17. package/dist/metadata.mjs +2 -2
  18. package/dist/run.d.ts +88 -8
  19. package/dist/run.js +859 -347
  20. package/dist/run.js.map +1 -1
  21. package/dist/run.mjs +859 -347
  22. package/dist/run.mjs.map +1 -1
  23. package/dist/runImplementation.d.ts +21 -2
  24. package/dist/runImplementation.js +885 -346
  25. package/dist/runImplementation.js.map +1 -1
  26. package/dist/runImplementation.mjs +877 -344
  27. package/dist/runImplementation.mjs.map +1 -1
  28. package/dist/runState.d.ts +1360 -226
  29. package/dist/runState.js +16 -0
  30. package/dist/runState.js.map +1 -1
  31. package/dist/runState.mjs +16 -0
  32. package/dist/runState.mjs.map +1 -1
  33. package/dist/types/protocol.d.ts +1869 -193
  34. package/dist/types/protocol.js +1 -0
  35. package/dist/types/protocol.js.map +1 -1
  36. package/dist/types/protocol.mjs +1 -0
  37. package/dist/types/protocol.mjs.map +1 -1
  38. package/dist/utils/smartString.d.ts +9 -0
  39. package/dist/utils/smartString.js +15 -0
  40. package/dist/utils/smartString.js.map +1 -1
  41. package/dist/utils/smartString.mjs +14 -3
  42. package/dist/utils/smartString.mjs.map +1 -1
  43. package/package.json +1 -1
@@ -3754,6 +3754,410 @@ export declare const OutputModelItem: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3754
3754
  * specific fields.
3755
3755
  */
3756
3756
  providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3757
+ } & {
3758
+ /**
3759
+ * An ID to identify the item. This is optional by default. If a model provider absolutely
3760
+ * requires this field, it will be validated on the model level.
3761
+ */
3762
+ id: z.ZodOptional<z.ZodString>;
3763
+ } & {
3764
+ type: z.ZodLiteral<"function_call_result">;
3765
+ /**
3766
+ * The name of the tool that was called
3767
+ */
3768
+ name: z.ZodString;
3769
+ /**
3770
+ * The ID of the tool call. Required to match up the respective tool call result.
3771
+ */
3772
+ callId: z.ZodString;
3773
+ /**
3774
+ * The status of the tool call.
3775
+ */
3776
+ status: z.ZodEnum<["in_progress", "completed", "incomplete"]>;
3777
+ /**
3778
+ * The output of the tool call.
3779
+ */
3780
+ output: z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3781
+ /**
3782
+ * Additional optional provider specific data. Used for custom functionality or model provider
3783
+ * specific fields.
3784
+ */
3785
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3786
+ } & {
3787
+ type: z.ZodLiteral<"text">;
3788
+ /**
3789
+ * The text output from the model.
3790
+ */
3791
+ text: z.ZodString;
3792
+ }, "strip", z.ZodTypeAny, {
3793
+ type: "text";
3794
+ text: string;
3795
+ providerData?: Record<string, any> | undefined;
3796
+ }, {
3797
+ type: "text";
3798
+ text: string;
3799
+ providerData?: Record<string, any> | undefined;
3800
+ }>, z.ZodObject<{
3801
+ /**
3802
+ * Additional optional provider specific data. Used for custom functionality or model provider
3803
+ * specific fields.
3804
+ */
3805
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3806
+ } & {
3807
+ type: z.ZodLiteral<"image">;
3808
+ /**
3809
+ * Inline image content or a reference to an uploaded file. Accepts a URL/data URL string or an
3810
+ * object describing the data/url/fileId source.
3811
+ */
3812
+ image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
3813
+ data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
3814
+ mediaType: z.ZodOptional<z.ZodString>;
3815
+ }, "strip", z.ZodTypeAny, {
3816
+ data: string | Uint8Array<ArrayBuffer>;
3817
+ mediaType?: string | undefined;
3818
+ }, {
3819
+ data: string | Uint8Array<ArrayBuffer>;
3820
+ mediaType?: string | undefined;
3821
+ }>, z.ZodObject<{
3822
+ url: z.ZodString;
3823
+ }, "strip", z.ZodTypeAny, {
3824
+ url: string;
3825
+ }, {
3826
+ url: string;
3827
+ }>, z.ZodObject<{
3828
+ fileId: z.ZodString;
3829
+ }, "strip", z.ZodTypeAny, {
3830
+ fileId: string;
3831
+ }, {
3832
+ fileId: string;
3833
+ }>]>]>>;
3834
+ /**
3835
+ * Controls the requested level of detail for vision models.
3836
+ * Use a string to avoid constraining future model capabilities.
3837
+ */
3838
+ detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), z.ZodTypeDef, "low" | "high" | "auto" | (string & {})>>;
3839
+ }, "strip", z.ZodTypeAny, {
3840
+ type: "image";
3841
+ providerData?: Record<string, any> | undefined;
3842
+ image?: string | {
3843
+ data: string | Uint8Array<ArrayBuffer>;
3844
+ mediaType?: string | undefined;
3845
+ } | {
3846
+ url: string;
3847
+ } | {
3848
+ fileId: string;
3849
+ } | undefined;
3850
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
3851
+ }, {
3852
+ type: "image";
3853
+ providerData?: Record<string, any> | undefined;
3854
+ image?: string | {
3855
+ data: string | Uint8Array<ArrayBuffer>;
3856
+ mediaType?: string | undefined;
3857
+ } | {
3858
+ url: string;
3859
+ } | {
3860
+ fileId: string;
3861
+ } | undefined;
3862
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
3863
+ }>, z.ZodObject<{
3864
+ /**
3865
+ * Additional optional provider specific data. Used for custom functionality or model provider
3866
+ * specific fields.
3867
+ */
3868
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3869
+ } & {
3870
+ type: z.ZodLiteral<"file">;
3871
+ /**
3872
+ * File output reference. Provide either a string (data URL / base64), a data object (requires
3873
+ * mediaType + filename), or an object pointing to an uploaded file/URL.
3874
+ */
3875
+ file: z.ZodUnion<[z.ZodString, z.ZodObject<{
3876
+ data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
3877
+ mediaType: z.ZodString;
3878
+ filename: z.ZodString;
3879
+ }, "strip", z.ZodTypeAny, {
3880
+ filename: string;
3881
+ data: string | Uint8Array<ArrayBuffer>;
3882
+ mediaType: string;
3883
+ }, {
3884
+ filename: string;
3885
+ data: string | Uint8Array<ArrayBuffer>;
3886
+ mediaType: string;
3887
+ }>, z.ZodObject<{
3888
+ url: z.ZodString;
3889
+ filename: z.ZodOptional<z.ZodString>;
3890
+ }, "strip", z.ZodTypeAny, {
3891
+ url: string;
3892
+ filename?: string | undefined;
3893
+ }, {
3894
+ url: string;
3895
+ filename?: string | undefined;
3896
+ }>, z.ZodObject<{
3897
+ id: z.ZodString;
3898
+ filename: z.ZodOptional<z.ZodString>;
3899
+ }, "strip", z.ZodTypeAny, {
3900
+ id: string;
3901
+ filename?: string | undefined;
3902
+ }, {
3903
+ id: string;
3904
+ filename?: string | undefined;
3905
+ }>]>;
3906
+ }, "strip", z.ZodTypeAny, {
3907
+ type: "file";
3908
+ file: string | {
3909
+ filename: string;
3910
+ data: string | Uint8Array<ArrayBuffer>;
3911
+ mediaType: string;
3912
+ } | {
3913
+ url: string;
3914
+ filename?: string | undefined;
3915
+ } | {
3916
+ id: string;
3917
+ filename?: string | undefined;
3918
+ };
3919
+ providerData?: Record<string, any> | undefined;
3920
+ }, {
3921
+ type: "file";
3922
+ file: string | {
3923
+ filename: string;
3924
+ data: string | Uint8Array<ArrayBuffer>;
3925
+ mediaType: string;
3926
+ } | {
3927
+ url: string;
3928
+ filename?: string | undefined;
3929
+ } | {
3930
+ id: string;
3931
+ filename?: string | undefined;
3932
+ };
3933
+ providerData?: Record<string, any> | undefined;
3934
+ }>]>, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3935
+ /**
3936
+ * Additional optional provider specific data. Used for custom functionality or model provider
3937
+ * specific fields.
3938
+ */
3939
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3940
+ } & {
3941
+ type: z.ZodLiteral<"input_text">;
3942
+ /**
3943
+ * A text input for example a message from a user
3944
+ */
3945
+ text: z.ZodString;
3946
+ }, "strip", z.ZodTypeAny, {
3947
+ type: "input_text";
3948
+ text: string;
3949
+ providerData?: Record<string, any> | undefined;
3950
+ }, {
3951
+ type: "input_text";
3952
+ text: string;
3953
+ providerData?: Record<string, any> | undefined;
3954
+ }>, z.ZodObject<{
3955
+ /**
3956
+ * Additional optional provider specific data. Used for custom functionality or model provider
3957
+ * specific fields.
3958
+ */
3959
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3960
+ } & {
3961
+ type: z.ZodLiteral<"input_image">;
3962
+ /**
3963
+ * The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
3964
+ * previously uploaded OpenAI file.
3965
+ */
3966
+ image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
3967
+ id: z.ZodString;
3968
+ }, "strip", z.ZodTypeAny, {
3969
+ id: string;
3970
+ }, {
3971
+ id: string;
3972
+ }>]>>;
3973
+ /**
3974
+ * Controls the level of detail requested for image understanding tasks.
3975
+ * Future models may add new values, therefore this accepts any string.
3976
+ */
3977
+ detail: z.ZodOptional<z.ZodString>;
3978
+ }, "strip", z.ZodTypeAny, {
3979
+ type: "input_image";
3980
+ providerData?: Record<string, any> | undefined;
3981
+ image?: string | {
3982
+ id: string;
3983
+ } | undefined;
3984
+ detail?: string | undefined;
3985
+ }, {
3986
+ type: "input_image";
3987
+ providerData?: Record<string, any> | undefined;
3988
+ image?: string | {
3989
+ id: string;
3990
+ } | undefined;
3991
+ detail?: string | undefined;
3992
+ }>, z.ZodObject<{
3993
+ /**
3994
+ * Additional optional provider specific data. Used for custom functionality or model provider
3995
+ * specific fields.
3996
+ */
3997
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3998
+ } & {
3999
+ type: z.ZodLiteral<"input_file">;
4000
+ /**
4001
+ * The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
4002
+ */
4003
+ file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
4004
+ id: z.ZodString;
4005
+ }, "strip", z.ZodTypeAny, {
4006
+ id: string;
4007
+ }, {
4008
+ id: string;
4009
+ }>]>, z.ZodObject<{
4010
+ url: z.ZodString;
4011
+ }, "strip", z.ZodTypeAny, {
4012
+ url: string;
4013
+ }, {
4014
+ url: string;
4015
+ }>]>>;
4016
+ /**
4017
+ * Optional filename metadata when uploading file data inline.
4018
+ */
4019
+ filename: z.ZodOptional<z.ZodString>;
4020
+ }, "strip", z.ZodTypeAny, {
4021
+ type: "input_file";
4022
+ providerData?: Record<string, any> | undefined;
4023
+ file?: string | {
4024
+ id: string;
4025
+ } | {
4026
+ url: string;
4027
+ } | undefined;
4028
+ filename?: string | undefined;
4029
+ }, {
4030
+ type: "input_file";
4031
+ providerData?: Record<string, any> | undefined;
4032
+ file?: string | {
4033
+ id: string;
4034
+ } | {
4035
+ url: string;
4036
+ } | undefined;
4037
+ filename?: string | undefined;
4038
+ }>]>, "many">]>;
4039
+ }, "strip", z.ZodTypeAny, {
4040
+ type: "function_call_result";
4041
+ status: "in_progress" | "completed" | "incomplete";
4042
+ name: string;
4043
+ output: string | {
4044
+ type: "text";
4045
+ text: string;
4046
+ providerData?: Record<string, any> | undefined;
4047
+ } | {
4048
+ type: "image";
4049
+ providerData?: Record<string, any> | undefined;
4050
+ image?: string | {
4051
+ data: string | Uint8Array<ArrayBuffer>;
4052
+ mediaType?: string | undefined;
4053
+ } | {
4054
+ url: string;
4055
+ } | {
4056
+ fileId: string;
4057
+ } | undefined;
4058
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
4059
+ } | {
4060
+ type: "file";
4061
+ file: string | {
4062
+ filename: string;
4063
+ data: string | Uint8Array<ArrayBuffer>;
4064
+ mediaType: string;
4065
+ } | {
4066
+ url: string;
4067
+ filename?: string | undefined;
4068
+ } | {
4069
+ id: string;
4070
+ filename?: string | undefined;
4071
+ };
4072
+ providerData?: Record<string, any> | undefined;
4073
+ } | ({
4074
+ type: "input_text";
4075
+ text: string;
4076
+ providerData?: Record<string, any> | undefined;
4077
+ } | {
4078
+ type: "input_image";
4079
+ providerData?: Record<string, any> | undefined;
4080
+ image?: string | {
4081
+ id: string;
4082
+ } | undefined;
4083
+ detail?: string | undefined;
4084
+ } | {
4085
+ type: "input_file";
4086
+ providerData?: Record<string, any> | undefined;
4087
+ file?: string | {
4088
+ id: string;
4089
+ } | {
4090
+ url: string;
4091
+ } | undefined;
4092
+ filename?: string | undefined;
4093
+ })[];
4094
+ callId: string;
4095
+ providerData?: Record<string, any> | undefined;
4096
+ id?: string | undefined;
4097
+ }, {
4098
+ type: "function_call_result";
4099
+ status: "in_progress" | "completed" | "incomplete";
4100
+ name: string;
4101
+ output: string | {
4102
+ type: "text";
4103
+ text: string;
4104
+ providerData?: Record<string, any> | undefined;
4105
+ } | {
4106
+ type: "image";
4107
+ providerData?: Record<string, any> | undefined;
4108
+ image?: string | {
4109
+ data: string | Uint8Array<ArrayBuffer>;
4110
+ mediaType?: string | undefined;
4111
+ } | {
4112
+ url: string;
4113
+ } | {
4114
+ fileId: string;
4115
+ } | undefined;
4116
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
4117
+ } | {
4118
+ type: "file";
4119
+ file: string | {
4120
+ filename: string;
4121
+ data: string | Uint8Array<ArrayBuffer>;
4122
+ mediaType: string;
4123
+ } | {
4124
+ url: string;
4125
+ filename?: string | undefined;
4126
+ } | {
4127
+ id: string;
4128
+ filename?: string | undefined;
4129
+ };
4130
+ providerData?: Record<string, any> | undefined;
4131
+ } | ({
4132
+ type: "input_text";
4133
+ text: string;
4134
+ providerData?: Record<string, any> | undefined;
4135
+ } | {
4136
+ type: "input_image";
4137
+ providerData?: Record<string, any> | undefined;
4138
+ image?: string | {
4139
+ id: string;
4140
+ } | undefined;
4141
+ detail?: string | undefined;
4142
+ } | {
4143
+ type: "input_file";
4144
+ providerData?: Record<string, any> | undefined;
4145
+ file?: string | {
4146
+ id: string;
4147
+ } | {
4148
+ url: string;
4149
+ } | undefined;
4150
+ filename?: string | undefined;
4151
+ })[];
4152
+ callId: string;
4153
+ providerData?: Record<string, any> | undefined;
4154
+ id?: string | undefined;
4155
+ }>, z.ZodObject<{
4156
+ /**
4157
+ * Additional optional provider specific data. Used for custom functionality or model provider
4158
+ * specific fields.
4159
+ */
4160
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3757
4161
  } & {
3758
4162
  id: z.ZodOptional<z.ZodString>;
3759
4163
  type: z.ZodLiteral<"reasoning">;
@@ -5703,129 +6107,533 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
5703
6107
  x: z.ZodNumber;
5704
6108
  y: z.ZodNumber;
5705
6109
  }, "strip", z.ZodTypeAny, {
5706
- type: "move";
5707
- x: number;
5708
- y: number;
6110
+ type: "move";
6111
+ x: number;
6112
+ y: number;
6113
+ }, {
6114
+ type: "move";
6115
+ x: number;
6116
+ y: number;
6117
+ }>, z.ZodObject<{
6118
+ type: z.ZodLiteral<"keypress">;
6119
+ keys: z.ZodArray<z.ZodString, "many">;
6120
+ }, "strip", z.ZodTypeAny, {
6121
+ keys: string[];
6122
+ type: "keypress";
6123
+ }, {
6124
+ keys: string[];
6125
+ type: "keypress";
6126
+ }>, z.ZodObject<{
6127
+ type: z.ZodLiteral<"drag">;
6128
+ path: z.ZodArray<z.ZodObject<{
6129
+ x: z.ZodNumber;
6130
+ y: z.ZodNumber;
6131
+ }, "strip", z.ZodTypeAny, {
6132
+ x: number;
6133
+ y: number;
6134
+ }, {
6135
+ x: number;
6136
+ y: number;
6137
+ }>, "many">;
6138
+ }, "strip", z.ZodTypeAny, {
6139
+ path: {
6140
+ x: number;
6141
+ y: number;
6142
+ }[];
6143
+ type: "drag";
6144
+ }, {
6145
+ path: {
6146
+ x: number;
6147
+ y: number;
6148
+ }[];
6149
+ type: "drag";
6150
+ }>]>;
6151
+ }, "strip", z.ZodTypeAny, {
6152
+ type: "computer_call";
6153
+ status: "in_progress" | "completed" | "incomplete";
6154
+ callId: string;
6155
+ action: {
6156
+ type: "screenshot";
6157
+ } | {
6158
+ type: "click";
6159
+ x: number;
6160
+ y: number;
6161
+ button: "left" | "right" | "wheel" | "back" | "forward";
6162
+ } | {
6163
+ type: "double_click";
6164
+ x: number;
6165
+ y: number;
6166
+ } | {
6167
+ type: "scroll";
6168
+ x: number;
6169
+ y: number;
6170
+ scroll_x: number;
6171
+ scroll_y: number;
6172
+ } | {
6173
+ type: "type";
6174
+ text: string;
6175
+ } | {
6176
+ type: "wait";
6177
+ } | {
6178
+ type: "move";
6179
+ x: number;
6180
+ y: number;
6181
+ } | {
6182
+ keys: string[];
6183
+ type: "keypress";
6184
+ } | {
6185
+ path: {
6186
+ x: number;
6187
+ y: number;
6188
+ }[];
6189
+ type: "drag";
6190
+ };
6191
+ providerData?: Record<string, any> | undefined;
6192
+ id?: string | undefined;
6193
+ }, {
6194
+ type: "computer_call";
6195
+ status: "in_progress" | "completed" | "incomplete";
6196
+ callId: string;
6197
+ action: {
6198
+ type: "screenshot";
6199
+ } | {
6200
+ type: "click";
6201
+ x: number;
6202
+ y: number;
6203
+ button: "left" | "right" | "wheel" | "back" | "forward";
6204
+ } | {
6205
+ type: "double_click";
6206
+ x: number;
6207
+ y: number;
6208
+ } | {
6209
+ type: "scroll";
6210
+ x: number;
6211
+ y: number;
6212
+ scroll_x: number;
6213
+ scroll_y: number;
6214
+ } | {
6215
+ type: "type";
6216
+ text: string;
6217
+ } | {
6218
+ type: "wait";
6219
+ } | {
6220
+ type: "move";
6221
+ x: number;
6222
+ y: number;
6223
+ } | {
6224
+ keys: string[];
6225
+ type: "keypress";
6226
+ } | {
6227
+ path: {
6228
+ x: number;
6229
+ y: number;
6230
+ }[];
6231
+ type: "drag";
6232
+ };
6233
+ providerData?: Record<string, any> | undefined;
6234
+ id?: string | undefined;
6235
+ }>, z.ZodObject<{
6236
+ /**
6237
+ * Additional optional provider specific data. Used for custom functionality or model provider
6238
+ * specific fields.
6239
+ */
6240
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6241
+ } & {
6242
+ /**
6243
+ * An ID to identify the item. This is optional by default. If a model provider absolutely
6244
+ * requires this field, it will be validated on the model level.
6245
+ */
6246
+ id: z.ZodOptional<z.ZodString>;
6247
+ } & {
6248
+ type: z.ZodLiteral<"function_call_result">;
6249
+ /**
6250
+ * The name of the tool that was called
6251
+ */
6252
+ name: z.ZodString;
6253
+ /**
6254
+ * The ID of the tool call. Required to match up the respective tool call result.
6255
+ */
6256
+ callId: z.ZodString;
6257
+ /**
6258
+ * The status of the tool call.
6259
+ */
6260
+ status: z.ZodEnum<["in_progress", "completed", "incomplete"]>;
6261
+ /**
6262
+ * The output of the tool call.
6263
+ */
6264
+ output: z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6265
+ /**
6266
+ * Additional optional provider specific data. Used for custom functionality or model provider
6267
+ * specific fields.
6268
+ */
6269
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6270
+ } & {
6271
+ type: z.ZodLiteral<"text">;
6272
+ /**
6273
+ * The text output from the model.
6274
+ */
6275
+ text: z.ZodString;
6276
+ }, "strip", z.ZodTypeAny, {
6277
+ type: "text";
6278
+ text: string;
6279
+ providerData?: Record<string, any> | undefined;
6280
+ }, {
6281
+ type: "text";
6282
+ text: string;
6283
+ providerData?: Record<string, any> | undefined;
6284
+ }>, z.ZodObject<{
6285
+ /**
6286
+ * Additional optional provider specific data. Used for custom functionality or model provider
6287
+ * specific fields.
6288
+ */
6289
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6290
+ } & {
6291
+ type: z.ZodLiteral<"image">;
6292
+ /**
6293
+ * Inline image content or a reference to an uploaded file. Accepts a URL/data URL string or an
6294
+ * object describing the data/url/fileId source.
6295
+ */
6296
+ image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
6297
+ data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
6298
+ mediaType: z.ZodOptional<z.ZodString>;
6299
+ }, "strip", z.ZodTypeAny, {
6300
+ data: string | Uint8Array<ArrayBuffer>;
6301
+ mediaType?: string | undefined;
6302
+ }, {
6303
+ data: string | Uint8Array<ArrayBuffer>;
6304
+ mediaType?: string | undefined;
6305
+ }>, z.ZodObject<{
6306
+ url: z.ZodString;
6307
+ }, "strip", z.ZodTypeAny, {
6308
+ url: string;
6309
+ }, {
6310
+ url: string;
6311
+ }>, z.ZodObject<{
6312
+ fileId: z.ZodString;
6313
+ }, "strip", z.ZodTypeAny, {
6314
+ fileId: string;
6315
+ }, {
6316
+ fileId: string;
6317
+ }>]>]>>;
6318
+ /**
6319
+ * Controls the requested level of detail for vision models.
6320
+ * Use a string to avoid constraining future model capabilities.
6321
+ */
6322
+ detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), z.ZodTypeDef, "low" | "high" | "auto" | (string & {})>>;
6323
+ }, "strip", z.ZodTypeAny, {
6324
+ type: "image";
6325
+ providerData?: Record<string, any> | undefined;
6326
+ image?: string | {
6327
+ data: string | Uint8Array<ArrayBuffer>;
6328
+ mediaType?: string | undefined;
6329
+ } | {
6330
+ url: string;
6331
+ } | {
6332
+ fileId: string;
6333
+ } | undefined;
6334
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
6335
+ }, {
6336
+ type: "image";
6337
+ providerData?: Record<string, any> | undefined;
6338
+ image?: string | {
6339
+ data: string | Uint8Array<ArrayBuffer>;
6340
+ mediaType?: string | undefined;
6341
+ } | {
6342
+ url: string;
6343
+ } | {
6344
+ fileId: string;
6345
+ } | undefined;
6346
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
6347
+ }>, z.ZodObject<{
6348
+ /**
6349
+ * Additional optional provider specific data. Used for custom functionality or model provider
6350
+ * specific fields.
6351
+ */
6352
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6353
+ } & {
6354
+ type: z.ZodLiteral<"file">;
6355
+ /**
6356
+ * File output reference. Provide either a string (data URL / base64), a data object (requires
6357
+ * mediaType + filename), or an object pointing to an uploaded file/URL.
6358
+ */
6359
+ file: z.ZodUnion<[z.ZodString, z.ZodObject<{
6360
+ data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
6361
+ mediaType: z.ZodString;
6362
+ filename: z.ZodString;
6363
+ }, "strip", z.ZodTypeAny, {
6364
+ filename: string;
6365
+ data: string | Uint8Array<ArrayBuffer>;
6366
+ mediaType: string;
6367
+ }, {
6368
+ filename: string;
6369
+ data: string | Uint8Array<ArrayBuffer>;
6370
+ mediaType: string;
6371
+ }>, z.ZodObject<{
6372
+ url: z.ZodString;
6373
+ filename: z.ZodOptional<z.ZodString>;
6374
+ }, "strip", z.ZodTypeAny, {
6375
+ url: string;
6376
+ filename?: string | undefined;
6377
+ }, {
6378
+ url: string;
6379
+ filename?: string | undefined;
6380
+ }>, z.ZodObject<{
6381
+ id: z.ZodString;
6382
+ filename: z.ZodOptional<z.ZodString>;
6383
+ }, "strip", z.ZodTypeAny, {
6384
+ id: string;
6385
+ filename?: string | undefined;
6386
+ }, {
6387
+ id: string;
6388
+ filename?: string | undefined;
6389
+ }>]>;
6390
+ }, "strip", z.ZodTypeAny, {
6391
+ type: "file";
6392
+ file: string | {
6393
+ filename: string;
6394
+ data: string | Uint8Array<ArrayBuffer>;
6395
+ mediaType: string;
6396
+ } | {
6397
+ url: string;
6398
+ filename?: string | undefined;
6399
+ } | {
6400
+ id: string;
6401
+ filename?: string | undefined;
6402
+ };
6403
+ providerData?: Record<string, any> | undefined;
6404
+ }, {
6405
+ type: "file";
6406
+ file: string | {
6407
+ filename: string;
6408
+ data: string | Uint8Array<ArrayBuffer>;
6409
+ mediaType: string;
6410
+ } | {
6411
+ url: string;
6412
+ filename?: string | undefined;
6413
+ } | {
6414
+ id: string;
6415
+ filename?: string | undefined;
6416
+ };
6417
+ providerData?: Record<string, any> | undefined;
6418
+ }>]>, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6419
+ /**
6420
+ * Additional optional provider specific data. Used for custom functionality or model provider
6421
+ * specific fields.
6422
+ */
6423
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6424
+ } & {
6425
+ type: z.ZodLiteral<"input_text">;
6426
+ /**
6427
+ * A text input for example a message from a user
6428
+ */
6429
+ text: z.ZodString;
6430
+ }, "strip", z.ZodTypeAny, {
6431
+ type: "input_text";
6432
+ text: string;
6433
+ providerData?: Record<string, any> | undefined;
5709
6434
  }, {
5710
- type: "move";
5711
- x: number;
5712
- y: number;
6435
+ type: "input_text";
6436
+ text: string;
6437
+ providerData?: Record<string, any> | undefined;
5713
6438
  }>, z.ZodObject<{
5714
- type: z.ZodLiteral<"keypress">;
5715
- keys: z.ZodArray<z.ZodString, "many">;
6439
+ /**
6440
+ * Additional optional provider specific data. Used for custom functionality or model provider
6441
+ * specific fields.
6442
+ */
6443
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6444
+ } & {
6445
+ type: z.ZodLiteral<"input_image">;
6446
+ /**
6447
+ * The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
6448
+ * previously uploaded OpenAI file.
6449
+ */
6450
+ image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
6451
+ id: z.ZodString;
6452
+ }, "strip", z.ZodTypeAny, {
6453
+ id: string;
6454
+ }, {
6455
+ id: string;
6456
+ }>]>>;
6457
+ /**
6458
+ * Controls the level of detail requested for image understanding tasks.
6459
+ * Future models may add new values, therefore this accepts any string.
6460
+ */
6461
+ detail: z.ZodOptional<z.ZodString>;
5716
6462
  }, "strip", z.ZodTypeAny, {
5717
- keys: string[];
5718
- type: "keypress";
6463
+ type: "input_image";
6464
+ providerData?: Record<string, any> | undefined;
6465
+ image?: string | {
6466
+ id: string;
6467
+ } | undefined;
6468
+ detail?: string | undefined;
5719
6469
  }, {
5720
- keys: string[];
5721
- type: "keypress";
6470
+ type: "input_image";
6471
+ providerData?: Record<string, any> | undefined;
6472
+ image?: string | {
6473
+ id: string;
6474
+ } | undefined;
6475
+ detail?: string | undefined;
5722
6476
  }>, z.ZodObject<{
5723
- type: z.ZodLiteral<"drag">;
5724
- path: z.ZodArray<z.ZodObject<{
5725
- x: z.ZodNumber;
5726
- y: z.ZodNumber;
6477
+ /**
6478
+ * Additional optional provider specific data. Used for custom functionality or model provider
6479
+ * specific fields.
6480
+ */
6481
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6482
+ } & {
6483
+ type: z.ZodLiteral<"input_file">;
6484
+ /**
6485
+ * The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
6486
+ */
6487
+ file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
6488
+ id: z.ZodString;
5727
6489
  }, "strip", z.ZodTypeAny, {
5728
- x: number;
5729
- y: number;
6490
+ id: string;
5730
6491
  }, {
5731
- x: number;
5732
- y: number;
5733
- }>, "many">;
6492
+ id: string;
6493
+ }>]>, z.ZodObject<{
6494
+ url: z.ZodString;
6495
+ }, "strip", z.ZodTypeAny, {
6496
+ url: string;
6497
+ }, {
6498
+ url: string;
6499
+ }>]>>;
6500
+ /**
6501
+ * Optional filename metadata when uploading file data inline.
6502
+ */
6503
+ filename: z.ZodOptional<z.ZodString>;
5734
6504
  }, "strip", z.ZodTypeAny, {
5735
- path: {
5736
- x: number;
5737
- y: number;
5738
- }[];
5739
- type: "drag";
6505
+ type: "input_file";
6506
+ providerData?: Record<string, any> | undefined;
6507
+ file?: string | {
6508
+ id: string;
6509
+ } | {
6510
+ url: string;
6511
+ } | undefined;
6512
+ filename?: string | undefined;
5740
6513
  }, {
5741
- path: {
5742
- x: number;
5743
- y: number;
5744
- }[];
5745
- type: "drag";
5746
- }>]>;
6514
+ type: "input_file";
6515
+ providerData?: Record<string, any> | undefined;
6516
+ file?: string | {
6517
+ id: string;
6518
+ } | {
6519
+ url: string;
6520
+ } | undefined;
6521
+ filename?: string | undefined;
6522
+ }>]>, "many">]>;
5747
6523
  }, "strip", z.ZodTypeAny, {
5748
- type: "computer_call";
6524
+ type: "function_call_result";
5749
6525
  status: "in_progress" | "completed" | "incomplete";
5750
- callId: string;
5751
- action: {
5752
- type: "screenshot";
5753
- } | {
5754
- type: "click";
5755
- x: number;
5756
- y: number;
5757
- button: "left" | "right" | "wheel" | "back" | "forward";
5758
- } | {
5759
- type: "double_click";
5760
- x: number;
5761
- y: number;
5762
- } | {
5763
- type: "scroll";
5764
- x: number;
5765
- y: number;
5766
- scroll_x: number;
5767
- scroll_y: number;
5768
- } | {
5769
- type: "type";
6526
+ name: string;
6527
+ output: string | {
6528
+ type: "text";
5770
6529
  text: string;
6530
+ providerData?: Record<string, any> | undefined;
5771
6531
  } | {
5772
- type: "wait";
5773
- } | {
5774
- type: "move";
5775
- x: number;
5776
- y: number;
6532
+ type: "image";
6533
+ providerData?: Record<string, any> | undefined;
6534
+ image?: string | {
6535
+ data: string | Uint8Array<ArrayBuffer>;
6536
+ mediaType?: string | undefined;
6537
+ } | {
6538
+ url: string;
6539
+ } | {
6540
+ fileId: string;
6541
+ } | undefined;
6542
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
6543
+ } | {
6544
+ type: "file";
6545
+ file: string | {
6546
+ filename: string;
6547
+ data: string | Uint8Array<ArrayBuffer>;
6548
+ mediaType: string;
6549
+ } | {
6550
+ url: string;
6551
+ filename?: string | undefined;
6552
+ } | {
6553
+ id: string;
6554
+ filename?: string | undefined;
6555
+ };
6556
+ providerData?: Record<string, any> | undefined;
6557
+ } | ({
6558
+ type: "input_text";
6559
+ text: string;
6560
+ providerData?: Record<string, any> | undefined;
5777
6561
  } | {
5778
- keys: string[];
5779
- type: "keypress";
6562
+ type: "input_image";
6563
+ providerData?: Record<string, any> | undefined;
6564
+ image?: string | {
6565
+ id: string;
6566
+ } | undefined;
6567
+ detail?: string | undefined;
5780
6568
  } | {
5781
- path: {
5782
- x: number;
5783
- y: number;
5784
- }[];
5785
- type: "drag";
5786
- };
6569
+ type: "input_file";
6570
+ providerData?: Record<string, any> | undefined;
6571
+ file?: string | {
6572
+ id: string;
6573
+ } | {
6574
+ url: string;
6575
+ } | undefined;
6576
+ filename?: string | undefined;
6577
+ })[];
6578
+ callId: string;
5787
6579
  providerData?: Record<string, any> | undefined;
5788
6580
  id?: string | undefined;
5789
6581
  }, {
5790
- type: "computer_call";
6582
+ type: "function_call_result";
5791
6583
  status: "in_progress" | "completed" | "incomplete";
5792
- callId: string;
5793
- action: {
5794
- type: "screenshot";
5795
- } | {
5796
- type: "click";
5797
- x: number;
5798
- y: number;
5799
- button: "left" | "right" | "wheel" | "back" | "forward";
5800
- } | {
5801
- type: "double_click";
5802
- x: number;
5803
- y: number;
5804
- } | {
5805
- type: "scroll";
5806
- x: number;
5807
- y: number;
5808
- scroll_x: number;
5809
- scroll_y: number;
5810
- } | {
5811
- type: "type";
6584
+ name: string;
6585
+ output: string | {
6586
+ type: "text";
5812
6587
  text: string;
6588
+ providerData?: Record<string, any> | undefined;
5813
6589
  } | {
5814
- type: "wait";
5815
- } | {
5816
- type: "move";
5817
- x: number;
5818
- y: number;
6590
+ type: "image";
6591
+ providerData?: Record<string, any> | undefined;
6592
+ image?: string | {
6593
+ data: string | Uint8Array<ArrayBuffer>;
6594
+ mediaType?: string | undefined;
6595
+ } | {
6596
+ url: string;
6597
+ } | {
6598
+ fileId: string;
6599
+ } | undefined;
6600
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
6601
+ } | {
6602
+ type: "file";
6603
+ file: string | {
6604
+ filename: string;
6605
+ data: string | Uint8Array<ArrayBuffer>;
6606
+ mediaType: string;
6607
+ } | {
6608
+ url: string;
6609
+ filename?: string | undefined;
6610
+ } | {
6611
+ id: string;
6612
+ filename?: string | undefined;
6613
+ };
6614
+ providerData?: Record<string, any> | undefined;
6615
+ } | ({
6616
+ type: "input_text";
6617
+ text: string;
6618
+ providerData?: Record<string, any> | undefined;
5819
6619
  } | {
5820
- keys: string[];
5821
- type: "keypress";
6620
+ type: "input_image";
6621
+ providerData?: Record<string, any> | undefined;
6622
+ image?: string | {
6623
+ id: string;
6624
+ } | undefined;
6625
+ detail?: string | undefined;
5822
6626
  } | {
5823
- path: {
5824
- x: number;
5825
- y: number;
5826
- }[];
5827
- type: "drag";
5828
- };
6627
+ type: "input_file";
6628
+ providerData?: Record<string, any> | undefined;
6629
+ file?: string | {
6630
+ id: string;
6631
+ } | {
6632
+ url: string;
6633
+ } | undefined;
6634
+ filename?: string | undefined;
6635
+ })[];
6636
+ callId: string;
5829
6637
  providerData?: Record<string, any> | undefined;
5830
6638
  id?: string | undefined;
5831
6639
  }>, z.ZodObject<{
@@ -5981,6 +6789,64 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
5981
6789
  status?: "in_progress" | "completed" | "incomplete" | undefined;
5982
6790
  providerData?: Record<string, any> | undefined;
5983
6791
  id?: string | undefined;
6792
+ } | {
6793
+ type: "function_call_result";
6794
+ status: "in_progress" | "completed" | "incomplete";
6795
+ name: string;
6796
+ output: string | {
6797
+ type: "text";
6798
+ text: string;
6799
+ providerData?: Record<string, any> | undefined;
6800
+ } | {
6801
+ type: "image";
6802
+ providerData?: Record<string, any> | undefined;
6803
+ image?: string | {
6804
+ data: string | Uint8Array<ArrayBuffer>;
6805
+ mediaType?: string | undefined;
6806
+ } | {
6807
+ url: string;
6808
+ } | {
6809
+ fileId: string;
6810
+ } | undefined;
6811
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
6812
+ } | {
6813
+ type: "file";
6814
+ file: string | {
6815
+ filename: string;
6816
+ data: string | Uint8Array<ArrayBuffer>;
6817
+ mediaType: string;
6818
+ } | {
6819
+ url: string;
6820
+ filename?: string | undefined;
6821
+ } | {
6822
+ id: string;
6823
+ filename?: string | undefined;
6824
+ };
6825
+ providerData?: Record<string, any> | undefined;
6826
+ } | ({
6827
+ type: "input_text";
6828
+ text: string;
6829
+ providerData?: Record<string, any> | undefined;
6830
+ } | {
6831
+ type: "input_image";
6832
+ providerData?: Record<string, any> | undefined;
6833
+ image?: string | {
6834
+ id: string;
6835
+ } | undefined;
6836
+ detail?: string | undefined;
6837
+ } | {
6838
+ type: "input_file";
6839
+ providerData?: Record<string, any> | undefined;
6840
+ file?: string | {
6841
+ id: string;
6842
+ } | {
6843
+ url: string;
6844
+ } | undefined;
6845
+ filename?: string | undefined;
6846
+ })[];
6847
+ callId: string;
6848
+ providerData?: Record<string, any> | undefined;
6849
+ id?: string | undefined;
5984
6850
  } | {
5985
6851
  type: "computer_call";
5986
6852
  status: "in_progress" | "completed" | "incomplete";
@@ -6096,6 +6962,64 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
6096
6962
  status?: "in_progress" | "completed" | "incomplete" | undefined;
6097
6963
  providerData?: Record<string, any> | undefined;
6098
6964
  id?: string | undefined;
6965
+ } | {
6966
+ type: "function_call_result";
6967
+ status: "in_progress" | "completed" | "incomplete";
6968
+ name: string;
6969
+ output: string | {
6970
+ type: "text";
6971
+ text: string;
6972
+ providerData?: Record<string, any> | undefined;
6973
+ } | {
6974
+ type: "image";
6975
+ providerData?: Record<string, any> | undefined;
6976
+ image?: string | {
6977
+ data: string | Uint8Array<ArrayBuffer>;
6978
+ mediaType?: string | undefined;
6979
+ } | {
6980
+ url: string;
6981
+ } | {
6982
+ fileId: string;
6983
+ } | undefined;
6984
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
6985
+ } | {
6986
+ type: "file";
6987
+ file: string | {
6988
+ filename: string;
6989
+ data: string | Uint8Array<ArrayBuffer>;
6990
+ mediaType: string;
6991
+ } | {
6992
+ url: string;
6993
+ filename?: string | undefined;
6994
+ } | {
6995
+ id: string;
6996
+ filename?: string | undefined;
6997
+ };
6998
+ providerData?: Record<string, any> | undefined;
6999
+ } | ({
7000
+ type: "input_text";
7001
+ text: string;
7002
+ providerData?: Record<string, any> | undefined;
7003
+ } | {
7004
+ type: "input_image";
7005
+ providerData?: Record<string, any> | undefined;
7006
+ image?: string | {
7007
+ id: string;
7008
+ } | undefined;
7009
+ detail?: string | undefined;
7010
+ } | {
7011
+ type: "input_file";
7012
+ providerData?: Record<string, any> | undefined;
7013
+ file?: string | {
7014
+ id: string;
7015
+ } | {
7016
+ url: string;
7017
+ } | undefined;
7018
+ filename?: string | undefined;
7019
+ })[];
7020
+ callId: string;
7021
+ providerData?: Record<string, any> | undefined;
7022
+ id?: string | undefined;
6099
7023
  } | {
6100
7024
  type: "computer_call";
6101
7025
  status: "in_progress" | "completed" | "incomplete";
@@ -6211,7 +7135,65 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
6211
7135
  name: string;
6212
7136
  arguments: string;
6213
7137
  callId: string;
6214
- status?: "in_progress" | "completed" | "incomplete" | undefined;
7138
+ status?: "in_progress" | "completed" | "incomplete" | undefined;
7139
+ providerData?: Record<string, any> | undefined;
7140
+ id?: string | undefined;
7141
+ } | {
7142
+ type: "function_call_result";
7143
+ status: "in_progress" | "completed" | "incomplete";
7144
+ name: string;
7145
+ output: string | {
7146
+ type: "text";
7147
+ text: string;
7148
+ providerData?: Record<string, any> | undefined;
7149
+ } | {
7150
+ type: "image";
7151
+ providerData?: Record<string, any> | undefined;
7152
+ image?: string | {
7153
+ data: string | Uint8Array<ArrayBuffer>;
7154
+ mediaType?: string | undefined;
7155
+ } | {
7156
+ url: string;
7157
+ } | {
7158
+ fileId: string;
7159
+ } | undefined;
7160
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
7161
+ } | {
7162
+ type: "file";
7163
+ file: string | {
7164
+ filename: string;
7165
+ data: string | Uint8Array<ArrayBuffer>;
7166
+ mediaType: string;
7167
+ } | {
7168
+ url: string;
7169
+ filename?: string | undefined;
7170
+ } | {
7171
+ id: string;
7172
+ filename?: string | undefined;
7173
+ };
7174
+ providerData?: Record<string, any> | undefined;
7175
+ } | ({
7176
+ type: "input_text";
7177
+ text: string;
7178
+ providerData?: Record<string, any> | undefined;
7179
+ } | {
7180
+ type: "input_image";
7181
+ providerData?: Record<string, any> | undefined;
7182
+ image?: string | {
7183
+ id: string;
7184
+ } | undefined;
7185
+ detail?: string | undefined;
7186
+ } | {
7187
+ type: "input_file";
7188
+ providerData?: Record<string, any> | undefined;
7189
+ file?: string | {
7190
+ id: string;
7191
+ } | {
7192
+ url: string;
7193
+ } | undefined;
7194
+ filename?: string | undefined;
7195
+ })[];
7196
+ callId: string;
6215
7197
  providerData?: Record<string, any> | undefined;
6216
7198
  id?: string | undefined;
6217
7199
  } | {
@@ -6333,6 +7315,64 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
6333
7315
  status?: "in_progress" | "completed" | "incomplete" | undefined;
6334
7316
  providerData?: Record<string, any> | undefined;
6335
7317
  id?: string | undefined;
7318
+ } | {
7319
+ type: "function_call_result";
7320
+ status: "in_progress" | "completed" | "incomplete";
7321
+ name: string;
7322
+ output: string | {
7323
+ type: "text";
7324
+ text: string;
7325
+ providerData?: Record<string, any> | undefined;
7326
+ } | {
7327
+ type: "image";
7328
+ providerData?: Record<string, any> | undefined;
7329
+ image?: string | {
7330
+ data: string | Uint8Array<ArrayBuffer>;
7331
+ mediaType?: string | undefined;
7332
+ } | {
7333
+ url: string;
7334
+ } | {
7335
+ fileId: string;
7336
+ } | undefined;
7337
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
7338
+ } | {
7339
+ type: "file";
7340
+ file: string | {
7341
+ filename: string;
7342
+ data: string | Uint8Array<ArrayBuffer>;
7343
+ mediaType: string;
7344
+ } | {
7345
+ url: string;
7346
+ filename?: string | undefined;
7347
+ } | {
7348
+ id: string;
7349
+ filename?: string | undefined;
7350
+ };
7351
+ providerData?: Record<string, any> | undefined;
7352
+ } | ({
7353
+ type: "input_text";
7354
+ text: string;
7355
+ providerData?: Record<string, any> | undefined;
7356
+ } | {
7357
+ type: "input_image";
7358
+ providerData?: Record<string, any> | undefined;
7359
+ image?: string | {
7360
+ id: string;
7361
+ } | undefined;
7362
+ detail?: string | undefined;
7363
+ } | {
7364
+ type: "input_file";
7365
+ providerData?: Record<string, any> | undefined;
7366
+ file?: string | {
7367
+ id: string;
7368
+ } | {
7369
+ url: string;
7370
+ } | undefined;
7371
+ filename?: string | undefined;
7372
+ })[];
7373
+ callId: string;
7374
+ providerData?: Record<string, any> | undefined;
7375
+ id?: string | undefined;
6336
7376
  } | {
6337
7377
  type: "computer_call";
6338
7378
  status: "in_progress" | "completed" | "incomplete";
@@ -6885,118 +7925,522 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6885
7925
  type: z.ZodLiteral<"keypress">;
6886
7926
  keys: z.ZodArray<z.ZodString, "many">;
6887
7927
  }, "strip", z.ZodTypeAny, {
6888
- keys: string[];
6889
- type: "keypress";
7928
+ keys: string[];
7929
+ type: "keypress";
7930
+ }, {
7931
+ keys: string[];
7932
+ type: "keypress";
7933
+ }>, z.ZodObject<{
7934
+ type: z.ZodLiteral<"drag">;
7935
+ path: z.ZodArray<z.ZodObject<{
7936
+ x: z.ZodNumber;
7937
+ y: z.ZodNumber;
7938
+ }, "strip", z.ZodTypeAny, {
7939
+ x: number;
7940
+ y: number;
7941
+ }, {
7942
+ x: number;
7943
+ y: number;
7944
+ }>, "many">;
7945
+ }, "strip", z.ZodTypeAny, {
7946
+ path: {
7947
+ x: number;
7948
+ y: number;
7949
+ }[];
7950
+ type: "drag";
7951
+ }, {
7952
+ path: {
7953
+ x: number;
7954
+ y: number;
7955
+ }[];
7956
+ type: "drag";
7957
+ }>]>;
7958
+ }, "strip", z.ZodTypeAny, {
7959
+ type: "computer_call";
7960
+ status: "in_progress" | "completed" | "incomplete";
7961
+ callId: string;
7962
+ action: {
7963
+ type: "screenshot";
7964
+ } | {
7965
+ type: "click";
7966
+ x: number;
7967
+ y: number;
7968
+ button: "left" | "right" | "wheel" | "back" | "forward";
7969
+ } | {
7970
+ type: "double_click";
7971
+ x: number;
7972
+ y: number;
7973
+ } | {
7974
+ type: "scroll";
7975
+ x: number;
7976
+ y: number;
7977
+ scroll_x: number;
7978
+ scroll_y: number;
7979
+ } | {
7980
+ type: "type";
7981
+ text: string;
7982
+ } | {
7983
+ type: "wait";
7984
+ } | {
7985
+ type: "move";
7986
+ x: number;
7987
+ y: number;
7988
+ } | {
7989
+ keys: string[];
7990
+ type: "keypress";
7991
+ } | {
7992
+ path: {
7993
+ x: number;
7994
+ y: number;
7995
+ }[];
7996
+ type: "drag";
7997
+ };
7998
+ providerData?: Record<string, any> | undefined;
7999
+ id?: string | undefined;
8000
+ }, {
8001
+ type: "computer_call";
8002
+ status: "in_progress" | "completed" | "incomplete";
8003
+ callId: string;
8004
+ action: {
8005
+ type: "screenshot";
8006
+ } | {
8007
+ type: "click";
8008
+ x: number;
8009
+ y: number;
8010
+ button: "left" | "right" | "wheel" | "back" | "forward";
8011
+ } | {
8012
+ type: "double_click";
8013
+ x: number;
8014
+ y: number;
8015
+ } | {
8016
+ type: "scroll";
8017
+ x: number;
8018
+ y: number;
8019
+ scroll_x: number;
8020
+ scroll_y: number;
8021
+ } | {
8022
+ type: "type";
8023
+ text: string;
8024
+ } | {
8025
+ type: "wait";
8026
+ } | {
8027
+ type: "move";
8028
+ x: number;
8029
+ y: number;
8030
+ } | {
8031
+ keys: string[];
8032
+ type: "keypress";
8033
+ } | {
8034
+ path: {
8035
+ x: number;
8036
+ y: number;
8037
+ }[];
8038
+ type: "drag";
8039
+ };
8040
+ providerData?: Record<string, any> | undefined;
8041
+ id?: string | undefined;
8042
+ }>, z.ZodObject<{
8043
+ /**
8044
+ * Additional optional provider specific data. Used for custom functionality or model provider
8045
+ * specific fields.
8046
+ */
8047
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
8048
+ } & {
8049
+ /**
8050
+ * An ID to identify the item. This is optional by default. If a model provider absolutely
8051
+ * requires this field, it will be validated on the model level.
8052
+ */
8053
+ id: z.ZodOptional<z.ZodString>;
8054
+ } & {
8055
+ type: z.ZodLiteral<"function_call_result">;
8056
+ /**
8057
+ * The name of the tool that was called
8058
+ */
8059
+ name: z.ZodString;
8060
+ /**
8061
+ * The ID of the tool call. Required to match up the respective tool call result.
8062
+ */
8063
+ callId: z.ZodString;
8064
+ /**
8065
+ * The status of the tool call.
8066
+ */
8067
+ status: z.ZodEnum<["in_progress", "completed", "incomplete"]>;
8068
+ /**
8069
+ * The output of the tool call.
8070
+ */
8071
+ output: z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
8072
+ /**
8073
+ * Additional optional provider specific data. Used for custom functionality or model provider
8074
+ * specific fields.
8075
+ */
8076
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
8077
+ } & {
8078
+ type: z.ZodLiteral<"text">;
8079
+ /**
8080
+ * The text output from the model.
8081
+ */
8082
+ text: z.ZodString;
8083
+ }, "strip", z.ZodTypeAny, {
8084
+ type: "text";
8085
+ text: string;
8086
+ providerData?: Record<string, any> | undefined;
8087
+ }, {
8088
+ type: "text";
8089
+ text: string;
8090
+ providerData?: Record<string, any> | undefined;
8091
+ }>, z.ZodObject<{
8092
+ /**
8093
+ * Additional optional provider specific data. Used for custom functionality or model provider
8094
+ * specific fields.
8095
+ */
8096
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
8097
+ } & {
8098
+ type: z.ZodLiteral<"image">;
8099
+ /**
8100
+ * Inline image content or a reference to an uploaded file. Accepts a URL/data URL string or an
8101
+ * object describing the data/url/fileId source.
8102
+ */
8103
+ image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
8104
+ data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
8105
+ mediaType: z.ZodOptional<z.ZodString>;
8106
+ }, "strip", z.ZodTypeAny, {
8107
+ data: string | Uint8Array<ArrayBuffer>;
8108
+ mediaType?: string | undefined;
8109
+ }, {
8110
+ data: string | Uint8Array<ArrayBuffer>;
8111
+ mediaType?: string | undefined;
8112
+ }>, z.ZodObject<{
8113
+ url: z.ZodString;
8114
+ }, "strip", z.ZodTypeAny, {
8115
+ url: string;
8116
+ }, {
8117
+ url: string;
8118
+ }>, z.ZodObject<{
8119
+ fileId: z.ZodString;
8120
+ }, "strip", z.ZodTypeAny, {
8121
+ fileId: string;
8122
+ }, {
8123
+ fileId: string;
8124
+ }>]>]>>;
8125
+ /**
8126
+ * Controls the requested level of detail for vision models.
8127
+ * Use a string to avoid constraining future model capabilities.
8128
+ */
8129
+ detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), z.ZodTypeDef, "low" | "high" | "auto" | (string & {})>>;
8130
+ }, "strip", z.ZodTypeAny, {
8131
+ type: "image";
8132
+ providerData?: Record<string, any> | undefined;
8133
+ image?: string | {
8134
+ data: string | Uint8Array<ArrayBuffer>;
8135
+ mediaType?: string | undefined;
8136
+ } | {
8137
+ url: string;
8138
+ } | {
8139
+ fileId: string;
8140
+ } | undefined;
8141
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
8142
+ }, {
8143
+ type: "image";
8144
+ providerData?: Record<string, any> | undefined;
8145
+ image?: string | {
8146
+ data: string | Uint8Array<ArrayBuffer>;
8147
+ mediaType?: string | undefined;
8148
+ } | {
8149
+ url: string;
8150
+ } | {
8151
+ fileId: string;
8152
+ } | undefined;
8153
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
8154
+ }>, z.ZodObject<{
8155
+ /**
8156
+ * Additional optional provider specific data. Used for custom functionality or model provider
8157
+ * specific fields.
8158
+ */
8159
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
8160
+ } & {
8161
+ type: z.ZodLiteral<"file">;
8162
+ /**
8163
+ * File output reference. Provide either a string (data URL / base64), a data object (requires
8164
+ * mediaType + filename), or an object pointing to an uploaded file/URL.
8165
+ */
8166
+ file: z.ZodUnion<[z.ZodString, z.ZodObject<{
8167
+ data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
8168
+ mediaType: z.ZodString;
8169
+ filename: z.ZodString;
8170
+ }, "strip", z.ZodTypeAny, {
8171
+ filename: string;
8172
+ data: string | Uint8Array<ArrayBuffer>;
8173
+ mediaType: string;
8174
+ }, {
8175
+ filename: string;
8176
+ data: string | Uint8Array<ArrayBuffer>;
8177
+ mediaType: string;
8178
+ }>, z.ZodObject<{
8179
+ url: z.ZodString;
8180
+ filename: z.ZodOptional<z.ZodString>;
8181
+ }, "strip", z.ZodTypeAny, {
8182
+ url: string;
8183
+ filename?: string | undefined;
8184
+ }, {
8185
+ url: string;
8186
+ filename?: string | undefined;
8187
+ }>, z.ZodObject<{
8188
+ id: z.ZodString;
8189
+ filename: z.ZodOptional<z.ZodString>;
8190
+ }, "strip", z.ZodTypeAny, {
8191
+ id: string;
8192
+ filename?: string | undefined;
8193
+ }, {
8194
+ id: string;
8195
+ filename?: string | undefined;
8196
+ }>]>;
8197
+ }, "strip", z.ZodTypeAny, {
8198
+ type: "file";
8199
+ file: string | {
8200
+ filename: string;
8201
+ data: string | Uint8Array<ArrayBuffer>;
8202
+ mediaType: string;
8203
+ } | {
8204
+ url: string;
8205
+ filename?: string | undefined;
8206
+ } | {
8207
+ id: string;
8208
+ filename?: string | undefined;
8209
+ };
8210
+ providerData?: Record<string, any> | undefined;
8211
+ }, {
8212
+ type: "file";
8213
+ file: string | {
8214
+ filename: string;
8215
+ data: string | Uint8Array<ArrayBuffer>;
8216
+ mediaType: string;
8217
+ } | {
8218
+ url: string;
8219
+ filename?: string | undefined;
8220
+ } | {
8221
+ id: string;
8222
+ filename?: string | undefined;
8223
+ };
8224
+ providerData?: Record<string, any> | undefined;
8225
+ }>]>, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
8226
+ /**
8227
+ * Additional optional provider specific data. Used for custom functionality or model provider
8228
+ * specific fields.
8229
+ */
8230
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
8231
+ } & {
8232
+ type: z.ZodLiteral<"input_text">;
8233
+ /**
8234
+ * A text input for example a message from a user
8235
+ */
8236
+ text: z.ZodString;
8237
+ }, "strip", z.ZodTypeAny, {
8238
+ type: "input_text";
8239
+ text: string;
8240
+ providerData?: Record<string, any> | undefined;
8241
+ }, {
8242
+ type: "input_text";
8243
+ text: string;
8244
+ providerData?: Record<string, any> | undefined;
8245
+ }>, z.ZodObject<{
8246
+ /**
8247
+ * Additional optional provider specific data. Used for custom functionality or model provider
8248
+ * specific fields.
8249
+ */
8250
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
8251
+ } & {
8252
+ type: z.ZodLiteral<"input_image">;
8253
+ /**
8254
+ * The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
8255
+ * previously uploaded OpenAI file.
8256
+ */
8257
+ image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
8258
+ id: z.ZodString;
8259
+ }, "strip", z.ZodTypeAny, {
8260
+ id: string;
8261
+ }, {
8262
+ id: string;
8263
+ }>]>>;
8264
+ /**
8265
+ * Controls the level of detail requested for image understanding tasks.
8266
+ * Future models may add new values, therefore this accepts any string.
8267
+ */
8268
+ detail: z.ZodOptional<z.ZodString>;
8269
+ }, "strip", z.ZodTypeAny, {
8270
+ type: "input_image";
8271
+ providerData?: Record<string, any> | undefined;
8272
+ image?: string | {
8273
+ id: string;
8274
+ } | undefined;
8275
+ detail?: string | undefined;
6890
8276
  }, {
6891
- keys: string[];
6892
- type: "keypress";
8277
+ type: "input_image";
8278
+ providerData?: Record<string, any> | undefined;
8279
+ image?: string | {
8280
+ id: string;
8281
+ } | undefined;
8282
+ detail?: string | undefined;
6893
8283
  }>, z.ZodObject<{
6894
- type: z.ZodLiteral<"drag">;
6895
- path: z.ZodArray<z.ZodObject<{
6896
- x: z.ZodNumber;
6897
- y: z.ZodNumber;
8284
+ /**
8285
+ * Additional optional provider specific data. Used for custom functionality or model provider
8286
+ * specific fields.
8287
+ */
8288
+ providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
8289
+ } & {
8290
+ type: z.ZodLiteral<"input_file">;
8291
+ /**
8292
+ * The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
8293
+ */
8294
+ file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
8295
+ id: z.ZodString;
6898
8296
  }, "strip", z.ZodTypeAny, {
6899
- x: number;
6900
- y: number;
8297
+ id: string;
6901
8298
  }, {
6902
- x: number;
6903
- y: number;
6904
- }>, "many">;
8299
+ id: string;
8300
+ }>]>, z.ZodObject<{
8301
+ url: z.ZodString;
8302
+ }, "strip", z.ZodTypeAny, {
8303
+ url: string;
8304
+ }, {
8305
+ url: string;
8306
+ }>]>>;
8307
+ /**
8308
+ * Optional filename metadata when uploading file data inline.
8309
+ */
8310
+ filename: z.ZodOptional<z.ZodString>;
6905
8311
  }, "strip", z.ZodTypeAny, {
6906
- path: {
6907
- x: number;
6908
- y: number;
6909
- }[];
6910
- type: "drag";
8312
+ type: "input_file";
8313
+ providerData?: Record<string, any> | undefined;
8314
+ file?: string | {
8315
+ id: string;
8316
+ } | {
8317
+ url: string;
8318
+ } | undefined;
8319
+ filename?: string | undefined;
6911
8320
  }, {
6912
- path: {
6913
- x: number;
6914
- y: number;
6915
- }[];
6916
- type: "drag";
6917
- }>]>;
8321
+ type: "input_file";
8322
+ providerData?: Record<string, any> | undefined;
8323
+ file?: string | {
8324
+ id: string;
8325
+ } | {
8326
+ url: string;
8327
+ } | undefined;
8328
+ filename?: string | undefined;
8329
+ }>]>, "many">]>;
6918
8330
  }, "strip", z.ZodTypeAny, {
6919
- type: "computer_call";
8331
+ type: "function_call_result";
6920
8332
  status: "in_progress" | "completed" | "incomplete";
6921
- callId: string;
6922
- action: {
6923
- type: "screenshot";
6924
- } | {
6925
- type: "click";
6926
- x: number;
6927
- y: number;
6928
- button: "left" | "right" | "wheel" | "back" | "forward";
6929
- } | {
6930
- type: "double_click";
6931
- x: number;
6932
- y: number;
6933
- } | {
6934
- type: "scroll";
6935
- x: number;
6936
- y: number;
6937
- scroll_x: number;
6938
- scroll_y: number;
6939
- } | {
6940
- type: "type";
8333
+ name: string;
8334
+ output: string | {
8335
+ type: "text";
6941
8336
  text: string;
8337
+ providerData?: Record<string, any> | undefined;
6942
8338
  } | {
6943
- type: "wait";
6944
- } | {
6945
- type: "move";
6946
- x: number;
6947
- y: number;
8339
+ type: "image";
8340
+ providerData?: Record<string, any> | undefined;
8341
+ image?: string | {
8342
+ data: string | Uint8Array<ArrayBuffer>;
8343
+ mediaType?: string | undefined;
8344
+ } | {
8345
+ url: string;
8346
+ } | {
8347
+ fileId: string;
8348
+ } | undefined;
8349
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
8350
+ } | {
8351
+ type: "file";
8352
+ file: string | {
8353
+ filename: string;
8354
+ data: string | Uint8Array<ArrayBuffer>;
8355
+ mediaType: string;
8356
+ } | {
8357
+ url: string;
8358
+ filename?: string | undefined;
8359
+ } | {
8360
+ id: string;
8361
+ filename?: string | undefined;
8362
+ };
8363
+ providerData?: Record<string, any> | undefined;
8364
+ } | ({
8365
+ type: "input_text";
8366
+ text: string;
8367
+ providerData?: Record<string, any> | undefined;
6948
8368
  } | {
6949
- keys: string[];
6950
- type: "keypress";
8369
+ type: "input_image";
8370
+ providerData?: Record<string, any> | undefined;
8371
+ image?: string | {
8372
+ id: string;
8373
+ } | undefined;
8374
+ detail?: string | undefined;
6951
8375
  } | {
6952
- path: {
6953
- x: number;
6954
- y: number;
6955
- }[];
6956
- type: "drag";
6957
- };
8376
+ type: "input_file";
8377
+ providerData?: Record<string, any> | undefined;
8378
+ file?: string | {
8379
+ id: string;
8380
+ } | {
8381
+ url: string;
8382
+ } | undefined;
8383
+ filename?: string | undefined;
8384
+ })[];
8385
+ callId: string;
6958
8386
  providerData?: Record<string, any> | undefined;
6959
8387
  id?: string | undefined;
6960
8388
  }, {
6961
- type: "computer_call";
8389
+ type: "function_call_result";
6962
8390
  status: "in_progress" | "completed" | "incomplete";
6963
- callId: string;
6964
- action: {
6965
- type: "screenshot";
6966
- } | {
6967
- type: "click";
6968
- x: number;
6969
- y: number;
6970
- button: "left" | "right" | "wheel" | "back" | "forward";
6971
- } | {
6972
- type: "double_click";
6973
- x: number;
6974
- y: number;
6975
- } | {
6976
- type: "scroll";
6977
- x: number;
6978
- y: number;
6979
- scroll_x: number;
6980
- scroll_y: number;
6981
- } | {
6982
- type: "type";
8391
+ name: string;
8392
+ output: string | {
8393
+ type: "text";
6983
8394
  text: string;
8395
+ providerData?: Record<string, any> | undefined;
6984
8396
  } | {
6985
- type: "wait";
6986
- } | {
6987
- type: "move";
6988
- x: number;
6989
- y: number;
8397
+ type: "image";
8398
+ providerData?: Record<string, any> | undefined;
8399
+ image?: string | {
8400
+ data: string | Uint8Array<ArrayBuffer>;
8401
+ mediaType?: string | undefined;
8402
+ } | {
8403
+ url: string;
8404
+ } | {
8405
+ fileId: string;
8406
+ } | undefined;
8407
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
8408
+ } | {
8409
+ type: "file";
8410
+ file: string | {
8411
+ filename: string;
8412
+ data: string | Uint8Array<ArrayBuffer>;
8413
+ mediaType: string;
8414
+ } | {
8415
+ url: string;
8416
+ filename?: string | undefined;
8417
+ } | {
8418
+ id: string;
8419
+ filename?: string | undefined;
8420
+ };
8421
+ providerData?: Record<string, any> | undefined;
8422
+ } | ({
8423
+ type: "input_text";
8424
+ text: string;
8425
+ providerData?: Record<string, any> | undefined;
6990
8426
  } | {
6991
- keys: string[];
6992
- type: "keypress";
8427
+ type: "input_image";
8428
+ providerData?: Record<string, any> | undefined;
8429
+ image?: string | {
8430
+ id: string;
8431
+ } | undefined;
8432
+ detail?: string | undefined;
6993
8433
  } | {
6994
- path: {
6995
- x: number;
6996
- y: number;
6997
- }[];
6998
- type: "drag";
6999
- };
8434
+ type: "input_file";
8435
+ providerData?: Record<string, any> | undefined;
8436
+ file?: string | {
8437
+ id: string;
8438
+ } | {
8439
+ url: string;
8440
+ } | undefined;
8441
+ filename?: string | undefined;
8442
+ })[];
8443
+ callId: string;
7000
8444
  providerData?: Record<string, any> | undefined;
7001
8445
  id?: string | undefined;
7002
8446
  }>, z.ZodObject<{
@@ -7152,6 +8596,64 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
7152
8596
  status?: "in_progress" | "completed" | "incomplete" | undefined;
7153
8597
  providerData?: Record<string, any> | undefined;
7154
8598
  id?: string | undefined;
8599
+ } | {
8600
+ type: "function_call_result";
8601
+ status: "in_progress" | "completed" | "incomplete";
8602
+ name: string;
8603
+ output: string | {
8604
+ type: "text";
8605
+ text: string;
8606
+ providerData?: Record<string, any> | undefined;
8607
+ } | {
8608
+ type: "image";
8609
+ providerData?: Record<string, any> | undefined;
8610
+ image?: string | {
8611
+ data: string | Uint8Array<ArrayBuffer>;
8612
+ mediaType?: string | undefined;
8613
+ } | {
8614
+ url: string;
8615
+ } | {
8616
+ fileId: string;
8617
+ } | undefined;
8618
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
8619
+ } | {
8620
+ type: "file";
8621
+ file: string | {
8622
+ filename: string;
8623
+ data: string | Uint8Array<ArrayBuffer>;
8624
+ mediaType: string;
8625
+ } | {
8626
+ url: string;
8627
+ filename?: string | undefined;
8628
+ } | {
8629
+ id: string;
8630
+ filename?: string | undefined;
8631
+ };
8632
+ providerData?: Record<string, any> | undefined;
8633
+ } | ({
8634
+ type: "input_text";
8635
+ text: string;
8636
+ providerData?: Record<string, any> | undefined;
8637
+ } | {
8638
+ type: "input_image";
8639
+ providerData?: Record<string, any> | undefined;
8640
+ image?: string | {
8641
+ id: string;
8642
+ } | undefined;
8643
+ detail?: string | undefined;
8644
+ } | {
8645
+ type: "input_file";
8646
+ providerData?: Record<string, any> | undefined;
8647
+ file?: string | {
8648
+ id: string;
8649
+ } | {
8650
+ url: string;
8651
+ } | undefined;
8652
+ filename?: string | undefined;
8653
+ })[];
8654
+ callId: string;
8655
+ providerData?: Record<string, any> | undefined;
8656
+ id?: string | undefined;
7155
8657
  } | {
7156
8658
  type: "computer_call";
7157
8659
  status: "in_progress" | "completed" | "incomplete";
@@ -7267,6 +8769,64 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
7267
8769
  status?: "in_progress" | "completed" | "incomplete" | undefined;
7268
8770
  providerData?: Record<string, any> | undefined;
7269
8771
  id?: string | undefined;
8772
+ } | {
8773
+ type: "function_call_result";
8774
+ status: "in_progress" | "completed" | "incomplete";
8775
+ name: string;
8776
+ output: string | {
8777
+ type: "text";
8778
+ text: string;
8779
+ providerData?: Record<string, any> | undefined;
8780
+ } | {
8781
+ type: "image";
8782
+ providerData?: Record<string, any> | undefined;
8783
+ image?: string | {
8784
+ data: string | Uint8Array<ArrayBuffer>;
8785
+ mediaType?: string | undefined;
8786
+ } | {
8787
+ url: string;
8788
+ } | {
8789
+ fileId: string;
8790
+ } | undefined;
8791
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
8792
+ } | {
8793
+ type: "file";
8794
+ file: string | {
8795
+ filename: string;
8796
+ data: string | Uint8Array<ArrayBuffer>;
8797
+ mediaType: string;
8798
+ } | {
8799
+ url: string;
8800
+ filename?: string | undefined;
8801
+ } | {
8802
+ id: string;
8803
+ filename?: string | undefined;
8804
+ };
8805
+ providerData?: Record<string, any> | undefined;
8806
+ } | ({
8807
+ type: "input_text";
8808
+ text: string;
8809
+ providerData?: Record<string, any> | undefined;
8810
+ } | {
8811
+ type: "input_image";
8812
+ providerData?: Record<string, any> | undefined;
8813
+ image?: string | {
8814
+ id: string;
8815
+ } | undefined;
8816
+ detail?: string | undefined;
8817
+ } | {
8818
+ type: "input_file";
8819
+ providerData?: Record<string, any> | undefined;
8820
+ file?: string | {
8821
+ id: string;
8822
+ } | {
8823
+ url: string;
8824
+ } | undefined;
8825
+ filename?: string | undefined;
8826
+ })[];
8827
+ callId: string;
8828
+ providerData?: Record<string, any> | undefined;
8829
+ id?: string | undefined;
7270
8830
  } | {
7271
8831
  type: "computer_call";
7272
8832
  status: "in_progress" | "completed" | "incomplete";
@@ -7385,6 +8945,64 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
7385
8945
  status?: "in_progress" | "completed" | "incomplete" | undefined;
7386
8946
  providerData?: Record<string, any> | undefined;
7387
8947
  id?: string | undefined;
8948
+ } | {
8949
+ type: "function_call_result";
8950
+ status: "in_progress" | "completed" | "incomplete";
8951
+ name: string;
8952
+ output: string | {
8953
+ type: "text";
8954
+ text: string;
8955
+ providerData?: Record<string, any> | undefined;
8956
+ } | {
8957
+ type: "image";
8958
+ providerData?: Record<string, any> | undefined;
8959
+ image?: string | {
8960
+ data: string | Uint8Array<ArrayBuffer>;
8961
+ mediaType?: string | undefined;
8962
+ } | {
8963
+ url: string;
8964
+ } | {
8965
+ fileId: string;
8966
+ } | undefined;
8967
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
8968
+ } | {
8969
+ type: "file";
8970
+ file: string | {
8971
+ filename: string;
8972
+ data: string | Uint8Array<ArrayBuffer>;
8973
+ mediaType: string;
8974
+ } | {
8975
+ url: string;
8976
+ filename?: string | undefined;
8977
+ } | {
8978
+ id: string;
8979
+ filename?: string | undefined;
8980
+ };
8981
+ providerData?: Record<string, any> | undefined;
8982
+ } | ({
8983
+ type: "input_text";
8984
+ text: string;
8985
+ providerData?: Record<string, any> | undefined;
8986
+ } | {
8987
+ type: "input_image";
8988
+ providerData?: Record<string, any> | undefined;
8989
+ image?: string | {
8990
+ id: string;
8991
+ } | undefined;
8992
+ detail?: string | undefined;
8993
+ } | {
8994
+ type: "input_file";
8995
+ providerData?: Record<string, any> | undefined;
8996
+ file?: string | {
8997
+ id: string;
8998
+ } | {
8999
+ url: string;
9000
+ } | undefined;
9001
+ filename?: string | undefined;
9002
+ })[];
9003
+ callId: string;
9004
+ providerData?: Record<string, any> | undefined;
9005
+ id?: string | undefined;
7388
9006
  } | {
7389
9007
  type: "computer_call";
7390
9008
  status: "in_progress" | "completed" | "incomplete";
@@ -7504,6 +9122,64 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
7504
9122
  status?: "in_progress" | "completed" | "incomplete" | undefined;
7505
9123
  providerData?: Record<string, any> | undefined;
7506
9124
  id?: string | undefined;
9125
+ } | {
9126
+ type: "function_call_result";
9127
+ status: "in_progress" | "completed" | "incomplete";
9128
+ name: string;
9129
+ output: string | {
9130
+ type: "text";
9131
+ text: string;
9132
+ providerData?: Record<string, any> | undefined;
9133
+ } | {
9134
+ type: "image";
9135
+ providerData?: Record<string, any> | undefined;
9136
+ image?: string | {
9137
+ data: string | Uint8Array<ArrayBuffer>;
9138
+ mediaType?: string | undefined;
9139
+ } | {
9140
+ url: string;
9141
+ } | {
9142
+ fileId: string;
9143
+ } | undefined;
9144
+ detail?: "low" | "high" | "auto" | (string & {}) | undefined;
9145
+ } | {
9146
+ type: "file";
9147
+ file: string | {
9148
+ filename: string;
9149
+ data: string | Uint8Array<ArrayBuffer>;
9150
+ mediaType: string;
9151
+ } | {
9152
+ url: string;
9153
+ filename?: string | undefined;
9154
+ } | {
9155
+ id: string;
9156
+ filename?: string | undefined;
9157
+ };
9158
+ providerData?: Record<string, any> | undefined;
9159
+ } | ({
9160
+ type: "input_text";
9161
+ text: string;
9162
+ providerData?: Record<string, any> | undefined;
9163
+ } | {
9164
+ type: "input_image";
9165
+ providerData?: Record<string, any> | undefined;
9166
+ image?: string | {
9167
+ id: string;
9168
+ } | undefined;
9169
+ detail?: string | undefined;
9170
+ } | {
9171
+ type: "input_file";
9172
+ providerData?: Record<string, any> | undefined;
9173
+ file?: string | {
9174
+ id: string;
9175
+ } | {
9176
+ url: string;
9177
+ } | undefined;
9178
+ filename?: string | undefined;
9179
+ })[];
9180
+ callId: string;
9181
+ providerData?: Record<string, any> | undefined;
9182
+ id?: string | undefined;
7507
9183
  } | {
7508
9184
  type: "computer_call";
7509
9185
  status: "in_progress" | "completed" | "incomplete";