@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
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class ComplianceSettings extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Retrieve your organization's Compliance Settings.
|
|
10
|
+
*
|
|
11
|
+
* Compliance Settings is a singleton resource: there is exactly one per
|
|
12
|
+
* organization, addressed without an identifier. The `state` field reflects
|
|
13
|
+
* whether the Compliance API is enabled. An organization with a parent
|
|
14
|
+
* organization reads the state inherited from the parent's configuration.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const betaComplianceSettings =
|
|
19
|
+
* await client.beta.organization.complianceSettings.retrieve();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
retrieve(options?: RequestOptions): APIPromise<BetaComplianceSettings> {
|
|
23
|
+
return this._client.get('/v1/organizations/compliance_settings?beta=true', options);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Update your organization's Compliance Settings.
|
|
28
|
+
*
|
|
29
|
+
* Setting `state` to `enabled` turns on the Compliance API and begins capturing
|
|
30
|
+
* organization activity events. Setting it to `disabled` turns both off. `state`
|
|
31
|
+
* reflects whether the Compliance API is enabled.
|
|
32
|
+
*
|
|
33
|
+
* A request that sets `state` to its current value succeeds and leaves the
|
|
34
|
+
* resource unchanged. A `disabled` request stays in effect until a later `enabled`
|
|
35
|
+
* request or the organization's next provisioning action that enables Access
|
|
36
|
+
* Transparency: enabling Access Transparency also enables the Compliance API,
|
|
37
|
+
* which serves its activity events, so such provisioning (including re-runs)
|
|
38
|
+
* re-enables the Compliance API even after a `disabled` request. Automated
|
|
39
|
+
* provisioning never disables compliance settings.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const betaComplianceSettings =
|
|
44
|
+
* await client.beta.organization.complianceSettings.update({
|
|
45
|
+
* state: { type: 'enabled' },
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
update(body: ComplianceSettingUpdateParams, options?: RequestOptions): APIPromise<BetaComplianceSettings> {
|
|
50
|
+
return this._client.post('/v1/organizations/compliance_settings?beta=true', { body, ...options });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface BetaComplianceSettings {
|
|
55
|
+
/**
|
|
56
|
+
* Whether the Compliance API is enabled for this organization.
|
|
57
|
+
*/
|
|
58
|
+
state: BetaComplianceSettingsState;
|
|
59
|
+
|
|
60
|
+
type: 'compliance_settings';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type BetaComplianceSettingsState =
|
|
64
|
+
| BetaComplianceSettingsStateEnabled
|
|
65
|
+
| BetaComplianceSettingsStateDisabled;
|
|
66
|
+
|
|
67
|
+
export interface BetaComplianceSettingsStateDisabled {
|
|
68
|
+
type: 'disabled';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface BetaComplianceSettingsStateDisabledParam {
|
|
72
|
+
type: 'disabled';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface BetaComplianceSettingsStateEnabled {
|
|
76
|
+
type: 'enabled';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface BetaComplianceSettingsStateEnabledParam {
|
|
80
|
+
type: 'enabled';
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type BetaComplianceSettingsStateParam =
|
|
84
|
+
| BetaComplianceSettingsStateEnabledParam
|
|
85
|
+
| BetaComplianceSettingsStateDisabledParam;
|
|
86
|
+
|
|
87
|
+
export interface ComplianceSettingUpdateParams {
|
|
88
|
+
/**
|
|
89
|
+
* Desired state. Accepts the string shorthand "enabled" or "disabled" in place of
|
|
90
|
+
* the object form; the response always returns the canonical object form.
|
|
91
|
+
*/
|
|
92
|
+
state: BetaComplianceSettingsStateParam;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare namespace ComplianceSettings {
|
|
96
|
+
export {
|
|
97
|
+
type BetaComplianceSettings as BetaComplianceSettings,
|
|
98
|
+
type BetaComplianceSettingsState as BetaComplianceSettingsState,
|
|
99
|
+
type BetaComplianceSettingsStateDisabled as BetaComplianceSettingsStateDisabled,
|
|
100
|
+
type BetaComplianceSettingsStateDisabledParam as BetaComplianceSettingsStateDisabledParam,
|
|
101
|
+
type BetaComplianceSettingsStateEnabled as BetaComplianceSettingsStateEnabled,
|
|
102
|
+
type BetaComplianceSettingsStateEnabledParam as BetaComplianceSettingsStateEnabledParam,
|
|
103
|
+
type BetaComplianceSettingsStateParam as BetaComplianceSettingsStateParam,
|
|
104
|
+
type ComplianceSettingUpdateParams as ComplianceSettingUpdateParams,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
@@ -136,7 +136,9 @@ export type BetaExternalKeysPageCursor = PageCursor<BetaExternalKey>;
|
|
|
136
136
|
|
|
137
137
|
export interface BetaAWSExternalKeyConfig {
|
|
138
138
|
/**
|
|
139
|
-
* Full ARN of the AWS KMS key.
|
|
139
|
+
* Full ARN of the AWS KMS key. On Claude Platform on AWS the key must be a
|
|
140
|
+
* single-Region key in your organization's own AWS account; cross-account keys,
|
|
141
|
+
* multi-Region keys, and alias ARNs are rejected.
|
|
140
142
|
*/
|
|
141
143
|
kms_arn: string;
|
|
142
144
|
|
|
@@ -148,8 +150,9 @@ export interface BetaAWSExternalKeyConfig {
|
|
|
148
150
|
region?: string | null;
|
|
149
151
|
|
|
150
152
|
/**
|
|
151
|
-
* @deprecated IAM role ARN. Deprecated — Anthropic reaches the KMS key
|
|
152
|
-
*
|
|
153
|
+
* @deprecated IAM role ARN. Deprecated — Anthropic reaches the KMS key through its
|
|
154
|
+
* own intermediate role (or, on Claude Platform on AWS, with credentials AWS
|
|
155
|
+
* issues for the Workspace); this field is ignored.
|
|
153
156
|
*/
|
|
154
157
|
role_arn?: string | null;
|
|
155
158
|
}
|
|
@@ -12,6 +12,17 @@ export {
|
|
|
12
12
|
type APIKeyListParams,
|
|
13
13
|
type BetaAPIKeysPage,
|
|
14
14
|
} from './api-keys';
|
|
15
|
+
export {
|
|
16
|
+
ComplianceSettings,
|
|
17
|
+
type BetaComplianceSettings,
|
|
18
|
+
type BetaComplianceSettingsState,
|
|
19
|
+
type BetaComplianceSettingsStateDisabled,
|
|
20
|
+
type BetaComplianceSettingsStateDisabledParam,
|
|
21
|
+
type BetaComplianceSettingsStateEnabled,
|
|
22
|
+
type BetaComplianceSettingsStateEnabledParam,
|
|
23
|
+
type BetaComplianceSettingsStateParam,
|
|
24
|
+
type ComplianceSettingUpdateParams,
|
|
25
|
+
} from './compliance-settings';
|
|
15
26
|
export {
|
|
16
27
|
ExternalKeys,
|
|
17
28
|
type BetaAWSExternalKeyConfig,
|
|
@@ -14,6 +14,18 @@ import {
|
|
|
14
14
|
BetaAPIKeyWorkspaceScope,
|
|
15
15
|
BetaAPIKeysPage,
|
|
16
16
|
} from './api-keys';
|
|
17
|
+
import * as ComplianceSettingsAPI from './compliance-settings';
|
|
18
|
+
import {
|
|
19
|
+
BetaComplianceSettings,
|
|
20
|
+
BetaComplianceSettingsState,
|
|
21
|
+
BetaComplianceSettingsStateDisabled,
|
|
22
|
+
BetaComplianceSettingsStateDisabledParam,
|
|
23
|
+
BetaComplianceSettingsStateEnabled,
|
|
24
|
+
BetaComplianceSettingsStateEnabledParam,
|
|
25
|
+
BetaComplianceSettingsStateParam,
|
|
26
|
+
ComplianceSettingUpdateParams,
|
|
27
|
+
ComplianceSettings,
|
|
28
|
+
} from './compliance-settings';
|
|
17
29
|
import * as ExternalKeysAPI from './external-keys';
|
|
18
30
|
import {
|
|
19
31
|
BetaAWSExternalKeyConfig,
|
|
@@ -99,6 +111,9 @@ export class Organization extends APIResource {
|
|
|
99
111
|
users: UsersAPI.Users = new UsersAPI.Users(this._client);
|
|
100
112
|
workspaces: WorkspacesAPI.Workspaces = new WorkspacesAPI.Workspaces(this._client);
|
|
101
113
|
rateLimits: RateLimitsAPI.RateLimits = new RateLimitsAPI.RateLimits(this._client);
|
|
114
|
+
complianceSettings: ComplianceSettingsAPI.ComplianceSettings = new ComplianceSettingsAPI.ComplianceSettings(
|
|
115
|
+
this._client,
|
|
116
|
+
);
|
|
102
117
|
|
|
103
118
|
/**
|
|
104
119
|
* Retrieve information about the organization associated with the authenticated
|
|
@@ -153,6 +168,7 @@ Organization.ServiceAccounts = ServiceAccounts;
|
|
|
153
168
|
Organization.Users = Users;
|
|
154
169
|
Organization.Workspaces = Workspaces;
|
|
155
170
|
Organization.RateLimits = RateLimits;
|
|
171
|
+
Organization.ComplianceSettings = ComplianceSettings;
|
|
156
172
|
|
|
157
173
|
export declare namespace Organization {
|
|
158
174
|
export { type BetaOrganization as BetaOrganization, type BetaOrganizationRole as BetaOrganizationRole };
|
|
@@ -242,4 +258,16 @@ export declare namespace Organization {
|
|
|
242
258
|
type BetaOrganizationRateLimitsPageCursor as BetaOrganizationRateLimitsPageCursor,
|
|
243
259
|
type RateLimitListParams as RateLimitListParams,
|
|
244
260
|
};
|
|
261
|
+
|
|
262
|
+
export {
|
|
263
|
+
ComplianceSettings as ComplianceSettings,
|
|
264
|
+
type BetaComplianceSettings as BetaComplianceSettings,
|
|
265
|
+
type BetaComplianceSettingsState as BetaComplianceSettingsState,
|
|
266
|
+
type BetaComplianceSettingsStateDisabled as BetaComplianceSettingsStateDisabled,
|
|
267
|
+
type BetaComplianceSettingsStateDisabledParam as BetaComplianceSettingsStateDisabledParam,
|
|
268
|
+
type BetaComplianceSettingsStateEnabled as BetaComplianceSettingsStateEnabled,
|
|
269
|
+
type BetaComplianceSettingsStateEnabledParam as BetaComplianceSettingsStateEnabledParam,
|
|
270
|
+
type BetaComplianceSettingsStateParam as BetaComplianceSettingsStateParam,
|
|
271
|
+
type ComplianceSettingUpdateParams as ComplianceSettingUpdateParams,
|
|
272
|
+
};
|
|
245
273
|
}
|
|
@@ -221,8 +221,12 @@ export interface BetaWorkspace {
|
|
|
221
221
|
* key-policy condition so the key is scoped to this compartment. On GCP and Azure,
|
|
222
222
|
* Anthropic enforces the compartment binding automatically; you do not need to
|
|
223
223
|
* reference this value in your key configuration. See the CMEK integration guide
|
|
224
|
-
* for the required key configuration
|
|
225
|
-
* validation.
|
|
224
|
+
* for the required key configuration; unless your organization is on Claude
|
|
225
|
+
* Platform on AWS, it includes a separate value used during key validation. On
|
|
226
|
+
* Claude Platform on AWS there is no separate validation value: the key is
|
|
227
|
+
* validated against this Workspace's own value when it is attached, so if your key
|
|
228
|
+
* policy uses the compartment condition, add this value to it before attaching the
|
|
229
|
+
* key.
|
|
226
230
|
*/
|
|
227
231
|
compartment_id: string;
|
|
228
232
|
|
|
@@ -245,10 +249,14 @@ export interface BetaWorkspace {
|
|
|
245
249
|
* ID of the customer-managed encryption key (CMEK) configuration to use for this
|
|
246
250
|
* Workspace. Setting this field requires CMEK to be enabled for your organization.
|
|
247
251
|
* When set, data stored for this Workspace is encrypted with the referenced key.
|
|
248
|
-
* Create key configurations with the External Keys API.
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
+
* Create key configurations with the External Keys API. On Claude Platform on AWS
|
|
253
|
+
* the value is the AWS KMS key ARN, and the key must be a single-Region key in the
|
|
254
|
+
* same AWS account and Region as the Workspace. On that platform the key is
|
|
255
|
+
* validated against this Workspace when it is attached, so a key-policy problem is
|
|
256
|
+
* reported as an error on this request. This field is write-once: once a key is
|
|
257
|
+
* attached to a Workspace it cannot be detached or replaced. To rotate key
|
|
258
|
+
* material, rotate the underlying key on your cloud KMS; the `external_key_id`
|
|
259
|
+
* stays the same.
|
|
252
260
|
*/
|
|
253
261
|
external_key_id: string | null;
|
|
254
262
|
|
|
@@ -324,8 +332,12 @@ export interface WorkspaceCreateParams {
|
|
|
324
332
|
* Body param: ID of the customer-managed encryption key (CMEK) configuration to
|
|
325
333
|
* use for this Workspace. Setting this field requires CMEK to be enabled for your
|
|
326
334
|
* organization. When set, data stored for this Workspace is encrypted with the
|
|
327
|
-
* referenced key. Create key configurations with the External Keys API.
|
|
328
|
-
*
|
|
335
|
+
* referenced key. Create key configurations with the External Keys API. On Claude
|
|
336
|
+
* Platform on AWS the value is the AWS KMS key ARN, and the key must be a
|
|
337
|
+
* single-Region key in the same AWS account and Region as the Workspace. On that
|
|
338
|
+
* platform the key is validated against this Workspace when it is attached, so a
|
|
339
|
+
* key-policy problem is reported as an error on this request. This field is
|
|
340
|
+
* write-once: once a key is attached to a Workspace it cannot be detached or
|
|
329
341
|
* replaced. To rotate key material, rotate the underlying key on your cloud KMS;
|
|
330
342
|
* the `external_key_id` stays the same.
|
|
331
343
|
*/
|
|
@@ -358,10 +370,14 @@ export interface WorkspaceUpdateParams {
|
|
|
358
370
|
* ID of the customer-managed encryption key (CMEK) configuration to use for this
|
|
359
371
|
* Workspace. Setting this field requires CMEK to be enabled for your organization.
|
|
360
372
|
* When set, data stored for this Workspace is encrypted with the referenced key.
|
|
361
|
-
* Create key configurations with the External Keys API.
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
373
|
+
* Create key configurations with the External Keys API. On Claude Platform on AWS
|
|
374
|
+
* the value is the AWS KMS key ARN, and the key must be a single-Region key in the
|
|
375
|
+
* same AWS account and Region as the Workspace. On that platform the key is
|
|
376
|
+
* validated against this Workspace when it is attached, so a key-policy problem is
|
|
377
|
+
* reported as an error on this request. This field is write-once: once a key is
|
|
378
|
+
* attached to a Workspace it cannot be detached or replaced. To rotate key
|
|
379
|
+
* material, rotate the underlying key on your cloud KMS; the `external_key_id`
|
|
380
|
+
* stays the same.
|
|
365
381
|
*/
|
|
366
382
|
external_key_id?: string;
|
|
367
383
|
|
|
@@ -34,7 +34,7 @@ export class Events extends APIResource {
|
|
|
34
34
|
params: EventListParams | null | undefined = {},
|
|
35
35
|
options?: RequestOptions,
|
|
36
36
|
): PagePromise<BetaManagedAgentsSessionEventsPageCursor, BetaManagedAgentsSessionEvent> {
|
|
37
|
-
const { betas, ...query } = params ?? {};
|
|
37
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
38
38
|
return this._client.getAPIList(
|
|
39
39
|
path`/v1/sessions/${sessionID}/events?beta=true`,
|
|
40
40
|
PageCursor<BetaManagedAgentsSessionEvent>,
|
|
@@ -42,7 +42,10 @@ export class Events extends APIResource {
|
|
|
42
42
|
query,
|
|
43
43
|
...options,
|
|
44
44
|
headers: buildHeaders([
|
|
45
|
-
{
|
|
45
|
+
{
|
|
46
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
47
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
48
|
+
},
|
|
46
49
|
options?.headers,
|
|
47
50
|
]),
|
|
48
51
|
},
|
|
@@ -78,12 +81,15 @@ export class Events extends APIResource {
|
|
|
78
81
|
params: EventSendParams,
|
|
79
82
|
options?: RequestOptions,
|
|
80
83
|
): APIPromise<BetaManagedAgentsSendSessionEvents> {
|
|
81
|
-
const { betas, ...body } = params;
|
|
84
|
+
const { betas, workspace_id, ...body } = params;
|
|
82
85
|
return this._client.post(path`/v1/sessions/${sessionID}/events?beta=true`, {
|
|
83
86
|
body,
|
|
84
87
|
...options,
|
|
85
88
|
headers: buildHeaders([
|
|
86
|
-
{
|
|
89
|
+
{
|
|
90
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
91
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
92
|
+
},
|
|
87
93
|
options?.headers,
|
|
88
94
|
]),
|
|
89
95
|
});
|
|
@@ -105,12 +111,15 @@ export class Events extends APIResource {
|
|
|
105
111
|
params: EventStreamParams | undefined = {},
|
|
106
112
|
options?: RequestOptions,
|
|
107
113
|
): APIPromise<Stream<BetaManagedAgentsStreamSessionEvents>> {
|
|
108
|
-
const { betas, ...query } = params ?? {};
|
|
114
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
109
115
|
return this._client.get(path`/v1/sessions/${sessionID}/events/stream?beta=true`, {
|
|
110
116
|
query,
|
|
111
117
|
...options,
|
|
112
118
|
headers: buildHeaders([
|
|
113
|
-
{
|
|
119
|
+
{
|
|
120
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
121
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
122
|
+
},
|
|
114
123
|
options?.headers,
|
|
115
124
|
]),
|
|
116
125
|
stream: true,
|
|
@@ -1977,7 +1986,7 @@ export interface EventListParams extends PageCursorParams {
|
|
|
1977
1986
|
|
|
1978
1987
|
/**
|
|
1979
1988
|
* Query param: Sort direction for results, ordered by the event's `processed_at`.
|
|
1980
|
-
* Defaults to asc (chronological).
|
|
1989
|
+
* Defaults to `asc` (chronological).
|
|
1981
1990
|
*/
|
|
1982
1991
|
order?: 'asc' | 'desc';
|
|
1983
1992
|
|
|
@@ -1992,6 +2001,16 @@ export interface EventListParams extends PageCursorParams {
|
|
|
1992
2001
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
1993
2002
|
*/
|
|
1994
2003
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
2004
|
+
|
|
2005
|
+
/**
|
|
2006
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
2007
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
2008
|
+
*
|
|
2009
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
2010
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
2011
|
+
* match that Workspace.
|
|
2012
|
+
*/
|
|
2013
|
+
workspace_id?: string;
|
|
1995
2014
|
}
|
|
1996
2015
|
|
|
1997
2016
|
export interface EventSendParams {
|
|
@@ -2004,6 +2023,16 @@ export interface EventSendParams {
|
|
|
2004
2023
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
2005
2024
|
*/
|
|
2006
2025
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
2029
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
2030
|
+
*
|
|
2031
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
2032
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
2033
|
+
* match that Workspace.
|
|
2034
|
+
*/
|
|
2035
|
+
workspace_id?: string;
|
|
2007
2036
|
}
|
|
2008
2037
|
|
|
2009
2038
|
export interface EventStreamParams {
|
|
@@ -2025,6 +2054,16 @@ export interface EventStreamParams {
|
|
|
2025
2054
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
2026
2055
|
*/
|
|
2027
2056
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
2057
|
+
|
|
2058
|
+
/**
|
|
2059
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
2060
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
2061
|
+
*
|
|
2062
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
2063
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
2064
|
+
* match that Workspace.
|
|
2065
|
+
*/
|
|
2066
|
+
workspace_id?: string;
|
|
2028
2067
|
}
|
|
2029
2068
|
|
|
2030
2069
|
export { SessionToolRunner, type SessionToolRunnerOptions } from '../../../lib/tools/SessionToolRunner';
|
|
@@ -27,11 +27,14 @@ export class Resources extends APIResource {
|
|
|
27
27
|
params: ResourceRetrieveParams,
|
|
28
28
|
options?: RequestOptions,
|
|
29
29
|
): APIPromise<ResourceRetrieveResponse> {
|
|
30
|
-
const { session_id, betas } = params;
|
|
30
|
+
const { session_id, betas, workspace_id } = params;
|
|
31
31
|
return this._client.get(path`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
32
32
|
...options,
|
|
33
33
|
headers: buildHeaders([
|
|
34
|
-
{
|
|
34
|
+
{
|
|
35
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
36
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
37
|
+
},
|
|
35
38
|
options?.headers,
|
|
36
39
|
]),
|
|
37
40
|
});
|
|
@@ -57,12 +60,15 @@ export class Resources extends APIResource {
|
|
|
57
60
|
params: ResourceUpdateParams,
|
|
58
61
|
options?: RequestOptions,
|
|
59
62
|
): APIPromise<ResourceUpdateResponse> {
|
|
60
|
-
const { session_id, betas, ...body } = params;
|
|
63
|
+
const { session_id, betas, workspace_id, ...body } = params;
|
|
61
64
|
return this._client.post(path`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
62
65
|
body,
|
|
63
66
|
...options,
|
|
64
67
|
headers: buildHeaders([
|
|
65
|
-
{
|
|
68
|
+
{
|
|
69
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
70
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
71
|
+
},
|
|
66
72
|
options?.headers,
|
|
67
73
|
]),
|
|
68
74
|
});
|
|
@@ -86,7 +92,7 @@ export class Resources extends APIResource {
|
|
|
86
92
|
params: ResourceListParams | null | undefined = {},
|
|
87
93
|
options?: RequestOptions,
|
|
88
94
|
): PagePromise<BetaManagedAgentsSessionResourcesPageCursor, BetaManagedAgentsSessionResource> {
|
|
89
|
-
const { betas, ...query } = params ?? {};
|
|
95
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
90
96
|
return this._client.getAPIList(
|
|
91
97
|
path`/v1/sessions/${sessionID}/resources?beta=true`,
|
|
92
98
|
PageCursor<BetaManagedAgentsSessionResource>,
|
|
@@ -94,7 +100,10 @@ export class Resources extends APIResource {
|
|
|
94
100
|
query,
|
|
95
101
|
...options,
|
|
96
102
|
headers: buildHeaders([
|
|
97
|
-
{
|
|
103
|
+
{
|
|
104
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
105
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
106
|
+
},
|
|
98
107
|
options?.headers,
|
|
99
108
|
]),
|
|
100
109
|
},
|
|
@@ -118,11 +127,14 @@ export class Resources extends APIResource {
|
|
|
118
127
|
params: ResourceDeleteParams,
|
|
119
128
|
options?: RequestOptions,
|
|
120
129
|
): APIPromise<BetaManagedAgentsDeleteSessionResource> {
|
|
121
|
-
const { session_id, betas } = params;
|
|
130
|
+
const { session_id, betas, workspace_id } = params;
|
|
122
131
|
return this._client.delete(path`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
123
132
|
...options,
|
|
124
133
|
headers: buildHeaders([
|
|
125
|
-
{
|
|
134
|
+
{
|
|
135
|
+
'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString(),
|
|
136
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
137
|
+
},
|
|
126
138
|
options?.headers,
|
|
127
139
|
]),
|
|
128
140
|
});
|
|
@@ -148,12 +160,15 @@ export class Resources extends APIResource {
|
|
|
148
160
|
params: ResourceAddParams,
|
|
149
161
|
options?: RequestOptions,
|
|
150
162
|
): APIPromise<BetaManagedAgentsFileResource> {
|
|
151
|
-
const { betas, ...body } = params;
|
|
163
|
+
const { betas, workspace_id, ...body } = params;
|
|
152
164
|
return this._client.post(path`/v1/sessions/${sessionID}/resources?beta=true`, {
|
|
153
165
|
body,
|
|
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
|
});
|
|
@@ -289,6 +304,16 @@ export interface ResourceRetrieveParams {
|
|
|
289
304
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
290
305
|
*/
|
|
291
306
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
310
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
311
|
+
*
|
|
312
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
313
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
314
|
+
* match that Workspace.
|
|
315
|
+
*/
|
|
316
|
+
workspace_id?: string;
|
|
292
317
|
}
|
|
293
318
|
|
|
294
319
|
export interface ResourceUpdateParams {
|
|
@@ -307,6 +332,16 @@ export interface ResourceUpdateParams {
|
|
|
307
332
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
308
333
|
*/
|
|
309
334
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
338
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
339
|
+
*
|
|
340
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
341
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
342
|
+
* match that Workspace.
|
|
343
|
+
*/
|
|
344
|
+
workspace_id?: string;
|
|
310
345
|
}
|
|
311
346
|
|
|
312
347
|
export interface ResourceListParams extends PageCursorParams {
|
|
@@ -314,6 +349,16 @@ export interface ResourceListParams extends PageCursorParams {
|
|
|
314
349
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
315
350
|
*/
|
|
316
351
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
355
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
356
|
+
*
|
|
357
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
358
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
359
|
+
* match that Workspace.
|
|
360
|
+
*/
|
|
361
|
+
workspace_id?: string;
|
|
317
362
|
}
|
|
318
363
|
|
|
319
364
|
export interface ResourceDeleteParams {
|
|
@@ -326,6 +371,16 @@ export interface ResourceDeleteParams {
|
|
|
326
371
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
327
372
|
*/
|
|
328
373
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
377
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
378
|
+
*
|
|
379
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
380
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
381
|
+
* match that Workspace.
|
|
382
|
+
*/
|
|
383
|
+
workspace_id?: string;
|
|
329
384
|
}
|
|
330
385
|
|
|
331
386
|
export interface ResourceAddParams {
|
|
@@ -349,6 +404,16 @@ export interface ResourceAddParams {
|
|
|
349
404
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
350
405
|
*/
|
|
351
406
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
410
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
411
|
+
*
|
|
412
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
413
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
414
|
+
* match that Workspace.
|
|
415
|
+
*/
|
|
416
|
+
workspace_id?: string;
|
|
352
417
|
}
|
|
353
418
|
|
|
354
419
|
export declare namespace Resources {
|