@effect/ai-anthropic 0.16.1 → 0.17.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 (48) hide show
  1. package/AnthropicTool/package.json +6 -0
  2. package/dist/cjs/AnthropicClient.js +286 -190
  3. package/dist/cjs/AnthropicClient.js.map +1 -1
  4. package/dist/cjs/AnthropicLanguageModel.js +1026 -311
  5. package/dist/cjs/AnthropicLanguageModel.js.map +1 -1
  6. package/dist/cjs/AnthropicTokenizer.js +8 -6
  7. package/dist/cjs/AnthropicTokenizer.js.map +1 -1
  8. package/dist/cjs/AnthropicTool.js +461 -0
  9. package/dist/cjs/AnthropicTool.js.map +1 -0
  10. package/dist/cjs/Generated.js +3507 -1230
  11. package/dist/cjs/Generated.js.map +1 -1
  12. package/dist/cjs/index.js +3 -1
  13. package/dist/cjs/internal/utilities.js +13 -3
  14. package/dist/cjs/internal/utilities.js.map +1 -1
  15. package/dist/dts/AnthropicClient.d.ts +673 -17
  16. package/dist/dts/AnthropicClient.d.ts.map +1 -1
  17. package/dist/dts/AnthropicLanguageModel.d.ts +217 -26
  18. package/dist/dts/AnthropicLanguageModel.d.ts.map +1 -1
  19. package/dist/dts/AnthropicTokenizer.d.ts +1 -1
  20. package/dist/dts/AnthropicTokenizer.d.ts.map +1 -1
  21. package/dist/dts/AnthropicTool.d.ts +523 -0
  22. package/dist/dts/AnthropicTool.d.ts.map +1 -0
  23. package/dist/dts/Generated.d.ts +7863 -3496
  24. package/dist/dts/Generated.d.ts.map +1 -1
  25. package/dist/dts/index.d.ts +4 -0
  26. package/dist/dts/index.d.ts.map +1 -1
  27. package/dist/esm/AnthropicClient.js +269 -188
  28. package/dist/esm/AnthropicClient.js.map +1 -1
  29. package/dist/esm/AnthropicLanguageModel.js +1022 -306
  30. package/dist/esm/AnthropicLanguageModel.js.map +1 -1
  31. package/dist/esm/AnthropicTokenizer.js +8 -6
  32. package/dist/esm/AnthropicTokenizer.js.map +1 -1
  33. package/dist/esm/AnthropicTool.js +452 -0
  34. package/dist/esm/AnthropicTool.js.map +1 -0
  35. package/dist/esm/Generated.js +3492 -1063
  36. package/dist/esm/Generated.js.map +1 -1
  37. package/dist/esm/index.js +4 -0
  38. package/dist/esm/index.js.map +1 -1
  39. package/dist/esm/internal/utilities.js +12 -2
  40. package/dist/esm/internal/utilities.js.map +1 -1
  41. package/package.json +11 -3
  42. package/src/AnthropicClient.ts +713 -369
  43. package/src/AnthropicLanguageModel.ts +1404 -345
  44. package/src/AnthropicTokenizer.ts +14 -23
  45. package/src/AnthropicTool.ts +553 -0
  46. package/src/Generated.ts +4165 -1681
  47. package/src/index.ts +5 -0
  48. package/src/internal/utilities.ts +18 -4
