@anthropic-ai/sdk 0.106.0 → 0.107.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +16 -1
  3. package/client.d.mts +2 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/beta/beta.d.mts +2 -2
  11. package/resources/beta/beta.d.mts.map +1 -1
  12. package/resources/beta/beta.d.ts +2 -2
  13. package/resources/beta/beta.d.ts.map +1 -1
  14. package/resources/beta/beta.js.map +1 -1
  15. package/resources/beta/beta.mjs.map +1 -1
  16. package/resources/beta/deployments.d.mts +18 -6
  17. package/resources/beta/deployments.d.mts.map +1 -1
  18. package/resources/beta/deployments.d.ts +18 -6
  19. package/resources/beta/deployments.d.ts.map +1 -1
  20. package/resources/beta/deployments.js +18 -6
  21. package/resources/beta/deployments.js.map +1 -1
  22. package/resources/beta/deployments.mjs +18 -6
  23. package/resources/beta/deployments.mjs.map +1 -1
  24. package/resources/beta/index.d.mts +1 -1
  25. package/resources/beta/index.d.mts.map +1 -1
  26. package/resources/beta/index.d.ts +1 -1
  27. package/resources/beta/index.d.ts.map +1 -1
  28. package/resources/beta/index.js.map +1 -1
  29. package/resources/beta/index.mjs.map +1 -1
  30. package/resources/beta/messages/batches.d.mts +29 -21
  31. package/resources/beta/messages/batches.d.mts.map +1 -1
  32. package/resources/beta/messages/batches.d.ts +29 -21
  33. package/resources/beta/messages/batches.d.ts.map +1 -1
  34. package/resources/beta/messages/batches.js +6 -6
  35. package/resources/beta/messages/batches.mjs +6 -6
  36. package/resources/beta/messages/index.d.mts +1 -1
  37. package/resources/beta/messages/index.d.mts.map +1 -1
  38. package/resources/beta/messages/index.d.ts +1 -1
  39. package/resources/beta/messages/index.d.ts.map +1 -1
  40. package/resources/beta/messages/index.js.map +1 -1
  41. package/resources/beta/messages/index.mjs.map +1 -1
  42. package/resources/beta/messages/messages.d.mts +160 -32
  43. package/resources/beta/messages/messages.d.mts.map +1 -1
  44. package/resources/beta/messages/messages.d.ts +160 -32
  45. package/resources/beta/messages/messages.d.ts.map +1 -1
  46. package/resources/beta/messages/messages.js +6 -3
  47. package/resources/beta/messages/messages.js.map +1 -1
  48. package/resources/beta/messages/messages.mjs +6 -3
  49. package/resources/beta/messages/messages.mjs.map +1 -1
  50. package/resources/completions.d.mts +12 -7
  51. package/resources/completions.d.mts.map +1 -1
  52. package/resources/completions.d.ts +12 -7
  53. package/resources/completions.d.ts.map +1 -1
  54. package/resources/index.d.mts +1 -1
  55. package/resources/index.d.mts.map +1 -1
  56. package/resources/index.d.ts +1 -1
  57. package/resources/index.d.ts.map +1 -1
  58. package/resources/index.js.map +1 -1
  59. package/resources/index.mjs.map +1 -1
  60. package/resources/messages/batches.d.mts +8 -7
  61. package/resources/messages/batches.d.mts.map +1 -1
  62. package/resources/messages/batches.d.ts +8 -7
  63. package/resources/messages/batches.d.ts.map +1 -1
  64. package/resources/messages/batches.js +6 -6
  65. package/resources/messages/batches.mjs +6 -6
  66. package/resources/messages/index.d.mts +1 -1
  67. package/resources/messages/index.d.mts.map +1 -1
  68. package/resources/messages/index.d.ts +1 -1
  69. package/resources/messages/index.d.ts.map +1 -1
  70. package/resources/messages/index.js.map +1 -1
  71. package/resources/messages/index.mjs.map +1 -1
  72. package/resources/messages/messages.d.mts +172 -43
  73. package/resources/messages/messages.d.mts.map +1 -1
  74. package/resources/messages/messages.d.ts +172 -43
  75. package/resources/messages/messages.d.ts.map +1 -1
  76. package/resources/messages/messages.js +11 -3
  77. package/resources/messages/messages.js.map +1 -1
  78. package/resources/messages/messages.mjs +11 -3
  79. package/resources/messages/messages.mjs.map +1 -1
  80. package/src/client.ts +4 -0
  81. package/src/resources/beta/beta.ts +4 -0
  82. package/src/resources/beta/deployments.ts +18 -6
  83. package/src/resources/beta/index.ts +2 -0
  84. package/src/resources/beta/messages/batches.ts +29 -21
  85. package/src/resources/beta/messages/index.ts +2 -0
  86. package/src/resources/beta/messages/messages.ts +197 -31
  87. package/src/resources/completions.ts +12 -7
  88. package/src/resources/index.ts +2 -0
  89. package/src/resources/messages/batches.ts +8 -7
  90. package/src/resources/messages/index.ts +2 -0
  91. package/src/resources/messages/messages.ts +213 -41
  92. package/src/tools/agent-toolset/fs-util.ts +7 -1
  93. package/src/tools/agent-toolset/node.ts +19 -3
  94. package/src/version.ts +1 -1
  95. package/tools/agent-toolset/fs-util.d.mts.map +1 -1
  96. package/tools/agent-toolset/fs-util.d.ts.map +1 -1
  97. package/tools/agent-toolset/fs-util.js +7 -1
  98. package/tools/agent-toolset/fs-util.js.map +1 -1
  99. package/tools/agent-toolset/fs-util.mjs +7 -1
  100. package/tools/agent-toolset/fs-util.mjs.map +1 -1
  101. package/tools/agent-toolset/node.d.mts.map +1 -1
  102. package/tools/agent-toolset/node.d.ts.map +1 -1
  103. package/tools/agent-toolset/node.js +21 -4
  104. package/tools/agent-toolset/node.js.map +1 -1
  105. package/tools/agent-toolset/node.mjs +21 -4
  106. package/tools/agent-toolset/node.mjs.map +1 -1
  107. package/version.d.mts +1 -1
  108. package/version.d.ts +1 -1
  109. package/version.js +1 -1
  110. package/version.mjs +1 -1
