@anthropic-ai/sdk 0.110.0 → 0.112.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 +24 -0
- package/bin/migration-config.json +74 -0
- package/lib/tools/SessionToolRunner.d.mts +29 -2
- package/lib/tools/SessionToolRunner.d.mts.map +1 -1
- package/lib/tools/SessionToolRunner.d.ts +29 -2
- package/lib/tools/SessionToolRunner.d.ts.map +1 -1
- package/lib/tools/SessionToolRunner.js +265 -36
- package/lib/tools/SessionToolRunner.js.map +1 -1
- package/lib/tools/SessionToolRunner.mjs +265 -36
- package/lib/tools/SessionToolRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +1 -1
- package/resources/beta/agents/agents.d.ts +1 -1
- package/resources/beta/beta.d.mts +9 -1
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +9 -1
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +8 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +8 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/dreams.d.mts +269 -0
- package/resources/beta/dreams.d.mts.map +1 -0
- package/resources/beta/dreams.d.ts +269 -0
- package/resources/beta/dreams.d.ts.map +1 -0
- package/resources/beta/dreams.js +116 -0
- package/resources/beta/dreams.js.map +1 -0
- package/resources/beta/dreams.mjs +112 -0
- package/resources/beta/dreams.mjs.map +1 -0
- package/resources/beta/index.d.mts +2 -0
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -0
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +7 -3
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +2 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/messages/batches.d.mts +3 -2
- package/resources/beta/messages/batches.d.mts.map +1 -1
- package/resources/beta/messages/batches.d.ts +3 -2
- package/resources/beta/messages/batches.d.ts.map +1 -1
- package/resources/beta/messages/messages.d.mts +18 -9
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +18 -9
- 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/tunnels/certificates.d.mts +163 -0
- package/resources/beta/tunnels/certificates.d.mts.map +1 -0
- package/resources/beta/tunnels/certificates.d.ts +163 -0
- package/resources/beta/tunnels/certificates.d.ts.map +1 -0
- package/resources/beta/tunnels/certificates.js +129 -0
- package/resources/beta/tunnels/certificates.js.map +1 -0
- package/resources/beta/tunnels/certificates.mjs +125 -0
- package/resources/beta/tunnels/certificates.mjs.map +1 -0
- package/resources/beta/tunnels/index.d.mts +3 -0
- package/resources/beta/tunnels/index.d.mts.map +1 -0
- package/resources/beta/tunnels/index.d.ts +3 -0
- package/resources/beta/tunnels/index.d.ts.map +1 -0
- package/resources/beta/tunnels/index.js +9 -0
- package/resources/beta/tunnels/index.js.map +1 -0
- package/resources/beta/tunnels/index.mjs +4 -0
- package/resources/beta/tunnels/index.mjs.map +1 -0
- package/resources/beta/tunnels/tunnels.d.mts +212 -0
- package/resources/beta/tunnels/tunnels.d.mts.map +1 -0
- package/resources/beta/tunnels/tunnels.d.ts +212 -0
- package/resources/beta/tunnels/tunnels.d.ts.map +1 -0
- package/resources/beta/tunnels/tunnels.js +181 -0
- package/resources/beta/tunnels/tunnels.js.map +1 -0
- package/resources/beta/tunnels/tunnels.mjs +176 -0
- package/resources/beta/tunnels/tunnels.mjs.map +1 -0
- package/resources/beta/tunnels.d.mts +2 -0
- package/resources/beta/tunnels.d.mts.map +1 -0
- package/resources/beta/tunnels.d.ts +2 -0
- package/resources/beta/tunnels.d.ts.map +1 -0
- package/resources/beta/tunnels.js +6 -0
- package/resources/beta/tunnels.js.map +1 -0
- package/resources/beta/tunnels.mjs +3 -0
- package/resources/beta/tunnels.mjs.map +1 -0
- package/src/lib/tools/SessionToolRunner.ts +280 -36
- package/src/resources/beta/agents/agents.ts +1 -1
- package/src/resources/beta/beta.ts +73 -0
- package/src/resources/beta/dreams.ts +404 -0
- package/src/resources/beta/index.ts +32 -0
- package/src/resources/beta/messages/batches.ts +3 -2
- package/src/resources/beta/messages/messages.ts +18 -9
- package/src/resources/beta/tunnels/certificates.ts +252 -0
- package/src/resources/beta/tunnels/index.ts +23 -0
- package/src/resources/beta/tunnels/tunnels.ts +347 -0
- package/src/resources/beta/tunnels.ts +3 -0
- 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
|
@@ -75,6 +75,27 @@ import {
|
|
|
75
75
|
DeploymentUpdateParams,
|
|
76
76
|
Deployments,
|
|
77
77
|
} from './deployments';
|
|
78
|
+
import * as DreamsAPI from './dreams';
|
|
79
|
+
import {
|
|
80
|
+
BetaDream,
|
|
81
|
+
BetaDreamError,
|
|
82
|
+
BetaDreamInput,
|
|
83
|
+
BetaDreamMemoryStoreInput,
|
|
84
|
+
BetaDreamMemoryStoreOutput,
|
|
85
|
+
BetaDreamModelConfig,
|
|
86
|
+
BetaDreamModelConfigParam,
|
|
87
|
+
BetaDreamOutput,
|
|
88
|
+
BetaDreamSessionsInput,
|
|
89
|
+
BetaDreamStatus,
|
|
90
|
+
BetaDreamUsage,
|
|
91
|
+
BetaDreamsPageCursor,
|
|
92
|
+
DreamArchiveParams,
|
|
93
|
+
DreamCancelParams,
|
|
94
|
+
DreamCreateParams,
|
|
95
|
+
DreamListParams,
|
|
96
|
+
DreamRetrieveParams,
|
|
97
|
+
Dreams,
|
|
98
|
+
} from './dreams';
|
|
78
99
|
import * as FilesAPI from './files';
|
|
79
100
|
import {
|
|
80
101
|
BetaFileScope,
|
|
@@ -525,6 +546,19 @@ import {
|
|
|
525
546
|
SkillRetrieveResponse,
|
|
526
547
|
Skills,
|
|
527
548
|
} from './skills/skills';
|
|
549
|
+
import * as TunnelsAPI from './tunnels/tunnels';
|
|
550
|
+
import {
|
|
551
|
+
BetaTunnel,
|
|
552
|
+
BetaTunnelToken,
|
|
553
|
+
BetaTunnelsPageCursor,
|
|
554
|
+
TunnelArchiveParams,
|
|
555
|
+
TunnelCreateParams,
|
|
556
|
+
TunnelListParams,
|
|
557
|
+
TunnelRetrieveParams,
|
|
558
|
+
TunnelRevealTokenParams,
|
|
559
|
+
TunnelRotateTokenParams,
|
|
560
|
+
Tunnels,
|
|
561
|
+
} from './tunnels/tunnels';
|
|
528
562
|
import * as VaultsAPI from './vaults/vaults';
|
|
529
563
|
import {
|
|
530
564
|
BetaManagedAgentsDeletedVault,
|
|
@@ -553,6 +587,8 @@ export class Beta extends APIResource {
|
|
|
553
587
|
skills: SkillsAPI.Skills = new SkillsAPI.Skills(this._client);
|
|
554
588
|
webhooks: WebhooksAPI.Webhooks = new WebhooksAPI.Webhooks(this._client);
|
|
555
589
|
userProfiles: UserProfilesAPI.UserProfiles = new UserProfilesAPI.UserProfiles(this._client);
|
|
590
|
+
dreams: DreamsAPI.Dreams = new DreamsAPI.Dreams(this._client);
|
|
591
|
+
tunnels: TunnelsAPI.Tunnels = new TunnelsAPI.Tunnels(this._client);
|
|
556
592
|
}
|
|
557
593
|
|
|
558
594
|
export type AnthropicBeta =
|
|
@@ -582,6 +618,7 @@ export type AnthropicBeta =
|
|
|
582
618
|
| 'advisor-tool-2026-03-01'
|
|
583
619
|
| 'managed-agents-2026-04-01'
|
|
584
620
|
| 'cache-diagnosis-2026-04-07'
|
|
621
|
+
| 'dreaming-2026-04-21'
|
|
585
622
|
| 'thinking-token-count-2026-05-13'
|
|
586
623
|
| 'server-side-fallback-2026-06-01'
|
|
587
624
|
| 'fallback-credit-2026-06-01'
|
|
@@ -673,6 +710,8 @@ Beta.Files = Files;
|
|
|
673
710
|
Beta.Skills = Skills;
|
|
674
711
|
Beta.Webhooks = Webhooks;
|
|
675
712
|
Beta.UserProfiles = UserProfiles;
|
|
713
|
+
Beta.Dreams = Dreams;
|
|
714
|
+
Beta.Tunnels = Tunnels;
|
|
676
715
|
|
|
677
716
|
export declare namespace Beta {
|
|
678
717
|
export {
|
|
@@ -1226,4 +1265,38 @@ export declare namespace Beta {
|
|
|
1226
1265
|
type UserProfileListParams as UserProfileListParams,
|
|
1227
1266
|
type UserProfileCreateEnrollmentURLParams as UserProfileCreateEnrollmentURLParams,
|
|
1228
1267
|
};
|
|
1268
|
+
|
|
1269
|
+
export {
|
|
1270
|
+
Dreams as Dreams,
|
|
1271
|
+
type BetaDream as BetaDream,
|
|
1272
|
+
type BetaDreamError as BetaDreamError,
|
|
1273
|
+
type BetaDreamInput as BetaDreamInput,
|
|
1274
|
+
type BetaDreamMemoryStoreInput as BetaDreamMemoryStoreInput,
|
|
1275
|
+
type BetaDreamMemoryStoreOutput as BetaDreamMemoryStoreOutput,
|
|
1276
|
+
type BetaDreamModelConfig as BetaDreamModelConfig,
|
|
1277
|
+
type BetaDreamModelConfigParam as BetaDreamModelConfigParam,
|
|
1278
|
+
type BetaDreamOutput as BetaDreamOutput,
|
|
1279
|
+
type BetaDreamSessionsInput as BetaDreamSessionsInput,
|
|
1280
|
+
type BetaDreamStatus as BetaDreamStatus,
|
|
1281
|
+
type BetaDreamUsage as BetaDreamUsage,
|
|
1282
|
+
type BetaDreamsPageCursor as BetaDreamsPageCursor,
|
|
1283
|
+
type DreamCreateParams as DreamCreateParams,
|
|
1284
|
+
type DreamRetrieveParams as DreamRetrieveParams,
|
|
1285
|
+
type DreamListParams as DreamListParams,
|
|
1286
|
+
type DreamArchiveParams as DreamArchiveParams,
|
|
1287
|
+
type DreamCancelParams as DreamCancelParams,
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
export {
|
|
1291
|
+
Tunnels as Tunnels,
|
|
1292
|
+
type BetaTunnel as BetaTunnel,
|
|
1293
|
+
type BetaTunnelToken as BetaTunnelToken,
|
|
1294
|
+
type BetaTunnelsPageCursor as BetaTunnelsPageCursor,
|
|
1295
|
+
type TunnelCreateParams as TunnelCreateParams,
|
|
1296
|
+
type TunnelRetrieveParams as TunnelRetrieveParams,
|
|
1297
|
+
type TunnelListParams as TunnelListParams,
|
|
1298
|
+
type TunnelArchiveParams as TunnelArchiveParams,
|
|
1299
|
+
type TunnelRevealTokenParams as TunnelRevealTokenParams,
|
|
1300
|
+
type TunnelRotateTokenParams as TunnelRotateTokenParams,
|
|
1301
|
+
};
|
|
1229
1302
|
}
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as BetaAPI from './beta';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { PageCursor, type PageCursorParams, PagePromise } from '../../core/pagination';
|
|
7
|
+
import { buildHeaders } from '../../internal/headers';
|
|
8
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
9
|
+
import { path } from '../../internal/utils/path';
|
|
10
|
+
|
|
11
|
+
export class Dreams extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Create a Dream
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const betaDream = await client.beta.dreams.create({
|
|
18
|
+
* inputs: [{ memory_store_id: 'x', type: 'memory_store' }],
|
|
19
|
+
* model: 'string',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(params: DreamCreateParams, options?: RequestOptions): APIPromise<BetaDream> {
|
|
24
|
+
const { betas, ...body } = params;
|
|
25
|
+
return this._client.post('/v1/dreams?beta=true', {
|
|
26
|
+
body,
|
|
27
|
+
...options,
|
|
28
|
+
headers: buildHeaders([
|
|
29
|
+
{ 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
|
|
30
|
+
options?.headers,
|
|
31
|
+
]),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get a Dream
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const betaDream = await client.beta.dreams.retrieve(
|
|
41
|
+
* 'dream_id',
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
retrieve(
|
|
46
|
+
dreamID: string,
|
|
47
|
+
params: DreamRetrieveParams | null | undefined = {},
|
|
48
|
+
options?: RequestOptions,
|
|
49
|
+
): APIPromise<BetaDream> {
|
|
50
|
+
const { betas } = params ?? {};
|
|
51
|
+
return this._client.get(path`/v1/dreams/${dreamID}?beta=true`, {
|
|
52
|
+
...options,
|
|
53
|
+
headers: buildHeaders([
|
|
54
|
+
{ 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
|
|
55
|
+
options?.headers,
|
|
56
|
+
]),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* List Dreams
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* // Automatically fetches more pages as needed.
|
|
66
|
+
* for await (const betaDream of client.beta.dreams.list()) {
|
|
67
|
+
* // ...
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
list(
|
|
72
|
+
params: DreamListParams | null | undefined = {},
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): PagePromise<BetaDreamsPageCursor, BetaDream> {
|
|
75
|
+
const { betas, ...query } = params ?? {};
|
|
76
|
+
return this._client.getAPIList('/v1/dreams?beta=true', PageCursor<BetaDream>, {
|
|
77
|
+
query,
|
|
78
|
+
...options,
|
|
79
|
+
headers: buildHeaders([
|
|
80
|
+
{ 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
|
|
81
|
+
options?.headers,
|
|
82
|
+
]),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Archive a Dream
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const betaDream = await client.beta.dreams.archive(
|
|
92
|
+
* 'dream_id',
|
|
93
|
+
* );
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
archive(
|
|
97
|
+
dreamID: string,
|
|
98
|
+
params: DreamArchiveParams | null | undefined = {},
|
|
99
|
+
options?: RequestOptions,
|
|
100
|
+
): APIPromise<BetaDream> {
|
|
101
|
+
const { betas } = params ?? {};
|
|
102
|
+
return this._client.post(path`/v1/dreams/${dreamID}/archive?beta=true`, {
|
|
103
|
+
...options,
|
|
104
|
+
headers: buildHeaders([
|
|
105
|
+
{ 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
|
|
106
|
+
options?.headers,
|
|
107
|
+
]),
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Cancel a Dream
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* const betaDream = await client.beta.dreams.cancel(
|
|
117
|
+
* 'dream_id',
|
|
118
|
+
* );
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
cancel(
|
|
122
|
+
dreamID: string,
|
|
123
|
+
params: DreamCancelParams | null | undefined = {},
|
|
124
|
+
options?: RequestOptions,
|
|
125
|
+
): APIPromise<BetaDream> {
|
|
126
|
+
const { betas } = params ?? {};
|
|
127
|
+
return this._client.post(path`/v1/dreams/${dreamID}/cancel?beta=true`, {
|
|
128
|
+
...options,
|
|
129
|
+
headers: buildHeaders([
|
|
130
|
+
{ 'anthropic-beta': [...(betas ?? []), 'dreaming-2026-04-21'].toString() },
|
|
131
|
+
options?.headers,
|
|
132
|
+
]),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type BetaDreamsPageCursor = PageCursor<BetaDream>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* An asynchronous memory-consolidation job that reads a memory store plus a set of
|
|
141
|
+
* session transcripts and writes consolidated memories into a new output memory
|
|
142
|
+
* store. The Dreams API is in research preview: the request and response shapes
|
|
143
|
+
* are volatile and may change without the deprecation period that applies to
|
|
144
|
+
* generally-available endpoints.
|
|
145
|
+
*/
|
|
146
|
+
export interface BetaDream {
|
|
147
|
+
id: string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* A timestamp in RFC 3339 format
|
|
151
|
+
*/
|
|
152
|
+
archived_at: string | null;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A timestamp in RFC 3339 format
|
|
156
|
+
*/
|
|
157
|
+
created_at: string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* A timestamp in RFC 3339 format
|
|
161
|
+
*/
|
|
162
|
+
ended_at: string | null;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Failure detail for a Dream whose `status` is `failed`.
|
|
166
|
+
*/
|
|
167
|
+
error: BetaDreamError | null;
|
|
168
|
+
|
|
169
|
+
inputs: Array<BetaDreamInput>;
|
|
170
|
+
|
|
171
|
+
instructions: string | null;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Model identifier and configuration applied to every pipeline stage. Same wire
|
|
175
|
+
* shape as the Agents API ModelConfig.
|
|
176
|
+
*/
|
|
177
|
+
model: BetaDreamModelConfig;
|
|
178
|
+
|
|
179
|
+
outputs: Array<BetaDreamOutput>;
|
|
180
|
+
|
|
181
|
+
session_id: string | null;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Lifecycle status of a Dream.
|
|
185
|
+
*/
|
|
186
|
+
status: BetaDreamStatus;
|
|
187
|
+
|
|
188
|
+
type: 'dream';
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Cumulative token usage for the dream across every pipeline stage.
|
|
192
|
+
*/
|
|
193
|
+
usage: BetaDreamUsage;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Failure detail for a Dream whose `status` is `failed`.
|
|
198
|
+
*/
|
|
199
|
+
export interface BetaDreamError {
|
|
200
|
+
message: string;
|
|
201
|
+
|
|
202
|
+
type: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* An input memory store the dream reads from. The dream never mutates this store.
|
|
207
|
+
*/
|
|
208
|
+
export type BetaDreamInput = BetaDreamMemoryStoreInput | BetaDreamSessionsInput;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* An input memory store the dream reads from. The dream never mutates this store.
|
|
212
|
+
*/
|
|
213
|
+
export interface BetaDreamMemoryStoreInput {
|
|
214
|
+
memory_store_id: string;
|
|
215
|
+
|
|
216
|
+
type: 'memory_store';
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* An output memory store the dream writes consolidated memories into.
|
|
221
|
+
*/
|
|
222
|
+
export interface BetaDreamMemoryStoreOutput {
|
|
223
|
+
memory_store_id: string;
|
|
224
|
+
|
|
225
|
+
type: 'memory_store';
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Model identifier and configuration applied to every pipeline stage. Same wire
|
|
230
|
+
* shape as the Agents API ModelConfig.
|
|
231
|
+
*/
|
|
232
|
+
export interface BetaDreamModelConfig {
|
|
233
|
+
/**
|
|
234
|
+
* Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
|
|
235
|
+
*/
|
|
236
|
+
id: string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Inference speed mode. `fast` provides significantly faster output token
|
|
240
|
+
* generation at premium pricing. Not all models support `fast`; invalid
|
|
241
|
+
* combinations are rejected at create time.
|
|
242
|
+
*/
|
|
243
|
+
speed?: 'standard' | 'fast';
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Model identifier and configuration applied to every pipeline stage.
|
|
248
|
+
*/
|
|
249
|
+
export interface BetaDreamModelConfigParam {
|
|
250
|
+
/**
|
|
251
|
+
* Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
|
|
252
|
+
*/
|
|
253
|
+
id: string;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Inference speed mode. `fast` provides significantly faster output token
|
|
257
|
+
* generation at premium pricing. Not all models support `fast`; invalid
|
|
258
|
+
* combinations are rejected at create time.
|
|
259
|
+
*/
|
|
260
|
+
speed?: 'standard' | 'fast' | null;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* An output memory store the dream writes consolidated memories into.
|
|
265
|
+
*/
|
|
266
|
+
export interface BetaDreamOutput {
|
|
267
|
+
memory_store_id: string;
|
|
268
|
+
|
|
269
|
+
type: 'memory_store';
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Input session transcripts the dream reads.
|
|
274
|
+
*/
|
|
275
|
+
export interface BetaDreamSessionsInput {
|
|
276
|
+
session_ids: Array<string>;
|
|
277
|
+
|
|
278
|
+
type: 'sessions';
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Lifecycle status of a Dream.
|
|
283
|
+
*/
|
|
284
|
+
export type BetaDreamStatus = 'pending' | 'running' | 'completed' | 'failed' | 'canceled';
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Cumulative token usage for the dream across every pipeline stage.
|
|
288
|
+
*/
|
|
289
|
+
export interface BetaDreamUsage {
|
|
290
|
+
/**
|
|
291
|
+
* Total tokens used to create prompt-cache entries (sum of all TTL tiers).
|
|
292
|
+
*/
|
|
293
|
+
cache_creation_input_tokens: number;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Total tokens read from prompt cache.
|
|
297
|
+
*/
|
|
298
|
+
cache_read_input_tokens: number;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Total uncached input tokens consumed across every pipeline stage.
|
|
302
|
+
*/
|
|
303
|
+
input_tokens: number;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Total output tokens generated across every pipeline stage.
|
|
307
|
+
*/
|
|
308
|
+
output_tokens: number;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface DreamCreateParams {
|
|
312
|
+
/**
|
|
313
|
+
* Body param
|
|
314
|
+
*/
|
|
315
|
+
inputs: Array<BetaDreamInput>;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Body param: Model identifier and configuration applied to every pipeline stage.
|
|
319
|
+
*/
|
|
320
|
+
model: string | BetaDreamModelConfigParam;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Body param
|
|
324
|
+
*/
|
|
325
|
+
instructions?: string | null;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
329
|
+
*/
|
|
330
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export interface DreamRetrieveParams {
|
|
334
|
+
/**
|
|
335
|
+
* Optional header to specify the beta version(s) you want to use.
|
|
336
|
+
*/
|
|
337
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export interface DreamListParams extends PageCursorParams {
|
|
341
|
+
/**
|
|
342
|
+
* Query param: Return dreams with `created_at` strictly after this timestamp
|
|
343
|
+
* (exclusive lower bound, RFC 3339). Unset applies no lower bound.
|
|
344
|
+
*/
|
|
345
|
+
'created_at[gt]'?: string;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Query param: Return dreams with `created_at` strictly before this timestamp
|
|
349
|
+
* (exclusive upper bound, RFC 3339). Unset applies no upper bound.
|
|
350
|
+
*/
|
|
351
|
+
'created_at[lt]'?: string;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Query param: Query parameter for include_archived
|
|
355
|
+
*/
|
|
356
|
+
include_archived?: boolean;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Query param: Filter by lifecycle status. Repeat the parameter to match any of
|
|
360
|
+
* multiple statuses. Empty applies no status filter.
|
|
361
|
+
*/
|
|
362
|
+
statuses?: Array<BetaDreamStatus>;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
366
|
+
*/
|
|
367
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export interface DreamArchiveParams {
|
|
371
|
+
/**
|
|
372
|
+
* Optional header to specify the beta version(s) you want to use.
|
|
373
|
+
*/
|
|
374
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export interface DreamCancelParams {
|
|
378
|
+
/**
|
|
379
|
+
* Optional header to specify the beta version(s) you want to use.
|
|
380
|
+
*/
|
|
381
|
+
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export declare namespace Dreams {
|
|
385
|
+
export {
|
|
386
|
+
type BetaDream as BetaDream,
|
|
387
|
+
type BetaDreamError as BetaDreamError,
|
|
388
|
+
type BetaDreamInput as BetaDreamInput,
|
|
389
|
+
type BetaDreamMemoryStoreInput as BetaDreamMemoryStoreInput,
|
|
390
|
+
type BetaDreamMemoryStoreOutput as BetaDreamMemoryStoreOutput,
|
|
391
|
+
type BetaDreamModelConfig as BetaDreamModelConfig,
|
|
392
|
+
type BetaDreamModelConfigParam as BetaDreamModelConfigParam,
|
|
393
|
+
type BetaDreamOutput as BetaDreamOutput,
|
|
394
|
+
type BetaDreamSessionsInput as BetaDreamSessionsInput,
|
|
395
|
+
type BetaDreamStatus as BetaDreamStatus,
|
|
396
|
+
type BetaDreamUsage as BetaDreamUsage,
|
|
397
|
+
type BetaDreamsPageCursor as BetaDreamsPageCursor,
|
|
398
|
+
type DreamCreateParams as DreamCreateParams,
|
|
399
|
+
type DreamRetrieveParams as DreamRetrieveParams,
|
|
400
|
+
type DreamListParams as DreamListParams,
|
|
401
|
+
type DreamArchiveParams as DreamArchiveParams,
|
|
402
|
+
type DreamCancelParams as DreamCancelParams,
|
|
403
|
+
};
|
|
404
|
+
}
|
|
@@ -135,6 +135,26 @@ export {
|
|
|
135
135
|
type DeploymentUnpauseParams,
|
|
136
136
|
type BetaManagedAgentsDeploymentsPageCursor,
|
|
137
137
|
} from './deployments';
|
|
138
|
+
export {
|
|
139
|
+
Dreams,
|
|
140
|
+
type BetaDream,
|
|
141
|
+
type BetaDreamError,
|
|
142
|
+
type BetaDreamInput,
|
|
143
|
+
type BetaDreamMemoryStoreInput,
|
|
144
|
+
type BetaDreamMemoryStoreOutput,
|
|
145
|
+
type BetaDreamModelConfig,
|
|
146
|
+
type BetaDreamModelConfigParam,
|
|
147
|
+
type BetaDreamOutput,
|
|
148
|
+
type BetaDreamSessionsInput,
|
|
149
|
+
type BetaDreamStatus,
|
|
150
|
+
type BetaDreamUsage,
|
|
151
|
+
type DreamCreateParams,
|
|
152
|
+
type DreamRetrieveParams,
|
|
153
|
+
type DreamListParams,
|
|
154
|
+
type DreamArchiveParams,
|
|
155
|
+
type DreamCancelParams,
|
|
156
|
+
type BetaDreamsPageCursor,
|
|
157
|
+
} from './dreams';
|
|
138
158
|
export {
|
|
139
159
|
Environments,
|
|
140
160
|
type BetaCloudConfig,
|
|
@@ -483,6 +503,18 @@ export {
|
|
|
483
503
|
type SkillDeleteParams,
|
|
484
504
|
type SkillListResponsesPageCursor,
|
|
485
505
|
} from './skills/index';
|
|
506
|
+
export {
|
|
507
|
+
Tunnels,
|
|
508
|
+
type BetaTunnel,
|
|
509
|
+
type BetaTunnelToken,
|
|
510
|
+
type TunnelCreateParams,
|
|
511
|
+
type TunnelRetrieveParams,
|
|
512
|
+
type TunnelListParams,
|
|
513
|
+
type TunnelArchiveParams,
|
|
514
|
+
type TunnelRevealTokenParams,
|
|
515
|
+
type TunnelRotateTokenParams,
|
|
516
|
+
type BetaTunnelsPageCursor,
|
|
517
|
+
} from './tunnels/index';
|
|
486
518
|
export {
|
|
487
519
|
UserProfiles,
|
|
488
520
|
type BetaUserProfile,
|
|
@@ -657,8 +657,9 @@ export namespace BatchCreateParams {
|
|
|
657
657
|
service_tier?: 'auto' | 'standard_only';
|
|
658
658
|
|
|
659
659
|
/**
|
|
660
|
-
*
|
|
661
|
-
*
|
|
660
|
+
* Inference speed mode. `fast` provides significantly faster output token
|
|
661
|
+
* generation at premium pricing. Not all models support `fast`; invalid
|
|
662
|
+
* combinations are rejected at create time.
|
|
662
663
|
*/
|
|
663
664
|
speed?: 'standard' | 'fast' | null;
|
|
664
665
|
|
|
@@ -1708,10 +1708,10 @@ export interface BetaFallbackMessageIterationUsage {
|
|
|
1708
1708
|
/**
|
|
1709
1709
|
* One entry in the `fallbacks` chain on a `/v1/messages` request.
|
|
1710
1710
|
*
|
|
1711
|
-
* `model` is required. The
|
|
1712
|
-
* `output_config`, and `speed`)
|
|
1713
|
-
*
|
|
1714
|
-
*
|
|
1711
|
+
* `model` is required. The override fields (`max_tokens`, `thinking`,
|
|
1712
|
+
* `output_config`, and `speed`) set the corresponding parameter for this attempt
|
|
1713
|
+
* only and are validated as if the request were made to `model`. Any other key is
|
|
1714
|
+
* rejected at parse time.
|
|
1715
1715
|
*/
|
|
1716
1716
|
export interface BetaFallbackParam {
|
|
1717
1717
|
/**
|
|
@@ -1726,6 +1726,11 @@ export interface BetaFallbackParam {
|
|
|
1726
1726
|
|
|
1727
1727
|
output_config?: BetaOutputConfig | null;
|
|
1728
1728
|
|
|
1729
|
+
/**
|
|
1730
|
+
* Inference speed mode. `fast` provides significantly faster output token
|
|
1731
|
+
* generation at premium pricing. Not all models support `fast`; invalid
|
|
1732
|
+
* combinations are rejected at create time.
|
|
1733
|
+
*/
|
|
1729
1734
|
speed?: 'standard' | 'fast' | null;
|
|
1730
1735
|
|
|
1731
1736
|
thinking?: BetaThinkingConfigEnabled | BetaThinkingConfigDisabled | BetaThinkingConfigAdaptive | null;
|
|
@@ -3878,7 +3883,9 @@ export interface BetaUsage {
|
|
|
3878
3883
|
service_tier: 'standard' | 'priority' | 'batch' | null;
|
|
3879
3884
|
|
|
3880
3885
|
/**
|
|
3881
|
-
*
|
|
3886
|
+
* Inference speed mode. `fast` provides significantly faster output token
|
|
3887
|
+
* generation at premium pricing. Not all models support `fast`; invalid
|
|
3888
|
+
* combinations are rejected at create time.
|
|
3882
3889
|
*/
|
|
3883
3890
|
speed: 'standard' | 'fast' | null;
|
|
3884
3891
|
}
|
|
@@ -4708,8 +4715,9 @@ export interface MessageCreateParamsBase {
|
|
|
4708
4715
|
service_tier?: 'auto' | 'standard_only';
|
|
4709
4716
|
|
|
4710
4717
|
/**
|
|
4711
|
-
* Body param:
|
|
4712
|
-
*
|
|
4718
|
+
* Body param: Inference speed mode. `fast` provides significantly faster output
|
|
4719
|
+
* token generation at premium pricing. Not all models support `fast`; invalid
|
|
4720
|
+
* combinations are rejected at create time.
|
|
4713
4721
|
*/
|
|
4714
4722
|
speed?: 'standard' | 'fast' | null;
|
|
4715
4723
|
|
|
@@ -5018,8 +5026,9 @@ export interface MessageCountTokensParams {
|
|
|
5018
5026
|
output_format?: BetaJSONOutputFormat | null;
|
|
5019
5027
|
|
|
5020
5028
|
/**
|
|
5021
|
-
* Body param:
|
|
5022
|
-
*
|
|
5029
|
+
* Body param: Inference speed mode. `fast` provides significantly faster output
|
|
5030
|
+
* token generation at premium pricing. Not all models support `fast`; invalid
|
|
5031
|
+
* combinations are rejected at create time.
|
|
5023
5032
|
*/
|
|
5024
5033
|
speed?: 'standard' | 'fast' | null;
|
|
5025
5034
|
|