@ai-sdk/anthropic 3.0.0-beta.21 → 3.0.0-beta.23
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 +105 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.js +448 -114
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +434 -96
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +108 -0
- package/dist/internal/index.d.ts +108 -0
- package/dist/internal/index.js +442 -108
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +433 -95
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/anthropic
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6f845b4: Add support for 2025-08-25 code execution tool
|
|
8
|
+
|
|
9
|
+
## 3.0.0-beta.22
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ed537e1: Add support for pdf file in tool result in anthropic
|
|
14
|
+
|
|
3
15
|
## 3.0.0-beta.21
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -68,6 +68,111 @@ declare const anthropicTools: {
|
|
|
68
68
|
stderr: string;
|
|
69
69
|
return_code: number;
|
|
70
70
|
}>;
|
|
71
|
+
/**
|
|
72
|
+
* Claude can analyze data, create visualizations, perform complex calculations,
|
|
73
|
+
* run system commands, create and edit files, and process uploaded files directly within
|
|
74
|
+
* the API conversation.
|
|
75
|
+
*
|
|
76
|
+
* The code execution tool allows Claude to run both Python and Bash commands and manipulate files,
|
|
77
|
+
* including writing code, in a secure, sandboxed environment.
|
|
78
|
+
*
|
|
79
|
+
* This is the latest version with enhanced Bash support and file operations.
|
|
80
|
+
*
|
|
81
|
+
* Tool name must be `code_execution`.
|
|
82
|
+
*/
|
|
83
|
+
codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
|
|
84
|
+
type: "bash_code_execution";
|
|
85
|
+
command: string;
|
|
86
|
+
} | {
|
|
87
|
+
type: "text_editor_code_execution";
|
|
88
|
+
command: "view";
|
|
89
|
+
path: string;
|
|
90
|
+
} | {
|
|
91
|
+
type: "text_editor_code_execution";
|
|
92
|
+
command: "create";
|
|
93
|
+
path: string;
|
|
94
|
+
file_text?: string | null;
|
|
95
|
+
} | {
|
|
96
|
+
type: "text_editor_code_execution";
|
|
97
|
+
command: "str_replace";
|
|
98
|
+
path: string;
|
|
99
|
+
old_str: string;
|
|
100
|
+
new_str: string;
|
|
101
|
+
}, {
|
|
102
|
+
type: "bash_code_execution_result";
|
|
103
|
+
stdout: string;
|
|
104
|
+
stderr: string;
|
|
105
|
+
return_code: number;
|
|
106
|
+
} | {
|
|
107
|
+
type: "bash_code_execution_tool_result_error";
|
|
108
|
+
error_code: string;
|
|
109
|
+
} | {
|
|
110
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
111
|
+
error_code: string;
|
|
112
|
+
} | {
|
|
113
|
+
type: "text_editor_code_execution_view_result";
|
|
114
|
+
content: string;
|
|
115
|
+
file_type: string;
|
|
116
|
+
num_lines: number | null;
|
|
117
|
+
start_line: number | null;
|
|
118
|
+
total_lines: number | null;
|
|
119
|
+
} | {
|
|
120
|
+
type: "text_editor_code_execution_create_result";
|
|
121
|
+
is_file_update: boolean;
|
|
122
|
+
} | {
|
|
123
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
124
|
+
lines: string[] | null;
|
|
125
|
+
new_lines: number | null;
|
|
126
|
+
new_start: number | null;
|
|
127
|
+
old_lines: number | null;
|
|
128
|
+
old_start: number | null;
|
|
129
|
+
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
130
|
+
type: "bash_code_execution";
|
|
131
|
+
command: string;
|
|
132
|
+
} | {
|
|
133
|
+
type: "text_editor_code_execution";
|
|
134
|
+
command: "view";
|
|
135
|
+
path: string;
|
|
136
|
+
} | {
|
|
137
|
+
type: "text_editor_code_execution";
|
|
138
|
+
command: "create";
|
|
139
|
+
path: string;
|
|
140
|
+
file_text?: string | null;
|
|
141
|
+
} | {
|
|
142
|
+
type: "text_editor_code_execution";
|
|
143
|
+
command: "str_replace";
|
|
144
|
+
path: string;
|
|
145
|
+
old_str: string;
|
|
146
|
+
new_str: string;
|
|
147
|
+
}, {
|
|
148
|
+
type: "bash_code_execution_result";
|
|
149
|
+
stdout: string;
|
|
150
|
+
stderr: string;
|
|
151
|
+
return_code: number;
|
|
152
|
+
} | {
|
|
153
|
+
type: "bash_code_execution_tool_result_error";
|
|
154
|
+
error_code: string;
|
|
155
|
+
} | {
|
|
156
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
157
|
+
error_code: string;
|
|
158
|
+
} | {
|
|
159
|
+
type: "text_editor_code_execution_view_result";
|
|
160
|
+
content: string;
|
|
161
|
+
file_type: string;
|
|
162
|
+
num_lines: number | null;
|
|
163
|
+
start_line: number | null;
|
|
164
|
+
total_lines: number | null;
|
|
165
|
+
} | {
|
|
166
|
+
type: "text_editor_code_execution_create_result";
|
|
167
|
+
is_file_update: boolean;
|
|
168
|
+
} | {
|
|
169
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
170
|
+
lines: string[] | null;
|
|
171
|
+
new_lines: number | null;
|
|
172
|
+
new_start: number | null;
|
|
173
|
+
old_lines: number | null;
|
|
174
|
+
old_start: number | null;
|
|
175
|
+
}>;
|
|
71
176
|
/**
|
|
72
177
|
* Claude can interact with computer environments through the computer use tool, which
|
|
73
178
|
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,111 @@ declare const anthropicTools: {
|
|
|
68
68
|
stderr: string;
|
|
69
69
|
return_code: number;
|
|
70
70
|
}>;
|
|
71
|
+
/**
|
|
72
|
+
* Claude can analyze data, create visualizations, perform complex calculations,
|
|
73
|
+
* run system commands, create and edit files, and process uploaded files directly within
|
|
74
|
+
* the API conversation.
|
|
75
|
+
*
|
|
76
|
+
* The code execution tool allows Claude to run both Python and Bash commands and manipulate files,
|
|
77
|
+
* including writing code, in a secure, sandboxed environment.
|
|
78
|
+
*
|
|
79
|
+
* This is the latest version with enhanced Bash support and file operations.
|
|
80
|
+
*
|
|
81
|
+
* Tool name must be `code_execution`.
|
|
82
|
+
*/
|
|
83
|
+
codeExecution_20250825: (args?: Parameters<_ai_sdk_provider_utils.ProviderDefinedToolFactoryWithOutputSchema<{
|
|
84
|
+
type: "bash_code_execution";
|
|
85
|
+
command: string;
|
|
86
|
+
} | {
|
|
87
|
+
type: "text_editor_code_execution";
|
|
88
|
+
command: "view";
|
|
89
|
+
path: string;
|
|
90
|
+
} | {
|
|
91
|
+
type: "text_editor_code_execution";
|
|
92
|
+
command: "create";
|
|
93
|
+
path: string;
|
|
94
|
+
file_text?: string | null;
|
|
95
|
+
} | {
|
|
96
|
+
type: "text_editor_code_execution";
|
|
97
|
+
command: "str_replace";
|
|
98
|
+
path: string;
|
|
99
|
+
old_str: string;
|
|
100
|
+
new_str: string;
|
|
101
|
+
}, {
|
|
102
|
+
type: "bash_code_execution_result";
|
|
103
|
+
stdout: string;
|
|
104
|
+
stderr: string;
|
|
105
|
+
return_code: number;
|
|
106
|
+
} | {
|
|
107
|
+
type: "bash_code_execution_tool_result_error";
|
|
108
|
+
error_code: string;
|
|
109
|
+
} | {
|
|
110
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
111
|
+
error_code: string;
|
|
112
|
+
} | {
|
|
113
|
+
type: "text_editor_code_execution_view_result";
|
|
114
|
+
content: string;
|
|
115
|
+
file_type: string;
|
|
116
|
+
num_lines: number | null;
|
|
117
|
+
start_line: number | null;
|
|
118
|
+
total_lines: number | null;
|
|
119
|
+
} | {
|
|
120
|
+
type: "text_editor_code_execution_create_result";
|
|
121
|
+
is_file_update: boolean;
|
|
122
|
+
} | {
|
|
123
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
124
|
+
lines: string[] | null;
|
|
125
|
+
new_lines: number | null;
|
|
126
|
+
new_start: number | null;
|
|
127
|
+
old_lines: number | null;
|
|
128
|
+
old_start: number | null;
|
|
129
|
+
}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
|
|
130
|
+
type: "bash_code_execution";
|
|
131
|
+
command: string;
|
|
132
|
+
} | {
|
|
133
|
+
type: "text_editor_code_execution";
|
|
134
|
+
command: "view";
|
|
135
|
+
path: string;
|
|
136
|
+
} | {
|
|
137
|
+
type: "text_editor_code_execution";
|
|
138
|
+
command: "create";
|
|
139
|
+
path: string;
|
|
140
|
+
file_text?: string | null;
|
|
141
|
+
} | {
|
|
142
|
+
type: "text_editor_code_execution";
|
|
143
|
+
command: "str_replace";
|
|
144
|
+
path: string;
|
|
145
|
+
old_str: string;
|
|
146
|
+
new_str: string;
|
|
147
|
+
}, {
|
|
148
|
+
type: "bash_code_execution_result";
|
|
149
|
+
stdout: string;
|
|
150
|
+
stderr: string;
|
|
151
|
+
return_code: number;
|
|
152
|
+
} | {
|
|
153
|
+
type: "bash_code_execution_tool_result_error";
|
|
154
|
+
error_code: string;
|
|
155
|
+
} | {
|
|
156
|
+
type: "text_editor_code_execution_tool_result_error";
|
|
157
|
+
error_code: string;
|
|
158
|
+
} | {
|
|
159
|
+
type: "text_editor_code_execution_view_result";
|
|
160
|
+
content: string;
|
|
161
|
+
file_type: string;
|
|
162
|
+
num_lines: number | null;
|
|
163
|
+
start_line: number | null;
|
|
164
|
+
total_lines: number | null;
|
|
165
|
+
} | {
|
|
166
|
+
type: "text_editor_code_execution_create_result";
|
|
167
|
+
is_file_update: boolean;
|
|
168
|
+
} | {
|
|
169
|
+
type: "text_editor_code_execution_str_replace_result";
|
|
170
|
+
lines: string[] | null;
|
|
171
|
+
new_lines: number | null;
|
|
172
|
+
new_start: number | null;
|
|
173
|
+
old_lines: number | null;
|
|
174
|
+
old_start: number | null;
|
|
175
|
+
}>;
|
|
71
176
|
/**
|
|
72
177
|
* Claude can interact with computer environments through the computer use tool, which
|
|
73
178
|
* provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|