@@ -44,7 +44,7 @@ export class Messages extends APIResource {
44
44
  * conversations.
45
45
  *
46
46
  * Learn more about the Messages API in our
47
- * [user guide](https://docs.claude.com/en/docs/initial-setup)
47
+ * [user guide](https://platform.claude.com/docs/en/get-started)
48
48
  *
49
49
  * @example
50
50
  * ```ts
@@ -174,7 +174,7 @@ export class Messages extends APIResource {
174
174
  * including tools, images, and documents, without creating it.
175
175
  *
176
176
  * Learn more about token counting in our
177
- * [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)
177
+ * [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting)
178
178
  *
179
179
  * @example
180
180
  * ```ts
@@ -185,8 +185,16 @@ export class Messages extends APIResource {
185
185
  * });
186
186
  * ```
187
187
  */
188
- countTokens(body: MessageCountTokensParams, options?: RequestOptions): APIPromise<MessageTokensCount> {
189
- return this._client.post('/v1/messages/count_tokens', { body, ...options });
188
+ countTokens(params: MessageCountTokensParams, options?: RequestOptions): APIPromise<MessageTokensCount> {
189
+ const { user_profile_id, ...body } = params;
190
+ return this._client.post('/v1/messages/count_tokens', {
191
+ body,
192
+ ...options,
193
+ headers: buildHeaders([
194
+ { ...(user_profile_id != null ? { 'anthropic-user-profile-id': user_profile_id } : undefined) },
195
+ options?.headers,
196
+ ]),
197
+ });
190
198
  }
191
199
  }
192
200
 
@@ -294,7 +302,7 @@ export interface CacheControlEphemeral {
294
302
  * - `1h`: 1 hour
295
303
  *
296
304
  * Defaults to `5m`. See
297
- * [prompt caching pricing](https://docs.claude.com/en/docs/build-with-claude/prompt-caching)
305
+ * [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
298
306
  * for details.
299
307
  */
300
308
  ttl?: '5m' | '1h';
@@ -1153,6 +1161,8 @@ export type MessageCountTokensTool =
1153
1161
  | WebSearchTool20260209
1154
1162
  | WebFetchTool20260209
1155
1163
  | WebFetchTool20260309
1164
+ | WebSearchTool20260318
1165
+ | WebFetchTool20260318
1156
1166
  | ToolSearchToolBm25_20251119
1157
1167
  | ToolSearchToolRegex20251119;
1158
1168
 
@@ -1772,7 +1782,7 @@ export interface ThinkingConfigEnabled {
1772
1782
  * Must be ≥1024 and less than `max_tokens`.
1773
1783
  *
1774
1784
  * See
1775
- * [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
1785
+ * [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
1776
1786
  * for details.
1777
1787
  */
1778
1788
  budget_tokens: number;
@@ -1796,7 +1806,7 @@ export interface ThinkingConfigEnabled {
1796
1806
  * tokens and counts towards your `max_tokens` limit.
1797
1807
  *
1798
1808
  * See
1799
- * [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
1809
+ * [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
1800
1810
  * for details.
1801
1811
  */
1802
1812
  export type ThinkingConfigParam = ThinkingConfigEnabled | ThinkingConfigDisabled | ThinkingConfigAdaptive;
@@ -2266,6 +2276,8 @@ export type ToolUnion =
2266
2276
  | WebSearchTool20260209
2267
2277
  | WebFetchTool20260209
2268
2278
  | WebFetchTool20260309
2279
+ | WebSearchTool20260318
2280
+ | WebFetchTool20260318
2269
2281
  | ToolSearchToolBm25_20251119
2270
2282
  | ToolSearchToolRegex20251119;
2271
2283
 
@@ -2610,6 +2622,81 @@ export interface WebFetchTool20260309 {
2610
2622
  use_cache?: boolean;
2611
2623
  }
2612
2624
 
2625
+ export interface WebFetchTool20260318 {
2626
+ /**
2627
+ * Name of the tool.
2628
+ *
2629
+ * This is how the tool will be called by the model and in `tool_use` blocks.
2630
+ */
2631
+ name: 'web_fetch';
2632
+
2633
+ type: 'web_fetch_20260318';
2634
+
2635
+ allowed_callers?: Array<
2636
+ 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'
2637
+ >;
2638
+
2639
+ /**
2640
+ * List of domains to allow fetching from
2641
+ */
2642
+ allowed_domains?: Array<string> | null;
2643
+
2644
+ /**
2645
+ * List of domains to block fetching from
2646
+ */
2647
+ blocked_domains?: Array<string> | null;
2648
+
2649
+ /**
2650
+ * Create a cache control breakpoint at this content block.
2651
+ */
2652
+ cache_control?: CacheControlEphemeral | null;
2653
+
2654
+ /**
2655
+ * Citations configuration for fetched documents. Citations are disabled by
2656
+ * default.
2657
+ */
2658
+ citations?: CitationsConfigParam | null;
2659
+
2660
+ /**
2661
+ * If true, tool will not be included in initial system prompt. Only loaded when
2662
+ * returned via tool_reference from tool search.
2663
+ */
2664
+ defer_loading?: boolean;
2665
+
2666
+ /**
2667
+ * Maximum number of tokens used by including web page text content in the context.
2668
+ * The limit is approximate and does not apply to binary content such as PDFs.
2669
+ */
2670
+ max_content_tokens?: number | null;
2671
+
2672
+ /**
2673
+ * Maximum number of times the tool can be used in the API request.
2674
+ */
2675
+ max_uses?: number | null;
2676
+
2677
+ /**
2678
+ * How this tool's result blocks appear in the API response when the result was
2679
+ * consumed by a completed code_execution call in the same turn. 'full' returns the
2680
+ * complete content (default). 'excluded' drops the nested server_tool_use and
2681
+ * result block pair entirely. Results from direct calls, or from code_execution
2682
+ * calls that paused before completing, are always returned in full so they can be
2683
+ * sent back on the next turn.
2684
+ */
2685
+ response_inclusion?: 'full' | 'excluded';
2686
+
2687
+ /**
2688
+ * When true, guarantees schema validation on tool names and inputs
2689
+ */
2690
+ strict?: boolean;
2691
+
2692
+ /**
2693
+ * Whether to use cached content. Set to false to bypass the cache and fetch fresh
2694
+ * content. Only set to false when the user explicitly requests fresh content or
2695
+ * when fetching rapidly-changing sources.
2696
+ */
2697
+ use_cache?: boolean;
2698
+ }
2699
+
2613
2700
  export interface WebFetchToolResultBlock {
2614
2701
  /**
2615
2702
  * Tool invocation directly from the model.
@@ -2814,6 +2901,70 @@ export namespace WebSearchTool20260209 {
2814
2901
  export type UserLocation = Messages.UserLocation;
2815
2902
  }
2816
2903
 
2904
+ export interface WebSearchTool20260318 {
2905
+ /**
2906
+ * Name of the tool.
2907
+ *
2908
+ * This is how the tool will be called by the model and in `tool_use` blocks.
2909
+ */
2910
+ name: 'web_search';
2911
+
2912
+ type: 'web_search_20260318';
2913
+
2914
+ allowed_callers?: Array<
2915
+ 'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'
2916
+ >;
2917
+
2918
+ /**
2919
+ * If provided, only these domains will be included in results. Cannot be used
2920
+ * alongside `blocked_domains`.
2921
+ */
2922
+ allowed_domains?: Array<string> | null;
2923
+
2924
+ /**
2925
+ * If provided, these domains will never appear in results. Cannot be used
2926
+ * alongside `allowed_domains`.
2927
+ */
2928
+ blocked_domains?: Array<string> | null;
2929
+
2930
+ /**
2931
+ * Create a cache control breakpoint at this content block.
2932
+ */
2933
+ cache_control?: CacheControlEphemeral | null;
2934
+
2935
+ /**
2936
+ * If true, tool will not be included in initial system prompt. Only loaded when
2937
+ * returned via tool_reference from tool search.
2938
+ */
2939
+ defer_loading?: boolean;
2940
+
2941
+ /**
2942
+ * Maximum number of times the tool can be used in the API request.
2943
+ */
2944
+ max_uses?: number | null;
2945
+
2946
+ /**
2947
+ * How this tool's result blocks appear in the API response when the result was
2948
+ * consumed by a completed code_execution call in the same turn. 'full' returns the
2949
+ * complete content (default). 'excluded' drops the nested server_tool_use and
2950
+ * result block pair entirely. Results from direct calls, or from code_execution
2951
+ * calls that paused before completing, are always returned in full so they can be
2952
+ * sent back on the next turn.
2953
+ */
2954
+ response_inclusion?: 'full' | 'excluded';
2955
+
2956
+ /**
2957
+ * When true, guarantees schema validation on tool names and inputs
2958
+ */
2959
+ strict?: boolean;
2960
+
2961
+ /**
2962
+ * Parameters for the user's location. Used to provide more relevant search
2963
+ * results.
2964
+ */
2965
+ user_location?: UserLocation | null;
2966
+ }
2967
+
2817
2968
  export interface WebSearchToolRequestError {
2818
2969
  error_code: WebSearchToolResultErrorCode;
2819
2970
 
@@ -2895,11 +3046,12 @@ export interface MessageCreateParamsBase {
2895
3046
  * only specifies the absolute maximum number of tokens to generate.
2896
3047
  *
2897
3048
  * Set to `0` to populate the
2898
- * [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache)
3049
+ * [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache)
2899
3050
  * without generating a response.
2900
3051
  *
2901
3052
  * Different models have different maximum values for this parameter. See
2902
- * [models](https://docs.claude.com/en/docs/models-overview) for details.
3053
+ * [models](https://platform.claude.com/docs/en/about-claude/models/overview) for
3054
+ * details.
2903
3055
  */
2904
3056
  max_tokens: number;
2905
3057
 
@@ -2961,12 +3113,13 @@ export interface MessageCreateParamsBase {
2961
3113
  * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
2962
3114
  * ```
2963
3115
  *
2964
- * See [input examples](https://docs.claude.com/en/api/messages-examples).
3116
+ * See
3117
+ * [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
2965
3118
  *
2966
3119
  * Note that if you want to include a
2967
- * [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
2968
- * top-level `system` parameter — there is no `"system"` role for input messages in
2969
- * the Messages API.
3120
+ * [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
3121
+ * you can use the top-level `system` parameter — there is no `"system"` role for
3122
+ * input messages in the Messages API.
2970
3123
  *
2971
3124
  * There is a limit of 100,000 messages in a single request.
2972
3125
  */
@@ -3013,7 +3166,8 @@ export interface MessageCreateParamsBase {
3013
3166
  * standard capacity for this request.
3014
3167
  *
3015
3168
  * Anthropic offers different levels of service for your API requests. See
3016
- * [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
3169
+ * [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for
3170
+ * details.
3017
3171
  */
3018
3172
  service_tier?: 'auto' | 'standard_only';
3019
3173
 
@@ -3034,7 +3188,8 @@ export interface MessageCreateParamsBase {
3034
3188
  * Body param: Whether to incrementally stream the response using server-sent
3035
3189
  * events.
3036
3190
  *
3037
- * See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
3191
+ * See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
3192
+ * for details.
3038
3193
  */
3039
3194
  stream?: boolean;
3040
3195
 
@@ -3043,7 +3198,7 @@ export interface MessageCreateParamsBase {
3043
3198
  *
3044
3199
  * A system prompt is a way of providing context and instructions to Claude, such
3045
3200
  * as specifying a particular goal or role. See our
3046
- * [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
3201
+ * [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
3047
3202
  */
3048
3203
  system?: string | Array<TextBlockParam>;
3049
3204
 
@@ -3062,7 +3217,7 @@ export interface MessageCreateParamsBase {
3062
3217
  * tokens and counts towards your `max_tokens` limit.
3063
3218
  *
3064
3219
  * See
3065
- * [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
3220
+ * [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
3066
3221
  * for details.
3067
3222
  */
3068
3223
  thinking?: ThinkingConfigParam;
@@ -3083,9 +3238,9 @@ export interface MessageCreateParamsBase {
3083
3238
  *
3084
3239
  * There are two types of tools: **client tools** and **server tools**. The
3085
3240
  * behavior described below applies to client tools. For
3086
- * [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
3241
+ * [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
3087
3242
  * see their individual documentation as each has its own behavior (e.g., the
3088
- * [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
3243
+ * [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
3089
3244
  *
3090
3245
  * Each tool definition includes:
3091
3246
  *
@@ -3148,7 +3303,9 @@ export interface MessageCreateParamsBase {
3148
3303
  * functions, or more generally whenever you want the model to produce a particular
3149
3304
  * JSON structure of output.
3150
3305
  *
3151
- * See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
3306
+ * See our
3307
+ * [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
3308
+ * for more details.
3152
3309
  */
3153
3310
  tools?: Array<ToolUnion>;
3154
3311
 
@@ -3183,7 +3340,8 @@ export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase
3183
3340
  * Body param: Whether to incrementally stream the response using server-sent
3184
3341
  * events.
3185
3342
  *
3186
- * See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
3343
+ * See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
3344
+ * for details.
3187
3345
  */
3188
3346
  stream?: false;
3189
3347
  }
@@ -3193,7 +3351,8 @@ export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
3193
3351
  * Body param: Whether to incrementally stream the response using server-sent
3194
3352
  * events.
3195
3353
  *
3196
- * See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
3354
+ * See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming)
3355
+ * for details.
3197
3356
  */
3198
3357
  stream: true;
3199
3358
  }
@@ -3202,7 +3361,7 @@ export type MessageStreamParams = ParseableMessageCreateParams;
3202
3361
 
3203
3362
  export interface MessageCountTokensParams {
3204
3363
  /**
3205
- * Input messages.
3364
+ * Body param: Input messages.
3206
3365
  *
3207
3366
  * Our models are trained to operate on alternating `user` and `assistant`
3208
3367
  * conversational turns. When creating a new `Message`, you specify the prior
@@ -3259,19 +3418,20 @@ export interface MessageCountTokensParams {
3259
3418
  * { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
3260
3419
  * ```
3261
3420
  *
3262
- * See [input examples](https://docs.claude.com/en/api/messages-examples).
3421
+ * See
3422
+ * [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
3263
3423
  *
3264
3424
  * Note that if you want to include a
3265
- * [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
3266
- * top-level `system` parameter — there is no `"system"` role for input messages in
3267
- * the Messages API.
3425
+ * [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role),
3426
+ * you can use the top-level `system` parameter — there is no `"system"` role for
3427
+ * input messages in the Messages API.
3268
3428
  *
3269
3429
  * There is a limit of 100,000 messages in a single request.
3270
3430
  */
3271
3431
  messages: Array<MessageParam>;
3272
3432
 
3273
3433
  /**
3274
- * The model that will complete your prompt.
3434
+ * Body param: The model that will complete your prompt.
3275
3435
  *
3276
3436
  * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional
3277
3437
  * details and options.
@@ -3279,46 +3439,47 @@ export interface MessageCountTokensParams {
3279
3439
  model: Model;
3280
3440
 
3281
3441
  /**
3282
- * Top-level cache control automatically applies a cache_control marker to the last
3283
- * cacheable block in the request.
3442
+ * Body param: Top-level cache control automatically applies a cache_control marker
3443
+ * to the last cacheable block in the request.
3284
3444
  */
3285
3445
  cache_control?: CacheControlEphemeral | null;
3286
3446
 
3287
3447
  /**
3288
- * Configuration options for the model's output, such as the output format.
3448
+ * Body param: Configuration options for the model's output, such as the output
3449
+ * format.
3289
3450
  */
3290
3451
  output_config?: OutputConfig;
3291
3452
 
3292
3453
  /**
3293
- * System prompt.
3454
+ * Body param: System prompt.
3294
3455
  *
3295
3456
  * A system prompt is a way of providing context and instructions to Claude, such
3296
3457
  * as specifying a particular goal or role. See our
3297
- * [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
3458
+ * [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
3298
3459
  */
3299
3460
  system?: string | Array<TextBlockParam>;
3300
3461
 
3301
3462
  /**
3302
- * Configuration for enabling Claude's extended thinking.
3463
+ * Body param: Configuration for enabling Claude's extended thinking.
3303
3464
  *
3304
3465
  * When enabled, responses include `thinking` content blocks showing Claude's
3305
3466
  * thinking process before the final answer. Requires a minimum budget of 1,024
3306
3467
  * tokens and counts towards your `max_tokens` limit.
3307
3468
  *
3308
3469
  * See
3309
- * [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
3470
+ * [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking)
3310
3471
  * for details.
3311
3472
  */
3312
3473
  thinking?: ThinkingConfigParam;
3313
3474
 
3314
3475
  /**
3315
- * How the model should use the provided tools. The model can use a specific tool,
3316
- * any available tool, decide by itself, or not use tools at all.
3476
+ * Body param: How the model should use the provided tools. The model can use a
3477
+ * specific tool, any available tool, decide by itself, or not use tools at all.
3317
3478
  */
3318
3479
  tool_choice?: ToolChoice;
3319
3480
 
3320
3481
  /**
3321
- * Definitions of tools that the model may use.
3482
+ * Body param: Definitions of tools that the model may use.
3322
3483
  *
3323
3484
  * If you include `tools` in your API request, the model may return `tool_use`
3324
3485
  * content blocks that represent the model's use of those tools. You can then run
@@ -3327,9 +3488,9 @@ export interface MessageCountTokensParams {
3327
3488
  *
3328
3489
  * There are two types of tools: **client tools** and **server tools**. The
3329
3490
  * behavior described below applies to client tools. For
3330
- * [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
3491
+ * [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools),
3331
3492
  * see their individual documentation as each has its own behavior (e.g., the
3332
- * [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
3493
+ * [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
3333
3494
  *
3334
3495
  * Each tool definition includes:
3335
3496
  *
@@ -3392,9 +3553,18 @@ export interface MessageCountTokensParams {
3392
3553
  * functions, or more generally whenever you want the model to produce a particular
3393
3554
  * JSON structure of output.
3394
3555
  *
3395
- * See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
3556
+ * See our
3557
+ * [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
3558
+ * for more details.
3396
3559
  */
3397
3560
  tools?: Array<MessageCountTokensTool>;
3561
+
3562
+ /**
3563
+ * Header param: The user profile ID to attribute this request to. Use when acting
3564
+ * on behalf of a party other than your organization. Requires the `user-profiles`
3565
+ * beta header.
3566
+ */
3567
+ user_profile_id?: string;
3398
3568
  }
3399
3569
 
3400
3570
  Messages.Batches = Batches;
@@ -3548,6 +3718,7 @@ export declare namespace Messages {
3548
3718
  type WebFetchTool20250910 as WebFetchTool20250910,
3549
3719
  type WebFetchTool20260209 as WebFetchTool20260209,
3550
3720
  type WebFetchTool20260309 as WebFetchTool20260309,
3721
+ type WebFetchTool20260318 as WebFetchTool20260318,
3551
3722
  type WebFetchToolResultBlock as WebFetchToolResultBlock,
3552
3723
  type WebFetchToolResultBlockParam as WebFetchToolResultBlockParam,
3553
3724
  type WebFetchToolResultErrorBlock as WebFetchToolResultErrorBlock,
@@ -3557,6 +3728,7 @@ export declare namespace Messages {
3557
3728
  type WebSearchResultBlockParam as WebSearchResultBlockParam,
3558
3729
  type WebSearchTool20250305 as WebSearchTool20250305,
3559
3730
  type WebSearchTool20260209 as WebSearchTool20260209,
3731
+ type WebSearchTool20260318 as WebSearchTool20260318,
3560
3732
  type WebSearchToolRequestError as WebSearchToolRequestError,
3561
3733
  type WebSearchToolResultBlock as WebSearchToolResultBlock,
3562
3734
  type WebSearchToolResultBlockContent as WebSearchToolResultBlockContent,
@@ -34,6 +34,7 @@ async function realpathOrSelf(p: string): Promise<string> {
34
34
  export async function canonicalize(abs: string): Promise<string> {
35
35
  const tail: string[] = [];
36
36
  let prefix = abs;
37
+ let hops = 0;
37
38
  for (;;) {
38
39
  let real: string;
39
40
  try {
@@ -47,7 +48,12 @@ export async function canonicalize(abs: string): Promise<string> {
47
48
  }
48
49
  if (isLink) {
49
50
  // Resolve the symlink ourselves and retry; `tail` (the part below it)
50
- // still applies to the link's target.
51
+ // still applies to the link's target. The hop cap matches Linux
52
+ // MAXSYMLINKS — the same threshold at which `realpath` itself would
53
+ // have returned ELOOP — so a cycle of unresolvable links terminates.
54
+ if (++hops > 40) {
55
+ throw new ToolError(`path ${JSON.stringify(abs)} has too many levels of symbolic links`);
56
+ }
51
57
  prefix = path.resolve(path.dirname(prefix), await fs.readlink(prefix));
52
58
  continue;
53
59
  }
@@ -589,6 +589,9 @@ export function betaGlobTool(ctx: AgentToolContext): BetaRunnableTool {
589
589
  if (!ctx.unrestrictedPaths && pat.split(/[\\/]/).includes('..')) {
590
590
  throw new ToolError('glob: ".." is not permitted in the pattern');
591
591
  }
592
+ // Compare canonical against canonical: a workdir that is itself a
593
+ // symlink would otherwise falsely reject every realpath'd match below.
594
+ const realRoot = ctx.unrestrictedPaths ? root : await fs.realpath(root).catch(() => root);
592
595
  const matches: { path: string; mtime: number }[] = [];
593
596
  try {
594
597
  // Native `fs.glob` (Node 22+). `exclude` prunes the noisy dirs the
@@ -600,9 +603,22 @@ export function betaGlobTool(ctx: AgentToolContext): BetaRunnableTool {
600
603
  })) {
601
604
  if (!entry.isFile()) continue;
602
605
  const full = path.join(entry.parentPath, entry.name);
603
- // Defense in depth: drop any match that resolved outside the search
604
- // root (e.g. via a symlinked directory in the tree) when confined.
605
- if (!ctx.unrestrictedPaths && !isWithin(root, full)) continue;
606
+ // Drop any match that resolves outside the search root. A pattern
607
+ // that *names* a symlinked directory (the model controls the
608
+ // pattern, and the bash tool in the same session can plant the
609
+ // link) makes `fs.glob` descend through it and report entries with
610
+ // the raw parent path, so a lexical check on `full` alone would
611
+ // pass `root/link_out/secret` even though it lives outside the
612
+ // jail. Resolve-failure (ELOOP, EACCES, a racing unlink) is a deny.
613
+ if (!ctx.unrestrictedPaths) {
614
+ let real: string;
615
+ try {
616
+ real = await fs.realpath(full);
617
+ } catch {
618
+ continue;
619
+ }
620
+ if (!isWithin(realRoot, real)) continue;
621
+ }
606
622
  let mtime = 0;
607
623
  try {
608
624
  mtime = (await fs.stat(full)).mtimeMs;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.106.0'; // x-release-please-version
1
+ export const VERSION = '0.107.0'; // x-release-please-version
@@ -1 +1 @@
1
- {"version":3,"file":"fs-util.d.mts","sourceRoot":"","sources":["../../src/tools/agent-toolset/fs-util.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,uFAAuF;AACvF,eAAO,MAAM,eAAe,MAAQ,CAAC;AACrC,4CAA4C;AAC5C,eAAO,MAAM,gBAAgB,MAAQ,CAAC;AAWtC;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA4B/D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,MAAM,EACT,IAAI,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GAChC,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBxF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAwBjE"}
1
+ {"version":3,"file":"fs-util.d.mts","sourceRoot":"","sources":["../../src/tools/agent-toolset/fs-util.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,uFAAuF;AACvF,eAAO,MAAM,eAAe,MAAQ,CAAC;AACrC,4CAA4C;AAC5C,eAAO,MAAM,gBAAgB,MAAQ,CAAC;AAWtC;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkC/D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,MAAM,EACT,IAAI,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GAChC,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBxF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAwBjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"fs-util.d.ts","sourceRoot":"","sources":["../../src/tools/agent-toolset/fs-util.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,uFAAuF;AACvF,eAAO,MAAM,eAAe,MAAQ,CAAC;AACrC,4CAA4C;AAC5C,eAAO,MAAM,g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AE,IAAI,EAAE,MAAM,GAAG,MAAM,CAwBjE"}
@@ -39,6 +39,7 @@ async function realpathOrSelf(p) {
39
39
  async function canonicalize(abs) {
40
40
  const tail = [];
41
41
  let prefix = abs;
42
+ let hops = 0;
42
43
  for (;;) {
43
44
  let real;
44
45
  try {
@@ -54,7 +55,12 @@ async function canonicalize(abs) {
54
55
  }
55
56
  if (isLink) {
56
57
  // Resolve the symlink ourselves and retry; `tail` (the part below it)
57
- // still applies to the link's target.
58
+ // still applies to the link's target. The hop cap matches Linux
59
+ // MAXSYMLINKS — the same threshold at which `realpath` itself would
60
+ // have returned ELOOP — so a cycle of unresolvable links terminates.
61
+ if (++hops > 40) {
62
+ throw new ToolError_1.ToolError(`path ${JSON.stringify(abs)} has too many levels of symbolic links`);
63
+ }
58
64
  prefix = path.resolve(path.dirname(prefix), await fs.readlink(prefix));
59
65
  continue;
60
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fs-util.js","sourceRoot":"","sources":["../../src/tools/agent-toolset/fs-util.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA4BH,oCA4BC;AAgBD,sCAqBC;AAOD,0CAgBC;AAQD,wCAwBC;;AAlJD,6DAAuC;AACvC,wDAAkC;AAClC,6CAAyC;AACzC,4DAAsD;AAEtD,uFAAuF;AAC1E,QAAA,eAAe,GAAG,KAAK,CAAC;AACrC,4CAA4C;AAC/B,QAAA,gBAAgB,GAAG,KAAK,CAAC;AAEtC,0EAA0E;AAC1E,KAAK,UAAU,cAAc,CAAC,CAAS;IACrC,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAAC,GAAW;IAC5C,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,MAAM,GAAG,GAAG,CAAC;IAC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f(p) {
31
31
  export async function canonicalize(abs) {
32
32
  const tail = [];
33
33
  let prefix = abs;
34
+ let hops = 0;
34
35
  for (;;) {
35
36
  let real;
36
37
  try {
@@ -46,7 +47,12 @@ export async function canonicalize(abs) {
46
47
  }
47
48
  if (isLink) {
48
49
  // Resolve the symlink ourselves and retry; `tail` (the part below it)
49
- // still applies to the link's target.
50
+ // still applies to the link's target. The hop cap matches Linux
51
+ // MAXSYMLINKS — the same threshold at which `realpath` itself would
52
+ // have returned ELOOP — so a cycle of unresolvable links terminates.
53
+ if (++hops > 40) {
54
+ throw new ToolError(`path ${JSON.stringify(abs)} has too many levels of symbolic links`);
55
+ }
50
56
  prefix = path.resolve(path.dirname(prefix), await fs.readlink(prefix));
51
57
  continue;
52
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fs-util.mjs","sourceRoot":"","sources":["../../src/tools/agent-toolset/fs-util.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,sCAAkC;AAEtD,uFAAuF;AACvF,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AACrC,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAEtC,0EAA0E;AAC1E,KAAK,UAAU,cAAc,CAAC,CAAS;IACrC,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAW;IAC5C,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,MAAM,GAAG,GAAG,C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