langsmith 0.8.1 → 0.8.3
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/dist/_openapi_client/client.d.ts +2 -2
- package/dist/_openapi_client/resources/index.d.ts +1 -1
- package/dist/_openapi_client/resources/online-evaluators.d.ts +5 -0
- package/dist/_openapi_client/resources/runs.d.ts +5 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +1 -2
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +107 -6
- package/dist/_openapi_client/resources/sandboxes/boxes.js +1 -2
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +99 -4
- package/dist/_openapi_client/resources/threads.cjs +9 -6
- package/dist/_openapi_client/resources/threads.d.ts +216 -190
- package/dist/_openapi_client/resources/threads.js +9 -6
- package/dist/client.cjs +63 -8
- package/dist/client.d.ts +19 -3
- package/dist/client.js +63 -8
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/schemas.d.ts +15 -0
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +1 -1
- package/package.json +4 -2
|
@@ -12,7 +12,7 @@ import { Info, InfoListResponse } from './resources/info.js';
|
|
|
12
12
|
import { Issue, IssueListParams, Issues, IssuesOffsetPaginationIssues } from './resources/issues.js';
|
|
13
13
|
import { BulkDeleteEvaluatorFailedItem, BulkDeleteEvaluatorsResponse, CreateOnlineCodeEvaluatorRequest, CreateOnlineEvaluatorRequest, CreateOnlineEvaluatorResponse, CreateOnlineLlmEvaluatorRequest, GetOnlineEvaluatorSpendResponse, OnlineCodeEvaluator, OnlineEvaluator, OnlineEvaluatorBulkDeleteParams, OnlineEvaluatorCreateParams, OnlineEvaluatorDeleteParams, OnlineEvaluatorListParams, OnlineEvaluatorRunRule, OnlineEvaluatorSpendDay, OnlineEvaluatorSpendGroup, OnlineEvaluatorSpendParams, OnlineEvaluatorType, OnlineEvaluatorUpdateParams, OnlineEvaluators, OnlineEvaluatorsOffsetPaginationOnlineEvaluators, OnlineLlmEvaluator, OnlineSpendLimit, UpdateOnlineCodeEvaluatorRequest, UpdateOnlineEvaluatorRequest, UpdateOnlineEvaluatorResponse, UpdateOnlineLlmEvaluatorRequest } from './resources/online-evaluators.js';
|
|
14
14
|
import { ResponseBodyForRunsGenerateQuery, Run, RunIngest, RunQueryParams, RunQueryV2Params, RunRetrieveParams, RunRetrieveV2Params, RunSchema, RunStatsQueryParams, RunTypeEnum, Runs, RunsFilterDataSourceTypeEnum, RunsItemsCursorPostPagination } from './resources/runs.js';
|
|
15
|
-
import {
|
|
15
|
+
import { Thread, ThreadListTracesParams, ThreadQueryParams, ThreadStats, ThreadStatsParams, ThreadTrace, ThreadTracesItemsCursorGetPagination, Threads, ThreadsItemsCursorPostPagination } from './resources/threads.js';
|
|
16
16
|
import { Trace, TraceAggregates, TraceListRunsParams, TraceListRunsResponse, TraceQueryParams, Traces, TracesItemsCursorPostPagination } from './resources/traces.js';
|
|
17
17
|
import { DataType, Dataset, DatasetTransformation, DatasetVersion, Datasets, FeedbackCreateCoreSchema, Missing, SortByDatasetColumn } from './resources/datasets/datasets.js';
|
|
18
18
|
import { SandboxListResponse, SandboxResponse, SandboxStatusResponse, Sandboxes, ServiceURLResponse, SnapshotListResponse, SnapshotResponse } from './resources/sandboxes/sandboxes.js';
|
|
@@ -219,7 +219,7 @@ export declare namespace Langsmith {
|
|
|
219
219
|
export { type ItemsCursorGetPaginationParams as ItemsCursorGetPaginationParams, type ItemsCursorGetPaginationResponse as ItemsCursorGetPaginationResponse, };
|
|
220
220
|
export { Datasets as Datasets, type DataType as DataType, type Dataset as Dataset, type DatasetTransformation as DatasetTransformation, type DatasetVersion as DatasetVersion, type FeedbackCreateCoreSchema as FeedbackCreateCoreSchema, type Missing as Missing, type SortByDatasetColumn as SortByDatasetColumn, };
|
|
221
221
|
export { Runs as Runs, type ResponseBodyForRunsGenerateQuery as ResponseBodyForRunsGenerateQuery, type Run as Run, type RunIngest as RunIngest, type RunSchema as RunSchema, type RunStatsQueryParams as RunStatsQueryParams, type RunTypeEnum as RunTypeEnum, type RunsFilterDataSourceTypeEnum as RunsFilterDataSourceTypeEnum, type RunsItemsCursorPostPagination as RunsItemsCursorPostPagination, type RunQueryV2Params as RunQueryV2Params, type RunRetrieveV2Params as RunRetrieveV2Params, type RunRetrieveParams as RunRetrieveParams, type RunQueryParams as RunQueryParams, };
|
|
222
|
-
export { Threads as Threads, type
|
|
222
|
+
export { Threads as Threads, type Thread as Thread, type ThreadStats as ThreadStats, type ThreadTrace as ThreadTrace, type ThreadTracesItemsCursorGetPagination as ThreadTracesItemsCursorGetPagination, type ThreadsItemsCursorPostPagination as ThreadsItemsCursorPostPagination, type ThreadListTracesParams as ThreadListTracesParams, type ThreadQueryParams as ThreadQueryParams, type ThreadStatsParams as ThreadStatsParams, };
|
|
223
223
|
export { Traces as Traces, type Trace as Trace, type TraceAggregates as TraceAggregates, type TraceListRunsResponse as TraceListRunsResponse, type TracesItemsCursorPostPagination as TracesItemsCursorPostPagination, type TraceListRunsParams as TraceListRunsParams, type TraceQueryParams as TraceQueryParams, };
|
|
224
224
|
export { OnlineEvaluators as OnlineEvaluators, type BulkDeleteEvaluatorFailedItem as BulkDeleteEvaluatorFailedItem, type BulkDeleteEvaluatorsResponse as BulkDeleteEvaluatorsResponse, type CreateOnlineCodeEvaluatorRequest as CreateOnlineCodeEvaluatorRequest, type CreateOnlineEvaluatorRequest as CreateOnlineEvaluatorRequest, type CreateOnlineEvaluatorResponse as CreateOnlineEvaluatorResponse, type CreateOnlineLlmEvaluatorRequest as CreateOnlineLlmEvaluatorRequest, type GetOnlineEvaluatorSpendResponse as GetOnlineEvaluatorSpendResponse, type OnlineCodeEvaluator as OnlineCodeEvaluator, type OnlineEvaluator as OnlineEvaluator, type OnlineEvaluatorRunRule as OnlineEvaluatorRunRule, type OnlineEvaluatorSpendDay as OnlineEvaluatorSpendDay, type OnlineEvaluatorSpendGroup as OnlineEvaluatorSpendGroup, type OnlineEvaluatorType as OnlineEvaluatorType, type OnlineLlmEvaluator as OnlineLlmEvaluator, type OnlineSpendLimit as OnlineSpendLimit, type UpdateOnlineCodeEvaluatorRequest as UpdateOnlineCodeEvaluatorRequest, type UpdateOnlineEvaluatorRequest as UpdateOnlineEvaluatorRequest, type UpdateOnlineEvaluatorResponse as UpdateOnlineEvaluatorResponse, type UpdateOnlineLlmEvaluatorRequest as UpdateOnlineLlmEvaluatorRequest, type OnlineEvaluatorsOffsetPaginationOnlineEvaluators as OnlineEvaluatorsOffsetPaginationOnlineEvaluators, type OnlineEvaluatorCreateParams as OnlineEvaluatorCreateParams, type OnlineEvaluatorUpdateParams as OnlineEvaluatorUpdateParams, type OnlineEvaluatorListParams as OnlineEvaluatorListParams, type OnlineEvaluatorDeleteParams as OnlineEvaluatorDeleteParams, type OnlineEvaluatorBulkDeleteParams as OnlineEvaluatorBulkDeleteParams, type OnlineEvaluatorSpendParams as OnlineEvaluatorSpendParams, };
|
|
225
225
|
export { Info as Info, type InfoListResponse as InfoListResponse };
|
|
@@ -4,5 +4,5 @@ export { Issues, type Issue, type IssueListParams, type IssuesOffsetPaginationIs
|
|
|
4
4
|
export { OnlineEvaluators, type BulkDeleteEvaluatorFailedItem, type BulkDeleteEvaluatorsResponse, type CreateOnlineCodeEvaluatorRequest, type CreateOnlineEvaluatorRequest, type CreateOnlineEvaluatorResponse, type CreateOnlineLlmEvaluatorRequest, type GetOnlineEvaluatorSpendResponse, type OnlineCodeEvaluator, type OnlineEvaluator, type OnlineEvaluatorRunRule, type OnlineEvaluatorSpendDay, type OnlineEvaluatorSpendGroup, type OnlineEvaluatorType, type OnlineLlmEvaluator, type OnlineSpendLimit, type UpdateOnlineCodeEvaluatorRequest, type UpdateOnlineEvaluatorRequest, type UpdateOnlineEvaluatorResponse, type UpdateOnlineLlmEvaluatorRequest, type OnlineEvaluatorCreateParams, type OnlineEvaluatorUpdateParams, type OnlineEvaluatorListParams, type OnlineEvaluatorDeleteParams, type OnlineEvaluatorBulkDeleteParams, type OnlineEvaluatorSpendParams, type OnlineEvaluatorsOffsetPaginationOnlineEvaluators, } from './online-evaluators.js';
|
|
5
5
|
export { Runs, type ResponseBodyForRunsGenerateQuery, type Run, type RunIngest, type RunSchema, type RunStatsQueryParams, type RunTypeEnum, type RunsFilterDataSourceTypeEnum, type RunQueryV2Params, type RunRetrieveV2Params, type RunRetrieveParams, type RunQueryParams, type RunsItemsCursorPostPagination, } from './runs.js';
|
|
6
6
|
export { Sandboxes, type SandboxListResponse, type SandboxResponse, type SandboxStatusResponse, type ServiceURLResponse, type SnapshotListResponse, type SnapshotResponse, } from './sandboxes/sandboxes.js';
|
|
7
|
-
export { Threads, type
|
|
7
|
+
export { Threads, type Thread, type ThreadStats, type ThreadTrace, type ThreadListTracesParams, type ThreadQueryParams, type ThreadStatsParams, type ThreadTracesItemsCursorGetPagination, type ThreadsItemsCursorPostPagination, } from './threads.js';
|
|
8
8
|
export { Traces, type Trace, type TraceAggregates, type TraceListRunsResponse, type TraceListRunsParams, type TraceQueryParams, type TracesItemsCursorPostPagination, } from './traces.js';
|
|
@@ -88,6 +88,11 @@ export interface OnlineEvaluator {
|
|
|
88
88
|
created_at?: string;
|
|
89
89
|
created_by?: string;
|
|
90
90
|
feedback_keys?: Array<string>;
|
|
91
|
+
/**
|
|
92
|
+
* IsManaged marks a LangChain-managed evaluator (currently the managed Perceived
|
|
93
|
+
* Error judge). NULL in the DB is read as false via COALESCE.
|
|
94
|
+
*/
|
|
95
|
+
is_managed?: boolean;
|
|
91
96
|
/**
|
|
92
97
|
* Embedded child evaluator (populated based on type)
|
|
93
98
|
*/
|
|
@@ -553,6 +553,7 @@ export interface RunStatsQueryParams {
|
|
|
553
553
|
is_root?: boolean | null;
|
|
554
554
|
parent_run?: string | null;
|
|
555
555
|
query?: string | null;
|
|
556
|
+
reference_dataset_id?: string | null;
|
|
556
557
|
reference_example?: Array<string> | null;
|
|
557
558
|
/**
|
|
558
559
|
* Enum for run types.
|
|
@@ -563,6 +564,10 @@ export interface RunStatsQueryParams {
|
|
|
563
564
|
session?: Array<string> | null;
|
|
564
565
|
skip_pagination?: boolean | null;
|
|
565
566
|
start_time?: string | null;
|
|
567
|
+
/**
|
|
568
|
+
* Filter runs by trace ID. When set, limit and cursor-based pagination are not
|
|
569
|
+
* applied — all runs in the trace are returned in a single response.
|
|
570
|
+
*/
|
|
566
571
|
trace?: string | null;
|
|
567
572
|
trace_filter?: string | null;
|
|
568
573
|
tree_filter?: string | null;
|
|
@@ -9,8 +9,7 @@ const path_js_1 = require("../../internal/utils/path.cjs");
|
|
|
9
9
|
class Boxes extends resource_js_1.APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Create a new sandbox from a snapshot. Provide at most one of `snapshot_id` or
|
|
12
|
-
* `snapshot_name`; if neither is provided, the server uses the default
|
|
13
|
-
* blueprint.
|
|
12
|
+
* `snapshot_name`; if neither is provided, the server uses the default snapshot.
|
|
14
13
|
*/
|
|
15
14
|
create(body, options) {
|
|
16
15
|
return this._client.post('/v2/sandboxes/boxes', { body, ...options });
|
|
@@ -5,8 +5,7 @@ import { RequestOptions } from '../../internal/request-options.js';
|
|
|
5
5
|
export declare class Boxes extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Create a new sandbox from a snapshot. Provide at most one of `snapshot_id` or
|
|
8
|
-
* `snapshot_name`; if neither is provided, the server uses the default
|
|
9
|
-
* blueprint.
|
|
8
|
+
* `snapshot_name`; if neither is provided, the server uses the default snapshot.
|
|
10
9
|
*/
|
|
11
10
|
create(body: BoxCreateParams, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxResponse>;
|
|
12
11
|
/**
|
|
@@ -69,6 +68,14 @@ export interface BoxCreateParams {
|
|
|
69
68
|
mem_bytes?: number;
|
|
70
69
|
mount_config?: BoxCreateParams.MountConfig;
|
|
71
70
|
name?: string;
|
|
71
|
+
/**
|
|
72
|
+
* PreserveMemoryOnStop, when true, suspends the sandbox's memory on a voluntary
|
|
73
|
+
* stop (idle timeout or explicit stop) so the next start resumes from where it
|
|
74
|
+
* left off. Default false discards memory and keeps only the filesystem, so the
|
|
75
|
+
* next start is a cold boot. Restarts triggered by infrastructure maintenance
|
|
76
|
+
* always preserve memory regardless of this setting.
|
|
77
|
+
*/
|
|
78
|
+
preserve_memory_on_stop?: boolean;
|
|
72
79
|
proxy_config?: BoxCreateParams.ProxyConfig;
|
|
73
80
|
/**
|
|
74
81
|
* RestoreMemory selects how the sandbox handles a snapshot's captured memory:
|
|
@@ -88,7 +95,7 @@ export interface BoxCreateParams {
|
|
|
88
95
|
export declare namespace BoxCreateParams {
|
|
89
96
|
interface MountConfig {
|
|
90
97
|
auth?: MountConfig.Auth;
|
|
91
|
-
mounts?: Array<MountConfig.SandboxapiS3BucketMountSpec | MountConfig.SandboxapiGcsBucketMountSpec | MountConfig.SandboxapiGitRepoMountSpec>;
|
|
98
|
+
mounts?: Array<MountConfig.SandboxapiS3BucketMountSpec | MountConfig.SandboxapiGcsBucketMountSpec | MountConfig.SandboxapiGitRepoMountSpec | MountConfig.SandboxapiContextHubRepoMountSpec>;
|
|
92
99
|
}
|
|
93
100
|
namespace MountConfig {
|
|
94
101
|
interface Auth {
|
|
@@ -127,8 +134,9 @@ export declare namespace BoxCreateParams {
|
|
|
127
134
|
id: string;
|
|
128
135
|
mount_path: string;
|
|
129
136
|
s3: SandboxapiS3BucketMountSpec.S3;
|
|
130
|
-
type: 's3' | 'gcs' | 'git';
|
|
137
|
+
type: 's3' | 'gcs' | 'git' | 'contexthub';
|
|
131
138
|
cache?: SandboxapiS3BucketMountSpec.Cache;
|
|
139
|
+
contexthub?: SandboxapiS3BucketMountSpec.Contexthub;
|
|
132
140
|
gcs?: SandboxapiS3BucketMountSpec.Gcs;
|
|
133
141
|
git?: SandboxapiS3BucketMountSpec.Git;
|
|
134
142
|
read_only?: boolean;
|
|
@@ -145,6 +153,19 @@ export declare namespace BoxCreateParams {
|
|
|
145
153
|
max_size_bytes?: number;
|
|
146
154
|
writeback_seconds?: number;
|
|
147
155
|
}
|
|
156
|
+
interface Contexthub {
|
|
157
|
+
/**
|
|
158
|
+
* Repo is the Context Hub repository to sync, as "owner/repo" (e.g. "-/my-agent",
|
|
159
|
+
* where "-" is the current workspace). The repo's latest commit tree is mirrored
|
|
160
|
+
* into the mount path.
|
|
161
|
+
*/
|
|
162
|
+
repo: string;
|
|
163
|
+
/**
|
|
164
|
+
* InitialPullOnly syncs the repo once at startup instead of polling for updates
|
|
165
|
+
* for the sandbox's lifetime.
|
|
166
|
+
*/
|
|
167
|
+
initial_pull_only?: boolean;
|
|
168
|
+
}
|
|
148
169
|
interface Gcs {
|
|
149
170
|
bucket: string;
|
|
150
171
|
prefix?: string;
|
|
@@ -165,8 +186,9 @@ export declare namespace BoxCreateParams {
|
|
|
165
186
|
id: string;
|
|
166
187
|
gcs: SandboxapiGcsBucketMountSpec.Gcs;
|
|
167
188
|
mount_path: string;
|
|
168
|
-
type: 's3' | 'gcs' | 'git';
|
|
189
|
+
type: 's3' | 'gcs' | 'git' | 'contexthub';
|
|
169
190
|
cache?: SandboxapiGcsBucketMountSpec.Cache;
|
|
191
|
+
contexthub?: SandboxapiGcsBucketMountSpec.Contexthub;
|
|
170
192
|
git?: SandboxapiGcsBucketMountSpec.Git;
|
|
171
193
|
read_only?: boolean;
|
|
172
194
|
s3?: SandboxapiGcsBucketMountSpec.S3;
|
|
@@ -180,6 +202,19 @@ export declare namespace BoxCreateParams {
|
|
|
180
202
|
max_size_bytes?: number;
|
|
181
203
|
writeback_seconds?: number;
|
|
182
204
|
}
|
|
205
|
+
interface Contexthub {
|
|
206
|
+
/**
|
|
207
|
+
* Repo is the Context Hub repository to sync, as "owner/repo" (e.g. "-/my-agent",
|
|
208
|
+
* where "-" is the current workspace). The repo's latest commit tree is mirrored
|
|
209
|
+
* into the mount path.
|
|
210
|
+
*/
|
|
211
|
+
repo: string;
|
|
212
|
+
/**
|
|
213
|
+
* InitialPullOnly syncs the repo once at startup instead of polling for updates
|
|
214
|
+
* for the sandbox's lifetime.
|
|
215
|
+
*/
|
|
216
|
+
initial_pull_only?: boolean;
|
|
217
|
+
}
|
|
183
218
|
interface Git {
|
|
184
219
|
remote_url: string;
|
|
185
220
|
ref?: Git.Ref;
|
|
@@ -203,8 +238,9 @@ export declare namespace BoxCreateParams {
|
|
|
203
238
|
id: string;
|
|
204
239
|
git: SandboxapiGitRepoMountSpec.Git;
|
|
205
240
|
mount_path: string;
|
|
206
|
-
type: 's3' | 'gcs' | 'git';
|
|
241
|
+
type: 's3' | 'gcs' | 'git' | 'contexthub';
|
|
207
242
|
cache?: SandboxapiGitRepoMountSpec.Cache;
|
|
243
|
+
contexthub?: SandboxapiGitRepoMountSpec.Contexthub;
|
|
208
244
|
gcs?: SandboxapiGitRepoMountSpec.Gcs;
|
|
209
245
|
read_only?: boolean;
|
|
210
246
|
s3?: SandboxapiGitRepoMountSpec.S3;
|
|
@@ -225,6 +261,19 @@ export declare namespace BoxCreateParams {
|
|
|
225
261
|
max_size_bytes?: number;
|
|
226
262
|
writeback_seconds?: number;
|
|
227
263
|
}
|
|
264
|
+
interface Contexthub {
|
|
265
|
+
/**
|
|
266
|
+
* Repo is the Context Hub repository to sync, as "owner/repo" (e.g. "-/my-agent",
|
|
267
|
+
* where "-" is the current workspace). The repo's latest commit tree is mirrored
|
|
268
|
+
* into the mount path.
|
|
269
|
+
*/
|
|
270
|
+
repo: string;
|
|
271
|
+
/**
|
|
272
|
+
* InitialPullOnly syncs the repo once at startup instead of polling for updates
|
|
273
|
+
* for the sandbox's lifetime.
|
|
274
|
+
*/
|
|
275
|
+
initial_pull_only?: boolean;
|
|
276
|
+
}
|
|
228
277
|
interface Gcs {
|
|
229
278
|
bucket: string;
|
|
230
279
|
prefix?: string;
|
|
@@ -237,6 +286,58 @@ export declare namespace BoxCreateParams {
|
|
|
237
286
|
prefix?: string;
|
|
238
287
|
}
|
|
239
288
|
}
|
|
289
|
+
interface SandboxapiContextHubRepoMountSpec {
|
|
290
|
+
id: string;
|
|
291
|
+
contexthub: SandboxapiContextHubRepoMountSpec.Contexthub;
|
|
292
|
+
mount_path: string;
|
|
293
|
+
type: 's3' | 'gcs' | 'git' | 'contexthub';
|
|
294
|
+
cache?: SandboxapiContextHubRepoMountSpec.Cache;
|
|
295
|
+
gcs?: SandboxapiContextHubRepoMountSpec.Gcs;
|
|
296
|
+
git?: SandboxapiContextHubRepoMountSpec.Git;
|
|
297
|
+
read_only?: boolean;
|
|
298
|
+
s3?: SandboxapiContextHubRepoMountSpec.S3;
|
|
299
|
+
}
|
|
300
|
+
namespace SandboxapiContextHubRepoMountSpec {
|
|
301
|
+
interface Contexthub {
|
|
302
|
+
/**
|
|
303
|
+
* Repo is the Context Hub repository to sync, as "owner/repo" (e.g. "-/my-agent",
|
|
304
|
+
* where "-" is the current workspace). The repo's latest commit tree is mirrored
|
|
305
|
+
* into the mount path.
|
|
306
|
+
*/
|
|
307
|
+
repo: string;
|
|
308
|
+
/**
|
|
309
|
+
* InitialPullOnly syncs the repo once at startup instead of polling for updates
|
|
310
|
+
* for the sandbox's lifetime.
|
|
311
|
+
*/
|
|
312
|
+
initial_pull_only?: boolean;
|
|
313
|
+
}
|
|
314
|
+
interface Cache {
|
|
315
|
+
max_size_bytes?: number;
|
|
316
|
+
writeback_seconds?: number;
|
|
317
|
+
}
|
|
318
|
+
interface Gcs {
|
|
319
|
+
bucket: string;
|
|
320
|
+
prefix?: string;
|
|
321
|
+
}
|
|
322
|
+
interface Git {
|
|
323
|
+
remote_url: string;
|
|
324
|
+
ref?: Git.Ref;
|
|
325
|
+
refresh_interval_seconds?: number;
|
|
326
|
+
}
|
|
327
|
+
namespace Git {
|
|
328
|
+
interface Ref {
|
|
329
|
+
name: string;
|
|
330
|
+
type: 'branch' | 'tag';
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
interface S3 {
|
|
334
|
+
bucket: string;
|
|
335
|
+
region: string;
|
|
336
|
+
endpoint_url?: string;
|
|
337
|
+
path_style?: boolean;
|
|
338
|
+
prefix?: string;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
240
341
|
}
|
|
241
342
|
interface ProxyConfig {
|
|
242
343
|
access_control?: ProxyConfig.AccessControl;
|
|
@@ -6,8 +6,7 @@ import { path } from '../../internal/utils/path.js';
|
|
|
6
6
|
export class Boxes extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Create a new sandbox from a snapshot. Provide at most one of `snapshot_id` or
|
|
9
|
-
* `snapshot_name`; if neither is provided, the server uses the default
|
|
10
|
-
* blueprint.
|
|
9
|
+
* `snapshot_name`; if neither is provided, the server uses the default snapshot.
|
|
11
10
|
*/
|
|
12
11
|
create(body, options) {
|
|
13
12
|
return this._client.post('/v2/sandboxes/boxes', { body, ...options });
|
|
@@ -26,6 +26,7 @@ export interface SandboxResponse {
|
|
|
26
26
|
mem_bytes?: number;
|
|
27
27
|
mount_config?: SandboxResponse.MountConfig;
|
|
28
28
|
name?: string;
|
|
29
|
+
preserve_memory_on_stop?: boolean;
|
|
29
30
|
proxy_config?: SandboxResponse.ProxyConfig;
|
|
30
31
|
size_class?: string;
|
|
31
32
|
snapshot_id?: string;
|
|
@@ -39,7 +40,7 @@ export interface SandboxResponse {
|
|
|
39
40
|
export declare namespace SandboxResponse {
|
|
40
41
|
interface MountConfig {
|
|
41
42
|
auth?: MountConfig.Auth;
|
|
42
|
-
mounts?: Array<MountConfig.SandboxapiS3BucketMountSpec | MountConfig.SandboxapiGcsBucketMountSpec | MountConfig.SandboxapiGitRepoMountSpec>;
|
|
43
|
+
mounts?: Array<MountConfig.SandboxapiS3BucketMountSpec | MountConfig.SandboxapiGcsBucketMountSpec | MountConfig.SandboxapiGitRepoMountSpec | MountConfig.SandboxapiContextHubRepoMountSpec>;
|
|
43
44
|
}
|
|
44
45
|
namespace MountConfig {
|
|
45
46
|
interface Auth {
|
|
@@ -78,8 +79,9 @@ export declare namespace SandboxResponse {
|
|
|
78
79
|
id: string;
|
|
79
80
|
mount_path: string;
|
|
80
81
|
s3: SandboxapiS3BucketMountSpec.S3;
|
|
81
|
-
type: 's3' | 'gcs' | 'git';
|
|
82
|
+
type: 's3' | 'gcs' | 'git' | 'contexthub';
|
|
82
83
|
cache?: SandboxapiS3BucketMountSpec.Cache;
|
|
84
|
+
contexthub?: SandboxapiS3BucketMountSpec.Contexthub;
|
|
83
85
|
gcs?: SandboxapiS3BucketMountSpec.Gcs;
|
|
84
86
|
git?: SandboxapiS3BucketMountSpec.Git;
|
|
85
87
|
read_only?: boolean;
|
|
@@ -96,6 +98,19 @@ export declare namespace SandboxResponse {
|
|
|
96
98
|
max_size_bytes?: number;
|
|
97
99
|
writeback_seconds?: number;
|
|
98
100
|
}
|
|
101
|
+
interface Contexthub {
|
|
102
|
+
/**
|
|
103
|
+
* Repo is the Context Hub repository to sync, as "owner/repo" (e.g. "-/my-agent",
|
|
104
|
+
* where "-" is the current workspace). The repo's latest commit tree is mirrored
|
|
105
|
+
* into the mount path.
|
|
106
|
+
*/
|
|
107
|
+
repo: string;
|
|
108
|
+
/**
|
|
109
|
+
* InitialPullOnly syncs the repo once at startup instead of polling for updates
|
|
110
|
+
* for the sandbox's lifetime.
|
|
111
|
+
*/
|
|
112
|
+
initial_pull_only?: boolean;
|
|
113
|
+
}
|
|
99
114
|
interface Gcs {
|
|
100
115
|
bucket: string;
|
|
101
116
|
prefix?: string;
|
|
@@ -116,8 +131,9 @@ export declare namespace SandboxResponse {
|
|
|
116
131
|
id: string;
|
|
117
132
|
gcs: SandboxapiGcsBucketMountSpec.Gcs;
|
|
118
133
|
mount_path: string;
|
|
119
|
-
type: 's3' | 'gcs' | 'git';
|
|
134
|
+
type: 's3' | 'gcs' | 'git' | 'contexthub';
|
|
120
135
|
cache?: SandboxapiGcsBucketMountSpec.Cache;
|
|
136
|
+
contexthub?: SandboxapiGcsBucketMountSpec.Contexthub;
|
|
121
137
|
git?: SandboxapiGcsBucketMountSpec.Git;
|
|
122
138
|
read_only?: boolean;
|
|
123
139
|
s3?: SandboxapiGcsBucketMountSpec.S3;
|
|
@@ -131,6 +147,19 @@ export declare namespace SandboxResponse {
|
|
|
131
147
|
max_size_bytes?: number;
|
|
132
148
|
writeback_seconds?: number;
|
|
133
149
|
}
|
|
150
|
+
interface Contexthub {
|
|
151
|
+
/**
|
|
152
|
+
* Repo is the Context Hub repository to sync, as "owner/repo" (e.g. "-/my-agent",
|
|
153
|
+
* where "-" is the current workspace). The repo's latest commit tree is mirrored
|
|
154
|
+
* into the mount path.
|
|
155
|
+
*/
|
|
156
|
+
repo: string;
|
|
157
|
+
/**
|
|
158
|
+
* InitialPullOnly syncs the repo once at startup instead of polling for updates
|
|
159
|
+
* for the sandbox's lifetime.
|
|
160
|
+
*/
|
|
161
|
+
initial_pull_only?: boolean;
|
|
162
|
+
}
|
|
134
163
|
interface Git {
|
|
135
164
|
remote_url: string;
|
|
136
165
|
ref?: Git.Ref;
|
|
@@ -154,8 +183,9 @@ export declare namespace SandboxResponse {
|
|
|
154
183
|
id: string;
|
|
155
184
|
git: SandboxapiGitRepoMountSpec.Git;
|
|
156
185
|
mount_path: string;
|
|
157
|
-
type: 's3' | 'gcs' | 'git';
|
|
186
|
+
type: 's3' | 'gcs' | 'git' | 'contexthub';
|
|
158
187
|
cache?: SandboxapiGitRepoMountSpec.Cache;
|
|
188
|
+
contexthub?: SandboxapiGitRepoMountSpec.Contexthub;
|
|
159
189
|
gcs?: SandboxapiGitRepoMountSpec.Gcs;
|
|
160
190
|
read_only?: boolean;
|
|
161
191
|
s3?: SandboxapiGitRepoMountSpec.S3;
|
|
@@ -176,6 +206,19 @@ export declare namespace SandboxResponse {
|
|
|
176
206
|
max_size_bytes?: number;
|
|
177
207
|
writeback_seconds?: number;
|
|
178
208
|
}
|
|
209
|
+
interface Contexthub {
|
|
210
|
+
/**
|
|
211
|
+
* Repo is the Context Hub repository to sync, as "owner/repo" (e.g. "-/my-agent",
|
|
212
|
+
* where "-" is the current workspace). The repo's latest commit tree is mirrored
|
|
213
|
+
* into the mount path.
|
|
214
|
+
*/
|
|
215
|
+
repo: string;
|
|
216
|
+
/**
|
|
217
|
+
* InitialPullOnly syncs the repo once at startup instead of polling for updates
|
|
218
|
+
* for the sandbox's lifetime.
|
|
219
|
+
*/
|
|
220
|
+
initial_pull_only?: boolean;
|
|
221
|
+
}
|
|
179
222
|
interface Gcs {
|
|
180
223
|
bucket: string;
|
|
181
224
|
prefix?: string;
|
|
@@ -188,6 +231,58 @@ export declare namespace SandboxResponse {
|
|
|
188
231
|
prefix?: string;
|
|
189
232
|
}
|
|
190
233
|
}
|
|
234
|
+
interface SandboxapiContextHubRepoMountSpec {
|
|
235
|
+
id: string;
|
|
236
|
+
contexthub: SandboxapiContextHubRepoMountSpec.Contexthub;
|
|
237
|
+
mount_path: string;
|
|
238
|
+
type: 's3' | 'gcs' | 'git' | 'contexthub';
|
|
239
|
+
cache?: SandboxapiContextHubRepoMountSpec.Cache;
|
|
240
|
+
gcs?: SandboxapiContextHubRepoMountSpec.Gcs;
|
|
241
|
+
git?: SandboxapiContextHubRepoMountSpec.Git;
|
|
242
|
+
read_only?: boolean;
|
|
243
|
+
s3?: SandboxapiContextHubRepoMountSpec.S3;
|
|
244
|
+
}
|
|
245
|
+
namespace SandboxapiContextHubRepoMountSpec {
|
|
246
|
+
interface Contexthub {
|
|
247
|
+
/**
|
|
248
|
+
* Repo is the Context Hub repository to sync, as "owner/repo" (e.g. "-/my-agent",
|
|
249
|
+
* where "-" is the current workspace). The repo's latest commit tree is mirrored
|
|
250
|
+
* into the mount path.
|
|
251
|
+
*/
|
|
252
|
+
repo: string;
|
|
253
|
+
/**
|
|
254
|
+
* InitialPullOnly syncs the repo once at startup instead of polling for updates
|
|
255
|
+
* for the sandbox's lifetime.
|
|
256
|
+
*/
|
|
257
|
+
initial_pull_only?: boolean;
|
|
258
|
+
}
|
|
259
|
+
interface Cache {
|
|
260
|
+
max_size_bytes?: number;
|
|
261
|
+
writeback_seconds?: number;
|
|
262
|
+
}
|
|
263
|
+
interface Gcs {
|
|
264
|
+
bucket: string;
|
|
265
|
+
prefix?: string;
|
|
266
|
+
}
|
|
267
|
+
interface Git {
|
|
268
|
+
remote_url: string;
|
|
269
|
+
ref?: Git.Ref;
|
|
270
|
+
refresh_interval_seconds?: number;
|
|
271
|
+
}
|
|
272
|
+
namespace Git {
|
|
273
|
+
interface Ref {
|
|
274
|
+
name: string;
|
|
275
|
+
type: 'branch' | 'tag';
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
interface S3 {
|
|
279
|
+
bucket: string;
|
|
280
|
+
region: string;
|
|
281
|
+
endpoint_url?: string;
|
|
282
|
+
path_style?: boolean;
|
|
283
|
+
prefix?: string;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
191
286
|
}
|
|
192
287
|
interface ProxyConfig {
|
|
193
288
|
access_control?: ProxyConfig.AccessControl;
|
|
@@ -14,7 +14,7 @@ class Threads extends resource_js_1.APIResource {
|
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
16
|
* // Automatically fetches more pages as needed.
|
|
17
|
-
* for await (const
|
|
17
|
+
* for await (const threadTrace of client.threads.listTraces(
|
|
18
18
|
* 'thread_id',
|
|
19
19
|
* { project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
|
|
20
20
|
* )) {
|
|
@@ -33,7 +33,7 @@ class Threads extends resource_js_1.APIResource {
|
|
|
33
33
|
* @example
|
|
34
34
|
* ```ts
|
|
35
35
|
* // Automatically fetches more pages as needed.
|
|
36
|
-
* for await (const
|
|
36
|
+
* for await (const thread of client.threads.query()) {
|
|
37
37
|
* // ...
|
|
38
38
|
* }
|
|
39
39
|
* ```
|
|
@@ -52,10 +52,13 @@ class Threads extends resource_js_1.APIResource {
|
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
54
54
|
* ```ts
|
|
55
|
-
* const
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
55
|
+
* const threadStats = await client.threads.stats(
|
|
56
|
+
* 'thread_id',
|
|
57
|
+
* {
|
|
58
|
+
* selects: ['TURNS'],
|
|
59
|
+
* session_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
60
|
+
* },
|
|
61
|
+
* );
|
|
59
62
|
* ```
|
|
60
63
|
*/
|
|
61
64
|
stats(threadID, query, options) {
|