@anthropic-ai/sdk 0.122.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 +62 -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/credentials.d.mts.map +1 -1
- package/core/credentials.d.ts.map +1 -1
- package/core/credentials.js +5 -7
- package/core/credentials.js.map +1 -1
- package/core/credentials.mjs +5 -7
- package/core/credentials.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/internal/file-store.d.mts.map +1 -1
- package/internal/file-store.d.ts.map +1 -1
- package/internal/file-store.js +23 -25
- package/internal/file-store.js.map +1 -1
- package/internal/file-store.mjs +5 -6
- package/internal/file-store.mjs.map +1 -1
- package/internal/node.browser.d.mts +9 -0
- package/internal/node.browser.d.mts.map +1 -0
- package/internal/node.browser.d.ts +9 -0
- package/internal/node.browser.d.ts.map +1 -0
- package/internal/node.browser.js +22 -0
- package/internal/node.browser.js.map +1 -0
- package/internal/node.browser.mjs +19 -0
- package/internal/node.browser.mjs.map +1 -0
- package/internal/node.d.mts +14 -0
- package/internal/node.d.mts.map +1 -0
- package/internal/node.d.ts +14 -0
- package/internal/node.d.ts.map +1 -0
- package/internal/node.js +24 -0
- package/internal/node.js.map +1 -0
- package/internal/node.mjs +14 -0
- package/internal/node.mjs.map +1 -0
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +3 -0
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +3 -0
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/credentials/credential-chain.js +1 -1
- package/lib/credentials/credential-chain.js.map +1 -1
- package/lib/credentials/credential-chain.mjs +1 -1
- package/lib/credentials/credential-chain.mjs.map +1 -1
- package/lib/credentials/identity-token.js +1 -1
- package/lib/credentials/identity-token.js.map +1 -1
- package/lib/credentials/identity-token.mjs +1 -1
- package/lib/credentials/identity-token.mjs.map +1 -1
- package/lib/credentials/types.d.mts.map +1 -1
- package/lib/credentials/types.d.ts.map +1 -1
- package/lib/credentials/types.js +2 -3
- package/lib/credentials/types.js.map +1 -1
- package/lib/credentials/types.mjs +2 -3
- package/lib/credentials/types.mjs.map +1 -1
- package/lib/credentials/user-oauth.js +1 -1
- package/lib/credentials/user-oauth.js.map +1 -1
- package/lib/credentials/user-oauth.mjs +1 -1
- package/lib/credentials/user-oauth.mjs.map +1 -1
- package/lib/middleware.d.mts.map +1 -1
- package/lib/middleware.d.ts.map +1 -1
- package/lib/middleware.js +30 -7
- package/lib/middleware.js.map +1 -1
- package/lib/middleware.mjs +30 -7
- package/lib/middleware.mjs.map +1 -1
- package/package.json +3 -1
- package/resources/beta/agents/agents.d.mts +46 -1
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +46 -1
- 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/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.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/deployment-runs.d.mts +24 -6
- package/resources/beta/deployment-runs.d.mts.map +1 -1
- package/resources/beta/deployment-runs.d.ts +24 -6
- 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 +75 -2
- package/resources/beta/deployments.d.mts.map +1 -1
- package/resources/beta/deployments.d.ts +75 -2
- 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 +73 -1
- package/resources/beta/dreams.d.mts.map +1 -1
- package/resources/beta/dreams.d.ts +73 -1
- 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/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/memories.d.mts +51 -4
- package/resources/beta/memory-stores/memories.d.mts.map +1 -1
- package/resources/beta/memory-stores/memories.d.ts +51 -4
- 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/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 +148 -3
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +148 -3
- 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 +76 -0
- package/resources/beta/organization/compliance-settings.d.mts.map +1 -0
- package/resources/beta/organization/compliance-settings.d.ts +76 -0
- package/resources/beta/organization/compliance-settings.d.ts.map +1 -0
- package/resources/beta/organization/compliance-settings.js +52 -0
- package/resources/beta/organization/compliance-settings.js.map +1 -0
- package/resources/beta/organization/compliance-settings.mjs +48 -0
- package/resources/beta/organization/compliance-settings.mjs.map +1 -0
- package/resources/beta/organization/external-keys.d.mts +6 -3
- package/resources/beta/organization/external-keys.d.mts.map +1 -1
- package/resources/beta/organization/external-keys.d.ts +6 -3
- package/resources/beta/organization/external-keys.d.ts.map +1 -1
- package/resources/beta/organization/index.d.mts +1 -0
- package/resources/beta/organization/index.d.mts.map +1 -1
- package/resources/beta/organization/index.d.ts +1 -0
- package/resources/beta/organization/index.d.ts.map +1 -1
- package/resources/beta/organization/index.js +3 -1
- package/resources/beta/organization/index.js.map +1 -1
- package/resources/beta/organization/index.mjs +1 -0
- package/resources/beta/organization/index.mjs.map +1 -1
- package/resources/beta/organization/organization.d.mts +4 -0
- package/resources/beta/organization/organization.d.mts.map +1 -1
- package/resources/beta/organization/organization.d.ts +4 -0
- package/resources/beta/organization/organization.d.ts.map +1 -1
- package/resources/beta/organization/organization.js +4 -0
- package/resources/beta/organization/organization.js.map +1 -1
- package/resources/beta/organization/organization.mjs +4 -0
- package/resources/beta/organization/organization.mjs.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.mts +28 -12
- package/resources/beta/organization/workspaces/workspaces.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.ts +28 -12
- package/resources/beta/organization/workspaces/workspaces.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.js.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.mjs.map +1 -1
- package/resources/beta/sessions/events.d.mts +28 -1
- package/resources/beta/sessions/events.d.mts.map +1 -1
- package/resources/beta/sessions/events.d.ts +28 -1
- 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 +64 -10
- package/resources/beta/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/sessions/sessions.d.ts +64 -10
- 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/user-profiles.d.mts +21 -25
- package/resources/beta/user-profiles.d.mts.map +1 -1
- package/resources/beta/user-profiles.d.ts +21 -25
- package/resources/beta/user-profiles.d.ts.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 +21 -5
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +21 -5
- 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/credentials.ts +5 -7
- package/src/core/streaming.ts +4 -2
- package/src/internal/file-store.ts +11 -10
- package/src/internal/node.browser.ts +22 -0
- package/src/internal/node.ts +14 -0
- package/src/lib/BetaMessageStream.ts +4 -0
- package/src/lib/credentials/credential-chain.ts +1 -1
- package/src/lib/credentials/identity-token.ts +1 -1
- package/src/lib/credentials/types.ts +2 -3
- package/src/lib/credentials/user-oauth.ts +1 -1
- package/src/lib/middleware.ts +33 -9
- package/src/resources/beta/agents/agents.ts +76 -10
- package/src/resources/beta/agents/versions.ts +15 -2
- package/src/resources/beta/beta.ts +16 -1
- package/src/resources/beta/deployment-runs.ts +36 -10
- package/src/resources/beta/deployments.ts +123 -18
- package/src/resources/beta/dreams.ts +117 -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/index.ts +6 -0
- package/src/resources/beta/memory-stores/memories.ts +81 -14
- 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/index.ts +4 -0
- package/src/resources/beta/messages/messages.ts +173 -10
- package/src/resources/beta/models.ts +30 -4
- package/src/resources/beta/organization/compliance-settings.ts +106 -0
- package/src/resources/beta/organization/external-keys.ts +6 -3
- package/src/resources/beta/organization/index.ts +11 -0
- package/src/resources/beta/organization/organization.ts +28 -0
- package/src/resources/beta/organization/workspaces/workspaces.ts +28 -12
- package/src/resources/beta/sessions/events.ts +46 -7
- package/src/resources/beta/sessions/resources.ts +75 -10
- package/src/resources/beta/sessions/sessions.ts +100 -22
- 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/user-profiles.ts +24 -27
- 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 +40 -12
- 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 +22 -9
- package/src/tools/agent-toolset/memories.ts +5 -3
- package/src/tools/agent-toolset/skills.ts +5 -10
- 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 +27 -19
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +17 -8
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/memories.d.mts.map +1 -1
- package/tools/agent-toolset/memories.d.ts.map +1 -1
- package/tools/agent-toolset/memories.js +6 -4
- package/tools/agent-toolset/memories.js.map +1 -1
- package/tools/agent-toolset/memories.mjs +5 -3
- package/tools/agent-toolset/memories.mjs.map +1 -1
- package/tools/agent-toolset/skills.d.mts.map +1 -1
- package/tools/agent-toolset/skills.d.ts.map +1 -1
- package/tools/agent-toolset/skills.js +15 -21
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/skills.mjs +4 -9
- package/tools/agent-toolset/skills.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
|
@@ -146,12 +146,15 @@ export class Sessions extends APIResource {
|
|
|
146
146
|
* ```
|
|
147
147
|
*/
|
|
148
148
|
create(params: SessionCreateParams, options?: RequestOptions): APIPromise<BetaManagedAgentsSession> {
|
|
149
|
-
const { betas, ...body } = params;
|
|
149
|
+
const { betas, workspace_id, ...body } = params;
|
|
150
150
|
return this._client.post('/v1/sessions?beta=true', {
|
|
151
151
|
body,
|
|
152
152
|
...options,
|
|
153
153
|
headers: buildHeaders([
|
|
154
|
-
{
|
|
154
|
+
{
|
|
155
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
156
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
157
|
+
},
|
|
155
158
|
options?.headers,
|
|
156
159
|
]),
|
|
157
160
|
});
|
|
@@ -173,11 +176,14 @@ export class Sessions extends APIResource {
|
|
|
173
176
|
params: SessionRetrieveParams | null | undefined = {},
|
|
174
177
|
options?: RequestOptions,
|
|
175
178
|
): APIPromise<BetaManagedAgentsSession> {
|
|
176
|
-
const { betas } = params ?? {};
|
|
179
|
+
const { betas, workspace_id } = params ?? {};
|
|
177
180
|
return this._client.get(path`/v1/sessions/${sessionID}?beta=true`, {
|
|
178
181
|
...options,
|
|
179
182
|
headers: buildHeaders([
|
|
180
|
-
{
|
|
183
|
+
{
|
|
184
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
185
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
186
|
+
},
|
|
181
187
|
options?.headers,
|
|
182
188
|
]),
|
|
183
189
|
});
|
|
@@ -199,12 +205,15 @@ export class Sessions extends APIResource {
|
|
|
199
205
|
params: SessionUpdateParams,
|
|
200
206
|
options?: RequestOptions,
|
|
201
207
|
): APIPromise<BetaManagedAgentsSession> {
|
|
202
|
-
const { betas, ...body } = params;
|
|
208
|
+
const { betas, workspace_id, ...body } = params;
|
|
203
209
|
return this._client.post(path`/v1/sessions/${sessionID}?beta=true`, {
|
|
204
210
|
body,
|
|
205
211
|
...options,
|
|
206
212
|
headers: buildHeaders([
|
|
207
|
-
{
|
|
213
|
+
{
|
|
214
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
215
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
216
|
+
},
|
|
208
217
|
options?.headers,
|
|
209
218
|
]),
|
|
210
219
|
});
|
|
@@ -225,7 +234,7 @@ export class Sessions extends APIResource {
|
|
|
225
234
|
params: SessionListParams | null | undefined = {},
|
|
226
235
|
options?: RequestOptions,
|
|
227
236
|
): PagePromise<BetaManagedAgentsSessionsBidirectionalPageCursor, BetaManagedAgentsSession> {
|
|
228
|
-
const { betas, ...query } = params ?? {};
|
|
237
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
229
238
|
return this._client.getAPIList(
|
|
230
239
|
'/v1/sessions?beta=true',
|
|
231
240
|
BidirectionalPageCursor<BetaManagedAgentsSession>,
|
|
@@ -233,7 +242,10 @@ export class Sessions extends APIResource {
|
|
|
233
242
|
query,
|
|
234
243
|
...options,
|
|
235
244
|
headers: buildHeaders([
|
|
236
|
-
{
|
|
245
|
+
{
|
|
246
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
247
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
248
|
+
},
|
|
237
249
|
options?.headers,
|
|
238
250
|
]),
|
|
239
251
|
},
|
|
@@ -256,11 +268,14 @@ export class Sessions extends APIResource {
|
|
|
256
268
|
params: SessionDeleteParams | null | undefined = {},
|
|
257
269
|
options?: RequestOptions,
|
|
258
270
|
): APIPromise<BetaManagedAgentsDeletedSession> {
|
|
259
|
-
const { betas } = params ?? {};
|
|
271
|
+
const { betas, workspace_id } = params ?? {};
|
|
260
272
|
return this._client.delete(path`/v1/sessions/${sessionID}?beta=true`, {
|
|
261
273
|
...options,
|
|
262
274
|
headers: buildHeaders([
|
|
263
|
-
{
|
|
275
|
+
{
|
|
276
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
277
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
278
|
+
},
|
|
264
279
|
options?.headers,
|
|
265
280
|
]),
|
|
266
281
|
});
|
|
@@ -282,11 +297,14 @@ export class Sessions extends APIResource {
|
|
|
282
297
|
params: SessionArchiveParams | null | undefined = {},
|
|
283
298
|
options?: RequestOptions,
|
|
284
299
|
): APIPromise<BetaManagedAgentsSession> {
|
|
285
|
-
const { betas } = params ?? {};
|
|
300
|
+
const { betas, workspace_id } = params ?? {};
|
|
286
301
|
return this._client.post(path`/v1/sessions/${sessionID}/archive?beta=true`, {
|
|
287
302
|
...options,
|
|
288
303
|
headers: buildHeaders([
|
|
289
|
-
{
|
|
304
|
+
{
|
|
305
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
306
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
307
|
+
},
|
|
290
308
|
options?.headers,
|
|
291
309
|
]),
|
|
292
310
|
});
|
|
@@ -614,7 +632,7 @@ export type BetaManagedAgentsMultiagentRosterEntryParams =
|
|
|
614
632
|
| BetaManagedAgentsAdvisorParams;
|
|
615
633
|
|
|
616
634
|
/**
|
|
617
|
-
* Evaluation state for a single outcome defined via a define_outcome event.
|
|
635
|
+
* Evaluation state for a single outcome defined via a `define_outcome` event.
|
|
618
636
|
*/
|
|
619
637
|
export interface BetaManagedAgentsOutcomeEvaluationResource {
|
|
620
638
|
/**
|
|
@@ -628,9 +646,9 @@ export interface BetaManagedAgentsOutcomeEvaluationResource {
|
|
|
628
646
|
description: string;
|
|
629
647
|
|
|
630
648
|
/**
|
|
631
|
-
* Grader's verdict text from the most recent evaluation. For satisfied
|
|
632
|
-
* why criteria are met; for needs_revision (intermediate), what's missing; for
|
|
633
|
-
* failed
|
|
649
|
+
* Grader's verdict text from the most recent evaluation. For `satisfied`, explains
|
|
650
|
+
* why criteria are met; for `needs_revision` (intermediate), what's missing; for
|
|
651
|
+
* `failed`, why unrecoverable.
|
|
634
652
|
*/
|
|
635
653
|
explanation: string | null;
|
|
636
654
|
|
|
@@ -702,7 +720,7 @@ export interface BetaManagedAgentsSession {
|
|
|
702
720
|
metadata: { [key: string]: string };
|
|
703
721
|
|
|
704
722
|
/**
|
|
705
|
-
* Per-outcome evaluation state. One entry per define_outcome event sent to the
|
|
723
|
+
* Per-outcome evaluation state. One entry per `define_outcome` event sent to the
|
|
706
724
|
* session.
|
|
707
725
|
*/
|
|
708
726
|
outcome_evaluations: Array<BetaManagedAgentsOutcomeEvaluationResource>;
|
|
@@ -826,7 +844,7 @@ export interface BetaManagedAgentsSessionMultiagentCoordinator {
|
|
|
826
844
|
*/
|
|
827
845
|
export interface BetaManagedAgentsSessionStats {
|
|
828
846
|
/**
|
|
829
|
-
* Cumulative time in seconds the session spent in running status. Excludes idle
|
|
847
|
+
* Cumulative time in seconds the session spent in `running` status. Excludes idle
|
|
830
848
|
* time.
|
|
831
849
|
*/
|
|
832
850
|
active_seconds?: number;
|
|
@@ -1119,6 +1137,16 @@ export interface SessionCreateParams {
|
|
|
1119
1137
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
1120
1138
|
*/
|
|
1121
1139
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
1143
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
1144
|
+
*
|
|
1145
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
1146
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
1147
|
+
* match that Workspace.
|
|
1148
|
+
*/
|
|
1149
|
+
workspace_id?: string;
|
|
1122
1150
|
}
|
|
1123
1151
|
|
|
1124
1152
|
export interface SessionRetrieveParams {
|
|
@@ -1126,6 +1154,16 @@ export interface SessionRetrieveParams {
|
|
|
1126
1154
|
* Optional header to specify the beta version(s) you want to use.
|
|
1127
1155
|
*/
|
|
1128
1156
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
1160
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
1161
|
+
*
|
|
1162
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
1163
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
1164
|
+
* match that Workspace.
|
|
1165
|
+
*/
|
|
1166
|
+
workspace_id?: string;
|
|
1129
1167
|
}
|
|
1130
1168
|
|
|
1131
1169
|
export interface SessionUpdateParams {
|
|
@@ -1164,6 +1202,16 @@ export interface SessionUpdateParams {
|
|
|
1164
1202
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
1165
1203
|
*/
|
|
1166
1204
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
1208
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
1209
|
+
*
|
|
1210
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
1211
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
1212
|
+
* match that Workspace.
|
|
1213
|
+
*/
|
|
1214
|
+
workspace_id?: string;
|
|
1167
1215
|
}
|
|
1168
1216
|
|
|
1169
1217
|
export interface SessionListParams extends BidirectionalPageCursorParams {
|
|
@@ -1173,7 +1221,7 @@ export interface SessionListParams extends BidirectionalPageCursorParams {
|
|
|
1173
1221
|
agent_id?: string;
|
|
1174
1222
|
|
|
1175
1223
|
/**
|
|
1176
|
-
* Query param: Filter by agent version. Only applies when agent_id is also set.
|
|
1224
|
+
* Query param: Filter by agent version. Only applies when `agent_id` is also set.
|
|
1177
1225
|
*/
|
|
1178
1226
|
agent_version?: number;
|
|
1179
1227
|
|
|
@@ -1209,14 +1257,14 @@ export interface SessionListParams extends BidirectionalPageCursorParams {
|
|
|
1209
1257
|
include_archived?: boolean;
|
|
1210
1258
|
|
|
1211
1259
|
/**
|
|
1212
|
-
* Query param: Filter sessions whose resources contain a memory_store with this
|
|
1260
|
+
* Query param: Filter sessions whose resources contain a `memory_store` with this
|
|
1213
1261
|
* memory store ID.
|
|
1214
1262
|
*/
|
|
1215
1263
|
memory_store_id?: string;
|
|
1216
1264
|
|
|
1217
1265
|
/**
|
|
1218
|
-
* Query param: Sort direction for results, ordered by created_at
|
|
1219
|
-
* (newest first).
|
|
1266
|
+
* Query param: Sort direction for results, ordered by `created_at`. Defaults to
|
|
1267
|
+
* `desc` (newest first).
|
|
1220
1268
|
*/
|
|
1221
1269
|
order?: 'asc' | 'desc';
|
|
1222
1270
|
|
|
@@ -1230,6 +1278,16 @@ export interface SessionListParams extends BidirectionalPageCursorParams {
|
|
|
1230
1278
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
1231
1279
|
*/
|
|
1232
1280
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
1284
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
1285
|
+
*
|
|
1286
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
1287
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
1288
|
+
* match that Workspace.
|
|
1289
|
+
*/
|
|
1290
|
+
workspace_id?: string;
|
|
1233
1291
|
}
|
|
1234
1292
|
|
|
1235
1293
|
export interface SessionDeleteParams {
|
|
@@ -1237,6 +1295,16 @@ export interface SessionDeleteParams {
|
|
|
1237
1295
|
* Optional header to specify the beta version(s) you want to use.
|
|
1238
1296
|
*/
|
|
1239
1297
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
1301
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
1302
|
+
*
|
|
1303
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
1304
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
1305
|
+
* match that Workspace.
|
|
1306
|
+
*/
|
|
1307
|
+
workspace_id?: string;
|
|
1240
1308
|
}
|
|
1241
1309
|
|
|
1242
1310
|
export interface SessionArchiveParams {
|
|
@@ -1244,6 +1312,16 @@ export interface SessionArchiveParams {
|
|
|
1244
1312
|
* Optional header to specify the beta version(s) you want to use.
|
|
1245
1313
|
*/
|
|
1246
1314
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
1318
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
1319
|
+
*
|
|
1320
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
1321
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
1322
|
+
* match that Workspace.
|
|
1323
|
+
*/
|
|
1324
|
+
workspace_id?: string;
|
|
1247
1325
|
}
|
|
1248
1326
|
|
|
1249
1327
|
Sessions.Events = Events;
|
|
@@ -33,7 +33,7 @@ export class Events extends APIResource {
|
|
|
33
33
|
params: EventListParams,
|
|
34
34
|
options?: RequestOptions,
|
|
35
35
|
): PagePromise<BetaManagedAgentsSessionEventsPageCursor, EventsAPI.BetaManagedAgentsSessionEvent> {
|
|
36
|
-
const { session_id, betas, ...query } = params;
|
|
36
|
+
const { session_id, betas, workspace_id, ...query } = params;
|
|
37
37
|
return this._client.getAPIList(
|
|
38
38
|
path`/v1/sessions/${session_id}/threads/${threadID}/events?beta=true`,
|
|
39
39
|
PageCursor<EventsAPI.BetaManagedAgentsSessionEvent>,
|
|
@@ -41,7 +41,10 @@ export class Events extends APIResource {
|
|
|
41
41
|
query,
|
|
42
42
|
...options,
|
|
43
43
|
headers: buildHeaders([
|
|
44
|
-
{
|
|
44
|
+
{
|
|
45
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
46
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
47
|
+
},
|
|
45
48
|
options?.headers,
|
|
46
49
|
]),
|
|
47
50
|
},
|
|
@@ -65,12 +68,15 @@ export class Events extends APIResource {
|
|
|
65
68
|
params: EventStreamParams,
|
|
66
69
|
options?: RequestOptions,
|
|
67
70
|
): APIPromise<Stream<ThreadsAPI.BetaManagedAgentsStreamSessionThreadEvents>> {
|
|
68
|
-
const { session_id, betas, ...query } = params;
|
|
71
|
+
const { session_id, betas, workspace_id, ...query } = params;
|
|
69
72
|
return this._client.get(path`/v1/sessions/${session_id}/threads/${threadID}/stream?beta=true`, {
|
|
70
73
|
query,
|
|
71
74
|
...options,
|
|
72
75
|
headers: buildHeaders([
|
|
73
|
-
{
|
|
76
|
+
{
|
|
77
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
78
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
79
|
+
},
|
|
74
80
|
options?.headers,
|
|
75
81
|
]),
|
|
76
82
|
stream: true,
|
|
@@ -88,6 +94,16 @@ export interface EventListParams extends PageCursorParams {
|
|
|
88
94
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
89
95
|
*/
|
|
90
96
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
100
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
101
|
+
*
|
|
102
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
103
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
104
|
+
* match that Workspace.
|
|
105
|
+
*/
|
|
106
|
+
workspace_id?: string;
|
|
91
107
|
}
|
|
92
108
|
|
|
93
109
|
export interface EventStreamParams {
|
|
@@ -114,6 +130,16 @@ export interface EventStreamParams {
|
|
|
114
130
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
115
131
|
*/
|
|
116
132
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
136
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
137
|
+
*
|
|
138
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
139
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
140
|
+
* match that Workspace.
|
|
141
|
+
*/
|
|
142
|
+
workspace_id?: string;
|
|
117
143
|
}
|
|
118
144
|
|
|
119
145
|
export declare namespace Events {
|
|
@@ -33,11 +33,14 @@ export class Threads extends APIResource {
|
|
|
33
33
|
params: ThreadRetrieveParams,
|
|
34
34
|
options?: RequestOptions,
|
|
35
35
|
): APIPromise<BetaManagedAgentsSessionThread> {
|
|
36
|
-
const { session_id, betas } = params;
|
|
36
|
+
const { session_id, betas, workspace_id } = params;
|
|
37
37
|
return this._client.get(path`/v1/sessions/${session_id}/threads/${threadID}?beta=true`, {
|
|
38
38
|
...options,
|
|
39
39
|
headers: buildHeaders([
|
|
40
|
-
{
|
|
40
|
+
{
|
|
41
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
42
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
43
|
+
},
|
|
41
44
|
options?.headers,
|
|
42
45
|
]),
|
|
43
46
|
});
|
|
@@ -61,7 +64,7 @@ export class Threads extends APIResource {
|
|
|
61
64
|
params: ThreadListParams | null | undefined = {},
|
|
62
65
|
options?: RequestOptions,
|
|
63
66
|
): PagePromise<BetaManagedAgentsSessionThreadsPageCursor, BetaManagedAgentsSessionThread> {
|
|
64
|
-
const { betas, ...query } = params ?? {};
|
|
67
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
65
68
|
return this._client.getAPIList(
|
|
66
69
|
path`/v1/sessions/${sessionID}/threads?beta=true`,
|
|
67
70
|
PageCursor<BetaManagedAgentsSessionThread>,
|
|
@@ -69,7 +72,10 @@ export class Threads extends APIResource {
|
|
|
69
72
|
query,
|
|
70
73
|
...options,
|
|
71
74
|
headers: buildHeaders([
|
|
72
|
-
{
|
|
75
|
+
{
|
|
76
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
77
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
78
|
+
},
|
|
73
79
|
options?.headers,
|
|
74
80
|
]),
|
|
75
81
|
},
|
|
@@ -93,11 +99,14 @@ export class Threads extends APIResource {
|
|
|
93
99
|
params: ThreadArchiveParams,
|
|
94
100
|
options?: RequestOptions,
|
|
95
101
|
): APIPromise<BetaManagedAgentsSessionThread> {
|
|
96
|
-
const { session_id, betas } = params;
|
|
102
|
+
const { session_id, betas, workspace_id } = params;
|
|
97
103
|
return this._client.post(path`/v1/sessions/${session_id}/threads/${threadID}/archive?beta=true`, {
|
|
98
104
|
...options,
|
|
99
105
|
headers: buildHeaders([
|
|
100
|
-
{
|
|
106
|
+
{
|
|
107
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
108
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
109
|
+
},
|
|
101
110
|
options?.headers,
|
|
102
111
|
]),
|
|
103
112
|
});
|
|
@@ -287,6 +296,16 @@ export interface ThreadRetrieveParams {
|
|
|
287
296
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
288
297
|
*/
|
|
289
298
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
302
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
303
|
+
*
|
|
304
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
305
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
306
|
+
* match that Workspace.
|
|
307
|
+
*/
|
|
308
|
+
workspace_id?: string;
|
|
290
309
|
}
|
|
291
310
|
|
|
292
311
|
export interface ThreadListParams extends PageCursorParams {
|
|
@@ -294,6 +313,16 @@ export interface ThreadListParams extends PageCursorParams {
|
|
|
294
313
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
295
314
|
*/
|
|
296
315
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
319
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
320
|
+
*
|
|
321
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
322
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
323
|
+
* match that Workspace.
|
|
324
|
+
*/
|
|
325
|
+
workspace_id?: string;
|
|
297
326
|
}
|
|
298
327
|
|
|
299
328
|
export interface ThreadArchiveParams {
|
|
@@ -306,6 +335,16 @@ export interface ThreadArchiveParams {
|
|
|
306
335
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
307
336
|
*/
|
|
308
337
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
341
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
342
|
+
*
|
|
343
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
344
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
345
|
+
* match that Workspace.
|
|
346
|
+
*/
|
|
347
|
+
workspace_id?: string;
|
|
309
348
|
}
|
|
310
349
|
|
|
311
350
|
Threads.Events = Events;
|
|
@@ -36,7 +36,7 @@ export class Skills extends APIResource {
|
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
38
|
create(params: SkillCreateParams, options?: RequestOptions): APIPromise<BetaSkill> {
|
|
39
|
-
const { betas, ...body } = params;
|
|
39
|
+
const { betas, workspace_id, ...body } = params;
|
|
40
40
|
return this._client.post(
|
|
41
41
|
'/v1/skills?beta=true',
|
|
42
42
|
multipartFormRequestOptions(
|
|
@@ -44,7 +44,10 @@ export class Skills extends APIResource {
|
|
|
44
44
|
body,
|
|
45
45
|
...options,
|
|
46
46
|
headers: buildHeaders([
|
|
47
|
-
{
|
|
47
|
+
{
|
|
48
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
49
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
50
|
+
},
|
|
48
51
|
options?.headers,
|
|
49
52
|
]),
|
|
50
53
|
},
|
|
@@ -69,11 +72,14 @@ export class Skills extends APIResource {
|
|
|
69
72
|
params: SkillRetrieveParams | null | undefined = {},
|
|
70
73
|
options?: RequestOptions,
|
|
71
74
|
): APIPromise<BetaSkill> {
|
|
72
|
-
const { betas } = params ?? {};
|
|
75
|
+
const { betas, workspace_id } = params ?? {};
|
|
73
76
|
return this._client.get(path`/v1/skills/${skillID}?beta=true`, {
|
|
74
77
|
...options,
|
|
75
78
|
headers: buildHeaders([
|
|
76
|
-
{
|
|
79
|
+
{
|
|
80
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
81
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
82
|
+
},
|
|
77
83
|
options?.headers,
|
|
78
84
|
]),
|
|
79
85
|
});
|
|
@@ -94,12 +100,15 @@ export class Skills extends APIResource {
|
|
|
94
100
|
params: SkillListParams | null | undefined = {},
|
|
95
101
|
options?: RequestOptions,
|
|
96
102
|
): PagePromise<BetaSkillsPageCursor, BetaSkill> {
|
|
97
|
-
const { betas, ...query } = params ?? {};
|
|
103
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
98
104
|
return this._client.getAPIList('/v1/skills?beta=true', PageCursor<BetaSkill>, {
|
|
99
105
|
query,
|
|
100
106
|
...options,
|
|
101
107
|
headers: buildHeaders([
|
|
102
|
-
{
|
|
108
|
+
{
|
|
109
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
110
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
111
|
+
},
|
|
103
112
|
options?.headers,
|
|
104
113
|
]),
|
|
105
114
|
});
|
|
@@ -120,11 +129,14 @@ export class Skills extends APIResource {
|
|
|
120
129
|
params: SkillDeleteParams | null | undefined = {},
|
|
121
130
|
options?: RequestOptions,
|
|
122
131
|
): APIPromise<BetaDeletedSkill> {
|
|
123
|
-
const { betas } = params ?? {};
|
|
132
|
+
const { betas, workspace_id } = params ?? {};
|
|
124
133
|
return this._client.delete(path`/v1/skills/${skillID}?beta=true`, {
|
|
125
134
|
...options,
|
|
126
135
|
headers: buildHeaders([
|
|
127
|
-
{
|
|
136
|
+
{
|
|
137
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
138
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
139
|
+
},
|
|
128
140
|
options?.headers,
|
|
129
141
|
]),
|
|
130
142
|
});
|
|
@@ -234,6 +246,16 @@ export interface SkillCreateParams {
|
|
|
234
246
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
235
247
|
*/
|
|
236
248
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
252
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
253
|
+
*
|
|
254
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
255
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
256
|
+
* match that Workspace.
|
|
257
|
+
*/
|
|
258
|
+
workspace_id?: string;
|
|
237
259
|
}
|
|
238
260
|
|
|
239
261
|
export interface SkillRetrieveParams {
|
|
@@ -241,6 +263,16 @@ export interface SkillRetrieveParams {
|
|
|
241
263
|
* Optional header to specify the beta version(s) you want to use.
|
|
242
264
|
*/
|
|
243
265
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
269
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
270
|
+
*
|
|
271
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
272
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
273
|
+
* match that Workspace.
|
|
274
|
+
*/
|
|
275
|
+
workspace_id?: string;
|
|
244
276
|
}
|
|
245
277
|
|
|
246
278
|
export interface SkillListParams extends PageCursorParams {
|
|
@@ -258,6 +290,16 @@ export interface SkillListParams extends PageCursorParams {
|
|
|
258
290
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
259
291
|
*/
|
|
260
292
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
296
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
297
|
+
*
|
|
298
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
299
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
300
|
+
* match that Workspace.
|
|
301
|
+
*/
|
|
302
|
+
workspace_id?: string;
|
|
261
303
|
}
|
|
262
304
|
|
|
263
305
|
export interface SkillDeleteParams {
|
|
@@ -265,6 +307,16 @@ export interface SkillDeleteParams {
|
|
|
265
307
|
* Optional header to specify the beta version(s) you want to use.
|
|
266
308
|
*/
|
|
267
309
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
313
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
314
|
+
*
|
|
315
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
316
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
317
|
+
* match that Workspace.
|
|
318
|
+
*/
|
|
319
|
+
workspace_id?: string;
|
|
268
320
|
}
|
|
269
321
|
|
|
270
322
|
Skills.Versions = Versions;
|