@better-agent/providers 0.1.0-canary.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.
@@ -0,0 +1,1196 @@
1
+ import { z } from "zod";
2
+ import { HostedToolDefinition } from "@better-agent/core";
3
+ import { Capabilities, GenerativeModel } from "@better-agent/core/providers";
4
+
5
+ //#region src/anthropic/responses/schemas.d.ts
6
+ declare const ANTHROPIC_KNOWN_RESPONSE_MODELS: readonly ["claude-3-haiku-20240307", "claude-haiku-4-5-20251001", "claude-haiku-4-5", "claude-opus-4-0", "claude-opus-4-20250514", "claude-opus-4-1-20250805", "claude-opus-4-1", "claude-opus-4-5", "claude-opus-4-5-20251101", "claude-sonnet-4-0", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929", "claude-sonnet-4-5", "claude-sonnet-4-6", "claude-opus-4-6"];
7
+ type AnthropicMessagesRequestSchema = z.input<typeof AnthropicMessagesRequestSchema>;
8
+ type AnthropicResponseStreamEvent = z.infer<typeof AnthropicResponseStreamEventSchema>;
9
+ type AnthropicResponseModels = (typeof ANTHROPIC_KNOWN_RESPONSE_MODELS)[number];
10
+ declare const AnthropicMessagesRequestSchema: z.ZodObject<{
11
+ model: z.ZodString;
12
+ max_tokens: z.ZodNumber;
13
+ messages: z.ZodArray<z.ZodObject<{
14
+ role: z.ZodEnum<{
15
+ user: "user";
16
+ assistant: "assistant";
17
+ }>;
18
+ content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
19
+ type: z.ZodLiteral<"text">;
20
+ text: z.ZodString;
21
+ citations: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
22
+ cache_control: z.ZodOptional<z.ZodObject<{
23
+ type: z.ZodLiteral<"ephemeral">;
24
+ ttl: z.ZodOptional<z.ZodEnum<{
25
+ "5m": "5m";
26
+ "1h": "1h";
27
+ }>>;
28
+ }, z.core.$strip>>;
29
+ }, z.core.$strip>, z.ZodObject<{
30
+ type: z.ZodLiteral<"image">;
31
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
32
+ type: z.ZodLiteral<"base64">;
33
+ media_type: z.ZodString;
34
+ data: z.ZodString;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ type: z.ZodLiteral<"url">;
37
+ url: z.ZodString;
38
+ }, z.core.$strip>, z.ZodObject<{
39
+ type: z.ZodLiteral<"text">;
40
+ media_type: z.ZodLiteral<"text/plain">;
41
+ data: z.ZodString;
42
+ }, z.core.$strip>], "type">;
43
+ cache_control: z.ZodOptional<z.ZodObject<{
44
+ type: z.ZodLiteral<"ephemeral">;
45
+ ttl: z.ZodOptional<z.ZodEnum<{
46
+ "5m": "5m";
47
+ "1h": "1h";
48
+ }>>;
49
+ }, z.core.$strip>>;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ type: z.ZodLiteral<"document">;
52
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
53
+ type: z.ZodLiteral<"base64">;
54
+ media_type: z.ZodString;
55
+ data: z.ZodString;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ type: z.ZodLiteral<"url">;
58
+ url: z.ZodString;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ type: z.ZodLiteral<"text">;
61
+ media_type: z.ZodLiteral<"text/plain">;
62
+ data: z.ZodString;
63
+ }, z.core.$strip>], "type">;
64
+ title: z.ZodOptional<z.ZodString>;
65
+ context: z.ZodOptional<z.ZodString>;
66
+ citations: z.ZodOptional<z.ZodObject<{
67
+ enabled: z.ZodBoolean;
68
+ }, z.core.$strip>>;
69
+ cache_control: z.ZodOptional<z.ZodObject<{
70
+ type: z.ZodLiteral<"ephemeral">;
71
+ ttl: z.ZodOptional<z.ZodEnum<{
72
+ "5m": "5m";
73
+ "1h": "1h";
74
+ }>>;
75
+ }, z.core.$strip>>;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ type: z.ZodLiteral<"tool_result">;
78
+ tool_use_id: z.ZodString;
79
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnknown>]>;
80
+ is_error: z.ZodOptional<z.ZodBoolean>;
81
+ cache_control: z.ZodOptional<z.ZodObject<{
82
+ type: z.ZodLiteral<"ephemeral">;
83
+ ttl: z.ZodOptional<z.ZodEnum<{
84
+ "5m": "5m";
85
+ "1h": "1h";
86
+ }>>;
87
+ }, z.core.$strip>>;
88
+ }, z.core.$strip>, z.ZodObject<{
89
+ type: z.ZodLiteral<"thinking">;
90
+ thinking: z.ZodString;
91
+ signature: z.ZodString;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ type: z.ZodLiteral<"redacted_thinking">;
94
+ data: z.ZodString;
95
+ }, z.core.$strip>, z.ZodObject<{
96
+ type: z.ZodLiteral<"tool_use">;
97
+ id: z.ZodString;
98
+ name: z.ZodString;
99
+ input: z.ZodUnknown;
100
+ cache_control: z.ZodOptional<z.ZodObject<{
101
+ type: z.ZodLiteral<"ephemeral">;
102
+ ttl: z.ZodOptional<z.ZodEnum<{
103
+ "5m": "5m";
104
+ "1h": "1h";
105
+ }>>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ type: z.ZodLiteral<"server_tool_use">;
109
+ id: z.ZodString;
110
+ name: z.ZodEnum<{
111
+ web_fetch: "web_fetch";
112
+ web_search: "web_search";
113
+ code_execution: "code_execution";
114
+ bash_code_execution: "bash_code_execution";
115
+ text_editor_code_execution: "text_editor_code_execution";
116
+ tool_search_tool_regex: "tool_search_tool_regex";
117
+ tool_search_tool_bm25: "tool_search_tool_bm25";
118
+ }>;
119
+ input: z.ZodUnknown;
120
+ cache_control: z.ZodOptional<z.ZodObject<{
121
+ type: z.ZodLiteral<"ephemeral">;
122
+ ttl: z.ZodOptional<z.ZodEnum<{
123
+ "5m": "5m";
124
+ "1h": "1h";
125
+ }>>;
126
+ }, z.core.$strip>>;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ tool_use_id: z.ZodString;
129
+ cache_control: z.ZodOptional<z.ZodObject<{
130
+ type: z.ZodLiteral<"ephemeral">;
131
+ ttl: z.ZodOptional<z.ZodEnum<{
132
+ "5m": "5m";
133
+ "1h": "1h";
134
+ }>>;
135
+ }, z.core.$strip>>;
136
+ type: z.ZodLiteral<"web_search_tool_result">;
137
+ content: z.ZodArray<z.ZodObject<{
138
+ url: z.ZodString;
139
+ title: z.ZodNullable<z.ZodString>;
140
+ page_age: z.ZodNullable<z.ZodString>;
141
+ encrypted_content: z.ZodString;
142
+ type: z.ZodString;
143
+ }, z.core.$strip>>;
144
+ }, z.core.$loose>, z.ZodObject<{
145
+ tool_use_id: z.ZodString;
146
+ cache_control: z.ZodOptional<z.ZodObject<{
147
+ type: z.ZodLiteral<"ephemeral">;
148
+ ttl: z.ZodOptional<z.ZodEnum<{
149
+ "5m": "5m";
150
+ "1h": "1h";
151
+ }>>;
152
+ }, z.core.$strip>>;
153
+ type: z.ZodLiteral<"web_fetch_tool_result">;
154
+ content: z.ZodUnknown;
155
+ }, z.core.$loose>, z.ZodObject<{
156
+ tool_use_id: z.ZodString;
157
+ cache_control: z.ZodOptional<z.ZodObject<{
158
+ type: z.ZodLiteral<"ephemeral">;
159
+ ttl: z.ZodOptional<z.ZodEnum<{
160
+ "5m": "5m";
161
+ "1h": "1h";
162
+ }>>;
163
+ }, z.core.$strip>>;
164
+ type: z.ZodLiteral<"tool_search_tool_result">;
165
+ content: z.ZodUnknown;
166
+ }, z.core.$loose>, z.ZodObject<{
167
+ tool_use_id: z.ZodString;
168
+ cache_control: z.ZodOptional<z.ZodObject<{
169
+ type: z.ZodLiteral<"ephemeral">;
170
+ ttl: z.ZodOptional<z.ZodEnum<{
171
+ "5m": "5m";
172
+ "1h": "1h";
173
+ }>>;
174
+ }, z.core.$strip>>;
175
+ type: z.ZodLiteral<"code_execution_tool_result">;
176
+ content: z.ZodUnknown;
177
+ }, z.core.$loose>, z.ZodObject<{
178
+ tool_use_id: z.ZodString;
179
+ cache_control: z.ZodOptional<z.ZodObject<{
180
+ type: z.ZodLiteral<"ephemeral">;
181
+ ttl: z.ZodOptional<z.ZodEnum<{
182
+ "5m": "5m";
183
+ "1h": "1h";
184
+ }>>;
185
+ }, z.core.$strip>>;
186
+ type: z.ZodLiteral<"bash_code_execution_tool_result">;
187
+ content: z.ZodUnknown;
188
+ }, z.core.$loose>, z.ZodObject<{
189
+ tool_use_id: z.ZodString;
190
+ cache_control: z.ZodOptional<z.ZodObject<{
191
+ type: z.ZodLiteral<"ephemeral">;
192
+ ttl: z.ZodOptional<z.ZodEnum<{
193
+ "5m": "5m";
194
+ "1h": "1h";
195
+ }>>;
196
+ }, z.core.$strip>>;
197
+ type: z.ZodLiteral<"text_editor_code_execution_tool_result">;
198
+ content: z.ZodUnknown;
199
+ }, z.core.$loose>, z.ZodObject<{
200
+ type: z.ZodLiteral<"mcp_tool_use">;
201
+ id: z.ZodString;
202
+ name: z.ZodString;
203
+ server_name: z.ZodOptional<z.ZodString>;
204
+ input: z.ZodUnknown;
205
+ cache_control: z.ZodOptional<z.ZodObject<{
206
+ type: z.ZodLiteral<"ephemeral">;
207
+ ttl: z.ZodOptional<z.ZodEnum<{
208
+ "5m": "5m";
209
+ "1h": "1h";
210
+ }>>;
211
+ }, z.core.$strip>>;
212
+ }, z.core.$loose>, z.ZodObject<{
213
+ type: z.ZodLiteral<"mcp_tool_result">;
214
+ tool_use_id: z.ZodString;
215
+ content: z.ZodUnknown;
216
+ is_error: z.ZodOptional<z.ZodBoolean>;
217
+ cache_control: z.ZodOptional<z.ZodObject<{
218
+ type: z.ZodLiteral<"ephemeral">;
219
+ ttl: z.ZodOptional<z.ZodEnum<{
220
+ "5m": "5m";
221
+ "1h": "1h";
222
+ }>>;
223
+ }, z.core.$strip>>;
224
+ }, z.core.$loose>, z.ZodObject<{
225
+ type: z.ZodLiteral<"compaction">;
226
+ content: z.ZodString;
227
+ cache_control: z.ZodOptional<z.ZodObject<{
228
+ type: z.ZodLiteral<"ephemeral">;
229
+ ttl: z.ZodOptional<z.ZodEnum<{
230
+ "5m": "5m";
231
+ "1h": "1h";
232
+ }>>;
233
+ }, z.core.$strip>>;
234
+ }, z.core.$strip>]>>;
235
+ }, z.core.$strip>>;
236
+ system: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
237
+ type: z.ZodLiteral<"text">;
238
+ text: z.ZodString;
239
+ citations: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
240
+ cache_control: z.ZodOptional<z.ZodObject<{
241
+ type: z.ZodLiteral<"ephemeral">;
242
+ ttl: z.ZodOptional<z.ZodEnum<{
243
+ "5m": "5m";
244
+ "1h": "1h";
245
+ }>>;
246
+ }, z.core.$strip>>;
247
+ }, z.core.$strip>>]>>;
248
+ cache_control: z.ZodOptional<z.ZodObject<{
249
+ type: z.ZodLiteral<"ephemeral">;
250
+ ttl: z.ZodOptional<z.ZodEnum<{
251
+ "5m": "5m";
252
+ "1h": "1h";
253
+ }>>;
254
+ }, z.core.$strip>>;
255
+ metadata: z.ZodOptional<z.ZodObject<{
256
+ user_id: z.ZodOptional<z.ZodString>;
257
+ }, z.core.$strip>>;
258
+ output_config: z.ZodOptional<z.ZodObject<{
259
+ effort: z.ZodOptional<z.ZodEnum<{
260
+ low: "low";
261
+ medium: "medium";
262
+ high: "high";
263
+ max: "max";
264
+ }>>;
265
+ format: z.ZodOptional<z.ZodObject<{
266
+ type: z.ZodLiteral<"json_schema">;
267
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
268
+ }, z.core.$strip>>;
269
+ }, z.core.$strip>>;
270
+ stop_sequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
271
+ stream: z.ZodOptional<z.ZodBoolean>;
272
+ speed: z.ZodOptional<z.ZodEnum<{
273
+ fast: "fast";
274
+ standard: "standard";
275
+ }>>;
276
+ temperature: z.ZodOptional<z.ZodNumber>;
277
+ thinking: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
278
+ type: z.ZodLiteral<"adaptive">;
279
+ }, z.core.$strip>, z.ZodObject<{
280
+ type: z.ZodLiteral<"enabled">;
281
+ budget_tokens: z.ZodOptional<z.ZodNumber>;
282
+ }, z.core.$strip>, z.ZodObject<{
283
+ type: z.ZodLiteral<"disabled">;
284
+ }, z.core.$strip>], "type">>;
285
+ tool_choice: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
286
+ type: z.ZodLiteral<"auto">;
287
+ disable_parallel_tool_use: z.ZodOptional<z.ZodBoolean>;
288
+ }, z.core.$strip>, z.ZodObject<{
289
+ type: z.ZodLiteral<"any">;
290
+ disable_parallel_tool_use: z.ZodOptional<z.ZodBoolean>;
291
+ }, z.core.$strip>, z.ZodObject<{
292
+ type: z.ZodLiteral<"tool">;
293
+ name: z.ZodString;
294
+ disable_parallel_tool_use: z.ZodOptional<z.ZodBoolean>;
295
+ }, z.core.$strip>], "type">>;
296
+ tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
297
+ name: z.ZodString;
298
+ description: z.ZodOptional<z.ZodString>;
299
+ input_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
300
+ cache_control: z.ZodOptional<z.ZodObject<{
301
+ type: z.ZodLiteral<"ephemeral">;
302
+ ttl: z.ZodOptional<z.ZodEnum<{
303
+ "5m": "5m";
304
+ "1h": "1h";
305
+ }>>;
306
+ }, z.core.$strip>>;
307
+ strict: z.ZodOptional<z.ZodBoolean>;
308
+ eager_input_streaming: z.ZodOptional<z.ZodBoolean>;
309
+ defer_loading: z.ZodOptional<z.ZodBoolean>;
310
+ allowed_callers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
311
+ direct: "direct";
312
+ code_execution_20250825: "code_execution_20250825";
313
+ code_execution_20260120: "code_execution_20260120";
314
+ }>>>;
315
+ input_examples: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
316
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
317
+ type: z.ZodLiteral<"code_execution_20250522">;
318
+ name: z.ZodLiteral<"code_execution">;
319
+ cache_control: z.ZodOptional<z.ZodObject<{
320
+ type: z.ZodLiteral<"ephemeral">;
321
+ ttl: z.ZodOptional<z.ZodEnum<{
322
+ "5m": "5m";
323
+ "1h": "1h";
324
+ }>>;
325
+ }, z.core.$strip>>;
326
+ }, z.core.$strip>, z.ZodObject<{
327
+ type: z.ZodLiteral<"code_execution_20250825">;
328
+ name: z.ZodLiteral<"code_execution">;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ type: z.ZodLiteral<"code_execution_20260120">;
331
+ name: z.ZodLiteral<"code_execution">;
332
+ }, z.core.$strip>, z.ZodObject<{
333
+ display_width_px: z.ZodNumber;
334
+ display_height_px: z.ZodNumber;
335
+ display_number: z.ZodOptional<z.ZodNumber>;
336
+ cache_control: z.ZodOptional<z.ZodObject<{
337
+ type: z.ZodLiteral<"ephemeral">;
338
+ ttl: z.ZodOptional<z.ZodEnum<{
339
+ "5m": "5m";
340
+ "1h": "1h";
341
+ }>>;
342
+ }, z.core.$strip>>;
343
+ type: z.ZodLiteral<"computer_20241022">;
344
+ name: z.ZodLiteral<"computer">;
345
+ }, z.core.$strip>, z.ZodObject<{
346
+ display_width_px: z.ZodNumber;
347
+ display_height_px: z.ZodNumber;
348
+ display_number: z.ZodOptional<z.ZodNumber>;
349
+ cache_control: z.ZodOptional<z.ZodObject<{
350
+ type: z.ZodLiteral<"ephemeral">;
351
+ ttl: z.ZodOptional<z.ZodEnum<{
352
+ "5m": "5m";
353
+ "1h": "1h";
354
+ }>>;
355
+ }, z.core.$strip>>;
356
+ type: z.ZodLiteral<"computer_20250124">;
357
+ name: z.ZodLiteral<"computer">;
358
+ }, z.core.$strip>, z.ZodObject<{
359
+ display_width_px: z.ZodNumber;
360
+ display_height_px: z.ZodNumber;
361
+ display_number: z.ZodOptional<z.ZodNumber>;
362
+ cache_control: z.ZodOptional<z.ZodObject<{
363
+ type: z.ZodLiteral<"ephemeral">;
364
+ ttl: z.ZodOptional<z.ZodEnum<{
365
+ "5m": "5m";
366
+ "1h": "1h";
367
+ }>>;
368
+ }, z.core.$strip>>;
369
+ type: z.ZodLiteral<"computer_20251124">;
370
+ name: z.ZodLiteral<"computer">;
371
+ enable_zoom: z.ZodOptional<z.ZodBoolean>;
372
+ }, z.core.$strip>, z.ZodObject<{
373
+ type: z.ZodLiteral<"text_editor_20241022">;
374
+ name: z.ZodLiteral<"str_replace_editor">;
375
+ cache_control: z.ZodOptional<z.ZodObject<{
376
+ type: z.ZodLiteral<"ephemeral">;
377
+ ttl: z.ZodOptional<z.ZodEnum<{
378
+ "5m": "5m";
379
+ "1h": "1h";
380
+ }>>;
381
+ }, z.core.$strip>>;
382
+ }, z.core.$strip>, z.ZodObject<{
383
+ type: z.ZodLiteral<"text_editor_20250124">;
384
+ name: z.ZodLiteral<"str_replace_editor">;
385
+ cache_control: z.ZodOptional<z.ZodObject<{
386
+ type: z.ZodLiteral<"ephemeral">;
387
+ ttl: z.ZodOptional<z.ZodEnum<{
388
+ "5m": "5m";
389
+ "1h": "1h";
390
+ }>>;
391
+ }, z.core.$strip>>;
392
+ }, z.core.$strip>, z.ZodObject<{
393
+ type: z.ZodLiteral<"text_editor_20250429">;
394
+ name: z.ZodLiteral<"str_replace_based_edit_tool">;
395
+ cache_control: z.ZodOptional<z.ZodObject<{
396
+ type: z.ZodLiteral<"ephemeral">;
397
+ ttl: z.ZodOptional<z.ZodEnum<{
398
+ "5m": "5m";
399
+ "1h": "1h";
400
+ }>>;
401
+ }, z.core.$strip>>;
402
+ }, z.core.$strip>, z.ZodObject<{
403
+ type: z.ZodLiteral<"text_editor_20250728">;
404
+ name: z.ZodLiteral<"str_replace_based_edit_tool">;
405
+ max_characters: z.ZodOptional<z.ZodNumber>;
406
+ cache_control: z.ZodOptional<z.ZodObject<{
407
+ type: z.ZodLiteral<"ephemeral">;
408
+ ttl: z.ZodOptional<z.ZodEnum<{
409
+ "5m": "5m";
410
+ "1h": "1h";
411
+ }>>;
412
+ }, z.core.$strip>>;
413
+ }, z.core.$strip>, z.ZodObject<{
414
+ type: z.ZodLiteral<"bash_20241022">;
415
+ name: z.ZodLiteral<"bash">;
416
+ cache_control: z.ZodOptional<z.ZodObject<{
417
+ type: z.ZodLiteral<"ephemeral">;
418
+ ttl: z.ZodOptional<z.ZodEnum<{
419
+ "5m": "5m";
420
+ "1h": "1h";
421
+ }>>;
422
+ }, z.core.$strip>>;
423
+ }, z.core.$strip>, z.ZodObject<{
424
+ type: z.ZodLiteral<"bash_20250124">;
425
+ name: z.ZodLiteral<"bash">;
426
+ cache_control: z.ZodOptional<z.ZodObject<{
427
+ type: z.ZodLiteral<"ephemeral">;
428
+ ttl: z.ZodOptional<z.ZodEnum<{
429
+ "5m": "5m";
430
+ "1h": "1h";
431
+ }>>;
432
+ }, z.core.$strip>>;
433
+ }, z.core.$strip>, z.ZodObject<{
434
+ type: z.ZodLiteral<"memory_20250818">;
435
+ name: z.ZodLiteral<"memory">;
436
+ }, z.core.$strip>, z.ZodObject<{
437
+ type: z.ZodLiteral<"web_search_20250305">;
438
+ name: z.ZodLiteral<"web_search">;
439
+ max_uses: z.ZodOptional<z.ZodNumber>;
440
+ allowed_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
441
+ blocked_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
442
+ user_location: z.ZodOptional<z.ZodObject<{
443
+ type: z.ZodLiteral<"approximate">;
444
+ city: z.ZodOptional<z.ZodString>;
445
+ region: z.ZodOptional<z.ZodString>;
446
+ country: z.ZodOptional<z.ZodString>;
447
+ timezone: z.ZodOptional<z.ZodString>;
448
+ }, z.core.$strip>>;
449
+ cache_control: z.ZodOptional<z.ZodObject<{
450
+ type: z.ZodLiteral<"ephemeral">;
451
+ ttl: z.ZodOptional<z.ZodEnum<{
452
+ "5m": "5m";
453
+ "1h": "1h";
454
+ }>>;
455
+ }, z.core.$strip>>;
456
+ }, z.core.$strip>, z.ZodObject<{
457
+ type: z.ZodLiteral<"web_search_20260209">;
458
+ name: z.ZodLiteral<"web_search">;
459
+ max_uses: z.ZodOptional<z.ZodNumber>;
460
+ allowed_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
461
+ blocked_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
462
+ user_location: z.ZodOptional<z.ZodObject<{
463
+ type: z.ZodLiteral<"approximate">;
464
+ city: z.ZodOptional<z.ZodString>;
465
+ region: z.ZodOptional<z.ZodString>;
466
+ country: z.ZodOptional<z.ZodString>;
467
+ timezone: z.ZodOptional<z.ZodString>;
468
+ }, z.core.$strip>>;
469
+ cache_control: z.ZodOptional<z.ZodObject<{
470
+ type: z.ZodLiteral<"ephemeral">;
471
+ ttl: z.ZodOptional<z.ZodEnum<{
472
+ "5m": "5m";
473
+ "1h": "1h";
474
+ }>>;
475
+ }, z.core.$strip>>;
476
+ }, z.core.$strip>, z.ZodObject<{
477
+ max_uses: z.ZodOptional<z.ZodNumber>;
478
+ allowed_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
479
+ blocked_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
480
+ citations: z.ZodOptional<z.ZodObject<{
481
+ enabled: z.ZodBoolean;
482
+ }, z.core.$strip>>;
483
+ max_content_tokens: z.ZodOptional<z.ZodNumber>;
484
+ cache_control: z.ZodOptional<z.ZodObject<{
485
+ type: z.ZodLiteral<"ephemeral">;
486
+ ttl: z.ZodOptional<z.ZodEnum<{
487
+ "5m": "5m";
488
+ "1h": "1h";
489
+ }>>;
490
+ }, z.core.$strip>>;
491
+ type: z.ZodLiteral<"web_fetch_20250910">;
492
+ name: z.ZodLiteral<"web_fetch">;
493
+ }, z.core.$strip>, z.ZodObject<{
494
+ max_uses: z.ZodOptional<z.ZodNumber>;
495
+ allowed_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
496
+ blocked_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
497
+ citations: z.ZodOptional<z.ZodObject<{
498
+ enabled: z.ZodBoolean;
499
+ }, z.core.$strip>>;
500
+ max_content_tokens: z.ZodOptional<z.ZodNumber>;
501
+ cache_control: z.ZodOptional<z.ZodObject<{
502
+ type: z.ZodLiteral<"ephemeral">;
503
+ ttl: z.ZodOptional<z.ZodEnum<{
504
+ "5m": "5m";
505
+ "1h": "1h";
506
+ }>>;
507
+ }, z.core.$strip>>;
508
+ type: z.ZodLiteral<"web_fetch_20260209">;
509
+ name: z.ZodLiteral<"web_fetch">;
510
+ }, z.core.$strip>, z.ZodObject<{
511
+ type: z.ZodLiteral<"tool_search_tool_regex_20251119">;
512
+ name: z.ZodLiteral<"tool_search_tool_regex">;
513
+ }, z.core.$strip>, z.ZodObject<{
514
+ type: z.ZodLiteral<"tool_search_tool_bm25_20251119">;
515
+ name: z.ZodLiteral<"tool_search_tool_bm25">;
516
+ }, z.core.$strip>]>]>>>;
517
+ top_k: z.ZodOptional<z.ZodNumber>;
518
+ top_p: z.ZodOptional<z.ZodNumber>;
519
+ mcp_servers: z.ZodOptional<z.ZodArray<z.ZodObject<{
520
+ type: z.ZodLiteral<"url">;
521
+ name: z.ZodString;
522
+ url: z.ZodString;
523
+ authorization_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
524
+ tool_configuration: z.ZodOptional<z.ZodNullable<z.ZodObject<{
525
+ enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
526
+ allowed_tools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
527
+ }, z.core.$strip>>>;
528
+ }, z.core.$strip>>>;
529
+ container: z.ZodOptional<z.ZodObject<{
530
+ id: z.ZodOptional<z.ZodString>;
531
+ skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
532
+ type: z.ZodEnum<{
533
+ custom: "custom";
534
+ anthropic: "anthropic";
535
+ }>;
536
+ skill_id: z.ZodString;
537
+ version: z.ZodOptional<z.ZodString>;
538
+ }, z.core.$strip>>>;
539
+ }, z.core.$strip>>;
540
+ context_management: z.ZodOptional<z.ZodObject<{
541
+ edits: z.ZodArray<z.ZodUnknown>;
542
+ }, z.core.$strip>>;
543
+ }, z.core.$loose>;
544
+ declare const AnthropicResponseStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
545
+ type: z.ZodLiteral<"ping">;
546
+ }, z.core.$strip>, z.ZodObject<{
547
+ type: z.ZodLiteral<"message_start">;
548
+ message: z.ZodObject<{
549
+ id: z.ZodString;
550
+ type: z.ZodLiteral<"message">;
551
+ role: z.ZodLiteral<"assistant">;
552
+ model: z.ZodString;
553
+ content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
554
+ type: z.ZodLiteral<"text">;
555
+ text: z.ZodString;
556
+ citations: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
557
+ cache_control: z.ZodOptional<z.ZodObject<{
558
+ type: z.ZodLiteral<"ephemeral">;
559
+ ttl: z.ZodOptional<z.ZodEnum<{
560
+ "5m": "5m";
561
+ "1h": "1h";
562
+ }>>;
563
+ }, z.core.$strip>>;
564
+ }, z.core.$strip>, z.ZodObject<{
565
+ type: z.ZodLiteral<"thinking">;
566
+ thinking: z.ZodString;
567
+ signature: z.ZodString;
568
+ }, z.core.$strip>, z.ZodObject<{
569
+ type: z.ZodLiteral<"redacted_thinking">;
570
+ data: z.ZodString;
571
+ }, z.core.$strip>, z.ZodObject<{
572
+ type: z.ZodLiteral<"image">;
573
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
574
+ type: z.ZodLiteral<"base64">;
575
+ media_type: z.ZodString;
576
+ data: z.ZodString;
577
+ }, z.core.$strip>, z.ZodObject<{
578
+ type: z.ZodLiteral<"url">;
579
+ url: z.ZodString;
580
+ }, z.core.$strip>, z.ZodObject<{
581
+ type: z.ZodLiteral<"text">;
582
+ media_type: z.ZodLiteral<"text/plain">;
583
+ data: z.ZodString;
584
+ }, z.core.$strip>], "type">;
585
+ cache_control: z.ZodOptional<z.ZodObject<{
586
+ type: z.ZodLiteral<"ephemeral">;
587
+ ttl: z.ZodOptional<z.ZodEnum<{
588
+ "5m": "5m";
589
+ "1h": "1h";
590
+ }>>;
591
+ }, z.core.$strip>>;
592
+ }, z.core.$strip>, z.ZodObject<{
593
+ type: z.ZodLiteral<"document">;
594
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
595
+ type: z.ZodLiteral<"base64">;
596
+ media_type: z.ZodString;
597
+ data: z.ZodString;
598
+ }, z.core.$strip>, z.ZodObject<{
599
+ type: z.ZodLiteral<"url">;
600
+ url: z.ZodString;
601
+ }, z.core.$strip>, z.ZodObject<{
602
+ type: z.ZodLiteral<"text">;
603
+ media_type: z.ZodLiteral<"text/plain">;
604
+ data: z.ZodString;
605
+ }, z.core.$strip>], "type">;
606
+ title: z.ZodOptional<z.ZodString>;
607
+ context: z.ZodOptional<z.ZodString>;
608
+ citations: z.ZodOptional<z.ZodObject<{
609
+ enabled: z.ZodBoolean;
610
+ }, z.core.$strip>>;
611
+ cache_control: z.ZodOptional<z.ZodObject<{
612
+ type: z.ZodLiteral<"ephemeral">;
613
+ ttl: z.ZodOptional<z.ZodEnum<{
614
+ "5m": "5m";
615
+ "1h": "1h";
616
+ }>>;
617
+ }, z.core.$strip>>;
618
+ }, z.core.$strip>, z.ZodObject<{
619
+ type: z.ZodLiteral<"tool_result">;
620
+ tool_use_id: z.ZodString;
621
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnknown>]>;
622
+ is_error: z.ZodOptional<z.ZodBoolean>;
623
+ cache_control: z.ZodOptional<z.ZodObject<{
624
+ type: z.ZodLiteral<"ephemeral">;
625
+ ttl: z.ZodOptional<z.ZodEnum<{
626
+ "5m": "5m";
627
+ "1h": "1h";
628
+ }>>;
629
+ }, z.core.$strip>>;
630
+ }, z.core.$strip>, z.ZodObject<{
631
+ type: z.ZodLiteral<"tool_use">;
632
+ id: z.ZodString;
633
+ name: z.ZodString;
634
+ input: z.ZodUnknown;
635
+ cache_control: z.ZodOptional<z.ZodObject<{
636
+ type: z.ZodLiteral<"ephemeral">;
637
+ ttl: z.ZodOptional<z.ZodEnum<{
638
+ "5m": "5m";
639
+ "1h": "1h";
640
+ }>>;
641
+ }, z.core.$strip>>;
642
+ }, z.core.$strip>, z.ZodObject<{
643
+ type: z.ZodLiteral<"server_tool_use">;
644
+ id: z.ZodString;
645
+ name: z.ZodEnum<{
646
+ web_fetch: "web_fetch";
647
+ web_search: "web_search";
648
+ code_execution: "code_execution";
649
+ bash_code_execution: "bash_code_execution";
650
+ text_editor_code_execution: "text_editor_code_execution";
651
+ tool_search_tool_regex: "tool_search_tool_regex";
652
+ tool_search_tool_bm25: "tool_search_tool_bm25";
653
+ }>;
654
+ input: z.ZodUnknown;
655
+ cache_control: z.ZodOptional<z.ZodObject<{
656
+ type: z.ZodLiteral<"ephemeral">;
657
+ ttl: z.ZodOptional<z.ZodEnum<{
658
+ "5m": "5m";
659
+ "1h": "1h";
660
+ }>>;
661
+ }, z.core.$strip>>;
662
+ }, z.core.$strip>, z.ZodObject<{
663
+ tool_use_id: z.ZodString;
664
+ cache_control: z.ZodOptional<z.ZodObject<{
665
+ type: z.ZodLiteral<"ephemeral">;
666
+ ttl: z.ZodOptional<z.ZodEnum<{
667
+ "5m": "5m";
668
+ "1h": "1h";
669
+ }>>;
670
+ }, z.core.$strip>>;
671
+ type: z.ZodLiteral<"web_search_tool_result">;
672
+ content: z.ZodArray<z.ZodObject<{
673
+ url: z.ZodString;
674
+ title: z.ZodNullable<z.ZodString>;
675
+ page_age: z.ZodNullable<z.ZodString>;
676
+ encrypted_content: z.ZodString;
677
+ type: z.ZodString;
678
+ }, z.core.$strip>>;
679
+ }, z.core.$loose>, z.ZodObject<{
680
+ tool_use_id: z.ZodString;
681
+ cache_control: z.ZodOptional<z.ZodObject<{
682
+ type: z.ZodLiteral<"ephemeral">;
683
+ ttl: z.ZodOptional<z.ZodEnum<{
684
+ "5m": "5m";
685
+ "1h": "1h";
686
+ }>>;
687
+ }, z.core.$strip>>;
688
+ type: z.ZodLiteral<"web_fetch_tool_result">;
689
+ content: z.ZodUnknown;
690
+ }, z.core.$loose>, z.ZodObject<{
691
+ tool_use_id: z.ZodString;
692
+ cache_control: z.ZodOptional<z.ZodObject<{
693
+ type: z.ZodLiteral<"ephemeral">;
694
+ ttl: z.ZodOptional<z.ZodEnum<{
695
+ "5m": "5m";
696
+ "1h": "1h";
697
+ }>>;
698
+ }, z.core.$strip>>;
699
+ type: z.ZodLiteral<"tool_search_tool_result">;
700
+ content: z.ZodUnknown;
701
+ }, z.core.$loose>, z.ZodObject<{
702
+ tool_use_id: z.ZodString;
703
+ cache_control: z.ZodOptional<z.ZodObject<{
704
+ type: z.ZodLiteral<"ephemeral">;
705
+ ttl: z.ZodOptional<z.ZodEnum<{
706
+ "5m": "5m";
707
+ "1h": "1h";
708
+ }>>;
709
+ }, z.core.$strip>>;
710
+ type: z.ZodLiteral<"code_execution_tool_result">;
711
+ content: z.ZodUnknown;
712
+ }, z.core.$loose>, z.ZodObject<{
713
+ tool_use_id: z.ZodString;
714
+ cache_control: z.ZodOptional<z.ZodObject<{
715
+ type: z.ZodLiteral<"ephemeral">;
716
+ ttl: z.ZodOptional<z.ZodEnum<{
717
+ "5m": "5m";
718
+ "1h": "1h";
719
+ }>>;
720
+ }, z.core.$strip>>;
721
+ type: z.ZodLiteral<"bash_code_execution_tool_result">;
722
+ content: z.ZodUnknown;
723
+ }, z.core.$loose>, z.ZodObject<{
724
+ tool_use_id: z.ZodString;
725
+ cache_control: z.ZodOptional<z.ZodObject<{
726
+ type: z.ZodLiteral<"ephemeral">;
727
+ ttl: z.ZodOptional<z.ZodEnum<{
728
+ "5m": "5m";
729
+ "1h": "1h";
730
+ }>>;
731
+ }, z.core.$strip>>;
732
+ type: z.ZodLiteral<"text_editor_code_execution_tool_result">;
733
+ content: z.ZodUnknown;
734
+ }, z.core.$loose>, z.ZodObject<{
735
+ type: z.ZodLiteral<"mcp_tool_use">;
736
+ id: z.ZodString;
737
+ name: z.ZodString;
738
+ server_name: z.ZodOptional<z.ZodString>;
739
+ input: z.ZodUnknown;
740
+ cache_control: z.ZodOptional<z.ZodObject<{
741
+ type: z.ZodLiteral<"ephemeral">;
742
+ ttl: z.ZodOptional<z.ZodEnum<{
743
+ "5m": "5m";
744
+ "1h": "1h";
745
+ }>>;
746
+ }, z.core.$strip>>;
747
+ }, z.core.$loose>, z.ZodObject<{
748
+ type: z.ZodLiteral<"mcp_tool_result">;
749
+ tool_use_id: z.ZodString;
750
+ content: z.ZodUnknown;
751
+ is_error: z.ZodOptional<z.ZodBoolean>;
752
+ cache_control: z.ZodOptional<z.ZodObject<{
753
+ type: z.ZodLiteral<"ephemeral">;
754
+ ttl: z.ZodOptional<z.ZodEnum<{
755
+ "5m": "5m";
756
+ "1h": "1h";
757
+ }>>;
758
+ }, z.core.$strip>>;
759
+ }, z.core.$loose>, z.ZodObject<{
760
+ type: z.ZodLiteral<"compaction">;
761
+ content: z.ZodString;
762
+ cache_control: z.ZodOptional<z.ZodObject<{
763
+ type: z.ZodLiteral<"ephemeral">;
764
+ ttl: z.ZodOptional<z.ZodEnum<{
765
+ "5m": "5m";
766
+ "1h": "1h";
767
+ }>>;
768
+ }, z.core.$strip>>;
769
+ }, z.core.$strip>], "type">>;
770
+ stop_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
771
+ stop_sequence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
772
+ usage: z.ZodDefault<z.ZodObject<{
773
+ input_tokens: z.ZodOptional<z.ZodNumber>;
774
+ output_tokens: z.ZodOptional<z.ZodNumber>;
775
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
776
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
777
+ iterations: z.ZodOptional<z.ZodArray<z.ZodObject<{
778
+ type: z.ZodEnum<{
779
+ message: "message";
780
+ compaction: "compaction";
781
+ }>;
782
+ input_tokens: z.ZodNumber;
783
+ output_tokens: z.ZodNumber;
784
+ }, z.core.$strip>>>;
785
+ }, z.core.$strip>>;
786
+ }, z.core.$loose>;
787
+ }, z.core.$strip>, z.ZodObject<{
788
+ type: z.ZodLiteral<"message_delta">;
789
+ delta: z.ZodObject<{
790
+ stop_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
791
+ stop_sequence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
792
+ }, z.core.$loose>;
793
+ usage: z.ZodOptional<z.ZodObject<{
794
+ input_tokens: z.ZodOptional<z.ZodNumber>;
795
+ output_tokens: z.ZodOptional<z.ZodNumber>;
796
+ cache_creation_input_tokens: z.ZodOptional<z.ZodNumber>;
797
+ cache_read_input_tokens: z.ZodOptional<z.ZodNumber>;
798
+ iterations: z.ZodOptional<z.ZodArray<z.ZodObject<{
799
+ type: z.ZodEnum<{
800
+ message: "message";
801
+ compaction: "compaction";
802
+ }>;
803
+ input_tokens: z.ZodNumber;
804
+ output_tokens: z.ZodNumber;
805
+ }, z.core.$strip>>>;
806
+ }, z.core.$loose>>;
807
+ }, z.core.$strip>, z.ZodObject<{
808
+ type: z.ZodLiteral<"message_stop">;
809
+ }, z.core.$strip>, z.ZodObject<{
810
+ type: z.ZodLiteral<"content_block_start">;
811
+ index: z.ZodNumber;
812
+ content_block: z.ZodDiscriminatedUnion<[z.ZodObject<{
813
+ type: z.ZodLiteral<"text">;
814
+ text: z.ZodString;
815
+ citations: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
816
+ cache_control: z.ZodOptional<z.ZodObject<{
817
+ type: z.ZodLiteral<"ephemeral">;
818
+ ttl: z.ZodOptional<z.ZodEnum<{
819
+ "5m": "5m";
820
+ "1h": "1h";
821
+ }>>;
822
+ }, z.core.$strip>>;
823
+ }, z.core.$strip>, z.ZodObject<{
824
+ type: z.ZodLiteral<"thinking">;
825
+ thinking: z.ZodString;
826
+ signature: z.ZodString;
827
+ }, z.core.$strip>, z.ZodObject<{
828
+ type: z.ZodLiteral<"redacted_thinking">;
829
+ data: z.ZodString;
830
+ }, z.core.$strip>, z.ZodObject<{
831
+ type: z.ZodLiteral<"image">;
832
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
833
+ type: z.ZodLiteral<"base64">;
834
+ media_type: z.ZodString;
835
+ data: z.ZodString;
836
+ }, z.core.$strip>, z.ZodObject<{
837
+ type: z.ZodLiteral<"url">;
838
+ url: z.ZodString;
839
+ }, z.core.$strip>, z.ZodObject<{
840
+ type: z.ZodLiteral<"text">;
841
+ media_type: z.ZodLiteral<"text/plain">;
842
+ data: z.ZodString;
843
+ }, z.core.$strip>], "type">;
844
+ cache_control: z.ZodOptional<z.ZodObject<{
845
+ type: z.ZodLiteral<"ephemeral">;
846
+ ttl: z.ZodOptional<z.ZodEnum<{
847
+ "5m": "5m";
848
+ "1h": "1h";
849
+ }>>;
850
+ }, z.core.$strip>>;
851
+ }, z.core.$strip>, z.ZodObject<{
852
+ type: z.ZodLiteral<"document">;
853
+ source: z.ZodDiscriminatedUnion<[z.ZodObject<{
854
+ type: z.ZodLiteral<"base64">;
855
+ media_type: z.ZodString;
856
+ data: z.ZodString;
857
+ }, z.core.$strip>, z.ZodObject<{
858
+ type: z.ZodLiteral<"url">;
859
+ url: z.ZodString;
860
+ }, z.core.$strip>, z.ZodObject<{
861
+ type: z.ZodLiteral<"text">;
862
+ media_type: z.ZodLiteral<"text/plain">;
863
+ data: z.ZodString;
864
+ }, z.core.$strip>], "type">;
865
+ title: z.ZodOptional<z.ZodString>;
866
+ context: z.ZodOptional<z.ZodString>;
867
+ citations: z.ZodOptional<z.ZodObject<{
868
+ enabled: z.ZodBoolean;
869
+ }, z.core.$strip>>;
870
+ cache_control: z.ZodOptional<z.ZodObject<{
871
+ type: z.ZodLiteral<"ephemeral">;
872
+ ttl: z.ZodOptional<z.ZodEnum<{
873
+ "5m": "5m";
874
+ "1h": "1h";
875
+ }>>;
876
+ }, z.core.$strip>>;
877
+ }, z.core.$strip>, z.ZodObject<{
878
+ type: z.ZodLiteral<"tool_result">;
879
+ tool_use_id: z.ZodString;
880
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnknown>]>;
881
+ is_error: z.ZodOptional<z.ZodBoolean>;
882
+ cache_control: z.ZodOptional<z.ZodObject<{
883
+ type: z.ZodLiteral<"ephemeral">;
884
+ ttl: z.ZodOptional<z.ZodEnum<{
885
+ "5m": "5m";
886
+ "1h": "1h";
887
+ }>>;
888
+ }, z.core.$strip>>;
889
+ }, z.core.$strip>, z.ZodObject<{
890
+ type: z.ZodLiteral<"tool_use">;
891
+ id: z.ZodString;
892
+ name: z.ZodString;
893
+ input: z.ZodUnknown;
894
+ cache_control: z.ZodOptional<z.ZodObject<{
895
+ type: z.ZodLiteral<"ephemeral">;
896
+ ttl: z.ZodOptional<z.ZodEnum<{
897
+ "5m": "5m";
898
+ "1h": "1h";
899
+ }>>;
900
+ }, z.core.$strip>>;
901
+ }, z.core.$strip>, z.ZodObject<{
902
+ type: z.ZodLiteral<"server_tool_use">;
903
+ id: z.ZodString;
904
+ name: z.ZodEnum<{
905
+ web_fetch: "web_fetch";
906
+ web_search: "web_search";
907
+ code_execution: "code_execution";
908
+ bash_code_execution: "bash_code_execution";
909
+ text_editor_code_execution: "text_editor_code_execution";
910
+ tool_search_tool_regex: "tool_search_tool_regex";
911
+ tool_search_tool_bm25: "tool_search_tool_bm25";
912
+ }>;
913
+ input: z.ZodUnknown;
914
+ cache_control: z.ZodOptional<z.ZodObject<{
915
+ type: z.ZodLiteral<"ephemeral">;
916
+ ttl: z.ZodOptional<z.ZodEnum<{
917
+ "5m": "5m";
918
+ "1h": "1h";
919
+ }>>;
920
+ }, z.core.$strip>>;
921
+ }, z.core.$strip>, z.ZodObject<{
922
+ tool_use_id: z.ZodString;
923
+ cache_control: z.ZodOptional<z.ZodObject<{
924
+ type: z.ZodLiteral<"ephemeral">;
925
+ ttl: z.ZodOptional<z.ZodEnum<{
926
+ "5m": "5m";
927
+ "1h": "1h";
928
+ }>>;
929
+ }, z.core.$strip>>;
930
+ type: z.ZodLiteral<"web_search_tool_result">;
931
+ content: z.ZodArray<z.ZodObject<{
932
+ url: z.ZodString;
933
+ title: z.ZodNullable<z.ZodString>;
934
+ page_age: z.ZodNullable<z.ZodString>;
935
+ encrypted_content: z.ZodString;
936
+ type: z.ZodString;
937
+ }, z.core.$strip>>;
938
+ }, z.core.$loose>, z.ZodObject<{
939
+ tool_use_id: z.ZodString;
940
+ cache_control: z.ZodOptional<z.ZodObject<{
941
+ type: z.ZodLiteral<"ephemeral">;
942
+ ttl: z.ZodOptional<z.ZodEnum<{
943
+ "5m": "5m";
944
+ "1h": "1h";
945
+ }>>;
946
+ }, z.core.$strip>>;
947
+ type: z.ZodLiteral<"web_fetch_tool_result">;
948
+ content: z.ZodUnknown;
949
+ }, z.core.$loose>, z.ZodObject<{
950
+ tool_use_id: z.ZodString;
951
+ cache_control: z.ZodOptional<z.ZodObject<{
952
+ type: z.ZodLiteral<"ephemeral">;
953
+ ttl: z.ZodOptional<z.ZodEnum<{
954
+ "5m": "5m";
955
+ "1h": "1h";
956
+ }>>;
957
+ }, z.core.$strip>>;
958
+ type: z.ZodLiteral<"tool_search_tool_result">;
959
+ content: z.ZodUnknown;
960
+ }, z.core.$loose>, z.ZodObject<{
961
+ tool_use_id: z.ZodString;
962
+ cache_control: z.ZodOptional<z.ZodObject<{
963
+ type: z.ZodLiteral<"ephemeral">;
964
+ ttl: z.ZodOptional<z.ZodEnum<{
965
+ "5m": "5m";
966
+ "1h": "1h";
967
+ }>>;
968
+ }, z.core.$strip>>;
969
+ type: z.ZodLiteral<"code_execution_tool_result">;
970
+ content: z.ZodUnknown;
971
+ }, z.core.$loose>, z.ZodObject<{
972
+ tool_use_id: z.ZodString;
973
+ cache_control: z.ZodOptional<z.ZodObject<{
974
+ type: z.ZodLiteral<"ephemeral">;
975
+ ttl: z.ZodOptional<z.ZodEnum<{
976
+ "5m": "5m";
977
+ "1h": "1h";
978
+ }>>;
979
+ }, z.core.$strip>>;
980
+ type: z.ZodLiteral<"bash_code_execution_tool_result">;
981
+ content: z.ZodUnknown;
982
+ }, z.core.$loose>, z.ZodObject<{
983
+ tool_use_id: z.ZodString;
984
+ cache_control: z.ZodOptional<z.ZodObject<{
985
+ type: z.ZodLiteral<"ephemeral">;
986
+ ttl: z.ZodOptional<z.ZodEnum<{
987
+ "5m": "5m";
988
+ "1h": "1h";
989
+ }>>;
990
+ }, z.core.$strip>>;
991
+ type: z.ZodLiteral<"text_editor_code_execution_tool_result">;
992
+ content: z.ZodUnknown;
993
+ }, z.core.$loose>, z.ZodObject<{
994
+ type: z.ZodLiteral<"mcp_tool_use">;
995
+ id: z.ZodString;
996
+ name: z.ZodString;
997
+ server_name: z.ZodOptional<z.ZodString>;
998
+ input: z.ZodUnknown;
999
+ cache_control: z.ZodOptional<z.ZodObject<{
1000
+ type: z.ZodLiteral<"ephemeral">;
1001
+ ttl: z.ZodOptional<z.ZodEnum<{
1002
+ "5m": "5m";
1003
+ "1h": "1h";
1004
+ }>>;
1005
+ }, z.core.$strip>>;
1006
+ }, z.core.$loose>, z.ZodObject<{
1007
+ type: z.ZodLiteral<"mcp_tool_result">;
1008
+ tool_use_id: z.ZodString;
1009
+ content: z.ZodUnknown;
1010
+ is_error: z.ZodOptional<z.ZodBoolean>;
1011
+ cache_control: z.ZodOptional<z.ZodObject<{
1012
+ type: z.ZodLiteral<"ephemeral">;
1013
+ ttl: z.ZodOptional<z.ZodEnum<{
1014
+ "5m": "5m";
1015
+ "1h": "1h";
1016
+ }>>;
1017
+ }, z.core.$strip>>;
1018
+ }, z.core.$loose>, z.ZodObject<{
1019
+ type: z.ZodLiteral<"compaction">;
1020
+ content: z.ZodString;
1021
+ cache_control: z.ZodOptional<z.ZodObject<{
1022
+ type: z.ZodLiteral<"ephemeral">;
1023
+ ttl: z.ZodOptional<z.ZodEnum<{
1024
+ "5m": "5m";
1025
+ "1h": "1h";
1026
+ }>>;
1027
+ }, z.core.$strip>>;
1028
+ }, z.core.$strip>], "type">;
1029
+ }, z.core.$strip>, z.ZodObject<{
1030
+ type: z.ZodLiteral<"content_block_delta">;
1031
+ index: z.ZodNumber;
1032
+ delta: z.ZodDiscriminatedUnion<[z.ZodObject<{
1033
+ type: z.ZodLiteral<"text_delta">;
1034
+ text: z.ZodString;
1035
+ }, z.core.$strip>, z.ZodObject<{
1036
+ type: z.ZodLiteral<"thinking_delta">;
1037
+ thinking: z.ZodString;
1038
+ }, z.core.$strip>, z.ZodObject<{
1039
+ type: z.ZodLiteral<"input_json_delta">;
1040
+ partial_json: z.ZodString;
1041
+ }, z.core.$strip>, z.ZodObject<{
1042
+ type: z.ZodLiteral<"signature_delta">;
1043
+ signature: z.ZodString;
1044
+ }, z.core.$strip>, z.ZodObject<{
1045
+ type: z.ZodLiteral<"citations_delta">;
1046
+ citation: z.ZodUnknown;
1047
+ }, z.core.$strip>, z.ZodObject<{
1048
+ type: z.ZodLiteral<"compaction_delta">;
1049
+ content: z.ZodOptional<z.ZodString>;
1050
+ }, z.core.$strip>], "type">;
1051
+ }, z.core.$strip>, z.ZodObject<{
1052
+ type: z.ZodLiteral<"content_block_stop">;
1053
+ index: z.ZodNumber;
1054
+ }, z.core.$strip>, z.ZodObject<{
1055
+ type: z.ZodLiteral<"error">;
1056
+ error: z.ZodObject<{
1057
+ type: z.ZodOptional<z.ZodString>;
1058
+ message: z.ZodOptional<z.ZodString>;
1059
+ }, z.core.$loose>;
1060
+ }, z.core.$strip>], "type">;
1061
+ //#endregion
1062
+ //#region src/anthropic/responses/types.d.ts
1063
+ interface AnthropicResponseCaps extends Capabilities {
1064
+ inputModalities: {
1065
+ text: true;
1066
+ image: true;
1067
+ file: true;
1068
+ };
1069
+ inputShape: "chat";
1070
+ replayMode: "multi_turn";
1071
+ supportsInstruction: true;
1072
+ outputModalities: {
1073
+ text: {
1074
+ options: {
1075
+ max_tokens?: AnthropicMessagesRequestSchema["max_tokens"];
1076
+ temperature?: AnthropicMessagesRequestSchema["temperature"];
1077
+ top_k?: AnthropicMessagesRequestSchema["top_k"];
1078
+ top_p?: AnthropicMessagesRequestSchema["top_p"];
1079
+ };
1080
+ };
1081
+ };
1082
+ tools: true;
1083
+ structured_output: true;
1084
+ additionalSupportedRoles: readonly ["developer"];
1085
+ }
1086
+ type AnthropicResponseEndpointOptions = {
1087
+ max_tokens?: AnthropicMessagesRequestSchema["max_tokens"];
1088
+ metadata?: {
1089
+ userId?: string;
1090
+ };
1091
+ stop_sequences?: AnthropicMessagesRequestSchema["stop_sequences"];
1092
+ temperature?: AnthropicMessagesRequestSchema["temperature"];
1093
+ thinking?: {
1094
+ type: "adaptive";
1095
+ } | {
1096
+ type: "enabled";
1097
+ budgetTokens?: number;
1098
+ } | {
1099
+ type: "disabled";
1100
+ };
1101
+ top_k?: AnthropicMessagesRequestSchema["top_k"];
1102
+ top_p?: AnthropicMessagesRequestSchema["top_p"];
1103
+ structuredOutputMode?: "outputFormat" | "jsonTool" | "auto";
1104
+ disableParallelToolUse?: boolean;
1105
+ cacheControl?: {
1106
+ type: "ephemeral";
1107
+ ttl?: "5m" | "1h";
1108
+ };
1109
+ mcpServers?: Array<{
1110
+ type: "url";
1111
+ name: string;
1112
+ url: string;
1113
+ authorizationToken?: string | null;
1114
+ toolConfiguration?: {
1115
+ enabled?: boolean | null;
1116
+ allowedTools?: string[] | null;
1117
+ } | null;
1118
+ }>;
1119
+ container?: {
1120
+ id?: string;
1121
+ skills?: Array<{
1122
+ type: "anthropic" | "custom";
1123
+ skillId: string;
1124
+ version?: string;
1125
+ }>;
1126
+ };
1127
+ toolStreaming?: boolean;
1128
+ effort?: "low" | "medium" | "high" | "max";
1129
+ speed?: "fast" | "standard";
1130
+ anthropicBeta?: string[];
1131
+ contextManagement?: {
1132
+ edits: unknown[];
1133
+ };
1134
+ };
1135
+ type SuggestedModelId<TKnown extends string> = TKnown | (string & {});
1136
+ type AnthropicResponseModelId = SuggestedModelId<AnthropicResponseModels>;
1137
+ type AnthropicResponseGenerativeModel<M extends AnthropicResponseModelId = AnthropicResponseModelId> = GenerativeModel<AnthropicResponseEndpointOptions, "anthropic", M, AnthropicResponseCaps>;
1138
+ //#endregion
1139
+ //#region src/anthropic/tools/index.d.ts
1140
+ type AnthropicNativeToolByType<TType extends string> = NonNullable<AnthropicMessagesRequestSchema["tools"]>[number] extends infer TTool ? TTool extends {
1141
+ type: infer ToolType extends string;
1142
+ } ? TType extends ToolType ? TTool : never : never : never;
1143
+ type AnthropicNativeToolConfig<TType extends string> = Omit<AnthropicNativeToolByType<TType>, "type" | "name" | "cache_control">;
1144
+ type AnthropicNativeToolType = "code_execution_20250522" | "code_execution_20250825" | "code_execution_20260120" | "computer_20241022" | "computer_20250124" | "computer_20251124" | "text_editor_20241022" | "text_editor_20250124" | "text_editor_20250429" | "text_editor_20250728" | "bash_20241022" | "bash_20250124" | "memory_20250818" | "web_search_20250305" | "web_search_20260209" | "web_fetch_20250910" | "web_fetch_20260209" | "tool_search_tool_regex_20251119" | "tool_search_tool_bm25_20251119";
1145
+ type AnthropicNativeToolDefinition<TType extends AnthropicNativeToolType = AnthropicNativeToolType> = HostedToolDefinition<"anthropic", TType, AnthropicNativeToolConfig<TType>>;
1146
+ type AnthropicNativeToolBuilders = ReturnType<typeof createAnthropicNativeToolBuilders>;
1147
+ declare function createAnthropicNativeToolBuilders(): {
1148
+ codeExecution_20250522: (config?: AnthropicNativeToolConfig<"code_execution_20250522">) => AnthropicNativeToolDefinition<"code_execution_20250522">;
1149
+ codeExecution_20250825: (config?: AnthropicNativeToolConfig<"code_execution_20250825">) => AnthropicNativeToolDefinition<"code_execution_20250825">;
1150
+ codeExecution_20260120: (config?: AnthropicNativeToolConfig<"code_execution_20260120">) => AnthropicNativeToolDefinition<"code_execution_20260120">;
1151
+ computer_20241022: (config: AnthropicNativeToolConfig<"computer_20241022">) => AnthropicNativeToolDefinition<"computer_20241022">;
1152
+ computer_20250124: (config: AnthropicNativeToolConfig<"computer_20250124">) => AnthropicNativeToolDefinition<"computer_20250124">;
1153
+ computer_20251124: (config: AnthropicNativeToolConfig<"computer_20251124">) => AnthropicNativeToolDefinition<"computer_20251124">;
1154
+ textEditor_20241022: (config?: AnthropicNativeToolConfig<"text_editor_20241022">) => AnthropicNativeToolDefinition<"text_editor_20241022">;
1155
+ textEditor_20250124: (config?: AnthropicNativeToolConfig<"text_editor_20250124">) => AnthropicNativeToolDefinition<"text_editor_20250124">;
1156
+ textEditor_20250429: (config?: AnthropicNativeToolConfig<"text_editor_20250429">) => AnthropicNativeToolDefinition<"text_editor_20250429">;
1157
+ textEditor_20250728: (config?: AnthropicNativeToolConfig<"text_editor_20250728">) => AnthropicNativeToolDefinition<"text_editor_20250728">;
1158
+ bash_20241022: (config?: AnthropicNativeToolConfig<"bash_20241022">) => AnthropicNativeToolDefinition<"bash_20241022">;
1159
+ bash_20250124: (config?: AnthropicNativeToolConfig<"bash_20250124">) => AnthropicNativeToolDefinition<"bash_20250124">;
1160
+ memory_20250818: (config?: AnthropicNativeToolConfig<"memory_20250818">) => AnthropicNativeToolDefinition<"memory_20250818">;
1161
+ webSearch_20250305: (config?: AnthropicNativeToolConfig<"web_search_20250305">) => AnthropicNativeToolDefinition<"web_search_20250305">;
1162
+ webSearch_20260209: (config?: AnthropicNativeToolConfig<"web_search_20260209">) => AnthropicNativeToolDefinition<"web_search_20260209">;
1163
+ webFetch_20250910: (config?: AnthropicNativeToolConfig<"web_fetch_20250910">) => AnthropicNativeToolDefinition<"web_fetch_20250910">;
1164
+ webFetch_20260209: (config?: AnthropicNativeToolConfig<"web_fetch_20260209">) => AnthropicNativeToolDefinition<"web_fetch_20260209">;
1165
+ toolSearchRegex_20251119: (config?: AnthropicNativeToolConfig<"tool_search_tool_regex_20251119">) => AnthropicNativeToolDefinition<"tool_search_tool_regex_20251119">;
1166
+ toolSearchBm25_20251119: (config?: AnthropicNativeToolConfig<"tool_search_tool_bm25_20251119">) => AnthropicNativeToolDefinition<"tool_search_tool_bm25_20251119">;
1167
+ };
1168
+ //#endregion
1169
+ //#region src/anthropic/types.d.ts
1170
+ type AnthropicConfig = {
1171
+ apiKey?: string;
1172
+ authToken?: string;
1173
+ baseURL?: string;
1174
+ headers?: Record<string, string>;
1175
+ anthropicVersion?: string;
1176
+ };
1177
+ type AnthropicError = {
1178
+ error?: {
1179
+ type?: string;
1180
+ message?: string;
1181
+ };
1182
+ };
1183
+ type AnthropicModelId = AnthropicResponseModelId;
1184
+ type AnthropicGenerativeModel<M extends AnthropicModelId = AnthropicModelId> = AnthropicResponseGenerativeModel<M>;
1185
+ interface AnthropicProvider {
1186
+ readonly id: "anthropic";
1187
+ readonly tools: AnthropicNativeToolBuilders;
1188
+ model<M extends AnthropicModelId>(modelId: M): AnthropicGenerativeModel<M>;
1189
+ text<M extends AnthropicResponseModelId>(modelId: M): AnthropicResponseGenerativeModel<M>;
1190
+ }
1191
+ //#endregion
1192
+ //#region src/anthropic/provider.d.ts
1193
+ declare const createAnthropic: (config: AnthropicConfig) => AnthropicProvider;
1194
+ //#endregion
1195
+ export { AnthropicConfig, AnthropicError, AnthropicGenerativeModel, AnthropicModelId, AnthropicProvider, type AnthropicResponseCaps, type AnthropicResponseEndpointOptions, type AnthropicResponseGenerativeModel, type AnthropicResponseModelId, type AnthropicResponseStreamEvent, createAnthropic };
1196
+ //# sourceMappingURL=index.d.mts.map