@ai-sdk/anthropic 3.0.0-beta.22 → 3.0.0-beta.24
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 +12 -0
- package/dist/index.d.mts +141 -0
- package/dist/index.d.ts +141 -0
- package/dist/index.js +510 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +502 -107
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +147 -0
- package/dist/internal/index.d.ts +147 -0
- package/dist/internal/index.js +504 -117
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +501 -106
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -82,6 +82,111 @@ declare const anthropicTools: {
|
|
|
82
82
|
stderr: string;
|
|
83
83
|
return_code: number;
|
|
84
84
|
}>;
|
|
85
|
+
/**
|
|
86
|
+
* Claude can analyze data, create visualizations, perform complex calculations,
|
|
87
|
+
* run system commands, create and edit files, and process uploaded files directly within
|
|
88
|
+
* the API conversation.
|
|
89
|
+
*
|
|
90
|
+
* The code execution tool allows Claude to run both Python and Bash commands and manipulate files,
|
|
91
|
+
* including writing code, in a secure, sandboxed environment.
|
|
92
|
+
*
|
|
93
|
+
* This is the latest version with enhanced Bash support and file operations.
|
|
94
|
+
*
|
|
95
|
+
* Tool name must be `code_execution`.
|
|
96
|
+
*/
|
|
97
|
+
codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
|
|
98
|
+
type: "bash_code_execution";
|
|
99
|
+
command: string;
|
|
100
|
+
} | {
|
|
101
|
+
type: "text_editor_code_execution";
|
|
102
|
+
command: "view";
|
|
103
|
+
path: string;
|
|
104
|
+
} | {
|
|
105
|
+
type: "text_editor_code_execution";
|
|
106
|
+
command: "create";
|
|
107
|
+
path: string;
|
|
108
|
+
file_text?: string | null;
|
|
109
|
+
} | {
|
|
110
|
+
type: "text_editor_code_execution";
|
|
111
|
+
command: "str_replace";
|
|
112
|
+
path: string;
|
|
113
|
+
old_str: string;
|
|
114
|
+
new_str: string;
|
|
115
|
+
}, {
|
|
116
|
+
type: "bash_code_execution_result";
|
|
117
|
+
stdout: string;
|
|
118
|
+
stderr: string;
|
|
119
|
+
return_code: number;
|
|
120
|
+
} | {
|
|
121
|
+
type: "bash_code_execution_tool_result_error";
|
|
122
|
+
error_code: string;
|
|
123
|
+
} | {
|
|
124
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
125
|
+
error_code: string;
|
|
126
|
+
} | {
|
|
127
|
+
type: "text_editor_code_execution_view_result";
|
|
128
|
+
content: string;
|
|
129
|
+
file_type: string;
|
|
130
|
+
num_lines: number | null;
|
|
131
|
+
start_line: number | null;
|
|
132
|
+
total_lines: number | null;
|
|
133
|
+
} | {
|
|
134
|
+
type: "text_editor_code_execution_create_result";
|
|
135
|
+
is_file_update: boolean;
|
|
136
|
+
} | {
|
|
137
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
138
|
+
lines: string[] | null;
|
|
139
|
+
new_lines: number | null;
|
|
140
|
+
new_start: number | null;
|
|
141
|
+
old_lines: number | null;
|
|
142
|
+
old_start: number | null;
|
|
143
|
+
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
144
|
+
type: "bash_code_execution";
|
|
145
|
+
command: string;
|
|
146
|
+
} | {
|
|
147
|
+
type: "text_editor_code_execution";
|
|
148
|
+
command: "view";
|
|
149
|
+
path: string;
|
|
150
|
+
} | {
|
|
151
|
+
type: "text_editor_code_execution";
|
|
152
|
+
command: "create";
|
|
153
|
+
path: string;
|
|
154
|
+
file_text?: string | null;
|
|
155
|
+
} | {
|
|
156
|
+
type: "text_editor_code_execution";
|
|
157
|
+
command: "str_replace";
|
|
158
|
+
path: string;
|
|
159
|
+
old_str: string;
|
|
160
|
+
new_str: string;
|
|
161
|
+
}, {
|
|
162
|
+
type: "bash_code_execution_result";
|
|
163
|
+
stdout: string;
|
|
164
|
+
stderr: string;
|
|
165
|
+
return_code: number;
|
|
166
|
+
} | {
|
|
167
|
+
type: "bash_code_execution_tool_result_error";
|
|
168
|
+
error_code: string;
|
|
169
|
+
} | {
|
|
170
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
171
|
+
error_code: string;
|
|
172
|
+
} | {
|
|
173
|
+
type: "text_editor_code_execution_view_result";
|
|
174
|
+
content: string;
|
|
175
|
+
file_type: string;
|
|
176
|
+
num_lines: number | null;
|
|
177
|
+
start_line: number | null;
|
|
178
|
+
total_lines: number | null;
|
|
179
|
+
} | {
|
|
180
|
+
type: "text_editor_code_execution_create_result";
|
|
181
|
+
is_file_update: boolean;
|
|
182
|
+
} | {
|
|
183
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
184
|
+
lines: string[] | null;
|
|
185
|
+
new_lines: number | null;
|
|
186
|
+
new_start: number | null;
|
|
187
|
+
old_lines: number | null;
|
|
188
|
+
old_start: number | null;
|
|
189
|
+
}>;
|
|
85
190
|
/**
|
|
86
191
|
* Claude can interact with computer environments through the computer use tool, which
|
|
87
192
|
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
@@ -128,6 +233,42 @@ declare const anthropicTools: {
|
|
|
128
233
|
displayHeightPx: number;
|
|
129
234
|
displayNumber?: number;
|
|
130
235
|
}>;
|
|
236
|
+
/**
|
|
237
|
+
* The memory tool enables Claude to store and retrieve information across conversations through a memory file directory.
|
|
238
|
+
* Claude can create, read, update, and delete files that persist between sessions,
|
|
239
|
+
* allowing it to build knowledge over time without keeping everything in the context window.
|
|
240
|
+
* The memory tool operates client-side—you control where and how the data is stored through your own infrastructure.
|
|
241
|
+
*
|
|
242
|
+
* Supported models: Claude Sonnet 4.5, Claude Sonnet 4, Claude Opus 4.1, Claude Opus 4.
|
|
243
|
+
*
|
|
244
|
+
* Tool name must be `memory`.
|
|
245
|
+
*/
|
|
246
|
+
memory_20250818: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
|
|
247
|
+
command: "view";
|
|
248
|
+
path: string;
|
|
249
|
+
view_range?: [number, number];
|
|
250
|
+
} | {
|
|
251
|
+
command: "create";
|
|
252
|
+
path: string;
|
|
253
|
+
file_text: string;
|
|
254
|
+
} | {
|
|
255
|
+
command: "str_replace";
|
|
256
|
+
path: string;
|
|
257
|
+
old_str: string;
|
|
258
|
+
new_str: string;
|
|
259
|
+
} | {
|
|
260
|
+
command: "insert";
|
|
261
|
+
path: string;
|
|
262
|
+
insert_line: number;
|
|
263
|
+
insert_text: string;
|
|
264
|
+
} | {
|
|
265
|
+
command: "delete";
|
|
266
|
+
path: string;
|
|
267
|
+
} | {
|
|
268
|
+
command: "rename";
|
|
269
|
+
old_path: string;
|
|
270
|
+
new_path: string;
|
|
271
|
+
}, {}>;
|
|
131
272
|
/**
|
|
132
273
|
* Claude can use an Anthropic-defined text editor tool to view and modify text files,
|
|
133
274
|
* helping you debug, fix, and improve your code or other text documents. This allows Claude
|
|
@@ -331,6 +472,9 @@ type AnthropicTool = {
|
|
|
331
472
|
} | {
|
|
332
473
|
type: 'code_execution_20250522';
|
|
333
474
|
name: string;
|
|
475
|
+
} | {
|
|
476
|
+
type: 'code_execution_20250825';
|
|
477
|
+
name: string;
|
|
334
478
|
} | {
|
|
335
479
|
name: string;
|
|
336
480
|
type: 'computer_20250124' | 'computer_20241022';
|
|
@@ -347,6 +491,9 @@ type AnthropicTool = {
|
|
|
347
491
|
} | {
|
|
348
492
|
name: string;
|
|
349
493
|
type: 'bash_20250124' | 'bash_20241022';
|
|
494
|
+
} | {
|
|
495
|
+
name: string;
|
|
496
|
+
type: 'memory_20250818';
|
|
350
497
|
} | {
|
|
351
498
|
type: 'web_fetch_20250910';
|
|
352
499
|
name: string;
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -82,6 +82,111 @@ declare const anthropicTools: {
|
|
|
82
82
|
stderr: string;
|
|
83
83
|
return_code: number;
|
|
84
84
|
}>;
|
|
85
|
+
/**
|
|
86
|
+
* Claude can analyze data, create visualizations, perform complex calculations,
|
|
87
|
+
* run system commands, create and edit files, and process uploaded files directly within
|
|
88
|
+
* the API conversation.
|
|
89
|
+
*
|
|
90
|
+
* The code execution tool allows Claude to run both Python and Bash commands and manipulate files,
|
|
91
|
+
* including writing code, in a secure, sandboxed environment.
|
|
92
|
+
*
|
|
93
|
+
* This is the latest version with enhanced Bash support and file operations.
|
|
94
|
+
*
|
|
95
|
+
* Tool name must be `code_execution`.
|
|
96
|
+
*/
|
|
97
|
+
codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
|
|
98
|
+
type: "bash_code_execution";
|
|
99
|
+
command: string;
|
|
100
|
+
} | {
|
|
101
|
+
type: "text_editor_code_execution";
|
|
102
|
+
command: "view";
|
|
103
|
+
path: string;
|
|
104
|
+
} | {
|
|
105
|
+
type: "text_editor_code_execution";
|
|
106
|
+
command: "create";
|
|
107
|
+
path: string;
|
|
108
|
+
file_text?: string | null;
|
|
109
|
+
} | {
|
|
110
|
+
type: "text_editor_code_execution";
|
|
111
|
+
command: "str_replace";
|
|
112
|
+
path: string;
|
|
113
|
+
old_str: string;
|
|
114
|
+
new_str: string;
|
|
115
|
+
}, {
|
|
116
|
+
type: "bash_code_execution_result";
|
|
117
|
+
stdout: string;
|
|
118
|
+
stderr: string;
|
|
119
|
+
return_code: number;
|
|
120
|
+
} | {
|
|
121
|
+
type: "bash_code_execution_tool_result_error";
|
|
122
|
+
error_code: string;
|
|
123
|
+
} | {
|
|
124
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
125
|
+
error_code: string;
|
|
126
|
+
} | {
|
|
127
|
+
type: "text_editor_code_execution_view_result";
|
|
128
|
+
content: string;
|
|
129
|
+
file_type: string;
|
|
130
|
+
num_lines: number | null;
|
|
131
|
+
start_line: number | null;
|
|
132
|
+
total_lines: number | null;
|
|
133
|
+
} | {
|
|
134
|
+
type: "text_editor_code_execution_create_result";
|
|
135
|
+
is_file_update: boolean;
|
|
136
|
+
} | {
|
|
137
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
138
|
+
lines: string[] | null;
|
|
139
|
+
new_lines: number | null;
|
|
140
|
+
new_start: number | null;
|
|
141
|
+
old_lines: number | null;
|
|
142
|
+
old_start: number | null;
|
|
143
|
+
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
144
|
+
type: "bash_code_execution";
|
|
145
|
+
command: string;
|
|
146
|
+
} | {
|
|
147
|
+
type: "text_editor_code_execution";
|
|
148
|
+
command: "view";
|
|
149
|
+
path: string;
|
|
150
|
+
} | {
|
|
151
|
+
type: "text_editor_code_execution";
|
|
152
|
+
command: "create";
|
|
153
|
+
path: string;
|
|
154
|
+
file_text?: string | null;
|
|
155
|
+
} | {
|
|
156
|
+
type: "text_editor_code_execution";
|
|
157
|
+
command: "str_replace";
|
|
158
|
+
path: string;
|
|
159
|
+
old_str: string;
|
|
160
|
+
new_str: string;
|
|
161
|
+
}, {
|
|
162
|
+
type: "bash_code_execution_result";
|
|
163
|
+
stdout: string;
|
|
164
|
+
stderr: string;
|
|
165
|
+
return_code: number;
|
|
166
|
+
} | {
|
|
167
|
+
type: "bash_code_execution_tool_result_error";
|
|
168
|
+
error_code: string;
|
|
169
|
+
} | {
|
|
170
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
171
|
+
error_code: string;
|
|
172
|
+
} | {
|
|
173
|
+
type: "text_editor_code_execution_view_result";
|
|
174
|
+
content: string;
|
|
175
|
+
file_type: string;
|
|
176
|
+
num_lines: number | null;
|
|
177
|
+
start_line: number | null;
|
|
178
|
+
total_lines: number | null;
|
|
179
|
+
} | {
|
|
180
|
+
type: "text_editor_code_execution_create_result";
|
|
181
|
+
is_file_update: boolean;
|
|
182
|
+
} | {
|
|
183
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
184
|
+
lines: string[] | null;
|
|
185
|
+
new_lines: number | null;
|
|
186
|
+
new_start: number | null;
|
|
187
|
+
old_lines: number | null;
|
|
188
|
+
old_start: number | null;
|
|
189
|
+
}>;
|
|
85
190
|
/**
|
|
86
191
|
* Claude can interact with computer environments through the computer use tool, which
|
|
87
192
|
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
@@ -128,6 +233,42 @@ declare const anthropicTools: {
|
|
|
128
233
|
displayHeightPx: number;
|
|
129
234
|
displayNumber?: number;
|
|
130
235
|
}>;
|
|
236
|
+
/**
|
|
237
|
+
* The memory tool enables Claude to store and retrieve information across conversations through a memory file directory.
|
|
238
|
+
* Claude can create, read, update, and delete files that persist between sessions,
|
|
239
|
+
* allowing it to build knowledge over time without keeping everything in the context window.
|
|
240
|
+
* The memory tool operates client-side—you control where and how the data is stored through your own infrastructure.
|
|
241
|
+
*
|
|
242
|
+
* Supported models: Claude Sonnet 4.5, Claude Sonnet 4, Claude Opus 4.1, Claude Opus 4.
|
|
243
|
+
*
|
|
244
|
+
* Tool name must be `memory`.
|
|
245
|
+
*/
|
|
246
|
+
memory_20250818: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
|
|
247
|
+
command: "view";
|
|
248
|
+
path: string;
|
|
249
|
+
view_range?: [number, number];
|
|
250
|
+
} | {
|
|
251
|
+
command: "create";
|
|
252
|
+
path: string;
|
|
253
|
+
file_text: string;
|
|
254
|
+
} | {
|
|
255
|
+
command: "str_replace";
|
|
256
|
+
path: string;
|
|
257
|
+
old_str: string;
|
|
258
|
+
new_str: string;
|
|
259
|
+
} | {
|
|
260
|
+
command: "insert";
|
|
261
|
+
path: string;
|
|
262
|
+
insert_line: number;
|
|
263
|
+
insert_text: string;
|
|
264
|
+
} | {
|
|
265
|
+
command: "delete";
|
|
266
|
+
path: string;
|
|
267
|
+
} | {
|
|
268
|
+
command: "rename";
|
|
269
|
+
old_path: string;
|
|
270
|
+
new_path: string;
|
|
271
|
+
}, {}>;
|
|
131
272
|
/**
|
|
132
273
|
* Claude can use an Anthropic-defined text editor tool to view and modify text files,
|
|
133
274
|
* helping you debug, fix, and improve your code or other text documents. This allows Claude
|
|
@@ -331,6 +472,9 @@ type AnthropicTool = {
|
|
|
331
472
|
} | {
|
|
332
473
|
type: 'code_execution_20250522';
|
|
333
474
|
name: string;
|
|
475
|
+
} | {
|
|
476
|
+
type: 'code_execution_20250825';
|
|
477
|
+
name: string;
|
|
334
478
|
} | {
|
|
335
479
|
name: string;
|
|
336
480
|
type: 'computer_20250124' | 'computer_20241022';
|
|
@@ -347,6 +491,9 @@ type AnthropicTool = {
|
|
|
347
491
|
} | {
|
|
348
492
|
name: string;
|
|
349
493
|
type: 'bash_20250124' | 'bash_20241022';
|
|
494
|
+
} | {
|
|
495
|
+
name: string;
|
|
496
|
+
type: 'memory_20250818';
|
|
350
497
|
} | {
|
|
351
498
|
type: 'web_fetch_20250910';
|
|
352
499
|
name: string;
|