@anthropic-ai/sdk 0.125.0 → 0.126.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 +50 -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 +846 -840
- package/client.js.map +1 -1
- package/client.mjs +846 -834
- package/client.mjs.map +1 -1
- package/core/api-promise.js +71 -68
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +71 -64
- package/core/api-promise.mjs.map +1 -1
- package/core/error.js +5 -2
- package/core/error.js.map +1 -1
- package/core/error.mjs +5 -2
- package/core/error.mjs.map +1 -1
- package/core/pagination.js +56 -50
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +56 -41
- package/core/pagination.mjs.map +1 -1
- package/core/streaming.js +212 -209
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +212 -209
- package/core/streaming.mjs.map +1 -1
- package/helpers/beta/mcp.js +14 -19
- package/helpers/beta/mcp.js.map +1 -1
- package/helpers/beta/mcp.mjs +14 -13
- package/helpers/beta/mcp.mjs.map +1 -1
- package/internal/constants.js +1 -1
- package/internal/constants.js.map +1 -1
- package/internal/decoders/jsonl.js +27 -24
- package/internal/decoders/jsonl.js.map +1 -1
- package/internal/decoders/jsonl.mjs +27 -24
- package/internal/decoders/jsonl.mjs.map +1 -1
- package/internal/decoders/line.js +52 -49
- package/internal/decoders/line.js.map +1 -1
- package/internal/decoders/line.mjs +52 -43
- package/internal/decoders/line.mjs.map +1 -1
- package/internal/file-store.js +256 -258
- package/internal/file-store.js.map +1 -1
- package/internal/file-store.mjs +256 -243
- package/internal/file-store.mjs.map +1 -1
- package/internal/node.browser.d.mts.map +1 -1
- package/internal/node.browser.d.ts.map +1 -1
- package/internal/node.browser.js.map +1 -1
- package/internal/node.browser.mjs +7 -7
- package/internal/node.browser.mjs.map +1 -1
- package/internal/shim-types.js +0 -6
- package/internal/shim-types.js.map +1 -1
- package/internal/shim-types.mjs +0 -6
- package/internal/shim-types.mjs.map +1 -1
- package/internal/shims.js +0 -6
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +0 -6
- package/internal/shims.mjs.map +1 -1
- package/internal/stainless-helper-header.js +6 -6
- package/internal/stainless-helper-header.js.map +1 -1
- package/internal/utils/async-queue.js +66 -63
- package/internal/utils/async-queue.js.map +1 -1
- package/internal/utils/async-queue.mjs +66 -56
- package/internal/utils/async-queue.mjs.map +1 -1
- package/internal/utils/bytes.d.mts +1 -1
- package/internal/utils/bytes.d.mts.map +1 -1
- package/internal/utils/bytes.d.ts +1 -1
- package/internal/utils/bytes.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +593 -590
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +593 -590
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/MessageStream.js +544 -541
- package/lib/MessageStream.js.map +1 -1
- package/lib/MessageStream.mjs +544 -541
- package/lib/MessageStream.mjs.map +1 -1
- package/lib/environments/poller.js +180 -174
- package/lib/environments/poller.js.map +1 -1
- package/lib/environments/poller.mjs +180 -153
- package/lib/environments/poller.mjs.map +1 -1
- package/lib/environments/worker.js +375 -369
- package/lib/environments/worker.js.map +1 -1
- package/lib/environments/worker.mjs +374 -329
- package/lib/environments/worker.mjs.map +1 -1
- package/lib/tools/BetaToolRunner.js +316 -313
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +315 -306
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/lib/tools/SessionToolRunner.js +241 -235
- package/lib/tools/SessionToolRunner.js.map +1 -1
- package/lib/tools/SessionToolRunner.mjs +241 -192
- package/lib/tools/SessionToolRunner.mjs.map +1 -1
- package/lib/tools/ToolError.js +39 -36
- package/lib/tools/ToolError.js.map +1 -1
- package/lib/tools/ToolError.mjs +39 -13
- package/lib/tools/ToolError.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/beta/agents/agents.js +135 -132
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs +135 -132
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/beta.d.mts +5 -5
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +5 -5
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +39 -36
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +39 -36
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/dreams.d.mts +2 -28
- package/resources/beta/dreams.d.mts.map +1 -1
- package/resources/beta/dreams.d.ts +2 -28
- package/resources/beta/dreams.d.ts.map +1 -1
- package/resources/beta/environments/environments.js +157 -154
- package/resources/beta/environments/environments.js.map +1 -1
- package/resources/beta/environments/environments.mjs +157 -154
- package/resources/beta/environments/environments.mjs.map +1 -1
- package/resources/beta/environments/work.js +255 -252
- package/resources/beta/environments/work.js.map +1 -1
- package/resources/beta/environments/work.mjs +255 -252
- package/resources/beta/environments/work.mjs.map +1 -1
- package/resources/beta/index.d.mts +2 -2
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -2
- 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/memory-stores/memory-stores.js +150 -147
- package/resources/beta/memory-stores/memory-stores.js.map +1 -1
- package/resources/beta/memory-stores/memory-stores.mjs +150 -147
- package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
- package/resources/beta/messages/batches.d.mts +12 -1
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +12 -1
- 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 +238 -100
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +238 -100
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +113 -110
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +113 -110
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/models.d.mts +22 -1
- package/resources/beta/models.d.mts.map +1 -1
- package/resources/beta/models.d.ts +22 -1
- package/resources/beta/models.d.ts.map +1 -1
- package/resources/beta/organization/federation/federation.js +11 -8
- package/resources/beta/organization/federation/federation.js.map +1 -1
- package/resources/beta/organization/federation/federation.mjs +11 -8
- package/resources/beta/organization/federation/federation.mjs.map +1 -1
- package/resources/beta/organization/federation/rules/rules.js +187 -184
- package/resources/beta/organization/federation/rules/rules.js.map +1 -1
- package/resources/beta/organization/federation/rules/rules.mjs +187 -184
- package/resources/beta/organization/federation/rules/rules.mjs.map +1 -1
- package/resources/beta/organization/organization.js +38 -35
- package/resources/beta/organization/organization.js.map +1 -1
- package/resources/beta/organization/organization.mjs +38 -35
- package/resources/beta/organization/organization.mjs.map +1 -1
- package/resources/beta/organization/service-accounts/service-accounts.js +163 -160
- package/resources/beta/organization/service-accounts/service-accounts.js.map +1 -1
- package/resources/beta/organization/service-accounts/service-accounts.mjs +163 -160
- package/resources/beta/organization/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.mts +3 -3
- package/resources/beta/organization/workspaces/workspaces.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.ts +3 -3
- package/resources/beta/organization/workspaces/workspaces.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.js +97 -94
- package/resources/beta/organization/workspaces/workspaces.js.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.mjs +97 -94
- package/resources/beta/organization/workspaces/workspaces.mjs.map +1 -1
- package/resources/beta/sessions/events.d.mts +12 -21
- package/resources/beta/sessions/events.d.mts.map +1 -1
- package/resources/beta/sessions/events.d.ts +12 -21
- package/resources/beta/sessions/events.d.ts.map +1 -1
- package/resources/beta/sessions/events.js +118 -115
- package/resources/beta/sessions/events.js.map +1 -1
- package/resources/beta/sessions/events.mjs +118 -115
- package/resources/beta/sessions/events.mjs.map +1 -1
- package/resources/beta/sessions/resources.d.mts +0 -3
- package/resources/beta/sessions/resources.d.mts.map +1 -1
- package/resources/beta/sessions/resources.d.ts +0 -3
- package/resources/beta/sessions/resources.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +2 -2
- package/resources/beta/sessions/sessions.d.ts +2 -2
- package/resources/beta/sessions/sessions.js +161 -158
- package/resources/beta/sessions/sessions.js.map +1 -1
- package/resources/beta/sessions/sessions.mjs +161 -158
- package/resources/beta/sessions/sessions.mjs.map +1 -1
- package/resources/beta/sessions/threads/threads.js +86 -83
- package/resources/beta/sessions/threads/threads.js.map +1 -1
- package/resources/beta/sessions/threads/threads.mjs +86 -83
- package/resources/beta/sessions/threads/threads.mjs.map +1 -1
- package/resources/beta/skills/skills.js +104 -101
- package/resources/beta/skills/skills.js.map +1 -1
- package/resources/beta/skills/skills.mjs +104 -101
- package/resources/beta/skills/skills.mjs.map +1 -1
- package/resources/beta/tunnels/tunnels.js +188 -185
- package/resources/beta/tunnels/tunnels.js.map +1 -1
- package/resources/beta/tunnels/tunnels.mjs +188 -185
- package/resources/beta/tunnels/tunnels.mjs.map +1 -1
- package/resources/beta/user-profiles.d.mts +45 -0
- package/resources/beta/user-profiles.d.mts.map +1 -1
- package/resources/beta/user-profiles.d.ts +45 -0
- package/resources/beta/user-profiles.d.ts.map +1 -1
- package/resources/beta/user-profiles.js +25 -10
- package/resources/beta/user-profiles.js.map +1 -1
- package/resources/beta/user-profiles.mjs +25 -10
- package/resources/beta/user-profiles.mjs.map +1 -1
- package/resources/beta/vaults/credentials.d.mts +0 -14
- package/resources/beta/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/vaults/credentials.d.ts +0 -14
- package/resources/beta/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/vaults/vaults.js +156 -153
- package/resources/beta/vaults/vaults.js.map +1 -1
- package/resources/beta/vaults/vaults.mjs +156 -153
- package/resources/beta/vaults/vaults.mjs.map +1 -1
- package/resources/completions.d.mts +1 -1
- package/resources/completions.d.ts +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 +100 -63
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +100 -63
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +115 -112
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +115 -112
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/skills/skills.js +88 -85
- package/resources/skills/skills.js.map +1 -1
- package/resources/skills/skills.mjs +88 -85
- package/resources/skills/skills.mjs.map +1 -1
- package/resources/top-level.js +0 -1
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +0 -1
- package/resources/top-level.mjs.map +1 -1
- package/src/client.ts +13 -1
- package/src/internal/node.browser.ts +7 -7
- package/src/internal/utils/bytes.ts +1 -1
- package/src/resources/beta/beta.ts +24 -1
- package/src/resources/beta/dreams.ts +2 -28
- package/src/resources/beta/index.ts +11 -0
- package/src/resources/beta/messages/batches.ts +13 -1
- package/src/resources/beta/messages/index.ts +10 -0
- package/src/resources/beta/messages/messages.ts +288 -99
- package/src/resources/beta/models.ts +25 -0
- package/src/resources/beta/organization/workspaces/workspaces.ts +3 -3
- package/src/resources/beta/sessions/events.ts +12 -21
- package/src/resources/beta/sessions/resources.ts +0 -3
- package/src/resources/beta/sessions/sessions.ts +2 -2
- package/src/resources/beta/user-profiles.ts +75 -10
- package/src/resources/beta/vaults/credentials.ts +0 -14
- package/src/resources/completions.ts +1 -1
- package/src/resources/index.ts +6 -0
- package/src/resources/messages/index.ts +6 -0
- package/src/resources/messages/messages.ts +128 -62
- package/src/tsconfig.json +13 -3
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.js +0 -6
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +0 -6
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/memories.js +4 -4
- package/tools/agent-toolset/memories.js.map +1 -1
- package/tools/agent-toolset/memories.mjs +2 -2
- package/tools/agent-toolset/memories.mjs.map +1 -1
- package/tools/agent-toolset/node.browser.js +12 -12
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.js +142 -139
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +132 -125
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/tools/agent-toolset/skills.js +5 -5
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/sync-interval.js +3 -3
- package/tools/agent-toolset/sync-interval.js.map +1 -1
- package/tools/memory/node.browser.js +2 -2
- package/tools/memory/node.browser.js.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -83,6 +83,23 @@ export interface BetaCapabilitySupport {
|
|
|
83
83
|
supported: boolean;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Compaction capability details: whether the model accepts the top-level
|
|
88
|
+
* `compaction` request parameter, with one entry per supported `compaction.type`
|
|
89
|
+
* value.
|
|
90
|
+
*/
|
|
91
|
+
export interface BetaCompactionCapability {
|
|
92
|
+
/**
|
|
93
|
+
* Whether the summarize compaction type is supported.
|
|
94
|
+
*/
|
|
95
|
+
summarize: BetaCapabilitySupport;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Whether this capability is supported by the model.
|
|
99
|
+
*/
|
|
100
|
+
supported: boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
86
103
|
/**
|
|
87
104
|
* Context management capability details.
|
|
88
105
|
*/
|
|
@@ -162,6 +179,13 @@ export interface BetaModelCapabilities {
|
|
|
162
179
|
*/
|
|
163
180
|
code_execution: BetaCapabilitySupport;
|
|
164
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Compaction capability details: whether the model accepts the top-level
|
|
184
|
+
* `compaction` request parameter, with one entry per supported `compaction.type`
|
|
185
|
+
* value.
|
|
186
|
+
*/
|
|
187
|
+
compaction: BetaCompactionCapability | null;
|
|
188
|
+
|
|
165
189
|
/**
|
|
166
190
|
* Context management support and available strategies.
|
|
167
191
|
*/
|
|
@@ -307,6 +331,7 @@ export interface ModelListParams extends PageParams {
|
|
|
307
331
|
export declare namespace Models {
|
|
308
332
|
export {
|
|
309
333
|
type BetaCapabilitySupport as BetaCapabilitySupport,
|
|
334
|
+
type BetaCompactionCapability as BetaCompactionCapability,
|
|
310
335
|
type BetaContextManagementCapability as BetaContextManagementCapability,
|
|
311
336
|
type BetaEffortCapability as BetaEffortCapability,
|
|
312
337
|
type BetaModelCapabilities as BetaModelCapabilities,
|
|
@@ -146,17 +146,17 @@ export interface BetaDataResidency {
|
|
|
146
146
|
/**
|
|
147
147
|
* Permitted inference geo values. 'unrestricted' means all geos are allowed.
|
|
148
148
|
*/
|
|
149
|
-
allowed_inference_geos: Array<
|
|
149
|
+
allowed_inference_geos: Array<BetaAllowedInferenceGeo> | 'unrestricted';
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* Default inference geo applied when requests omit the parameter.
|
|
153
153
|
*/
|
|
154
|
-
default_inference_geo:
|
|
154
|
+
default_inference_geo: 'global' | 'us';
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* Geographic region for workspace data storage. Immutable after creation.
|
|
158
158
|
*/
|
|
159
|
-
workspace_geo:
|
|
159
|
+
workspace_geo: 'us';
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
export interface BetaDataResidencyCreateConfig {
|
|
@@ -226,7 +226,9 @@ export interface BetaManagedAgentsAgentCustomToolUseEvent {
|
|
|
226
226
|
/**
|
|
227
227
|
* When set, this event was cross-posted from a subagent's thread to surface its
|
|
228
228
|
* custom tool use on the primary thread's stream. Empty on the thread's own
|
|
229
|
-
* events.
|
|
229
|
+
* events. Informational only: the server routes the matching
|
|
230
|
+
* `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it
|
|
231
|
+
* back.
|
|
230
232
|
*/
|
|
231
233
|
session_thread_id?: string | null;
|
|
232
234
|
}
|
|
@@ -314,8 +316,8 @@ export interface BetaManagedAgentsAgentMCPToolUseEvent {
|
|
|
314
316
|
/**
|
|
315
317
|
* When set, this event was cross-posted from a subagent's thread to surface its
|
|
316
318
|
* permission request on the primary thread's stream. Empty on the thread's own
|
|
317
|
-
* events.
|
|
318
|
-
* back.
|
|
319
|
+
* events. Informational only: the server routes the matching
|
|
320
|
+
* `user.tool_confirmation` by `tool_use_id`, so clients do not send it back.
|
|
319
321
|
*/
|
|
320
322
|
session_thread_id?: string | null;
|
|
321
323
|
}
|
|
@@ -574,8 +576,9 @@ export interface BetaManagedAgentsAgentToolUseEvent {
|
|
|
574
576
|
/**
|
|
575
577
|
* When set, this event was cross-posted from a subagent's thread to surface its
|
|
576
578
|
* permission request on the primary thread's stream. Empty on the thread's own
|
|
577
|
-
* events.
|
|
578
|
-
*
|
|
579
|
+
* events. Informational only: the server routes the matching
|
|
580
|
+
* `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do
|
|
581
|
+
* not send it back.
|
|
579
582
|
*/
|
|
580
583
|
session_thread_id?: string | null;
|
|
581
584
|
}
|
|
@@ -1041,11 +1044,6 @@ export interface BetaManagedAgentsSessionErrorEvent {
|
|
|
1041
1044
|
*/
|
|
1042
1045
|
id: string;
|
|
1043
1046
|
|
|
1044
|
-
/**
|
|
1045
|
-
* An unknown or unexpected error occurred during session execution. A fallback
|
|
1046
|
-
* variant; clients that don't recognize a new error code can match on
|
|
1047
|
-
* `retry_status` and `message` alone.
|
|
1048
|
-
*/
|
|
1049
1047
|
error:
|
|
1050
1048
|
| BetaManagedAgentsUnknownError
|
|
1051
1049
|
| BetaManagedAgentsModelOverloadedError
|
|
@@ -1141,9 +1139,6 @@ export interface BetaManagedAgentsSessionStatusIdleEvent {
|
|
|
1141
1139
|
*/
|
|
1142
1140
|
processed_at: string;
|
|
1143
1141
|
|
|
1144
|
-
/**
|
|
1145
|
-
* The agent completed its turn naturally and is ready for the next user message.
|
|
1146
|
-
*/
|
|
1147
1142
|
stop_reason:
|
|
1148
1143
|
| BetaManagedAgentsSessionEndTurn
|
|
1149
1144
|
| BetaManagedAgentsSessionRequiresAction
|
|
@@ -1258,9 +1253,6 @@ export interface BetaManagedAgentsSessionThreadStatusIdleEvent {
|
|
|
1258
1253
|
*/
|
|
1259
1254
|
session_thread_id: string;
|
|
1260
1255
|
|
|
1261
|
-
/**
|
|
1262
|
-
* The agent completed its turn naturally and is ready for the next user message.
|
|
1263
|
-
*/
|
|
1264
1256
|
stop_reason:
|
|
1265
1257
|
| BetaManagedAgentsSessionEndTurn
|
|
1266
1258
|
| BetaManagedAgentsSessionRequiresAction
|
|
@@ -1777,8 +1769,8 @@ export interface BetaManagedAgentsUserCustomToolResultEvent {
|
|
|
1777
1769
|
processed_at?: string | null;
|
|
1778
1770
|
|
|
1779
1771
|
/**
|
|
1780
|
-
*
|
|
1781
|
-
*
|
|
1772
|
+
* Set by the server to the subagent thread this result was routed to. Omitted when
|
|
1773
|
+
* it was routed to the primary thread.
|
|
1782
1774
|
*/
|
|
1783
1775
|
session_thread_id?: string | null;
|
|
1784
1776
|
}
|
|
@@ -1993,9 +1985,8 @@ export interface BetaManagedAgentsUserToolConfirmationEvent {
|
|
|
1993
1985
|
processed_at?: string | null;
|
|
1994
1986
|
|
|
1995
1987
|
/**
|
|
1996
|
-
*
|
|
1997
|
-
*
|
|
1998
|
-
* `agent.mcp_tool_use` event that prompted the approval.
|
|
1988
|
+
* Set by the server to the subagent thread this confirmation was routed to.
|
|
1989
|
+
* Omitted when it was routed to the primary thread.
|
|
1999
1990
|
*/
|
|
2000
1991
|
session_thread_id?: string | null;
|
|
2001
1992
|
}
|
|
@@ -268,9 +268,6 @@ export interface BetaManagedAgentsMemoryStoreResource {
|
|
|
268
268
|
name?: string | null;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
/**
|
|
272
|
-
* A memory store attached to an agent session.
|
|
273
|
-
*/
|
|
274
271
|
export type BetaManagedAgentsSessionResource =
|
|
275
272
|
| BetaManagedAgentsGitHubRepositoryResource
|
|
276
273
|
| BetaManagedAgentsFileResource
|
|
@@ -1077,8 +1077,8 @@ export interface BetaManagedAgentsUserToolResultEvent {
|
|
|
1077
1077
|
processed_at?: string | null;
|
|
1078
1078
|
|
|
1079
1079
|
/**
|
|
1080
|
-
*
|
|
1081
|
-
*
|
|
1080
|
+
* Set by the server to the subagent thread this result was routed to. Omitted when
|
|
1081
|
+
* it was routed to the primary thread.
|
|
1082
1082
|
*/
|
|
1083
1083
|
session_thread_id?: string | null;
|
|
1084
1084
|
}
|
|
@@ -17,12 +17,15 @@ export class UserProfiles extends APIResource {
|
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
create(params: UserProfileCreateParams, options?: RequestOptions): APIPromise<BetaUserProfile> {
|
|
20
|
-
const { betas, ...body } = params;
|
|
20
|
+
const { betas, workspace_id, ...body } = params;
|
|
21
21
|
return this._client.post('/v1/user_profiles?beta=true', {
|
|
22
22
|
body,
|
|
23
23
|
...options,
|
|
24
24
|
headers: buildHeaders([
|
|
25
|
-
{
|
|
25
|
+
{
|
|
26
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
27
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
28
|
+
},
|
|
26
29
|
options?.headers,
|
|
27
30
|
]),
|
|
28
31
|
});
|
|
@@ -44,11 +47,14 @@ export class UserProfiles extends APIResource {
|
|
|
44
47
|
params: UserProfileRetrieveParams | null | undefined = {},
|
|
45
48
|
options?: RequestOptions,
|
|
46
49
|
): APIPromise<BetaUserProfile> {
|
|
47
|
-
const { betas } = params ?? {};
|
|
50
|
+
const { betas, workspace_id } = params ?? {};
|
|
48
51
|
return this._client.get(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
49
52
|
...options,
|
|
50
53
|
headers: buildHeaders([
|
|
51
|
-
{
|
|
54
|
+
{
|
|
55
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
56
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
57
|
+
},
|
|
52
58
|
options?.headers,
|
|
53
59
|
]),
|
|
54
60
|
});
|
|
@@ -70,12 +76,15 @@ export class UserProfiles extends APIResource {
|
|
|
70
76
|
params: UserProfileUpdateParams,
|
|
71
77
|
options?: RequestOptions,
|
|
72
78
|
): APIPromise<BetaUserProfile> {
|
|
73
|
-
const { betas, ...body } = params;
|
|
79
|
+
const { betas, workspace_id, ...body } = params;
|
|
74
80
|
return this._client.post(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
75
81
|
body,
|
|
76
82
|
...options,
|
|
77
83
|
headers: buildHeaders([
|
|
78
|
-
{
|
|
84
|
+
{
|
|
85
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
86
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
87
|
+
},
|
|
79
88
|
options?.headers,
|
|
80
89
|
]),
|
|
81
90
|
});
|
|
@@ -96,12 +105,15 @@ export class UserProfiles extends APIResource {
|
|
|
96
105
|
params: UserProfileListParams | null | undefined = {},
|
|
97
106
|
options?: RequestOptions,
|
|
98
107
|
): PagePromise<BetaUserProfilesPageCursor, BetaUserProfile> {
|
|
99
|
-
const { betas, ...query } = params ?? {};
|
|
108
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
100
109
|
return this._client.getAPIList('/v1/user_profiles?beta=true', PageCursor<BetaUserProfile>, {
|
|
101
110
|
query,
|
|
102
111
|
...options,
|
|
103
112
|
headers: buildHeaders([
|
|
104
|
-
{
|
|
113
|
+
{
|
|
114
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
115
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
116
|
+
},
|
|
105
117
|
options?.headers,
|
|
106
118
|
]),
|
|
107
119
|
});
|
|
@@ -123,11 +135,14 @@ export class UserProfiles extends APIResource {
|
|
|
123
135
|
params: UserProfileCreateEnrollmentURLParams | null | undefined = {},
|
|
124
136
|
options?: RequestOptions,
|
|
125
137
|
): APIPromise<BetaUserProfileEnrollmentURL> {
|
|
126
|
-
const { betas } = params ?? {};
|
|
138
|
+
const { betas, workspace_id } = params ?? {};
|
|
127
139
|
return this._client.post(path`/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
128
140
|
...options,
|
|
129
141
|
headers: buildHeaders([
|
|
130
|
-
{
|
|
142
|
+
{
|
|
143
|
+
'anthropic-beta': [...(betas ?? []), 'user-profiles-2026-08-18'].toString(),
|
|
144
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
145
|
+
},
|
|
131
146
|
options?.headers,
|
|
132
147
|
]),
|
|
133
148
|
});
|
|
@@ -378,6 +393,16 @@ export interface UserProfileCreateParams {
|
|
|
378
393
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
379
394
|
*/
|
|
380
395
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
399
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
400
|
+
*
|
|
401
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
402
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
403
|
+
* match that Workspace.
|
|
404
|
+
*/
|
|
405
|
+
workspace_id?: string;
|
|
381
406
|
}
|
|
382
407
|
|
|
383
408
|
export interface UserProfileRetrieveParams {
|
|
@@ -385,6 +410,16 @@ export interface UserProfileRetrieveParams {
|
|
|
385
410
|
* Optional header to specify the beta version(s) you want to use.
|
|
386
411
|
*/
|
|
387
412
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
416
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
417
|
+
*
|
|
418
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
419
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
420
|
+
* match that Workspace.
|
|
421
|
+
*/
|
|
422
|
+
workspace_id?: string;
|
|
388
423
|
}
|
|
389
424
|
|
|
390
425
|
export interface UserProfileUpdateParams {
|
|
@@ -436,6 +471,16 @@ export interface UserProfileUpdateParams {
|
|
|
436
471
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
437
472
|
*/
|
|
438
473
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
477
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
478
|
+
*
|
|
479
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
480
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
481
|
+
* match that Workspace.
|
|
482
|
+
*/
|
|
483
|
+
workspace_id?: string;
|
|
439
484
|
}
|
|
440
485
|
|
|
441
486
|
export interface UserProfileListParams extends PageCursorParams {
|
|
@@ -453,6 +498,16 @@ export interface UserProfileListParams extends PageCursorParams {
|
|
|
453
498
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
454
499
|
*/
|
|
455
500
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
504
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
505
|
+
*
|
|
506
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
507
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
508
|
+
* match that Workspace.
|
|
509
|
+
*/
|
|
510
|
+
workspace_id?: string;
|
|
456
511
|
}
|
|
457
512
|
|
|
458
513
|
export interface UserProfileCreateEnrollmentURLParams {
|
|
@@ -460,6 +515,16 @@ export interface UserProfileCreateEnrollmentURLParams {
|
|
|
460
515
|
* Optional header to specify the beta version(s) you want to use.
|
|
461
516
|
*/
|
|
462
517
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
521
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
522
|
+
*
|
|
523
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
524
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
525
|
+
* match that Workspace.
|
|
526
|
+
*/
|
|
527
|
+
workspace_id?: string;
|
|
463
528
|
}
|
|
464
529
|
|
|
465
530
|
export declare namespace UserProfiles {
|
|
@@ -289,11 +289,6 @@ export interface BetaManagedAgentsCredential {
|
|
|
289
289
|
display_name?: string | null;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
/**
|
|
293
|
-
* Substitute the secret on any host the session's Environment network policy
|
|
294
|
-
* permits egress to. The Environment's network policy is the only boundary on
|
|
295
|
-
* where the secret can reach.
|
|
296
|
-
*/
|
|
297
292
|
export type BetaManagedAgentsCredentialNetworkingParams =
|
|
298
293
|
| BetaManagedAgentsUnrestrictedCredentialNetworkingParams
|
|
299
294
|
| BetaManagedAgentsLimitedCredentialNetworkingParams;
|
|
@@ -573,9 +568,6 @@ export interface BetaManagedAgentsMCPOAuthRefreshParams {
|
|
|
573
568
|
*/
|
|
574
569
|
token_endpoint: string;
|
|
575
570
|
|
|
576
|
-
/**
|
|
577
|
-
* Token endpoint requires no client authentication.
|
|
578
|
-
*/
|
|
579
571
|
token_endpoint_auth:
|
|
580
572
|
| BetaManagedAgentsTokenEndpointAuthNoneParam
|
|
581
573
|
| BetaManagedAgentsTokenEndpointAuthBasicParam
|
|
@@ -606,9 +598,6 @@ export interface BetaManagedAgentsMCPOAuthRefreshResponse {
|
|
|
606
598
|
*/
|
|
607
599
|
token_endpoint: string;
|
|
608
600
|
|
|
609
|
-
/**
|
|
610
|
-
* Token endpoint requires no client authentication.
|
|
611
|
-
*/
|
|
612
601
|
token_endpoint_auth:
|
|
613
602
|
| BetaManagedAgentsTokenEndpointAuthNoneResponse
|
|
614
603
|
| BetaManagedAgentsTokenEndpointAuthBasicResponse
|
|
@@ -639,9 +628,6 @@ export interface BetaManagedAgentsMCPOAuthRefreshUpdateParams {
|
|
|
639
628
|
*/
|
|
640
629
|
scope?: string | null;
|
|
641
630
|
|
|
642
|
-
/**
|
|
643
|
-
* Updated HTTP Basic authentication parameters for the token endpoint.
|
|
644
|
-
*/
|
|
645
631
|
token_endpoint_auth?:
|
|
646
632
|
| BetaManagedAgentsTokenEndpointAuthBasicUpdateParam
|
|
647
633
|
| BetaManagedAgentsTokenEndpointAuthPostUpdateParam;
|
|
@@ -156,7 +156,7 @@ export interface CompletionCreateParamsBase {
|
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
158
|
* @deprecated Deprecated. Models released after Claude Opus 4.6 do not support
|
|
159
|
-
* setting temperature. A value of 1.0
|
|
159
|
+
* setting temperature. A value of 1.0 will be accepted for backwards
|
|
160
160
|
* compatibility, all other values will be rejected with a 400 error.
|
|
161
161
|
*/
|
|
162
162
|
temperature?: number;
|
package/src/resources/index.ts
CHANGED
|
@@ -255,6 +255,12 @@ export {
|
|
|
255
255
|
type WebFetchToolResultErrorBlock,
|
|
256
256
|
type WebFetchToolResultErrorBlockParam,
|
|
257
257
|
type WebFetchToolResultErrorCode,
|
|
258
|
+
type WebFetchURLSourceAll,
|
|
259
|
+
type WebFetchURLSourceExcept,
|
|
260
|
+
type WebFetchURLSourceNone,
|
|
261
|
+
type WebFetchURLSourceOnly,
|
|
262
|
+
type WebFetchURLSourceToolReference,
|
|
263
|
+
type WebFetchURLSources,
|
|
258
264
|
type WebSearchResultBlock,
|
|
259
265
|
type WebSearchResultBlockParam,
|
|
260
266
|
type WebSearchTool20250305,
|
|
@@ -237,6 +237,12 @@ export {
|
|
|
237
237
|
type WebFetchToolResultErrorBlock,
|
|
238
238
|
type WebFetchToolResultErrorBlockParam,
|
|
239
239
|
type WebFetchToolResultErrorCode,
|
|
240
|
+
type WebFetchURLSourceAll,
|
|
241
|
+
type WebFetchURLSourceExcept,
|
|
242
|
+
type WebFetchURLSourceNone,
|
|
243
|
+
type WebFetchURLSourceOnly,
|
|
244
|
+
type WebFetchURLSourceToolReference,
|
|
245
|
+
type WebFetchURLSources,
|
|
240
246
|
type WebSearchResultBlock,
|
|
241
247
|
type WebSearchResultBlockParam,
|
|
242
248
|
type WebSearchTool20250305,
|