@anthropic-ai/sdk 0.123.0 → 0.124.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 +6 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -5
- package/client.d.ts.map +1 -1
- package/client.js +2 -1
- package/client.js.map +1 -1
- package/client.mjs +2 -1
- package/client.mjs.map +1 -1
- package/core/streaming.js +4 -2
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +4 -2
- package/core/streaming.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +45 -0
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +45 -0
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js +25 -10
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs +25 -10
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/agents/versions.d.mts +9 -0
- package/resources/beta/agents/versions.d.mts.map +1 -1
- package/resources/beta/agents/versions.d.ts +9 -0
- package/resources/beta/agents/versions.d.ts.map +1 -1
- package/resources/beta/agents/versions.js +5 -2
- package/resources/beta/agents/versions.js.map +1 -1
- package/resources/beta/agents/versions.mjs +5 -2
- package/resources/beta/agents/versions.mjs.map +1 -1
- package/resources/beta/deployment-runs.d.mts +18 -0
- package/resources/beta/deployment-runs.d.mts.map +1 -1
- package/resources/beta/deployment-runs.d.ts +18 -0
- package/resources/beta/deployment-runs.d.ts.map +1 -1
- package/resources/beta/deployment-runs.js +10 -4
- package/resources/beta/deployment-runs.js.map +1 -1
- package/resources/beta/deployment-runs.mjs +10 -4
- package/resources/beta/deployment-runs.mjs.map +1 -1
- package/resources/beta/deployments.d.mts +72 -0
- package/resources/beta/deployments.d.mts.map +1 -1
- package/resources/beta/deployments.d.ts +72 -0
- package/resources/beta/deployments.d.ts.map +1 -1
- package/resources/beta/deployments.js +40 -16
- package/resources/beta/deployments.js.map +1 -1
- package/resources/beta/deployments.mjs +40 -16
- package/resources/beta/deployments.mjs.map +1 -1
- package/resources/beta/dreams.d.mts +45 -0
- package/resources/beta/dreams.d.mts.map +1 -1
- package/resources/beta/dreams.d.ts +45 -0
- package/resources/beta/dreams.d.ts.map +1 -1
- package/resources/beta/dreams.js +25 -10
- package/resources/beta/dreams.js.map +1 -1
- package/resources/beta/dreams.mjs +25 -10
- package/resources/beta/dreams.mjs.map +1 -1
- package/resources/beta/environments/environments.d.mts +54 -0
- package/resources/beta/environments/environments.d.mts.map +1 -1
- package/resources/beta/environments/environments.d.ts +54 -0
- package/resources/beta/environments/environments.d.ts.map +1 -1
- package/resources/beta/environments/environments.js +30 -12
- package/resources/beta/environments/environments.js.map +1 -1
- package/resources/beta/environments/environments.mjs +30 -12
- package/resources/beta/environments/environments.mjs.map +1 -1
- package/resources/beta/environments/work.d.mts +36 -0
- package/resources/beta/environments/work.d.mts.map +1 -1
- package/resources/beta/environments/work.d.ts +36 -0
- package/resources/beta/environments/work.d.ts.map +1 -1
- package/resources/beta/environments/work.js +20 -8
- package/resources/beta/environments/work.js.map +1 -1
- package/resources/beta/environments/work.mjs +20 -8
- package/resources/beta/environments/work.mjs.map +1 -1
- package/resources/beta/files.d.mts +48 -1
- package/resources/beta/files.d.mts.map +1 -1
- package/resources/beta/files.d.ts +48 -1
- package/resources/beta/files.d.ts.map +1 -1
- package/resources/beta/files.js +22 -9
- package/resources/beta/files.js.map +1 -1
- package/resources/beta/files.mjs +22 -9
- package/resources/beta/files.mjs.map +1 -1
- package/resources/beta/memory-stores/memories.d.mts +45 -0
- package/resources/beta/memory-stores/memories.d.mts.map +1 -1
- package/resources/beta/memory-stores/memories.d.ts +45 -0
- package/resources/beta/memory-stores/memories.d.ts.map +1 -1
- package/resources/beta/memory-stores/memories.js +25 -10
- package/resources/beta/memory-stores/memories.js.map +1 -1
- package/resources/beta/memory-stores/memories.mjs +25 -10
- package/resources/beta/memory-stores/memories.mjs.map +1 -1
- package/resources/beta/memory-stores/memory-stores.d.mts +54 -0
- package/resources/beta/memory-stores/memory-stores.d.mts.map +1 -1
- package/resources/beta/memory-stores/memory-stores.d.ts +54 -0
- package/resources/beta/memory-stores/memory-stores.d.ts.map +1 -1
- package/resources/beta/memory-stores/memory-stores.js +30 -12
- package/resources/beta/memory-stores/memory-stores.js.map +1 -1
- package/resources/beta/memory-stores/memory-stores.mjs +30 -12
- package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.mts +31 -4
- package/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.ts +31 -4
- package/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
- package/resources/beta/memory-stores/memory-versions.js +15 -6
- package/resources/beta/memory-stores/memory-versions.js.map +1 -1
- package/resources/beta/memory-stores/memory-versions.mjs +15 -6
- package/resources/beta/memory-stores/memory-versions.mjs.map +1 -1
- package/resources/beta/messages/batches.d.mts +54 -0
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +54 -0
- package/resources/beta/messages/batches.d.ts.map +1 -1
- package/resources/beta/messages/batches.js +25 -11
- package/resources/beta/messages/batches.js.map +1 -1
- package/resources/beta/messages/batches.mjs +25 -11
- package/resources/beta/messages/batches.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +18 -0
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +18 -0
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +4 -2
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +4 -2
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/models.d.mts +18 -0
- package/resources/beta/models.d.mts.map +1 -1
- package/resources/beta/models.d.ts +18 -0
- package/resources/beta/models.d.ts.map +1 -1
- package/resources/beta/models.js +10 -4
- package/resources/beta/models.js.map +1 -1
- package/resources/beta/models.mjs +10 -4
- package/resources/beta/models.mjs.map +1 -1
- package/resources/beta/organization/compliance-settings.d.mts +5 -3
- package/resources/beta/organization/compliance-settings.d.mts.map +1 -1
- package/resources/beta/organization/compliance-settings.d.ts +5 -3
- package/resources/beta/organization/compliance-settings.d.ts.map +1 -1
- package/resources/beta/organization/index.d.mts +1 -1
- package/resources/beta/organization/index.d.mts.map +1 -1
- package/resources/beta/organization/index.d.ts +1 -1
- package/resources/beta/organization/index.d.ts.map +1 -1
- package/resources/beta/organization/index.js.map +1 -1
- package/resources/beta/organization/index.mjs.map +1 -1
- package/resources/beta/organization/organization.d.mts +2 -2
- package/resources/beta/organization/organization.d.mts.map +1 -1
- package/resources/beta/organization/organization.d.ts +2 -2
- package/resources/beta/organization/organization.d.ts.map +1 -1
- package/resources/beta/organization/organization.js.map +1 -1
- package/resources/beta/organization/organization.mjs.map +1 -1
- package/resources/beta/sessions/events.d.mts +27 -0
- package/resources/beta/sessions/events.d.mts.map +1 -1
- package/resources/beta/sessions/events.d.ts +27 -0
- package/resources/beta/sessions/events.d.ts.map +1 -1
- package/resources/beta/sessions/events.js +15 -6
- package/resources/beta/sessions/events.js.map +1 -1
- package/resources/beta/sessions/events.mjs +15 -6
- package/resources/beta/sessions/events.mjs.map +1 -1
- package/resources/beta/sessions/resources.d.mts +45 -0
- package/resources/beta/sessions/resources.d.mts.map +1 -1
- package/resources/beta/sessions/resources.d.ts +45 -0
- package/resources/beta/sessions/resources.d.ts.map +1 -1
- package/resources/beta/sessions/resources.js +25 -10
- package/resources/beta/sessions/resources.js.map +1 -1
- package/resources/beta/sessions/resources.mjs +25 -10
- package/resources/beta/sessions/resources.mjs.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +54 -0
- package/resources/beta/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/sessions/sessions.d.ts +54 -0
- package/resources/beta/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.js +30 -12
- package/resources/beta/sessions/sessions.js.map +1 -1
- package/resources/beta/sessions/sessions.mjs +30 -12
- package/resources/beta/sessions/sessions.mjs.map +1 -1
- package/resources/beta/sessions/threads/events.d.mts +18 -0
- package/resources/beta/sessions/threads/events.d.mts.map +1 -1
- package/resources/beta/sessions/threads/events.d.ts +18 -0
- package/resources/beta/sessions/threads/events.d.ts.map +1 -1
- package/resources/beta/sessions/threads/events.js +10 -4
- package/resources/beta/sessions/threads/events.js.map +1 -1
- package/resources/beta/sessions/threads/events.mjs +10 -4
- package/resources/beta/sessions/threads/events.mjs.map +1 -1
- package/resources/beta/sessions/threads/threads.d.mts +27 -0
- package/resources/beta/sessions/threads/threads.d.mts.map +1 -1
- package/resources/beta/sessions/threads/threads.d.ts +27 -0
- package/resources/beta/sessions/threads/threads.d.ts.map +1 -1
- package/resources/beta/sessions/threads/threads.js +15 -6
- package/resources/beta/sessions/threads/threads.js.map +1 -1
- package/resources/beta/sessions/threads/threads.mjs +15 -6
- package/resources/beta/sessions/threads/threads.mjs.map +1 -1
- package/resources/beta/skills/skills.d.mts +36 -0
- package/resources/beta/skills/skills.d.mts.map +1 -1
- package/resources/beta/skills/skills.d.ts +36 -0
- package/resources/beta/skills/skills.d.ts.map +1 -1
- package/resources/beta/skills/skills.js +20 -8
- package/resources/beta/skills/skills.js.map +1 -1
- package/resources/beta/skills/skills.mjs +20 -8
- package/resources/beta/skills/skills.mjs.map +1 -1
- package/resources/beta/skills/versions.d.mts +45 -0
- package/resources/beta/skills/versions.d.mts.map +1 -1
- package/resources/beta/skills/versions.d.ts +45 -0
- package/resources/beta/skills/versions.d.ts.map +1 -1
- package/resources/beta/skills/versions.js +22 -9
- package/resources/beta/skills/versions.js.map +1 -1
- package/resources/beta/skills/versions.mjs +22 -9
- package/resources/beta/skills/versions.mjs.map +1 -1
- package/resources/beta/tunnels/certificates.d.mts +36 -0
- package/resources/beta/tunnels/certificates.d.mts.map +1 -1
- package/resources/beta/tunnels/certificates.d.ts +36 -0
- package/resources/beta/tunnels/certificates.d.ts.map +1 -1
- package/resources/beta/tunnels/certificates.js +20 -8
- package/resources/beta/tunnels/certificates.js.map +1 -1
- package/resources/beta/tunnels/certificates.mjs +20 -8
- package/resources/beta/tunnels/certificates.mjs.map +1 -1
- package/resources/beta/tunnels/tunnels.d.mts +54 -0
- package/resources/beta/tunnels/tunnels.d.mts.map +1 -1
- package/resources/beta/tunnels/tunnels.d.ts +54 -0
- package/resources/beta/tunnels/tunnels.d.ts.map +1 -1
- package/resources/beta/tunnels/tunnels.js +30 -12
- package/resources/beta/tunnels/tunnels.js.map +1 -1
- package/resources/beta/tunnels/tunnels.mjs +30 -12
- package/resources/beta/tunnels/tunnels.mjs.map +1 -1
- package/resources/beta/vaults/credentials.d.mts +63 -0
- package/resources/beta/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/vaults/credentials.d.ts +63 -0
- package/resources/beta/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/vaults/credentials.js +35 -14
- package/resources/beta/vaults/credentials.js.map +1 -1
- package/resources/beta/vaults/credentials.mjs +35 -14
- package/resources/beta/vaults/credentials.mjs.map +1 -1
- package/resources/beta/vaults/vaults.d.mts +54 -0
- package/resources/beta/vaults/vaults.d.mts.map +1 -1
- package/resources/beta/vaults/vaults.d.ts +54 -0
- package/resources/beta/vaults/vaults.d.ts.map +1 -1
- package/resources/beta/vaults/vaults.js +30 -12
- package/resources/beta/vaults/vaults.js.map +1 -1
- package/resources/beta/vaults/vaults.mjs +30 -12
- package/resources/beta/vaults/vaults.mjs.map +1 -1
- package/resources/completions.d.mts +9 -0
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +9 -0
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js +5 -2
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs +5 -2
- package/resources/completions.mjs.map +1 -1
- package/resources/files.d.mts +104 -15
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +104 -15
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +79 -10
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +79 -10
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- 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/batches.d.mts +68 -6
- package/resources/messages/batches.d.mts.map +1 -1
- package/resources/messages/batches.d.ts +68 -6
- package/resources/messages/batches.d.ts.map +1 -1
- package/resources/messages/batches.js +52 -13
- package/resources/messages/batches.js.map +1 -1
- package/resources/messages/batches.mjs +52 -13
- package/resources/messages/batches.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 +20 -2
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +20 -2
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +10 -4
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +10 -4
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/models.d.mts +31 -0
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +31 -0
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +23 -4
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +23 -4
- package/resources/models.mjs.map +1 -1
- package/resources/skills/index.d.mts +1 -1
- package/resources/skills/index.d.mts.map +1 -1
- package/resources/skills/index.d.ts +1 -1
- package/resources/skills/index.d.ts.map +1 -1
- package/resources/skills/index.js.map +1 -1
- package/resources/skills/index.mjs.map +1 -1
- package/resources/skills/skills.d.mts +75 -10
- package/resources/skills/skills.d.mts.map +1 -1
- package/resources/skills/skills.d.ts +75 -10
- package/resources/skills/skills.d.ts.map +1 -1
- package/resources/skills/skills.js +64 -8
- package/resources/skills/skills.js.map +1 -1
- package/resources/skills/skills.mjs +64 -8
- package/resources/skills/skills.mjs.map +1 -1
- package/resources/skills/versions.d.mts +75 -5
- package/resources/skills/versions.d.mts.map +1 -1
- package/resources/skills/versions.d.ts +75 -5
- package/resources/skills/versions.d.ts.map +1 -1
- package/resources/skills/versions.js +67 -7
- package/resources/skills/versions.js.map +1 -1
- package/resources/skills/versions.mjs +67 -7
- package/resources/skills/versions.mjs.map +1 -1
- package/src/client.ts +12 -1
- package/src/core/streaming.ts +4 -2
- package/src/resources/beta/agents/agents.ts +75 -10
- package/src/resources/beta/agents/versions.ts +15 -2
- package/src/resources/beta/deployment-runs.ts +30 -4
- package/src/resources/beta/deployments.ts +120 -16
- package/src/resources/beta/dreams.ts +75 -10
- package/src/resources/beta/environments/environments.ts +90 -12
- package/src/resources/beta/environments/work.ts +60 -8
- package/src/resources/beta/files.ts +75 -11
- package/src/resources/beta/memory-stores/memories.ts +75 -10
- package/src/resources/beta/memory-stores/memory-stores.ts +90 -12
- package/src/resources/beta/memory-stores/memory-versions.ts +49 -10
- package/src/resources/beta/messages/batches.ts +85 -11
- package/src/resources/beta/messages/messages.ts +24 -2
- package/src/resources/beta/models.ts +30 -4
- package/src/resources/beta/organization/compliance-settings.ts +12 -2
- package/src/resources/beta/organization/index.ts +2 -0
- package/src/resources/beta/organization/organization.ts +4 -0
- package/src/resources/beta/sessions/events.ts +45 -6
- package/src/resources/beta/sessions/resources.ts +75 -10
- package/src/resources/beta/sessions/sessions.ts +90 -12
- package/src/resources/beta/sessions/threads/events.ts +30 -4
- package/src/resources/beta/sessions/threads/threads.ts +45 -6
- package/src/resources/beta/skills/skills.ts +60 -8
- package/src/resources/beta/skills/versions.ts +72 -9
- package/src/resources/beta/tunnels/certificates.ts +60 -8
- package/src/resources/beta/tunnels/tunnels.ts +90 -12
- package/src/resources/beta/vaults/credentials.ts +105 -14
- package/src/resources/beta/vaults/vaults.ts +90 -12
- package/src/resources/completions.ts +15 -2
- package/src/resources/files.ts +161 -18
- package/src/resources/index.ts +5 -0
- package/src/resources/messages/batches.ts +137 -13
- package/src/resources/messages/index.ts +4 -0
- package/src/resources/messages/messages.ts +38 -4
- package/src/resources/models.ts +43 -4
- package/src/resources/skills/index.ts +2 -0
- package/src/resources/skills/skills.ts +127 -13
- package/src/resources/skills/versions.ts +115 -11
- package/src/tools/agent-toolset/fs-util.ts +16 -4
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.d.mts +11 -4
- package/tools/agent-toolset/fs-util.d.mts.map +1 -1
- package/tools/agent-toolset/fs-util.d.ts +11 -4
- package/tools/agent-toolset/fs-util.d.ts.map +1 -1
- package/tools/agent-toolset/fs-util.js +14 -4
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +14 -4
- package/tools/agent-toolset/fs-util.mjs.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
|
@@ -43,7 +43,7 @@ export class Batches extends APIResource {
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
create(params: BatchCreateParams, options?: RequestOptions): APIPromise<BetaMessageBatch> {
|
|
46
|
-
const { betas, user_profile_id, ...body } = params;
|
|
46
|
+
const { betas, user_profile_id, workspace_id, ...body } = params;
|
|
47
47
|
return this._client.post('/v1/messages/batches?beta=true', {
|
|
48
48
|
body,
|
|
49
49
|
...options,
|
|
@@ -51,6 +51,7 @@ export class Batches extends APIResource {
|
|
|
51
51
|
{
|
|
52
52
|
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
|
|
53
53
|
...(user_profile_id != null ? { 'anthropic-user-profile-id': user_profile_id } : undefined),
|
|
54
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
54
55
|
},
|
|
55
56
|
options?.headers,
|
|
56
57
|
]),
|
|
@@ -78,11 +79,14 @@ export class Batches extends APIResource {
|
|
|
78
79
|
params: BatchRetrieveParams | null | undefined = {},
|
|
79
80
|
options?: RequestOptions,
|
|
80
81
|
): APIPromise<BetaMessageBatch> {
|
|
81
|
-
const { betas } = params ?? {};
|
|
82
|
+
const { betas, workspace_id } = params ?? {};
|
|
82
83
|
return this._client.get(path`/v1/messages/batches/${messageBatchID}?beta=true`, {
|
|
83
84
|
...options,
|
|
84
85
|
headers: buildHeaders([
|
|
85
|
-
{
|
|
86
|
+
{
|
|
87
|
+
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
|
|
88
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
89
|
+
},
|
|
86
90
|
options?.headers,
|
|
87
91
|
]),
|
|
88
92
|
});
|
|
@@ -107,12 +111,15 @@ export class Batches extends APIResource {
|
|
|
107
111
|
params: BatchListParams | null | undefined = {},
|
|
108
112
|
options?: RequestOptions,
|
|
109
113
|
): PagePromise<BetaMessageBatchesPage, BetaMessageBatch> {
|
|
110
|
-
const { betas, ...query } = params ?? {};
|
|
114
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
111
115
|
return this._client.getAPIList('/v1/messages/batches?beta=true', Page<BetaMessageBatch>, {
|
|
112
116
|
query,
|
|
113
117
|
...options,
|
|
114
118
|
headers: buildHeaders([
|
|
115
|
-
{
|
|
119
|
+
{
|
|
120
|
+
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
|
|
121
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
122
|
+
},
|
|
116
123
|
options?.headers,
|
|
117
124
|
]),
|
|
118
125
|
});
|
|
@@ -140,11 +147,14 @@ export class Batches extends APIResource {
|
|
|
140
147
|
params: BatchDeleteParams | null | undefined = {},
|
|
141
148
|
options?: RequestOptions,
|
|
142
149
|
): APIPromise<BetaDeletedMessageBatch> {
|
|
143
|
-
const { betas } = params ?? {};
|
|
150
|
+
const { betas, workspace_id } = params ?? {};
|
|
144
151
|
return this._client.delete(path`/v1/messages/batches/${messageBatchID}?beta=true`, {
|
|
145
152
|
...options,
|
|
146
153
|
headers: buildHeaders([
|
|
147
|
-
{
|
|
154
|
+
{
|
|
155
|
+
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
|
|
156
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
157
|
+
},
|
|
148
158
|
options?.headers,
|
|
149
159
|
]),
|
|
150
160
|
});
|
|
@@ -177,11 +187,14 @@ export class Batches extends APIResource {
|
|
|
177
187
|
params: BatchCancelParams | null | undefined = {},
|
|
178
188
|
options?: RequestOptions,
|
|
179
189
|
): APIPromise<BetaMessageBatch> {
|
|
180
|
-
const { betas } = params ?? {};
|
|
190
|
+
const { betas, workspace_id } = params ?? {};
|
|
181
191
|
return this._client.post(path`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {
|
|
182
192
|
...options,
|
|
183
193
|
headers: buildHeaders([
|
|
184
|
-
{
|
|
194
|
+
{
|
|
195
|
+
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
|
|
196
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
197
|
+
},
|
|
185
198
|
options?.headers,
|
|
186
199
|
]),
|
|
187
200
|
});
|
|
@@ -210,14 +223,14 @@ export class Batches extends APIResource {
|
|
|
210
223
|
params: BatchResultsParams | undefined = {},
|
|
211
224
|
options?: RequestOptions,
|
|
212
225
|
): Promise<JSONLDecoder<BetaMessageBatchIndividualResponse>> {
|
|
213
|
-
const batch = await this.retrieve(messageBatchID);
|
|
226
|
+
const batch = await this.retrieve(messageBatchID, params, options);
|
|
214
227
|
if (!batch.results_url) {
|
|
215
228
|
throw new AnthropicError(
|
|
216
229
|
`No batch \`results_url\`; Has it finished processing? ${batch.processing_status} - ${batch.id}`,
|
|
217
230
|
);
|
|
218
231
|
}
|
|
219
232
|
|
|
220
|
-
const { betas } = params ?? {};
|
|
233
|
+
const { betas, workspace_id } = params ?? {};
|
|
221
234
|
return this._client
|
|
222
235
|
.get(batch.results_url, {
|
|
223
236
|
...options,
|
|
@@ -225,6 +238,7 @@ export class Batches extends APIResource {
|
|
|
225
238
|
{
|
|
226
239
|
'anthropic-beta': [...(betas ?? []), 'message-batches-2024-09-24'].toString(),
|
|
227
240
|
Accept: 'application/binary',
|
|
241
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
228
242
|
},
|
|
229
243
|
options?.headers,
|
|
230
244
|
]),
|
|
@@ -436,6 +450,16 @@ export interface BatchCreateParams {
|
|
|
436
450
|
* is errored.
|
|
437
451
|
*/
|
|
438
452
|
user_profile_id?: string;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
456
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
457
|
+
*
|
|
458
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
459
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
460
|
+
* match that Workspace.
|
|
461
|
+
*/
|
|
462
|
+
workspace_id?: string;
|
|
439
463
|
}
|
|
440
464
|
|
|
441
465
|
export namespace BatchCreateParams {
|
|
@@ -822,6 +846,16 @@ export interface BatchRetrieveParams {
|
|
|
822
846
|
* Optional header to specify the beta version(s) you want to use.
|
|
823
847
|
*/
|
|
824
848
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
852
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
853
|
+
*
|
|
854
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
855
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
856
|
+
* match that Workspace.
|
|
857
|
+
*/
|
|
858
|
+
workspace_id?: string;
|
|
825
859
|
}
|
|
826
860
|
|
|
827
861
|
export interface BatchListParams extends PageParams {
|
|
@@ -829,6 +863,16 @@ export interface BatchListParams extends PageParams {
|
|
|
829
863
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
830
864
|
*/
|
|
831
865
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
869
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
870
|
+
*
|
|
871
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
872
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
873
|
+
* match that Workspace.
|
|
874
|
+
*/
|
|
875
|
+
workspace_id?: string;
|
|
832
876
|
}
|
|
833
877
|
|
|
834
878
|
export interface BatchDeleteParams {
|
|
@@ -836,6 +880,16 @@ export interface BatchDeleteParams {
|
|
|
836
880
|
* Optional header to specify the beta version(s) you want to use.
|
|
837
881
|
*/
|
|
838
882
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
886
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
887
|
+
*
|
|
888
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
889
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
890
|
+
* match that Workspace.
|
|
891
|
+
*/
|
|
892
|
+
workspace_id?: string;
|
|
839
893
|
}
|
|
840
894
|
|
|
841
895
|
export interface BatchCancelParams {
|
|
@@ -843,6 +897,16 @@ export interface BatchCancelParams {
|
|
|
843
897
|
* Optional header to specify the beta version(s) you want to use.
|
|
844
898
|
*/
|
|
845
899
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
903
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
904
|
+
*
|
|
905
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
906
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
907
|
+
* match that Workspace.
|
|
908
|
+
*/
|
|
909
|
+
workspace_id?: string;
|
|
846
910
|
}
|
|
847
911
|
|
|
848
912
|
export interface BatchResultsParams {
|
|
@@ -850,6 +914,16 @@ export interface BatchResultsParams {
|
|
|
850
914
|
* Optional header to specify the beta version(s) you want to use.
|
|
851
915
|
*/
|
|
852
916
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
920
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
921
|
+
*
|
|
922
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
923
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
924
|
+
* match that Workspace.
|
|
925
|
+
*/
|
|
926
|
+
workspace_id?: string;
|
|
853
927
|
}
|
|
854
928
|
|
|
855
929
|
export declare namespace Batches {
|
|
@@ -90,7 +90,7 @@ export class Messages extends APIResource {
|
|
|
90
90
|
// Transform deprecated output_format to output_config.format
|
|
91
91
|
const modifiedParams = transformOutputFormat(params);
|
|
92
92
|
|
|
93
|
-
const { betas, user_profile_id, ...body } = modifiedParams;
|
|
93
|
+
const { betas, user_profile_id, workspace_id, ...body } = modifiedParams;
|
|
94
94
|
|
|
95
95
|
if (body.model in DEPRECATED_MODELS) {
|
|
96
96
|
console.warn(
|
|
@@ -127,6 +127,7 @@ export class Messages extends APIResource {
|
|
|
127
127
|
{
|
|
128
128
|
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
129
129
|
...(user_profile_id != null ? { 'anthropic-user-profile-id': user_profile_id } : undefined),
|
|
130
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
130
131
|
},
|
|
131
132
|
helperHeader,
|
|
132
133
|
options?.headers,
|
|
@@ -203,7 +204,7 @@ export class Messages extends APIResource {
|
|
|
203
204
|
// Transform deprecated output_format to output_config.format
|
|
204
205
|
const modifiedParams = transformOutputFormat(params);
|
|
205
206
|
|
|
206
|
-
const { betas, user_profile_id, ...body } = modifiedParams;
|
|
207
|
+
const { betas, user_profile_id, workspace_id, ...body } = modifiedParams;
|
|
207
208
|
return this._client.post('/v1/messages/count_tokens?beta=true', {
|
|
208
209
|
body,
|
|
209
210
|
...options,
|
|
@@ -211,6 +212,7 @@ export class Messages extends APIResource {
|
|
|
211
212
|
{
|
|
212
213
|
'anthropic-beta': [...(betas ?? []), 'token-counting-2024-11-01'].toString(),
|
|
213
214
|
...(user_profile_id != null ? { 'anthropic-user-profile-id': user_profile_id } : undefined),
|
|
215
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
214
216
|
},
|
|
215
217
|
options?.headers,
|
|
216
218
|
]),
|
|
@@ -6674,6 +6676,16 @@ export interface MessageCreateParamsBase {
|
|
|
6674
6676
|
* beta header.
|
|
6675
6677
|
*/
|
|
6676
6678
|
user_profile_id?: string;
|
|
6679
|
+
|
|
6680
|
+
/**
|
|
6681
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
6682
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
6683
|
+
*
|
|
6684
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
6685
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
6686
|
+
* match that Workspace.
|
|
6687
|
+
*/
|
|
6688
|
+
workspace_id?: string;
|
|
6677
6689
|
}
|
|
6678
6690
|
|
|
6679
6691
|
export namespace MessageCreateParams {
|
|
@@ -6972,6 +6984,16 @@ export interface MessageCountTokensParams {
|
|
|
6972
6984
|
* beta header.
|
|
6973
6985
|
*/
|
|
6974
6986
|
user_profile_id?: string;
|
|
6987
|
+
|
|
6988
|
+
/**
|
|
6989
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
6990
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
6991
|
+
*
|
|
6992
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
6993
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
6994
|
+
* match that Workspace.
|
|
6995
|
+
*/
|
|
6996
|
+
workspace_id?: string;
|
|
6975
6997
|
}
|
|
6976
6998
|
|
|
6977
6999
|
export { BetaToolRunner, type BetaToolRunnerParams } from '../../../lib/tools/BetaToolRunner';
|
|
@@ -27,11 +27,14 @@ export class Models extends APIResource {
|
|
|
27
27
|
params: ModelRetrieveParams | null | undefined = {},
|
|
28
28
|
options?: RequestOptions,
|
|
29
29
|
): APIPromise<BetaModelInfo> {
|
|
30
|
-
const { betas } = params ?? {};
|
|
30
|
+
const { betas, workspace_id } = params ?? {};
|
|
31
31
|
return this._client.get(path`/v1/models/${modelID}?beta=true`, {
|
|
32
32
|
...options,
|
|
33
33
|
headers: buildHeaders([
|
|
34
|
-
{
|
|
34
|
+
{
|
|
35
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
36
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
37
|
+
},
|
|
35
38
|
options?.headers,
|
|
36
39
|
]),
|
|
37
40
|
});
|
|
@@ -55,12 +58,15 @@ export class Models extends APIResource {
|
|
|
55
58
|
params: ModelListParams | null | undefined = {},
|
|
56
59
|
options?: RequestOptions,
|
|
57
60
|
): PagePromise<BetaModelInfosPage, BetaModelInfo> {
|
|
58
|
-
const { betas, ...query } = params ?? {};
|
|
61
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
59
62
|
return this._client.getAPIList('/v1/models?beta=true', Page<BetaModelInfo>, {
|
|
60
63
|
query,
|
|
61
64
|
...options,
|
|
62
65
|
headers: buildHeaders([
|
|
63
|
-
{
|
|
66
|
+
{
|
|
67
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
68
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
69
|
+
},
|
|
64
70
|
options?.headers,
|
|
65
71
|
]),
|
|
66
72
|
});
|
|
@@ -271,6 +277,16 @@ export interface ModelRetrieveParams {
|
|
|
271
277
|
* Optional header to specify the beta version(s) you want to use.
|
|
272
278
|
*/
|
|
273
279
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
283
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
284
|
+
*
|
|
285
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
286
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
287
|
+
* match that Workspace.
|
|
288
|
+
*/
|
|
289
|
+
workspace_id?: string;
|
|
274
290
|
}
|
|
275
291
|
|
|
276
292
|
export interface ModelListParams extends PageParams {
|
|
@@ -278,6 +294,16 @@ export interface ModelListParams extends PageParams {
|
|
|
278
294
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
279
295
|
*/
|
|
280
296
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
300
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
301
|
+
*
|
|
302
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
303
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
304
|
+
* match that Workspace.
|
|
305
|
+
*/
|
|
306
|
+
workspace_id?: string;
|
|
281
307
|
}
|
|
282
308
|
|
|
283
309
|
export declare namespace Models {
|
|
@@ -55,11 +55,15 @@ export interface BetaComplianceSettings {
|
|
|
55
55
|
/**
|
|
56
56
|
* Whether the Compliance API is enabled for this organization.
|
|
57
57
|
*/
|
|
58
|
-
state:
|
|
58
|
+
state: BetaComplianceSettingsState;
|
|
59
59
|
|
|
60
60
|
type: 'compliance_settings';
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
export type BetaComplianceSettingsState =
|
|
64
|
+
| BetaComplianceSettingsStateEnabled
|
|
65
|
+
| BetaComplianceSettingsStateDisabled;
|
|
66
|
+
|
|
63
67
|
export interface BetaComplianceSettingsStateDisabled {
|
|
64
68
|
type: 'disabled';
|
|
65
69
|
}
|
|
@@ -76,21 +80,27 @@ export interface BetaComplianceSettingsStateEnabledParam {
|
|
|
76
80
|
type: 'enabled';
|
|
77
81
|
}
|
|
78
82
|
|
|
83
|
+
export type BetaComplianceSettingsStateParam =
|
|
84
|
+
| BetaComplianceSettingsStateEnabledParam
|
|
85
|
+
| BetaComplianceSettingsStateDisabledParam;
|
|
86
|
+
|
|
79
87
|
export interface ComplianceSettingUpdateParams {
|
|
80
88
|
/**
|
|
81
89
|
* Desired state. Accepts the string shorthand "enabled" or "disabled" in place of
|
|
82
90
|
* the object form; the response always returns the canonical object form.
|
|
83
91
|
*/
|
|
84
|
-
state:
|
|
92
|
+
state: BetaComplianceSettingsStateParam;
|
|
85
93
|
}
|
|
86
94
|
|
|
87
95
|
export declare namespace ComplianceSettings {
|
|
88
96
|
export {
|
|
89
97
|
type BetaComplianceSettings as BetaComplianceSettings,
|
|
98
|
+
type BetaComplianceSettingsState as BetaComplianceSettingsState,
|
|
90
99
|
type BetaComplianceSettingsStateDisabled as BetaComplianceSettingsStateDisabled,
|
|
91
100
|
type BetaComplianceSettingsStateDisabledParam as BetaComplianceSettingsStateDisabledParam,
|
|
92
101
|
type BetaComplianceSettingsStateEnabled as BetaComplianceSettingsStateEnabled,
|
|
93
102
|
type BetaComplianceSettingsStateEnabledParam as BetaComplianceSettingsStateEnabledParam,
|
|
103
|
+
type BetaComplianceSettingsStateParam as BetaComplianceSettingsStateParam,
|
|
94
104
|
type ComplianceSettingUpdateParams as ComplianceSettingUpdateParams,
|
|
95
105
|
};
|
|
96
106
|
}
|
|
@@ -15,10 +15,12 @@ export {
|
|
|
15
15
|
export {
|
|
16
16
|
ComplianceSettings,
|
|
17
17
|
type BetaComplianceSettings,
|
|
18
|
+
type BetaComplianceSettingsState,
|
|
18
19
|
type BetaComplianceSettingsStateDisabled,
|
|
19
20
|
type BetaComplianceSettingsStateDisabledParam,
|
|
20
21
|
type BetaComplianceSettingsStateEnabled,
|
|
21
22
|
type BetaComplianceSettingsStateEnabledParam,
|
|
23
|
+
type BetaComplianceSettingsStateParam,
|
|
22
24
|
type ComplianceSettingUpdateParams,
|
|
23
25
|
} from './compliance-settings';
|
|
24
26
|
export {
|
|
@@ -17,10 +17,12 @@ import {
|
|
|
17
17
|
import * as ComplianceSettingsAPI from './compliance-settings';
|
|
18
18
|
import {
|
|
19
19
|
BetaComplianceSettings,
|
|
20
|
+
BetaComplianceSettingsState,
|
|
20
21
|
BetaComplianceSettingsStateDisabled,
|
|
21
22
|
BetaComplianceSettingsStateDisabledParam,
|
|
22
23
|
BetaComplianceSettingsStateEnabled,
|
|
23
24
|
BetaComplianceSettingsStateEnabledParam,
|
|
25
|
+
BetaComplianceSettingsStateParam,
|
|
24
26
|
ComplianceSettingUpdateParams,
|
|
25
27
|
ComplianceSettings,
|
|
26
28
|
} from './compliance-settings';
|
|
@@ -260,10 +262,12 @@ export declare namespace Organization {
|
|
|
260
262
|
export {
|
|
261
263
|
ComplianceSettings as ComplianceSettings,
|
|
262
264
|
type BetaComplianceSettings as BetaComplianceSettings,
|
|
265
|
+
type BetaComplianceSettingsState as BetaComplianceSettingsState,
|
|
263
266
|
type BetaComplianceSettingsStateDisabled as BetaComplianceSettingsStateDisabled,
|
|
264
267
|
type BetaComplianceSettingsStateDisabledParam as BetaComplianceSettingsStateDisabledParam,
|
|
265
268
|
type BetaComplianceSettingsStateEnabled as BetaComplianceSettingsStateEnabled,
|
|
266
269
|
type BetaComplianceSettingsStateEnabledParam as BetaComplianceSettingsStateEnabledParam,
|
|
270
|
+
type BetaComplianceSettingsStateParam as BetaComplianceSettingsStateParam,
|
|
267
271
|
type ComplianceSettingUpdateParams as ComplianceSettingUpdateParams,
|
|
268
272
|
};
|
|
269
273
|
}
|
|
@@ -34,7 +34,7 @@ export class Events extends APIResource {
|
|
|
34
34
|
params: EventListParams | null | undefined = {},
|
|
35
35
|
options?: RequestOptions,
|
|
36
36
|
): PagePromise<BetaManagedAgentsSessionEventsPageCursor, BetaManagedAgentsSessionEvent> {
|
|
37
|
-
const { betas, ...query } = params ?? {};
|
|
37
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
38
38
|
return this._client.getAPIList(
|
|
39
39
|
path`/v1/sessions/${sessionID}/events?beta=true`,
|
|
40
40
|
PageCursor<BetaManagedAgentsSessionEvent>,
|
|
@@ -42,7 +42,10 @@ export class Events extends APIResource {
|
|
|
42
42
|
query,
|
|
43
43
|
...options,
|
|
44
44
|
headers: buildHeaders([
|
|
45
|
-
{
|
|
45
|
+
{
|
|
46
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
47
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
48
|
+
},
|
|
46
49
|
options?.headers,
|
|
47
50
|
]),
|
|
48
51
|
},
|
|
@@ -78,12 +81,15 @@ export class Events extends APIResource {
|
|
|
78
81
|
params: EventSendParams,
|
|
79
82
|
options?: RequestOptions,
|
|
80
83
|
): APIPromise<BetaManagedAgentsSendSessionEvents> {
|
|
81
|
-
const { betas, ...body } = params;
|
|
84
|
+
const { betas, workspace_id, ...body } = params;
|
|
82
85
|
return this._client.post(path`/v1/sessions/${sessionID}/events?beta=true`, {
|
|
83
86
|
body,
|
|
84
87
|
...options,
|
|
85
88
|
headers: buildHeaders([
|
|
86
|
-
{
|
|
89
|
+
{
|
|
90
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
91
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
92
|
+
},
|
|
87
93
|
options?.headers,
|
|
88
94
|
]),
|
|
89
95
|
});
|
|
@@ -105,12 +111,15 @@ export class Events extends APIResource {
|
|
|
105
111
|
params: EventStreamParams | undefined = {},
|
|
106
112
|
options?: RequestOptions,
|
|
107
113
|
): APIPromise<Stream<BetaManagedAgentsStreamSessionEvents>> {
|
|
108
|
-
const { betas, ...query } = params ?? {};
|
|
114
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
109
115
|
return this._client.get(path`/v1/sessions/${sessionID}/events/stream?beta=true`, {
|
|
110
116
|
query,
|
|
111
117
|
...options,
|
|
112
118
|
headers: buildHeaders([
|
|
113
|
-
{
|
|
119
|
+
{
|
|
120
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
121
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
122
|
+
},
|
|
114
123
|
options?.headers,
|
|
115
124
|
]),
|
|
116
125
|
stream: true,
|
|
@@ -1992,6 +2001,16 @@ export interface EventListParams extends PageCursorParams {
|
|
|
1992
2001
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
1993
2002
|
*/
|
|
1994
2003
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
2004
|
+
|
|
2005
|
+
/**
|
|
2006
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
2007
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
2008
|
+
*
|
|
2009
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
2010
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
2011
|
+
* match that Workspace.
|
|
2012
|
+
*/
|
|
2013
|
+
workspace_id?: string;
|
|
1995
2014
|
}
|
|
1996
2015
|
|
|
1997
2016
|
export interface EventSendParams {
|
|
@@ -2004,6 +2023,16 @@ export interface EventSendParams {
|
|
|
2004
2023
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
2005
2024
|
*/
|
|
2006
2025
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
2029
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
2030
|
+
*
|
|
2031
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
2032
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
2033
|
+
* match that Workspace.
|
|
2034
|
+
*/
|
|
2035
|
+
workspace_id?: string;
|
|
2007
2036
|
}
|
|
2008
2037
|
|
|
2009
2038
|
export interface EventStreamParams {
|
|
@@ -2025,6 +2054,16 @@ export interface EventStreamParams {
|
|
|
2025
2054
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
2026
2055
|
*/
|
|
2027
2056
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
2057
|
+
|
|
2058
|
+
/**
|
|
2059
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
2060
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
2061
|
+
*
|
|
2062
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
2063
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
2064
|
+
* match that Workspace.
|
|
2065
|
+
*/
|
|
2066
|
+
workspace_id?: string;
|
|
2028
2067
|
}
|
|
2029
2068
|
|
|
2030
2069
|
export { SessionToolRunner, type SessionToolRunnerOptions } from '../../../lib/tools/SessionToolRunner';
|