@ai-sdk/anthropic 3.0.0-beta.23 → 3.0.0-beta.25
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 +13 -0
- package/dist/index.d.mts +36 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +95 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +94 -25
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +39 -0
- package/dist/internal/index.d.ts +39 -0
- package/dist/internal/index.js +89 -24
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +93 -24
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "@ai-sdk/provider-utils";
|
|
11
11
|
|
|
12
12
|
// src/version.ts
|
|
13
|
-
var VERSION = true ? "3.0.0-beta.
|
|
13
|
+
var VERSION = true ? "3.0.0-beta.25" : "0.0.0-test";
|
|
14
14
|
|
|
15
15
|
// src/anthropic-messages-language-model.ts
|
|
16
16
|
import {
|
|
@@ -817,6 +817,14 @@ async function prepareTools({
|
|
|
817
817
|
});
|
|
818
818
|
break;
|
|
819
819
|
}
|
|
820
|
+
case "anthropic.memory_20250818": {
|
|
821
|
+
betas.add("context-management-2025-06-27");
|
|
822
|
+
anthropicTools2.push({
|
|
823
|
+
name: "memory",
|
|
824
|
+
type: "memory_20250818"
|
|
825
|
+
});
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
820
828
|
case "anthropic.web_fetch_20250910": {
|
|
821
829
|
betas.add("web-fetch-2025-09-10");
|
|
822
830
|
const args = await validateTypes({
|
|
@@ -2661,40 +2669,64 @@ var computer_20250124 = createProviderDefinedToolFactory5({
|
|
|
2661
2669
|
inputSchema: computer_20250124InputSchema
|
|
2662
2670
|
});
|
|
2663
2671
|
|
|
2664
|
-
// src/tool/
|
|
2672
|
+
// src/tool/memory_20250818.ts
|
|
2665
2673
|
import {
|
|
2666
2674
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory6,
|
|
2667
2675
|
lazySchema as lazySchema12,
|
|
2668
2676
|
zodSchema as zodSchema12
|
|
2669
2677
|
} from "@ai-sdk/provider-utils";
|
|
2670
2678
|
import { z as z13 } from "zod/v4";
|
|
2671
|
-
var
|
|
2679
|
+
var memory_20250818InputSchema = lazySchema12(
|
|
2672
2680
|
() => zodSchema12(
|
|
2673
|
-
z13.
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2681
|
+
z13.discriminatedUnion("command", [
|
|
2682
|
+
z13.object({
|
|
2683
|
+
command: z13.literal("view"),
|
|
2684
|
+
path: z13.string(),
|
|
2685
|
+
view_range: z13.tuple([z13.number(), z13.number()]).optional()
|
|
2686
|
+
}),
|
|
2687
|
+
z13.object({
|
|
2688
|
+
command: z13.literal("create"),
|
|
2689
|
+
path: z13.string(),
|
|
2690
|
+
file_text: z13.string()
|
|
2691
|
+
}),
|
|
2692
|
+
z13.object({
|
|
2693
|
+
command: z13.literal("str_replace"),
|
|
2694
|
+
path: z13.string(),
|
|
2695
|
+
old_str: z13.string(),
|
|
2696
|
+
new_str: z13.string()
|
|
2697
|
+
}),
|
|
2698
|
+
z13.object({
|
|
2699
|
+
command: z13.literal("insert"),
|
|
2700
|
+
path: z13.string(),
|
|
2701
|
+
insert_line: z13.number(),
|
|
2702
|
+
insert_text: z13.string()
|
|
2703
|
+
}),
|
|
2704
|
+
z13.object({
|
|
2705
|
+
command: z13.literal("delete"),
|
|
2706
|
+
path: z13.string()
|
|
2707
|
+
}),
|
|
2708
|
+
z13.object({
|
|
2709
|
+
command: z13.literal("rename"),
|
|
2710
|
+
old_path: z13.string(),
|
|
2711
|
+
new_path: z13.string()
|
|
2712
|
+
})
|
|
2713
|
+
])
|
|
2682
2714
|
)
|
|
2683
2715
|
);
|
|
2684
|
-
var
|
|
2685
|
-
id: "anthropic.
|
|
2686
|
-
name: "
|
|
2687
|
-
inputSchema:
|
|
2716
|
+
var memory_20250818 = createProviderDefinedToolFactory6({
|
|
2717
|
+
id: "anthropic.memory_20250818",
|
|
2718
|
+
name: "memory",
|
|
2719
|
+
inputSchema: memory_20250818InputSchema
|
|
2688
2720
|
});
|
|
2689
2721
|
|
|
2690
|
-
// src/tool/text-
|
|
2722
|
+
// src/tool/text-editor_20241022.ts
|
|
2691
2723
|
import {
|
|
2692
2724
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory7,
|
|
2693
2725
|
lazySchema as lazySchema13,
|
|
2694
2726
|
zodSchema as zodSchema13
|
|
2695
2727
|
} from "@ai-sdk/provider-utils";
|
|
2696
2728
|
import { z as z14 } from "zod/v4";
|
|
2697
|
-
var
|
|
2729
|
+
var textEditor_20241022InputSchema = lazySchema13(
|
|
2698
2730
|
() => zodSchema13(
|
|
2699
2731
|
z14.object({
|
|
2700
2732
|
command: z14.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
@@ -2707,23 +2739,23 @@ var textEditor_20250124InputSchema = lazySchema13(
|
|
|
2707
2739
|
})
|
|
2708
2740
|
)
|
|
2709
2741
|
);
|
|
2710
|
-
var
|
|
2711
|
-
id: "anthropic.
|
|
2742
|
+
var textEditor_20241022 = createProviderDefinedToolFactory7({
|
|
2743
|
+
id: "anthropic.text_editor_20241022",
|
|
2712
2744
|
name: "str_replace_editor",
|
|
2713
|
-
inputSchema:
|
|
2745
|
+
inputSchema: textEditor_20241022InputSchema
|
|
2714
2746
|
});
|
|
2715
2747
|
|
|
2716
|
-
// src/tool/text-
|
|
2748
|
+
// src/tool/text-editor_20250124.ts
|
|
2717
2749
|
import {
|
|
2718
2750
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory8,
|
|
2719
2751
|
lazySchema as lazySchema14,
|
|
2720
2752
|
zodSchema as zodSchema14
|
|
2721
2753
|
} from "@ai-sdk/provider-utils";
|
|
2722
2754
|
import { z as z15 } from "zod/v4";
|
|
2723
|
-
var
|
|
2755
|
+
var textEditor_20250124InputSchema = lazySchema14(
|
|
2724
2756
|
() => zodSchema14(
|
|
2725
2757
|
z15.object({
|
|
2726
|
-
command: z15.enum(["view", "create", "str_replace", "insert"]),
|
|
2758
|
+
command: z15.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
2727
2759
|
path: z15.string(),
|
|
2728
2760
|
file_text: z15.string().optional(),
|
|
2729
2761
|
insert_line: z15.number().int().optional(),
|
|
@@ -2733,7 +2765,33 @@ var textEditor_20250429InputSchema = lazySchema14(
|
|
|
2733
2765
|
})
|
|
2734
2766
|
)
|
|
2735
2767
|
);
|
|
2736
|
-
var
|
|
2768
|
+
var textEditor_20250124 = createProviderDefinedToolFactory8({
|
|
2769
|
+
id: "anthropic.text_editor_20250124",
|
|
2770
|
+
name: "str_replace_editor",
|
|
2771
|
+
inputSchema: textEditor_20250124InputSchema
|
|
2772
|
+
});
|
|
2773
|
+
|
|
2774
|
+
// src/tool/text-editor_20250429.ts
|
|
2775
|
+
import {
|
|
2776
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory9,
|
|
2777
|
+
lazySchema as lazySchema15,
|
|
2778
|
+
zodSchema as zodSchema15
|
|
2779
|
+
} from "@ai-sdk/provider-utils";
|
|
2780
|
+
import { z as z16 } from "zod/v4";
|
|
2781
|
+
var textEditor_20250429InputSchema = lazySchema15(
|
|
2782
|
+
() => zodSchema15(
|
|
2783
|
+
z16.object({
|
|
2784
|
+
command: z16.enum(["view", "create", "str_replace", "insert"]),
|
|
2785
|
+
path: z16.string(),
|
|
2786
|
+
file_text: z16.string().optional(),
|
|
2787
|
+
insert_line: z16.number().int().optional(),
|
|
2788
|
+
new_str: z16.string().optional(),
|
|
2789
|
+
old_str: z16.string().optional(),
|
|
2790
|
+
view_range: z16.array(z16.number().int()).optional()
|
|
2791
|
+
})
|
|
2792
|
+
)
|
|
2793
|
+
);
|
|
2794
|
+
var textEditor_20250429 = createProviderDefinedToolFactory9({
|
|
2737
2795
|
id: "anthropic.text_editor_20250429",
|
|
2738
2796
|
name: "str_replace_based_edit_tool",
|
|
2739
2797
|
inputSchema: textEditor_20250429InputSchema
|
|
@@ -2809,6 +2867,17 @@ var anthropicTools = {
|
|
|
2809
2867
|
* @param displayNumber - The display number to control (only relevant for X11 environments). If specified, the tool will be provided a display number in the tool definition.
|
|
2810
2868
|
*/
|
|
2811
2869
|
computer_20250124,
|
|
2870
|
+
/**
|
|
2871
|
+
* The memory tool enables Claude to store and retrieve information across conversations through a memory file directory.
|
|
2872
|
+
* Claude can create, read, update, and delete files that persist between sessions,
|
|
2873
|
+
* allowing it to build knowledge over time without keeping everything in the context window.
|
|
2874
|
+
* The memory tool operates client-side—you control where and how the data is stored through your own infrastructure.
|
|
2875
|
+
*
|
|
2876
|
+
* Supported models: Claude Sonnet 4.5, Claude Sonnet 4, Claude Opus 4.1, Claude Opus 4.
|
|
2877
|
+
*
|
|
2878
|
+
* Tool name must be `memory`.
|
|
2879
|
+
*/
|
|
2880
|
+
memory_20250818,
|
|
2812
2881
|
/**
|
|
2813
2882
|
* Claude can use an Anthropic-defined text editor tool to view and modify text files,
|
|
2814
2883
|
* helping you debug, fix, and improve your code or other text documents. This allows Claude
|