langsmith 0.7.12 → 0.7.13
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.cjs +8 -0
- package/dist/_openapi_client/client.d.ts +3 -0
- package/dist/_openapi_client/client.js +8 -0
- package/dist/_openapi_client/resources/index.cjs +3 -1
- package/dist/_openapi_client/resources/index.d.ts +1 -0
- package/dist/_openapi_client/resources/index.js +1 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +86 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +458 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.js +82 -0
- package/dist/_openapi_client/resources/sandboxes/registries.cjs +44 -0
- package/dist/_openapi_client/resources/sandboxes/registries.d.ts +67 -0
- package/dist/_openapi_client/resources/sandboxes/registries.js +40 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +72 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +308 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +35 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +39 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +62 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +35 -0
- package/dist/client.cjs +4 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.js +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/client.cjs +58 -15
- package/dist/sandbox/client.d.ts +27 -1
- package/dist/sandbox/client.js +54 -11
- package/dist/sandbox/sandbox.cjs +7 -6
- package/dist/sandbox/sandbox.d.ts +7 -2
- package/dist/sandbox/sandbox.js +8 -7
- package/dist/sandbox/types.d.ts +1 -7
- package/package.json +1 -1
|
@@ -66,6 +66,7 @@ const info_js_1 = require("./resources/info.cjs");
|
|
|
66
66
|
const online_evaluators_js_1 = require("./resources/online-evaluators.cjs");
|
|
67
67
|
const datasets_js_1 = require("./resources/datasets/datasets.cjs");
|
|
68
68
|
const runs_js_1 = require("./resources/runs/runs.cjs");
|
|
69
|
+
const sandboxes_js_1 = require("./resources/sandboxes/sandboxes.cjs");
|
|
69
70
|
const sessions_js_1 = require("./resources/sessions/sessions.cjs");
|
|
70
71
|
const headers_js_1 = require("./internal/headers.cjs");
|
|
71
72
|
const env_js_1 = require("./internal/utils/env.cjs");
|
|
@@ -187,6 +188,12 @@ class Langsmith {
|
|
|
187
188
|
writable: true,
|
|
188
189
|
value: new API.Info(this)
|
|
189
190
|
});
|
|
191
|
+
Object.defineProperty(this, "sandboxes", {
|
|
192
|
+
enumerable: true,
|
|
193
|
+
configurable: true,
|
|
194
|
+
writable: true,
|
|
195
|
+
value: new API.Sandboxes(this)
|
|
196
|
+
});
|
|
190
197
|
const options = {
|
|
191
198
|
apiKey,
|
|
192
199
|
tenantID,
|
|
@@ -732,3 +739,4 @@ Langsmith.Datasets = datasets_js_1.Datasets;
|
|
|
732
739
|
Langsmith.Runs = runs_js_1.Runs;
|
|
733
740
|
Langsmith.OnlineEvaluators = online_evaluators_js_1.OnlineEvaluators;
|
|
734
741
|
Langsmith.Info = info_js_1.Info;
|
|
742
|
+
Langsmith.Sandboxes = sandboxes_js_1.Sandboxes;
|
|
@@ -12,6 +12,7 @@ import { Info, InfoListResponse } from './resources/info.js';
|
|
|
12
12
|
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';
|
|
13
13
|
import { DataType, Dataset, DatasetCloneParams, DatasetCloneResponse, DatasetCreateParams, DatasetDeleteResponse, DatasetListParams, DatasetRetrieveCsvParams, DatasetRetrieveCsvResponse, DatasetRetrieveJSONLParams, DatasetRetrieveJSONLResponse, DatasetRetrieveOpenAIFtParams, DatasetRetrieveOpenAIFtResponse, DatasetRetrieveOpenAIParams, DatasetRetrieveOpenAIResponse, DatasetRetrieveVersionParams, DatasetTransformation, DatasetUpdateParams, DatasetUpdateResponse, DatasetUpdateTagsParams, DatasetUploadParams, DatasetVersion, Datasets, DatasetsOffsetPaginationTopLevelArray, FeedbackCreateCoreSchema, Missing, SortByDatasetColumn } from './resources/datasets/datasets.js';
|
|
14
14
|
import { QueryRunResponse, QueryRunResponsesItemsCursorPostPagination, ResponseBodyForRunsGenerateQuery, Run, RunQueryParams, RunQueryV2Params, RunRetrieveParams, RunRetrieveV2Params, RunSchema, RunStatsQueryParams, RunTypeEnum, Runs, RunsFilterDataSourceTypeEnum } from './resources/runs/runs.js';
|
|
15
|
+
import { SandboxListResponse, SandboxResponse, SandboxStatusResponse, Sandboxes, ServiceURLResponse, SnapshotListResponse, SnapshotResponse } from './resources/sandboxes/sandboxes.js';
|
|
15
16
|
import { CustomChartsSection, CustomChartsSectionRequest, RunStatsGroupBy, SessionCreateParams, SessionDashboardParams, SessionDeleteResponse, SessionListParams, SessionRetrieveParams, SessionSortableColumns, SessionUpdateParams, Sessions, TimedeltaInput, TracerSession, TracerSessionWithoutVirtualFields, TracerSessionsOffsetPaginationTopLevelArray } from './resources/sessions/sessions.js';
|
|
16
17
|
import { type Fetch } from './internal/builtin-types.js';
|
|
17
18
|
import { HeadersLike, NullableHeaders } from './internal/headers.js';
|
|
@@ -190,6 +191,7 @@ export declare class Langsmith {
|
|
|
190
191
|
runs: API.Runs;
|
|
191
192
|
onlineEvaluators: API.OnlineEvaluators;
|
|
192
193
|
info: API.Info;
|
|
194
|
+
sandboxes: API.Sandboxes;
|
|
193
195
|
}
|
|
194
196
|
export declare namespace Langsmith {
|
|
195
197
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -214,4 +216,5 @@ export declare namespace Langsmith {
|
|
|
214
216
|
export { Runs as Runs, type QueryRunResponse as QueryRunResponse, type ResponseBodyForRunsGenerateQuery as ResponseBodyForRunsGenerateQuery, type Run as Run, type RunSchema as RunSchema, type RunStatsQueryParams as RunStatsQueryParams, type RunTypeEnum as RunTypeEnum, type RunsFilterDataSourceTypeEnum as RunsFilterDataSourceTypeEnum, type QueryRunResponsesItemsCursorPostPagination as QueryRunResponsesItemsCursorPostPagination, type RunQueryV2Params as RunQueryV2Params, type RunRetrieveV2Params as RunRetrieveV2Params, type RunRetrieveParams as RunRetrieveParams, type RunQueryParams as RunQueryParams, };
|
|
215
217
|
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, };
|
|
216
218
|
export { Info as Info, type InfoListResponse as InfoListResponse };
|
|
219
|
+
export { Sandboxes as Sandboxes, type SandboxListResponse as SandboxListResponse, type SandboxResponse as SandboxResponse, type SandboxStatusResponse as SandboxStatusResponse, type ServiceURLResponse as ServiceURLResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotResponse as SnapshotResponse, };
|
|
217
220
|
}
|
|
@@ -30,6 +30,7 @@ import { Info } from './resources/info.js';
|
|
|
30
30
|
import { OnlineEvaluators, } from './resources/online-evaluators.js';
|
|
31
31
|
import { Datasets, } from './resources/datasets/datasets.js';
|
|
32
32
|
import { Runs, } from './resources/runs/runs.js';
|
|
33
|
+
import { Sandboxes, } from './resources/sandboxes/sandboxes.js';
|
|
33
34
|
import { Sessions, } from './resources/sessions/sessions.js';
|
|
34
35
|
import { buildHeaders } from './internal/headers.js';
|
|
35
36
|
import { readEnv } from './internal/utils/env.js';
|
|
@@ -151,6 +152,12 @@ export class Langsmith {
|
|
|
151
152
|
writable: true,
|
|
152
153
|
value: new API.Info(this)
|
|
153
154
|
});
|
|
155
|
+
Object.defineProperty(this, "sandboxes", {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
configurable: true,
|
|
158
|
+
writable: true,
|
|
159
|
+
value: new API.Sandboxes(this)
|
|
160
|
+
});
|
|
154
161
|
const options = {
|
|
155
162
|
apiKey,
|
|
156
163
|
tenantID,
|
|
@@ -695,3 +702,4 @@ Langsmith.Datasets = Datasets;
|
|
|
695
702
|
Langsmith.Runs = Runs;
|
|
696
703
|
Langsmith.OnlineEvaluators = OnlineEvaluators;
|
|
697
704
|
Langsmith.Info = Info;
|
|
705
|
+
Langsmith.Sandboxes = Sandboxes;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.Sessions = exports.Runs = exports.OnlineEvaluators = exports.Info = exports.Datasets = void 0;
|
|
5
|
+
exports.Sessions = exports.Sandboxes = exports.Runs = exports.OnlineEvaluators = exports.Info = exports.Datasets = void 0;
|
|
6
6
|
var datasets_js_1 = require("./datasets/datasets.cjs");
|
|
7
7
|
Object.defineProperty(exports, "Datasets", { enumerable: true, get: function () { return datasets_js_1.Datasets; } });
|
|
8
8
|
var info_js_1 = require("./info.cjs");
|
|
@@ -11,5 +11,7 @@ var online_evaluators_js_1 = require("./online-evaluators.cjs");
|
|
|
11
11
|
Object.defineProperty(exports, "OnlineEvaluators", { enumerable: true, get: function () { return online_evaluators_js_1.OnlineEvaluators; } });
|
|
12
12
|
var runs_js_1 = require("./runs/runs.cjs");
|
|
13
13
|
Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_js_1.Runs; } });
|
|
14
|
+
var sandboxes_js_1 = require("./sandboxes/sandboxes.cjs");
|
|
15
|
+
Object.defineProperty(exports, "Sandboxes", { enumerable: true, get: function () { return sandboxes_js_1.Sandboxes; } });
|
|
14
16
|
var sessions_js_1 = require("./sessions/sessions.cjs");
|
|
15
17
|
Object.defineProperty(exports, "Sessions", { enumerable: true, get: function () { return sessions_js_1.Sessions; } });
|
|
@@ -2,4 +2,5 @@ export { Datasets, type DataType, type Dataset, type DatasetTransformation, type
|
|
|
2
2
|
export { Info, type InfoListResponse } from './info.js';
|
|
3
3
|
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';
|
|
4
4
|
export { Runs, type QueryRunResponse, type ResponseBodyForRunsGenerateQuery, type Run, type RunSchema, type RunStatsQueryParams, type RunTypeEnum, type RunsFilterDataSourceTypeEnum, type RunQueryV2Params, type RunRetrieveV2Params, type RunRetrieveParams, type RunQueryParams, type QueryRunResponsesItemsCursorPostPagination, } from './runs/runs.js';
|
|
5
|
+
export { Sandboxes, type SandboxListResponse, type SandboxResponse, type SandboxStatusResponse, type ServiceURLResponse, type SnapshotListResponse, type SnapshotResponse, } from './sandboxes/sandboxes.js';
|
|
5
6
|
export { Sessions, type CustomChartsSection, type CustomChartsSectionRequest, type RunStatsGroupBy, type SessionSortableColumns, type TimedeltaInput, type TracerSession, type TracerSessionWithoutVirtualFields, type SessionDeleteResponse, type SessionCreateParams, type SessionRetrieveParams, type SessionUpdateParams, type SessionListParams, type SessionDashboardParams, type TracerSessionsOffsetPaginationTopLevelArray, } from './sessions/sessions.js';
|
|
@@ -4,4 +4,5 @@ export { Datasets, } from './datasets/datasets.js';
|
|
|
4
4
|
export { Info } from './info.js';
|
|
5
5
|
export { OnlineEvaluators, } from './online-evaluators.js';
|
|
6
6
|
export { Runs, } from './runs/runs.js';
|
|
7
|
+
export { Sandboxes, } from './sandboxes/sandboxes.js';
|
|
7
8
|
export { Sessions, } from './sessions/sessions.js';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Boxes = void 0;
|
|
6
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
+
const headers_js_1 = require("../../internal/headers.cjs");
|
|
8
|
+
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
9
|
+
class Boxes extends resource_js_1.APIResource {
|
|
10
|
+
/**
|
|
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 static
|
|
13
|
+
* blueprint.
|
|
14
|
+
*/
|
|
15
|
+
create(body, options) {
|
|
16
|
+
return this._client.post('/v2/sandboxes/boxes', { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Retrieve a sandbox by name. Stale provisioning sandboxes are auto-failed.
|
|
20
|
+
*/
|
|
21
|
+
retrieve(name, options) {
|
|
22
|
+
return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, options);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Update a sandbox's display name. The name must be unique within the tenant.
|
|
26
|
+
*/
|
|
27
|
+
update(name, body, options) {
|
|
28
|
+
return this._client.patch((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* List sandboxes for the authenticated tenant, with optional filtering, sorting,
|
|
32
|
+
* and pagination.
|
|
33
|
+
*/
|
|
34
|
+
list(query = {}, options) {
|
|
35
|
+
return this._client.get('/v2/sandboxes/boxes', { query, ...options });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Delete a sandbox by name or UUID. Tears down the sandbox runtime and removes the
|
|
39
|
+
* DB record.
|
|
40
|
+
*/
|
|
41
|
+
delete(name, options) {
|
|
42
|
+
return this._client.delete((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, {
|
|
43
|
+
...options,
|
|
44
|
+
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a snapshot by capturing the current state of a sandbox or promoting an
|
|
49
|
+
* existing checkpoint.
|
|
50
|
+
*/
|
|
51
|
+
createSnapshot(name, body, options) {
|
|
52
|
+
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/snapshot`, { body, ...options });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create a short-lived JWT for accessing an HTTP service running on a specific
|
|
56
|
+
* port inside a sandbox. Returns a browser_url (sets auth cookie via redirect), a
|
|
57
|
+
* service_url (for use with the X-Langsmith-Sandbox-Service-Token header), the raw
|
|
58
|
+
* token, and its expiry.
|
|
59
|
+
*/
|
|
60
|
+
generateServiceURL(name, body, options) {
|
|
61
|
+
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/service-url`, { body, ...options });
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Retrieve the lightweight status of a sandbox for polling.
|
|
65
|
+
*/
|
|
66
|
+
getStatus(name, options) {
|
|
67
|
+
return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/status`, options);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Start a stopped or failed sandbox. This endpoint is not idempotent.
|
|
71
|
+
*/
|
|
72
|
+
start(name, options) {
|
|
73
|
+
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/start`, options);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Stop a ready sandbox. This endpoint is not idempotent; the filesystem is
|
|
77
|
+
* preserved for later restart.
|
|
78
|
+
*/
|
|
79
|
+
stop(name, options) {
|
|
80
|
+
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/stop`, {
|
|
81
|
+
...options,
|
|
82
|
+
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.Boxes = Boxes;
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as SandboxesAPI from './sandboxes.js';
|
|
3
|
+
import { APIPromise } from '../../core/api-promise.js';
|
|
4
|
+
import { RequestOptions } from '../../internal/request-options.js';
|
|
5
|
+
export declare class Boxes extends APIResource {
|
|
6
|
+
/**
|
|
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 static
|
|
9
|
+
* blueprint.
|
|
10
|
+
*/
|
|
11
|
+
create(body: BoxCreateParams, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Retrieve a sandbox by name. Stale provisioning sandboxes are auto-failed.
|
|
14
|
+
*/
|
|
15
|
+
retrieve(name: string, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Update a sandbox's display name. The name must be unique within the tenant.
|
|
18
|
+
*/
|
|
19
|
+
update(name: string, body: BoxUpdateParams, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* List sandboxes for the authenticated tenant, with optional filtering, sorting,
|
|
22
|
+
* and pagination.
|
|
23
|
+
*/
|
|
24
|
+
list(query?: BoxListParams | null | undefined, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxListResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Delete a sandbox by name or UUID. Tears down the sandbox runtime and removes the
|
|
27
|
+
* DB record.
|
|
28
|
+
*/
|
|
29
|
+
delete(name: string, options?: RequestOptions): APIPromise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Create a snapshot by capturing the current state of a sandbox or promoting an
|
|
32
|
+
* existing checkpoint.
|
|
33
|
+
*/
|
|
34
|
+
createSnapshot(name: string, body: BoxCreateSnapshotParams, options?: RequestOptions): APIPromise<SandboxesAPI.SnapshotResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Create a short-lived JWT for accessing an HTTP service running on a specific
|
|
37
|
+
* port inside a sandbox. Returns a browser_url (sets auth cookie via redirect), a
|
|
38
|
+
* service_url (for use with the X-Langsmith-Sandbox-Service-Token header), the raw
|
|
39
|
+
* token, and its expiry.
|
|
40
|
+
*/
|
|
41
|
+
generateServiceURL(name: string, body: BoxGenerateServiceURLParams, options?: RequestOptions): APIPromise<SandboxesAPI.ServiceURLResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Retrieve the lightweight status of a sandbox for polling.
|
|
44
|
+
*/
|
|
45
|
+
getStatus(name: string, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxStatusResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Start a stopped or failed sandbox. This endpoint is not idempotent.
|
|
48
|
+
*/
|
|
49
|
+
start(name: string, options?: RequestOptions): APIPromise<SandboxesAPI.SandboxResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Stop a ready sandbox. This endpoint is not idempotent; the filesystem is
|
|
52
|
+
* preserved for later restart.
|
|
53
|
+
*/
|
|
54
|
+
stop(name: string, options?: RequestOptions): APIPromise<void>;
|
|
55
|
+
}
|
|
56
|
+
export interface BoxCreateParams {
|
|
57
|
+
delete_after_stop_seconds?: number;
|
|
58
|
+
env_vars?: {
|
|
59
|
+
[key: string]: string;
|
|
60
|
+
};
|
|
61
|
+
fs_capacity_bytes?: number;
|
|
62
|
+
idle_ttl_seconds?: number;
|
|
63
|
+
mem_bytes?: number;
|
|
64
|
+
mount_config?: BoxCreateParams.MountConfig;
|
|
65
|
+
name?: string;
|
|
66
|
+
proxy_config?: BoxCreateParams.ProxyConfig;
|
|
67
|
+
/**
|
|
68
|
+
* RestoreMemory selects how the sandbox handles a snapshot's captured memory:
|
|
69
|
+
*
|
|
70
|
+
* nil → if-present: resume from memory when the snapshot has it, else cold-boot
|
|
71
|
+
* (default). true → always: resume from memory; rejected if the snapshot has none.
|
|
72
|
+
* false → never: always cold-boot.
|
|
73
|
+
*
|
|
74
|
+
* Applies to this request only.
|
|
75
|
+
*/
|
|
76
|
+
restore_memory?: boolean;
|
|
77
|
+
snapshot_id?: string;
|
|
78
|
+
snapshot_name?: string;
|
|
79
|
+
tag_value_ids?: Array<string>;
|
|
80
|
+
vcpus?: number;
|
|
81
|
+
}
|
|
82
|
+
export declare namespace BoxCreateParams {
|
|
83
|
+
interface MountConfig {
|
|
84
|
+
auth?: MountConfig.Auth;
|
|
85
|
+
mounts?: Array<MountConfig.SandboxapiS3BucketMountSpec | MountConfig.SandboxapiGcsBucketMountSpec | MountConfig.SandboxapiGitRepoMountSpec>;
|
|
86
|
+
}
|
|
87
|
+
namespace MountConfig {
|
|
88
|
+
interface Auth {
|
|
89
|
+
aws?: Auth.Aws;
|
|
90
|
+
gcp?: Auth.Gcp;
|
|
91
|
+
}
|
|
92
|
+
namespace Auth {
|
|
93
|
+
interface Aws {
|
|
94
|
+
access_key_id: Aws.AccessKeyID;
|
|
95
|
+
secret_access_key: Aws.SecretAccessKey;
|
|
96
|
+
}
|
|
97
|
+
namespace Aws {
|
|
98
|
+
interface AccessKeyID {
|
|
99
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
100
|
+
is_set?: boolean;
|
|
101
|
+
value?: string;
|
|
102
|
+
}
|
|
103
|
+
interface SecretAccessKey {
|
|
104
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
105
|
+
is_set?: boolean;
|
|
106
|
+
value?: string;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
interface Gcp {
|
|
110
|
+
service_account_json: Gcp.ServiceAccountJson;
|
|
111
|
+
}
|
|
112
|
+
namespace Gcp {
|
|
113
|
+
interface ServiceAccountJson {
|
|
114
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
115
|
+
is_set?: boolean;
|
|
116
|
+
value?: string;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
interface SandboxapiS3BucketMountSpec {
|
|
121
|
+
id: string;
|
|
122
|
+
mount_path: string;
|
|
123
|
+
s3: SandboxapiS3BucketMountSpec.S3;
|
|
124
|
+
type: 's3' | 'gcs' | 'git';
|
|
125
|
+
cache?: SandboxapiS3BucketMountSpec.Cache;
|
|
126
|
+
gcs?: SandboxapiS3BucketMountSpec.Gcs;
|
|
127
|
+
git?: SandboxapiS3BucketMountSpec.Git;
|
|
128
|
+
read_only?: boolean;
|
|
129
|
+
}
|
|
130
|
+
namespace SandboxapiS3BucketMountSpec {
|
|
131
|
+
interface S3 {
|
|
132
|
+
bucket: string;
|
|
133
|
+
region: string;
|
|
134
|
+
endpoint_url?: string;
|
|
135
|
+
path_style?: boolean;
|
|
136
|
+
prefix?: string;
|
|
137
|
+
}
|
|
138
|
+
interface Cache {
|
|
139
|
+
max_size_bytes?: number;
|
|
140
|
+
writeback_seconds?: number;
|
|
141
|
+
}
|
|
142
|
+
interface Gcs {
|
|
143
|
+
bucket: string;
|
|
144
|
+
prefix?: string;
|
|
145
|
+
}
|
|
146
|
+
interface Git {
|
|
147
|
+
remote_url: string;
|
|
148
|
+
ref?: Git.Ref;
|
|
149
|
+
refresh_interval_seconds?: number;
|
|
150
|
+
}
|
|
151
|
+
namespace Git {
|
|
152
|
+
interface Ref {
|
|
153
|
+
name: string;
|
|
154
|
+
type: 'branch' | 'tag';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
interface SandboxapiGcsBucketMountSpec {
|
|
159
|
+
id: string;
|
|
160
|
+
gcs: SandboxapiGcsBucketMountSpec.Gcs;
|
|
161
|
+
mount_path: string;
|
|
162
|
+
type: 's3' | 'gcs' | 'git';
|
|
163
|
+
cache?: SandboxapiGcsBucketMountSpec.Cache;
|
|
164
|
+
git?: SandboxapiGcsBucketMountSpec.Git;
|
|
165
|
+
read_only?: boolean;
|
|
166
|
+
s3?: SandboxapiGcsBucketMountSpec.S3;
|
|
167
|
+
}
|
|
168
|
+
namespace SandboxapiGcsBucketMountSpec {
|
|
169
|
+
interface Gcs {
|
|
170
|
+
bucket: string;
|
|
171
|
+
prefix?: string;
|
|
172
|
+
}
|
|
173
|
+
interface Cache {
|
|
174
|
+
max_size_bytes?: number;
|
|
175
|
+
writeback_seconds?: number;
|
|
176
|
+
}
|
|
177
|
+
interface Git {
|
|
178
|
+
remote_url: string;
|
|
179
|
+
ref?: Git.Ref;
|
|
180
|
+
refresh_interval_seconds?: number;
|
|
181
|
+
}
|
|
182
|
+
namespace Git {
|
|
183
|
+
interface Ref {
|
|
184
|
+
name: string;
|
|
185
|
+
type: 'branch' | 'tag';
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
interface S3 {
|
|
189
|
+
bucket: string;
|
|
190
|
+
region: string;
|
|
191
|
+
endpoint_url?: string;
|
|
192
|
+
path_style?: boolean;
|
|
193
|
+
prefix?: string;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
interface SandboxapiGitRepoMountSpec {
|
|
197
|
+
id: string;
|
|
198
|
+
git: SandboxapiGitRepoMountSpec.Git;
|
|
199
|
+
mount_path: string;
|
|
200
|
+
type: 's3' | 'gcs' | 'git';
|
|
201
|
+
cache?: SandboxapiGitRepoMountSpec.Cache;
|
|
202
|
+
gcs?: SandboxapiGitRepoMountSpec.Gcs;
|
|
203
|
+
read_only?: boolean;
|
|
204
|
+
s3?: SandboxapiGitRepoMountSpec.S3;
|
|
205
|
+
}
|
|
206
|
+
namespace SandboxapiGitRepoMountSpec {
|
|
207
|
+
interface Git {
|
|
208
|
+
remote_url: string;
|
|
209
|
+
ref?: Git.Ref;
|
|
210
|
+
refresh_interval_seconds?: number;
|
|
211
|
+
}
|
|
212
|
+
namespace Git {
|
|
213
|
+
interface Ref {
|
|
214
|
+
name: string;
|
|
215
|
+
type: 'branch' | 'tag';
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
interface Cache {
|
|
219
|
+
max_size_bytes?: number;
|
|
220
|
+
writeback_seconds?: number;
|
|
221
|
+
}
|
|
222
|
+
interface Gcs {
|
|
223
|
+
bucket: string;
|
|
224
|
+
prefix?: string;
|
|
225
|
+
}
|
|
226
|
+
interface S3 {
|
|
227
|
+
bucket: string;
|
|
228
|
+
region: string;
|
|
229
|
+
endpoint_url?: string;
|
|
230
|
+
path_style?: boolean;
|
|
231
|
+
prefix?: string;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
interface ProxyConfig {
|
|
236
|
+
access_control?: ProxyConfig.AccessControl;
|
|
237
|
+
callbacks?: Array<ProxyConfig.Callback>;
|
|
238
|
+
no_proxy?: Array<string>;
|
|
239
|
+
rules?: Array<ProxyConfig.Rule>;
|
|
240
|
+
}
|
|
241
|
+
namespace ProxyConfig {
|
|
242
|
+
interface AccessControl {
|
|
243
|
+
allow_list?: Array<string>;
|
|
244
|
+
deny_list?: Array<string>;
|
|
245
|
+
}
|
|
246
|
+
interface Callback {
|
|
247
|
+
match_hosts: Array<string>;
|
|
248
|
+
ttl_seconds: number;
|
|
249
|
+
url: string;
|
|
250
|
+
full_request?: boolean;
|
|
251
|
+
request_headers?: Array<Callback.RequestHeader>;
|
|
252
|
+
}
|
|
253
|
+
namespace Callback {
|
|
254
|
+
interface RequestHeader {
|
|
255
|
+
name: string;
|
|
256
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
257
|
+
is_set?: boolean;
|
|
258
|
+
value?: string;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
interface Rule {
|
|
262
|
+
name: string;
|
|
263
|
+
aws?: Rule.Aws;
|
|
264
|
+
enabled?: boolean;
|
|
265
|
+
gcp?: Rule.Gcp;
|
|
266
|
+
headers?: Array<Rule.Header>;
|
|
267
|
+
/**
|
|
268
|
+
* MatchHosts is only accepted for header injection rules. Provider auth rules use
|
|
269
|
+
* built-in host matching.
|
|
270
|
+
*/
|
|
271
|
+
match_hosts?: Array<string>;
|
|
272
|
+
match_paths?: Array<string>;
|
|
273
|
+
type?: string;
|
|
274
|
+
}
|
|
275
|
+
namespace Rule {
|
|
276
|
+
interface Aws {
|
|
277
|
+
access_key_id: Aws.AccessKeyID;
|
|
278
|
+
secret_access_key: Aws.SecretAccessKey;
|
|
279
|
+
}
|
|
280
|
+
namespace Aws {
|
|
281
|
+
interface AccessKeyID {
|
|
282
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
283
|
+
is_set?: boolean;
|
|
284
|
+
value?: string;
|
|
285
|
+
}
|
|
286
|
+
interface SecretAccessKey {
|
|
287
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
288
|
+
is_set?: boolean;
|
|
289
|
+
value?: string;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
interface Gcp {
|
|
293
|
+
scopes: Array<string>;
|
|
294
|
+
service_account_json: Gcp.ServiceAccountJson;
|
|
295
|
+
}
|
|
296
|
+
namespace Gcp {
|
|
297
|
+
interface ServiceAccountJson {
|
|
298
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
299
|
+
is_set?: boolean;
|
|
300
|
+
value?: string;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
interface Header {
|
|
304
|
+
name: string;
|
|
305
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
306
|
+
is_set?: boolean;
|
|
307
|
+
value?: string;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
export interface BoxUpdateParams {
|
|
313
|
+
delete_after_stop_seconds?: number;
|
|
314
|
+
fs_capacity_bytes?: number;
|
|
315
|
+
idle_ttl_seconds?: number;
|
|
316
|
+
mem_bytes?: number;
|
|
317
|
+
name?: string;
|
|
318
|
+
proxy_config?: BoxUpdateParams.ProxyConfig;
|
|
319
|
+
tag_value_ids?: Array<string>;
|
|
320
|
+
vcpus?: number;
|
|
321
|
+
}
|
|
322
|
+
export declare namespace BoxUpdateParams {
|
|
323
|
+
interface ProxyConfig {
|
|
324
|
+
access_control?: ProxyConfig.AccessControl;
|
|
325
|
+
callbacks?: Array<ProxyConfig.Callback>;
|
|
326
|
+
no_proxy?: Array<string>;
|
|
327
|
+
rules?: Array<ProxyConfig.Rule>;
|
|
328
|
+
}
|
|
329
|
+
namespace ProxyConfig {
|
|
330
|
+
interface AccessControl {
|
|
331
|
+
allow_list?: Array<string>;
|
|
332
|
+
deny_list?: Array<string>;
|
|
333
|
+
}
|
|
334
|
+
interface Callback {
|
|
335
|
+
match_hosts: Array<string>;
|
|
336
|
+
ttl_seconds: number;
|
|
337
|
+
url: string;
|
|
338
|
+
full_request?: boolean;
|
|
339
|
+
request_headers?: Array<Callback.RequestHeader>;
|
|
340
|
+
}
|
|
341
|
+
namespace Callback {
|
|
342
|
+
interface RequestHeader {
|
|
343
|
+
name: string;
|
|
344
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
345
|
+
is_set?: boolean;
|
|
346
|
+
value?: string;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
interface Rule {
|
|
350
|
+
name: string;
|
|
351
|
+
aws?: Rule.Aws;
|
|
352
|
+
enabled?: boolean;
|
|
353
|
+
gcp?: Rule.Gcp;
|
|
354
|
+
headers?: Array<Rule.Header>;
|
|
355
|
+
/**
|
|
356
|
+
* MatchHosts is only accepted for header injection rules. Provider auth rules use
|
|
357
|
+
* built-in host matching.
|
|
358
|
+
*/
|
|
359
|
+
match_hosts?: Array<string>;
|
|
360
|
+
match_paths?: Array<string>;
|
|
361
|
+
type?: string;
|
|
362
|
+
}
|
|
363
|
+
namespace Rule {
|
|
364
|
+
interface Aws {
|
|
365
|
+
access_key_id: Aws.AccessKeyID;
|
|
366
|
+
secret_access_key: Aws.SecretAccessKey;
|
|
367
|
+
}
|
|
368
|
+
namespace Aws {
|
|
369
|
+
interface AccessKeyID {
|
|
370
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
371
|
+
is_set?: boolean;
|
|
372
|
+
value?: string;
|
|
373
|
+
}
|
|
374
|
+
interface SecretAccessKey {
|
|
375
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
376
|
+
is_set?: boolean;
|
|
377
|
+
value?: string;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
interface Gcp {
|
|
381
|
+
scopes: Array<string>;
|
|
382
|
+
service_account_json: Gcp.ServiceAccountJson;
|
|
383
|
+
}
|
|
384
|
+
namespace Gcp {
|
|
385
|
+
interface ServiceAccountJson {
|
|
386
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
387
|
+
is_set?: boolean;
|
|
388
|
+
value?: string;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
interface Header {
|
|
392
|
+
name: string;
|
|
393
|
+
type: 'plaintext' | 'opaque' | 'workspace_secret';
|
|
394
|
+
is_set?: boolean;
|
|
395
|
+
value?: string;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
export interface BoxListParams {
|
|
401
|
+
/**
|
|
402
|
+
* Filter by creator identity. Only 'me' is supported.
|
|
403
|
+
*/
|
|
404
|
+
created_by?: string;
|
|
405
|
+
/**
|
|
406
|
+
* Maximum number of results
|
|
407
|
+
*/
|
|
408
|
+
limit?: number;
|
|
409
|
+
/**
|
|
410
|
+
* Filter by name substring
|
|
411
|
+
*/
|
|
412
|
+
name_contains?: string;
|
|
413
|
+
/**
|
|
414
|
+
* Pagination offset
|
|
415
|
+
*/
|
|
416
|
+
offset?: number;
|
|
417
|
+
/**
|
|
418
|
+
* Sort column (name, status, created_at)
|
|
419
|
+
*/
|
|
420
|
+
sort_by?: string;
|
|
421
|
+
/**
|
|
422
|
+
* Sort direction (asc, desc)
|
|
423
|
+
*/
|
|
424
|
+
sort_direction?: string;
|
|
425
|
+
/**
|
|
426
|
+
* Filter by status (provisioning, ready, failed, stopped, deleting)
|
|
427
|
+
*/
|
|
428
|
+
status?: string;
|
|
429
|
+
}
|
|
430
|
+
export interface BoxCreateSnapshotParams {
|
|
431
|
+
name: string;
|
|
432
|
+
/**
|
|
433
|
+
* if omitted, creates a fresh checkpoint from the running VM
|
|
434
|
+
*/
|
|
435
|
+
checkpoint?: string;
|
|
436
|
+
/**
|
|
437
|
+
* sandbox-local Docker image to export
|
|
438
|
+
*/
|
|
439
|
+
docker_image?: string;
|
|
440
|
+
/**
|
|
441
|
+
* required for Docker image export unless the sandbox has a capacity
|
|
442
|
+
*/
|
|
443
|
+
fs_capacity_bytes?: number;
|
|
444
|
+
/**
|
|
445
|
+
* IncludeMemory, when true, captures a full VM memory snapshot alongside the
|
|
446
|
+
* filesystem clone. Only honored when the sandbox is running AND Checkpoint is
|
|
447
|
+
* omitted (i.e. a fresh in-VM checkpoint is requested). Defaults to false to keep
|
|
448
|
+
* snapshots small unless memory restore is explicitly desired.
|
|
449
|
+
*/
|
|
450
|
+
include_memory?: boolean;
|
|
451
|
+
}
|
|
452
|
+
export interface BoxGenerateServiceURLParams {
|
|
453
|
+
expires_in_seconds?: number;
|
|
454
|
+
port?: number;
|
|
455
|
+
}
|
|
456
|
+
export declare namespace Boxes {
|
|
457
|
+
export { type BoxCreateParams as BoxCreateParams, type BoxUpdateParams as BoxUpdateParams, type BoxListParams as BoxListParams, type BoxCreateSnapshotParams as BoxCreateSnapshotParams, type BoxGenerateServiceURLParams as BoxGenerateServiceURLParams, };
|
|
458
|
+
}
|