@anthropic-ai/sdk 0.108.0 → 0.109.1
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 +16 -0
- package/client.d.mts +3 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -1
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +20 -0
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +20 -0
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +26 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +24 -0
- package/core/pagination.mjs.map +1 -1
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +2 -0
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +2 -0
- package/core/streaming.mjs.map +1 -1
- package/lib/sessions/accumulate.d.mts +22 -0
- package/lib/sessions/accumulate.d.mts.map +1 -0
- package/lib/sessions/accumulate.d.ts +22 -0
- package/lib/sessions/accumulate.d.ts.map +1 -0
- package/lib/sessions/accumulate.js +87 -0
- package/lib/sessions/accumulate.js.map +1 -0
- package/lib/sessions/accumulate.mjs +84 -0
- package/lib/sessions/accumulate.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +4 -4
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +4 -4
- 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/environments/work.d.mts +0 -4
- package/resources/beta/environments/work.d.mts.map +1 -1
- package/resources/beta/environments/work.d.ts +0 -4
- package/resources/beta/environments/work.d.ts.map +1 -1
- package/resources/beta/environments/work.js.map +1 -1
- package/resources/beta/environments/work.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 +10 -5
- package/resources/beta/memory-stores/memories.d.mts.map +1 -1
- package/resources/beta/memory-stores/memories.d.ts +10 -5
- package/resources/beta/memory-stores/memories.d.ts.map +1 -1
- package/resources/beta/messages/messages.d.mts +2 -2
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +2 -2
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/sessions/events.d.mts +15 -2
- package/resources/beta/sessions/events.d.mts.map +1 -1
- package/resources/beta/sessions/events.d.ts +15 -2
- package/resources/beta/sessions/events.d.ts.map +1 -1
- package/resources/beta/sessions/events.js +2 -1
- package/resources/beta/sessions/events.js.map +1 -1
- package/resources/beta/sessions/events.mjs +2 -1
- package/resources/beta/sessions/events.mjs.map +1 -1
- package/resources/beta/sessions/index.d.mts +1 -1
- package/resources/beta/sessions/index.d.mts.map +1 -1
- package/resources/beta/sessions/index.d.ts +1 -1
- package/resources/beta/sessions/index.d.ts.map +1 -1
- package/resources/beta/sessions/index.js.map +1 -1
- package/resources/beta/sessions/index.mjs.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +121 -6
- package/resources/beta/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/sessions/sessions.d.ts +121 -6
- package/resources/beta/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/sessions/sessions.js +1 -1
- package/resources/beta/sessions/sessions.js.map +1 -1
- package/resources/beta/sessions/sessions.mjs +2 -2
- package/resources/beta/sessions/sessions.mjs.map +1 -1
- package/resources/beta/sessions/threads/threads.d.mts +1 -1
- package/resources/beta/sessions/threads/threads.d.mts.map +1 -1
- package/resources/beta/sessions/threads/threads.d.ts +1 -1
- package/resources/beta/sessions/threads/threads.d.ts.map +1 -1
- package/resources/beta/sessions/threads/threads.js.map +1 -1
- package/resources/beta/sessions/threads/threads.mjs.map +1 -1
- package/resources/beta/skills/skills.d.mts +11 -9
- package/resources/beta/skills/skills.d.mts.map +1 -1
- package/resources/beta/skills/skills.d.ts +11 -9
- package/resources/beta/skills/skills.d.ts.map +1 -1
- package/resources/beta/skills/skills.js +5 -3
- package/resources/beta/skills/skills.js.map +1 -1
- package/resources/beta/skills/skills.mjs +5 -3
- package/resources/beta/skills/skills.mjs.map +1 -1
- package/resources/beta/skills/versions.d.mts +3 -2
- package/resources/beta/skills/versions.d.mts.map +1 -1
- package/resources/beta/skills/versions.d.ts +3 -2
- package/resources/beta/skills/versions.d.ts.map +1 -1
- package/resources/beta/skills/versions.js +3 -2
- package/resources/beta/skills/versions.js.map +1 -1
- package/resources/beta/skills/versions.mjs +3 -2
- package/resources/beta/skills/versions.mjs.map +1 -1
- package/resources/beta/vaults/credentials.d.mts +52 -1
- package/resources/beta/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/vaults/credentials.d.ts +52 -1
- package/resources/beta/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/vaults/index.d.mts +1 -1
- package/resources/beta/vaults/index.d.mts.map +1 -1
- package/resources/beta/vaults/index.d.ts +1 -1
- package/resources/beta/vaults/index.d.ts.map +1 -1
- package/resources/beta/vaults/index.js.map +1 -1
- package/resources/beta/vaults/index.mjs.map +1 -1
- package/resources/beta/vaults/vaults.d.mts +2 -2
- package/resources/beta/vaults/vaults.d.mts.map +1 -1
- package/resources/beta/vaults/vaults.d.ts +2 -2
- package/resources/beta/vaults/vaults.d.ts.map +1 -1
- package/resources/beta/vaults/vaults.js.map +1 -1
- package/resources/beta/vaults/vaults.mjs.map +1 -1
- package/resources/beta/webhooks.d.mts +119 -2
- package/resources/beta/webhooks.d.mts.map +1 -1
- package/resources/beta/webhooks.d.ts +119 -2
- package/resources/beta/webhooks.d.ts.map +1 -1
- package/resources/messages/messages.d.mts +1 -1
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +1 -1
- package/resources/messages/messages.d.ts.map +1 -1
- package/src/client.ts +8 -0
- package/src/core/pagination.ts +60 -0
- package/src/core/streaming.ts +2 -0
- package/src/lib/sessions/accumulate.ts +129 -0
- package/src/resources/beta/beta.ts +44 -2
- package/src/resources/beta/environments/work.ts +0 -5
- package/src/resources/beta/index.ts +22 -1
- package/src/resources/beta/memory-stores/memories.ts +10 -5
- package/src/resources/beta/messages/messages.ts +2 -2
- package/src/resources/beta/sessions/events.ts +19 -2
- package/src/resources/beta/sessions/index.ts +9 -1
- package/src/resources/beta/sessions/sessions.ts +174 -14
- package/src/resources/beta/sessions/threads/threads.ts +2 -0
- package/src/resources/beta/skills/skills.ts +13 -14
- package/src/resources/beta/skills/versions.ts +4 -3
- package/src/resources/beta/vaults/credentials.ts +63 -0
- package/src/resources/beta/vaults/index.ts +3 -0
- package/src/resources/beta/vaults/vaults.ts +6 -0
- package/src/resources/beta/webhooks.ts +196 -1
- package/src/resources/messages/messages.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -117,6 +117,19 @@ import {
|
|
|
117
117
|
} from './user-profiles';
|
|
118
118
|
import * as WebhooksAPI from './webhooks';
|
|
119
119
|
import {
|
|
120
|
+
BetaWebhookAgentArchivedEventData,
|
|
121
|
+
BetaWebhookAgentCreatedEventData,
|
|
122
|
+
BetaWebhookAgentDeletedEventData,
|
|
123
|
+
BetaWebhookAgentUpdatedEventData,
|
|
124
|
+
BetaWebhookDeploymentArchivedEventData,
|
|
125
|
+
BetaWebhookDeploymentCreatedEventData,
|
|
126
|
+
BetaWebhookDeploymentDeletedEventData,
|
|
127
|
+
BetaWebhookDeploymentPausedEventData,
|
|
128
|
+
BetaWebhookDeploymentRunFailedEventData,
|
|
129
|
+
BetaWebhookDeploymentRunStartedEventData,
|
|
130
|
+
BetaWebhookDeploymentRunSucceededEventData,
|
|
131
|
+
BetaWebhookDeploymentUnpausedEventData,
|
|
132
|
+
BetaWebhookDeploymentUpdatedEventData,
|
|
120
133
|
BetaWebhookEvent,
|
|
121
134
|
BetaWebhookEventData,
|
|
122
135
|
BetaWebhookSessionArchivedEventData,
|
|
@@ -460,11 +473,17 @@ import {
|
|
|
460
473
|
} from './messages/messages';
|
|
461
474
|
import * as SessionsAPI from './sessions/sessions';
|
|
462
475
|
import {
|
|
476
|
+
BetaManagedAgentsAgentMessagePreview,
|
|
463
477
|
BetaManagedAgentsAgentParams,
|
|
478
|
+
BetaManagedAgentsAgentThinkingPreview,
|
|
479
|
+
BetaManagedAgentsAgentWithOverridesParams,
|
|
464
480
|
BetaManagedAgentsBranchCheckout,
|
|
465
481
|
BetaManagedAgentsCacheCreationUsage,
|
|
466
482
|
BetaManagedAgentsCommitCheckout,
|
|
467
483
|
BetaManagedAgentsDeletedSession,
|
|
484
|
+
BetaManagedAgentsDeltaContent,
|
|
485
|
+
BetaManagedAgentsDeltaEvent,
|
|
486
|
+
BetaManagedAgentsDeltaType,
|
|
468
487
|
BetaManagedAgentsFileResourceParams,
|
|
469
488
|
BetaManagedAgentsGitHubRepositoryResourceParams,
|
|
470
489
|
BetaManagedAgentsMemoryStoreResourceParam,
|
|
@@ -479,7 +498,9 @@ import {
|
|
|
479
498
|
BetaManagedAgentsSessionStats,
|
|
480
499
|
BetaManagedAgentsSessionUpdatedEvent,
|
|
481
500
|
BetaManagedAgentsSessionUsage,
|
|
482
|
-
|
|
501
|
+
BetaManagedAgentsSessionsBidirectionalPageCursor,
|
|
502
|
+
BetaManagedAgentsStartEvent,
|
|
503
|
+
BetaManagedAgentsStartEventPreview,
|
|
483
504
|
BetaManagedAgentsSystemContentBlock,
|
|
484
505
|
BetaManagedAgentsSystemMessageEvent,
|
|
485
506
|
BetaManagedAgentsUserToolResultEvent,
|
|
@@ -984,11 +1005,17 @@ export declare namespace Beta {
|
|
|
984
1005
|
|
|
985
1006
|
export {
|
|
986
1007
|
Sessions as Sessions,
|
|
1008
|
+
type BetaManagedAgentsAgentMessagePreview as BetaManagedAgentsAgentMessagePreview,
|
|
987
1009
|
type BetaManagedAgentsAgentParams as BetaManagedAgentsAgentParams,
|
|
1010
|
+
type BetaManagedAgentsAgentThinkingPreview as BetaManagedAgentsAgentThinkingPreview,
|
|
1011
|
+
type BetaManagedAgentsAgentWithOverridesParams as BetaManagedAgentsAgentWithOverridesParams,
|
|
988
1012
|
type BetaManagedAgentsBranchCheckout as BetaManagedAgentsBranchCheckout,
|
|
989
1013
|
type BetaManagedAgentsCacheCreationUsage as BetaManagedAgentsCacheCreationUsage,
|
|
990
1014
|
type BetaManagedAgentsCommitCheckout as BetaManagedAgentsCommitCheckout,
|
|
991
1015
|
type BetaManagedAgentsDeletedSession as BetaManagedAgentsDeletedSession,
|
|
1016
|
+
type BetaManagedAgentsDeltaContent as BetaManagedAgentsDeltaContent,
|
|
1017
|
+
type BetaManagedAgentsDeltaEvent as BetaManagedAgentsDeltaEvent,
|
|
1018
|
+
type BetaManagedAgentsDeltaType as BetaManagedAgentsDeltaType,
|
|
992
1019
|
type BetaManagedAgentsFileResourceParams as BetaManagedAgentsFileResourceParams,
|
|
993
1020
|
type BetaManagedAgentsGitHubRepositoryResourceParams as BetaManagedAgentsGitHubRepositoryResourceParams,
|
|
994
1021
|
type BetaManagedAgentsMemoryStoreResourceParam as BetaManagedAgentsMemoryStoreResourceParam,
|
|
@@ -1003,10 +1030,12 @@ export declare namespace Beta {
|
|
|
1003
1030
|
type BetaManagedAgentsSessionStats as BetaManagedAgentsSessionStats,
|
|
1004
1031
|
type BetaManagedAgentsSessionUpdatedEvent as BetaManagedAgentsSessionUpdatedEvent,
|
|
1005
1032
|
type BetaManagedAgentsSessionUsage as BetaManagedAgentsSessionUsage,
|
|
1033
|
+
type BetaManagedAgentsStartEvent as BetaManagedAgentsStartEvent,
|
|
1034
|
+
type BetaManagedAgentsStartEventPreview as BetaManagedAgentsStartEventPreview,
|
|
1006
1035
|
type BetaManagedAgentsSystemContentBlock as BetaManagedAgentsSystemContentBlock,
|
|
1007
1036
|
type BetaManagedAgentsSystemMessageEvent as BetaManagedAgentsSystemMessageEvent,
|
|
1008
1037
|
type BetaManagedAgentsUserToolResultEvent as BetaManagedAgentsUserToolResultEvent,
|
|
1009
|
-
type
|
|
1038
|
+
type BetaManagedAgentsSessionsBidirectionalPageCursor as BetaManagedAgentsSessionsBidirectionalPageCursor,
|
|
1010
1039
|
type SessionCreateParams as SessionCreateParams,
|
|
1011
1040
|
type SessionRetrieveParams as SessionRetrieveParams,
|
|
1012
1041
|
type SessionUpdateParams as SessionUpdateParams,
|
|
@@ -1143,6 +1172,19 @@ export declare namespace Beta {
|
|
|
1143
1172
|
|
|
1144
1173
|
export {
|
|
1145
1174
|
Webhooks as Webhooks,
|
|
1175
|
+
type BetaWebhookAgentArchivedEventData as BetaWebhookAgentArchivedEventData,
|
|
1176
|
+
type BetaWebhookAgentCreatedEventData as BetaWebhookAgentCreatedEventData,
|
|
1177
|
+
type BetaWebhookAgentDeletedEventData as BetaWebhookAgentDeletedEventData,
|
|
1178
|
+
type BetaWebhookAgentUpdatedEventData as BetaWebhookAgentUpdatedEventData,
|
|
1179
|
+
type BetaWebhookDeploymentArchivedEventData as BetaWebhookDeploymentArchivedEventData,
|
|
1180
|
+
type BetaWebhookDeploymentCreatedEventData as BetaWebhookDeploymentCreatedEventData,
|
|
1181
|
+
type BetaWebhookDeploymentDeletedEventData as BetaWebhookDeploymentDeletedEventData,
|
|
1182
|
+
type BetaWebhookDeploymentPausedEventData as BetaWebhookDeploymentPausedEventData,
|
|
1183
|
+
type BetaWebhookDeploymentRunFailedEventData as BetaWebhookDeploymentRunFailedEventData,
|
|
1184
|
+
type BetaWebhookDeploymentRunStartedEventData as BetaWebhookDeploymentRunStartedEventData,
|
|
1185
|
+
type BetaWebhookDeploymentRunSucceededEventData as BetaWebhookDeploymentRunSucceededEventData,
|
|
1186
|
+
type BetaWebhookDeploymentUnpausedEventData as BetaWebhookDeploymentUnpausedEventData,
|
|
1187
|
+
type BetaWebhookDeploymentUpdatedEventData as BetaWebhookDeploymentUpdatedEventData,
|
|
1146
1188
|
type BetaWebhookEvent as BetaWebhookEvent,
|
|
1147
1189
|
type BetaWebhookEventData as BetaWebhookEventData,
|
|
1148
1190
|
type BetaWebhookSessionArchivedEventData as BetaWebhookSessionArchivedEventData,
|
|
@@ -371,11 +371,6 @@ export interface BetaSelfHostedWork {
|
|
|
371
371
|
*/
|
|
372
372
|
metadata: { [key: string]: string };
|
|
373
373
|
|
|
374
|
-
/**
|
|
375
|
-
* Session instance JWT secret (only included in certain retrieval paths)
|
|
376
|
-
*/
|
|
377
|
-
secret: string | null;
|
|
378
|
-
|
|
379
374
|
/**
|
|
380
375
|
* RFC 3339 timestamp when work execution started
|
|
381
376
|
*/
|
|
@@ -433,11 +433,17 @@ export {
|
|
|
433
433
|
} from './models';
|
|
434
434
|
export {
|
|
435
435
|
Sessions,
|
|
436
|
+
type BetaManagedAgentsAgentMessagePreview,
|
|
436
437
|
type BetaManagedAgentsAgentParams,
|
|
438
|
+
type BetaManagedAgentsAgentThinkingPreview,
|
|
439
|
+
type BetaManagedAgentsAgentWithOverridesParams,
|
|
437
440
|
type BetaManagedAgentsBranchCheckout,
|
|
438
441
|
type BetaManagedAgentsCacheCreationUsage,
|
|
439
442
|
type BetaManagedAgentsCommitCheckout,
|
|
440
443
|
type BetaManagedAgentsDeletedSession,
|
|
444
|
+
type BetaManagedAgentsDeltaContent,
|
|
445
|
+
type BetaManagedAgentsDeltaEvent,
|
|
446
|
+
type BetaManagedAgentsDeltaType,
|
|
441
447
|
type BetaManagedAgentsFileResourceParams,
|
|
442
448
|
type BetaManagedAgentsGitHubRepositoryResourceParams,
|
|
443
449
|
type BetaManagedAgentsMemoryStoreResourceParam,
|
|
@@ -452,6 +458,8 @@ export {
|
|
|
452
458
|
type BetaManagedAgentsSessionStats,
|
|
453
459
|
type BetaManagedAgentsSessionUpdatedEvent,
|
|
454
460
|
type BetaManagedAgentsSessionUsage,
|
|
461
|
+
type BetaManagedAgentsStartEvent,
|
|
462
|
+
type BetaManagedAgentsStartEventPreview,
|
|
455
463
|
type BetaManagedAgentsSystemContentBlock,
|
|
456
464
|
type BetaManagedAgentsSystemMessageEvent,
|
|
457
465
|
type BetaManagedAgentsUserToolResultEvent,
|
|
@@ -461,7 +469,7 @@ export {
|
|
|
461
469
|
type SessionListParams,
|
|
462
470
|
type SessionDeleteParams,
|
|
463
471
|
type SessionArchiveParams,
|
|
464
|
-
type
|
|
472
|
+
type BetaManagedAgentsSessionsBidirectionalPageCursor,
|
|
465
473
|
} from './sessions/index';
|
|
466
474
|
export {
|
|
467
475
|
Skills,
|
|
@@ -501,6 +509,19 @@ export {
|
|
|
501
509
|
} from './vaults/index';
|
|
502
510
|
export {
|
|
503
511
|
Webhooks,
|
|
512
|
+
type BetaWebhookAgentArchivedEventData,
|
|
513
|
+
type BetaWebhookAgentCreatedEventData,
|
|
514
|
+
type BetaWebhookAgentDeletedEventData,
|
|
515
|
+
type BetaWebhookAgentUpdatedEventData,
|
|
516
|
+
type BetaWebhookDeploymentArchivedEventData,
|
|
517
|
+
type BetaWebhookDeploymentCreatedEventData,
|
|
518
|
+
type BetaWebhookDeploymentDeletedEventData,
|
|
519
|
+
type BetaWebhookDeploymentPausedEventData,
|
|
520
|
+
type BetaWebhookDeploymentRunFailedEventData,
|
|
521
|
+
type BetaWebhookDeploymentRunStartedEventData,
|
|
522
|
+
type BetaWebhookDeploymentRunSucceededEventData,
|
|
523
|
+
type BetaWebhookDeploymentUnpausedEventData,
|
|
524
|
+
type BetaWebhookDeploymentUpdatedEventData,
|
|
504
525
|
type BetaWebhookEvent,
|
|
505
526
|
type BetaWebhookEventData,
|
|
506
527
|
type BetaWebhookSessionArchivedEventData,
|
|
@@ -442,7 +442,10 @@ export interface MemoryUpdateParams {
|
|
|
442
442
|
|
|
443
443
|
export interface MemoryListParams extends PageCursorParams {
|
|
444
444
|
/**
|
|
445
|
-
* Query param:
|
|
445
|
+
* Query param: `0` (or omitted) returns all descendants below `path_prefix`
|
|
446
|
+
* (recursive). `1` returns immediate children only; deeper entries roll up as
|
|
447
|
+
* `memory_prefix` items. `depth=1` behaves like `ls`; omitting `depth` behaves
|
|
448
|
+
* like `find`.
|
|
446
449
|
*/
|
|
447
450
|
depth?: number;
|
|
448
451
|
|
|
@@ -457,14 +460,16 @@ export interface MemoryListParams extends PageCursorParams {
|
|
|
457
460
|
order_by?: string;
|
|
458
461
|
|
|
459
462
|
/**
|
|
460
|
-
* Query param: Optional path prefix filter
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
+
* Query param: Optional path prefix filter. Must end with `/` (segment-aligned),
|
|
464
|
+
* e.g., `/notes/`. This value appears in request URLs. Do not include secrets or
|
|
465
|
+
* personally identifiable information.
|
|
463
466
|
*/
|
|
464
467
|
path_prefix?: string;
|
|
465
468
|
|
|
466
469
|
/**
|
|
467
|
-
* Query param:
|
|
470
|
+
* Query param: Which projection of each `memory` to return. Defaults to `basic`
|
|
471
|
+
* (content omitted). `full` populates `content` on each item and caps `limit` at
|
|
472
|
+
* 20; use this as the bulk-read path for export and sync.
|
|
468
473
|
*/
|
|
469
474
|
view?: BetaManagedAgentsMemoryView;
|
|
470
475
|
|
|
@@ -1740,7 +1740,7 @@ export interface BetaFallbackRefusalTrigger {
|
|
|
1740
1740
|
/**
|
|
1741
1741
|
* The policy category that triggered a refusal.
|
|
1742
1742
|
*/
|
|
1743
|
-
category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' |
|
|
1743
|
+
category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' | null;
|
|
1744
1744
|
|
|
1745
1745
|
type: 'refusal';
|
|
1746
1746
|
}
|
|
@@ -2512,7 +2512,7 @@ export interface BetaRefusalStopDetails {
|
|
|
2512
2512
|
/**
|
|
2513
2513
|
* The policy category that triggered a refusal.
|
|
2514
2514
|
*/
|
|
2515
|
-
category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' |
|
|
2515
|
+
category: 'cyber' | 'bio' | 'frontier_llm' | 'reasoning_extraction' | null;
|
|
2516
2516
|
|
|
2517
2517
|
/**
|
|
2518
2518
|
* Human-readable explanation of the refusal.
|
|
@@ -105,8 +105,9 @@ export class Events extends APIResource {
|
|
|
105
105
|
params: EventStreamParams | undefined = {},
|
|
106
106
|
options?: RequestOptions,
|
|
107
107
|
): APIPromise<Stream<BetaManagedAgentsStreamSessionEvents>> {
|
|
108
|
-
const { betas } = params ?? {};
|
|
108
|
+
const { betas, ...query } = params ?? {};
|
|
109
109
|
return this._client.get(path`/v1/sessions/${sessionID}/events/stream?beta=true`, {
|
|
110
|
+
query,
|
|
110
111
|
...options,
|
|
111
112
|
headers: buildHeaders([
|
|
112
113
|
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
|
|
@@ -1451,6 +1452,8 @@ export type BetaManagedAgentsStreamSessionEvents =
|
|
|
1451
1452
|
| SessionsAPI.BetaManagedAgentsUserToolResultEvent
|
|
1452
1453
|
| BetaManagedAgentsSessionThreadStatusRescheduledEvent
|
|
1453
1454
|
| SessionsAPI.BetaManagedAgentsSessionUpdatedEvent
|
|
1455
|
+
| SessionsAPI.BetaManagedAgentsStartEvent
|
|
1456
|
+
| SessionsAPI.BetaManagedAgentsDeltaEvent
|
|
1454
1457
|
| SessionsAPI.BetaManagedAgentsSystemMessageEvent;
|
|
1455
1458
|
|
|
1456
1459
|
/**
|
|
@@ -1918,7 +1921,21 @@ export interface EventSendParams {
|
|
|
1918
1921
|
|
|
1919
1922
|
export interface EventStreamParams {
|
|
1920
1923
|
/**
|
|
1921
|
-
*
|
|
1924
|
+
* Query param: When set, this connection also receives streaming deltas
|
|
1925
|
+
* (`event_start`, `event_delta`) while an event is being produced, before the
|
|
1926
|
+
* event itself arrives. Deltas are best-effort; when the final event is produced
|
|
1927
|
+
* it carries the complete content. A model request that ends early (an error or
|
|
1928
|
+
* interrupt) produces no final event — its terminal `span.model_request_end`
|
|
1929
|
+
* closes the preview. Accepts one or more event types to preview and may be
|
|
1930
|
+
* repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is
|
|
1931
|
+
* start-only — a signal that the agent has begun extended thinking, concluded by
|
|
1932
|
+
* the `agent.thinking` event itself. Only previews of the requested event types
|
|
1933
|
+
* are sent.
|
|
1934
|
+
*/
|
|
1935
|
+
event_deltas?: Array<SessionsAPI.BetaManagedAgentsDeltaType>;
|
|
1936
|
+
|
|
1937
|
+
/**
|
|
1938
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
1922
1939
|
*/
|
|
1923
1940
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
1924
1941
|
}
|
|
@@ -99,11 +99,17 @@ export {
|
|
|
99
99
|
} from './resources';
|
|
100
100
|
export {
|
|
101
101
|
Sessions,
|
|
102
|
+
type BetaManagedAgentsAgentMessagePreview,
|
|
102
103
|
type BetaManagedAgentsAgentParams,
|
|
104
|
+
type BetaManagedAgentsAgentThinkingPreview,
|
|
105
|
+
type BetaManagedAgentsAgentWithOverridesParams,
|
|
103
106
|
type BetaManagedAgentsBranchCheckout,
|
|
104
107
|
type BetaManagedAgentsCacheCreationUsage,
|
|
105
108
|
type BetaManagedAgentsCommitCheckout,
|
|
106
109
|
type BetaManagedAgentsDeletedSession,
|
|
110
|
+
type BetaManagedAgentsDeltaContent,
|
|
111
|
+
type BetaManagedAgentsDeltaEvent,
|
|
112
|
+
type BetaManagedAgentsDeltaType,
|
|
107
113
|
type BetaManagedAgentsFileResourceParams,
|
|
108
114
|
type BetaManagedAgentsGitHubRepositoryResourceParams,
|
|
109
115
|
type BetaManagedAgentsMemoryStoreResourceParam,
|
|
@@ -118,6 +124,8 @@ export {
|
|
|
118
124
|
type BetaManagedAgentsSessionStats,
|
|
119
125
|
type BetaManagedAgentsSessionUpdatedEvent,
|
|
120
126
|
type BetaManagedAgentsSessionUsage,
|
|
127
|
+
type BetaManagedAgentsStartEvent,
|
|
128
|
+
type BetaManagedAgentsStartEventPreview,
|
|
121
129
|
type BetaManagedAgentsSystemContentBlock,
|
|
122
130
|
type BetaManagedAgentsSystemMessageEvent,
|
|
123
131
|
type BetaManagedAgentsUserToolResultEvent,
|
|
@@ -127,7 +135,7 @@ export {
|
|
|
127
135
|
type SessionListParams,
|
|
128
136
|
type SessionDeleteParams,
|
|
129
137
|
type SessionArchiveParams,
|
|
130
|
-
type
|
|
138
|
+
type BetaManagedAgentsSessionsBidirectionalPageCursor,
|
|
131
139
|
} from './sessions';
|
|
132
140
|
export {
|
|
133
141
|
Threads,
|
|
@@ -116,7 +116,11 @@ import {
|
|
|
116
116
|
Threads,
|
|
117
117
|
} from './threads/threads';
|
|
118
118
|
import { APIPromise } from '../../../core/api-promise';
|
|
119
|
-
import {
|
|
119
|
+
import {
|
|
120
|
+
BidirectionalPageCursor,
|
|
121
|
+
type BidirectionalPageCursorParams,
|
|
122
|
+
PagePromise,
|
|
123
|
+
} from '../../../core/pagination';
|
|
120
124
|
import { buildHeaders } from '../../../internal/headers';
|
|
121
125
|
import { RequestOptions } from '../../../internal/request-options';
|
|
122
126
|
import { path } from '../../../internal/utils/path';
|
|
@@ -217,16 +221,20 @@ export class Sessions extends APIResource {
|
|
|
217
221
|
list(
|
|
218
222
|
params: SessionListParams | null | undefined = {},
|
|
219
223
|
options?: RequestOptions,
|
|
220
|
-
): PagePromise<
|
|
224
|
+
): PagePromise<BetaManagedAgentsSessionsBidirectionalPageCursor, BetaManagedAgentsSession> {
|
|
221
225
|
const { betas, ...query } = params ?? {};
|
|
222
|
-
return this._client.getAPIList(
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
options
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
return this._client.getAPIList(
|
|
227
|
+
'/v1/sessions?beta=true',
|
|
228
|
+
BidirectionalPageCursor<BetaManagedAgentsSession>,
|
|
229
|
+
{
|
|
230
|
+
query,
|
|
231
|
+
...options,
|
|
232
|
+
headers: buildHeaders([
|
|
233
|
+
{ 'anthropic-beta': [...(betas ?? []), 'managed-agents-2026-04-01'].toString() },
|
|
234
|
+
options?.headers,
|
|
235
|
+
]),
|
|
236
|
+
},
|
|
237
|
+
);
|
|
230
238
|
}
|
|
231
239
|
|
|
232
240
|
/**
|
|
@@ -282,7 +290,18 @@ export class Sessions extends APIResource {
|
|
|
282
290
|
}
|
|
283
291
|
}
|
|
284
292
|
|
|
285
|
-
export type
|
|
293
|
+
export type BetaManagedAgentsSessionsBidirectionalPageCursor =
|
|
294
|
+
BidirectionalPageCursor<BetaManagedAgentsSession>;
|
|
295
|
+
|
|
296
|
+
export interface BetaManagedAgentsAgentMessagePreview {
|
|
297
|
+
/**
|
|
298
|
+
* The id the buffered agent.message will carry if it is emitted. Matches the
|
|
299
|
+
* event_id on this preview's event_delta events.
|
|
300
|
+
*/
|
|
301
|
+
id: string;
|
|
302
|
+
|
|
303
|
+
type: 'agent.message';
|
|
304
|
+
}
|
|
286
305
|
|
|
287
306
|
/**
|
|
288
307
|
* Specification for an Agent. Provide a specific `version` or use the short-form
|
|
@@ -303,6 +322,69 @@ export interface BetaManagedAgentsAgentParams {
|
|
|
303
322
|
version?: number;
|
|
304
323
|
}
|
|
305
324
|
|
|
325
|
+
export interface BetaManagedAgentsAgentThinkingPreview {
|
|
326
|
+
/**
|
|
327
|
+
* The id the buffered agent.thinking will carry if it is emitted. Start-only — no
|
|
328
|
+
* event_delta events follow.
|
|
329
|
+
*/
|
|
330
|
+
id: string;
|
|
331
|
+
|
|
332
|
+
type: 'agent.thinking';
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Reference to an `agent` plus optional configuration overrides. Each provided
|
|
337
|
+
* field replaces the agent's value for the caller's use; the agent resource is
|
|
338
|
+
* unchanged.
|
|
339
|
+
*/
|
|
340
|
+
export interface BetaManagedAgentsAgentWithOverridesParams {
|
|
341
|
+
/**
|
|
342
|
+
* The `agent` ID.
|
|
343
|
+
*/
|
|
344
|
+
id: string;
|
|
345
|
+
|
|
346
|
+
type: 'agent_with_overrides';
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Replacement MCP server list. Full replacement: the provided array becomes the
|
|
350
|
+
* MCP servers. Send an empty array to clear; omit to preserve the agent's servers.
|
|
351
|
+
*/
|
|
352
|
+
mcp_servers?: Array<AgentsAPI.BetaManagedAgentsURLMCPServerParams>;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a
|
|
356
|
+
* `model_config` object. Omit to use the agent's model.
|
|
357
|
+
*/
|
|
358
|
+
model?: AgentsAPI.BetaManagedAgentsModel | AgentsAPI.BetaManagedAgentsModelConfigParams;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Replacement skill list. Full replacement: the provided array becomes the skills.
|
|
362
|
+
* Send an empty array to clear; omit to preserve the agent's skills.
|
|
363
|
+
*/
|
|
364
|
+
skills?: Array<AgentsAPI.BetaManagedAgentsSkillParams>;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Replacement system prompt. Up to 100,000 characters. Set to null to clear the
|
|
368
|
+
* agent's system prompt; omit to preserve it.
|
|
369
|
+
*/
|
|
370
|
+
system?: string | null;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Replacement tool list. Full replacement: the provided array becomes the tool
|
|
374
|
+
* configuration. Send an empty array to clear; omit to preserve the agent's tools.
|
|
375
|
+
*/
|
|
376
|
+
tools?: Array<
|
|
377
|
+
| AgentsAPI.BetaManagedAgentsAgentToolset20260401Params
|
|
378
|
+
| AgentsAPI.BetaManagedAgentsMCPToolsetParams
|
|
379
|
+
| AgentsAPI.BetaManagedAgentsCustomToolParams
|
|
380
|
+
>;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* The specific `agent` version to use. Omit to use the latest version.
|
|
384
|
+
*/
|
|
385
|
+
version?: number;
|
|
386
|
+
}
|
|
387
|
+
|
|
306
388
|
export interface BetaManagedAgentsBranchCheckout {
|
|
307
389
|
/**
|
|
308
390
|
* Branch name to check out.
|
|
@@ -345,6 +427,52 @@ export interface BetaManagedAgentsDeletedSession {
|
|
|
345
427
|
type: 'session_deleted';
|
|
346
428
|
}
|
|
347
429
|
|
|
430
|
+
export interface BetaManagedAgentsDeltaContent {
|
|
431
|
+
/**
|
|
432
|
+
* Regular text content.
|
|
433
|
+
*/
|
|
434
|
+
content: EventsAPI.BetaManagedAgentsTextBlock;
|
|
435
|
+
|
|
436
|
+
type: 'content_delta';
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Which entry in the previewed event's content array this fragment lands in.
|
|
440
|
+
* Insert content as that entry when the index is new; append to the existing entry
|
|
441
|
+
* otherwise.
|
|
442
|
+
*/
|
|
443
|
+
index?: number;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* An incremental update to an event that is still being streamed. Deltas are
|
|
448
|
+
* best-effort and may stop early; when the buffered event with id == event_id is
|
|
449
|
+
* produced it carries the complete content. A model request that ends early (an
|
|
450
|
+
* error or interrupt) produces no buffered event — its terminal
|
|
451
|
+
* span.model_request_end closes the preview. Only sent on stream connections that
|
|
452
|
+
* opt in via event_deltas; never appears in event history.
|
|
453
|
+
*/
|
|
454
|
+
export interface BetaManagedAgentsDeltaEvent {
|
|
455
|
+
/**
|
|
456
|
+
* One fragment of the previewed event. The delta type is named for the previewed
|
|
457
|
+
* event's field it streams into: agent.message events stream content_delta
|
|
458
|
+
* fragments, each a partial element of the content array.
|
|
459
|
+
*/
|
|
460
|
+
delta: BetaManagedAgentsDeltaContent;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* The id of the event being previewed. Matches event.id on the corresponding
|
|
464
|
+
* event_start and the buffered event that reconciles the preview.
|
|
465
|
+
*/
|
|
466
|
+
event_id: string;
|
|
467
|
+
|
|
468
|
+
type: 'event_delta';
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* EventDeltaType enum
|
|
473
|
+
*/
|
|
474
|
+
export type BetaManagedAgentsDeltaType = 'agent.message' | 'agent.thinking';
|
|
475
|
+
|
|
348
476
|
/**
|
|
349
477
|
* Mount a file uploaded via the Files API into the session.
|
|
350
478
|
*/
|
|
@@ -718,6 +846,30 @@ export interface BetaManagedAgentsSessionUsage {
|
|
|
718
846
|
output_tokens?: number;
|
|
719
847
|
}
|
|
720
848
|
|
|
849
|
+
/**
|
|
850
|
+
* Opens a preview of a buffered event. Carries the previewed event's type and id
|
|
851
|
+
* only. Followed by zero or more event_delta events with the same event id,
|
|
852
|
+
* normally concluded by the buffered event carrying that id. If the producing
|
|
853
|
+
* model request ends without that event (an error or interrupt mid-stream), its
|
|
854
|
+
* terminal span.model_request_end closes the preview. Only sent on stream
|
|
855
|
+
* connections that opt in via event_deltas; never appears in event history.
|
|
856
|
+
*/
|
|
857
|
+
export interface BetaManagedAgentsStartEvent {
|
|
858
|
+
/**
|
|
859
|
+
* The previewed event's type and id. The event type determines which delta types
|
|
860
|
+
* the preview's event_delta events carry: agent.message events stream
|
|
861
|
+
* content_delta fragments; agent.thinking previews are start-only — no deltas
|
|
862
|
+
* follow, and the buffered agent.thinking with the same id concludes them.
|
|
863
|
+
*/
|
|
864
|
+
event: BetaManagedAgentsStartEventPreview;
|
|
865
|
+
|
|
866
|
+
type: 'event_start';
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export type BetaManagedAgentsStartEventPreview =
|
|
870
|
+
| BetaManagedAgentsAgentMessagePreview
|
|
871
|
+
| BetaManagedAgentsAgentThinkingPreview;
|
|
872
|
+
|
|
721
873
|
/**
|
|
722
874
|
* Regular text content.
|
|
723
875
|
*/
|
|
@@ -807,7 +959,7 @@ export interface SessionCreateParams {
|
|
|
807
959
|
* latest version for the session, or an `agent` object with both id and version
|
|
808
960
|
* specified.
|
|
809
961
|
*/
|
|
810
|
-
agent: string | BetaManagedAgentsAgentParams;
|
|
962
|
+
agent: string | BetaManagedAgentsAgentParams | BetaManagedAgentsAgentWithOverridesParams;
|
|
811
963
|
|
|
812
964
|
/**
|
|
813
965
|
* Body param: ID of the `environment` defining the container configuration for
|
|
@@ -887,7 +1039,7 @@ export interface SessionUpdateParams {
|
|
|
887
1039
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
888
1040
|
}
|
|
889
1041
|
|
|
890
|
-
export interface SessionListParams extends
|
|
1042
|
+
export interface SessionListParams extends BidirectionalPageCursorParams {
|
|
891
1043
|
/**
|
|
892
1044
|
* Query param: Filter sessions created with this agent ID.
|
|
893
1045
|
*/
|
|
@@ -973,11 +1125,17 @@ Sessions.Threads = Threads;
|
|
|
973
1125
|
|
|
974
1126
|
export declare namespace Sessions {
|
|
975
1127
|
export {
|
|
1128
|
+
type BetaManagedAgentsAgentMessagePreview as BetaManagedAgentsAgentMessagePreview,
|
|
976
1129
|
type BetaManagedAgentsAgentParams as BetaManagedAgentsAgentParams,
|
|
1130
|
+
type BetaManagedAgentsAgentThinkingPreview as BetaManagedAgentsAgentThinkingPreview,
|
|
1131
|
+
type BetaManagedAgentsAgentWithOverridesParams as BetaManagedAgentsAgentWithOverridesParams,
|
|
977
1132
|
type BetaManagedAgentsBranchCheckout as BetaManagedAgentsBranchCheckout,
|
|
978
1133
|
type BetaManagedAgentsCacheCreationUsage as BetaManagedAgentsCacheCreationUsage,
|
|
979
1134
|
type BetaManagedAgentsCommitCheckout as BetaManagedAgentsCommitCheckout,
|
|
980
1135
|
type BetaManagedAgentsDeletedSession as BetaManagedAgentsDeletedSession,
|
|
1136
|
+
type BetaManagedAgentsDeltaContent as BetaManagedAgentsDeltaContent,
|
|
1137
|
+
type BetaManagedAgentsDeltaEvent as BetaManagedAgentsDeltaEvent,
|
|
1138
|
+
type BetaManagedAgentsDeltaType as BetaManagedAgentsDeltaType,
|
|
981
1139
|
type BetaManagedAgentsFileResourceParams as BetaManagedAgentsFileResourceParams,
|
|
982
1140
|
type BetaManagedAgentsGitHubRepositoryResourceParams as BetaManagedAgentsGitHubRepositoryResourceParams,
|
|
983
1141
|
type BetaManagedAgentsMemoryStoreResourceParam as BetaManagedAgentsMemoryStoreResourceParam,
|
|
@@ -992,10 +1150,12 @@ export declare namespace Sessions {
|
|
|
992
1150
|
type BetaManagedAgentsSessionStats as BetaManagedAgentsSessionStats,
|
|
993
1151
|
type BetaManagedAgentsSessionUpdatedEvent as BetaManagedAgentsSessionUpdatedEvent,
|
|
994
1152
|
type BetaManagedAgentsSessionUsage as BetaManagedAgentsSessionUsage,
|
|
1153
|
+
type BetaManagedAgentsStartEvent as BetaManagedAgentsStartEvent,
|
|
1154
|
+
type BetaManagedAgentsStartEventPreview as BetaManagedAgentsStartEventPreview,
|
|
995
1155
|
type BetaManagedAgentsSystemContentBlock as BetaManagedAgentsSystemContentBlock,
|
|
996
1156
|
type BetaManagedAgentsSystemMessageEvent as BetaManagedAgentsSystemMessageEvent,
|
|
997
1157
|
type BetaManagedAgentsUserToolResultEvent as BetaManagedAgentsUserToolResultEvent,
|
|
998
|
-
type
|
|
1158
|
+
type BetaManagedAgentsSessionsBidirectionalPageCursor as BetaManagedAgentsSessionsBidirectionalPageCursor,
|
|
999
1159
|
type SessionCreateParams as SessionCreateParams,
|
|
1000
1160
|
type SessionRetrieveParams as SessionRetrieveParams,
|
|
1001
1161
|
type SessionUpdateParams as SessionUpdateParams,
|
|
@@ -256,6 +256,8 @@ export type BetaManagedAgentsStreamSessionThreadEvents =
|
|
|
256
256
|
| SessionsAPI.BetaManagedAgentsUserToolResultEvent
|
|
257
257
|
| EventsAPI.BetaManagedAgentsSessionThreadStatusRescheduledEvent
|
|
258
258
|
| SessionsAPI.BetaManagedAgentsSessionUpdatedEvent
|
|
259
|
+
| SessionsAPI.BetaManagedAgentsStartEvent
|
|
260
|
+
| SessionsAPI.BetaManagedAgentsDeltaEvent
|
|
259
261
|
| SessionsAPI.BetaManagedAgentsSystemMessageEvent;
|
|
260
262
|
|
|
261
263
|
export interface ThreadRetrieveParams {
|
|
@@ -32,14 +32,13 @@ export class Skills extends APIResource {
|
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* ```ts
|
|
35
|
-
* const skill = await client.beta.skills.create(
|
|
35
|
+
* const skill = await client.beta.skills.create({
|
|
36
|
+
* files: [fs.createReadStream('path/to/file')],
|
|
37
|
+
* });
|
|
36
38
|
* ```
|
|
37
39
|
*/
|
|
38
|
-
create(
|
|
39
|
-
|
|
40
|
-
options?: RequestOptions,
|
|
41
|
-
): APIPromise<SkillCreateResponse> {
|
|
42
|
-
const { betas, ...body } = params ?? {};
|
|
40
|
+
create(params: SkillCreateParams, options?: RequestOptions): APIPromise<SkillCreateResponse> {
|
|
41
|
+
const { betas, ...body } = params;
|
|
43
42
|
return this._client.post(
|
|
44
43
|
'/v1/skills?beta=true',
|
|
45
44
|
multipartFormRequestOptions(
|
|
@@ -303,20 +302,20 @@ export interface SkillDeleteResponse {
|
|
|
303
302
|
|
|
304
303
|
export interface SkillCreateParams {
|
|
305
304
|
/**
|
|
306
|
-
* Body param:
|
|
305
|
+
* Body param: Files to upload for the skill.
|
|
307
306
|
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
307
|
+
* All files must be in the same top-level directory and must include a SKILL.md
|
|
308
|
+
* file at the root of that directory.
|
|
310
309
|
*/
|
|
311
|
-
|
|
310
|
+
files: Array<Uploadable>;
|
|
312
311
|
|
|
313
312
|
/**
|
|
314
|
-
* Body param:
|
|
313
|
+
* Body param: Display title for the skill.
|
|
315
314
|
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
315
|
+
* This is a human-readable label that is not included in the prompt sent to the
|
|
316
|
+
* model.
|
|
318
317
|
*/
|
|
319
|
-
|
|
318
|
+
display_title?: string | null;
|
|
320
319
|
|
|
321
320
|
/**
|
|
322
321
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
@@ -18,15 +18,16 @@ export class Versions extends APIResource {
|
|
|
18
18
|
* ```ts
|
|
19
19
|
* const version = await client.beta.skills.versions.create(
|
|
20
20
|
* 'skill_id',
|
|
21
|
+
* { files: [fs.createReadStream('path/to/file')] },
|
|
21
22
|
* );
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
25
|
create(
|
|
25
26
|
skillID: string,
|
|
26
|
-
params: VersionCreateParams
|
|
27
|
+
params: VersionCreateParams,
|
|
27
28
|
options?: RequestOptions,
|
|
28
29
|
): APIPromise<VersionCreateResponse> {
|
|
29
|
-
const { betas, ...body } = params
|
|
30
|
+
const { betas, ...body } = params;
|
|
30
31
|
return this._client.post(
|
|
31
32
|
path`/v1/skills/${skillID}/versions?beta=true`,
|
|
32
33
|
multipartFormRequestOptions(
|
|
@@ -346,7 +347,7 @@ export interface VersionCreateParams {
|
|
|
346
347
|
* All files must be in the same top-level directory and must include a SKILL.md
|
|
347
348
|
* file at the root of that directory.
|
|
348
349
|
*/
|
|
349
|
-
files
|
|
350
|
+
files: Array<Uploadable>;
|
|
350
351
|
|
|
351
352
|
/**
|
|
352
353
|
* Header param: Optional header to specify the beta version(s) you want to use.
|