langsmith 0.8.6 → 0.8.8
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/annotation-queues/annotation-queues.cjs +147 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +372 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +110 -0
- package/dist/_openapi_client/resources/annotation-queues/items.cjs +84 -0
- package/dist/_openapi_client/resources/annotation-queues/items.d.ts +207 -0
- package/dist/_openapi_client/resources/annotation-queues/items.js +80 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.cjs +61 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +185 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.js +57 -0
- package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +1 -1
- package/dist/_openapi_client/resources/datasets/experiment-runs.js +1 -1
- 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/info.cjs +3 -1
- package/dist/_openapi_client/resources/info.d.ts +16 -22
- package/dist/_openapi_client/resources/info.js +3 -1
- package/dist/_openapi_client/resources/issues.cjs +2 -2
- package/dist/_openapi_client/resources/issues.js +2 -2
- package/dist/_openapi_client/resources/online-evaluators.cjs +7 -7
- package/dist/_openapi_client/resources/online-evaluators.d.ts +8 -0
- package/dist/_openapi_client/resources/online-evaluators.js +7 -7
- package/dist/_openapi_client/resources/public/runs.cjs +2 -2
- package/dist/_openapi_client/resources/public/runs.d.ts +1 -1
- package/dist/_openapi_client/resources/public/runs.js +2 -2
- package/dist/_openapi_client/resources/runs/runs.cjs +3 -3
- package/dist/_openapi_client/resources/runs/runs.d.ts +9 -4
- package/dist/_openapi_client/resources/runs/runs.js +3 -3
- package/dist/_openapi_client/resources/runs/share.cjs +2 -2
- package/dist/_openapi_client/resources/runs/share.js +2 -2
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +10 -10
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +40 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.js +10 -10
- package/dist/_openapi_client/resources/sandboxes/registries.cjs +5 -5
- package/dist/_openapi_client/resources/sandboxes/registries.js +5 -5
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +17 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +4 -4
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +12 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +4 -4
- package/dist/_openapi_client/resources/threads.cjs +3 -3
- package/dist/_openapi_client/resources/threads.d.ts +2 -1
- package/dist/_openapi_client/resources/threads.js +3 -3
- package/dist/_openapi_client/resources/traces.cjs +2 -2
- package/dist/_openapi_client/resources/traces.d.ts +1 -1
- package/dist/_openapi_client/resources/traces.js +2 -2
- package/dist/client.cjs +57 -21
- package/dist/client.d.ts +58 -22
- package/dist/client.js +57 -21
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/command_handle.cjs +4 -4
- package/dist/sandbox/command_handle.js +5 -5
- package/dist/sandbox/errors.cjs +16 -1
- package/dist/sandbox/errors.d.ts +11 -0
- package/dist/sandbox/errors.js +14 -0
- package/dist/sandbox/index.cjs +2 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/sandbox.cjs +33 -17
- package/dist/sandbox/sandbox.d.ts +2 -1
- package/dist/sandbox/sandbox.js +35 -19
- package/dist/sandbox/ws_execute.cjs +87 -13
- package/dist/sandbox/ws_execute.d.ts +10 -0
- package/dist/sandbox/ws_execute.js +83 -13
- package/package.json +1 -1
- package/dist/utils/constants.cjs +0 -4
- package/dist/utils/constants.d.ts +0 -1
- package/dist/utils/constants.js +0 -1
|
@@ -150,6 +150,11 @@ export interface Run {
|
|
|
150
150
|
* `is_root` is true when this run has no parent (it is the trace root).
|
|
151
151
|
*/
|
|
152
152
|
is_root?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* `last_queued_at` is the most recent time this run was added to an annotation
|
|
155
|
+
* queue.
|
|
156
|
+
*/
|
|
157
|
+
last_queued_at?: string;
|
|
153
158
|
/**
|
|
154
159
|
* `latency_seconds` is wall-clock duration from start to end in seconds.
|
|
155
160
|
*/
|
|
@@ -545,11 +550,12 @@ export interface RunSchema {
|
|
|
545
550
|
trace_upgrade?: boolean;
|
|
546
551
|
ttl_seconds?: number | null;
|
|
547
552
|
}
|
|
548
|
-
export type RunSelectField = 'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'SHARE_URL' | 'FEEDBACK_STATS';
|
|
553
|
+
export type RunSelectField = 'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS';
|
|
549
554
|
/**
|
|
550
555
|
* Query params for run stats.
|
|
551
556
|
*/
|
|
552
557
|
export interface RunStatsQueryParams {
|
|
558
|
+
session: Array<string>;
|
|
553
559
|
id?: Array<string> | null;
|
|
554
560
|
/**
|
|
555
561
|
* Enum for run data source types.
|
|
@@ -576,7 +582,6 @@ export interface RunStatsQueryParams {
|
|
|
576
582
|
run_type?: RunTypeEnum | null;
|
|
577
583
|
search_filter?: string | null;
|
|
578
584
|
select?: Array<'run_count' | 'latency_p50' | 'latency_p99' | 'latency_avg' | 'first_token_p50' | 'first_token_p99' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'median_tokens' | 'completion_tokens_p50' | 'prompt_tokens_p50' | 'tokens_p99' | 'completion_tokens_p99' | 'prompt_tokens_p99' | 'last_run_start_time' | 'feedback_stats' | 'thread_feedback_stats' | 'run_facets' | 'error_rate' | 'streaming_rate' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'cost_p50' | 'cost_p99' | 'session_feedback_stats' | 'all_run_stats' | 'all_token_stats' | 'group_count' | 'prompt_token_details' | 'completion_token_details' | 'prompt_cost_details' | 'completion_cost_details'> | null;
|
|
579
|
-
session?: Array<string> | null;
|
|
580
585
|
skip_pagination?: boolean | null;
|
|
581
586
|
start_time?: string | null;
|
|
582
587
|
/**
|
|
@@ -725,7 +730,7 @@ export interface RunRetrieveV2Params {
|
|
|
725
730
|
* (repeatable query parameter). Accepts any value of the `RunSelectField` enum. If
|
|
726
731
|
* omitted, only `id` is returned.
|
|
727
732
|
*/
|
|
728
|
-
selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'SHARE_URL' | 'FEEDBACK_STATS'>;
|
|
733
|
+
selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS'>;
|
|
729
734
|
/**
|
|
730
735
|
* Query param: `start_time` is the run's `start_time` (RFC3339 date-time).
|
|
731
736
|
* Providing it speeds up retrieval.
|
|
@@ -746,7 +751,7 @@ export interface RunRetrieveParams {
|
|
|
746
751
|
* (repeatable query parameter). Accepts any value of the `RunSelectField` enum. If
|
|
747
752
|
* omitted, only `id` is returned.
|
|
748
753
|
*/
|
|
749
|
-
selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'SHARE_URL' | 'FEEDBACK_STATS'>;
|
|
754
|
+
selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS'>;
|
|
750
755
|
/**
|
|
751
756
|
* Query param: `start_time` is the run's `start_time` (RFC3339 date-time).
|
|
752
757
|
* Providing it speeds up retrieval.
|
|
@@ -42,7 +42,7 @@ export class Runs extends APIResource {
|
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
44
|
getURL(runID, query, options) {
|
|
45
|
-
return this._client.get(path `/v2/runs/${runID}/url`, { query, ...options });
|
|
45
|
+
return this._client.get(path `/api/v2/runs/${runID}/url`, { query, ...options });
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* **Alpha:** The request and response contract may change; Returns a paginated
|
|
@@ -59,7 +59,7 @@ export class Runs extends APIResource {
|
|
|
59
59
|
*/
|
|
60
60
|
queryV2(params, options) {
|
|
61
61
|
const { Accept, ...body } = params;
|
|
62
|
-
return this._client.getAPIList('/v2/runs/query', (ItemsCursorPostPagination), {
|
|
62
|
+
return this._client.getAPIList('/api/v2/runs/query', (ItemsCursorPostPagination), {
|
|
63
63
|
body,
|
|
64
64
|
method: 'post',
|
|
65
65
|
...options,
|
|
@@ -81,7 +81,7 @@ export class Runs extends APIResource {
|
|
|
81
81
|
*/
|
|
82
82
|
retrieveV2(runID, params, options) {
|
|
83
83
|
const { Accept, ...query } = params;
|
|
84
|
-
return this._client.get(path `/v2/runs/${runID}`, {
|
|
84
|
+
return this._client.get(path `/api/v2/runs/${runID}`, {
|
|
85
85
|
query,
|
|
86
86
|
...options,
|
|
87
87
|
headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
@@ -18,7 +18,7 @@ class Share extends resource_js_1.APIResource {
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
create(runID, body, options) {
|
|
21
|
-
return this._client.post((0, path_js_1.path) `/v2/runs/${runID}/share`, { body, ...options });
|
|
21
|
+
return this._client.post((0, path_js_1.path) `/api/v2/runs/${runID}/share`, { body, ...options });
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Deletes the share token for the trace identified by trace_id and session_id.
|
|
@@ -32,7 +32,7 @@ class Share extends resource_js_1.APIResource {
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
delete(traceID, body, options) {
|
|
35
|
-
return this._client.delete((0, path_js_1.path) `/v2/runs/${traceID}/share`, {
|
|
35
|
+
return this._client.delete((0, path_js_1.path) `/api/v2/runs/${traceID}/share`, {
|
|
36
36
|
body,
|
|
37
37
|
...options,
|
|
38
38
|
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
@@ -15,7 +15,7 @@ export class Share extends APIResource {
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
create(runID, body, options) {
|
|
18
|
-
return this._client.post(path `/v2/runs/${runID}/share`, { body, ...options });
|
|
18
|
+
return this._client.post(path `/api/v2/runs/${runID}/share`, { body, ...options });
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Deletes the share token for the trace identified by trace_id and session_id.
|
|
@@ -29,7 +29,7 @@ export class Share extends APIResource {
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
delete(traceID, body, options) {
|
|
32
|
-
return this._client.delete(path `/v2/runs/${traceID}/share`, {
|
|
32
|
+
return this._client.delete(path `/api/v2/runs/${traceID}/share`, {
|
|
33
33
|
body,
|
|
34
34
|
...options,
|
|
35
35
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
@@ -12,33 +12,33 @@ class Boxes extends resource_js_1.APIResource {
|
|
|
12
12
|
* `snapshot_name`; if neither is provided, the server uses the default snapshot.
|
|
13
13
|
*/
|
|
14
14
|
create(body, options) {
|
|
15
|
-
return this._client.post('/v2/sandboxes/boxes', { body, ...options });
|
|
15
|
+
return this._client.post('/api/v2/sandboxes/boxes', { body, ...options });
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Retrieve a sandbox by name. Stale provisioning sandboxes are auto-failed.
|
|
19
19
|
*/
|
|
20
20
|
retrieve(name, options) {
|
|
21
|
-
return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, options);
|
|
21
|
+
return this._client.get((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}`, options);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Update a sandbox's display name. The name must be unique within the tenant.
|
|
25
25
|
*/
|
|
26
26
|
update(name, body, options) {
|
|
27
|
-
return this._client.patch((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, { body, ...options });
|
|
27
|
+
return this._client.patch((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}`, { body, ...options });
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* List sandboxes for the authenticated tenant, with optional filtering, sorting,
|
|
31
31
|
* and pagination.
|
|
32
32
|
*/
|
|
33
33
|
list(query = {}, options) {
|
|
34
|
-
return this._client.get('/v2/sandboxes/boxes', { query, ...options });
|
|
34
|
+
return this._client.get('/api/v2/sandboxes/boxes', { query, ...options });
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Delete a sandbox by name or UUID. Tears down the sandbox runtime and removes the
|
|
38
38
|
* DB record.
|
|
39
39
|
*/
|
|
40
40
|
delete(name, options) {
|
|
41
|
-
return this._client.delete((0, path_js_1.path) `/v2/sandboxes/boxes/${name}`, {
|
|
41
|
+
return this._client.delete((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}`, {
|
|
42
42
|
...options,
|
|
43
43
|
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
44
44
|
});
|
|
@@ -48,7 +48,7 @@ class Boxes extends resource_js_1.APIResource {
|
|
|
48
48
|
* existing checkpoint.
|
|
49
49
|
*/
|
|
50
50
|
createSnapshot(name, body, options) {
|
|
51
|
-
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/snapshot`, { body, ...options });
|
|
51
|
+
return this._client.post((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/snapshot`, { body, ...options });
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Create a short-lived JWT for accessing an HTTP service running on a specific
|
|
@@ -57,26 +57,26 @@ class Boxes extends resource_js_1.APIResource {
|
|
|
57
57
|
* token, and its expiry.
|
|
58
58
|
*/
|
|
59
59
|
generateServiceURL(name, body, options) {
|
|
60
|
-
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/service-url`, { body, ...options });
|
|
60
|
+
return this._client.post((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/service-url`, { body, ...options });
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Retrieve the lightweight status of a sandbox for polling.
|
|
64
64
|
*/
|
|
65
65
|
getStatus(name, options) {
|
|
66
|
-
return this._client.get((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/status`, options);
|
|
66
|
+
return this._client.get((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/status`, options);
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Start a stopped or failed sandbox. This endpoint is not idempotent.
|
|
70
70
|
*/
|
|
71
71
|
start(name, options) {
|
|
72
|
-
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/start`, options);
|
|
72
|
+
return this._client.post((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/start`, options);
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
75
|
* Stop a ready sandbox. This endpoint is not idempotent; the filesystem is
|
|
76
76
|
* preserved for later restart.
|
|
77
77
|
*/
|
|
78
78
|
stop(name, options) {
|
|
79
|
-
return this._client.post((0, path_js_1.path) `/v2/sandboxes/boxes/${name}/stop`, {
|
|
79
|
+
return this._client.post((0, path_js_1.path) `/api/v2/sandboxes/boxes/${name}/stop`, {
|
|
80
80
|
...options,
|
|
81
81
|
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
82
82
|
});
|
|
@@ -65,6 +65,13 @@ export interface BoxCreateParams {
|
|
|
65
65
|
};
|
|
66
66
|
fs_capacity_bytes?: number;
|
|
67
67
|
idle_ttl_seconds?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Labels are free-form key/value metadata persisted with the sandbox and returned
|
|
70
|
+
* on reads. Labels from the source snapshot are inherited unless overridden here.
|
|
71
|
+
*/
|
|
72
|
+
labels?: {
|
|
73
|
+
[key: string]: string;
|
|
74
|
+
};
|
|
68
75
|
mem_bytes?: number;
|
|
69
76
|
mount_config?: BoxCreateParams.MountConfig;
|
|
70
77
|
name?: string;
|
|
@@ -369,6 +376,17 @@ export declare namespace BoxCreateParams {
|
|
|
369
376
|
name: string;
|
|
370
377
|
aws?: Rule.Aws;
|
|
371
378
|
enabled?: boolean;
|
|
379
|
+
/**
|
|
380
|
+
* EnvVars are plaintext env vars set for every command in the sandbox while this
|
|
381
|
+
* rule is enabled. Use them for tools that refuse to run unless a credential env
|
|
382
|
+
* var is present (e.g. gh needs GH_TOKEN) even though this rule injects the real
|
|
383
|
+
* credential on the wire — set a dummy value here so the command starts. Explicit
|
|
384
|
+
* per-sandbox env_vars win over these, and provider-managed (AWS/GCP) vars win
|
|
385
|
+
* over both.
|
|
386
|
+
*/
|
|
387
|
+
env_vars?: {
|
|
388
|
+
[key: string]: string;
|
|
389
|
+
};
|
|
372
390
|
gcp?: Rule.Gcp;
|
|
373
391
|
headers?: Array<Rule.Header>;
|
|
374
392
|
/**
|
|
@@ -458,6 +476,17 @@ export declare namespace BoxUpdateParams {
|
|
|
458
476
|
name: string;
|
|
459
477
|
aws?: Rule.Aws;
|
|
460
478
|
enabled?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* EnvVars are plaintext env vars set for every command in the sandbox while this
|
|
481
|
+
* rule is enabled. Use them for tools that refuse to run unless a credential env
|
|
482
|
+
* var is present (e.g. gh needs GH_TOKEN) even though this rule injects the real
|
|
483
|
+
* credential on the wire — set a dummy value here so the command starts. Explicit
|
|
484
|
+
* per-sandbox env_vars win over these, and provider-managed (AWS/GCP) vars win
|
|
485
|
+
* over both.
|
|
486
|
+
*/
|
|
487
|
+
env_vars?: {
|
|
488
|
+
[key: string]: string;
|
|
489
|
+
};
|
|
461
490
|
gcp?: Rule.Gcp;
|
|
462
491
|
headers?: Array<Rule.Header>;
|
|
463
492
|
/**
|
|
@@ -510,6 +539,11 @@ export interface BoxListParams {
|
|
|
510
539
|
* Filter by creator identity. Only 'me' is supported.
|
|
511
540
|
*/
|
|
512
541
|
created_by?: string;
|
|
542
|
+
/**
|
|
543
|
+
* Filter by label. Repeatable; all must match. Use 'key' to match on key presence
|
|
544
|
+
* or 'key=value' for equality.
|
|
545
|
+
*/
|
|
546
|
+
label?: Array<string>;
|
|
513
547
|
/**
|
|
514
548
|
* Maximum number of results
|
|
515
549
|
*/
|
|
@@ -556,6 +590,12 @@ export interface BoxCreateSnapshotParams {
|
|
|
556
590
|
* snapshots small unless memory restore is explicitly desired.
|
|
557
591
|
*/
|
|
558
592
|
include_memory?: boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Labels seed the captured snapshot's labels.
|
|
595
|
+
*/
|
|
596
|
+
labels?: {
|
|
597
|
+
[key: string]: string;
|
|
598
|
+
};
|
|
559
599
|
}
|
|
560
600
|
export interface BoxGenerateServiceURLParams {
|
|
561
601
|
expires_in_seconds?: number;
|
|
@@ -9,33 +9,33 @@ export class Boxes extends APIResource {
|
|
|
9
9
|
* `snapshot_name`; if neither is provided, the server uses the default snapshot.
|
|
10
10
|
*/
|
|
11
11
|
create(body, options) {
|
|
12
|
-
return this._client.post('/v2/sandboxes/boxes', { body, ...options });
|
|
12
|
+
return this._client.post('/api/v2/sandboxes/boxes', { body, ...options });
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Retrieve a sandbox by name. Stale provisioning sandboxes are auto-failed.
|
|
16
16
|
*/
|
|
17
17
|
retrieve(name, options) {
|
|
18
|
-
return this._client.get(path `/v2/sandboxes/boxes/${name}`, options);
|
|
18
|
+
return this._client.get(path `/api/v2/sandboxes/boxes/${name}`, options);
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Update a sandbox's display name. The name must be unique within the tenant.
|
|
22
22
|
*/
|
|
23
23
|
update(name, body, options) {
|
|
24
|
-
return this._client.patch(path `/v2/sandboxes/boxes/${name}`, { body, ...options });
|
|
24
|
+
return this._client.patch(path `/api/v2/sandboxes/boxes/${name}`, { body, ...options });
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* List sandboxes for the authenticated tenant, with optional filtering, sorting,
|
|
28
28
|
* and pagination.
|
|
29
29
|
*/
|
|
30
30
|
list(query = {}, options) {
|
|
31
|
-
return this._client.get('/v2/sandboxes/boxes', { query, ...options });
|
|
31
|
+
return this._client.get('/api/v2/sandboxes/boxes', { query, ...options });
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Delete a sandbox by name or UUID. Tears down the sandbox runtime and removes the
|
|
35
35
|
* DB record.
|
|
36
36
|
*/
|
|
37
37
|
delete(name, options) {
|
|
38
|
-
return this._client.delete(path `/v2/sandboxes/boxes/${name}`, {
|
|
38
|
+
return this._client.delete(path `/api/v2/sandboxes/boxes/${name}`, {
|
|
39
39
|
...options,
|
|
40
40
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
41
41
|
});
|
|
@@ -45,7 +45,7 @@ export class Boxes extends APIResource {
|
|
|
45
45
|
* existing checkpoint.
|
|
46
46
|
*/
|
|
47
47
|
createSnapshot(name, body, options) {
|
|
48
|
-
return this._client.post(path `/v2/sandboxes/boxes/${name}/snapshot`, { body, ...options });
|
|
48
|
+
return this._client.post(path `/api/v2/sandboxes/boxes/${name}/snapshot`, { body, ...options });
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Create a short-lived JWT for accessing an HTTP service running on a specific
|
|
@@ -54,26 +54,26 @@ export class Boxes extends APIResource {
|
|
|
54
54
|
* token, and its expiry.
|
|
55
55
|
*/
|
|
56
56
|
generateServiceURL(name, body, options) {
|
|
57
|
-
return this._client.post(path `/v2/sandboxes/boxes/${name}/service-url`, { body, ...options });
|
|
57
|
+
return this._client.post(path `/api/v2/sandboxes/boxes/${name}/service-url`, { body, ...options });
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Retrieve the lightweight status of a sandbox for polling.
|
|
61
61
|
*/
|
|
62
62
|
getStatus(name, options) {
|
|
63
|
-
return this._client.get(path `/v2/sandboxes/boxes/${name}/status`, options);
|
|
63
|
+
return this._client.get(path `/api/v2/sandboxes/boxes/${name}/status`, options);
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Start a stopped or failed sandbox. This endpoint is not idempotent.
|
|
67
67
|
*/
|
|
68
68
|
start(name, options) {
|
|
69
|
-
return this._client.post(path `/v2/sandboxes/boxes/${name}/start`, options);
|
|
69
|
+
return this._client.post(path `/api/v2/sandboxes/boxes/${name}/start`, options);
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* Stop a ready sandbox. This endpoint is not idempotent; the filesystem is
|
|
73
73
|
* preserved for later restart.
|
|
74
74
|
*/
|
|
75
75
|
stop(name, options) {
|
|
76
|
-
return this._client.post(path `/v2/sandboxes/boxes/${name}/stop`, {
|
|
76
|
+
return this._client.post(path `/api/v2/sandboxes/boxes/${name}/stop`, {
|
|
77
77
|
...options,
|
|
78
78
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
79
79
|
});
|
|
@@ -11,31 +11,31 @@ class Registries extends resource_js_1.APIResource {
|
|
|
11
11
|
* Create a sandbox registry for pulling private images.
|
|
12
12
|
*/
|
|
13
13
|
create(body, options) {
|
|
14
|
-
return this._client.post('/v2/sandboxes/registries', { body, ...options });
|
|
14
|
+
return this._client.post('/api/v2/sandboxes/registries', { body, ...options });
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Get a sandbox registry by name.
|
|
18
18
|
*/
|
|
19
19
|
retrieve(name, options) {
|
|
20
|
-
return this._client.get((0, path_js_1.path) `/v2/sandboxes/registries/${name}`, options);
|
|
20
|
+
return this._client.get((0, path_js_1.path) `/api/v2/sandboxes/registries/${name}`, options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Update a sandbox registry's name and/or credentials.
|
|
24
24
|
*/
|
|
25
25
|
update(name, body, options) {
|
|
26
|
-
return this._client.patch((0, path_js_1.path) `/v2/sandboxes/registries/${name}`, { body, ...options });
|
|
26
|
+
return this._client.patch((0, path_js_1.path) `/api/v2/sandboxes/registries/${name}`, { body, ...options });
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* List sandbox registries for pulling private images.
|
|
30
30
|
*/
|
|
31
31
|
list(query = {}, options) {
|
|
32
|
-
return this._client.get('/v2/sandboxes/registries', { query, ...options });
|
|
32
|
+
return this._client.get('/api/v2/sandboxes/registries', { query, ...options });
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Delete a sandbox registry by name.
|
|
36
36
|
*/
|
|
37
37
|
delete(name, options) {
|
|
38
|
-
return this._client.delete((0, path_js_1.path) `/v2/sandboxes/registries/${name}`, {
|
|
38
|
+
return this._client.delete((0, path_js_1.path) `/api/v2/sandboxes/registries/${name}`, {
|
|
39
39
|
...options,
|
|
40
40
|
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
41
41
|
});
|
|
@@ -8,31 +8,31 @@ export class Registries extends APIResource {
|
|
|
8
8
|
* Create a sandbox registry for pulling private images.
|
|
9
9
|
*/
|
|
10
10
|
create(body, options) {
|
|
11
|
-
return this._client.post('/v2/sandboxes/registries', { body, ...options });
|
|
11
|
+
return this._client.post('/api/v2/sandboxes/registries', { body, ...options });
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Get a sandbox registry by name.
|
|
15
15
|
*/
|
|
16
16
|
retrieve(name, options) {
|
|
17
|
-
return this._client.get(path `/v2/sandboxes/registries/${name}`, options);
|
|
17
|
+
return this._client.get(path `/api/v2/sandboxes/registries/${name}`, options);
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Update a sandbox registry's name and/or credentials.
|
|
21
21
|
*/
|
|
22
22
|
update(name, body, options) {
|
|
23
|
-
return this._client.patch(path `/v2/sandboxes/registries/${name}`, { body, ...options });
|
|
23
|
+
return this._client.patch(path `/api/v2/sandboxes/registries/${name}`, { body, ...options });
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* List sandbox registries for pulling private images.
|
|
27
27
|
*/
|
|
28
28
|
list(query = {}, options) {
|
|
29
|
-
return this._client.get('/v2/sandboxes/registries', { query, ...options });
|
|
29
|
+
return this._client.get('/api/v2/sandboxes/registries', { query, ...options });
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Delete a sandbox registry by name.
|
|
33
33
|
*/
|
|
34
34
|
delete(name, options) {
|
|
35
|
-
return this._client.delete(path `/v2/sandboxes/registries/${name}`, {
|
|
35
|
+
return this._client.delete(path `/api/v2/sandboxes/registries/${name}`, {
|
|
36
36
|
...options,
|
|
37
37
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
38
38
|
});
|
|
@@ -23,6 +23,9 @@ export interface SandboxResponse {
|
|
|
23
23
|
delete_after_stop_seconds?: number;
|
|
24
24
|
fs_capacity_bytes?: number;
|
|
25
25
|
idle_ttl_seconds?: number;
|
|
26
|
+
labels?: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
};
|
|
26
29
|
mem_bytes?: number;
|
|
27
30
|
mount_config?: SandboxResponse.MountConfig;
|
|
28
31
|
name?: string;
|
|
@@ -314,6 +317,17 @@ export declare namespace SandboxResponse {
|
|
|
314
317
|
name: string;
|
|
315
318
|
aws?: Rule.Aws;
|
|
316
319
|
enabled?: boolean;
|
|
320
|
+
/**
|
|
321
|
+
* EnvVars are plaintext env vars set for every command in the sandbox while this
|
|
322
|
+
* rule is enabled. Use them for tools that refuse to run unless a credential env
|
|
323
|
+
* var is present (e.g. gh needs GH_TOKEN) even though this rule injects the real
|
|
324
|
+
* credential on the wire — set a dummy value here so the command starts. Explicit
|
|
325
|
+
* per-sandbox env_vars win over these, and provider-managed (AWS/GCP) vars win
|
|
326
|
+
* over both.
|
|
327
|
+
*/
|
|
328
|
+
env_vars?: {
|
|
329
|
+
[key: string]: string;
|
|
330
|
+
};
|
|
317
331
|
gcp?: Rule.Gcp;
|
|
318
332
|
headers?: Array<Rule.Header>;
|
|
319
333
|
/**
|
|
@@ -383,6 +397,9 @@ export interface SnapshotResponse {
|
|
|
383
397
|
fs_capacity_bytes?: number;
|
|
384
398
|
fs_used_bytes?: number;
|
|
385
399
|
image_digest?: string;
|
|
400
|
+
labels?: {
|
|
401
|
+
[key: string]: string;
|
|
402
|
+
};
|
|
386
403
|
/**
|
|
387
404
|
* MemorySnapshotSizeBytes is non-nil iff the snapshot was captured with VM memory
|
|
388
405
|
* state. A non-nil value is the canonical signal that this snapshot can
|
|
@@ -11,26 +11,26 @@ class Snapshots extends resource_js_1.APIResource {
|
|
|
11
11
|
* Create a snapshot from a Docker image (async build).
|
|
12
12
|
*/
|
|
13
13
|
create(body, options) {
|
|
14
|
-
return this._client.post('/v2/sandboxes/snapshots', { body, ...options });
|
|
14
|
+
return this._client.post('/api/v2/sandboxes/snapshots', { body, ...options });
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Get a sandbox snapshot by ID.
|
|
18
18
|
*/
|
|
19
19
|
retrieve(snapshotID, options) {
|
|
20
|
-
return this._client.get((0, path_js_1.path) `/v2/sandboxes/snapshots/${snapshotID}`, options);
|
|
20
|
+
return this._client.get((0, path_js_1.path) `/api/v2/sandboxes/snapshots/${snapshotID}`, options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* List sandbox snapshots for the authenticated tenant, with optional filtering,
|
|
24
24
|
* sorting, and pagination.
|
|
25
25
|
*/
|
|
26
26
|
list(query = {}, options) {
|
|
27
|
-
return this._client.get('/v2/sandboxes/snapshots', { query, ...options });
|
|
27
|
+
return this._client.get('/api/v2/sandboxes/snapshots', { query, ...options });
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Delete a snapshot by ID. The underlying storage is reclaimed asynchronously.
|
|
31
31
|
*/
|
|
32
32
|
delete(snapshotID, options) {
|
|
33
|
-
return this._client.delete((0, path_js_1.path) `/v2/sandboxes/snapshots/${snapshotID}`, {
|
|
33
|
+
return this._client.delete((0, path_js_1.path) `/api/v2/sandboxes/snapshots/${snapshotID}`, {
|
|
34
34
|
...options,
|
|
35
35
|
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
36
36
|
});
|
|
@@ -25,6 +25,13 @@ export interface SnapshotCreateParams {
|
|
|
25
25
|
docker_image: string;
|
|
26
26
|
fs_capacity_bytes: number;
|
|
27
27
|
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Labels seed the snapshot's labels, overriding any label of the same key derived
|
|
30
|
+
* from the Docker image.
|
|
31
|
+
*/
|
|
32
|
+
labels?: {
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
};
|
|
28
35
|
registry_id?: string;
|
|
29
36
|
}
|
|
30
37
|
export interface SnapshotListParams {
|
|
@@ -32,6 +39,11 @@ export interface SnapshotListParams {
|
|
|
32
39
|
* Filter by creator identity. Only 'me' is supported.
|
|
33
40
|
*/
|
|
34
41
|
created_by?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Filter by label. Repeatable; all must match. Use 'key' to match on key presence
|
|
44
|
+
* or 'key=value' for equality.
|
|
45
|
+
*/
|
|
46
|
+
label?: Array<string>;
|
|
35
47
|
/**
|
|
36
48
|
* Maximum number of results
|
|
37
49
|
*/
|
|
@@ -8,26 +8,26 @@ export class Snapshots extends APIResource {
|
|
|
8
8
|
* Create a snapshot from a Docker image (async build).
|
|
9
9
|
*/
|
|
10
10
|
create(body, options) {
|
|
11
|
-
return this._client.post('/v2/sandboxes/snapshots', { body, ...options });
|
|
11
|
+
return this._client.post('/api/v2/sandboxes/snapshots', { body, ...options });
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Get a sandbox snapshot by ID.
|
|
15
15
|
*/
|
|
16
16
|
retrieve(snapshotID, options) {
|
|
17
|
-
return this._client.get(path `/v2/sandboxes/snapshots/${snapshotID}`, options);
|
|
17
|
+
return this._client.get(path `/api/v2/sandboxes/snapshots/${snapshotID}`, options);
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* List sandbox snapshots for the authenticated tenant, with optional filtering,
|
|
21
21
|
* sorting, and pagination.
|
|
22
22
|
*/
|
|
23
23
|
list(query = {}, options) {
|
|
24
|
-
return this._client.get('/v2/sandboxes/snapshots', { query, ...options });
|
|
24
|
+
return this._client.get('/api/v2/sandboxes/snapshots', { query, ...options });
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Delete a snapshot by ID. The underlying storage is reclaimed asynchronously.
|
|
28
28
|
*/
|
|
29
29
|
delete(snapshotID, options) {
|
|
30
|
-
return this._client.delete(path `/v2/sandboxes/snapshots/${snapshotID}`, {
|
|
30
|
+
return this._client.delete(path `/api/v2/sandboxes/snapshots/${snapshotID}`, {
|
|
31
31
|
...options,
|
|
32
32
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
33
33
|
});
|
|
@@ -23,7 +23,7 @@ class Threads extends resource_js_1.APIResource {
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
listTraces(threadID, query, options) {
|
|
26
|
-
return this._client.getAPIList((0, path_js_1.path) `/v2/threads/${threadID}/traces`, (pagination_js_1.ItemsCursorGetPagination), { query, ...options });
|
|
26
|
+
return this._client.getAPIList((0, path_js_1.path) `/api/v2/threads/${threadID}/traces`, (pagination_js_1.ItemsCursorGetPagination), { query, ...options });
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* **Alpha:** The request and response contract may change; Query threads within a
|
|
@@ -39,7 +39,7 @@ class Threads extends resource_js_1.APIResource {
|
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
41
|
query(body, options) {
|
|
42
|
-
return this._client.getAPIList('/v2/threads/query', (pagination_js_1.ItemsCursorPostPagination), {
|
|
42
|
+
return this._client.getAPIList('/api/v2/threads/query', (pagination_js_1.ItemsCursorPostPagination), {
|
|
43
43
|
body,
|
|
44
44
|
method: 'post',
|
|
45
45
|
...options,
|
|
@@ -62,7 +62,7 @@ class Threads extends resource_js_1.APIResource {
|
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
64
|
stats(threadID, query, options) {
|
|
65
|
-
return this._client.get((0, path_js_1.path) `/v2/threads/${threadID}/stats`, { query, ...options });
|
|
65
|
+
return this._client.get((0, path_js_1.path) `/api/v2/threads/${threadID}/stats`, { query, ...options });
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
exports.Threads = Threads;
|
|
@@ -554,7 +554,8 @@ export interface ThreadTrace {
|
|
|
554
554
|
*/
|
|
555
555
|
total_tokens?: number;
|
|
556
556
|
/**
|
|
557
|
-
* `trace_id` is the UUID of this trace (the root run).
|
|
557
|
+
* `trace_id` is the UUID of this trace (the root run). Returned when `TRACE_ID` is
|
|
558
|
+
* in `selects`, or when `selects` is omitted entirely (sole fallback field).
|
|
558
559
|
*/
|
|
559
560
|
trace_id?: string;
|
|
560
561
|
}
|
|
@@ -20,7 +20,7 @@ export class Threads extends APIResource {
|
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
listTraces(threadID, query, options) {
|
|
23
|
-
return this._client.getAPIList(path `/v2/threads/${threadID}/traces`, (ItemsCursorGetPagination), { query, ...options });
|
|
23
|
+
return this._client.getAPIList(path `/api/v2/threads/${threadID}/traces`, (ItemsCursorGetPagination), { query, ...options });
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* **Alpha:** The request and response contract may change; Query threads within a
|
|
@@ -36,7 +36,7 @@ export class Threads extends APIResource {
|
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
38
|
query(body, options) {
|
|
39
|
-
return this._client.getAPIList('/v2/threads/query', (ItemsCursorPostPagination), {
|
|
39
|
+
return this._client.getAPIList('/api/v2/threads/query', (ItemsCursorPostPagination), {
|
|
40
40
|
body,
|
|
41
41
|
method: 'post',
|
|
42
42
|
...options,
|
|
@@ -59,6 +59,6 @@ export class Threads extends APIResource {
|
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
61
|
stats(threadID, query, options) {
|
|
62
|
-
return this._client.get(path `/v2/threads/${threadID}/stats`, { query, ...options });
|
|
62
|
+
return this._client.get(path `/api/v2/threads/${threadID}/stats`, { query, ...options });
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -23,7 +23,7 @@ class Traces extends resource_js_1.APIResource {
|
|
|
23
23
|
*/
|
|
24
24
|
listRuns(traceID, params, options) {
|
|
25
25
|
const { Accept, ...query } = params;
|
|
26
|
-
return this._client.get((0, path_js_1.path) `/v2/traces/${traceID}/runs`, {
|
|
26
|
+
return this._client.get((0, path_js_1.path) `/api/v2/traces/${traceID}/runs`, {
|
|
27
27
|
query,
|
|
28
28
|
...options,
|
|
29
29
|
headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
|
|
@@ -51,7 +51,7 @@ class Traces extends resource_js_1.APIResource {
|
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
53
|
query(body, options) {
|
|
54
|
-
return this._client.getAPIList('/v2/traces/query', (pagination_js_1.ItemsCursorPostPagination), {
|
|
54
|
+
return this._client.getAPIList('/api/v2/traces/query', (pagination_js_1.ItemsCursorPostPagination), {
|
|
55
55
|
body,
|
|
56
56
|
method: 'post',
|
|
57
57
|
...options,
|