@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
|
@@ -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 {
|
|
@@ -232,6 +232,7 @@ export {
|
|
|
232
232
|
type BetaSignatureDelta,
|
|
233
233
|
type BetaSkillParams,
|
|
234
234
|
type BetaStopReason,
|
|
235
|
+
type BetaSystemMessageOutputConfig,
|
|
235
236
|
type BetaTextBlock,
|
|
236
237
|
type BetaTextBlockParam,
|
|
237
238
|
type BetaTextCitation,
|
|
@@ -248,12 +249,15 @@ export {
|
|
|
248
249
|
type BetaTextEditorCodeExecutionViewResultBlock,
|
|
249
250
|
type BetaTextEditorCodeExecutionViewResultBlockParam,
|
|
250
251
|
type BetaThinkingBlock,
|
|
252
|
+
type BetaThinkingBlockBinding,
|
|
251
253
|
type BetaThinkingBlockParam,
|
|
252
254
|
type BetaThinkingConfigAdaptive,
|
|
253
255
|
type BetaThinkingConfigDisabled,
|
|
254
256
|
type BetaThinkingConfigEnabled,
|
|
255
257
|
type BetaThinkingConfigParam,
|
|
256
258
|
type BetaThinkingDelta,
|
|
259
|
+
type BetaThinkingDroppedInputTransformation,
|
|
260
|
+
type BetaThinkingPrefixMismatchBehavior,
|
|
257
261
|
type BetaThinkingTurns,
|
|
258
262
|
type BetaTokenTaskBudget,
|
|
259
263
|
type BetaTool,
|
|
@@ -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
|
]),
|
|
@@ -1221,10 +1223,6 @@ export interface BetaBrowserSwitchTabConfig {
|
|
|
1221
1223
|
export interface BetaBrowserToolset20260801 {
|
|
1222
1224
|
type: 'browser_toolset_20260801';
|
|
1223
1225
|
|
|
1224
|
-
allowed_callers?: Array<
|
|
1225
|
-
'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'
|
|
1226
|
-
>;
|
|
1227
|
-
|
|
1228
1226
|
/**
|
|
1229
1227
|
* Create a cache control breakpoint at this content block.
|
|
1230
1228
|
*/
|
|
@@ -2472,10 +2470,6 @@ export interface BetaComputerScrollConfig {
|
|
|
2472
2470
|
export interface BetaComputerToolset20260801 {
|
|
2473
2471
|
type: 'computer_toolset_20260801';
|
|
2474
2472
|
|
|
2475
|
-
allowed_callers?: Array<
|
|
2476
|
-
'direct' | 'code_execution_20250825' | 'code_execution_20260120' | 'code_execution_20260521'
|
|
2477
|
-
>;
|
|
2478
|
-
|
|
2479
2473
|
/**
|
|
2480
2474
|
* Create a cache control breakpoint at this content block.
|
|
2481
2475
|
*/
|
|
@@ -3692,6 +3686,25 @@ export interface BetaMessage {
|
|
|
3692
3686
|
* `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
|
3693
3687
|
*/
|
|
3694
3688
|
usage: BetaUsage;
|
|
3689
|
+
|
|
3690
|
+
/**
|
|
3691
|
+
* Changes the API made to the request's input before showing it to the model: one
|
|
3692
|
+
* entry per change, in request order. Today the only entry type is
|
|
3693
|
+
* `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text` block
|
|
3694
|
+
* from the request's `messages` that was removed from the prompt instead of being
|
|
3695
|
+
* shown to the model because it failed a binding check. More entry types may be
|
|
3696
|
+
* added over time; ignore types you do not recognize.
|
|
3697
|
+
*
|
|
3698
|
+
* Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
|
|
3699
|
+
* every such response from a model that supports extended thinking, as `[]` when
|
|
3700
|
+
* nothing was changed; without the beta, blocks are removed all the same but
|
|
3701
|
+
* nothing is reported. Removed blocks contribute nothing to `usage.input_tokens`.
|
|
3702
|
+
* When streaming, the array is final in `message_start`; the final `message_delta`
|
|
3703
|
+
* event carries it only when a server-side model fallback happened mid-stream, in
|
|
3704
|
+
* which case it holds the serving model's entries and replaces the one in
|
|
3705
|
+
* `message_start`.
|
|
3706
|
+
*/
|
|
3707
|
+
input_transformations?: Array<BetaThinkingDroppedInputTransformation> | null;
|
|
3695
3708
|
}
|
|
3696
3709
|
|
|
3697
3710
|
export interface BetaMessageDeltaUsage {
|
|
@@ -3809,6 +3822,25 @@ export interface BetaMessageParam {
|
|
|
3809
3822
|
content: string | Array<BetaContentBlockParam>;
|
|
3810
3823
|
|
|
3811
3824
|
role: 'user' | 'assistant' | 'system';
|
|
3825
|
+
|
|
3826
|
+
/**
|
|
3827
|
+
* How long this system message's text stays in front of the model. `"never"` (the
|
|
3828
|
+
* default) renders it on every request that includes it. `"next_user_message"`
|
|
3829
|
+
* renders it only for the user turn it follows: once a later `role: "user"`
|
|
3830
|
+
* message exists in `messages` the message stays in the array (send it unchanged)
|
|
3831
|
+
* but is no longer shown to the model. Only permitted on `role: "system"`
|
|
3832
|
+
* messages.
|
|
3833
|
+
*/
|
|
3834
|
+
clear_at?: 'next_user_message' | 'never' | null;
|
|
3835
|
+
|
|
3836
|
+
/**
|
|
3837
|
+
* Per-message output configuration on a role:"system" input message.
|
|
3838
|
+
*
|
|
3839
|
+
* Fields here apply per-turn; `format` remains top-level only. An empty `{}` is
|
|
3840
|
+
* accepted on a message that carries content; a message with neither content nor
|
|
3841
|
+
* output_config fields is rejected.
|
|
3842
|
+
*/
|
|
3843
|
+
output_config?: BetaSystemMessageOutputConfig | null;
|
|
3812
3844
|
}
|
|
3813
3845
|
|
|
3814
3846
|
export interface BetaMessageTokensCount {
|
|
@@ -3953,6 +3985,25 @@ export interface BetaRawMessageDeltaEvent {
|
|
|
3953
3985
|
* `cache_creation_input_tokens`, and `cache_read_input_tokens`.
|
|
3954
3986
|
*/
|
|
3955
3987
|
usage: BetaMessageDeltaUsage;
|
|
3988
|
+
|
|
3989
|
+
/**
|
|
3990
|
+
* Changes the API made to the request's input before showing it to the model: one
|
|
3991
|
+
* entry per change, in request order. Today the only entry type is
|
|
3992
|
+
* `thinking_dropped` — a `thinking`, `redacted_thinking` or `connector_text` block
|
|
3993
|
+
* from the request's `messages` that was removed from the prompt instead of being
|
|
3994
|
+
* shown to the model because it failed a binding check. More entry types may be
|
|
3995
|
+
* added over time; ignore types you do not recognize.
|
|
3996
|
+
*
|
|
3997
|
+
* Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on
|
|
3998
|
+
* every such response from a model that supports extended thinking, as `[]` when
|
|
3999
|
+
* nothing was changed; without the beta, blocks are removed all the same but
|
|
4000
|
+
* nothing is reported. Removed blocks contribute nothing to `usage.input_tokens`.
|
|
4001
|
+
* When streaming, the array is final in `message_start`; the final `message_delta`
|
|
4002
|
+
* event carries it only when a server-side model fallback happened mid-stream, in
|
|
4003
|
+
* which case it holds the serving model's entries and replaces the one in
|
|
4004
|
+
* `message_start`.
|
|
4005
|
+
*/
|
|
4006
|
+
input_transformations?: Array<BetaThinkingDroppedInputTransformation> | null;
|
|
3956
4007
|
}
|
|
3957
4008
|
|
|
3958
4009
|
export namespace BetaRawMessageDeltaEvent {
|
|
@@ -4343,6 +4394,20 @@ export type BetaStopReason =
|
|
|
4343
4394
|
| 'refusal'
|
|
4344
4395
|
| 'model_context_window_exceeded';
|
|
4345
4396
|
|
|
4397
|
+
/**
|
|
4398
|
+
* Per-message output configuration on a role:"system" input message.
|
|
4399
|
+
*
|
|
4400
|
+
* Fields here apply per-turn; `format` remains top-level only. An empty `{}` is
|
|
4401
|
+
* accepted on a message that carries content; a message with neither content nor
|
|
4402
|
+
* output_config fields is rejected.
|
|
4403
|
+
*/
|
|
4404
|
+
export interface BetaSystemMessageOutputConfig {
|
|
4405
|
+
/**
|
|
4406
|
+
* All possible effort levels.
|
|
4407
|
+
*/
|
|
4408
|
+
effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | null;
|
|
4409
|
+
}
|
|
4410
|
+
|
|
4346
4411
|
export interface BetaTextBlock {
|
|
4347
4412
|
/**
|
|
4348
4413
|
* Citations supporting the text block.
|
|
@@ -4537,6 +4602,22 @@ export interface BetaThinkingBlock {
|
|
|
4537
4602
|
type: 'thinking';
|
|
4538
4603
|
}
|
|
4539
4604
|
|
|
4605
|
+
/**
|
|
4606
|
+
* Controls for block binding: what happens when a thinking block this request
|
|
4607
|
+
* sends back fails the conversation check. Every field is optional; an empty
|
|
4608
|
+
* object means every default.
|
|
4609
|
+
*/
|
|
4610
|
+
export interface BetaThinkingBlockBinding {
|
|
4611
|
+
/**
|
|
4612
|
+
* What happens when a thinking block in `messages` fails the conversation check:
|
|
4613
|
+
* it was created in a different conversation, or the messages before it have
|
|
4614
|
+
* changed since. `"error"` (the default) fails the request with a 400 error.
|
|
4615
|
+
* `"drop_block"` removes the failing blocks and the request proceeds; the model no
|
|
4616
|
+
* longer sees the dropped reasoning.
|
|
4617
|
+
*/
|
|
4618
|
+
prefix_mismatch_behavior?: BetaThinkingPrefixMismatchBehavior | null;
|
|
4619
|
+
}
|
|
4620
|
+
|
|
4540
4621
|
export interface BetaThinkingBlockParam {
|
|
4541
4622
|
/**
|
|
4542
4623
|
* The `signature` value of this thinking block, exactly as returned by the API in
|
|
@@ -4558,6 +4639,13 @@ export interface BetaThinkingBlockParam {
|
|
|
4558
4639
|
export interface BetaThinkingConfigAdaptive {
|
|
4559
4640
|
type: 'adaptive';
|
|
4560
4641
|
|
|
4642
|
+
/**
|
|
4643
|
+
* Controls for block binding: what happens when a thinking block this request
|
|
4644
|
+
* sends back fails the conversation check. Every field is optional; an empty
|
|
4645
|
+
* object means every default.
|
|
4646
|
+
*/
|
|
4647
|
+
block_binding?: BetaThinkingBlockBinding | null;
|
|
4648
|
+
|
|
4561
4649
|
/**
|
|
4562
4650
|
* Controls how thinking content appears in the response. When set to `summarized`,
|
|
4563
4651
|
* thinking is returned normally. When set to `omitted`, thinking content is
|
|
@@ -4587,6 +4675,13 @@ export interface BetaThinkingConfigEnabled {
|
|
|
4587
4675
|
|
|
4588
4676
|
type: 'enabled';
|
|
4589
4677
|
|
|
4678
|
+
/**
|
|
4679
|
+
* Controls for block binding: what happens when a thinking block this request
|
|
4680
|
+
* sends back fails the conversation check. Every field is optional; an empty
|
|
4681
|
+
* object means every default.
|
|
4682
|
+
*/
|
|
4683
|
+
block_binding?: BetaThinkingBlockBinding | null;
|
|
4684
|
+
|
|
4590
4685
|
/**
|
|
4591
4686
|
* Controls how thinking content appears in the response. When set to `summarized`,
|
|
4592
4687
|
* thinking is returned normally. When set to `omitted`, thinking content is
|
|
@@ -4635,6 +4730,50 @@ export interface BetaThinkingDelta {
|
|
|
4635
4730
|
type: 'thinking_delta';
|
|
4636
4731
|
}
|
|
4637
4732
|
|
|
4733
|
+
export interface BetaThinkingDroppedInputTransformation {
|
|
4734
|
+
/**
|
|
4735
|
+
* Where the removed block was in your request, as `messages.{i}.content.{j}`: `i`
|
|
4736
|
+
* indexes the `messages` array you sent and `j` that message's `content` array —
|
|
4737
|
+
* the same form error messages use.
|
|
4738
|
+
*/
|
|
4739
|
+
path: string;
|
|
4740
|
+
|
|
4741
|
+
/**
|
|
4742
|
+
* Which binding check removed the block: `model_binding_mismatch` — it was created
|
|
4743
|
+
* by a model whose reasoning the requested model may not read;
|
|
4744
|
+
* `prefix_binding_mismatch` — the conversation before it differs from the
|
|
4745
|
+
* conversation it was created in (the rest of that turn's consecutive thinking
|
|
4746
|
+
* blocks are removed with it, each with this reason);
|
|
4747
|
+
* `organization_binding_mismatch` — it was created under a different organization
|
|
4748
|
+
* (an Anthropic organization, AWS account or Google Cloud project) and this
|
|
4749
|
+
* organization is not one of its additional organizations;
|
|
4750
|
+
* `end_user_binding_mismatch` — it was created for a different end user, or was
|
|
4751
|
+
* removed by the consumer-organization binding. A block that would fail several
|
|
4752
|
+
* checks reports one reason, in this order of precedence:
|
|
4753
|
+
* `organization_binding_mismatch`, `end_user_binding_mismatch`,
|
|
4754
|
+
* `model_binding_mismatch`, `prefix_binding_mismatch`.
|
|
4755
|
+
*/
|
|
4756
|
+
reason:
|
|
4757
|
+
| 'model_binding_mismatch'
|
|
4758
|
+
| 'prefix_binding_mismatch'
|
|
4759
|
+
| 'organization_binding_mismatch'
|
|
4760
|
+
| 'end_user_binding_mismatch';
|
|
4761
|
+
|
|
4762
|
+
/**
|
|
4763
|
+
* Always `thinking_dropped` for this entry type.
|
|
4764
|
+
*/
|
|
4765
|
+
type: 'thinking_dropped';
|
|
4766
|
+
}
|
|
4767
|
+
|
|
4768
|
+
/**
|
|
4769
|
+
* What happens when a thinking block in `messages` fails the conversation check:
|
|
4770
|
+
* it was created in a different conversation, or the messages before it have
|
|
4771
|
+
* changed since. `"error"` (the default) fails the request with a 400 error.
|
|
4772
|
+
* `"drop_block"` removes the failing blocks and the request proceeds; the model no
|
|
4773
|
+
* longer sees the dropped reasoning.
|
|
4774
|
+
*/
|
|
4775
|
+
export type BetaThinkingPrefixMismatchBehavior = 'error' | 'drop_block';
|
|
4776
|
+
|
|
4638
4777
|
export interface BetaThinkingTurns {
|
|
4639
4778
|
type: 'thinking_turns';
|
|
4640
4779
|
|
|
@@ -6537,6 +6676,16 @@ export interface MessageCreateParamsBase {
|
|
|
6537
6676
|
* beta header.
|
|
6538
6677
|
*/
|
|
6539
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;
|
|
6540
6689
|
}
|
|
6541
6690
|
|
|
6542
6691
|
export namespace MessageCreateParams {
|
|
@@ -6835,6 +6984,16 @@ export interface MessageCountTokensParams {
|
|
|
6835
6984
|
* beta header.
|
|
6836
6985
|
*/
|
|
6837
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;
|
|
6838
6997
|
}
|
|
6839
6998
|
|
|
6840
6999
|
export { BetaToolRunner, type BetaToolRunnerParams } from '../../../lib/tools/BetaToolRunner';
|
|
@@ -7060,6 +7219,7 @@ export declare namespace Messages {
|
|
|
7060
7219
|
type BetaSignatureDelta as BetaSignatureDelta,
|
|
7061
7220
|
type BetaSkillParams as BetaSkillParams,
|
|
7062
7221
|
type BetaStopReason as BetaStopReason,
|
|
7222
|
+
type BetaSystemMessageOutputConfig as BetaSystemMessageOutputConfig,
|
|
7063
7223
|
type BetaTextBlock as BetaTextBlock,
|
|
7064
7224
|
type BetaTextBlockParam as BetaTextBlockParam,
|
|
7065
7225
|
type BetaTextCitation as BetaTextCitation,
|
|
@@ -7076,12 +7236,15 @@ export declare namespace Messages {
|
|
|
7076
7236
|
type BetaTextEditorCodeExecutionViewResultBlock as BetaTextEditorCodeExecutionViewResultBlock,
|
|
7077
7237
|
type BetaTextEditorCodeExecutionViewResultBlockParam as BetaTextEditorCodeExecutionViewResultBlockParam,
|
|
7078
7238
|
type BetaThinkingBlock as BetaThinkingBlock,
|
|
7239
|
+
type BetaThinkingBlockBinding as BetaThinkingBlockBinding,
|
|
7079
7240
|
type BetaThinkingBlockParam as BetaThinkingBlockParam,
|
|
7080
7241
|
type BetaThinkingConfigAdaptive as BetaThinkingConfigAdaptive,
|
|
7081
7242
|
type BetaThinkingConfigDisabled as BetaThinkingConfigDisabled,
|
|
7082
7243
|
type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled,
|
|
7083
7244
|
type BetaThinkingConfigParam as BetaThinkingConfigParam,
|
|
7084
7245
|
type BetaThinkingDelta as BetaThinkingDelta,
|
|
7246
|
+
type BetaThinkingDroppedInputTransformation as BetaThinkingDroppedInputTransformation,
|
|
7247
|
+
type BetaThinkingPrefixMismatchBehavior as BetaThinkingPrefixMismatchBehavior,
|
|
7085
7248
|
type BetaThinkingTurns as BetaThinkingTurns,
|
|
7086
7249
|
type BetaTokenTaskBudget as BetaTokenTaskBudget,
|
|
7087
7250
|
type BetaTool as BetaTool,
|
|
@@ -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 {
|