@ai-sdk/anthropic 3.0.0-beta.23 → 3.0.0-beta.24
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 +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 +1 -1
package/dist/internal/index.mjs
CHANGED
|
@@ -803,6 +803,14 @@ async function prepareTools({
|
|
|
803
803
|
});
|
|
804
804
|
break;
|
|
805
805
|
}
|
|
806
|
+
case "anthropic.memory_20250818": {
|
|
807
|
+
betas.add("context-management-2025-06-27");
|
|
808
|
+
anthropicTools2.push({
|
|
809
|
+
name: "memory",
|
|
810
|
+
type: "memory_20250818"
|
|
811
|
+
});
|
|
812
|
+
break;
|
|
813
|
+
}
|
|
806
814
|
case "anthropic.web_fetch_20250910": {
|
|
807
815
|
betas.add("web-fetch-2025-09-10");
|
|
808
816
|
const args = await validateTypes({
|
|
@@ -2647,40 +2655,64 @@ var computer_20250124 = createProviderDefinedToolFactory5({
|
|
|
2647
2655
|
inputSchema: computer_20250124InputSchema
|
|
2648
2656
|
});
|
|
2649
2657
|
|
|
2650
|
-
// src/tool/
|
|
2658
|
+
// src/tool/memory_20250818.ts
|
|
2651
2659
|
import {
|
|
2652
2660
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory6,
|
|
2653
2661
|
lazySchema as lazySchema12,
|
|
2654
2662
|
zodSchema as zodSchema12
|
|
2655
2663
|
} from "@ai-sdk/provider-utils";
|
|
2656
2664
|
import { z as z13 } from "zod/v4";
|
|
2657
|
-
var
|
|
2665
|
+
var memory_20250818InputSchema = lazySchema12(
|
|
2658
2666
|
() => zodSchema12(
|
|
2659
|
-
z13.
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2667
|
+
z13.discriminatedUnion("command", [
|
|
2668
|
+
z13.object({
|
|
2669
|
+
command: z13.literal("view"),
|
|
2670
|
+
path: z13.string(),
|
|
2671
|
+
view_range: z13.tuple([z13.number(), z13.number()]).optional()
|
|
2672
|
+
}),
|
|
2673
|
+
z13.object({
|
|
2674
|
+
command: z13.literal("create"),
|
|
2675
|
+
path: z13.string(),
|
|
2676
|
+
file_text: z13.string()
|
|
2677
|
+
}),
|
|
2678
|
+
z13.object({
|
|
2679
|
+
command: z13.literal("str_replace"),
|
|
2680
|
+
path: z13.string(),
|
|
2681
|
+
old_str: z13.string(),
|
|
2682
|
+
new_str: z13.string()
|
|
2683
|
+
}),
|
|
2684
|
+
z13.object({
|
|
2685
|
+
command: z13.literal("insert"),
|
|
2686
|
+
path: z13.string(),
|
|
2687
|
+
insert_line: z13.number(),
|
|
2688
|
+
insert_text: z13.string()
|
|
2689
|
+
}),
|
|
2690
|
+
z13.object({
|
|
2691
|
+
command: z13.literal("delete"),
|
|
2692
|
+
path: z13.string()
|
|
2693
|
+
}),
|
|
2694
|
+
z13.object({
|
|
2695
|
+
command: z13.literal("rename"),
|
|
2696
|
+
old_path: z13.string(),
|
|
2697
|
+
new_path: z13.string()
|
|
2698
|
+
})
|
|
2699
|
+
])
|
|
2668
2700
|
)
|
|
2669
2701
|
);
|
|
2670
|
-
var
|
|
2671
|
-
id: "anthropic.
|
|
2672
|
-
name: "
|
|
2673
|
-
inputSchema:
|
|
2702
|
+
var memory_20250818 = createProviderDefinedToolFactory6({
|
|
2703
|
+
id: "anthropic.memory_20250818",
|
|
2704
|
+
name: "memory",
|
|
2705
|
+
inputSchema: memory_20250818InputSchema
|
|
2674
2706
|
});
|
|
2675
2707
|
|
|
2676
|
-
// src/tool/text-
|
|
2708
|
+
// src/tool/text-editor_20241022.ts
|
|
2677
2709
|
import {
|
|
2678
2710
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory7,
|
|
2679
2711
|
lazySchema as lazySchema13,
|
|
2680
2712
|
zodSchema as zodSchema13
|
|
2681
2713
|
} from "@ai-sdk/provider-utils";
|
|
2682
2714
|
import { z as z14 } from "zod/v4";
|
|
2683
|
-
var
|
|
2715
|
+
var textEditor_20241022InputSchema = lazySchema13(
|
|
2684
2716
|
() => zodSchema13(
|
|
2685
2717
|
z14.object({
|
|
2686
2718
|
command: z14.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
@@ -2693,23 +2725,23 @@ var textEditor_20250124InputSchema = lazySchema13(
|
|
|
2693
2725
|
})
|
|
2694
2726
|
)
|
|
2695
2727
|
);
|
|
2696
|
-
var
|
|
2697
|
-
id: "anthropic.
|
|
2728
|
+
var textEditor_20241022 = createProviderDefinedToolFactory7({
|
|
2729
|
+
id: "anthropic.text_editor_20241022",
|
|
2698
2730
|
name: "str_replace_editor",
|
|
2699
|
-
inputSchema:
|
|
2731
|
+
inputSchema: textEditor_20241022InputSchema
|
|
2700
2732
|
});
|
|
2701
2733
|
|
|
2702
|
-
// src/tool/text-
|
|
2734
|
+
// src/tool/text-editor_20250124.ts
|
|
2703
2735
|
import {
|
|
2704
2736
|
createProviderDefinedToolFactory as createProviderDefinedToolFactory8,
|
|
2705
2737
|
lazySchema as lazySchema14,
|
|
2706
2738
|
zodSchema as zodSchema14
|
|
2707
2739
|
} from "@ai-sdk/provider-utils";
|
|
2708
2740
|
import { z as z15 } from "zod/v4";
|
|
2709
|
-
var
|
|
2741
|
+
var textEditor_20250124InputSchema = lazySchema14(
|
|
2710
2742
|
() => zodSchema14(
|
|
2711
2743
|
z15.object({
|
|
2712
|
-
command: z15.enum(["view", "create", "str_replace", "insert"]),
|
|
2744
|
+
command: z15.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
2713
2745
|
path: z15.string(),
|
|
2714
2746
|
file_text: z15.string().optional(),
|
|
2715
2747
|
insert_line: z15.number().int().optional(),
|
|
@@ -2719,7 +2751,33 @@ var textEditor_20250429InputSchema = lazySchema14(
|
|
|
2719
2751
|
})
|
|
2720
2752
|
)
|
|
2721
2753
|
);
|
|
2722
|
-
var
|
|
2754
|
+
var textEditor_20250124 = createProviderDefinedToolFactory8({
|
|
2755
|
+
id: "anthropic.text_editor_20250124",
|
|
2756
|
+
name: "str_replace_editor",
|
|
2757
|
+
inputSchema: textEditor_20250124InputSchema
|
|
2758
|
+
});
|
|
2759
|
+
|
|
2760
|
+
// src/tool/text-editor_20250429.ts
|
|
2761
|
+
import {
|
|
2762
|
+
createProviderDefinedToolFactory as createProviderDefinedToolFactory9,
|
|
2763
|
+
lazySchema as lazySchema15,
|
|
2764
|
+
zodSchema as zodSchema15
|
|
2765
|
+
} from "@ai-sdk/provider-utils";
|
|
2766
|
+
import { z as z16 } from "zod/v4";
|
|
2767
|
+
var textEditor_20250429InputSchema = lazySchema15(
|
|
2768
|
+
() => zodSchema15(
|
|
2769
|
+
z16.object({
|
|
2770
|
+
command: z16.enum(["view", "create", "str_replace", "insert"]),
|
|
2771
|
+
path: z16.string(),
|
|
2772
|
+
file_text: z16.string().optional(),
|
|
2773
|
+
insert_line: z16.number().int().optional(),
|
|
2774
|
+
new_str: z16.string().optional(),
|
|
2775
|
+
old_str: z16.string().optional(),
|
|
2776
|
+
view_range: z16.array(z16.number().int()).optional()
|
|
2777
|
+
})
|
|
2778
|
+
)
|
|
2779
|
+
);
|
|
2780
|
+
var textEditor_20250429 = createProviderDefinedToolFactory9({
|
|
2723
2781
|
id: "anthropic.text_editor_20250429",
|
|
2724
2782
|
name: "str_replace_based_edit_tool",
|
|
2725
2783
|
inputSchema: textEditor_20250429InputSchema
|
|
@@ -2795,6 +2853,17 @@ var anthropicTools = {
|
|
|
2795
2853
|
* @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.
|
|
2796
2854
|
*/
|
|
2797
2855
|
computer_20250124,
|
|
2856
|
+
/**
|
|
2857
|
+
* The memory tool enables Claude to store and retrieve information across conversations through a memory file directory.
|
|
2858
|
+
* Claude can create, read, update, and delete files that persist between sessions,
|
|
2859
|
+
* allowing it to build knowledge over time without keeping everything in the context window.
|
|
2860
|
+
* The memory tool operates client-side—you control where and how the data is stored through your own infrastructure.
|
|
2861
|
+
*
|
|
2862
|
+
* Supported models: Claude Sonnet 4.5, Claude Sonnet 4, Claude Opus 4.1, Claude Opus 4.
|
|
2863
|
+
*
|
|
2864
|
+
* Tool name must be `memory`.
|
|
2865
|
+
*/
|
|
2866
|
+
memory_20250818,
|
|
2798
2867
|
/**
|
|
2799
2868
|
* Claude can use an Anthropic-defined text editor tool to view and modify text files,
|
|
2800
2869
|
* helping you debug, fix, and improve your code or other text documents. This allows Claude
|