@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
|
@@ -6,18 +6,52 @@ import { RequestOptions } from "../../internal/request-options.mjs";
|
|
|
6
6
|
export declare class Versions extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Create Skill Version
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const skillVersion = await client.skills.versions.create(
|
|
13
|
+
* 'skill_id',
|
|
14
|
+
* { files: [fs.createReadStream('path/to/file')] },
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
|
-
create(skillID: string,
|
|
18
|
+
create(skillID: string, params: VersionCreateParams, options?: RequestOptions): APIPromise<SkillVersion>;
|
|
11
19
|
/**
|
|
12
20
|
* Get Skill Version
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const skillVersion = await client.skills.versions.retrieve(
|
|
25
|
+
* 'version',
|
|
26
|
+
* { skill_id: 'skill_id' },
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
13
29
|
*/
|
|
14
30
|
retrieve(version: string, params: VersionRetrieveParams, options?: RequestOptions): APIPromise<SkillVersion>;
|
|
15
31
|
/**
|
|
16
32
|
* List Skill Versions
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* // Automatically fetches more pages as needed.
|
|
37
|
+
* for await (const skillVersion of client.skills.versions.list(
|
|
38
|
+
* 'skill_id',
|
|
39
|
+
* )) {
|
|
40
|
+
* // ...
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
17
43
|
*/
|
|
18
|
-
list(skillID: string,
|
|
44
|
+
list(skillID: string, params?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise<SkillVersionsPageCursor, SkillVersion>;
|
|
19
45
|
/**
|
|
20
46
|
* Delete Skill Version
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const deletedSkillVersion =
|
|
51
|
+
* await client.skills.versions.delete('version', {
|
|
52
|
+
* skill_id: 'skill_id',
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
21
55
|
*/
|
|
22
56
|
delete(version: string, params: VersionDeleteParams, options?: RequestOptions): APIPromise<DeletedSkillVersion>;
|
|
23
57
|
}
|
|
@@ -73,30 +107,66 @@ export interface SkillVersion {
|
|
|
73
107
|
}
|
|
74
108
|
export interface VersionCreateParams {
|
|
75
109
|
/**
|
|
76
|
-
* Files to upload for the skill.
|
|
110
|
+
* Body param: Files to upload for the skill.
|
|
77
111
|
*
|
|
78
112
|
* All files must be in the same top-level directory and must include a SKILL.md
|
|
79
113
|
* file at the root of that directory.
|
|
80
114
|
*/
|
|
81
115
|
files: Array<Uploadable>;
|
|
116
|
+
/**
|
|
117
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
118
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
119
|
+
*
|
|
120
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
121
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
122
|
+
* match that Workspace.
|
|
123
|
+
*/
|
|
124
|
+
workspace_id?: string;
|
|
82
125
|
}
|
|
83
126
|
export interface VersionRetrieveParams {
|
|
84
127
|
/**
|
|
85
|
-
* Unique identifier for the skill.
|
|
128
|
+
* Path param: Unique identifier for the skill.
|
|
86
129
|
*
|
|
87
130
|
* The format and length of IDs may change over time.
|
|
88
131
|
*/
|
|
89
132
|
skill_id: string;
|
|
133
|
+
/**
|
|
134
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
135
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
136
|
+
*
|
|
137
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
138
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
139
|
+
* match that Workspace.
|
|
140
|
+
*/
|
|
141
|
+
workspace_id?: string;
|
|
90
142
|
}
|
|
91
143
|
export interface VersionListParams extends PageCursorParams {
|
|
144
|
+
/**
|
|
145
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
146
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
147
|
+
*
|
|
148
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
149
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
150
|
+
* match that Workspace.
|
|
151
|
+
*/
|
|
152
|
+
workspace_id?: string;
|
|
92
153
|
}
|
|
93
154
|
export interface VersionDeleteParams {
|
|
94
155
|
/**
|
|
95
|
-
* Unique identifier for the skill.
|
|
156
|
+
* Path param: Unique identifier for the skill.
|
|
96
157
|
*
|
|
97
158
|
* The format and length of IDs may change over time.
|
|
98
159
|
*/
|
|
99
160
|
skill_id: string;
|
|
161
|
+
/**
|
|
162
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
163
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
164
|
+
*
|
|
165
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
166
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
167
|
+
* match that Workspace.
|
|
168
|
+
*/
|
|
169
|
+
workspace_id?: string;
|
|
100
170
|
}
|
|
101
171
|
export declare namespace Versions {
|
|
102
172
|
export { type DeletedSkillVersion as DeletedSkillVersion, type SkillVersion as SkillVersion, type SkillVersionsPageCursor as SkillVersionsPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.mts","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,kCAA8B;AACvF,OAAO,EAAE,KAAK,UAAU,EAAE,+BAA2B;
|
|
1
|
+
{"version":3,"file":"versions.d.mts","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,kCAA8B;AACvF,OAAO,EAAE,KAAK,UAAU,EAAE,+BAA2B;AAErD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAIhE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAmBxG;;;;;;;;;;OAUG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,qBA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G;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -6,18 +6,52 @@ import { RequestOptions } from "../../internal/request-options.js";
|
|
|
6
6
|
export declare class Versions extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Create Skill Version
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const skillVersion = await client.skills.versions.create(
|
|
13
|
+
* 'skill_id',
|
|
14
|
+
* { files: [fs.createReadStream('path/to/file')] },
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
|
-
create(skillID: string,
|
|
18
|
+
create(skillID: string, params: VersionCreateParams, options?: RequestOptions): APIPromise<SkillVersion>;
|
|
11
19
|
/**
|
|
12
20
|
* Get Skill Version
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const skillVersion = await client.skills.versions.retrieve(
|
|
25
|
+
* 'version',
|
|
26
|
+
* { skill_id: 'skill_id' },
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
13
29
|
*/
|
|
14
30
|
retrieve(version: string, params: VersionRetrieveParams, options?: RequestOptions): APIPromise<SkillVersion>;
|
|
15
31
|
/**
|
|
16
32
|
* List Skill Versions
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* // Automatically fetches more pages as needed.
|
|
37
|
+
* for await (const skillVersion of client.skills.versions.list(
|
|
38
|
+
* 'skill_id',
|
|
39
|
+
* )) {
|
|
40
|
+
* // ...
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
17
43
|
*/
|
|
18
|
-
list(skillID: string,
|
|
44
|
+
list(skillID: string, params?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise<SkillVersionsPageCursor, SkillVersion>;
|
|
19
45
|
/**
|
|
20
46
|
* Delete Skill Version
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const deletedSkillVersion =
|
|
51
|
+
* await client.skills.versions.delete('version', {
|
|
52
|
+
* skill_id: 'skill_id',
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
21
55
|
*/
|
|
22
56
|
delete(version: string, params: VersionDeleteParams, options?: RequestOptions): APIPromise<DeletedSkillVersion>;
|
|
23
57
|
}
|
|
@@ -73,30 +107,66 @@ export interface SkillVersion {
|
|
|
73
107
|
}
|
|
74
108
|
export interface VersionCreateParams {
|
|
75
109
|
/**
|
|
76
|
-
* Files to upload for the skill.
|
|
110
|
+
* Body param: Files to upload for the skill.
|
|
77
111
|
*
|
|
78
112
|
* All files must be in the same top-level directory and must include a SKILL.md
|
|
79
113
|
* file at the root of that directory.
|
|
80
114
|
*/
|
|
81
115
|
files: Array<Uploadable>;
|
|
116
|
+
/**
|
|
117
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
118
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
119
|
+
*
|
|
120
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
121
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
122
|
+
* match that Workspace.
|
|
123
|
+
*/
|
|
124
|
+
workspace_id?: string;
|
|
82
125
|
}
|
|
83
126
|
export interface VersionRetrieveParams {
|
|
84
127
|
/**
|
|
85
|
-
* Unique identifier for the skill.
|
|
128
|
+
* Path param: Unique identifier for the skill.
|
|
86
129
|
*
|
|
87
130
|
* The format and length of IDs may change over time.
|
|
88
131
|
*/
|
|
89
132
|
skill_id: string;
|
|
133
|
+
/**
|
|
134
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
135
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
136
|
+
*
|
|
137
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
138
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
139
|
+
* match that Workspace.
|
|
140
|
+
*/
|
|
141
|
+
workspace_id?: string;
|
|
90
142
|
}
|
|
91
143
|
export interface VersionListParams extends PageCursorParams {
|
|
144
|
+
/**
|
|
145
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
146
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
147
|
+
*
|
|
148
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
149
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
150
|
+
* match that Workspace.
|
|
151
|
+
*/
|
|
152
|
+
workspace_id?: string;
|
|
92
153
|
}
|
|
93
154
|
export interface VersionDeleteParams {
|
|
94
155
|
/**
|
|
95
|
-
* Unique identifier for the skill.
|
|
156
|
+
* Path param: Unique identifier for the skill.
|
|
96
157
|
*
|
|
97
158
|
* The format and length of IDs may change over time.
|
|
98
159
|
*/
|
|
99
160
|
skill_id: string;
|
|
161
|
+
/**
|
|
162
|
+
* Header param: Optional header to select the Workspace for this request. The
|
|
163
|
+
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
|
|
164
|
+
*
|
|
165
|
+
* Only needed for credentials that can act on more than one Workspace. A
|
|
166
|
+
* credential that belongs to a specific Workspace may omit it; if sent, it must
|
|
167
|
+
* match that Workspace.
|
|
168
|
+
*/
|
|
169
|
+
workspace_id?: string;
|
|
100
170
|
}
|
|
101
171
|
export declare namespace Versions {
|
|
102
172
|
export { type DeletedSkillVersion as DeletedSkillVersion, type SkillVersion as SkillVersion, type SkillVersionsPageCursor as SkillVersionsPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,iCAA8B;AACvF,OAAO,EAAE,KAAK,UAAU,EAAE,8BAA2B;
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,iCAA8B;AACvF,OAAO,EAAE,KAAK,UAAU,EAAE,8BAA2B;AAErD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAIhE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAmBxG;;;;;;;;;;OAUG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAW3B;;;;;;;;;;;;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H,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -4,37 +4,97 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Versions = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../internal/headers.js");
|
|
7
8
|
const uploads_1 = require("../../internal/uploads.js");
|
|
8
9
|
const path_1 = require("../../internal/utils/path.js");
|
|
9
10
|
class Versions extends resource_1.APIResource {
|
|
10
11
|
/**
|
|
11
12
|
* Create Skill Version
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const skillVersion = await client.skills.versions.create(
|
|
17
|
+
* 'skill_id',
|
|
18
|
+
* { files: [fs.createReadStream('path/to/file')] },
|
|
19
|
+
* );
|
|
20
|
+
* ```
|
|
12
21
|
*/
|
|
13
|
-
create(skillID,
|
|
14
|
-
|
|
22
|
+
create(skillID, params, options) {
|
|
23
|
+
const { workspace_id, ...body } = params;
|
|
24
|
+
return this._client.post((0, path_1.path) `/v1/skills/${skillID}/versions`, (0, uploads_1.multipartFormRequestOptions)({
|
|
25
|
+
body,
|
|
26
|
+
...options,
|
|
27
|
+
headers: (0, headers_1.buildHeaders)([
|
|
28
|
+
{ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
|
|
29
|
+
options?.headers,
|
|
30
|
+
]),
|
|
31
|
+
}, this._client, false));
|
|
15
32
|
}
|
|
16
33
|
/**
|
|
17
34
|
* Get Skill Version
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const skillVersion = await client.skills.versions.retrieve(
|
|
39
|
+
* 'version',
|
|
40
|
+
* { skill_id: 'skill_id' },
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
18
43
|
*/
|
|
19
44
|
retrieve(version, params, options) {
|
|
20
|
-
const { skill_id } = params;
|
|
21
|
-
return this._client.get((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}`,
|
|
45
|
+
const { skill_id, workspace_id } = params;
|
|
46
|
+
return this._client.get((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}`, {
|
|
47
|
+
...options,
|
|
48
|
+
headers: (0, headers_1.buildHeaders)([
|
|
49
|
+
{ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
|
|
50
|
+
options?.headers,
|
|
51
|
+
]),
|
|
52
|
+
});
|
|
22
53
|
}
|
|
23
54
|
/**
|
|
24
55
|
* List Skill Versions
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* // Automatically fetches more pages as needed.
|
|
60
|
+
* for await (const skillVersion of client.skills.versions.list(
|
|
61
|
+
* 'skill_id',
|
|
62
|
+
* )) {
|
|
63
|
+
* // ...
|
|
64
|
+
* }
|
|
65
|
+
* ```
|
|
25
66
|
*/
|
|
26
|
-
list(skillID,
|
|
67
|
+
list(skillID, params = {}, options) {
|
|
68
|
+
const { workspace_id, ...query } = params ?? {};
|
|
27
69
|
return this._client.getAPIList((0, path_1.path) `/v1/skills/${skillID}/versions`, (pagination_1.PageCursor), {
|
|
28
70
|
query,
|
|
29
71
|
...options,
|
|
72
|
+
headers: (0, headers_1.buildHeaders)([
|
|
73
|
+
{ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
|
|
74
|
+
options?.headers,
|
|
75
|
+
]),
|
|
30
76
|
});
|
|
31
77
|
}
|
|
32
78
|
/**
|
|
33
79
|
* Delete Skill Version
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* const deletedSkillVersion =
|
|
84
|
+
* await client.skills.versions.delete('version', {
|
|
85
|
+
* skill_id: 'skill_id',
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
34
88
|
*/
|
|
35
89
|
delete(version, params, options) {
|
|
36
|
-
const { skill_id } = params;
|
|
37
|
-
return this._client.delete((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}`,
|
|
90
|
+
const { skill_id, workspace_id } = params;
|
|
91
|
+
return this._client.delete((0, path_1.path) `/v1/skills/${skill_id}/versions/${version}`, {
|
|
92
|
+
...options,
|
|
93
|
+
headers: (0, headers_1.buildHeaders)([
|
|
94
|
+
{ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
|
|
95
|
+
options?.headers,
|
|
96
|
+
]),
|
|
97
|
+
});
|
|
38
98
|
}
|
|
39
99
|
}
|
|
40
100
|
exports.Versions = Versions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAuF;
|
|
1
|
+
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAuF;AAEvF,uDAAsD;AAEtD,uDAAqE;AACrE,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,OAAe,EAAE,MAA2B,EAAE,OAAwB;QAC3E,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACz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BACpB,EAAE,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,wBAAwB,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACtF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,cAAc,QAAQ,aAAa,OAAO,EAAE,EAAE;YAC3E,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,wBAAwB,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACtF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA/GD,4BA+GC"}
|
|
@@ -1,37 +1,97 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import { PageCursor } from "../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
5
|
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
|
|
5
6
|
import { path } from "../../internal/utils/path.mjs";
|
|
6
7
|
export class Versions extends APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Create Skill Version
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const skillVersion = await client.skills.versions.create(
|
|
14
|
+
* 'skill_id',
|
|
15
|
+
* { files: [fs.createReadStream('path/to/file')] },
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
9
18
|
*/
|
|
10
|
-
create(skillID,
|
|
11
|
-
|
|
19
|
+
create(skillID, params, options) {
|
|
20
|
+
const { workspace_id, ...body } = params;
|
|
21
|
+
return this._client.post(path `/v1/skills/${skillID}/versions`, multipartFormRequestOptions({
|
|
22
|
+
body,
|
|
23
|
+
...options,
|
|
24
|
+
headers: buildHeaders([
|
|
25
|
+
{ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
|
|
26
|
+
options?.headers,
|
|
27
|
+
]),
|
|
28
|
+
}, this._client, false));
|
|
12
29
|
}
|
|
13
30
|
/**
|
|
14
31
|
* Get Skill Version
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const skillVersion = await client.skills.versions.retrieve(
|
|
36
|
+
* 'version',
|
|
37
|
+
* { skill_id: 'skill_id' },
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
15
40
|
*/
|
|
16
41
|
retrieve(version, params, options) {
|
|
17
|
-
const { skill_id } = params;
|
|
18
|
-
return this._client.get(path `/v1/skills/${skill_id}/versions/${version}`,
|
|
42
|
+
const { skill_id, workspace_id } = params;
|
|
43
|
+
return this._client.get(path `/v1/skills/${skill_id}/versions/${version}`, {
|
|
44
|
+
...options,
|
|
45
|
+
headers: buildHeaders([
|
|
46
|
+
{ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
|
|
47
|
+
options?.headers,
|
|
48
|
+
]),
|
|
49
|
+
});
|
|
19
50
|
}
|
|
20
51
|
/**
|
|
21
52
|
* List Skill Versions
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* // Automatically fetches more pages as needed.
|
|
57
|
+
* for await (const skillVersion of client.skills.versions.list(
|
|
58
|
+
* 'skill_id',
|
|
59
|
+
* )) {
|
|
60
|
+
* // ...
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
22
63
|
*/
|
|
23
|
-
list(skillID,
|
|
64
|
+
list(skillID, params = {}, options) {
|
|
65
|
+
const { workspace_id, ...query } = params ?? {};
|
|
24
66
|
return this._client.getAPIList(path `/v1/skills/${skillID}/versions`, (PageCursor), {
|
|
25
67
|
query,
|
|
26
68
|
...options,
|
|
69
|
+
headers: buildHeaders([
|
|
70
|
+
{ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
|
|
71
|
+
options?.headers,
|
|
72
|
+
]),
|
|
27
73
|
});
|
|
28
74
|
}
|
|
29
75
|
/**
|
|
30
76
|
* Delete Skill Version
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const deletedSkillVersion =
|
|
81
|
+
* await client.skills.versions.delete('version', {
|
|
82
|
+
* skill_id: 'skill_id',
|
|
83
|
+
* });
|
|
84
|
+
* ```
|
|
31
85
|
*/
|
|
32
86
|
delete(version, params, options) {
|
|
33
|
-
const { skill_id } = params;
|
|
34
|
-
return this._client.delete(path `/v1/skills/${skill_id}/versions/${version}`,
|
|
87
|
+
const { skill_id, workspace_id } = params;
|
|
88
|
+
return this._client.delete(path `/v1/skills/${skill_id}/versions/${version}`, {
|
|
89
|
+
...options,
|
|
90
|
+
headers: buildHeaders([
|
|
91
|
+
{ ...(workspace_id != null ? { 'anthropic-workspace-id': workspace_id } : undefined) },
|
|
92
|
+
options?.headers,
|
|
93
|
+
]),
|
|
94
|
+
});
|
|
35
95
|
}
|
|
36
96
|
}
|
|
37
97
|
//# sourceMappingURL=versions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.mjs","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,UAAU,EAAsC,kCAA8B;
|
|
1
|
+
{"version":3,"file":"versions.mjs","sourceRoot":"","sources":["../../src/resources/skills/versions.ts"],"names":[],"mappings":"AAAA,s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CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,OAAe,EACf,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,cAAc,OAAO,WAAW,EAAE,CAAA,UAAwB,CAAA,EAAE;YAC7F,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,wBAAwB,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACtF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,cAAc,QAAQ,aAAa,OAAO,EAAE,EAAE;YAC3E,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,wBAAwB,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACtF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -55,9 +55,12 @@ import {
|
|
|
55
55
|
} from './resources/completions';
|
|
56
56
|
import {
|
|
57
57
|
DeletedFile,
|
|
58
|
+
FileDeleteParams,
|
|
59
|
+
FileDownloadParams,
|
|
58
60
|
FileListParams,
|
|
59
61
|
FileMetadata,
|
|
60
62
|
FileMetadataPageCursor,
|
|
63
|
+
FileRetrieveMetadataParams,
|
|
61
64
|
FileUploadParams,
|
|
62
65
|
Files,
|
|
63
66
|
} from './resources/files';
|
|
@@ -337,7 +340,9 @@ import {
|
|
|
337
340
|
DeletedSkill,
|
|
338
341
|
Skill,
|
|
339
342
|
SkillCreateParams,
|
|
343
|
+
SkillDeleteParams,
|
|
340
344
|
SkillListParams,
|
|
345
|
+
SkillRetrieveParams,
|
|
341
346
|
SkillSource,
|
|
342
347
|
Skills,
|
|
343
348
|
SkillsPageCursor,
|
|
@@ -781,7 +786,8 @@ export class BaseAnthropic {
|
|
|
781
786
|
}
|
|
782
787
|
|
|
783
788
|
/**
|
|
784
|
-
* Create a new client instance re-using the same options given to the
|
|
789
|
+
* Create a new client instance re-using the same options given to the
|
|
790
|
+
* current client with optional overriding.
|
|
785
791
|
*/
|
|
786
792
|
withOptions(options: Partial<ClientOptions>): this {
|
|
787
793
|
// Share the auth state object unless the caller passes any auth-related
|
|
@@ -1982,6 +1988,9 @@ export declare namespace Anthropic {
|
|
|
1982
1988
|
type FileMetadata as FileMetadata,
|
|
1983
1989
|
type FileMetadataPageCursor as FileMetadataPageCursor,
|
|
1984
1990
|
type FileListParams as FileListParams,
|
|
1991
|
+
type FileDeleteParams as FileDeleteParams,
|
|
1992
|
+
type FileDownloadParams as FileDownloadParams,
|
|
1993
|
+
type FileRetrieveMetadataParams as FileRetrieveMetadataParams,
|
|
1985
1994
|
type FileUploadParams as FileUploadParams,
|
|
1986
1995
|
};
|
|
1987
1996
|
|
|
@@ -1992,7 +2001,9 @@ export declare namespace Anthropic {
|
|
|
1992
2001
|
type SkillSource as SkillSource,
|
|
1993
2002
|
type SkillsPageCursor as SkillsPageCursor,
|
|
1994
2003
|
type SkillCreateParams as SkillCreateParams,
|
|
2004
|
+
type SkillRetrieveParams as SkillRetrieveParams,
|
|
1995
2005
|
type SkillListParams as SkillListParams,
|
|
2006
|
+
type SkillDeleteParams as SkillDeleteParams,
|
|
1996
2007
|
};
|
|
1997
2008
|
|
|
1998
2009
|
export {
|
package/src/core/credentials.ts
CHANGED
|
@@ -146,8 +146,7 @@ export const loadConfigWithSource = async (profile?: string): Promise<LoadedConf
|
|
|
146
146
|
}
|
|
147
147
|
validateProfileName(profileName);
|
|
148
148
|
|
|
149
|
-
const fs = await import('node
|
|
150
|
-
const path = await import('node:path');
|
|
149
|
+
const { fs, path } = await import('../internal/node');
|
|
151
150
|
const configPath = path.join(rootConfigPath, 'configs', `${profileName}.json`);
|
|
152
151
|
let configRaw: string | null;
|
|
153
152
|
try {
|
|
@@ -252,7 +251,7 @@ export const loadCredentials = async (): Promise<AnthropicCredentials | null> =>
|
|
|
252
251
|
return null;
|
|
253
252
|
}
|
|
254
253
|
|
|
255
|
-
const fs = await import('node
|
|
254
|
+
const { fs } = await import('../internal/node');
|
|
256
255
|
let raw: string;
|
|
257
256
|
try {
|
|
258
257
|
raw = await fs.promises.readFile(credentialsPath, 'utf-8');
|
|
@@ -304,7 +303,7 @@ export const getCredentialsPath = async (
|
|
|
304
303
|
}
|
|
305
304
|
validateProfileName(profileName);
|
|
306
305
|
|
|
307
|
-
const path = await import('node
|
|
306
|
+
const { path } = await import('../internal/node');
|
|
308
307
|
return path.join(rootConfigPath, 'credentials', `${profileName}.json`);
|
|
309
308
|
};
|
|
310
309
|
|
|
@@ -313,7 +312,7 @@ const getRootConfigPath = async (): Promise<string | null> => {
|
|
|
313
312
|
return null;
|
|
314
313
|
}
|
|
315
314
|
|
|
316
|
-
const path = await import('node
|
|
315
|
+
const { path } = await import('../internal/node');
|
|
317
316
|
|
|
318
317
|
// ANTHROPIC_CONFIG_DIR is treated as a trusted path: it is set by the
|
|
319
318
|
// process operator, not by remote input, so it is not validated.
|
|
@@ -365,8 +364,7 @@ const getActiveProfileName = async (): Promise<string | null> => {
|
|
|
365
364
|
return profileName;
|
|
366
365
|
}
|
|
367
366
|
|
|
368
|
-
const fs = await import('node
|
|
369
|
-
const path = await import('node:path');
|
|
367
|
+
const { fs, path } = await import('../internal/node');
|
|
370
368
|
const filePath = path.join(rootConfigPath, 'active_config');
|
|
371
369
|
try {
|
|
372
370
|
return (await fs.promises.readFile(filePath, 'utf-8')).trim() || 'default';
|
package/src/core/streaming.ts
CHANGED
|
@@ -329,10 +329,12 @@ async function* iterSSEChunks(iterator: AsyncIterableIterator<Bytes>): AsyncGene
|
|
|
329
329
|
newData.set(binaryChunk, data.length);
|
|
330
330
|
data = newData;
|
|
331
331
|
|
|
332
|
+
// Yield views, not copies, so a chunk holding many events is not re-copied
|
|
333
|
+
// once per event. This relies on newData never being written again.
|
|
332
334
|
let patternIndex;
|
|
333
335
|
while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) {
|
|
334
|
-
yield data.
|
|
335
|
-
data = data.
|
|
336
|
+
yield data.subarray(0, patternIndex);
|
|
337
|
+
data = data.subarray(patternIndex);
|
|
336
338
|
}
|
|
337
339
|
}
|
|
338
340
|
|