@anthropic-ai/sdk 0.121.0 → 0.123.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 +63 -0
- package/README.md +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/middleware.d.mts.map +1 -1
- package/core/middleware.d.ts.map +1 -1
- package/core/middleware.js +4 -4
- package/core/middleware.js.map +1 -1
- package/core/middleware.mjs +4 -4
- package/core/middleware.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +3 -1
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs +3 -1
- package/internal/errors.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/internal/parse.js +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/uploads.js +10 -6
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +10 -6
- package/internal/uploads.mjs.map +1 -1
- 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/lib/sessions/accumulate.d.mts +3 -2
- package/lib/sessions/accumulate.d.mts.map +1 -1
- package/lib/sessions/accumulate.d.ts +3 -2
- package/lib/sessions/accumulate.d.ts.map +1 -1
- package/lib/sessions/accumulate.js +3 -45
- package/lib/sessions/accumulate.js.map +1 -1
- package/lib/sessions/accumulate.mjs +3 -45
- package/lib/sessions/accumulate.mjs.map +1 -1
- package/package.json +3 -1
- package/resources/beta/agents/agents.d.mts +1 -1
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +1 -1
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/beta.d.mts +9 -9
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +9 -9
- 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 +6 -6
- package/resources/beta/deployment-runs.d.ts +6 -6
- package/resources/beta/deployments.d.mts +3 -2
- package/resources/beta/deployments.d.mts.map +1 -1
- package/resources/beta/deployments.d.ts +3 -2
- package/resources/beta/deployments.d.ts.map +1 -1
- package/resources/beta/dreams.d.mts +28 -1
- package/resources/beta/dreams.d.mts.map +1 -1
- package/resources/beta/dreams.d.ts +28 -1
- package/resources/beta/dreams.d.ts.map +1 -1
- package/resources/beta/files.d.mts +25 -5
- package/resources/beta/files.d.mts.map +1 -1
- package/resources/beta/files.d.ts +25 -5
- package/resources/beta/files.d.ts.map +1 -1
- package/resources/beta/files.js +6 -6
- package/resources/beta/files.js.map +1 -1
- package/resources/beta/files.mjs +7 -7
- package/resources/beta/files.mjs.map +1 -1
- package/resources/beta/index.d.mts +4 -4
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +4 -4
- 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 +6 -4
- package/resources/beta/memory-stores/memories.d.mts.map +1 -1
- package/resources/beta/memory-stores/memories.d.ts +6 -4
- package/resources/beta/memory-stores/memories.d.ts.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 -21
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +148 -21
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/organization/compliance-settings.d.mts +74 -0
- package/resources/beta/organization/compliance-settings.d.mts.map +1 -0
- package/resources/beta/organization/compliance-settings.d.ts +74 -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/rate-limits.d.mts +2 -3
- package/resources/beta/organization/rate-limits.d.mts.map +1 -1
- package/resources/beta/organization/rate-limits.d.ts +2 -3
- package/resources/beta/organization/rate-limits.d.ts.map +1 -1
- package/resources/beta/organization/rate-limits.js +2 -3
- package/resources/beta/organization/rate-limits.js.map +1 -1
- package/resources/beta/organization/rate-limits.mjs +2 -3
- package/resources/beta/organization/rate-limits.mjs.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.d.mts +2 -3
- package/resources/beta/organization/workspaces/rate-limits.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.d.ts +2 -3
- package/resources/beta/organization/workspaces/rate-limits.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.js +2 -3
- package/resources/beta/organization/workspaces/rate-limits.js.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.mjs +2 -3
- package/resources/beta/organization/workspaces/rate-limits.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 +1 -1
- package/resources/beta/sessions/events.d.ts +1 -1
- package/resources/beta/sessions/sessions.d.mts +10 -10
- package/resources/beta/sessions/sessions.d.ts +10 -10
- package/resources/beta/skills/index.d.mts +2 -2
- package/resources/beta/skills/index.d.mts.map +1 -1
- package/resources/beta/skills/index.d.ts +2 -2
- package/resources/beta/skills/index.d.ts.map +1 -1
- package/resources/beta/skills/index.js.map +1 -1
- package/resources/beta/skills/index.mjs.map +1 -1
- package/resources/beta/skills/skills.d.mts +48 -120
- package/resources/beta/skills/skills.d.mts.map +1 -1
- package/resources/beta/skills/skills.d.ts +48 -120
- package/resources/beta/skills/skills.d.ts.map +1 -1
- package/resources/beta/skills/skills.js +12 -8
- package/resources/beta/skills/skills.js.map +1 -1
- package/resources/beta/skills/skills.mjs +12 -8
- package/resources/beta/skills/skills.mjs.map +1 -1
- package/resources/beta/skills/versions.d.mts +35 -138
- package/resources/beta/skills/versions.d.mts.map +1 -1
- package/resources/beta/skills/versions.d.ts +35 -138
- package/resources/beta/skills/versions.d.ts.map +1 -1
- package/resources/beta/skills/versions.js +18 -18
- package/resources/beta/skills/versions.js.map +1 -1
- package/resources/beta/skills/versions.mjs +18 -18
- package/resources/beta/skills/versions.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/webhooks.d.mts +16 -17
- package/resources/beta/webhooks.d.mts.map +1 -1
- package/resources/beta/webhooks.d.ts +16 -17
- package/resources/beta/webhooks.d.ts.map +1 -1
- package/resources/beta/webhooks.js +21 -8
- package/resources/beta/webhooks.js.map +1 -1
- package/resources/beta/webhooks.mjs +21 -8
- package/resources/beta/webhooks.mjs.map +1 -1
- package/resources/messages/messages.d.mts +1 -3
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +1 -3
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/src/core/credentials.ts +5 -7
- package/src/core/middleware.ts +4 -3
- package/src/internal/errors.ts +3 -1
- 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/internal/parse.ts +1 -1
- package/src/internal/uploads.ts +10 -7
- 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/lib/sessions/accumulate.ts +7 -47
- package/src/resources/beta/agents/agents.ts +1 -0
- package/src/resources/beta/beta.ts +28 -15
- package/src/resources/beta/deployment-runs.ts +6 -6
- package/src/resources/beta/deployments.ts +3 -2
- package/src/resources/beta/dreams.ts +42 -0
- package/src/resources/beta/files.ts +34 -11
- package/src/resources/beta/index.ts +12 -7
- package/src/resources/beta/memory-stores/memories.ts +6 -4
- package/src/resources/beta/messages/index.ts +5 -1
- package/src/resources/beta/messages/messages.ts +171 -30
- package/src/resources/beta/organization/compliance-settings.ts +96 -0
- package/src/resources/beta/organization/external-keys.ts +6 -3
- package/src/resources/beta/organization/index.ts +9 -0
- package/src/resources/beta/organization/organization.ts +24 -0
- package/src/resources/beta/organization/rate-limits.ts +2 -3
- package/src/resources/beta/organization/workspaces/rate-limits.ts +2 -3
- package/src/resources/beta/organization/workspaces/workspaces.ts +28 -12
- package/src/resources/beta/sessions/events.ts +1 -1
- package/src/resources/beta/sessions/sessions.ts +10 -10
- package/src/resources/beta/skills/index.ts +7 -10
- package/src/resources/beta/skills/skills.ts +60 -150
- package/src/resources/beta/skills/versions.ts +43 -166
- package/src/resources/beta/user-profiles.ts +24 -27
- package/src/resources/beta/webhooks.ts +25 -29
- package/src/resources/messages/messages.ts +2 -8
- package/src/tools/agent-toolset/fs-util.ts +6 -5
- package/src/tools/agent-toolset/memories.ts +5 -3
- package/src/tools/agent-toolset/node.browser.ts +0 -4
- package/src/tools/agent-toolset/node.ts +118 -13
- package/src/tools/agent-toolset/skills.ts +10 -43
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.d.mts.map +1 -1
- package/tools/agent-toolset/fs-util.d.ts.map +1 -1
- package/tools/agent-toolset/fs-util.js +13 -15
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +3 -4
- 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/node.browser.d.mts +0 -1
- package/tools/agent-toolset/node.browser.d.mts.map +1 -1
- package/tools/agent-toolset/node.browser.d.ts +0 -1
- package/tools/agent-toolset/node.browser.d.ts.map +1 -1
- package/tools/agent-toolset/node.browser.js +0 -4
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.browser.mjs +0 -3
- package/tools/agent-toolset/node.browser.mjs.map +1 -1
- package/tools/agent-toolset/node.d.mts +9 -7
- package/tools/agent-toolset/node.d.mts.map +1 -1
- package/tools/agent-toolset/node.d.ts +9 -7
- package/tools/agent-toolset/node.d.ts.map +1 -1
- package/tools/agent-toolset/node.js +96 -8
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +96 -7
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/tools/agent-toolset/skills.d.mts +0 -8
- package/tools/agent-toolset/skills.d.mts.map +1 -1
- package/tools/agent-toolset/skills.d.ts +0 -8
- package/tools/agent-toolset/skills.d.ts.map +1 -1
- package/tools/agent-toolset/skills.js +20 -46
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/skills.mjs +9 -33
- 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
|
@@ -614,7 +614,7 @@ export type BetaManagedAgentsMultiagentRosterEntryParams =
|
|
|
614
614
|
| BetaManagedAgentsAdvisorParams;
|
|
615
615
|
|
|
616
616
|
/**
|
|
617
|
-
* Evaluation state for a single outcome defined via a define_outcome event.
|
|
617
|
+
* Evaluation state for a single outcome defined via a `define_outcome` event.
|
|
618
618
|
*/
|
|
619
619
|
export interface BetaManagedAgentsOutcomeEvaluationResource {
|
|
620
620
|
/**
|
|
@@ -628,9 +628,9 @@ export interface BetaManagedAgentsOutcomeEvaluationResource {
|
|
|
628
628
|
description: string;
|
|
629
629
|
|
|
630
630
|
/**
|
|
631
|
-
* Grader's verdict text from the most recent evaluation. For satisfied
|
|
632
|
-
* why criteria are met; for needs_revision (intermediate), what's missing; for
|
|
633
|
-
* failed
|
|
631
|
+
* Grader's verdict text from the most recent evaluation. For `satisfied`, explains
|
|
632
|
+
* why criteria are met; for `needs_revision` (intermediate), what's missing; for
|
|
633
|
+
* `failed`, why unrecoverable.
|
|
634
634
|
*/
|
|
635
635
|
explanation: string | null;
|
|
636
636
|
|
|
@@ -702,7 +702,7 @@ export interface BetaManagedAgentsSession {
|
|
|
702
702
|
metadata: { [key: string]: string };
|
|
703
703
|
|
|
704
704
|
/**
|
|
705
|
-
* Per-outcome evaluation state. One entry per define_outcome event sent to the
|
|
705
|
+
* Per-outcome evaluation state. One entry per `define_outcome` event sent to the
|
|
706
706
|
* session.
|
|
707
707
|
*/
|
|
708
708
|
outcome_evaluations: Array<BetaManagedAgentsOutcomeEvaluationResource>;
|
|
@@ -826,7 +826,7 @@ export interface BetaManagedAgentsSessionMultiagentCoordinator {
|
|
|
826
826
|
*/
|
|
827
827
|
export interface BetaManagedAgentsSessionStats {
|
|
828
828
|
/**
|
|
829
|
-
* Cumulative time in seconds the session spent in running status. Excludes idle
|
|
829
|
+
* Cumulative time in seconds the session spent in `running` status. Excludes idle
|
|
830
830
|
* time.
|
|
831
831
|
*/
|
|
832
832
|
active_seconds?: number;
|
|
@@ -1173,7 +1173,7 @@ export interface SessionListParams extends BidirectionalPageCursorParams {
|
|
|
1173
1173
|
agent_id?: string;
|
|
1174
1174
|
|
|
1175
1175
|
/**
|
|
1176
|
-
* Query param: Filter by agent version. Only applies when agent_id is also set.
|
|
1176
|
+
* Query param: Filter by agent version. Only applies when `agent_id` is also set.
|
|
1177
1177
|
*/
|
|
1178
1178
|
agent_version?: number;
|
|
1179
1179
|
|
|
@@ -1209,14 +1209,14 @@ export interface SessionListParams extends BidirectionalPageCursorParams {
|
|
|
1209
1209
|
include_archived?: boolean;
|
|
1210
1210
|
|
|
1211
1211
|
/**
|
|
1212
|
-
* Query param: Filter sessions whose resources contain a memory_store with this
|
|
1212
|
+
* Query param: Filter sessions whose resources contain a `memory_store` with this
|
|
1213
1213
|
* memory store ID.
|
|
1214
1214
|
*/
|
|
1215
1215
|
memory_store_id?: string;
|
|
1216
1216
|
|
|
1217
1217
|
/**
|
|
1218
|
-
* Query param: Sort direction for results, ordered by created_at
|
|
1219
|
-
* (newest first).
|
|
1218
|
+
* Query param: Sort direction for results, ordered by `created_at`. Defaults to
|
|
1219
|
+
* `desc` (newest first).
|
|
1220
1220
|
*/
|
|
1221
1221
|
order?: 'asc' | 'desc';
|
|
1222
1222
|
|
|
@@ -2,26 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
Skills,
|
|
5
|
-
type
|
|
6
|
-
type
|
|
7
|
-
type
|
|
8
|
-
type SkillDeleteResponse,
|
|
5
|
+
type BetaDeletedSkill,
|
|
6
|
+
type BetaSkill,
|
|
7
|
+
type BetaSkillSource,
|
|
9
8
|
type SkillCreateParams,
|
|
10
9
|
type SkillRetrieveParams,
|
|
11
10
|
type SkillListParams,
|
|
12
11
|
type SkillDeleteParams,
|
|
13
|
-
type
|
|
12
|
+
type BetaSkillsPageCursor,
|
|
14
13
|
} from './skills';
|
|
15
14
|
export {
|
|
16
15
|
Versions,
|
|
17
|
-
type
|
|
18
|
-
type
|
|
19
|
-
type VersionListResponse,
|
|
20
|
-
type VersionDeleteResponse,
|
|
16
|
+
type BetaDeletedSkillVersion,
|
|
17
|
+
type BetaSkillVersion,
|
|
21
18
|
type VersionCreateParams,
|
|
22
19
|
type VersionRetrieveParams,
|
|
23
20
|
type VersionListParams,
|
|
24
21
|
type VersionDeleteParams,
|
|
25
22
|
type VersionDownloadParams,
|
|
26
|
-
type
|
|
23
|
+
type BetaSkillVersionsPageCursor,
|
|
27
24
|
} from './versions';
|
|
@@ -4,16 +4,14 @@ import { APIResource } from '../../../core/resource';
|
|
|
4
4
|
import * as BetaAPI from '../beta';
|
|
5
5
|
import * as VersionsAPI from './versions';
|
|
6
6
|
import {
|
|
7
|
+
BetaDeletedSkillVersion,
|
|
8
|
+
BetaSkillVersion,
|
|
9
|
+
BetaSkillVersionsPageCursor,
|
|
7
10
|
VersionCreateParams,
|
|
8
|
-
VersionCreateResponse,
|
|
9
11
|
VersionDeleteParams,
|
|
10
|
-
VersionDeleteResponse,
|
|
11
12
|
VersionDownloadParams,
|
|
12
13
|
VersionListParams,
|
|
13
|
-
VersionListResponse,
|
|
14
|
-
VersionListResponsesPageCursor,
|
|
15
14
|
VersionRetrieveParams,
|
|
16
|
-
VersionRetrieveResponse,
|
|
17
15
|
Versions,
|
|
18
16
|
} from './versions';
|
|
19
17
|
import { APIPromise } from '../../../core/api-promise';
|
|
@@ -32,12 +30,12 @@ export class Skills extends APIResource {
|
|
|
32
30
|
*
|
|
33
31
|
* @example
|
|
34
32
|
* ```ts
|
|
35
|
-
* const
|
|
33
|
+
* const betaSkill = await client.beta.skills.create({
|
|
36
34
|
* files: [fs.createReadStream('path/to/file')],
|
|
37
35
|
* });
|
|
38
36
|
* ```
|
|
39
37
|
*/
|
|
40
|
-
create(params: SkillCreateParams, options?: RequestOptions): APIPromise<
|
|
38
|
+
create(params: SkillCreateParams, options?: RequestOptions): APIPromise<BetaSkill> {
|
|
41
39
|
const { betas, ...body } = params;
|
|
42
40
|
return this._client.post(
|
|
43
41
|
'/v1/skills?beta=true',
|
|
@@ -46,7 +44,7 @@ export class Skills extends APIResource {
|
|
|
46
44
|
body,
|
|
47
45
|
...options,
|
|
48
46
|
headers: buildHeaders([
|
|
49
|
-
{
|
|
47
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
50
48
|
options?.headers,
|
|
51
49
|
]),
|
|
52
50
|
},
|
|
@@ -61,19 +59,21 @@ export class Skills extends APIResource {
|
|
|
61
59
|
*
|
|
62
60
|
* @example
|
|
63
61
|
* ```ts
|
|
64
|
-
* const
|
|
62
|
+
* const betaSkill = await client.beta.skills.retrieve(
|
|
63
|
+
* 'skill_id',
|
|
64
|
+
* );
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
67
|
retrieve(
|
|
68
68
|
skillID: string,
|
|
69
69
|
params: SkillRetrieveParams | null | undefined = {},
|
|
70
70
|
options?: RequestOptions,
|
|
71
|
-
): APIPromise<
|
|
71
|
+
): APIPromise<BetaSkill> {
|
|
72
72
|
const { betas } = params ?? {};
|
|
73
73
|
return this._client.get(path`/v1/skills/${skillID}?beta=true`, {
|
|
74
74
|
...options,
|
|
75
75
|
headers: buildHeaders([
|
|
76
|
-
{
|
|
76
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
77
77
|
options?.headers,
|
|
78
78
|
]),
|
|
79
79
|
});
|
|
@@ -85,7 +85,7 @@ export class Skills extends APIResource {
|
|
|
85
85
|
* @example
|
|
86
86
|
* ```ts
|
|
87
87
|
* // Automatically fetches more pages as needed.
|
|
88
|
-
* for await (const
|
|
88
|
+
* for await (const betaSkill of client.beta.skills.list()) {
|
|
89
89
|
* // ...
|
|
90
90
|
* }
|
|
91
91
|
* ```
|
|
@@ -93,13 +93,13 @@ export class Skills extends APIResource {
|
|
|
93
93
|
list(
|
|
94
94
|
params: SkillListParams | null | undefined = {},
|
|
95
95
|
options?: RequestOptions,
|
|
96
|
-
): PagePromise<
|
|
96
|
+
): PagePromise<BetaSkillsPageCursor, BetaSkill> {
|
|
97
97
|
const { betas, ...query } = params ?? {};
|
|
98
|
-
return this._client.getAPIList('/v1/skills?beta=true', PageCursor<
|
|
98
|
+
return this._client.getAPIList('/v1/skills?beta=true', PageCursor<BetaSkill>, {
|
|
99
99
|
query,
|
|
100
100
|
...options,
|
|
101
101
|
headers: buildHeaders([
|
|
102
|
-
{
|
|
102
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
103
103
|
options?.headers,
|
|
104
104
|
]),
|
|
105
105
|
});
|
|
@@ -110,28 +110,30 @@ export class Skills extends APIResource {
|
|
|
110
110
|
*
|
|
111
111
|
* @example
|
|
112
112
|
* ```ts
|
|
113
|
-
* const
|
|
113
|
+
* const betaDeletedSkill = await client.beta.skills.delete(
|
|
114
|
+
* 'skill_id',
|
|
115
|
+
* );
|
|
114
116
|
* ```
|
|
115
117
|
*/
|
|
116
118
|
delete(
|
|
117
119
|
skillID: string,
|
|
118
120
|
params: SkillDeleteParams | null | undefined = {},
|
|
119
121
|
options?: RequestOptions,
|
|
120
|
-
): APIPromise<
|
|
122
|
+
): APIPromise<BetaDeletedSkill> {
|
|
121
123
|
const { betas } = params ?? {};
|
|
122
124
|
return this._client.delete(path`/v1/skills/${skillID}?beta=true`, {
|
|
123
125
|
...options,
|
|
124
126
|
headers: buildHeaders([
|
|
125
|
-
{
|
|
127
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
126
128
|
options?.headers,
|
|
127
129
|
]),
|
|
128
130
|
});
|
|
129
131
|
}
|
|
130
132
|
}
|
|
131
133
|
|
|
132
|
-
export type
|
|
134
|
+
export type BetaSkillsPageCursor = PageCursor<BetaSkill>;
|
|
133
135
|
|
|
134
|
-
export interface
|
|
136
|
+
export interface BetaDeletedSkill {
|
|
135
137
|
/**
|
|
136
138
|
* Unique identifier for the skill.
|
|
137
139
|
*
|
|
@@ -140,100 +142,14 @@ export interface SkillCreateResponse {
|
|
|
140
142
|
id: string;
|
|
141
143
|
|
|
142
144
|
/**
|
|
143
|
-
*
|
|
144
|
-
*/
|
|
145
|
-
created_at: string;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Display title for the skill.
|
|
149
|
-
*
|
|
150
|
-
* This is a human-readable label that is not included in the prompt sent to the
|
|
151
|
-
* model.
|
|
152
|
-
*/
|
|
153
|
-
display_title: string | null;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* The latest version identifier for the skill.
|
|
157
|
-
*
|
|
158
|
-
* This represents the most recent version of the skill that has been created.
|
|
159
|
-
*/
|
|
160
|
-
latest_version: string | null;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Source of the skill.
|
|
164
|
-
*
|
|
165
|
-
* This may be one of the following values:
|
|
166
|
-
*
|
|
167
|
-
* - `"custom"`: the skill was created by a user
|
|
168
|
-
* - `"anthropic"`: the skill was created by Anthropic
|
|
169
|
-
*/
|
|
170
|
-
source: string;
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Object type.
|
|
174
|
-
*
|
|
175
|
-
* For Skills, this is always `"skill"`.
|
|
176
|
-
*/
|
|
177
|
-
type: string;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* ISO 8601 timestamp of when the skill was last updated.
|
|
181
|
-
*/
|
|
182
|
-
updated_at: string;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export interface SkillRetrieveResponse {
|
|
186
|
-
/**
|
|
187
|
-
* Unique identifier for the skill.
|
|
188
|
-
*
|
|
189
|
-
* The format and length of IDs may change over time.
|
|
190
|
-
*/
|
|
191
|
-
id: string;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* ISO 8601 timestamp of when the skill was created.
|
|
195
|
-
*/
|
|
196
|
-
created_at: string;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Display title for the skill.
|
|
200
|
-
*
|
|
201
|
-
* This is a human-readable label that is not included in the prompt sent to the
|
|
202
|
-
* model.
|
|
203
|
-
*/
|
|
204
|
-
display_title: string | null;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* The latest version identifier for the skill.
|
|
208
|
-
*
|
|
209
|
-
* This represents the most recent version of the skill that has been created.
|
|
210
|
-
*/
|
|
211
|
-
latest_version: string | null;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Source of the skill.
|
|
215
|
-
*
|
|
216
|
-
* This may be one of the following values:
|
|
217
|
-
*
|
|
218
|
-
* - `"custom"`: the skill was created by a user
|
|
219
|
-
* - `"anthropic"`: the skill was created by Anthropic
|
|
220
|
-
*/
|
|
221
|
-
source: string;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Object type.
|
|
145
|
+
* Deleted object type.
|
|
225
146
|
*
|
|
226
|
-
* For Skills, this is always `"
|
|
227
|
-
*/
|
|
228
|
-
type: string;
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* ISO 8601 timestamp of when the skill was last updated.
|
|
147
|
+
* For Skills, this is always `"skill_deleted"`.
|
|
232
148
|
*/
|
|
233
|
-
|
|
149
|
+
type: 'skill_deleted';
|
|
234
150
|
}
|
|
235
151
|
|
|
236
|
-
export interface
|
|
152
|
+
export interface BetaSkill {
|
|
237
153
|
/**
|
|
238
154
|
* Unique identifier for the skill.
|
|
239
155
|
*
|
|
@@ -247,36 +163,36 @@ export interface SkillListResponse {
|
|
|
247
163
|
created_at: string;
|
|
248
164
|
|
|
249
165
|
/**
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
* model.
|
|
166
|
+
* Human-readable, single-line label for the Skill. Maximum 255 characters. Always
|
|
167
|
+
* set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not
|
|
168
|
+
* unique.
|
|
254
169
|
*/
|
|
255
|
-
|
|
170
|
+
display_name: string;
|
|
256
171
|
|
|
257
172
|
/**
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
* This represents the most recent version of the skill that has been created.
|
|
173
|
+
* ID of the newest Skill Version — what `latest` references resolve to. Always
|
|
174
|
+
* set: a Skill holds at least one version.
|
|
261
175
|
*/
|
|
262
|
-
|
|
176
|
+
latest_version_id: string;
|
|
263
177
|
|
|
264
178
|
/**
|
|
265
|
-
*
|
|
179
|
+
* Where the Skill comes from.
|
|
266
180
|
*
|
|
267
|
-
*
|
|
181
|
+
* Possible values:
|
|
268
182
|
*
|
|
269
|
-
* - `"custom"`: the
|
|
270
|
-
* - `"anthropic"`:
|
|
183
|
+
* - `"custom"`: authored by the platform user; private to their workspace
|
|
184
|
+
* - `"anthropic"`: published by Anthropic; shared and read-only
|
|
185
|
+
* - `"anthropic_example"`: Anthropic-published sample Skill
|
|
186
|
+
* - `"plugin"`: resolved from an installed plugin
|
|
271
187
|
*/
|
|
272
|
-
source:
|
|
188
|
+
source: BetaSkillSource;
|
|
273
189
|
|
|
274
190
|
/**
|
|
275
191
|
* Object type.
|
|
276
192
|
*
|
|
277
193
|
* For Skills, this is always `"skill"`.
|
|
278
194
|
*/
|
|
279
|
-
type:
|
|
195
|
+
type: 'skill';
|
|
280
196
|
|
|
281
197
|
/**
|
|
282
198
|
* ISO 8601 timestamp of when the skill was last updated.
|
|
@@ -284,20 +200,18 @@ export interface SkillListResponse {
|
|
|
284
200
|
updated_at: string;
|
|
285
201
|
}
|
|
286
202
|
|
|
287
|
-
export interface
|
|
203
|
+
export interface BetaSkillSource {
|
|
288
204
|
/**
|
|
289
|
-
*
|
|
205
|
+
* Where the Skill comes from.
|
|
290
206
|
*
|
|
291
|
-
*
|
|
292
|
-
*/
|
|
293
|
-
id: string;
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Deleted object type.
|
|
207
|
+
* Possible values:
|
|
297
208
|
*
|
|
298
|
-
*
|
|
209
|
+
* - `"custom"`: authored by the platform user; private to their workspace
|
|
210
|
+
* - `"anthropic"`: published by Anthropic; shared and read-only
|
|
211
|
+
* - `"anthropic_example"`: Anthropic-published sample Skill
|
|
212
|
+
* - `"plugin"`: resolved from an installed plugin
|
|
299
213
|
*/
|
|
300
|
-
type:
|
|
214
|
+
type: 'custom' | 'anthropic' | 'anthropic_example' | 'plugin';
|
|
301
215
|
}
|
|
302
216
|
|
|
303
217
|
export interface SkillCreateParams {
|
|
@@ -310,12 +224,11 @@ export interface SkillCreateParams {
|
|
|
310
224
|
files: Array<Uploadable>;
|
|
311
225
|
|
|
312
226
|
/**
|
|
313
|
-
* Body param:
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
* model.
|
|
227
|
+
* Body param: Human-readable, single-line label for the Skill. Maximum 255
|
|
228
|
+
* characters. Always set: derived from the SKILL.md frontmatter `name` when
|
|
229
|
+
* omitted at creation. Not unique.
|
|
317
230
|
*/
|
|
318
|
-
|
|
231
|
+
display_name?: string | null;
|
|
319
232
|
|
|
320
233
|
/**
|
|
321
234
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
@@ -358,11 +271,10 @@ Skills.Versions = Versions;
|
|
|
358
271
|
|
|
359
272
|
export declare namespace Skills {
|
|
360
273
|
export {
|
|
361
|
-
type
|
|
362
|
-
type
|
|
363
|
-
type
|
|
364
|
-
type
|
|
365
|
-
type SkillListResponsesPageCursor as SkillListResponsesPageCursor,
|
|
274
|
+
type BetaDeletedSkill as BetaDeletedSkill,
|
|
275
|
+
type BetaSkill as BetaSkill,
|
|
276
|
+
type BetaSkillSource as BetaSkillSource,
|
|
277
|
+
type BetaSkillsPageCursor as BetaSkillsPageCursor,
|
|
366
278
|
type SkillCreateParams as SkillCreateParams,
|
|
367
279
|
type SkillRetrieveParams as SkillRetrieveParams,
|
|
368
280
|
type SkillListParams as SkillListParams,
|
|
@@ -371,11 +283,9 @@ export declare namespace Skills {
|
|
|
371
283
|
|
|
372
284
|
export {
|
|
373
285
|
Versions as Versions,
|
|
374
|
-
type
|
|
375
|
-
type
|
|
376
|
-
type
|
|
377
|
-
type VersionDeleteResponse as VersionDeleteResponse,
|
|
378
|
-
type VersionListResponsesPageCursor as VersionListResponsesPageCursor,
|
|
286
|
+
type BetaDeletedSkillVersion as BetaDeletedSkillVersion,
|
|
287
|
+
type BetaSkillVersion as BetaSkillVersion,
|
|
288
|
+
type BetaSkillVersionsPageCursor as BetaSkillVersionsPageCursor,
|
|
379
289
|
type VersionCreateParams as VersionCreateParams,
|
|
380
290
|
type VersionRetrieveParams as VersionRetrieveParams,
|
|
381
291
|
type VersionListParams as VersionListParams,
|