@anthropic-ai/sdk 0.57.0 → 0.58.0
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 +28 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js +2 -2
- package/client.js.map +1 -1
- package/client.mjs +2 -2
- package/client.mjs.map +1 -1
- package/internal/constants.d.mts.map +1 -1
- package/internal/constants.d.ts.map +1 -1
- package/internal/constants.js +3 -0
- package/internal/constants.js.map +1 -1
- package/internal/constants.mjs +3 -0
- package/internal/constants.mjs.map +1 -1
- package/package.json +1 -5
- package/resources/beta/beta.d.mts +2 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +24 -3
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +24 -3
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/index.d.mts +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +37 -33
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +37 -33
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/src/client.ts +6 -2
- package/src/internal/constants.ts +3 -0
- package/src/resources/beta/beta.ts +2 -0
- package/src/resources/beta/index.ts +1 -0
- package/src/resources/beta/messages/index.ts +1 -0
- package/src/resources/beta/messages/messages.ts +31 -0
- package/src/resources/index.ts +2 -0
- package/src/resources/messages/index.ts +2 -0
- package/src/resources/messages/messages.ts +51 -41
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -138,6 +138,8 @@ export interface CitationCharLocation {
|
|
|
138
138
|
|
|
139
139
|
end_char_index: number;
|
|
140
140
|
|
|
141
|
+
file_id: string | null;
|
|
142
|
+
|
|
141
143
|
start_char_index: number;
|
|
142
144
|
|
|
143
145
|
type: 'char_location';
|
|
@@ -166,6 +168,8 @@ export interface CitationContentBlockLocation {
|
|
|
166
168
|
|
|
167
169
|
end_block_index: number;
|
|
168
170
|
|
|
171
|
+
file_id: string | null;
|
|
172
|
+
|
|
169
173
|
start_block_index: number;
|
|
170
174
|
|
|
171
175
|
type: 'content_block_location';
|
|
@@ -194,6 +198,8 @@ export interface CitationPageLocation {
|
|
|
194
198
|
|
|
195
199
|
end_page_number: number;
|
|
196
200
|
|
|
201
|
+
file_id: string | null;
|
|
202
|
+
|
|
197
203
|
start_page_number: number;
|
|
198
204
|
|
|
199
205
|
type: 'page_location';
|
|
@@ -431,27 +437,10 @@ export type MessageCountTokensTool =
|
|
|
431
437
|
| Tool
|
|
432
438
|
| ToolBash20250124
|
|
433
439
|
| ToolTextEditor20250124
|
|
434
|
-
|
|
|
440
|
+
| ToolTextEditor20250429
|
|
441
|
+
| ToolTextEditor20250728
|
|
435
442
|
| WebSearchTool20250305;
|
|
436
443
|
|
|
437
|
-
export namespace MessageCountTokensTool {
|
|
438
|
-
export interface TextEditor20250429 {
|
|
439
|
-
/**
|
|
440
|
-
* Name of the tool.
|
|
441
|
-
*
|
|
442
|
-
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
443
|
-
*/
|
|
444
|
-
name: 'str_replace_based_edit_tool';
|
|
445
|
-
|
|
446
|
-
type: 'text_editor_20250429';
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Create a cache control breakpoint at this content block.
|
|
450
|
-
*/
|
|
451
|
-
cache_control?: MessagesAPI.CacheControlEphemeral | null;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
444
|
export interface MessageDeltaUsage {
|
|
456
445
|
/**
|
|
457
446
|
* The cumulative number of input tokens used to create the cache entry.
|
|
@@ -523,12 +512,10 @@ export type Model =
|
|
|
523
512
|
| 'claude-opus-4-0'
|
|
524
513
|
| 'claude-opus-4-20250514'
|
|
525
514
|
| 'claude-4-opus-20250514'
|
|
515
|
+
| 'claude-opus-4-1-20250805'
|
|
526
516
|
| 'claude-3-opus-latest'
|
|
527
517
|
| 'claude-3-opus-20240229'
|
|
528
|
-
| 'claude-3-sonnet-20240229'
|
|
529
518
|
| 'claude-3-haiku-20240307'
|
|
530
|
-
| 'claude-2.1'
|
|
531
|
-
| 'claude-2.0'
|
|
532
519
|
| (string & {});
|
|
533
520
|
|
|
534
521
|
const DEPRECATED_MODELS: {
|
|
@@ -955,31 +942,52 @@ export interface ToolTextEditor20250124 {
|
|
|
955
942
|
cache_control?: CacheControlEphemeral | null;
|
|
956
943
|
}
|
|
957
944
|
|
|
945
|
+
export interface ToolTextEditor20250429 {
|
|
946
|
+
/**
|
|
947
|
+
* Name of the tool.
|
|
948
|
+
*
|
|
949
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
950
|
+
*/
|
|
951
|
+
name: 'str_replace_based_edit_tool';
|
|
952
|
+
|
|
953
|
+
type: 'text_editor_20250429';
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Create a cache control breakpoint at this content block.
|
|
957
|
+
*/
|
|
958
|
+
cache_control?: CacheControlEphemeral | null;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
export interface ToolTextEditor20250728 {
|
|
962
|
+
/**
|
|
963
|
+
* Name of the tool.
|
|
964
|
+
*
|
|
965
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
966
|
+
*/
|
|
967
|
+
name: 'str_replace_based_edit_tool';
|
|
968
|
+
|
|
969
|
+
type: 'text_editor_20250728';
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* Create a cache control breakpoint at this content block.
|
|
973
|
+
*/
|
|
974
|
+
cache_control?: CacheControlEphemeral | null;
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Maximum number of characters to display when viewing a file. If not specified,
|
|
978
|
+
* defaults to displaying the full file.
|
|
979
|
+
*/
|
|
980
|
+
max_characters?: number | null;
|
|
981
|
+
}
|
|
982
|
+
|
|
958
983
|
export type ToolUnion =
|
|
959
984
|
| Tool
|
|
960
985
|
| ToolBash20250124
|
|
961
986
|
| ToolTextEditor20250124
|
|
962
|
-
|
|
|
987
|
+
| ToolTextEditor20250429
|
|
988
|
+
| ToolTextEditor20250728
|
|
963
989
|
| WebSearchTool20250305;
|
|
964
990
|
|
|
965
|
-
export namespace ToolUnion {
|
|
966
|
-
export interface TextEditor20250429 {
|
|
967
|
-
/**
|
|
968
|
-
* Name of the tool.
|
|
969
|
-
*
|
|
970
|
-
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
971
|
-
*/
|
|
972
|
-
name: 'str_replace_based_edit_tool';
|
|
973
|
-
|
|
974
|
-
type: 'text_editor_20250429';
|
|
975
|
-
|
|
976
|
-
/**
|
|
977
|
-
* Create a cache control breakpoint at this content block.
|
|
978
|
-
*/
|
|
979
|
-
cache_control?: MessagesAPI.CacheControlEphemeral | null;
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
|
|
983
991
|
export interface ToolUseBlock {
|
|
984
992
|
id: string;
|
|
985
993
|
|
|
@@ -1804,6 +1812,8 @@ export declare namespace Messages {
|
|
|
1804
1812
|
type ToolChoiceTool as ToolChoiceTool,
|
|
1805
1813
|
type ToolResultBlockParam as ToolResultBlockParam,
|
|
1806
1814
|
type ToolTextEditor20250124 as ToolTextEditor20250124,
|
|
1815
|
+
type ToolTextEditor20250429 as ToolTextEditor20250429,
|
|
1816
|
+
type ToolTextEditor20250728 as ToolTextEditor20250728,
|
|
1807
1817
|
type ToolUnion as ToolUnion,
|
|
1808
1818
|
type ToolUseBlock as ToolUseBlock,
|
|
1809
1819
|
type ToolUseBlockParam as ToolUseBlockParam,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.58.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.58.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.58.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.58.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|