@ai-sdk/anthropic 3.0.24 → 3.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +31 -21
- package/dist/index.d.ts +31 -21
- package/dist/index.js +153 -79
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +154 -76
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +39 -21
- package/dist/internal/index.d.ts +39 -21
- package/dist/internal/index.js +146 -72
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +153 -75
- package/dist/internal/index.mjs.map +1 -1
- package/docs/05-anthropic.mdx +22 -5
- package/package.json +1 -1
- package/src/anthropic-messages-api.ts +9 -0
- package/src/anthropic-prepare-tools.ts +13 -0
- package/src/anthropic-tools.ts +18 -0
- package/src/tool/computer_20251124.ts +151 -0
|
@@ -266,6 +266,36 @@ declare const anthropicTools: {
|
|
|
266
266
|
displayHeightPx: number;
|
|
267
267
|
displayNumber?: number;
|
|
268
268
|
}>;
|
|
269
|
+
/**
|
|
270
|
+
* Claude can interact with computer environments through the computer use tool, which
|
|
271
|
+
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
272
|
+
*
|
|
273
|
+
* This version adds the zoom action for detailed screen region inspection.
|
|
274
|
+
*
|
|
275
|
+
* Image results are supported.
|
|
276
|
+
*
|
|
277
|
+
* Supported models: Claude Opus 4.5
|
|
278
|
+
*
|
|
279
|
+
* @param displayWidthPx - The width of the display being controlled by the model in pixels.
|
|
280
|
+
* @param displayHeightPx - The height of the display being controlled by the model in pixels.
|
|
281
|
+
* @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
|
|
282
|
+
* @param enableZoom - Enable zoom action. Set to true to allow Claude to zoom into specific screen regions. Default: false.
|
|
283
|
+
*/
|
|
284
|
+
computer_20251124: _ai_sdk_provider_utils.ProviderToolFactory<{
|
|
285
|
+
action: "key" | "hold_key" | "type" | "cursor_position" | "mouse_move" | "left_mouse_down" | "left_mouse_up" | "left_click" | "left_click_drag" | "right_click" | "middle_click" | "double_click" | "triple_click" | "scroll" | "wait" | "screenshot" | "zoom";
|
|
286
|
+
coordinate?: [number, number];
|
|
287
|
+
duration?: number;
|
|
288
|
+
region?: [number, number, number, number];
|
|
289
|
+
scroll_amount?: number;
|
|
290
|
+
scroll_direction?: "up" | "down" | "left" | "right";
|
|
291
|
+
start_coordinate?: [number, number];
|
|
292
|
+
text?: string;
|
|
293
|
+
}, {
|
|
294
|
+
displayWidthPx: number;
|
|
295
|
+
displayHeightPx: number;
|
|
296
|
+
displayNumber?: number;
|
|
297
|
+
enableZoom?: boolean;
|
|
298
|
+
}>;
|
|
269
299
|
/**
|
|
270
300
|
* The memory tool enables Claude to store and retrieve information across conversations through a memory file directory.
|
|
271
301
|
* Claude can create, read, update, and delete files that persist between sessions,
|
|
@@ -465,27 +495,7 @@ declare const anthropicTools: {
|
|
|
465
495
|
userLocation?: {
|
|
466
496
|
type: "approximate";
|
|
467
497
|
city?: string;
|
|
468
|
-
region
|
|
469
|
-
/**
|
|
470
|
-
* Claude can interact with computer environments through the computer use tool, which
|
|
471
|
-
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
472
|
-
*
|
|
473
|
-
* Image results are supported.
|
|
474
|
-
*
|
|
475
|
-
* @param displayWidthPx - The width of the display being controlled by the model in pixels.
|
|
476
|
-
* @param displayHeightPx - The height of the display being controlled by the model in pixels.
|
|
477
|
-
* @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
|
|
478
|
-
*/
|
|
479
|
-
? /**
|
|
480
|
-
* Claude can interact with computer environments through the computer use tool, which
|
|
481
|
-
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
482
|
-
*
|
|
483
|
-
* Image results are supported.
|
|
484
|
-
*
|
|
485
|
-
* @param displayWidthPx - The width of the display being controlled by the model in pixels.
|
|
486
|
-
* @param displayHeightPx - The height of the display being controlled by the model in pixels.
|
|
487
|
-
* @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
|
|
488
|
-
*/: string;
|
|
498
|
+
region?: string;
|
|
489
499
|
country?: string;
|
|
490
500
|
timezone?: string;
|
|
491
501
|
};
|
|
@@ -589,6 +599,14 @@ type AnthropicTool = {
|
|
|
589
599
|
display_height_px: number;
|
|
590
600
|
display_number: number;
|
|
591
601
|
cache_control: AnthropicCacheControl | undefined;
|
|
602
|
+
} | {
|
|
603
|
+
name: string;
|
|
604
|
+
type: 'computer_20251124';
|
|
605
|
+
display_width_px: number;
|
|
606
|
+
display_height_px: number;
|
|
607
|
+
display_number: number;
|
|
608
|
+
enable_zoom?: boolean;
|
|
609
|
+
cache_control: AnthropicCacheControl | undefined;
|
|
592
610
|
} | {
|
|
593
611
|
name: string;
|
|
594
612
|
type: 'text_editor_20250124' | 'text_editor_20241022' | 'text_editor_20250429';
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -266,6 +266,36 @@ declare const anthropicTools: {
|
|
|
266
266
|
displayHeightPx: number;
|
|
267
267
|
displayNumber?: number;
|
|
268
268
|
}>;
|
|
269
|
+
/**
|
|
270
|
+
* Claude can interact with computer environments through the computer use tool, which
|
|
271
|
+
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
272
|
+
*
|
|
273
|
+
* This version adds the zoom action for detailed screen region inspection.
|
|
274
|
+
*
|
|
275
|
+
* Image results are supported.
|
|
276
|
+
*
|
|
277
|
+
* Supported models: Claude Opus 4.5
|
|
278
|
+
*
|
|
279
|
+
* @param displayWidthPx - The width of the display being controlled by the model in pixels.
|
|
280
|
+
* @param displayHeightPx - The height of the display being controlled by the model in pixels.
|
|
281
|
+
* @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
|
|
282
|
+
* @param enableZoom - Enable zoom action. Set to true to allow Claude to zoom into specific screen regions. Default: false.
|
|
283
|
+
*/
|
|
284
|
+
computer_20251124: _ai_sdk_provider_utils.ProviderToolFactory<{
|
|
285
|
+
action: "key" | "hold_key" | "type" | "cursor_position" | "mouse_move" | "left_mouse_down" | "left_mouse_up" | "left_click" | "left_click_drag" | "right_click" | "middle_click" | "double_click" | "triple_click" | "scroll" | "wait" | "screenshot" | "zoom";
|
|
286
|
+
coordinate?: [number, number];
|
|
287
|
+
duration?: number;
|
|
288
|
+
region?: [number, number, number, number];
|
|
289
|
+
scroll_amount?: number;
|
|
290
|
+
scroll_direction?: "up" | "down" | "left" | "right";
|
|
291
|
+
start_coordinate?: [number, number];
|
|
292
|
+
text?: string;
|
|
293
|
+
}, {
|
|
294
|
+
displayWidthPx: number;
|
|
295
|
+
displayHeightPx: number;
|
|
296
|
+
displayNumber?: number;
|
|
297
|
+
enableZoom?: boolean;
|
|
298
|
+
}>;
|
|
269
299
|
/**
|
|
270
300
|
* The memory tool enables Claude to store and retrieve information across conversations through a memory file directory.
|
|
271
301
|
* Claude can create, read, update, and delete files that persist between sessions,
|
|
@@ -465,27 +495,7 @@ declare const anthropicTools: {
|
|
|
465
495
|
userLocation?: {
|
|
466
496
|
type: "approximate";
|
|
467
497
|
city?: string;
|
|
468
|
-
region
|
|
469
|
-
/**
|
|
470
|
-
* Claude can interact with computer environments through the computer use tool, which
|
|
471
|
-
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
472
|
-
*
|
|
473
|
-
* Image results are supported.
|
|
474
|
-
*
|
|
475
|
-
* @param displayWidthPx - The width of the display being controlled by the model in pixels.
|
|
476
|
-
* @param displayHeightPx - The height of the display being controlled by the model in pixels.
|
|
477
|
-
* @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
|
|
478
|
-
*/
|
|
479
|
-
? /**
|
|
480
|
-
* Claude can interact with computer environments through the computer use tool, which
|
|
481
|
-
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
482
|
-
*
|
|
483
|
-
* Image results are supported.
|
|
484
|
-
*
|
|
485
|
-
* @param displayWidthPx - The width of the display being controlled by the model in pixels.
|
|
486
|
-
* @param displayHeightPx - The height of the display being controlled by the model in pixels.
|
|
487
|
-
* @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
|
|
488
|
-
*/: string;
|
|
498
|
+
region?: string;
|
|
489
499
|
country?: string;
|
|
490
500
|
timezone?: string;
|
|
491
501
|
};
|
|
@@ -589,6 +599,14 @@ type AnthropicTool = {
|
|
|
589
599
|
display_height_px: number;
|
|
590
600
|
display_number: number;
|
|
591
601
|
cache_control: AnthropicCacheControl | undefined;
|
|
602
|
+
} | {
|
|
603
|
+
name: string;
|
|
604
|
+
type: 'computer_20251124';
|
|
605
|
+
display_width_px: number;
|
|
606
|
+
display_height_px: number;
|
|
607
|
+
display_number: number;
|
|
608
|
+
enable_zoom?: boolean;
|
|
609
|
+
cache_control: AnthropicCacheControl | undefined;
|
|
592
610
|
} | {
|
|
593
611
|
name: string;
|
|
594
612
|
type: 'text_editor_20250124' | 'text_editor_20241022' | 'text_editor_20250429';
|
package/dist/internal/index.js
CHANGED
|
@@ -1112,6 +1112,19 @@ async function prepareTools({
|
|
|
1112
1112
|
});
|
|
1113
1113
|
break;
|
|
1114
1114
|
}
|
|
1115
|
+
case "anthropic.computer_20251124": {
|
|
1116
|
+
betas.add("computer-use-2025-11-24");
|
|
1117
|
+
anthropicTools2.push({
|
|
1118
|
+
name: "computer",
|
|
1119
|
+
type: "computer_20251124",
|
|
1120
|
+
display_width_px: tool.args.displayWidthPx,
|
|
1121
|
+
display_height_px: tool.args.displayHeightPx,
|
|
1122
|
+
display_number: tool.args.displayNumber,
|
|
1123
|
+
enable_zoom: tool.args.enableZoom,
|
|
1124
|
+
cache_control: void 0
|
|
1125
|
+
});
|
|
1126
|
+
break;
|
|
1127
|
+
}
|
|
1115
1128
|
case "anthropic.computer_20241022": {
|
|
1116
1129
|
betas.add("computer-use-2024-10-22");
|
|
1117
1130
|
anthropicTools2.push({
|
|
@@ -3995,76 +4008,100 @@ var computer_20250124 = (0, import_provider_utils16.createProviderToolFactory)({
|
|
|
3995
4008
|
inputSchema: computer_20250124InputSchema
|
|
3996
4009
|
});
|
|
3997
4010
|
|
|
3998
|
-
// src/tool/
|
|
4011
|
+
// src/tool/computer_20251124.ts
|
|
3999
4012
|
var import_provider_utils17 = require("@ai-sdk/provider-utils");
|
|
4000
4013
|
var import_v414 = require("zod/v4");
|
|
4001
|
-
var
|
|
4014
|
+
var computer_20251124InputSchema = (0, import_provider_utils17.lazySchema)(
|
|
4002
4015
|
() => (0, import_provider_utils17.zodSchema)(
|
|
4003
|
-
import_v414.z.
|
|
4004
|
-
import_v414.z.
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4016
|
+
import_v414.z.object({
|
|
4017
|
+
action: import_v414.z.enum([
|
|
4018
|
+
"key",
|
|
4019
|
+
"hold_key",
|
|
4020
|
+
"type",
|
|
4021
|
+
"cursor_position",
|
|
4022
|
+
"mouse_move",
|
|
4023
|
+
"left_mouse_down",
|
|
4024
|
+
"left_mouse_up",
|
|
4025
|
+
"left_click",
|
|
4026
|
+
"left_click_drag",
|
|
4027
|
+
"right_click",
|
|
4028
|
+
"middle_click",
|
|
4029
|
+
"double_click",
|
|
4030
|
+
"triple_click",
|
|
4031
|
+
"scroll",
|
|
4032
|
+
"wait",
|
|
4033
|
+
"screenshot",
|
|
4034
|
+
"zoom"
|
|
4035
|
+
]),
|
|
4036
|
+
coordinate: import_v414.z.tuple([import_v414.z.number().int(), import_v414.z.number().int()]).optional(),
|
|
4037
|
+
duration: import_v414.z.number().optional(),
|
|
4038
|
+
region: import_v414.z.tuple([
|
|
4039
|
+
import_v414.z.number().int(),
|
|
4040
|
+
import_v414.z.number().int(),
|
|
4041
|
+
import_v414.z.number().int(),
|
|
4042
|
+
import_v414.z.number().int()
|
|
4043
|
+
]).optional(),
|
|
4044
|
+
scroll_amount: import_v414.z.number().optional(),
|
|
4045
|
+
scroll_direction: import_v414.z.enum(["up", "down", "left", "right"]).optional(),
|
|
4046
|
+
start_coordinate: import_v414.z.tuple([import_v414.z.number().int(), import_v414.z.number().int()]).optional(),
|
|
4047
|
+
text: import_v414.z.string().optional()
|
|
4048
|
+
})
|
|
4049
|
+
)
|
|
4050
|
+
);
|
|
4051
|
+
var computer_20251124 = (0, import_provider_utils17.createProviderToolFactory)({
|
|
4052
|
+
id: "anthropic.computer_20251124",
|
|
4053
|
+
inputSchema: computer_20251124InputSchema
|
|
4054
|
+
});
|
|
4055
|
+
|
|
4056
|
+
// src/tool/memory_20250818.ts
|
|
4057
|
+
var import_provider_utils18 = require("@ai-sdk/provider-utils");
|
|
4058
|
+
var import_v415 = require("zod/v4");
|
|
4059
|
+
var memory_20250818InputSchema = (0, import_provider_utils18.lazySchema)(
|
|
4060
|
+
() => (0, import_provider_utils18.zodSchema)(
|
|
4061
|
+
import_v415.z.discriminatedUnion("command", [
|
|
4062
|
+
import_v415.z.object({
|
|
4063
|
+
command: import_v415.z.literal("view"),
|
|
4064
|
+
path: import_v415.z.string(),
|
|
4065
|
+
view_range: import_v415.z.tuple([import_v415.z.number(), import_v415.z.number()]).optional()
|
|
4008
4066
|
}),
|
|
4009
|
-
|
|
4010
|
-
command:
|
|
4011
|
-
path:
|
|
4012
|
-
file_text:
|
|
4067
|
+
import_v415.z.object({
|
|
4068
|
+
command: import_v415.z.literal("create"),
|
|
4069
|
+
path: import_v415.z.string(),
|
|
4070
|
+
file_text: import_v415.z.string()
|
|
4013
4071
|
}),
|
|
4014
|
-
|
|
4015
|
-
command:
|
|
4016
|
-
path:
|
|
4017
|
-
old_str:
|
|
4018
|
-
new_str:
|
|
4072
|
+
import_v415.z.object({
|
|
4073
|
+
command: import_v415.z.literal("str_replace"),
|
|
4074
|
+
path: import_v415.z.string(),
|
|
4075
|
+
old_str: import_v415.z.string(),
|
|
4076
|
+
new_str: import_v415.z.string()
|
|
4019
4077
|
}),
|
|
4020
|
-
|
|
4021
|
-
command:
|
|
4022
|
-
path:
|
|
4023
|
-
insert_line:
|
|
4024
|
-
insert_text:
|
|
4078
|
+
import_v415.z.object({
|
|
4079
|
+
command: import_v415.z.literal("insert"),
|
|
4080
|
+
path: import_v415.z.string(),
|
|
4081
|
+
insert_line: import_v415.z.number(),
|
|
4082
|
+
insert_text: import_v415.z.string()
|
|
4025
4083
|
}),
|
|
4026
|
-
|
|
4027
|
-
command:
|
|
4028
|
-
path:
|
|
4084
|
+
import_v415.z.object({
|
|
4085
|
+
command: import_v415.z.literal("delete"),
|
|
4086
|
+
path: import_v415.z.string()
|
|
4029
4087
|
}),
|
|
4030
|
-
|
|
4031
|
-
command:
|
|
4032
|
-
old_path:
|
|
4033
|
-
new_path:
|
|
4088
|
+
import_v415.z.object({
|
|
4089
|
+
command: import_v415.z.literal("rename"),
|
|
4090
|
+
old_path: import_v415.z.string(),
|
|
4091
|
+
new_path: import_v415.z.string()
|
|
4034
4092
|
})
|
|
4035
4093
|
])
|
|
4036
4094
|
)
|
|
4037
4095
|
);
|
|
4038
|
-
var memory_20250818 = (0,
|
|
4096
|
+
var memory_20250818 = (0, import_provider_utils18.createProviderToolFactory)({
|
|
4039
4097
|
id: "anthropic.memory_20250818",
|
|
4040
4098
|
inputSchema: memory_20250818InputSchema
|
|
4041
4099
|
});
|
|
4042
4100
|
|
|
4043
4101
|
// src/tool/text-editor_20241022.ts
|
|
4044
|
-
var import_provider_utils18 = require("@ai-sdk/provider-utils");
|
|
4045
|
-
var import_v415 = require("zod/v4");
|
|
4046
|
-
var textEditor_20241022InputSchema = (0, import_provider_utils18.lazySchema)(
|
|
4047
|
-
() => (0, import_provider_utils18.zodSchema)(
|
|
4048
|
-
import_v415.z.object({
|
|
4049
|
-
command: import_v415.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
4050
|
-
path: import_v415.z.string(),
|
|
4051
|
-
file_text: import_v415.z.string().optional(),
|
|
4052
|
-
insert_line: import_v415.z.number().int().optional(),
|
|
4053
|
-
new_str: import_v415.z.string().optional(),
|
|
4054
|
-
old_str: import_v415.z.string().optional(),
|
|
4055
|
-
view_range: import_v415.z.array(import_v415.z.number().int()).optional()
|
|
4056
|
-
})
|
|
4057
|
-
)
|
|
4058
|
-
);
|
|
4059
|
-
var textEditor_20241022 = (0, import_provider_utils18.createProviderToolFactory)({
|
|
4060
|
-
id: "anthropic.text_editor_20241022",
|
|
4061
|
-
inputSchema: textEditor_20241022InputSchema
|
|
4062
|
-
});
|
|
4063
|
-
|
|
4064
|
-
// src/tool/text-editor_20250124.ts
|
|
4065
4102
|
var import_provider_utils19 = require("@ai-sdk/provider-utils");
|
|
4066
4103
|
var import_v416 = require("zod/v4");
|
|
4067
|
-
var
|
|
4104
|
+
var textEditor_20241022InputSchema = (0, import_provider_utils19.lazySchema)(
|
|
4068
4105
|
() => (0, import_provider_utils19.zodSchema)(
|
|
4069
4106
|
import_v416.z.object({
|
|
4070
4107
|
command: import_v416.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
@@ -4077,18 +4114,18 @@ var textEditor_20250124InputSchema = (0, import_provider_utils19.lazySchema)(
|
|
|
4077
4114
|
})
|
|
4078
4115
|
)
|
|
4079
4116
|
);
|
|
4080
|
-
var
|
|
4081
|
-
id: "anthropic.
|
|
4082
|
-
inputSchema:
|
|
4117
|
+
var textEditor_20241022 = (0, import_provider_utils19.createProviderToolFactory)({
|
|
4118
|
+
id: "anthropic.text_editor_20241022",
|
|
4119
|
+
inputSchema: textEditor_20241022InputSchema
|
|
4083
4120
|
});
|
|
4084
4121
|
|
|
4085
|
-
// src/tool/text-
|
|
4122
|
+
// src/tool/text-editor_20250124.ts
|
|
4086
4123
|
var import_provider_utils20 = require("@ai-sdk/provider-utils");
|
|
4087
4124
|
var import_v417 = require("zod/v4");
|
|
4088
|
-
var
|
|
4125
|
+
var textEditor_20250124InputSchema = (0, import_provider_utils20.lazySchema)(
|
|
4089
4126
|
() => (0, import_provider_utils20.zodSchema)(
|
|
4090
4127
|
import_v417.z.object({
|
|
4091
|
-
command: import_v417.z.enum(["view", "create", "str_replace", "insert"]),
|
|
4128
|
+
command: import_v417.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
4092
4129
|
path: import_v417.z.string(),
|
|
4093
4130
|
file_text: import_v417.z.string().optional(),
|
|
4094
4131
|
insert_line: import_v417.z.number().int().optional(),
|
|
@@ -4098,40 +4135,61 @@ var textEditor_20250429InputSchema = (0, import_provider_utils20.lazySchema)(
|
|
|
4098
4135
|
})
|
|
4099
4136
|
)
|
|
4100
4137
|
);
|
|
4101
|
-
var
|
|
4102
|
-
id: "anthropic.
|
|
4103
|
-
inputSchema:
|
|
4138
|
+
var textEditor_20250124 = (0, import_provider_utils20.createProviderToolFactory)({
|
|
4139
|
+
id: "anthropic.text_editor_20250124",
|
|
4140
|
+
inputSchema: textEditor_20250124InputSchema
|
|
4104
4141
|
});
|
|
4105
4142
|
|
|
4106
|
-
// src/tool/
|
|
4143
|
+
// src/tool/text-editor_20250429.ts
|
|
4107
4144
|
var import_provider_utils21 = require("@ai-sdk/provider-utils");
|
|
4108
4145
|
var import_v418 = require("zod/v4");
|
|
4109
|
-
var
|
|
4146
|
+
var textEditor_20250429InputSchema = (0, import_provider_utils21.lazySchema)(
|
|
4110
4147
|
() => (0, import_provider_utils21.zodSchema)(
|
|
4111
|
-
import_v418.z.
|
|
4112
|
-
import_v418.z.
|
|
4113
|
-
|
|
4114
|
-
|
|
4148
|
+
import_v418.z.object({
|
|
4149
|
+
command: import_v418.z.enum(["view", "create", "str_replace", "insert"]),
|
|
4150
|
+
path: import_v418.z.string(),
|
|
4151
|
+
file_text: import_v418.z.string().optional(),
|
|
4152
|
+
insert_line: import_v418.z.number().int().optional(),
|
|
4153
|
+
new_str: import_v418.z.string().optional(),
|
|
4154
|
+
old_str: import_v418.z.string().optional(),
|
|
4155
|
+
view_range: import_v418.z.array(import_v418.z.number().int()).optional()
|
|
4156
|
+
})
|
|
4157
|
+
)
|
|
4158
|
+
);
|
|
4159
|
+
var textEditor_20250429 = (0, import_provider_utils21.createProviderToolFactory)({
|
|
4160
|
+
id: "anthropic.text_editor_20250429",
|
|
4161
|
+
inputSchema: textEditor_20250429InputSchema
|
|
4162
|
+
});
|
|
4163
|
+
|
|
4164
|
+
// src/tool/tool-search-bm25_20251119.ts
|
|
4165
|
+
var import_provider_utils22 = require("@ai-sdk/provider-utils");
|
|
4166
|
+
var import_v419 = require("zod/v4");
|
|
4167
|
+
var toolSearchBm25_20251119OutputSchema = (0, import_provider_utils22.lazySchema)(
|
|
4168
|
+
() => (0, import_provider_utils22.zodSchema)(
|
|
4169
|
+
import_v419.z.array(
|
|
4170
|
+
import_v419.z.object({
|
|
4171
|
+
type: import_v419.z.literal("tool_reference"),
|
|
4172
|
+
toolName: import_v419.z.string()
|
|
4115
4173
|
})
|
|
4116
4174
|
)
|
|
4117
4175
|
)
|
|
4118
4176
|
);
|
|
4119
|
-
var toolSearchBm25_20251119InputSchema = (0,
|
|
4120
|
-
() => (0,
|
|
4121
|
-
|
|
4177
|
+
var toolSearchBm25_20251119InputSchema = (0, import_provider_utils22.lazySchema)(
|
|
4178
|
+
() => (0, import_provider_utils22.zodSchema)(
|
|
4179
|
+
import_v419.z.object({
|
|
4122
4180
|
/**
|
|
4123
4181
|
* A natural language query to search for tools.
|
|
4124
4182
|
* Claude will use BM25 text search to find relevant tools.
|
|
4125
4183
|
*/
|
|
4126
|
-
query:
|
|
4184
|
+
query: import_v419.z.string(),
|
|
4127
4185
|
/**
|
|
4128
4186
|
* Maximum number of tools to return. Optional.
|
|
4129
4187
|
*/
|
|
4130
|
-
limit:
|
|
4188
|
+
limit: import_v419.z.number().optional()
|
|
4131
4189
|
})
|
|
4132
4190
|
)
|
|
4133
4191
|
);
|
|
4134
|
-
var factory7 = (0,
|
|
4192
|
+
var factory7 = (0, import_provider_utils22.createProviderToolFactoryWithOutputSchema)({
|
|
4135
4193
|
id: "anthropic.tool_search_bm25_20251119",
|
|
4136
4194
|
inputSchema: toolSearchBm25_20251119InputSchema,
|
|
4137
4195
|
outputSchema: toolSearchBm25_20251119OutputSchema,
|
|
@@ -4199,6 +4257,22 @@ var anthropicTools = {
|
|
|
4199
4257
|
* @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
|
|
4200
4258
|
*/
|
|
4201
4259
|
computer_20250124,
|
|
4260
|
+
/**
|
|
4261
|
+
* Claude can interact with computer environments through the computer use tool, which
|
|
4262
|
+
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
4263
|
+
*
|
|
4264
|
+
* This version adds the zoom action for detailed screen region inspection.
|
|
4265
|
+
*
|
|
4266
|
+
* Image results are supported.
|
|
4267
|
+
*
|
|
4268
|
+
* Supported models: Claude Opus 4.5
|
|
4269
|
+
*
|
|
4270
|
+
* @param displayWidthPx - The width of the display being controlled by the model in pixels.
|
|
4271
|
+
* @param displayHeightPx - The height of the display being controlled by the model in pixels.
|
|
4272
|
+
* @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
|
|
4273
|
+
* @param enableZoom - Enable zoom action. Set to true to allow Claude to zoom into specific screen regions. Default: false.
|
|
4274
|
+
*/
|
|
4275
|
+
computer_20251124,
|
|
4202
4276
|
/**
|
|
4203
4277
|
* The memory tool enables Claude to store and retrieve information across conversations through a memory file directory.
|
|
4204
4278
|
* Claude can create, read, update, and delete files that persist between sessions,
|