@@ -0,0 +1,523 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import * as Tool from "@effect/ai/Tool";
5
+ import * as Schema from "effect/Schema";
6
+ import * as Generated from "./Generated.js";
7
+ /**
8
+ * @since 1.0.0
9
+ * @category Schemas
10
+ */
11
+ export declare const ProviderDefinedTools: Schema.Union<[
12
+ typeof Generated.BetaBashTool20241022,
13
+ typeof Generated.BetaBashTool20250124,
14
+ typeof Generated.BetaCodeExecutionTool20250522,
15
+ typeof Generated.BetaComputerUseTool20241022,
16
+ typeof Generated.BetaComputerUseTool20250124,
17
+ typeof Generated.BetaTextEditor20241022,
18
+ typeof Generated.BetaTextEditor20250124,
19
+ typeof Generated.BetaTextEditor20250429,
20
+ typeof Generated.BetaTextEditor20250728,
21
+ typeof Generated.BetaWebSearchTool20250305
22
+ ]>;
23
+ /**
24
+ * @since 1.0.0
25
+ * @category Schemas
26
+ */
27
+ export type ProviderDefinedTools = typeof ProviderDefinedTools.Type;
28
+ /**
29
+ * @since 1.0.0
30
+ * @category Tools
31
+ */
32
+ export declare const Bash_20241022: (args: {}) => Tool.ProviderDefined<"AnthropicBash", {
33
+ readonly args: Schema.Struct<{}>;
34
+ readonly parameters: Schema.Struct<{
35
+ /**
36
+ * The Bash command to run.
37
+ */
38
+ command: typeof Schema.NonEmptyString;
39
+ /**
40
+ * If `true`, restart the Bash session.
41
+ */
42
+ restart: Schema.optional<typeof Schema.Boolean>;
43
+ }>;
44
+ readonly success: typeof Schema.String;
45
+ readonly failure: typeof Schema.Never;
46
+ }, true>;
47
+ /**
48
+ * @since 1.0.0
49
+ * @category Tools
50
+ */
51
+ export declare const Bash_20250124: (args: {}) => Tool.ProviderDefined<"AnthropicBash", {
52
+ readonly args: Schema.Struct<{}>;
53
+ readonly parameters: Schema.Struct<{
54
+ /**
55
+ * The Bash command to run.
56
+ */
57
+ command: typeof Schema.NonEmptyString;
58
+ /**
59
+ * If `true`, restart the Bash session.
60
+ */
61
+ restart: Schema.optional<typeof Schema.Boolean>;
62
+ }>;
63
+ readonly success: typeof Schema.String;
64
+ readonly failure: typeof Schema.Never;
65
+ }, true>;
66
+ /**
67
+ * @since 1.0.0
68
+ * @category Tools
69
+ */
70
+ export declare const CodeExecution_20250522: (args: {
71
+ readonly cache_control?: {
72
+ readonly type: "ephemeral";
73
+ readonly ttl?: "5m" | "1h" | null | undefined;
74
+ } | null | undefined;
75
+ }) => Tool.ProviderDefined<"AnthropicCodeExecution", {
76
+ readonly args: Schema.Struct<{
77
+ readonly cache_control: Schema.optionalWith<typeof Generated.BetaCacheControlEphemeral, {
78
+ nullable: true;
79
+ }>;
80
+ }>;
81
+ readonly parameters: Schema.Struct<{}>;
82
+ readonly success: typeof Generated.BetaResponseCodeExecutionResultBlock;
83
+ readonly failure: typeof Generated.BetaResponseCodeExecutionToolResultError;
84
+ }, false>;
85
+ /**
86
+ * @since 1.0.0
87
+ * @category Tools
88
+ */
89
+ export declare const CodeExecution_20250825: (args: {
90
+ readonly cache_control?: {
91
+ readonly type: "ephemeral";
92
+ readonly ttl?: "5m" | "1h" | null | undefined;
93
+ } | null | undefined;
94
+ }) => Tool.ProviderDefined<"AnthropicCodeExecution", {
95
+ readonly args: Schema.Struct<{
96
+ readonly cache_control: Schema.optionalWith<typeof Generated.BetaCacheControlEphemeral, {
97
+ nullable: true;
98
+ }>;
99
+ }>;
100
+ readonly parameters: Schema.Struct<{}>;
101
+ readonly success: Schema.Union<[typeof Generated.BetaResponseBashCodeExecutionResultBlock, typeof Generated.BetaResponseTextEditorCodeExecutionViewResultBlock, typeof Generated.BetaResponseTextEditorCodeExecutionCreateResultBlock, typeof Generated.BetaResponseTextEditorCodeExecutionStrReplaceResultBlock]>;
102
+ readonly failure: Schema.Union<[typeof Generated.BetaResponseCodeExecutionToolResultError, typeof Generated.BetaResponseTextEditorCodeExecutionToolResultError]>;
103
+ }, false>;
104
+ /**
105
+ * @since 1.0.0
106
+ * @category Models
107
+ */
108
+ export declare const Coordinate: Schema.Tuple2<typeof Schema.Number, typeof Schema.Number>;
109
+ /**
110
+ * Allow Claude to interact with computer environments through the computer use
111
+ * tool, which provides screenshot capabilities and mouse/keyboard control for
112
+ * autonomous desktop interaction.
113
+ *
114
+ * @since 1.0.0
115
+ * @category Tools
116
+ */
117
+ export declare const ComputerUse_20241022: (args: {
118
+ readonly display_height_px: number;
119
+ readonly display_width_px: number;
120
+ readonly cache_control?: {
121
+ readonly type: "ephemeral";
122
+ readonly ttl?: "5m" | "1h" | null | undefined;
123
+ } | null | undefined;
124
+ readonly display_number?: number | null | undefined;
125
+ }) => Tool.ProviderDefined<"AnthropicComputerUse", {
126
+ readonly args: Schema.Struct<{
127
+ readonly cache_control: Schema.optionalWith<typeof Generated.BetaCacheControlEphemeral, {
128
+ nullable: true;
129
+ }>;
130
+ readonly display_height_px: Schema.filter<typeof Schema.Int>;
131
+ readonly display_number: Schema.optionalWith<Schema.filter<typeof Schema.Int>, {
132
+ nullable: true;
133
+ }>;
134
+ readonly display_width_px: Schema.filter<typeof Schema.Int>;
135
+ }>;
136
+ readonly parameters: Schema.Struct<{
137
+ /**
138
+ * The action to perform. The available actions are:
139
+ * - `screenshot`: Take a screenshot of the screen.
140
+ * - `left_click`: Click the left mouse button at the specified (x, y) pixel
141
+ * coordinate on the screen. You can also include a key combination to
142
+ * hold down while clicking using the `text` parameter.
143
+ * - `type`: Type a string of text on the keyboard.
144
+ * - `key`: Press a key or key-combination on the keyboard.
145
+ * - This supports xdotool's `key` syntax.
146
+ * - Examples: "a", "Return", "alt+Tab", "ctrl+s", "Up", "KP_0" (for the
147
+ * numpad 0 key).
148
+ * - `mouse_move`: Move the cursor to a specified (x, y) pixel coordinate on
149
+ * the screen.
150
+ */
151
+ action: Schema.Literal<["screenshot", "left_click", "type", "key", "mouse_move"]>;
152
+ /**
153
+ * The x (pixels from the left edge) and y (pixels from the top edge)
154
+ * coordinates to move the mouse to. Required only by `action=mouse_move`.
155
+ */
156
+ coordinate: Schema.optional<Schema.Tuple2<typeof Schema.Number, typeof Schema.Number>>;
157
+ /**
158
+ * Required only by `action=type` and `action=key`.
159
+ */
160
+ text: Schema.optional<typeof Schema.String>;
161
+ }>;
162
+ readonly success: typeof Schema.String;
163
+ readonly failure: typeof Schema.Never;
164
+ }, true>;
165
+ /**
166
+ * Allow Claude to interact with computer environments through the computer use
167
+ * tool, which provides screenshot capabilities and mouse/keyboard control for
168
+ * autonomous desktop interaction.
169
+ *
170
+ * @since 1.0.0
171
+ * @category Tools
172
+ */
173
+ export declare const ComputerUse_20250124: (args: {
174
+ readonly display_height_px: number;
175
+ readonly display_width_px: number;
176
+ readonly cache_control?: {
177
+ readonly type: "ephemeral";
178
+ readonly ttl?: "5m" | "1h" | null | undefined;
179
+ } | null | undefined;
180
+ readonly display_number?: number | null | undefined;
181
+ }) => Tool.ProviderDefined<"AnthropicComputerUse", {
182
+ readonly args: Schema.Struct<{
183
+ readonly cache_control: Schema.optionalWith<typeof Generated.BetaCacheControlEphemeral, {
184
+ nullable: true;
185
+ }>;
186
+ readonly display_height_px: Schema.filter<typeof Schema.Int>;
187
+ readonly display_number: Schema.optionalWith<Schema.filter<typeof Schema.Int>, {
188
+ nullable: true;
189
+ }>;
190
+ readonly display_width_px: Schema.filter<typeof Schema.Int>;
191
+ }>;
192
+ readonly parameters: Schema.Struct<{
193
+ /**
194
+ * The action to perform. The available actions are:
195
+ * - `screenshot`: Take a screenshot of the screen.
196
+ * - `left_click`: Click the left mouse button at the specified (x, y) pixel
197
+ * coordinate on the screen. You can also include a key combination to
198
+ * hold down while clicking using the `text` parameter.
199
+ * - `type`: Type a string of text on the keyboard.
200
+ * - `key`: Press a key or key-combination on the keyboard.
201
+ * - This supports xdotool's `key` syntax.
202
+ * - Examples: "a", "Return", "alt+Tab", "ctrl+s", "Up", "KP_0" (for the
203
+ * numpad 0 key).
204
+ * - `mouse_move`: Move the cursor to a specified (x, y) pixel coordinate on
205
+ * - `scroll`: Scroll the screen in a specified direction by a specified
206
+ * amount of clicks of the scroll wheel, at the specified (x, y) pixel
207
+ * coordinate. DO NOT use PageUp/PageDown to scroll.
208
+ * - `left_click_drag`: Click and drag the cursor from `start_coordinate`
209
+ * to a specified (x, y) pixel coordinate on the screen.
210
+ * the screen.
211
+ * - `middle_click`: Click the middle mouse button at the specified (x, y)
212
+ * pixel coordinate on the screen.
213
+ * - `right_click`: Click the right mouse button at the specified (x, y)
214
+ * pixel coordinate on the screen.
215
+ * - `double_click`: Double-click the left mouse button at the specified
216
+ * (x, y) pixel coordinate on the screen.
217
+ * - `triple_click`: Triple-click the left mouse button at the specified
218
+ * (x, y) pixel coordinate on the screen.
219
+ * - `left_mouse_down`: Press the left mouse button.
220
+ * - `left_mouse_up`: Release the left mouse button.
221
+ * - `hold_key`: Hold down a key or multiple keys for a specified duration
222
+ * (in seconds). Supports the same syntax as `key`.
223
+ * - `wait`: Wait for a specified duration (in seconds).
224
+ */
225
+ action: Schema.Literal<["screenshot", "left_click", "type", "key", "mouse_move", "scroll", "left_click_drag", "middle_click", "right_click", "double_click", "triple_click", "left_mouse_down", "left_mouse_up", "hold_key", "wait"]>;
226
+ /**
227
+ * The x (pixels from the left edge) and y (pixels from the top edge)
228
+ * coordinates to move the mouse to. Required only by `action=mouse_move`
229
+ * and `action=left_click_drag`.
230
+ */
231
+ coordinate: Schema.optional<Schema.Tuple2<typeof Schema.Number, typeof Schema.Number>>;
232
+ /**
233
+ * The x (pixels from the left edge) and y (pixels from the top edge)
234
+ * coordinates to start the drag from. Required only by
235
+ * `action=left_click_drag`.
236
+ */
237
+ start_coordinate: Schema.optional<Schema.Tuple2<typeof Schema.Number, typeof Schema.Number>>;
238
+ /**
239
+ * Required only by `action=type`, `action=key`, and `action=hold_key`. Can
240
+ * also be used by click or scroll actions to hold down keys while clicking
241
+ * or scrolling.
242
+ */
243
+ text: Schema.optional<typeof Schema.String>;
244
+ /**
245
+ * The direction to scroll the screen. Required only by `action=scroll`.
246
+ */
247
+ scroll_direction: Schema.optional<Schema.Literal<["up", "down", "left", "right"]>>;
248
+ /**
249
+ * The number of "clicks" of the scroll wheel to scroll. Required only by
250
+ * `action=scroll`.
251
+ */
252
+ scroll_amount: Schema.optional<typeof Schema.Number>;
253
+ /**
254
+ * The duration to hold the key down for. Required only by `action=hold_key`
255
+ * and `action=wait`.
256
+ */
257
+ duration: Schema.optional<typeof Schema.Number>;
258
+ }>;
259
+ readonly success: typeof Schema.String;
260
+ readonly failure: typeof Schema.Never;
261
+ }, true>;
262
+ /**
263
+ * Allow Claude to directly interact with your files, providing hands-on
264
+ * assistance rather than just suggesting changes.
265
+ *
266
+ * @since 1.0.0
267
+ * @category Tools
268
+ */
269
+ export declare const TextEditor_20241022: (args: {}) => Tool.ProviderDefined<"AnthropicTextEditor", {
270
+ readonly args: Schema.Struct<{}>;
271
+ readonly parameters: Schema.Struct<{
272
+ /**
273
+ * The command to run.
274
+ */
275
+ command: Schema.Literal<["view", "create", "str_replace", "insert", "undo_edit"]>;
276
+ /**
277
+ * Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`.
278
+ */
279
+ path: typeof Schema.String;
280
+ /**
281
+ * Required parameter of `create` command, with the content of the file to
282
+ * be created.
283
+ */
284
+ file_text: Schema.optional<typeof Schema.String>;
285
+ /**
286
+ * Required parameter of `insert` command. The `new_str` will be inserted
287
+ * AFTER the line `insert_line` of `path`.
288
+ */
289
+ insert_line: Schema.optional<typeof Schema.Number>;
290
+ /**
291
+ * Optional parameter of `str_replace` command containing the new string (if
292
+ * not given, no string will be added). Required parameter of `insert`
293
+ * command containing the string to insert.
294
+ */
295
+ new_str: Schema.optional<typeof Schema.String>;
296
+ /**
297
+ * Required parameter of `str_replace` command containing the string in
298
+ * `path` to replace.
299
+ */
300
+ old_str: Schema.optional<typeof Schema.String>;
301
+ /**
302
+ * Optional parameter of `view` command when `path` points to a file. If
303
+ * none is given, the full file is shown. If provided, the file will be
304
+ * shown in the indicated line number range, e.g. [11, 12] will show lines
305
+ * 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all
306
+ * lines from `start_line` to the end of the file.
307
+ */
308
+ view_range: Schema.optional<Schema.Array$<typeof Schema.Number>>;
309
+ }>;
310
+ readonly success: typeof Schema.Void;
311
+ readonly failure: typeof Schema.Never;
312
+ }, true>;
313
+ /**
314
+ * Allow Claude to directly interact with your files, providing hands-on
315
+ * assistance rather than just suggesting changes.
316
+ *
317
+ * @since 1.0.0
318
+ * @category Tools
319
+ */
320
+ export declare const TextEditor_20250124: (args: {}) => Tool.ProviderDefined<"AnthropicTextEditor", {
321
+ readonly args: Schema.Struct<{}>;
322
+ readonly parameters: Schema.Struct<{
323
+ /**
324
+ * The command to run.
325
+ */
326
+ command: Schema.Literal<["view", "create", "str_replace", "insert", "undo_edit"]>;
327
+ /**
328
+ * Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`.
329
+ */
330
+ path: typeof Schema.String;
331
+ /**
332
+ * Required parameter of `create` command, with the content of the file to
333
+ * be created.
334
+ */
335
+ file_text: Schema.optional<typeof Schema.String>;
336
+ /**
337
+ * Required parameter of `insert` command. The `new_str` will be inserted
338
+ * AFTER the line `insert_line` of `path`.
339
+ */
340
+ insert_line: Schema.optional<typeof Schema.Number>;
341
+ /**
342
+ * Optional parameter of `str_replace` command containing the new string (if
343
+ * not given, no string will be added). Required parameter of `insert`
344
+ * command containing the string to insert.
345
+ */
346
+ new_str: Schema.optional<typeof Schema.String>;
347
+ /**
348
+ * Required parameter of `str_replace` command containing the string in
349
+ * `path` to replace.
350
+ */
351
+ old_str: Schema.optional<typeof Schema.String>;
352
+ /**
353
+ * Optional parameter of `view` command when `path` points to a file. If
354
+ * none is given, the full file is shown. If provided, the file will be
355
+ * shown in the indicated line number range, e.g. [11, 12] will show lines
356
+ * 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all
357
+ * lines from `start_line` to the end of the file.
358
+ */
359
+ view_range: Schema.optional<Schema.Array$<typeof Schema.Number>>;
360
+ }>;
361
+ readonly success: typeof Schema.Void;
362
+ readonly failure: typeof Schema.Never;
363
+ }, true>;
364
+ /**
365
+ * Allow Claude to directly interact with your files, providing hands-on
366
+ * assistance rather than just suggesting changes.
367
+ *
368
+ * @since 1.0.0
369
+ * @category Tools
370
+ */
371
+ export declare const TextEditor_20250429: (args: {}) => Tool.ProviderDefined<"AnthropicTextEditor", {
372
+ readonly args: Schema.Struct<{}>;
373
+ readonly parameters: Schema.Struct<{
374
+ /**
375
+ * The command to run.
376
+ */
377
+ command: Schema.Literal<["view", "create", "str_replace", "insert"]>;
378
+ /**
379
+ * Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`.
380
+ */
381
+ path: typeof Schema.String;
382
+ /**
383
+ * Required parameter of `create` command, with the content of the file to
384
+ * be created.
385
+ */
386
+ file_text: Schema.optional<typeof Schema.String>;
387
+ /**
388
+ * Required parameter of `insert` command. The `new_str` will be inserted
389
+ * AFTER the line `insert_line` of `path`.
390
+ */
391
+ insert_line: Schema.optional<typeof Schema.Number>;
392
+ /**
393
+ * Optional parameter of `str_replace` command containing the new string (if
394
+ * not given, no string will be added). Required parameter of `insert`
395
+ * command containing the string to insert.
396
+ */
397
+ new_str: Schema.optional<typeof Schema.String>;
398
+ /**
399
+ * Required parameter of `str_replace` command containing the string in
400
+ * `path` to replace.
401
+ */
402
+ old_str: Schema.optional<typeof Schema.String>;
403
+ /**
404
+ * Optional parameter of `view` command when `path` points to a file. If
405
+ * none is given, the full file is shown. If provided, the file will be
406
+ * shown in the indicated line number range, e.g. [11, 12] will show lines
407
+ * 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all
408
+ * lines from `start_line` to the end of the file.
409
+ */
410
+ view_range: Schema.optional<Schema.Array$<typeof Schema.Number>>;
411
+ }>;
412
+ readonly success: typeof Schema.Void;
413
+ readonly failure: typeof Schema.Never;
414
+ }, true>;
415
+ /**
416
+ * Allow Claude to directly interact with your files, providing hands-on
417
+ * assistance rather than just suggesting changes.
418
+ *
419
+ * @since 1.0.0
420
+ * @category Tools
421
+ */
422
+ export declare const TextEditor_20250728: (args: {}) => Tool.ProviderDefined<"AnthropicTextEditor", {
423
+ readonly args: Schema.Struct<{}>;
424
+ readonly parameters: Schema.Struct<{
425
+ /**
426
+ * The command to run.
427
+ */
428
+ command: Schema.Literal<["view", "create", "str_replace", "insert"]>;
429
+ /**
430
+ * Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`.
431
+ */
432
+ path: typeof Schema.String;
433
+ /**
434
+ * Required parameter of `create` command, with the content of the file to
435
+ * be created.
436
+ */
437
+ file_text: Schema.optional<typeof Schema.String>;
438
+ /**
439
+ * Required parameter of `insert` command. The `new_str` will be inserted
440
+ * AFTER the line `insert_line` of `path`.
441
+ */
442
+ insert_line: Schema.optional<typeof Schema.Number>;
443
+ /**
444
+ * Optional parameter of `str_replace` command containing the new string (if
445
+ * not given, no string will be added). Required parameter of `insert`
446
+ * command containing the string to insert.
447
+ */
448
+ new_str: Schema.optional<typeof Schema.String>;
449
+ /**
450
+ * Required parameter of `str_replace` command containing the string in
451
+ * `path` to replace.
452
+ */
453
+ old_str: Schema.optional<typeof Schema.String>;
454
+ /**
455
+ * Optional parameter of `view` command when `path` points to a file. If
456
+ * none is given, the full file is shown. If provided, the file will be
457
+ * shown in the indicated line number range, e.g. [11, 12] will show lines
458
+ * 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all
459
+ * lines from `start_line` to the end of the file.
460
+ */
461
+ view_range: Schema.optional<Schema.Array$<typeof Schema.Number>>;
462
+ }>;
463
+ readonly success: typeof Schema.Void;
464
+ readonly failure: typeof Schema.Never;
465
+ }, true>;
466
+ /**
467
+ * @since 1.0.0
468
+ * @category Tools
469
+ */
470
+ export declare const WebSearch_20250305: (args: {
471
+ readonly cache_control?: {
472
+ readonly type: "ephemeral";
473
+ readonly ttl?: "5m" | "1h" | null | undefined;
474
+ } | null | undefined;
475
+ readonly allowed_domains?: readonly string[] | null | undefined;
476
+ readonly blocked_domains?: readonly string[] | null | undefined;
477
+ readonly max_uses?: number | null | undefined;
478
+ readonly user_location?: {
479
+ readonly type: "approximate";
480
+ readonly city?: string | null | undefined;
481
+ readonly country?: string | null | undefined;
482
+ readonly region?: string | null | undefined;
483
+ readonly timezone?: string | null | undefined;
484
+ } | null | undefined;
485
+ }) => Tool.ProviderDefined<"AnthropicWebSearch", {
486
+ readonly args: Schema.Struct<{
487
+ readonly cache_control: Schema.optionalWith<typeof Generated.CacheControlEphemeral, {
488
+ nullable: true;
489
+ }>;
490
+ readonly allowed_domains: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
491
+ nullable: true;
492
+ }>;
493
+ readonly blocked_domains: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
494
+ nullable: true;
495
+ }>;
496
+ readonly max_uses: Schema.optionalWith<Schema.filter<typeof Schema.Int>, {
497
+ nullable: true;
498
+ }>;
499
+ readonly user_location: Schema.optionalWith<typeof Generated.UserLocation, {
500
+ nullable: true;
501
+ }>;
502
+ }>;
503
+ readonly parameters: Schema.Struct<{}>;
504
+ readonly success: Schema.Array$<typeof Generated.RequestWebSearchResultBlock>;
505
+ readonly failure: typeof Generated.ResponseWebSearchToolResultError;
506
+ }, false>;
507
+ /**
508
+ * A helper method which takes in the name of a tool as returned in the response
509
+ * from a large language model provider, and returns either the provider-defined
510
+ * name for of the tool as found in the corresponding `Toolkit`, or `undefined`
511
+ * if the tool name is not a provider-defined tool.
512
+ *
513
+ * For example, if the large language model provider returns the tool name
514
+ * `"web_search"` in a response, calling this method would return `"AnthropicWebSearch"`.
515
+ *
516
+ * This method is primarily exposed for use by other Effect provider
517
+ * integrations which can utilize Anthropic tools (i.e. Amazon Bedrock).
518
+ *
519
+ * @since 1.0.0
520
+ * @category Tool Calling
521
+ */
522
+ export declare const getProviderDefinedToolName: (name: string) => string | undefined;
523
+ //# sourceMappingURL=AnthropicTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnthropicTool.d.ts","sourceRoot":"","sources":["../../src/AnthropicTool.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC;IAC9C,OAAO,SAAS,CAAC,oBAAoB;IACrC,OAAO,SAAS,CAAC,oBAAoB;IACrC,OAAO,SAAS,CAAC,6BAA6B;IAC9C,OAAO,SAAS,CAAC,2BAA2B;IAC5C,OAAO,SAAS,CAAC,2BAA2B;IAC5C,OAAO,SAAS,CAAC,sBAAsB;IACvC,OAAO,SAAS,CAAC,sBAAsB;IACvC,OAAO,SAAS,CAAC,sBAAsB;IACvC,OAAO,SAAS,CAAC,sBAAsB;IACvC,OAAO,SAAS,CAAC,yBAAyB;CAC3C,CAWA,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC,IAAI,CAAA;AAEnE;;;GAGG;AACH,eAAO,MAAM,aAAa;;;QAQtB;;WAEG;;QAEH;;WAEG;;;;;QAGL,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa;;;QAQtB;;WAEG;;QAEH;;WAEG;;;;;QAGL,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;SAOjC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;SAejC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,2DAA6C,CAAA;AAEpE;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;QAQ7B;;;;;;;;;;;;;WAaG;;QAQH;;;WAGG;;QAEH;;WAEG;;;;;QAGL,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;QAQ7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+BG;;QAkBH;;;;WAIG;;QAEH;;;;WAIG;;QAEH;;;;WAIG;;QAEH;;WAEG;;QAEH;;;WAGG;;QAEH;;;WAGG;;;;;QAGL,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;QAO5B;;WAEG;;QAQH;;WAEG;;QAEH;;;WAGG;;QAEH;;;WAGG;;QAEH;;;;WAIG;;QAEH;;;WAGG;;QAEH;;;;;;WAMG;;;;;QAGL,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;QAO5B;;WAEG;;QAQH;;WAEG;;QAEH;;;WAGG;;QAEH;;;WAGG;;QAEH;;;;WAIG;;QAEH;;;WAGG;;QAEH;;;;;;WAMG;;;;;QAGL,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;QAO5B;;WAEG;;QAOH;;WAEG;;QAEH;;;WAGG;;QAEH;;;WAGG;;QAEH;;;;WAIG;;QAEH;;;WAGG;;QAEH;;;;;;WAMG;;;;;QAGL,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;QAO5B;;WAEG;;QAOH;;WAEG;;QAEH;;;WAGG;;QAEH;;;WAGG;;QAEH;;;;WAIG;;QAEH;;;WAGG;;QAEH;;;;;;WAMG;;;;;QAGL,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAO7B,CAAA;AAWF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,0BAA0B,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,SAA2C,CAAA"}