@ai-sdk/anthropic 2.0.0-beta.4 → 2.0.0-beta.5
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 +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +33 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -0
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +13 -0
- package/dist/internal/index.d.ts +13 -0
- package/dist/internal/index.js +29 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +29 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -188,6 +188,13 @@ function prepareTools({
|
|
|
188
188
|
type: "text_editor_20241022"
|
|
189
189
|
});
|
|
190
190
|
break;
|
|
191
|
+
case "anthropic.text_editor_20250429":
|
|
192
|
+
betas.add("computer-use-2025-01-24");
|
|
193
|
+
anthropicTools2.push({
|
|
194
|
+
name: "str_replace_based_edit_tool",
|
|
195
|
+
type: "text_editor_20250429"
|
|
196
|
+
});
|
|
197
|
+
break;
|
|
191
198
|
case "anthropic.bash_20250124":
|
|
192
199
|
betas.add("computer-use-2025-01-24");
|
|
193
200
|
anthropicTools2.push({
|
|
@@ -1771,6 +1778,23 @@ var textEditor_20250124 = createProviderDefinedToolFactory6({
|
|
|
1771
1778
|
})
|
|
1772
1779
|
});
|
|
1773
1780
|
|
|
1781
|
+
// src/tool/text-editor_20250429.ts
|
|
1782
|
+
import { createProviderDefinedToolFactory as createProviderDefinedToolFactory7 } from "@ai-sdk/provider-utils";
|
|
1783
|
+
import { z as z11 } from "zod/v4";
|
|
1784
|
+
var textEditor_20250429 = createProviderDefinedToolFactory7({
|
|
1785
|
+
id: "anthropic.text_editor_20250429",
|
|
1786
|
+
name: "str_replace_based_edit_tool",
|
|
1787
|
+
inputSchema: z11.object({
|
|
1788
|
+
command: z11.enum(["view", "create", "str_replace", "insert"]),
|
|
1789
|
+
path: z11.string(),
|
|
1790
|
+
file_text: z11.string().optional(),
|
|
1791
|
+
insert_line: z11.number().int().optional(),
|
|
1792
|
+
new_str: z11.string().optional(),
|
|
1793
|
+
old_str: z11.string().optional(),
|
|
1794
|
+
view_range: z11.array(z11.number().int()).optional()
|
|
1795
|
+
})
|
|
1796
|
+
});
|
|
1797
|
+
|
|
1774
1798
|
// src/anthropic-tools.ts
|
|
1775
1799
|
var anthropicTools = {
|
|
1776
1800
|
/**
|
|
@@ -1797,6 +1821,11 @@ var anthropicTools = {
|
|
|
1797
1821
|
* Creates a tool for editing text. Must have name "str_replace_editor".
|
|
1798
1822
|
*/
|
|
1799
1823
|
textEditor_20250124,
|
|
1824
|
+
/**
|
|
1825
|
+
* Creates a tool for editing text. Must have name "str_replace_based_edit_tool".
|
|
1826
|
+
* Note: This version does not support the "undo_edit" command.
|
|
1827
|
+
*/
|
|
1828
|
+
textEditor_20250429,
|
|
1800
1829
|
/**
|
|
1801
1830
|
* Creates a tool for executing actions on a computer. Must have name "computer".
|
|
1802
1831
|
*
|