@anthropic-ai/sdk 0.99.0 → 0.100.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 +13 -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.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +10 -7
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +10 -7
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- 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/batches.d.mts +3 -2
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +3 -2
- package/resources/beta/messages/batches.d.ts.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 +81 -14
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +81 -14
- 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/completions.d.mts +6 -4
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +6 -4
- package/resources/completions.d.ts.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 +66 -13
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +66 -13
- 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 +4 -0
- package/src/resources/beta/agents/agents.ts +10 -6
- package/src/resources/beta/beta.ts +4 -0
- package/src/resources/beta/index.ts +2 -0
- package/src/resources/beta/messages/batches.ts +3 -2
- package/src/resources/beta/messages/index.ts +2 -0
- package/src/resources/beta/messages/messages.ts +93 -12
- package/src/resources/completions.ts +6 -4
- package/src/resources/index.ts +2 -0
- package/src/resources/messages/index.ts +2 -0
- package/src/resources/messages/messages.ts +73 -10
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -823,7 +823,8 @@ export type ContentBlockParam =
|
|
|
823
823
|
| BashCodeExecutionToolResultBlockParam
|
|
824
824
|
| TextEditorCodeExecutionToolResultBlockParam
|
|
825
825
|
| ToolSearchToolResultBlockParam
|
|
826
|
-
| ContainerUploadBlockParam
|
|
826
|
+
| ContainerUploadBlockParam
|
|
827
|
+
| MidConversationSystemBlockParam;
|
|
827
828
|
|
|
828
829
|
export interface ContentBlockSource {
|
|
829
830
|
content: string | Array<ContentBlockSourceContent>;
|
|
@@ -1011,8 +1012,9 @@ export interface Message {
|
|
|
1011
1012
|
content: Array<ContentBlock>;
|
|
1012
1013
|
|
|
1013
1014
|
/**
|
|
1014
|
-
* The model that will complete your prompt
|
|
1015
|
-
*
|
|
1015
|
+
* The model that will complete your prompt.
|
|
1016
|
+
*
|
|
1017
|
+
* See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
1016
1018
|
* details and options.
|
|
1017
1019
|
*/
|
|
1018
1020
|
model: Model;
|
|
@@ -1126,6 +1128,16 @@ export interface MessageDeltaUsage {
|
|
|
1126
1128
|
*/
|
|
1127
1129
|
output_tokens: number;
|
|
1128
1130
|
|
|
1131
|
+
/**
|
|
1132
|
+
* Breakdown of output tokens by category.
|
|
1133
|
+
*
|
|
1134
|
+
* `output_tokens` remains the inclusive, authoritative total used for billing.
|
|
1135
|
+
* This object provides a read-only decomposition for observability — for example,
|
|
1136
|
+
* how many of the billed output tokens were spent on internal reasoning that may
|
|
1137
|
+
* have been summarized before being returned to you.
|
|
1138
|
+
*/
|
|
1139
|
+
output_tokens_details: OutputTokensDetails | null;
|
|
1140
|
+
|
|
1129
1141
|
/**
|
|
1130
1142
|
* The number of server tool requests.
|
|
1131
1143
|
*/
|
|
@@ -1135,7 +1147,7 @@ export interface MessageDeltaUsage {
|
|
|
1135
1147
|
export interface MessageParam {
|
|
1136
1148
|
content: string | Array<ContentBlockParam>;
|
|
1137
1149
|
|
|
1138
|
-
role: 'user' | 'assistant';
|
|
1150
|
+
role: 'user' | 'assistant' | 'system';
|
|
1139
1151
|
}
|
|
1140
1152
|
|
|
1141
1153
|
export interface MessageTokensCount {
|
|
@@ -1158,11 +1170,34 @@ export interface Metadata {
|
|
|
1158
1170
|
}
|
|
1159
1171
|
|
|
1160
1172
|
/**
|
|
1161
|
-
*
|
|
1162
|
-
*
|
|
1173
|
+
* System instructions that appear mid-conversation.
|
|
1174
|
+
*
|
|
1175
|
+
* Use this block to provide or update system-level instructions at a specific
|
|
1176
|
+
* point in the conversation, rather than only via the top-level `system`
|
|
1177
|
+
* parameter.
|
|
1178
|
+
*/
|
|
1179
|
+
export interface MidConversationSystemBlockParam {
|
|
1180
|
+
/**
|
|
1181
|
+
* System instruction text blocks.
|
|
1182
|
+
*/
|
|
1183
|
+
content: Array<TextBlockParam>;
|
|
1184
|
+
|
|
1185
|
+
type: 'mid_conv_system';
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Create a cache control breakpoint at this content block.
|
|
1189
|
+
*/
|
|
1190
|
+
cache_control?: CacheControlEphemeral | null;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* The model that will complete your prompt.
|
|
1195
|
+
*
|
|
1196
|
+
* See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
1163
1197
|
* details and options.
|
|
1164
1198
|
*/
|
|
1165
1199
|
export type Model =
|
|
1200
|
+
| 'claude-opus-4-8'
|
|
1166
1201
|
| 'claude-opus-4-7'
|
|
1167
1202
|
| 'claude-mythos-preview'
|
|
1168
1203
|
| 'claude-opus-4-6'
|
|
@@ -1195,6 +1230,19 @@ export interface OutputConfig {
|
|
|
1195
1230
|
format?: JSONOutputFormat | null;
|
|
1196
1231
|
}
|
|
1197
1232
|
|
|
1233
|
+
export interface OutputTokensDetails {
|
|
1234
|
+
/**
|
|
1235
|
+
* Number of output tokens the model generated as internal reasoning, including the
|
|
1236
|
+
* thinking-block delimiter tokens.
|
|
1237
|
+
*
|
|
1238
|
+
* Reflects the raw reasoning the model produced, not the (possibly shorter)
|
|
1239
|
+
* summarized thinking text returned in the response body. Computed by
|
|
1240
|
+
* re-tokenizing the raw reasoning text, so it may differ from the model's exact
|
|
1241
|
+
* generation count by a small number of tokens. Always ≤ `output_tokens`;
|
|
1242
|
+
* `output_tokens - thinking_tokens` approximates the non-reasoning output.
|
|
1243
|
+
*/
|
|
1244
|
+
thinking_tokens: number;
|
|
1245
|
+
}
|
|
1198
1246
|
const DEPRECATED_MODELS: {
|
|
1199
1247
|
[K in Model]?: string;
|
|
1200
1248
|
} = {
|
|
@@ -2235,6 +2283,16 @@ export interface Usage {
|
|
|
2235
2283
|
*/
|
|
2236
2284
|
output_tokens: number;
|
|
2237
2285
|
|
|
2286
|
+
/**
|
|
2287
|
+
* Breakdown of output tokens by category.
|
|
2288
|
+
*
|
|
2289
|
+
* `output_tokens` remains the inclusive, authoritative total used for billing.
|
|
2290
|
+
* This object provides a read-only decomposition for observability — for example,
|
|
2291
|
+
* how many of the billed output tokens were spent on internal reasoning that may
|
|
2292
|
+
* have been summarized before being returned to you.
|
|
2293
|
+
*/
|
|
2294
|
+
output_tokens_details: OutputTokensDetails | null;
|
|
2295
|
+
|
|
2238
2296
|
/**
|
|
2239
2297
|
* The number of server tool requests.
|
|
2240
2298
|
*/
|
|
@@ -2529,6 +2587,7 @@ export type WebFetchToolResultErrorCode =
|
|
|
2529
2587
|
| 'invalid_tool_input'
|
|
2530
2588
|
| 'url_too_long'
|
|
2531
2589
|
| 'url_not_allowed'
|
|
2590
|
+
| 'url_not_in_prior_context'
|
|
2532
2591
|
| 'url_not_accessible'
|
|
2533
2592
|
| 'unsupported_content_type'
|
|
2534
2593
|
| 'too_many_requests'
|
|
@@ -2840,8 +2899,9 @@ export interface MessageCreateParamsBase {
|
|
|
2840
2899
|
messages: Array<MessageParam>;
|
|
2841
2900
|
|
|
2842
2901
|
/**
|
|
2843
|
-
* The model that will complete your prompt
|
|
2844
|
-
*
|
|
2902
|
+
* The model that will complete your prompt.
|
|
2903
|
+
*
|
|
2904
|
+
* See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
2845
2905
|
* details and options.
|
|
2846
2906
|
*/
|
|
2847
2907
|
model: Model;
|
|
@@ -3126,8 +3186,9 @@ export interface MessageCountTokensParams {
|
|
|
3126
3186
|
messages: Array<MessageParam>;
|
|
3127
3187
|
|
|
3128
3188
|
/**
|
|
3129
|
-
* The model that will complete your prompt
|
|
3130
|
-
*
|
|
3189
|
+
* The model that will complete your prompt.
|
|
3190
|
+
*
|
|
3191
|
+
* See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
3131
3192
|
* details and options.
|
|
3132
3193
|
*/
|
|
3133
3194
|
model: Model;
|
|
@@ -3320,8 +3381,10 @@ export declare namespace Messages {
|
|
|
3320
3381
|
type MessageParam as MessageParam,
|
|
3321
3382
|
type MessageTokensCount as MessageTokensCount,
|
|
3322
3383
|
type Metadata as Metadata,
|
|
3384
|
+
type MidConversationSystemBlockParam as MidConversationSystemBlockParam,
|
|
3323
3385
|
type Model as Model,
|
|
3324
3386
|
type OutputConfig as OutputConfig,
|
|
3387
|
+
type OutputTokensDetails as OutputTokensDetails,
|
|
3325
3388
|
type PlainTextSource as PlainTextSource,
|
|
3326
3389
|
type RawContentBlockDelta as RawContentBlockDelta,
|
|
3327
3390
|
type RawContentBlockDeltaEvent as RawContentBlockDeltaEvent,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.100.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.100.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,YAAY,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.100.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,YAAY,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,SAAS,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.100.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,2BAA2B"}
|