@effect/ai-anthropic 4.0.0-beta.71 → 4.0.0-beta.73
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/dist/AnthropicClient.d.ts +2 -2
- package/dist/AnthropicClient.js +1 -1
- package/dist/AnthropicLanguageModel.d.ts +1 -1
- package/dist/AnthropicLanguageModel.js +2 -2
- package/dist/AnthropicTool.d.ts +116 -114
- package/dist/AnthropicTool.d.ts.map +1 -1
- package/dist/AnthropicTool.js +81 -79
- package/dist/AnthropicTool.js.map +1 -1
- package/package.json +3 -3
- package/src/AnthropicClient.ts +2 -2
- package/src/AnthropicLanguageModel.ts +2 -2
- package/src/AnthropicTool.ts +116 -114
package/dist/AnthropicTool.js
CHANGED
|
@@ -63,7 +63,7 @@ import * as Generated from "./Generated.js";
|
|
|
63
63
|
// Bash
|
|
64
64
|
// =============================================================================
|
|
65
65
|
/**
|
|
66
|
-
* Anthropic Bash tool (2024-10-22 version).
|
|
66
|
+
* Defines the Anthropic Bash tool (2024-10-22 version).
|
|
67
67
|
*
|
|
68
68
|
* **When to use**
|
|
69
69
|
*
|
|
@@ -92,7 +92,7 @@ export const Bash_20241022 = /*#__PURE__*/Tool.providerDefined({
|
|
|
92
92
|
})
|
|
93
93
|
});
|
|
94
94
|
/**
|
|
95
|
-
* Anthropic Bash tool (2025-01-24 version).
|
|
95
|
+
* Defines the Anthropic Bash tool (2025-01-24 version).
|
|
96
96
|
*
|
|
97
97
|
* **When to use**
|
|
98
98
|
*
|
|
@@ -293,7 +293,7 @@ export const CodeExecution_20250825_Parameters = /*#__PURE__*/Schema.Struct({
|
|
|
293
293
|
// Code Execution Tool Definitions
|
|
294
294
|
// -----------------------------------------------------------------------------
|
|
295
295
|
/**
|
|
296
|
-
* Anthropic Code Execution tool (2025-05-22 version).
|
|
296
|
+
* Defines the Anthropic Code Execution tool (2025-05-22 version).
|
|
297
297
|
*
|
|
298
298
|
* **When to use**
|
|
299
299
|
*
|
|
@@ -320,7 +320,7 @@ export const CodeExecution_20250522 = /*#__PURE__*/Tool.providerDefined({
|
|
|
320
320
|
failure: Generated.BetaResponseCodeExecutionToolResultError
|
|
321
321
|
});
|
|
322
322
|
/**
|
|
323
|
-
* Anthropic Code Execution tool (2025-08-25 version).
|
|
323
|
+
* Defines the Anthropic Code Execution tool (2025-08-25 version).
|
|
324
324
|
*
|
|
325
325
|
* **When to use**
|
|
326
326
|
*
|
|
@@ -364,7 +364,7 @@ export const CodeExecution_20250825 = /*#__PURE__*/Tool.providerDefined({
|
|
|
364
364
|
*
|
|
365
365
|
* This schema validates tuple shape only and does not check display bounds.
|
|
366
366
|
*
|
|
367
|
-
* @category
|
|
367
|
+
* @category computer use
|
|
368
368
|
* @since 4.0.0
|
|
369
369
|
*/
|
|
370
370
|
export const Coordinate = /*#__PURE__*/Schema.Tuple([Schema.Number, Schema.Number]);
|
|
@@ -380,27 +380,27 @@ export const Coordinate = /*#__PURE__*/Schema.Tuple([Schema.Number, Schema.Numbe
|
|
|
380
380
|
* This schema validates four numbers only and does not check coordinate ordering
|
|
381
381
|
* or display bounds.
|
|
382
382
|
*
|
|
383
|
-
* @category
|
|
383
|
+
* @category computer use
|
|
384
384
|
* @since 4.0.0
|
|
385
385
|
*/
|
|
386
386
|
export const Region = /*#__PURE__*/Schema.Tuple([Schema.Number, Schema.Number, Schema.Number, Schema.Number]);
|
|
387
387
|
/**
|
|
388
|
-
*
|
|
388
|
+
* Schema for scroll direction literals: `"up"`, `"down"`, `"left"`, or `"right"`.
|
|
389
389
|
*
|
|
390
390
|
* @see {@link ComputerUseScrollAction} for the action payload that consumes this schema
|
|
391
391
|
*
|
|
392
|
-
* @category
|
|
392
|
+
* @category computer use
|
|
393
393
|
* @since 4.0.0
|
|
394
394
|
*/
|
|
395
395
|
export const ScrollDirection = /*#__PURE__*/Schema.Literals(["up", "down", "left", "right"]);
|
|
396
396
|
/**
|
|
397
|
-
*
|
|
397
|
+
* Schema for modifier key literals.
|
|
398
398
|
*
|
|
399
399
|
* **Details**
|
|
400
400
|
*
|
|
401
401
|
* Allowed values are `"alt"`, `"ctrl"`, `"meta"`, and `"shift"`.
|
|
402
402
|
*
|
|
403
|
-
* @category
|
|
403
|
+
* @category computer use
|
|
404
404
|
* @since 4.0.0
|
|
405
405
|
*/
|
|
406
406
|
export const ModifierKey = /*#__PURE__*/Schema.Literals(["alt", "ctrl", "meta", "shift"]);
|
|
@@ -442,7 +442,7 @@ const ComputerUse_20251124_Args = /*#__PURE__*/Schema.Struct({
|
|
|
442
442
|
* @see {@link TypeAction} for entering ordinary text strings
|
|
443
443
|
* @see {@link ComputerUseHoldKeyAction} for holding a key for a duration
|
|
444
444
|
*
|
|
445
|
-
* @category
|
|
445
|
+
* @category computer use
|
|
446
446
|
* @since 4.0.0
|
|
447
447
|
*/
|
|
448
448
|
export const ComputerUseKeyAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -475,7 +475,7 @@ export const ComputerUseKeyAction = /*#__PURE__*/Schema.Struct({
|
|
|
475
475
|
* @see {@link ComputerUseDoubleClickAction} for performing a double click
|
|
476
476
|
* @see {@link ComputerUseMouseMoveAction} for moving the mouse without clicking
|
|
477
477
|
*
|
|
478
|
-
* @category
|
|
478
|
+
* @category computer use
|
|
479
479
|
* @since 4.0.0
|
|
480
480
|
*/
|
|
481
481
|
export const ComputerUseLeftClickAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -506,7 +506,7 @@ export const ComputerUseLeftClickAction = /*#__PURE__*/Schema.Struct({
|
|
|
506
506
|
* does not validate that the point falls within the configured display
|
|
507
507
|
* dimensions.
|
|
508
508
|
*
|
|
509
|
-
* @category
|
|
509
|
+
* @category computer use
|
|
510
510
|
* @since 4.0.0
|
|
511
511
|
*/
|
|
512
512
|
export const ComputerUseMouseMoveAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -531,7 +531,7 @@ export const ComputerUseMouseMoveAction = /*#__PURE__*/Schema.Struct({
|
|
|
531
531
|
*
|
|
532
532
|
* @see {@link ComputerUseZoomAction} for requesting a zoomed-in screenshot of a specific screen region with the 2025-11-24 computer-use tool
|
|
533
533
|
*
|
|
534
|
-
* @category
|
|
534
|
+
* @category computer use
|
|
535
535
|
* @since 4.0.0
|
|
536
536
|
*/
|
|
537
537
|
export const ComputerUseScreenshotAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -552,7 +552,7 @@ export const ComputerUseScreenshotAction = /*#__PURE__*/Schema.Struct({
|
|
|
552
552
|
*
|
|
553
553
|
* @see {@link ComputerUseKeyAction} for key presses and keyboard shortcuts
|
|
554
554
|
*
|
|
555
|
-
* @category
|
|
555
|
+
* @category computer use
|
|
556
556
|
* @since 4.0.0
|
|
557
557
|
*/
|
|
558
558
|
export const TypeAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -588,7 +588,7 @@ const ComputerUse_20241022_Actions = /*#__PURE__*/Schema.Union([ComputerUseKeyAc
|
|
|
588
588
|
*
|
|
589
589
|
* @see {@link ComputerUseLeftClickAction} for performing a single left click
|
|
590
590
|
*
|
|
591
|
-
* @category
|
|
591
|
+
* @category computer use
|
|
592
592
|
* @since 4.0.0
|
|
593
593
|
*/
|
|
594
594
|
export const ComputerUseDoubleClickAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -600,7 +600,7 @@ export const ComputerUseDoubleClickAction = /*#__PURE__*/Schema.Struct({
|
|
|
600
600
|
coordinate: /*#__PURE__*/Schema.optional(Coordinate)
|
|
601
601
|
});
|
|
602
602
|
/**
|
|
603
|
-
*
|
|
603
|
+
* Keeps a key pressed for a specified duration during computer-use execution.
|
|
604
604
|
*
|
|
605
605
|
* **When to use**
|
|
606
606
|
*
|
|
@@ -621,7 +621,7 @@ export const ComputerUseDoubleClickAction = /*#__PURE__*/Schema.Struct({
|
|
|
621
621
|
* @see {@link ComputerUseKeyAction} for pressing a key or key combination without holding it
|
|
622
622
|
* @see {@link ComputerUseWaitAction} for pausing between actions without holding a key
|
|
623
623
|
*
|
|
624
|
-
* @category
|
|
624
|
+
* @category computer use
|
|
625
625
|
* @since 4.0.0
|
|
626
626
|
*/
|
|
627
627
|
export const ComputerUseHoldKeyAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -657,7 +657,7 @@ export const ComputerUseHoldKeyAction = /*#__PURE__*/Schema.Struct({
|
|
|
657
657
|
* @see {@link ComputerUseLeftMouseDownAction} for starting a manual drag sequence
|
|
658
658
|
* @see {@link ComputerUseLeftMouseUpAction} for ending a manual drag sequence
|
|
659
659
|
*
|
|
660
|
-
* @category
|
|
660
|
+
* @category computer use
|
|
661
661
|
* @since 4.0.0
|
|
662
662
|
*/
|
|
663
663
|
export const ComputerUseLeftClickDragAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -672,13 +672,14 @@ export const ComputerUseLeftClickDragAction = /*#__PURE__*/Schema.Struct({
|
|
|
672
672
|
coordinate: Coordinate
|
|
673
673
|
});
|
|
674
674
|
/**
|
|
675
|
-
*
|
|
675
|
+
* Starts a left mouse button press without releasing it.
|
|
676
676
|
*
|
|
677
677
|
* **When to use**
|
|
678
678
|
*
|
|
679
|
-
* Use when
|
|
679
|
+
* Use when constructing a manual click or drag sequence that should press and
|
|
680
|
+
* hold the left mouse button before a later release.
|
|
680
681
|
*
|
|
681
|
-
* @category
|
|
682
|
+
* @category computer use
|
|
682
683
|
* @since 4.0.0
|
|
683
684
|
*/
|
|
684
685
|
export const ComputerUseLeftMouseDownAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -690,13 +691,14 @@ export const ComputerUseLeftMouseDownAction = /*#__PURE__*/Schema.Struct({
|
|
|
690
691
|
coordinate: /*#__PURE__*/Schema.optional(Coordinate)
|
|
691
692
|
});
|
|
692
693
|
/**
|
|
693
|
-
*
|
|
694
|
+
* Releases the left mouse button.
|
|
694
695
|
*
|
|
695
696
|
* **When to use**
|
|
696
697
|
*
|
|
697
|
-
* Use when
|
|
698
|
+
* Use when constructing a manual click or drag sequence that should release the
|
|
699
|
+
* left mouse button after it was previously held down.
|
|
698
700
|
*
|
|
699
|
-
* @category
|
|
701
|
+
* @category computer use
|
|
700
702
|
* @since 4.0.0
|
|
701
703
|
*/
|
|
702
704
|
export const ComputerUseLeftMouseUpAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -729,7 +731,7 @@ export const ComputerUseLeftMouseUpAction = /*#__PURE__*/Schema.Struct({
|
|
|
729
731
|
* @see {@link ComputerUseLeftClickAction} for primary-button clicks
|
|
730
732
|
* @see {@link ComputerUseRightClickAction} for secondary-button clicks
|
|
731
733
|
*
|
|
732
|
-
* @category
|
|
734
|
+
* @category computer use
|
|
733
735
|
* @since 4.0.0
|
|
734
736
|
*/
|
|
735
737
|
export const ComputerUseMiddleClickAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -758,7 +760,7 @@ export const ComputerUseMiddleClickAction = /*#__PURE__*/Schema.Struct({
|
|
|
758
760
|
* @see {@link ComputerUseLeftClickAction} for the corresponding left-click action
|
|
759
761
|
* @see {@link ComputerUseMiddleClickAction} for the corresponding middle-click action
|
|
760
762
|
*
|
|
761
|
-
* @category
|
|
763
|
+
* @category computer use
|
|
762
764
|
* @since 4.0.0
|
|
763
765
|
*/
|
|
764
766
|
export const ComputerUseRightClickAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -789,7 +791,7 @@ export const ComputerUseRightClickAction = /*#__PURE__*/Schema.Struct({
|
|
|
789
791
|
* @see {@link ComputerUse_20250124} for the tool version that accepts this action
|
|
790
792
|
* @see {@link ScrollDirection} for the accepted direction literals
|
|
791
793
|
*
|
|
792
|
-
* @category
|
|
794
|
+
* @category computer use
|
|
793
795
|
* @since 4.0.0
|
|
794
796
|
*/
|
|
795
797
|
export const ComputerUseScrollAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -830,7 +832,7 @@ export const ComputerUseScrollAction = /*#__PURE__*/Schema.Struct({
|
|
|
830
832
|
* @see {@link ComputerUseDoubleClickAction} for the two-click variant
|
|
831
833
|
* @see {@link ComputerUseLeftClickAction} for a single left click
|
|
832
834
|
*
|
|
833
|
-
* @category
|
|
835
|
+
* @category computer use
|
|
834
836
|
* @since 4.0.0
|
|
835
837
|
*/
|
|
836
838
|
export const ComputerUseTripleClickAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -862,7 +864,7 @@ export const ComputerUseTripleClickAction = /*#__PURE__*/Schema.Struct({
|
|
|
862
864
|
* @see {@link ComputerUseHoldKeyAction} for another duration-based computer-use action
|
|
863
865
|
* @see {@link ComputerUse_20250124} for the tool version that accepts this action
|
|
864
866
|
*
|
|
865
|
-
* @category
|
|
867
|
+
* @category computer use
|
|
866
868
|
* @since 4.0.0
|
|
867
869
|
*/
|
|
868
870
|
export const ComputerUseWaitAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -877,7 +879,7 @@ const ComputerUse_20250124_Actions = /*#__PURE__*/Schema.Union([...ComputerUse_2
|
|
|
877
879
|
// Computer Use 20251124 Actions
|
|
878
880
|
// -----------------------------------------------------------------------------
|
|
879
881
|
/**
|
|
880
|
-
*
|
|
882
|
+
* Zooms into a specific region of the screen at full resolution.
|
|
881
883
|
*
|
|
882
884
|
* **Details**
|
|
883
885
|
*
|
|
@@ -891,7 +893,7 @@ const ComputerUse_20250124_Actions = /*#__PURE__*/Schema.Union([...ComputerUse_2
|
|
|
891
893
|
* @see {@link ComputerUse_20251124} for the tool version that accepts this action
|
|
892
894
|
* @see {@link ComputerUseScreenshotAction} for capturing the full screen instead
|
|
893
895
|
*
|
|
894
|
-
* @category
|
|
896
|
+
* @category computer use
|
|
895
897
|
* @since 4.0.0
|
|
896
898
|
*/
|
|
897
899
|
export const ComputerUseZoomAction = /*#__PURE__*/Schema.Struct({
|
|
@@ -907,14 +909,14 @@ const ComputerUse_20251124_Actions = /*#__PURE__*/Schema.Union([...ComputerUse_2
|
|
|
907
909
|
// Computer Use Tool Definitions
|
|
908
910
|
// -----------------------------------------------------------------------------
|
|
909
911
|
/**
|
|
910
|
-
*
|
|
912
|
+
* Defines the deprecated computer-use tool for Claude 3.5 Sonnet v2.
|
|
911
913
|
*
|
|
912
914
|
* **Details**
|
|
913
915
|
*
|
|
914
916
|
* Requires the "computer-use-2024-10-22" beta header.
|
|
915
917
|
* Basic actions only: screenshot, left_click, type, key, mouse_move.
|
|
916
918
|
*
|
|
917
|
-
* @category
|
|
919
|
+
* @category computer use
|
|
918
920
|
* @since 4.0.0
|
|
919
921
|
*/
|
|
920
922
|
export const ComputerUse_20241022 = /*#__PURE__*/Tool.providerDefined({
|
|
@@ -927,7 +929,7 @@ export const ComputerUse_20241022 = /*#__PURE__*/Tool.providerDefined({
|
|
|
927
929
|
success: Schema.String
|
|
928
930
|
});
|
|
929
931
|
/**
|
|
930
|
-
*
|
|
932
|
+
* Defines the computer-use tool for Claude 4 models and Claude Sonnet 3.7.
|
|
931
933
|
*
|
|
932
934
|
* **When to use**
|
|
933
935
|
*
|
|
@@ -944,7 +946,7 @@ export const ComputerUse_20241022 = /*#__PURE__*/Tool.providerDefined({
|
|
|
944
946
|
* @see {@link ComputerUse_20241022} for the older basic action set
|
|
945
947
|
* @see {@link ComputerUse_20251124} for the newer zoom-capable version
|
|
946
948
|
*
|
|
947
|
-
* @category
|
|
949
|
+
* @category computer use
|
|
948
950
|
* @since 4.0.0
|
|
949
951
|
*/
|
|
950
952
|
export const ComputerUse_20250124 = /*#__PURE__*/Tool.providerDefined({
|
|
@@ -957,7 +959,7 @@ export const ComputerUse_20250124 = /*#__PURE__*/Tool.providerDefined({
|
|
|
957
959
|
success: Schema.String
|
|
958
960
|
});
|
|
959
961
|
/**
|
|
960
|
-
*
|
|
962
|
+
* Defines the computer-use tool for Claude Opus 4.5 only.
|
|
961
963
|
*
|
|
962
964
|
* **When to use**
|
|
963
965
|
*
|
|
@@ -977,7 +979,7 @@ export const ComputerUse_20250124 = /*#__PURE__*/Tool.providerDefined({
|
|
|
977
979
|
* @see {@link ComputerUse_20250124} for the previous action set without zoom
|
|
978
980
|
* @see {@link ComputerUseZoomAction} for the zoom action payload
|
|
979
981
|
*
|
|
980
|
-
* @category
|
|
982
|
+
* @category computer use
|
|
981
983
|
* @since 4.0.0
|
|
982
984
|
*/
|
|
983
985
|
export const ComputerUse_20251124 = /*#__PURE__*/Tool.providerDefined({
|
|
@@ -996,7 +998,7 @@ export const ComputerUse_20251124 = /*#__PURE__*/Tool.providerDefined({
|
|
|
996
998
|
// Common Types
|
|
997
999
|
// -----------------------------------------------------------------------------
|
|
998
1000
|
/**
|
|
999
|
-
*
|
|
1001
|
+
* Defines a `[start, end]` line range for viewing file contents.
|
|
1000
1002
|
*
|
|
1001
1003
|
* **When to use**
|
|
1002
1004
|
*
|
|
@@ -1012,7 +1014,7 @@ export const ComputerUse_20251124 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1012
1014
|
* @see {@link MemoryViewCommand} for memory view payloads that use this range
|
|
1013
1015
|
* @see {@link TextEditorViewCommand} for text editor view payloads that use this range
|
|
1014
1016
|
*
|
|
1015
|
-
* @category
|
|
1017
|
+
* @category memory
|
|
1016
1018
|
* @since 4.0.0
|
|
1017
1019
|
*/
|
|
1018
1020
|
export const ViewRange = /*#__PURE__*/Schema.Tuple([Schema.Number, Schema.Number]);
|
|
@@ -1026,7 +1028,7 @@ export const ViewRange = /*#__PURE__*/Schema.Tuple([Schema.Number, Schema.Number
|
|
|
1026
1028
|
*
|
|
1027
1029
|
* The payload contains `command: "create"` and a `path` string.
|
|
1028
1030
|
*
|
|
1029
|
-
* @category
|
|
1031
|
+
* @category memory
|
|
1030
1032
|
* @since 4.0.0
|
|
1031
1033
|
*/
|
|
1032
1034
|
export const MemoryCreateCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1039,7 +1041,7 @@ export const MemoryCreateCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1039
1041
|
/**
|
|
1040
1042
|
* Schema for a memory command that deletes a file or directory.
|
|
1041
1043
|
*
|
|
1042
|
-
* @category
|
|
1044
|
+
* @category memory
|
|
1043
1045
|
* @since 4.0.0
|
|
1044
1046
|
*/
|
|
1045
1047
|
export const MemoryDeleteCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1064,7 +1066,7 @@ export const MemoryDeleteCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1064
1066
|
* @see {@link Memory_20250818} for the provider-defined tool that consumes this command
|
|
1065
1067
|
* @see {@link MemoryStrReplaceCommand} for replacing existing text instead
|
|
1066
1068
|
*
|
|
1067
|
-
* @category
|
|
1069
|
+
* @category memory
|
|
1068
1070
|
* @since 4.0.0
|
|
1069
1071
|
*/
|
|
1070
1072
|
export const MemoryInsertCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1090,7 +1092,7 @@ export const MemoryInsertCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1090
1092
|
* The payload uses `command: "rename"` and requires `old_path` as the current
|
|
1091
1093
|
* path plus `new_path` as the new destination path.
|
|
1092
1094
|
*
|
|
1093
|
-
* @category
|
|
1095
|
+
* @category memory
|
|
1094
1096
|
* @since 4.0.0
|
|
1095
1097
|
*/
|
|
1096
1098
|
export const MemoryRenameCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1119,7 +1121,7 @@ export const MemoryRenameCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1119
1121
|
*
|
|
1120
1122
|
* @see {@link Memory_20250818} for the provider-defined tool that consumes this command
|
|
1121
1123
|
*
|
|
1122
|
-
* @category
|
|
1124
|
+
* @category memory
|
|
1123
1125
|
* @since 4.0.0
|
|
1124
1126
|
*/
|
|
1125
1127
|
export const MemoryStrReplaceCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1145,7 +1147,7 @@ export const MemoryStrReplaceCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1145
1147
|
* When used on a file, returns file contents optionally limited by `view_range`.
|
|
1146
1148
|
* When used on a directory, lists contents.
|
|
1147
1149
|
*
|
|
1148
|
-
* @category
|
|
1150
|
+
* @category memory
|
|
1149
1151
|
* @since 4.0.0
|
|
1150
1152
|
*/
|
|
1151
1153
|
export const MemoryViewCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1164,14 +1166,14 @@ const Memory_20250818_Commands = /*#__PURE__*/Schema.Union([MemoryCreateCommand,
|
|
|
1164
1166
|
// Memory Tool Definitions
|
|
1165
1167
|
// -----------------------------------------------------------------------------
|
|
1166
1168
|
/**
|
|
1167
|
-
*
|
|
1169
|
+
* Defines the memory tool for persistent file operations across conversations.
|
|
1168
1170
|
*
|
|
1169
1171
|
* **Details**
|
|
1170
1172
|
*
|
|
1171
1173
|
* Provides commands for creating, viewing, editing, renaming, and deleting
|
|
1172
1174
|
* files within the model's memory space.
|
|
1173
1175
|
*
|
|
1174
|
-
* @category
|
|
1176
|
+
* @category memory
|
|
1175
1177
|
* @since 4.0.0
|
|
1176
1178
|
*/
|
|
1177
1179
|
export const Memory_20250818 = /*#__PURE__*/Tool.providerDefined({
|
|
@@ -1188,7 +1190,7 @@ export const Memory_20250818 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1188
1190
|
// Text Editor Commands
|
|
1189
1191
|
// -----------------------------------------------------------------------------
|
|
1190
1192
|
/**
|
|
1191
|
-
*
|
|
1193
|
+
* Reads the contents of a file or lists directory contents.
|
|
1192
1194
|
*
|
|
1193
1195
|
* **When to use**
|
|
1194
1196
|
*
|
|
@@ -1204,7 +1206,7 @@ export const Memory_20250818 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1204
1206
|
*
|
|
1205
1207
|
* @see {@link CodeExecutionTextEditorView} for the code-execution variant without `view_range`
|
|
1206
1208
|
*
|
|
1207
|
-
* @category
|
|
1209
|
+
* @category text editor
|
|
1208
1210
|
* @since 4.0.0
|
|
1209
1211
|
*/
|
|
1210
1212
|
export const TextEditorViewCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1236,7 +1238,7 @@ export const TextEditorViewCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1236
1238
|
*
|
|
1237
1239
|
* Fails if the file already exists. Parent directories must exist.
|
|
1238
1240
|
*
|
|
1239
|
-
* @category
|
|
1241
|
+
* @category text editor
|
|
1240
1242
|
* @since 4.0.0
|
|
1241
1243
|
*/
|
|
1242
1244
|
export const TextEditorCreateCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1251,7 +1253,7 @@ export const TextEditorCreateCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1251
1253
|
file_text: Schema.String
|
|
1252
1254
|
});
|
|
1253
1255
|
/**
|
|
1254
|
-
*
|
|
1256
|
+
* Replaces a specific string in a file with a new string.
|
|
1255
1257
|
*
|
|
1256
1258
|
* **When to use**
|
|
1257
1259
|
*
|
|
@@ -1271,7 +1273,7 @@ export const TextEditorCreateCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1271
1273
|
* @see {@link TextEditorViewCommand} for reading contents before choosing `old_str`
|
|
1272
1274
|
* @see {@link CodeExecutionTextEditorStrReplace} for the code-execution variant
|
|
1273
1275
|
*
|
|
1274
|
-
* @category
|
|
1276
|
+
* @category text editor
|
|
1275
1277
|
* @since 4.0.0
|
|
1276
1278
|
*/
|
|
1277
1279
|
export const TextEditorStrReplaceCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1290,14 +1292,14 @@ export const TextEditorStrReplaceCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1290
1292
|
new_str: Schema.String
|
|
1291
1293
|
});
|
|
1292
1294
|
/**
|
|
1293
|
-
*
|
|
1295
|
+
* Inserts text at a specific line number in a file.
|
|
1294
1296
|
*
|
|
1295
1297
|
* **Details**
|
|
1296
1298
|
*
|
|
1297
1299
|
* Inserts the new text after the specified line number. Use `0` to insert at
|
|
1298
1300
|
* the beginning of the file; other values are 1-indexed.
|
|
1299
1301
|
*
|
|
1300
|
-
* @category
|
|
1302
|
+
* @category text editor
|
|
1301
1303
|
* @since 4.0.0
|
|
1302
1304
|
*/
|
|
1303
1305
|
export const TextEditorInsertCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1316,7 +1318,7 @@ export const TextEditorInsertCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1316
1318
|
new_str: Schema.String
|
|
1317
1319
|
});
|
|
1318
1320
|
/**
|
|
1319
|
-
*
|
|
1321
|
+
* Undoes the last edit made to a file.
|
|
1320
1322
|
*
|
|
1321
1323
|
* **Details**
|
|
1322
1324
|
*
|
|
@@ -1329,7 +1331,7 @@ export const TextEditorInsertCommand = /*#__PURE__*/Schema.Struct({
|
|
|
1329
1331
|
* `text_editor_20250124`, but not in `text_editor_20250429` or
|
|
1330
1332
|
* `text_editor_20250728`.
|
|
1331
1333
|
*
|
|
1332
|
-
* @category
|
|
1334
|
+
* @category text editor
|
|
1333
1335
|
* @since 4.0.0
|
|
1334
1336
|
*/
|
|
1335
1337
|
export const TextEditorUndoEditCommand = /*#__PURE__*/Schema.Struct({
|
|
@@ -1355,7 +1357,7 @@ const TextEditor_StrReplaceBasedEdit_Args = /*#__PURE__*/Schema.Struct({
|
|
|
1355
1357
|
// Text Editor Tool Definitions
|
|
1356
1358
|
// -----------------------------------------------------------------------------
|
|
1357
1359
|
/**
|
|
1358
|
-
*
|
|
1360
|
+
* Defines the deprecated text editor tool for Claude 3.5 Sonnet.
|
|
1359
1361
|
*
|
|
1360
1362
|
* **When to use**
|
|
1361
1363
|
*
|
|
@@ -1370,7 +1372,7 @@ const TextEditor_StrReplaceBasedEdit_Args = /*#__PURE__*/Schema.Struct({
|
|
|
1370
1372
|
* @see {@link TextEditor_20250124} for the newer `str_replace_editor` version
|
|
1371
1373
|
* @see {@link TextEditor_20250728} for the Claude 4 `str_replace_based_edit_tool` line
|
|
1372
1374
|
*
|
|
1373
|
-
* @category
|
|
1375
|
+
* @category text editor
|
|
1374
1376
|
* @since 4.0.0
|
|
1375
1377
|
*/
|
|
1376
1378
|
export const TextEditor_20241022 = /*#__PURE__*/Tool.providerDefined({
|
|
@@ -1382,7 +1384,7 @@ export const TextEditor_20241022 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1382
1384
|
success: Schema.String
|
|
1383
1385
|
});
|
|
1384
1386
|
/**
|
|
1385
|
-
*
|
|
1387
|
+
* Defines the text editor tool for deprecated Claude Sonnet 3.7.
|
|
1386
1388
|
*
|
|
1387
1389
|
* **When to use**
|
|
1388
1390
|
*
|
|
@@ -1397,7 +1399,7 @@ export const TextEditor_20241022 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1397
1399
|
* @see {@link TextEditor_20241022} for the older `str_replace_editor` version
|
|
1398
1400
|
* @see {@link TextEditor_20250429} for the Claude 4 `str_replace_based_edit_tool` line
|
|
1399
1401
|
*
|
|
1400
|
-
* @category
|
|
1402
|
+
* @category text editor
|
|
1401
1403
|
* @since 4.0.0
|
|
1402
1404
|
*/
|
|
1403
1405
|
export const TextEditor_20250124 = /*#__PURE__*/Tool.providerDefined({
|
|
@@ -1409,7 +1411,7 @@ export const TextEditor_20250124 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1409
1411
|
success: Schema.String
|
|
1410
1412
|
});
|
|
1411
1413
|
/**
|
|
1412
|
-
*
|
|
1414
|
+
* Defines the text editor tool for Claude 4 models using Anthropic's `str_replace_based_edit_tool`.
|
|
1413
1415
|
*
|
|
1414
1416
|
* **When to use**
|
|
1415
1417
|
*
|
|
@@ -1427,7 +1429,7 @@ export const TextEditor_20250124 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1427
1429
|
* @see {@link TextEditor_20250124} for the previous `str_replace_editor` version
|
|
1428
1430
|
* @see {@link TextEditor_20250728} for the later Claude 4 text editor version
|
|
1429
1431
|
*
|
|
1430
|
-
* @category
|
|
1432
|
+
* @category text editor
|
|
1431
1433
|
* @since 4.0.0
|
|
1432
1434
|
*/
|
|
1433
1435
|
export const TextEditor_20250429 = /*#__PURE__*/Tool.providerDefined({
|
|
@@ -1440,7 +1442,7 @@ export const TextEditor_20250429 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1440
1442
|
success: Schema.String
|
|
1441
1443
|
});
|
|
1442
1444
|
/**
|
|
1443
|
-
*
|
|
1445
|
+
* Defines the text editor tool for Claude 4 models.
|
|
1444
1446
|
*
|
|
1445
1447
|
* **Details**
|
|
1446
1448
|
*
|
|
@@ -1451,7 +1453,7 @@ export const TextEditor_20250429 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1451
1453
|
*
|
|
1452
1454
|
* This version does not support the `undo_edit` command.
|
|
1453
1455
|
*
|
|
1454
|
-
* @category
|
|
1456
|
+
* @category text editor
|
|
1455
1457
|
* @since 4.0.0
|
|
1456
1458
|
*/
|
|
1457
1459
|
export const TextEditor_20250728 = /*#__PURE__*/Tool.providerDefined({
|
|
@@ -1470,7 +1472,7 @@ export const TextEditor_20250728 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1470
1472
|
// Web Search Types
|
|
1471
1473
|
// -----------------------------------------------------------------------------
|
|
1472
1474
|
/**
|
|
1473
|
-
*
|
|
1475
|
+
* Describes user location for localizing search results.
|
|
1474
1476
|
*
|
|
1475
1477
|
* **When to use**
|
|
1476
1478
|
*
|
|
@@ -1514,7 +1516,7 @@ export const WebSearchUserLocation = /*#__PURE__*/Schema.Struct({
|
|
|
1514
1516
|
// Web Search Args
|
|
1515
1517
|
// -----------------------------------------------------------------------------
|
|
1516
1518
|
/**
|
|
1517
|
-
*
|
|
1519
|
+
* Defines configuration arguments for the web search tool.
|
|
1518
1520
|
*
|
|
1519
1521
|
* **When to use**
|
|
1520
1522
|
*
|
|
@@ -1584,7 +1586,7 @@ export const WebSearchParameters = /*#__PURE__*/Schema.Struct({
|
|
|
1584
1586
|
// Web Search Tool Definitions
|
|
1585
1587
|
// -----------------------------------------------------------------------------
|
|
1586
1588
|
/**
|
|
1587
|
-
*
|
|
1589
|
+
* Defines the web search tool for Claude models.
|
|
1588
1590
|
*
|
|
1589
1591
|
* **When to use**
|
|
1590
1592
|
*
|
|
@@ -1617,7 +1619,7 @@ export const WebSearch_20250305 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1617
1619
|
// Web Fetch Types
|
|
1618
1620
|
// -----------------------------------------------------------------------------
|
|
1619
1621
|
/**
|
|
1620
|
-
*
|
|
1622
|
+
* Defines citation configuration for web fetch.
|
|
1621
1623
|
*
|
|
1622
1624
|
* **When to use**
|
|
1623
1625
|
*
|
|
@@ -1643,7 +1645,7 @@ export const WebFetchCitationsConfig = /*#__PURE__*/Schema.Struct({
|
|
|
1643
1645
|
// Web Fetch Args
|
|
1644
1646
|
// -----------------------------------------------------------------------------
|
|
1645
1647
|
/**
|
|
1646
|
-
*
|
|
1648
|
+
* Defines configuration arguments for the web fetch tool.
|
|
1647
1649
|
*
|
|
1648
1650
|
* **When to use**
|
|
1649
1651
|
*
|
|
@@ -1729,7 +1731,7 @@ export const WebFetchParameters = /*#__PURE__*/Schema.Struct({
|
|
|
1729
1731
|
// Web Fetch Tool Definitions
|
|
1730
1732
|
// -----------------------------------------------------------------------------
|
|
1731
1733
|
/**
|
|
1732
|
-
*
|
|
1734
|
+
* Defines the web fetch tool for Claude models.
|
|
1733
1735
|
*
|
|
1734
1736
|
* **When to use**
|
|
1735
1737
|
*
|
|
@@ -1762,14 +1764,14 @@ export const WebFetch_20250910 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1762
1764
|
// Tool Search Parameters
|
|
1763
1765
|
// -----------------------------------------------------------------------------
|
|
1764
1766
|
/**
|
|
1765
|
-
*
|
|
1767
|
+
* Schema for regex-based tool search input parameters.
|
|
1766
1768
|
*
|
|
1767
1769
|
* **Details**
|
|
1768
1770
|
*
|
|
1769
1771
|
* Claude constructs regex patterns using Python's `re.search()` syntax.
|
|
1770
1772
|
* Maximum query length: 200 characters.
|
|
1771
1773
|
*
|
|
1772
|
-
* @category
|
|
1774
|
+
* @category tool search
|
|
1773
1775
|
* @since 4.0.0
|
|
1774
1776
|
*/
|
|
1775
1777
|
export const ToolSearchRegexParameters = /*#__PURE__*/Schema.Struct({
|
|
@@ -1779,7 +1781,7 @@ export const ToolSearchRegexParameters = /*#__PURE__*/Schema.Struct({
|
|
|
1779
1781
|
query: Schema.String
|
|
1780
1782
|
});
|
|
1781
1783
|
/**
|
|
1782
|
-
*
|
|
1784
|
+
* Defines input parameters for BM25/natural language tool search.
|
|
1783
1785
|
*
|
|
1784
1786
|
* **When to use**
|
|
1785
1787
|
*
|
|
@@ -1793,7 +1795,7 @@ export const ToolSearchRegexParameters = /*#__PURE__*/Schema.Struct({
|
|
|
1793
1795
|
*
|
|
1794
1796
|
* @see {@link ToolSearchBM25_20251119} for the provider-defined tool that consumes these parameters
|
|
1795
1797
|
*
|
|
1796
|
-
* @category
|
|
1798
|
+
* @category tool search
|
|
1797
1799
|
* @since 4.0.0
|
|
1798
1800
|
*/
|
|
1799
1801
|
export const ToolSearchBM25Parameters = /*#__PURE__*/Schema.Struct({
|
|
@@ -1806,7 +1808,7 @@ export const ToolSearchBM25Parameters = /*#__PURE__*/Schema.Struct({
|
|
|
1806
1808
|
// Tool Search Tool Definitions
|
|
1807
1809
|
// -----------------------------------------------------------------------------
|
|
1808
1810
|
/**
|
|
1809
|
-
*
|
|
1811
|
+
* Defines regex-based tool search for Claude models.
|
|
1810
1812
|
*
|
|
1811
1813
|
* **Details**
|
|
1812
1814
|
*
|
|
@@ -1815,7 +1817,7 @@ export const ToolSearchBM25Parameters = /*#__PURE__*/Schema.Struct({
|
|
|
1815
1817
|
* argument names, and argument descriptions.
|
|
1816
1818
|
* Requires the "advanced-tool-use-2025-11-20" beta header.
|
|
1817
1819
|
*
|
|
1818
|
-
* @category
|
|
1820
|
+
* @category tool search
|
|
1819
1821
|
* @since 4.0.0
|
|
1820
1822
|
*/
|
|
1821
1823
|
export const ToolSearchRegex_20251119 = /*#__PURE__*/Tool.providerDefined({
|
|
@@ -1827,7 +1829,7 @@ export const ToolSearchRegex_20251119 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1827
1829
|
failure: Generated.BetaResponseToolSearchToolResultError
|
|
1828
1830
|
});
|
|
1829
1831
|
/**
|
|
1830
|
-
* BM25/natural language tool search for Claude models.
|
|
1832
|
+
* Defines BM25/natural language tool search for Claude models.
|
|
1831
1833
|
*
|
|
1832
1834
|
* **When to use**
|
|
1833
1835
|
*
|
|
@@ -1843,7 +1845,7 @@ export const ToolSearchRegex_20251119 = /*#__PURE__*/Tool.providerDefined({
|
|
|
1843
1845
|
*
|
|
1844
1846
|
* @see {@link ToolSearchRegex_20251119} for the regex-pattern alternative
|
|
1845
1847
|
*
|
|
1846
|
-
* @category
|
|
1848
|
+
* @category tool search
|
|
1847
1849
|
* @since 4.0.0
|
|
1848
1850
|
*/
|
|
1849
1851
|
export const ToolSearchBM25_20251119 = /*#__PURE__*/Tool.providerDefined({
|