@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
|
@@ -79,6 +79,19 @@ declare const anthropicTools: {
|
|
|
79
79
|
old_str?: string;
|
|
80
80
|
view_range?: number[];
|
|
81
81
|
}, {}>;
|
|
82
|
+
/**
|
|
83
|
+
* Creates a tool for editing text. Must have name "str_replace_based_edit_tool".
|
|
84
|
+
* Note: This version does not support the "undo_edit" command.
|
|
85
|
+
*/
|
|
86
|
+
textEditor_20250429: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
|
|
87
|
+
command: "view" | "create" | "str_replace" | "insert";
|
|
88
|
+
path: string;
|
|
89
|
+
file_text?: string;
|
|
90
|
+
insert_line?: number;
|
|
91
|
+
new_str?: string;
|
|
92
|
+
old_str?: string;
|
|
93
|
+
view_range?: number[];
|
|
94
|
+
}, {}>;
|
|
82
95
|
/**
|
|
83
96
|
* Creates a tool for executing actions on a computer. Must have name "computer".
|
|
84
97
|
*
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -79,6 +79,19 @@ declare const anthropicTools: {
|
|
|
79
79
|
old_str?: string;
|
|
80
80
|
view_range?: number[];
|
|
81
81
|
}, {}>;
|
|
82
|
+
/**
|
|
83
|
+
* Creates a tool for editing text. Must have name "str_replace_based_edit_tool".
|
|
84
|
+
* Note: This version does not support the "undo_edit" command.
|
|
85
|
+
*/
|
|
86
|
+
textEditor_20250429: _ai_sdk_provider_utils.ProviderDefinedToolFactory<{
|
|
87
|
+
command: "view" | "create" | "str_replace" | "insert";
|
|
88
|
+
path: string;
|
|
89
|
+
file_text?: string;
|
|
90
|
+
insert_line?: number;
|
|
91
|
+
new_str?: string;
|
|
92
|
+
old_str?: string;
|
|
93
|
+
view_range?: number[];
|
|
94
|
+
}, {}>;
|
|
82
95
|
/**
|
|
83
96
|
* Creates a tool for executing actions on a computer. Must have name "computer".
|
|
84
97
|
*
|
package/dist/internal/index.js
CHANGED
|
@@ -203,6 +203,13 @@ function prepareTools({
|
|
|
203
203
|
type: "text_editor_20241022"
|
|
204
204
|
});
|
|
205
205
|
break;
|
|
206
|
+
case "anthropic.text_editor_20250429":
|
|
207
|
+
betas.add("computer-use-2025-01-24");
|
|
208
|
+
anthropicTools2.push({
|
|
209
|
+
name: "str_replace_based_edit_tool",
|
|
210
|
+
type: "text_editor_20250429"
|
|
211
|
+
});
|
|
212
|
+
break;
|
|
206
213
|
case "anthropic.bash_20250124":
|
|
207
214
|
betas.add("computer-use-2025-01-24");
|
|
208
215
|
anthropicTools2.push({
|
|
@@ -1784,6 +1791,23 @@ var textEditor_20250124 = (0, import_provider_utils10.createProviderDefinedToolF
|
|
|
1784
1791
|
})
|
|
1785
1792
|
});
|
|
1786
1793
|
|
|
1794
|
+
// src/tool/text-editor_20250429.ts
|
|
1795
|
+
var import_provider_utils11 = require("@ai-sdk/provider-utils");
|
|
1796
|
+
var import_v411 = require("zod/v4");
|
|
1797
|
+
var textEditor_20250429 = (0, import_provider_utils11.createProviderDefinedToolFactory)({
|
|
1798
|
+
id: "anthropic.text_editor_20250429",
|
|
1799
|
+
name: "str_replace_based_edit_tool",
|
|
1800
|
+
inputSchema: import_v411.z.object({
|
|
1801
|
+
command: import_v411.z.enum(["view", "create", "str_replace", "insert"]),
|
|
1802
|
+
path: import_v411.z.string(),
|
|
1803
|
+
file_text: import_v411.z.string().optional(),
|
|
1804
|
+
insert_line: import_v411.z.number().int().optional(),
|
|
1805
|
+
new_str: import_v411.z.string().optional(),
|
|
1806
|
+
old_str: import_v411.z.string().optional(),
|
|
1807
|
+
view_range: import_v411.z.array(import_v411.z.number().int()).optional()
|
|
1808
|
+
})
|
|
1809
|
+
});
|
|
1810
|
+
|
|
1787
1811
|
// src/anthropic-tools.ts
|
|
1788
1812
|
var anthropicTools = {
|
|
1789
1813
|
/**
|
|
@@ -1810,6 +1834,11 @@ var anthropicTools = {
|
|
|
1810
1834
|
* Creates a tool for editing text. Must have name "str_replace_editor".
|
|
1811
1835
|
*/
|
|
1812
1836
|
textEditor_20250124,
|
|
1837
|
+
/**
|
|
1838
|
+
* Creates a tool for editing text. Must have name "str_replace_based_edit_tool".
|
|
1839
|
+
* Note: This version does not support the "undo_edit" command.
|
|
1840
|
+
*/
|
|
1841
|
+
textEditor_20250429,
|
|
1813
1842
|
/**
|
|
1814
1843
|
* Creates a tool for executing actions on a computer. Must have name "computer".
|
|
1815
1844
|
*
|