@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,12 +43,15 @@ export class Environments extends APIResource {
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
create(params: EnvironmentCreateParams, options?: RequestOptions): APIPromise<BetaEnvironment> {
|
|
46
|
-
const { betas, ...body } = params;
|
|
46
|
+
const { betas, workspace_id, ...body } = params;
|
|
47
47
|
return this._client.post('/v1/environments?beta=true', {
|
|
48
48
|
body,
|
|
49
49
|
...options,
|
|
50
50
|
headers: buildHeaders([
|
|
51
|
-
{
|
|
51
|
+
{
|
|
52
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
53
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
54
|
+
},
|
|
52
55
|
options?.headers,
|
|
53
56
|
]),
|
|
54
57
|
});
|
|
@@ -70,11 +73,14 @@ export class Environments extends APIResource {
|
|
|
70
73
|
params: EnvironmentRetrieveParams | null | undefined = {},
|
|
71
74
|
options?: RequestOptions,
|
|
72
75
|
): APIPromise<BetaEnvironment> {
|
|
73
|
-
const { betas } = params ?? {};
|
|
76
|
+
const { betas, workspace_id } = params ?? {};
|
|
74
77
|
return this._client.get(path`/v1/environments/${environmentID}?beta=true`, {
|
|
75
78
|
...options,
|
|
76
79
|
headers: buildHeaders([
|
|
77
|
-
{
|
|
80
|
+
{
|
|
81
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
82
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
83
|
+
},
|
|
78
84
|
options?.headers,
|
|
79
85
|
]),
|
|
80
86
|
});
|
|
@@ -96,12 +102,15 @@ export class Environments extends APIResource {
|
|
|
96
102
|
params: EnvironmentUpdateParams,
|
|
97
103
|
options?: RequestOptions,
|
|
98
104
|
): APIPromise<BetaEnvironment> {
|
|
99
|
-
const { betas, ...body } = params;
|
|
105
|
+
const { betas, workspace_id, ...body } = params;
|
|
100
106
|
return this._client.post(path`/v1/environments/${environmentID}?beta=true`, {
|
|
101
107
|
body,
|
|
102
108
|
...options,
|
|
103
109
|
headers: buildHeaders([
|
|
104
|
-
{
|
|
110
|
+
{
|
|
111
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
112
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
113
|
+
},
|
|
105
114
|
options?.headers,
|
|
106
115
|
]),
|
|
107
116
|
});
|
|
@@ -122,12 +131,15 @@ export class Environments extends APIResource {
|
|
|
122
131
|
params: EnvironmentListParams | null | undefined = {},
|
|
123
132
|
options?: RequestOptions,
|
|
124
133
|
): PagePromise<BetaEnvironmentsPageCursor, BetaEnvironment> {
|
|
125
|
-
const { betas, ...query } = params ?? {};
|
|
134
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
126
135
|
return this._client.getAPIList('/v1/environments?beta=true', PageCursor<BetaEnvironment>, {
|
|
127
136
|
query,
|
|
128
137
|
...options,
|
|
129
138
|
headers: buildHeaders([
|
|
130
|
-
{
|
|
139
|
+
{
|
|
140
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
141
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
142
|
+
},
|
|
131
143
|
options?.headers,
|
|
132
144
|
]),
|
|
133
145
|
});
|
|
@@ -149,11 +161,14 @@ export class Environments extends APIResource {
|
|
|
149
161
|
params: EnvironmentDeleteParams | null | undefined = {},
|
|
150
162
|
options?: RequestOptions,
|
|
151
163
|
): APIPromise<BetaEnvironmentDeleteResponse> {
|
|
152
|
-
const { betas } = params ?? {};
|
|
164
|
+
const { betas, workspace_id } = params ?? {};
|
|
153
165
|
return this._client.delete(path`/v1/environments/${environmentID}?beta=true`, {
|
|
154
166
|
...options,
|
|
155
167
|
headers: buildHeaders([
|
|
156
|
-
{
|
|
168
|
+
{
|
|
169
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
170
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
171
|
+
},
|
|
157
172
|
options?.headers,
|
|
158
173
|
]),
|
|
159
174
|
});
|
|
@@ -176,11 +191,14 @@ export class Environments extends APIResource {
|
|
|
176
191
|
params: EnvironmentArchiveParams | null | undefined = {},
|
|
177
192
|
options?: RequestOptions,
|
|
178
193
|
): APIPromise<BetaEnvironment> {
|
|
179
|
-
const { betas } = params ?? {};
|
|
194
|
+
const { betas, workspace_id } = params ?? {};
|
|
180
195
|
return this._client.post(path`/v1/environments/${environmentID}/archive?beta=true`, {
|
|
181
196
|
...options,
|
|
182
197
|
headers: buildHeaders([
|
|
183
|
-
{
|
|
198
|
+
{
|
|
199
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
200
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
201
|
+
},
|
|
184
202
|
options?.headers,
|
|
185
203
|
]),
|
|
186
204
|
});
|
|
@@ -516,6 +534,16 @@ export interface EnvironmentCreateParams {
|
|
|
516
534
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
517
535
|
*/
|
|
518
536
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
540
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
541
|
+
*
|
|
542
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
543
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
544
|
+
* match that Workspace.
|
|
545
|
+
*/
|
|
546
|
+
workspace_id?: string;
|
|
519
547
|
}
|
|
520
548
|
|
|
521
549
|
export interface EnvironmentRetrieveParams {
|
|
@@ -523,6 +551,16 @@ export interface EnvironmentRetrieveParams {
|
|
|
523
551
|
* Optional header to specify the beta version(s) you want to use.
|
|
524
552
|
*/
|
|
525
553
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
557
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
558
|
+
*
|
|
559
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
560
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
561
|
+
* match that Workspace.
|
|
562
|
+
*/
|
|
563
|
+
workspace_id?: string;
|
|
526
564
|
}
|
|
527
565
|
|
|
528
566
|
export interface EnvironmentUpdateParams {
|
|
@@ -559,6 +597,16 @@ export interface EnvironmentUpdateParams {
|
|
|
559
597
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
560
598
|
*/
|
|
561
599
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
603
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
604
|
+
*
|
|
605
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
606
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
607
|
+
* match that Workspace.
|
|
608
|
+
*/
|
|
609
|
+
workspace_id?: string;
|
|
562
610
|
}
|
|
563
611
|
|
|
564
612
|
export interface EnvironmentListParams extends PageCursorParams {
|
|
@@ -571,6 +619,16 @@ export interface EnvironmentListParams extends PageCursorParams {
|
|
|
571
619
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
572
620
|
*/
|
|
573
621
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
625
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
626
|
+
*
|
|
627
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
628
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
629
|
+
* match that Workspace.
|
|
630
|
+
*/
|
|
631
|
+
workspace_id?: string;
|
|
574
632
|
}
|
|
575
633
|
|
|
576
634
|
export interface EnvironmentDeleteParams {
|
|
@@ -578,6 +636,16 @@ export interface EnvironmentDeleteParams {
|
|
|
578
636
|
* Optional header to specify the beta version(s) you want to use.
|
|
579
637
|
*/
|
|
580
638
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
642
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
643
|
+
*
|
|
644
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
645
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
646
|
+
* match that Workspace.
|
|
647
|
+
*/
|
|
648
|
+
workspace_id?: string;
|
|
581
649
|
}
|
|
582
650
|
|
|
583
651
|
export interface EnvironmentArchiveParams {
|
|
@@ -585,6 +653,16 @@ export interface EnvironmentArchiveParams {
|
|
|
585
653
|
* Optional header to specify the beta version(s) you want to use.
|
|
586
654
|
*/
|
|
587
655
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
659
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
660
|
+
*
|
|
661
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
662
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
663
|
+
* match that Workspace.
|
|
664
|
+
*/
|
|
665
|
+
workspace_id?: string;
|
|
588
666
|
}
|
|
589
667
|
|
|
590
668
|
Environments.Work = Work;
|
|
@@ -39,11 +39,14 @@ export class Work extends APIResource {
|
|
|
39
39
|
params: WorkRetrieveParams,
|
|
40
40
|
options?: RequestOptions,
|
|
41
41
|
): APIPromise<BetaSelfHostedWork> {
|
|
42
|
-
const { environment_id, betas } = params;
|
|
42
|
+
const { environment_id, betas, workspace_id } = params;
|
|
43
43
|
return this._client.get(path`/v1/environments/${environment_id}/work/${workID}?beta=true`, {
|
|
44
44
|
...options,
|
|
45
45
|
headers: buildHeaders([
|
|
46
|
-
{
|
|
46
|
+
{
|
|
47
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
48
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
49
|
+
},
|
|
47
50
|
options?.headers,
|
|
48
51
|
]),
|
|
49
52
|
});
|
|
@@ -67,12 +70,15 @@ export class Work extends APIResource {
|
|
|
67
70
|
* ```
|
|
68
71
|
*/
|
|
69
72
|
update(workID: string, params: WorkUpdateParams, options?: RequestOptions): APIPromise<BetaSelfHostedWork> {
|
|
70
|
-
const { environment_id, betas, ...body } = params;
|
|
73
|
+
const { environment_id, betas, workspace_id, ...body } = params;
|
|
71
74
|
return this._client.post(path`/v1/environments/${environment_id}/work/${workID}?beta=true`, {
|
|
72
75
|
body,
|
|
73
76
|
...options,
|
|
74
77
|
headers: buildHeaders([
|
|
75
|
-
{
|
|
78
|
+
{
|
|
79
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
80
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
81
|
+
},
|
|
76
82
|
options?.headers,
|
|
77
83
|
]),
|
|
78
84
|
});
|
|
@@ -227,11 +233,14 @@ export class Work extends APIResource {
|
|
|
227
233
|
params: WorkStatsParams | null | undefined = {},
|
|
228
234
|
options?: RequestOptions,
|
|
229
235
|
): APIPromise<BetaSelfHostedWorkQueueStats> {
|
|
230
|
-
const { betas } = params ?? {};
|
|
236
|
+
const { betas, workspace_id } = params ?? {};
|
|
231
237
|
return this._client.get(path`/v1/environments/${environmentID}/work/stats?beta=true`, {
|
|
232
238
|
...options,
|
|
233
239
|
headers: buildHeaders([
|
|
234
|
-
{
|
|
240
|
+
{
|
|
241
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
242
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
243
|
+
},
|
|
235
244
|
options?.headers,
|
|
236
245
|
]),
|
|
237
246
|
});
|
|
@@ -254,12 +263,15 @@ export class Work extends APIResource {
|
|
|
254
263
|
* ```
|
|
255
264
|
*/
|
|
256
265
|
stop(workID: string, params: WorkStopParams, options?: RequestOptions): APIPromise<BetaSelfHostedWork> {
|
|
257
|
-
const { environment_id, betas, ...body } = params;
|
|
266
|
+
const { environment_id, betas, workspace_id, ...body } = params;
|
|
258
267
|
return this._client.post(path`/v1/environments/${environment_id}/work/${workID}/stop?beta=true`, {
|
|
259
268
|
body,
|
|
260
269
|
...options,
|
|
261
270
|
headers: buildHeaders([
|
|
262
|
-
{
|
|
271
|
+
{
|
|
272
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
273
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
274
|
+
},
|
|
263
275
|
options?.headers,
|
|
264
276
|
]),
|
|
265
277
|
});
|
|
@@ -558,6 +570,16 @@ export interface WorkRetrieveParams {
|
|
|
558
570
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
559
571
|
*/
|
|
560
572
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
576
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
577
|
+
*
|
|
578
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
579
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
580
|
+
* match that Workspace.
|
|
581
|
+
*/
|
|
582
|
+
workspace_id?: string;
|
|
561
583
|
}
|
|
562
584
|
|
|
563
585
|
export interface WorkUpdateParams {
|
|
@@ -576,6 +598,16 @@ export interface WorkUpdateParams {
|
|
|
576
598
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
577
599
|
*/
|
|
578
600
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
604
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
605
|
+
*
|
|
606
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
607
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
608
|
+
* match that Workspace.
|
|
609
|
+
*/
|
|
610
|
+
workspace_id?: string;
|
|
579
611
|
}
|
|
580
612
|
|
|
581
613
|
export interface WorkListParams extends PageCursorParams {
|
|
@@ -654,6 +686,16 @@ export interface WorkStatsParams {
|
|
|
654
686
|
* Optional header to specify the beta version(s) you want to use.
|
|
655
687
|
*/
|
|
656
688
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
692
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
693
|
+
*
|
|
694
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
695
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
696
|
+
* match that Workspace.
|
|
697
|
+
*/
|
|
698
|
+
workspace_id?: string;
|
|
657
699
|
}
|
|
658
700
|
|
|
659
701
|
export interface WorkStopParams {
|
|
@@ -671,6 +713,16 @@ export interface WorkStopParams {
|
|
|
671
713
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
672
714
|
*/
|
|
673
715
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
719
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
720
|
+
*
|
|
721
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
722
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
723
|
+
* match that Workspace.
|
|
724
|
+
*/
|
|
725
|
+
workspace_id?: string;
|
|
674
726
|
}
|
|
675
727
|
|
|
676
728
|
export { WorkPoller, type WorkPollerOptions } from '../../../lib/environments/poller';
|
|
@@ -27,12 +27,15 @@ export class Files extends APIResource {
|
|
|
27
27
|
params: FileListParams | null | undefined = {},
|
|
28
28
|
options?: RequestOptions,
|
|
29
29
|
): PagePromise<BetaFileMetadataPageCursor, BetaFileMetadata> {
|
|
30
|
-
const { betas, ...query } = params ?? {};
|
|
30
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
31
31
|
return this._client.getAPIList('/v1/files?beta=true', PageCursor<BetaFileMetadata>, {
|
|
32
32
|
query,
|
|
33
33
|
...options,
|
|
34
34
|
headers: buildHeaders([
|
|
35
|
-
{
|
|
35
|
+
{
|
|
36
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
37
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
38
|
+
},
|
|
36
39
|
options?.headers,
|
|
37
40
|
]),
|
|
38
41
|
});
|
|
@@ -53,11 +56,14 @@ export class Files extends APIResource {
|
|
|
53
56
|
params: FileDeleteParams | null | undefined = {},
|
|
54
57
|
options?: RequestOptions,
|
|
55
58
|
): APIPromise<BetaDeletedFile> {
|
|
56
|
-
const { betas } = params ?? {};
|
|
59
|
+
const { betas, workspace_id } = params ?? {};
|
|
57
60
|
return this._client.delete(path`/v1/files/${fileID}?beta=true`, {
|
|
58
61
|
...options,
|
|
59
62
|
headers: buildHeaders([
|
|
60
|
-
{
|
|
63
|
+
{
|
|
64
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
65
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
66
|
+
},
|
|
61
67
|
options?.headers,
|
|
62
68
|
]),
|
|
63
69
|
});
|
|
@@ -81,13 +87,14 @@ export class Files extends APIResource {
|
|
|
81
87
|
params: FileDownloadParams | null | undefined = {},
|
|
82
88
|
options?: RequestOptions,
|
|
83
89
|
): APIPromise<Response> {
|
|
84
|
-
const { betas } = params ?? {};
|
|
90
|
+
const { betas, workspace_id } = params ?? {};
|
|
85
91
|
return this._client.get(path`/v1/files/${fileID}/content?beta=true`, {
|
|
86
92
|
...options,
|
|
87
93
|
headers: buildHeaders([
|
|
88
94
|
{
|
|
89
95
|
Accept: 'application/binary',
|
|
90
96
|
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
97
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
91
98
|
},
|
|
92
99
|
options?.headers,
|
|
93
100
|
]),
|
|
@@ -109,11 +116,14 @@ export class Files extends APIResource {
|
|
|
109
116
|
params: FileRetrieveMetadataParams | null | undefined = {},
|
|
110
117
|
options?: RequestOptions,
|
|
111
118
|
): APIPromise<BetaFileMetadata> {
|
|
112
|
-
const { betas } = params ?? {};
|
|
119
|
+
const { betas, workspace_id } = params ?? {};
|
|
113
120
|
return this._client.get(path`/v1/files/${fileID}?beta=true`, {
|
|
114
121
|
...options,
|
|
115
122
|
headers: buildHeaders([
|
|
116
|
-
{
|
|
123
|
+
{
|
|
124
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
125
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
126
|
+
},
|
|
117
127
|
options?.headers,
|
|
118
128
|
]),
|
|
119
129
|
});
|
|
@@ -130,8 +140,7 @@ export class Files extends APIResource {
|
|
|
130
140
|
* ```
|
|
131
141
|
*/
|
|
132
142
|
upload(params: FileUploadParams, options?: RequestOptions): APIPromise<BetaFileMetadata> {
|
|
133
|
-
const { betas, ...body } = params;
|
|
134
|
-
|
|
143
|
+
const { betas, workspace_id, ...body } = params;
|
|
135
144
|
return this._client.post(
|
|
136
145
|
'/v1/files?beta=true',
|
|
137
146
|
multipartFormRequestOptions(
|
|
@@ -139,7 +148,10 @@ export class Files extends APIResource {
|
|
|
139
148
|
body,
|
|
140
149
|
...options,
|
|
141
150
|
headers: buildHeaders([
|
|
142
|
-
{
|
|
151
|
+
{
|
|
152
|
+
...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined),
|
|
153
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
154
|
+
},
|
|
143
155
|
stainlessHelperHeaderFromFile(body.file),
|
|
144
156
|
options?.headers,
|
|
145
157
|
]),
|
|
@@ -252,6 +264,16 @@ export interface FileListParams extends PageCursorParams {
|
|
|
252
264
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
253
265
|
*/
|
|
254
266
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
270
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
271
|
+
*
|
|
272
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
273
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
274
|
+
* match that Workspace.
|
|
275
|
+
*/
|
|
276
|
+
workspace_id?: string;
|
|
255
277
|
}
|
|
256
278
|
|
|
257
279
|
export interface FileDeleteParams {
|
|
@@ -259,6 +281,16 @@ export interface FileDeleteParams {
|
|
|
259
281
|
* Optional header to specify the beta version(s) you want to use.
|
|
260
282
|
*/
|
|
261
283
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
287
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
288
|
+
*
|
|
289
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
290
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
291
|
+
* match that Workspace.
|
|
292
|
+
*/
|
|
293
|
+
workspace_id?: string;
|
|
262
294
|
}
|
|
263
295
|
|
|
264
296
|
export interface FileDownloadParams {
|
|
@@ -266,6 +298,16 @@ export interface FileDownloadParams {
|
|
|
266
298
|
* Optional header to specify the beta version(s) you want to use.
|
|
267
299
|
*/
|
|
268
300
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
304
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
305
|
+
*
|
|
306
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
307
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
308
|
+
* match that Workspace.
|
|
309
|
+
*/
|
|
310
|
+
workspace_id?: string;
|
|
269
311
|
}
|
|
270
312
|
|
|
271
313
|
export interface FileRetrieveMetadataParams {
|
|
@@ -273,11 +315,23 @@ export interface FileRetrieveMetadataParams {
|
|
|
273
315
|
* Optional header to specify the beta version(s) you want to use.
|
|
274
316
|
*/
|
|
275
317
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
321
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
322
|
+
*
|
|
323
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
324
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
325
|
+
* match that Workspace.
|
|
326
|
+
*/
|
|
327
|
+
workspace_id?: string;
|
|
276
328
|
}
|
|
277
329
|
|
|
278
330
|
export interface FileUploadParams {
|
|
279
331
|
/**
|
|
280
|
-
* Body param: The file to upload
|
|
332
|
+
* Body param: The file to upload. Only the final path component of the part's
|
|
333
|
+
* `filename` is kept; an absent or empty `filename` is replaced with `unnamed`
|
|
334
|
+
* plus the extension for the file's stored `mime_type`, when known.
|
|
281
335
|
*/
|
|
282
336
|
file: Uploadable;
|
|
283
337
|
|
|
@@ -292,6 +346,16 @@ export interface FileUploadParams {
|
|
|
292
346
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
293
347
|
*/
|
|
294
348
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
352
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
353
|
+
*
|
|
354
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
355
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
356
|
+
* match that Workspace.
|
|
357
|
+
*/
|
|
358
|
+
workspace_id?: string;
|
|
295
359
|
}
|
|
296
360
|
|
|
297
361
|
export declare namespace Files {
|
|
@@ -173,9 +173,11 @@ export {
|
|
|
173
173
|
type BetaDreamSessionsInput,
|
|
174
174
|
type BetaDreamStatus,
|
|
175
175
|
type BetaDreamUsage,
|
|
176
|
+
type BetaDreamingError,
|
|
176
177
|
type BetaOutputBehavior,
|
|
177
178
|
type BetaOutputBehaviorCreateNew,
|
|
178
179
|
type BetaOutputBehaviorUpdateExisting,
|
|
180
|
+
type BetaTargetStoreHeldError,
|
|
179
181
|
type DreamCreateParams,
|
|
180
182
|
type DreamRetrieveParams,
|
|
181
183
|
type DreamListParams,
|
|
@@ -443,6 +445,7 @@ export {
|
|
|
443
445
|
type BetaSignatureDelta,
|
|
444
446
|
type BetaSkillParams,
|
|
445
447
|
type BetaStopReason,
|
|
448
|
+
type BetaSystemMessageOutputConfig,
|
|
446
449
|
type BetaTextBlock,
|
|
447
450
|
type BetaTextBlockParam,
|
|
448
451
|
type BetaTextCitation,
|
|
@@ -459,12 +462,15 @@ export {
|
|
|
459
462
|
type BetaTextEditorCodeExecutionViewResultBlock,
|
|
460
463
|
type BetaTextEditorCodeExecutionViewResultBlockParam,
|
|
461
464
|
type BetaThinkingBlock,
|
|
465
|
+
type BetaThinkingBlockBinding,
|
|
462
466
|
type BetaThinkingBlockParam,
|
|
463
467
|
type BetaThinkingConfigAdaptive,
|
|
464
468
|
type BetaThinkingConfigDisabled,
|
|
465
469
|
type BetaThinkingConfigEnabled,
|
|
466
470
|
type BetaThinkingConfigParam,
|
|
467
471
|
type BetaThinkingDelta,
|
|
472
|
+
type BetaThinkingDroppedInputTransformation,
|
|
473
|
+
type BetaThinkingPrefixMismatchBehavior,
|
|
468
474
|
type BetaThinkingTurns,
|
|
469
475
|
type BetaTokenTaskBudget,
|
|
470
476
|
type BetaTool,
|