@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
|
@@ -26,13 +26,16 @@ export class Memories extends APIResource {
|
|
|
26
26
|
params: MemoryCreateParams,
|
|
27
27
|
options?: RequestOptions,
|
|
28
28
|
): APIPromise<BetaManagedAgentsMemory> {
|
|
29
|
-
const { view, betas, ...body } = params;
|
|
29
|
+
const { view, betas, workspace_id, ...body } = params;
|
|
30
30
|
return this._client.post(path`/v1/memory_stores/${memoryStoreID}/memories?beta=true`, {
|
|
31
31
|
query: { view },
|
|
32
32
|
body,
|
|
33
33
|
...options,
|
|
34
34
|
headers: buildHeaders([
|
|
35
|
-
{
|
|
35
|
+
{
|
|
36
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
37
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
38
|
+
},
|
|
36
39
|
options?.headers,
|
|
37
40
|
]),
|
|
38
41
|
});
|
|
@@ -55,12 +58,15 @@ export class Memories extends APIResource {
|
|
|
55
58
|
params: MemoryRetrieveParams,
|
|
56
59
|
options?: RequestOptions,
|
|
57
60
|
): APIPromise<BetaManagedAgentsMemory> {
|
|
58
|
-
const { memory_store_id, betas, ...query } = params;
|
|
61
|
+
const { memory_store_id, betas, workspace_id, ...query } = params;
|
|
59
62
|
return this._client.get(path`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
60
63
|
query,
|
|
61
64
|
...options,
|
|
62
65
|
headers: buildHeaders([
|
|
63
|
-
{
|
|
66
|
+
{
|
|
67
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
68
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
69
|
+
},
|
|
64
70
|
options?.headers,
|
|
65
71
|
]),
|
|
66
72
|
});
|
|
@@ -83,13 +89,16 @@ export class Memories extends APIResource {
|
|
|
83
89
|
params: MemoryUpdateParams,
|
|
84
90
|
options?: RequestOptions,
|
|
85
91
|
): APIPromise<BetaManagedAgentsMemory> {
|
|
86
|
-
const { memory_store_id, view, betas, ...body } = params;
|
|
92
|
+
const { memory_store_id, view, betas, workspace_id, ...body } = params;
|
|
87
93
|
return this._client.post(path`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
88
94
|
query: { view },
|
|
89
95
|
body,
|
|
90
96
|
...options,
|
|
91
97
|
headers: buildHeaders([
|
|
92
|
-
{
|
|
98
|
+
{
|
|
99
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
100
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
101
|
+
},
|
|
93
102
|
options?.headers,
|
|
94
103
|
]),
|
|
95
104
|
});
|
|
@@ -113,7 +122,7 @@ export class Memories extends APIResource {
|
|
|
113
122
|
params: MemoryListParams | null | undefined = {},
|
|
114
123
|
options?: RequestOptions,
|
|
115
124
|
): PagePromise<BetaManagedAgentsMemoryListItemsPageCursor, BetaManagedAgentsMemoryListItem> {
|
|
116
|
-
const { betas, ...query } = params ?? {};
|
|
125
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
117
126
|
return this._client.getAPIList(
|
|
118
127
|
path`/v1/memory_stores/${memoryStoreID}/memories?beta=true`,
|
|
119
128
|
PageCursor<BetaManagedAgentsMemoryListItem>,
|
|
@@ -121,7 +130,10 @@ export class Memories extends APIResource {
|
|
|
121
130
|
query,
|
|
122
131
|
...options,
|
|
123
132
|
headers: buildHeaders([
|
|
124
|
-
{
|
|
133
|
+
{
|
|
134
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
135
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
136
|
+
},
|
|
125
137
|
options?.headers,
|
|
126
138
|
]),
|
|
127
139
|
},
|
|
@@ -145,12 +157,15 @@ export class Memories extends APIResource {
|
|
|
145
157
|
params: MemoryDeleteParams,
|
|
146
158
|
options?: RequestOptions,
|
|
147
159
|
): APIPromise<BetaManagedAgentsDeletedMemory> {
|
|
148
|
-
const { memory_store_id, expected_content_sha256, betas } = params;
|
|
160
|
+
const { memory_store_id, expected_content_sha256, betas, workspace_id } = params;
|
|
149
161
|
return this._client.delete(path`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
150
162
|
query: { expected_content_sha256 },
|
|
151
163
|
...options,
|
|
152
164
|
headers: buildHeaders([
|
|
153
|
-
{
|
|
165
|
+
{
|
|
166
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
167
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
168
|
+
},
|
|
154
169
|
options?.headers,
|
|
155
170
|
]),
|
|
156
171
|
});
|
|
@@ -367,7 +382,8 @@ export interface MemoryCreateParams {
|
|
|
367
382
|
* Body param: Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`.
|
|
368
383
|
* Must start with `/`, contain at least one non-empty segment, and be at most
|
|
369
384
|
* 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or
|
|
370
|
-
* format characters,
|
|
385
|
+
* format characters, or the Unicode line and paragraph separators (U+2028,
|
|
386
|
+
* U+2029), and must be NFC-normalized. Paths are case-sensitive.
|
|
371
387
|
*/
|
|
372
388
|
path: string;
|
|
373
389
|
|
|
@@ -380,6 +396,16 @@ export interface MemoryCreateParams {
|
|
|
380
396
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
381
397
|
*/
|
|
382
398
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
402
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
403
|
+
*
|
|
404
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
405
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
406
|
+
* match that Workspace.
|
|
407
|
+
*/
|
|
408
|
+
workspace_id?: string;
|
|
383
409
|
}
|
|
384
410
|
|
|
385
411
|
export interface MemoryRetrieveParams {
|
|
@@ -397,6 +423,16 @@ export interface MemoryRetrieveParams {
|
|
|
397
423
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
398
424
|
*/
|
|
399
425
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
429
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
430
|
+
*
|
|
431
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
432
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
433
|
+
* match that Workspace.
|
|
434
|
+
*/
|
|
435
|
+
workspace_id?: string;
|
|
400
436
|
}
|
|
401
437
|
|
|
402
438
|
export interface MemoryUpdateParams {
|
|
@@ -419,9 +455,10 @@ export interface MemoryUpdateParams {
|
|
|
419
455
|
/**
|
|
420
456
|
* Body param: New path for the memory (a rename). Must start with `/`, contain at
|
|
421
457
|
* least one non-empty segment, and be at most 1,024 bytes. Must not contain empty
|
|
422
|
-
* segments, `.` or `..` segments, control or format characters,
|
|
423
|
-
*
|
|
424
|
-
*
|
|
458
|
+
* segments, `.` or `..` segments, control or format characters, or the Unicode
|
|
459
|
+
* line and paragraph separators (U+2028, U+2029), and must be NFC-normalized.
|
|
460
|
+
* Paths are case-sensitive. The memory's `id` is preserved across renames. Omit to
|
|
461
|
+
* leave the path unchanged.
|
|
425
462
|
*/
|
|
426
463
|
path?: string | null;
|
|
427
464
|
|
|
@@ -439,6 +476,16 @@ export interface MemoryUpdateParams {
|
|
|
439
476
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
440
477
|
*/
|
|
441
478
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
482
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
483
|
+
*
|
|
484
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
485
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
486
|
+
* match that Workspace.
|
|
487
|
+
*/
|
|
488
|
+
workspace_id?: string;
|
|
442
489
|
}
|
|
443
490
|
|
|
444
491
|
export interface MemoryListParams extends PageCursorParams {
|
|
@@ -468,6 +515,16 @@ export interface MemoryListParams extends PageCursorParams {
|
|
|
468
515
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
469
516
|
*/
|
|
470
517
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
521
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
522
|
+
*
|
|
523
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
524
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
525
|
+
* match that Workspace.
|
|
526
|
+
*/
|
|
527
|
+
workspace_id?: string;
|
|
471
528
|
}
|
|
472
529
|
|
|
473
530
|
export interface MemoryDeleteParams {
|
|
@@ -485,6 +542,16 @@ export interface MemoryDeleteParams {
|
|
|
485
542
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
486
543
|
*/
|
|
487
544
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
548
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
549
|
+
*
|
|
550
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
551
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
552
|
+
* match that Workspace.
|
|
553
|
+
*/
|
|
554
|
+
workspace_id?: string;
|
|
488
555
|
}
|
|
489
556
|
|
|
490
557
|
export declare namespace Memories {
|
|
@@ -61,12 +61,15 @@ export class MemoryStores extends APIResource {
|
|
|
61
61
|
params: MemoryStoreCreateParams,
|
|
62
62
|
options?: RequestOptions,
|
|
63
63
|
): APIPromise<BetaManagedAgentsMemoryStore> {
|
|
64
|
-
const { betas, ...body } = params;
|
|
64
|
+
const { betas, workspace_id, ...body } = params;
|
|
65
65
|
return this._client.post('/v1/memory_stores?beta=true', {
|
|
66
66
|
body,
|
|
67
67
|
...options,
|
|
68
68
|
headers: buildHeaders([
|
|
69
|
-
{
|
|
69
|
+
{
|
|
70
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
71
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
72
|
+
},
|
|
70
73
|
options?.headers,
|
|
71
74
|
]),
|
|
72
75
|
});
|
|
@@ -88,11 +91,14 @@ export class MemoryStores extends APIResource {
|
|
|
88
91
|
params: MemoryStoreRetrieveParams | null | undefined = {},
|
|
89
92
|
options?: RequestOptions,
|
|
90
93
|
): APIPromise<BetaManagedAgentsMemoryStore> {
|
|
91
|
-
const { betas } = params ?? {};
|
|
94
|
+
const { betas, workspace_id } = params ?? {};
|
|
92
95
|
return this._client.get(path`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
93
96
|
...options,
|
|
94
97
|
headers: buildHeaders([
|
|
95
|
-
{
|
|
98
|
+
{
|
|
99
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
100
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
101
|
+
},
|
|
96
102
|
options?.headers,
|
|
97
103
|
]),
|
|
98
104
|
});
|
|
@@ -112,12 +118,15 @@ export class MemoryStores extends APIResource {
|
|
|
112
118
|
params: MemoryStoreUpdateParams,
|
|
113
119
|
options?: RequestOptions,
|
|
114
120
|
): APIPromise<BetaManagedAgentsMemoryStore> {
|
|
115
|
-
const { betas, ...body } = params;
|
|
121
|
+
const { betas, workspace_id, ...body } = params;
|
|
116
122
|
return this._client.post(path`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
117
123
|
body,
|
|
118
124
|
...options,
|
|
119
125
|
headers: buildHeaders([
|
|
120
|
-
{
|
|
126
|
+
{
|
|
127
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
128
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
129
|
+
},
|
|
121
130
|
options?.headers,
|
|
122
131
|
]),
|
|
123
132
|
});
|
|
@@ -138,12 +147,15 @@ export class MemoryStores extends APIResource {
|
|
|
138
147
|
params: MemoryStoreListParams | null | undefined = {},
|
|
139
148
|
options?: RequestOptions,
|
|
140
149
|
): PagePromise<BetaManagedAgentsMemoryStoresPageCursor, BetaManagedAgentsMemoryStore> {
|
|
141
|
-
const { betas, ...query } = params ?? {};
|
|
150
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
142
151
|
return this._client.getAPIList('/v1/memory_stores?beta=true', PageCursor<BetaManagedAgentsMemoryStore>, {
|
|
143
152
|
query,
|
|
144
153
|
...options,
|
|
145
154
|
headers: buildHeaders([
|
|
146
|
-
{
|
|
155
|
+
{
|
|
156
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
157
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
158
|
+
},
|
|
147
159
|
options?.headers,
|
|
148
160
|
]),
|
|
149
161
|
});
|
|
@@ -163,11 +175,14 @@ export class MemoryStores extends APIResource {
|
|
|
163
175
|
params: MemoryStoreDeleteParams | null | undefined = {},
|
|
164
176
|
options?: RequestOptions,
|
|
165
177
|
): APIPromise<BetaManagedAgentsDeletedMemoryStore> {
|
|
166
|
-
const { betas } = params ?? {};
|
|
178
|
+
const { betas, workspace_id } = params ?? {};
|
|
167
179
|
return this._client.delete(path`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
168
180
|
...options,
|
|
169
181
|
headers: buildHeaders([
|
|
170
|
-
{
|
|
182
|
+
{
|
|
183
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
184
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
185
|
+
},
|
|
171
186
|
options?.headers,
|
|
172
187
|
]),
|
|
173
188
|
});
|
|
@@ -187,11 +202,14 @@ export class MemoryStores extends APIResource {
|
|
|
187
202
|
params: MemoryStoreArchiveParams | null | undefined = {},
|
|
188
203
|
options?: RequestOptions,
|
|
189
204
|
): APIPromise<BetaManagedAgentsMemoryStore> {
|
|
190
|
-
const { betas } = params ?? {};
|
|
205
|
+
const { betas, workspace_id } = params ?? {};
|
|
191
206
|
return this._client.post(path`/v1/memory_stores/${memoryStoreID}/archive?beta=true`, {
|
|
192
207
|
...options,
|
|
193
208
|
headers: buildHeaders([
|
|
194
|
-
{
|
|
209
|
+
{
|
|
210
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
211
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
212
|
+
},
|
|
195
213
|
options?.headers,
|
|
196
214
|
]),
|
|
197
215
|
});
|
|
@@ -291,6 +309,16 @@ export interface MemoryStoreCreateParams {
|
|
|
291
309
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
292
310
|
*/
|
|
293
311
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
315
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
316
|
+
*
|
|
317
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
318
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
319
|
+
* match that Workspace.
|
|
320
|
+
*/
|
|
321
|
+
workspace_id?: string;
|
|
294
322
|
}
|
|
295
323
|
|
|
296
324
|
export interface MemoryStoreRetrieveParams {
|
|
@@ -298,6 +326,16 @@ export interface MemoryStoreRetrieveParams {
|
|
|
298
326
|
* Optional header to specify the beta version(s) you want to use.
|
|
299
327
|
*/
|
|
300
328
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
332
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
333
|
+
*
|
|
334
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
335
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
336
|
+
* match that Workspace.
|
|
337
|
+
*/
|
|
338
|
+
workspace_id?: string;
|
|
301
339
|
}
|
|
302
340
|
|
|
303
341
|
export interface MemoryStoreUpdateParams {
|
|
@@ -325,6 +363,16 @@ export interface MemoryStoreUpdateParams {
|
|
|
325
363
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
326
364
|
*/
|
|
327
365
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
369
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
370
|
+
*
|
|
371
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
372
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
373
|
+
* match that Workspace.
|
|
374
|
+
*/
|
|
375
|
+
workspace_id?: string;
|
|
328
376
|
}
|
|
329
377
|
|
|
330
378
|
export interface MemoryStoreListParams extends PageCursorParams {
|
|
@@ -350,6 +398,16 @@ export interface MemoryStoreListParams extends PageCursorParams {
|
|
|
350
398
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
351
399
|
*/
|
|
352
400
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
404
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
405
|
+
*
|
|
406
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
407
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
408
|
+
* match that Workspace.
|
|
409
|
+
*/
|
|
410
|
+
workspace_id?: string;
|
|
353
411
|
}
|
|
354
412
|
|
|
355
413
|
export interface MemoryStoreDeleteParams {
|
|
@@ -357,6 +415,16 @@ export interface MemoryStoreDeleteParams {
|
|
|
357
415
|
* Optional header to specify the beta version(s) you want to use.
|
|
358
416
|
*/
|
|
359
417
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
421
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
422
|
+
*
|
|
423
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
424
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
425
|
+
* match that Workspace.
|
|
426
|
+
*/
|
|
427
|
+
workspace_id?: string;
|
|
360
428
|
}
|
|
361
429
|
|
|
362
430
|
export interface MemoryStoreArchiveParams {
|
|
@@ -364,6 +432,16 @@ export interface MemoryStoreArchiveParams {
|
|
|
364
432
|
* Optional header to specify the beta version(s) you want to use.
|
|
365
433
|
*/
|
|
366
434
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Optional header to select the Workspace for this request. The value is a
|
|
438
|
+
* Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
439
|
+
*
|
|
440
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
441
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
442
|
+
* match that Workspace.
|
|
443
|
+
*/
|
|
444
|
+
workspace_id?: string;
|
|
367
445
|
}
|
|
368
446
|
|
|
369
447
|
MemoryStores.Memories = Memories;
|
|
@@ -27,14 +27,17 @@ export class MemoryVersions extends APIResource {
|
|
|
27
27
|
params: MemoryVersionRetrieveParams,
|
|
28
28
|
options?: RequestOptions,
|
|
29
29
|
): APIPromise<BetaManagedAgentsMemoryVersion> {
|
|
30
|
-
const { memory_store_id, betas, ...query } = params;
|
|
30
|
+
const { memory_store_id, betas, workspace_id, ...query } = params;
|
|
31
31
|
return this._client.get(
|
|
32
32
|
path`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}?beta=true`,
|
|
33
33
|
{
|
|
34
34
|
query,
|
|
35
35
|
...options,
|
|
36
36
|
headers: buildHeaders([
|
|
37
|
-
{
|
|
37
|
+
{
|
|
38
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
39
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
40
|
+
},
|
|
38
41
|
options?.headers,
|
|
39
42
|
]),
|
|
40
43
|
},
|
|
@@ -59,7 +62,7 @@ export class MemoryVersions extends APIResource {
|
|
|
59
62
|
params: MemoryVersionListParams | null | undefined = {},
|
|
60
63
|
options?: RequestOptions,
|
|
61
64
|
): PagePromise<BetaManagedAgentsMemoryVersionsPageCursor, BetaManagedAgentsMemoryVersion> {
|
|
62
|
-
const { betas, ...query } = params ?? {};
|
|
65
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
63
66
|
return this._client.getAPIList(
|
|
64
67
|
path`/v1/memory_stores/${memoryStoreID}/memory_versions?beta=true`,
|
|
65
68
|
PageCursor<BetaManagedAgentsMemoryVersion>,
|
|
@@ -67,7 +70,10 @@ export class MemoryVersions extends APIResource {
|
|
|
67
70
|
query,
|
|
68
71
|
...options,
|
|
69
72
|
headers: buildHeaders([
|
|
70
|
-
{
|
|
73
|
+
{
|
|
74
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
75
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
76
|
+
},
|
|
71
77
|
options?.headers,
|
|
72
78
|
]),
|
|
73
79
|
},
|
|
@@ -91,13 +97,16 @@ export class MemoryVersions extends APIResource {
|
|
|
91
97
|
params: MemoryVersionRedactParams,
|
|
92
98
|
options?: RequestOptions,
|
|
93
99
|
): APIPromise<BetaManagedAgentsMemoryVersion> {
|
|
94
|
-
const { memory_store_id, betas } = params;
|
|
100
|
+
const { memory_store_id, betas, workspace_id } = params;
|
|
95
101
|
return this._client.post(
|
|
96
102
|
path`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}/redact?beta=true`,
|
|
97
103
|
{
|
|
98
104
|
...options,
|
|
99
105
|
headers: buildHeaders([
|
|
100
|
-
{
|
|
106
|
+
{
|
|
107
|
+
'anthropic-beta': [...(betas ?? []), 'agent-memory-2026-07-22'].toString(),
|
|
108
|
+
...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined),
|
|
109
|
+
},
|
|
101
110
|
options?.headers,
|
|
102
111
|
]),
|
|
103
112
|
},
|
|
@@ -112,7 +121,7 @@ export type BetaManagedAgentsMemoryVersionsPageCursor = PageCursor<BetaManagedAg
|
|
|
112
121
|
* the `memory_version` row. The API key that created a session is not recorded on
|
|
113
122
|
* agent writes; attribution answers who made the write, not who is ultimately
|
|
114
123
|
* responsible. Look up session provenance separately via the
|
|
115
|
-
* [Sessions API](/en/api/sessions
|
|
124
|
+
* [Sessions API](/en/api/beta/sessions/retrieve).
|
|
116
125
|
*/
|
|
117
126
|
export type BetaManagedAgentsActor =
|
|
118
127
|
| BetaManagedAgentsSessionActor
|
|
@@ -201,7 +210,7 @@ export interface BetaManagedAgentsMemoryVersion {
|
|
|
201
210
|
* the `memory_version` row. The API key that created a session is not recorded on
|
|
202
211
|
* agent writes; attribution answers who made the write, not who is ultimately
|
|
203
212
|
* responsible. Look up session provenance separately via the
|
|
204
|
-
* [Sessions API](/en/api/sessions
|
|
213
|
+
* [Sessions API](/en/api/beta/sessions/retrieve).
|
|
205
214
|
*/
|
|
206
215
|
created_by?: BetaManagedAgentsActor;
|
|
207
216
|
|
|
@@ -221,7 +230,7 @@ export interface BetaManagedAgentsMemoryVersion {
|
|
|
221
230
|
* the `memory_version` row. The API key that created a session is not recorded on
|
|
222
231
|
* agent writes; attribution answers who made the write, not who is ultimately
|
|
223
232
|
* responsible. Look up session provenance separately via the
|
|
224
|
-
* [Sessions API](/en/api/sessions
|
|
233
|
+
* [Sessions API](/en/api/beta/sessions/retrieve).
|
|
225
234
|
*/
|
|
226
235
|
redacted_by?: BetaManagedAgentsActor;
|
|
227
236
|
}
|
|
@@ -252,7 +261,7 @@ export interface BetaManagedAgentsServiceAccountActor {
|
|
|
252
261
|
export interface BetaManagedAgentsSessionActor {
|
|
253
262
|
/**
|
|
254
263
|
* ID of the session that performed the write (a `sesn_...` value). Look up the
|
|
255
|
-
* session via [Retrieve a session](/en/api/sessions
|
|
264
|
+
* session via [Retrieve a session](/en/api/beta/sessions/retrieve) for further
|
|
256
265
|
* provenance.
|
|
257
266
|
*/
|
|
258
267
|
session_id: string;
|
|
@@ -287,6 +296,16 @@ export interface MemoryVersionRetrieveParams {
|
|
|
287
296
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
288
297
|
*/
|
|
289
298
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
302
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
303
|
+
*
|
|
304
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
305
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
306
|
+
* match that Workspace.
|
|
307
|
+
*/
|
|
308
|
+
workspace_id?: string;
|
|
290
309
|
}
|
|
291
310
|
|
|
292
311
|
export interface MemoryVersionListParams extends PageCursorParams {
|
|
@@ -334,6 +353,16 @@ export interface MemoryVersionListParams extends PageCursorParams {
|
|
|
334
353
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
335
354
|
*/
|
|
336
355
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
359
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
360
|
+
*
|
|
361
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
362
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
363
|
+
* match that Workspace.
|
|
364
|
+
*/
|
|
365
|
+
workspace_id?: string;
|
|
337
366
|
}
|
|
338
367
|
|
|
339
368
|
export interface MemoryVersionRedactParams {
|
|
@@ -346,6 +375,16 @@ export interface MemoryVersionRedactParams {
|
|
|
346
375
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
347
376
|
*/
|
|
348
377
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
381
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
382
|
+
*
|
|
383
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
384
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
385
|
+
* match that Workspace.
|
|
386
|
+
*/
|
|
387
|
+
workspace_id?: string;
|
|
349
388
|
}
|
|
350
389
|
|
|
351
390
|
export declare namespace MemoryVersions {
|