@ai-sdk/anthropic 3.0.0-beta.22 → 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.
@@ -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.
@@ -331,6 +436,9 @@ type AnthropicTool = {
331
436
  } | {
332
437
  type: 'code_execution_20250522';
333
438
  name: string;
439
+ } | {
440
+ type: 'code_execution_20250825';
441
+ name: string;
334
442
  } | {
335
443
  name: string;
336
444
  type: 'computer_20250124' | 'computer_20241022';
@@ -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.
@@ -331,6 +436,9 @@ type AnthropicTool = {
331
436
  } | {
332
437
  type: 'code_execution_20250522';
333
438
  name: string;
439
+ } | {
440
+ type: 'code_execution_20250825';
441
+ name: string;
334
442
  } | {
335
443
  name: string;
336
444
  type: 'computer_20250124' | 'computer_20241022';